film – Nikon MF-29 date back usage and imprint location

I’ve pulled my F-100 out of the cupboard to use this weekend and remembered that it has an MF-29 date back. However I can’t remember exactly how the date back works, neither do I have a manual for it, and can’t find any information about the MF-29 online (albeit there are some sketchy websites that purport to have a PDF for download)

What I do know about the MF-29 is that it is fairly simple, and there are only 3 buttons on it:

  • Mode – Cycles through the “display” modes of the unit (Off, and 4 date/time formats – YYMMDD, MMDDYY, DDMMYY and DDHHMM)
  • Select – Is used to select the current date part (Day, Month, Year, Time) to change
  • Adjust – Is used to change the selected date part in order to set the current date/time.

And there is an LCD that displays the data that will be imprinted on the film:

  • Off – (no data imprinted) displays as “——“
  • YYMMDD – Year/Month/Day, displays as (EG for today) “201127”
  • MMDDYY – Month/Day/Year, displays as “112720”
  • DDMMYY – Day/Month/Year, displays as “271120”
  • DDHHMM – Day, Hour/Minute, displays as “27 2:15”

There is also a bar on the LCD that indicates that a date will be imprinted on the film (linked to the “Print” text printed on the date back itself), and a an indicator that identifies the currently selected date format. See this example image for the YYMMDD format (the long bar in the top right indicates that the data will be imprinted):

enter image description here

What I can’t remember about the MF-29 is where on the film the date information is imprinted. I thought that it was interspersed between frames (I used to have an F-80 with dateback that did that), but in the F-100 manual it states for Custom Setting 18:

18. Data Imprint (year/month/day/hour/minute) on Frame #0

Options:

0 – Disabled (initial setting)

1 – Enabled

With optional Data Back MF-29, data (year/month/day/hour/minute) can
be set to be imprinted on frame #0. To imprint data on frame #0 only
and not on frame #1 on, cancel the data imprint on the MF-29 after
film is automatically advanced to the first frame

But this implies to me that the data is imprinted on the frame itself. (and that you can get it to start imprinting before the first user frame – EG frame #0)

So where on the film does the MF-29 imprint the data, and are there any examples online that show this information?

tables – For displaying of audit logs, is it better to show date and time on separate lines?

I have to design a page with a table for an audit log, and one of the columns is the Timestamp.
I am torn on how to handle this however, and I find examples of both on the web.

A] Without line break

2020-12-20  01:59:20 GMT+8

or

B] With line break

2020-12-20
01:59:20 GMT+8

What would be the best practice in this case?

The Launch Date Of This NBA 2K21 Game

The launching date of 2K MT is closing in and new information has surfaced with each passing day for fans to enjoy. These days, the trailer for MyCareer mode fell, and it’s nothing short of stunning.

Several adjustments were anticipated in the mode and by the looks of this, the developers seem to have pulled them off. Players may now begin their journey as a high school prospect and climb their way up into the NBA. In addition, the neighborhood has a new look for it after having been stale for some time.

Let’s have a peek at a few of the newest features that Buy NBA 2K21 MT will bring to the table. If they function well on a high school contract, they can earn a contract to play for the NCAA tournament. Although not all faculty teams are featured, there are still 10 choices to pick from. Furthermore, picking different brokers are going to have an impact on the livelihood and popularity.
SEMrush

 

io – How to implement simple Date class in C++? Edit: And use that class with [i/o]stream_iterators

I would like to know how can I improve my simple Date class in C++. I am reading https://www.amazon.com/Exceptional-Engineering-Programming-Problems-Solutions/dp/0201615622 and the very first example handle with a Date object, but provide no implementation. So I tried to implement it myself:

Date.hpp:

#ifndef DATE_HPP
#define DATE_HPP

#include <sstream>
#include <time.h>

#define fmt "%m/%d/%y"

class Date
{
    std::stringstream buffer;
    struct tm date;

    template <class T>
    void insertbuf(const T &);
    void inserttime();
    std::string getFromIn(std::istream &);

public:
    //ctors
    Date();
    Date(const char *str);
    Date(const std::string &s);
    Date(std::istream &in);
    Date(const Date &d);

    //operators
    Date &operator=(const Date &rhs);

