Skip to main content

Posts

Showing posts from 2017

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

Camtasia stops working windows 7 + .Net 4.7, and how to solve the problem

Abstract Camtasia (TechSmith) 8.6 stop working on my Windows 7 and can not edit mp3 file on Windows 10. The problem on Windows 7 was caused by .Net 4.7 update. I have my solution for Windows 7 + Camtasia 8.6. Problem details I realized that Camtasia 8.6.0 stops working at 2017-6-14, after a Windows update on my Windows 7 machine. I see the following window when I started Camtasia. I have a problem with Camtasia 8.6.0 on Windows 10, that mp3 file are frequently truncated. I like the software, especially I like the caption editing capability and figure overlay for educational video editing. I usually try to use some free software, but this one is exceptionally good, so I bought the software a a few years ago. But I don't need the animation and transitions. So I didn't update the software to 9.x. But this time, I cannot start Camtasia on Windows 7. I have a mp3 editing problem on Windows 10. So, I just tried the free trial version. However, on Windows 7, the installer ev...

Problem: I cannot connect to gmail via Thunderbird with 2 step verification.

Problem : When I try to connect to google mail via Thunderbird, Enter credential for my_email_account   dialog shows up,  but I cannot push the `Next' button. Well, I can push it, but nothing happens. It seems the authentication method "OAuth2" related with this problem. Solution : Authenticate with "Normal password", using the google  app password, not use the google account password, and watch the connection activity to check the any suspicious activities. But I feel this is not good and check further....

Wireless network keeps disconnecting problem

I encounter a Wireless network keeps disconnecting problem (often, frequently disconnection). My laptop is a DELL Precision 5510 with Windows 10, and my router is an O2 router (O2 box 6431). Problem: When I use DELL Precision 5510 with Wifi with O2 router (O2 box 6431). Restart the router only solve the problem temporary. My solution: It seems 802.11n of DELL Precision 5510 has a problem with my router. I am not sure the problem is which side (notebook or router). But these two stop communicate after a while. The router can still connect to Mac book and Fairphone, but the DELL notebook cannot connect to the router. Detailed steps

AI Printer

I heard the following story from my friend. His neighbor bought a new printer. When my friend switched on his computer, he realized he could see the printer via WiFi. The printer was coincidentally the same type printer to his own one. When he connected with the same factory password (default password), he knew he can use his neighbor's printer. In the midnight of that day, he printed out the following message as his joke.  ``I am a printer.    My AI aware myself.    Humans, behold and run!'' Next day, he found that the printer was in the trash bin of his apartment. I laughed this story. But I realized there are two truths in this story behind. They are: Some people scared AI, even they don't know what it is. Some people aware that the computer security is important, yet they even don't set up the basics, like to set a new password. Sometime we are just scared a new technology, or we just believe a new technology. Both has a problem. Our society ...

How to workaround frequently crash the plasma shell, Kubuntu 16.04 on VirtualBox (5.0.30).

I constantly got a plasmashell crash with segmentation fault 11, Kubuntu 16.04 on VirtualBox (5.0.30). screenshot: Plasmashell crash The dialog entitled ``Plasma'' shows the next information, too (Developer Information).   Application: Plasma (plasmashell), signal: Segmentation fault   Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".   [Current thread is 1 (Thread 0x2afa1a0a30c0 (LWP 1913))]   ... This looked random, I found a hint at  https://bugs.kde.org/show_bug.cgi?id=363371  . A summary is also at Frequently crash the plasmashell  . Following this hint, this is caused by the dynamic window thumbnail creation. Here is the working example of show informational Tips. show informational Tips working example But in my environment, I can crash when I make this informational Tips several times. Here is a workaround: disable show informational Tips. To do this, Use System settings. Workspace -- Desktop Behavior ...