Skip to main content

Posts

Borissing

New word: Borissing 1. A behavior who started something, but succeeded to running away without taking responsibility. Usage example: a school teacher told a student, "Please don't borissing. You are already a 5th grade." 2. Referring an social harassment. Some people coincidentally has a similar name. There are some incidents, such child was picked in a class. The association "We did nothing wrong" officially stated, this is a discrimination, please stop using the word. But another association, "Yes, but this is the consequence" stated recently, we should solve the problem from the source, otherwise we could not completely solve this problem. -- in the Devil's dictionary draft

Young's double slit equation: Many textbooks draw parallel rays, but how could parallel rays intersect?

Young's double slit equation is well known result that shows the light has a wave property. https://www.khanacademy.org/science/physics/light-waves/interference-of-light-waves/v/youngs-double-slit-part-2 https://en.wikipedia.org/wiki/Young%27s_interference_experiment A typical illustration of Young's interference experiment is shown in Figure 1.  This figure confuses novice learners since at the point C, two parallel rays intersect. But how could possibly parallel rays intersect? In Euclidean geometry, parallel two lines will never intersect. Figure 1: Typical explanation figure: Two parallel rays and path length difference \[\Delta x\] Figure 2: Precise figure: Two rays intersect at point C to cause interference. Figure 2 shows more precise figure of Young's interference experiment. At the point C, two rays meet and cause an interference depends on the path difference from the holes H1 and H2. When you zoom in to the two holes part, you see the precise path...

How to remove the video recording time limitation of a Sony camera (Alpha 5000)

I have a Sony camera (Sony Alpha 5000) and I like it. But I have a problem of limitation of video recording time: 30 minutes. Today I found a way to remove this limitation. I saw the next video:   https://youtu.be/7cstA_PuRIg The video creator said, we can disable the limit for most of the Sony's camera. I only tested Sony Alpha 5000. The procedure Camera preparation Switch on the camera Menu -- Setup --- USB connection, set connection to MTP Switch off and on the camera Connect to a computer with USB cable (keep connecting) Software download and install (I checked this on Windows 10) Visit https://sony-pmca.appspot.com/apps with Internet Explorer and Safari (Chrome didn't work, I checked this on Windows 10 with Internet Explore 11) Note: This site is from Sony, but the software is not from Sony, so no guarantee. you should use this your own risk. I can not take any responsibility. From the above  URL , you can go to OpenMemories page Download PM...

What a referendum really asking is...

What the referendum is really asking is.... Figure 1: Original brexit ballot paper A problem of referendum is that people misunderstand the question all the time. Figure 2: This is how most of the people saw the ballot paper But the real question (at least the intention was...) Figure 3: This is how the people should see. The problem of referendum (or actually any vote) is people vote by feeling without thinking. I enjoy reading Yuval Noah Harari's books.

A fake truth by web: google translate glitch

I make some basic mathematics learning materials. I publish them on YouTube. This time I got a strange comment. ``Why the title of this video is ``basic division''? It is about subtraction.'' I made this video in Japanese, my video title was in Japanese (基本のひき算), but the comment was in English. I was puzzled, ``ひき算'' means ``subtraction'' instead of ``division''. I found out that the person who wrote the comment used Google translate. When I input ``ひき算'' to the Google translate, it indeed translates it as ``Division''. Japanese has Kanji and Hiragana (and Katakana) for writing and Hiragana is a phonetic notation. My basic subtraction video is for first or second class students, thus I use Hiragana (phonetic notation). If I put the Kanji notation (引き算) to the Google translate, it is correctly translated to the subtraction. If I use all phonetic notation (ひきざん), then Google translate outputs ``Hikiman'', which I don...

How to use boost sha1 with python hashlib

I need to have a sha1 digest from both C++ code and python code. Here is a code snip to match both results. This code avoids a potential problem that the digest has some 0s on top of the digest array element. This doesn't matter if you stick to one implementation, but just in case, you need to match two worlds: C++ and python, this code might be useful. /// get sha1 digest as a std::string /// /// \param[in] mes message to be hashed /// \return digest string std::string get_sha1_digest(const std::string& mes) { boost::uuids::detail::sha1 sha1; sha1.process_bytes(mes.c_str(), mes.size()); const int DIGEST_SIZE = 5; unsigned int sha1_hash[DIGEST_SIZE]; sha1.get_digest(sha1_hash); std::stringstream sstr; for (std::size_t i=0; i < DIGEST_SIZE; ++i) { sstr << std::setfill('0') << std::setw(8) << std::hex << sha1_hash[i]; } return sstr.str(); } This function's output matches with the fo...

2017-07-04: rights