    //friends
    friend std::istream &operator>>(std::istream &, Date &);

    //general
    const std::string getAll() const;
    int getMonth() const;
    int getDay() const;
    int getYear() const;
    void clear();
};

std::istream &operator>>(std::istream &in, Date &d);
std::ostream &operator<<(std::ostream &out, const Date &d);

#endif //DATE_HPP

and its implementation:
date.cpp:

#include <time.h>
#include "date.hpp"
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <ctype.h>

std::string &ltrim(std::string &s)
{
    s.erase(s.begin(), std::find_if(s.begin(), s.end(),
                                    std::not1(std::ptr_fun<int, int>(std::isspace))));
    return s;
}

std::string &rtrim(std::string &s)
{
    s.erase(std::find_if(s.rbegin(), s.rend(),
                         std::not1(std::ptr_fun<int, int>(std::isspace)))
                .base(),
            s.end());
    return s;
}

std::string &trim(std::string &s)
{
    return ltrim(rtrim(s));
}
////

template <class T>
void Date::insertbuf(const T &val)
{
    if (!buffer.rdbuf()->in_avail())
    {
        buffer << val;
    }
}

void Date::inserttime()
{
    buffer >> std::get_time(&date, fmt);
}

std::string Date::getFromIn(std::istream &in)
{
    std::cout << "Enter date in format (mm/dd/yyyy): ";
    std::string tmp;
    std::getline(in, tmp);
    tmp = trim(tmp);
    return tmp;
}

void Date::clear()
{
    buffer.str("");
    buffer.clear();
}

Date::Date()
{
    time_t now = time(0);
    struct tm *tmp = localtime(&now);
    date = *tmp;
    insertbuf<std::_Put_time<char>>(std::put_time(&date, fmt));
}

Date::Date(const char *str)
{
    insertbuf<const char *>(str);
    inserttime();
}

Date::Date(const std::string &s)
{
    insertbuf<std::string>(s);
    inserttime();
}

Date::Date(std::istream &in)
{
    std::string input = getFromIn(in);
    insertbuf<std::string>(input);
    inserttime();
}

Date::Date(const Date &d)
{
    date = d.date;
    insertbuf<std::string>(d.buffer.str());
    inserttime();
}

Date &Date::operator=(const Date &rhs)
{
    if (&rhs != this)
    {
        clear();
        insertbuf<std::string>(rhs.buffer.str());
        inserttime();
    }
    return *this;
}

const std::string Date::getAll() const
{
    int mon = date.tm_mon + 1;
    int day = date.tm_mday;
    int year = date.tm_year + 1900;
    std::string out = std::string("date: ") + std::to_string(mon) + "/" + std::to_string(day) + "/" + std::to_string(year);
    return out;
}

int Date::getMonth() const
{
    return date.tm_mon + 1;
}

int Date::getDay() const
{
    return date.tm_mday;
}

int Date::getYear() const
{
    return date.tm_year + 1900;
}

std::istream &operator>>(std::istream &in, Date &d)
{
    d.clear();
    std::string tmp = d.getFromIn(in);
    d.insertbuf<std::string>(tmp);
    d.inserttime();
    return in;
}

std::ostream &operator<<(std::ostream &out, const Date &d)
{
    out << d.getAll();
    return out;
}

Can If I use it main.cpp:

#include <sstream>
#include <iostream>
#include <iomanip>
#include <time.h>
#include "date.hpp"
#include <vector>
#include <iterator>
#include <algorithm>

using namespace std;

struct Functor
{
    Functor(const std::string &s) : s_(s) {}
    bool operator()(const Date &d) const
    {
        return d.getAll() == s_;
    }

private:
    const std::string &s_;
};

int main()
{
    vector<Date> e;

    copy(istream_iterator<Date>(cin), istream_iterator<Date>(), back_inserter(e));

    vector<Date>::iterator first = find_if(e.begin(), e.end(), Functor("01/01/2020"));
    vector<Date>::iterator last = find_if(e.begin(), e.end(), Functor("12/31/2020"));

    copy(first, last, ostream_iterator<Date>(cout, "n"));
}

It compiles, it runs. But the problem is it will not output the proper data. If I were to test individual operations such as operator>>, like

Date foo;
std::cin >> foo;

It works correctly. But somehow inside the copy algorithm, which uses istream_iterator and ostream_iterator the information about the date (in struct tm got lost). But otherwise, the class works as expected.

EDIT:
Please use the original main function with (i/o)stream_iterators used. It is part of the question.

Why can't you have access to some websites when your time and date aren't up-to-date ?

Sometimes when you don’t use your pc for a while, the CMOS battery in the motherboard (that keeps your bios settings saved) just dies and you will be mostly stuck with 1st january 1970 as a date in your computer ( it can be another date, depending on your computer) .
The question is that why does the time and date in your computer matter if you are using internet to check that specific website ?

Windows display date format incorrect

In Control PanelClock and RegionRegion, the format is correctly set to “English (United Kingdom)” and the example for a short date shows 23/11/2020. The date is correctly displayed on the Taskbar, list of installed applications, Task Scheduler and so on.

Control Panel > Region

But other parts of Windows show an incorrect date format, such as Control PanelSystem and SecuritySecurity and MaintenanceAutomatic MaintenanceLast run date. This looks like a “English (United States)” date format.

Control Panel > Maintenance

Is this a bug in Windows and can this be corrected?

google sheets – Formula to output the date for next Friday once it has passed 20:00 on Friday

Alsors, try this:

=ArrayFormula(IF((WEEKDAY(TODAY())=6)*(NOW()-TODAY()>=TIMEVALUE("8:00 PM")),TODAY()+7,FILTER(SEQUENCE(7,1,TODAY()),WEEKDAY(SEQUENCE(7,1,TODAY()))=6)))

HOW IT WORKS

The formula assumes Sunday is counted as weekday 1 and, therefore, that Friday is counted as 6.

The first part of the IF checks to see if two conditions are true: That today is Friday and that the current time is greater than or equal to 8:00 PM. If those are both TRUE, then the date is set to seven days in the future (i.e., next Friday).

If this small window of time is not the case, then the second half of the IF statement takes effect. A SEQUENCE is formed of seven dates starting with today’s date. FILTER filters in only those days whose weekday is 6 (i.e., Friday). And since there will only be one Friday within any seven-day SEQUENCE of dates, it will pull whatever the “next Friday” is.

(Note: If today is Friday before 8:00 PM, then the “next Friday” in the SEQUENCE is today, so it stays showing today’s date until after 8:00 PM.)

google sheets arrayformula – =IMPORTHTML forces content to date format

I am a beginner with code and formulas here, so I was wondering if anyone could do exactly what was done on this question:

Trying to use Google Sheets importHTML() to import a table. It forces content to a date format

to this table:

https://www.actionnetwork.com/nfl/nfl-against-the-spread-standings

In short, IMPORTHTML changes sports records to date format. Changing the numbers format to plain text does not work when importing websites, as the format is preset. However, there is a workaround using the ARRAYFORMULA and REGEXREPLACE. When you open the link scroll down to Aurielle’s response for the single formula version. I have tried to implement the workaround for the NFL record link above, but I can’t quite find the right formula mostly because, again, I’m a beginner and I don’t understand these formulas. I was wondering if anyone understood this better and could give me the correct formula for this specific table of NFL records.

I would greatly appreciate any help!

algorithm – How to implement simple Date class in C++?

I would like to know how can I improve my simple Date class in C++. I am reading https://www.amazon.com/Exceptional-Engineering-Programming-Problems-Solutions/dp/0201615622 and the very first example handle with a Date object, but provide no implementation. So I tried to implement it myself:

Date.hpp:

#ifndef DATE_HPP
#define DATE_HPP

#include <sstream>
#include <time.h>

#define fmt "%m/%d/%y"

class Date
{
    std::stringstream buffer;
    struct tm date;

    template <class T>
    void insertbuf(const T &);
    void inserttime();
    std::string getFromIn(std::istream &);

public:
    //ctors
    Date();
    Date(const char *str);
    Date(const std::string &s);
    Date(std::istream &in);
    Date(const Date &d);

    //operators
    Date &operator=(const Date &rhs);

    //friends
    friend std::istream &operator>>(std::istream &, Date &);

    //general
    const std::string getAll() const;
    int getMonth() const;
    int getDay() const;
    int getYear() const;
    void clear();
};

std::istream &operator>>(std::istream &in, Date &d);
std::ostream &operator<<(std::ostream &out, const Date &d);

#endif //DATE_HPP

and its implementation:
date.cpp:

#include <time.h>
#include "date.hpp"
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <ctype.h>

std::string &ltrim(std::string &s)
{
    s.erase(s.begin(), std::find_if(s.begin(), s.end(),
                                    std::not1(std::ptr_fun<int, int>(std::isspace))));
    return s;
}

std::string &rtrim(std::string &s)
{
    s.erase(std::find_if(s.rbegin(), s.rend(),
                         std::not1(std::ptr_fun<int, int>(std::isspace)))
                .base(),
            s.end());
    return s;
}

std::string &trim(std::string &s)
{
    return ltrim(rtrim(s));
}
////

template <class T>
void Date::insertbuf(const T &val)
{
    if (!buffer.rdbuf()->in_avail())
    {
        buffer << val;
    }
}

void Date::inserttime()
{
    buffer >> std::get_time(&date, fmt);
}

std::string Date::getFromIn(std::istream &in)
{
    std::cout << "Enter date in format (mm/dd/yyyy): ";
    std::string tmp;
    std::getline(in, tmp);
    tmp = trim(tmp);
    return tmp;
}

void Date::clear()
{
    buffer.str("");
    buffer.clear();
}

Date::Date()
{
    time_t now = time(0);
    struct tm *tmp = localtime(&now);
    date = *tmp;
    insertbuf<std::_Put_time<char>>(std::put_time(&date, fmt));
}

Date::Date(const char *str)
{
    insertbuf<const char *>(str);
    inserttime();
}

Date::Date(const std::string &s)
{
    insertbuf<std::string>(s);
    inserttime();
}

Date::Date(std::istream &in)
{
    std::string input = getFromIn(in);
    insertbuf<std::string>(input);
    inserttime();
}

Date::Date(const Date &d)
{
    date = d.date;
    insertbuf<std::string>(d.buffer.str());
    inserttime();
}

Date &Date::operator=(const Date &rhs)
{
    if (&rhs != this)
    {
        clear();
        insertbuf<std::string>(rhs.buffer.str());
        inserttime();
    }
    return *this;
}

const std::string Date::getAll() const
{
    int mon = date.tm_mon + 1;
    int day = date.tm_mday;
    int year = date.tm_year + 1900;
    std::string out = std::string("date: ") + std::to_string(mon) + "/" + std::to_string(day) + "/" + std::to_string(year);
    return out;
}

int Date::getMonth() const
{
    return date.tm_mon + 1;
}

int Date::getDay() const
{
    return date.tm_mday;
}

int Date::getYear() const
{
    return date.tm_year + 1900;
}

std::istream &operator>>(std::istream &in, Date &d)
{
    d.clear();
    std::string tmp = d.getFromIn(in);
    d.insertbuf<std::string>(tmp);
    d.inserttime();
    return in;
}

std::ostream &operator<<(std::ostream &out, const Date &d)
{
    out << d.getAll();
    return out;
}

Can If I use it main.cpp:

#include <sstream>
#include <iostream>
#include <iomanip>
#include <time.h>
#include "date.hpp"
#include <vector>
#include <iterator>
#include <algorithm>

using namespace std;

struct Functor
{
    Functor(const std::string &s) : s_(s) {}
    bool operator()(const Date &d) const
    {
        return d.getAll() == s_;
    }

private:
    const std::string &s_;
};

int main()
{
    vector<Date> e;

    copy(istream_iterator<Date>(cin), istream_iterator<Date>(), back_inserter(e));

    vector<Date>::iterator first = find_if(e.begin(), e.end(), Functor("01/01/2020"));
    vector<Date>::iterator last = find_if(e.begin(), e.end(), Functor("12/31/2020"));

    copy(first, last, ostream_iterator<Date>(cout, "n"));
}

It compiles, it runs. But the problem is it will not output the proper data. If I were to test individual operations such as operator>>, like

Date foo;
std::cin >> foo;

It works correctly. But somehow inside the copy algorithm, which uses istream_iterator and ostream_iterator the information about the date (in struct tm got lost). But otherwise, the class works as expected.