Skip to main content

Posts

Showing posts from 2016

apt-get: Package is in a very bad inconsistent state problem

After I dist-upgrade the Kubuntu 14.04 to 16.04, I ran the following command to update the system state.   sudo apt-get update; sudo apt-get upgrade; sudo apt-get autoremove; Then, I got the following error.  dpkg: error processing gcc-doc (--remove):  Package is in a very bad inconsistent state - you should  reinstall it before attempting a removal.  Errors were encountered while processing:   gcc-doc  E: Sub-process /usr/bin/dpkg returned an error code (1) All the following attempt didn't work  sudo dpkg --remove --force-remove-reinstreq gcc-doc  sudo dpkg --configure -a  sudo apt-get clean  sudo apt-get autoclean At the end, I did a brute force way. Find gcc-doc related files in /var/lib/dpkg/info and remove them  find /var/lib/dpkg/info/ -name *gcc-doc* -print | xargs rm Then,  sudo apt-get update; sudo apt-get upgrade;  sudo apt-get install gcc-doc This worked, but it is now by apt-get/dpkg and has some risk. Please use this with your own risk if

Gauss's quote for positive, negative, and imaginary number

Recently I watched the following great videos about imaginary numbers by Welch Labs. https://youtu.be/T647CGsuOVU?list=PLiaHhY2iBX9g6KIvZ_703G3KJXapKkNaF I like this article about naming of math by Kalid Azad. https://betterexplained.com/articles/learning-tip-idea-name/ Both articles mentioned about Gauss, who suggested to use other names of positive, negative, and imaginary numbers. Gauss wrote these names are wrong and that is one of the reason people didn't get why negative times negative is positive, or, pure positive imaginary times pure positive imaginary is negative real number. I made a few videos about explaining why -1 * -1 = +1, too. Explanation: why -1 * -1 = +1 by pattern https://youtu.be/uD7JRdAzKP8 Explanation: why -1 * -1 = +1 by climbing a mountain https://youtu.be/uD7JRdAzKP8 But actually Gauss's insight is much powerful. The original is in the Gauß, Werke, Bd. 2, S. 178 . Hätte man +1, -1, √-1) nicht positiv, negative, imaginäre (oder gar um

Random quotes from ancient time to now

The quality measure of a city (country) is what it does with its referendum. -- a philosopher A good decision is based on knowledge and not on numbers. -- Plato Dictatorship naturally arises out of democracy, and the most aggravated form of tyranny and slavery out of the most extreme liberty. -- Plato One of the penalties for refusing to participate in politics is that you end up being governed by your inferiors. -- Plato Yes, he said; but what are the characteristics of this form of government, and what are the defects of which we were speaking? First of all, I said, consider the nature of the qualification just think what would happen if pilots were to be chosen according to their property, and a poor man were refused permission to steer, even though he were a better pilot? -- The republic, Plato

In 2020, a nation is peacefully colonized

In 2020, X Y, a country A made a declaration of bankruptcy after the many years of financial crisis. The country will be auctioned by other countries soon. This is probably the first colonization without any military actions in the human history. The country A cannot postponed to pay their debt to the future anymore. Currently there are many problems in the world. The size of the economy of country A is not small, the suzerain country will also have a risk. Currently most possible suzerain is either country B or C. However, the debt of country A is huge and the risk is too high. So called Terrorism quasi-country D declared to buy the country A. The spokesman of quasi-country D mentioned, they voluntarily help the country A, but international society thinks the country D wants to recognized as a real country. So, they try to buy it. The people of country A and international society against the country D's plan. However, what is the problem anyone the thing which has the price ta

How to connect to a guest OS from other machines (Oracle Virtual Box)

1. A background story My home machine had Windows 7 and Linux (dual boot). One day I tried to upgrade to Windows 10. But, it destroyed my MBR of the hard drive. After I fixed the MBR, I got an interesting go and back: Upgrading to Windows 10 ... a problem detected and restore to the old state, reboot Booting Windows 7 and detected upgrade Windows 10, upgrading, reboot Go to the state 1 I decided to do a clean install of Windows 7 and use the Linux in a virtual machine. I only need one Windows commercial application, but. it needs a graphics card access. Thus I cannot put the Windows in a virtual machine. I need some server processes on my Linux machine. When I did a clean install of Windows 7, the Windows update didn't work. The Windows update program had an issue. To fix this problem, I should first need to update the updater, but the updater had an issue. I got an interesting problem here: Windows update has a problem and can not update. To fix the problem, you ne

A conversation between I and my landlord.

I: I want to move out. I think my rent is too expensive. Landlord: OK. I: Can I use a special method? Landlord: ? I: I don't want to pay the rent anymore, but I want to keep my room and have a full access to my room, like the half of the people of a country want. Landlord: I see. We just need to change the contract a bit. I would like to charge you current two month rent for each access per day. But you don't need to pay the monthly rent. You have no obligation for that. I: Wow, thank you! Landlord: You are welcome. I: Now I only pay when I go to my room. I took back the control!
I use Jenkins  for a nightly automated test. In the test I use valgrind  for memory leak detection and has some graph of number of errors. So I would like to use plot plugin . From the example plot image , it is clear we can have a graph with multiple lines. However, how to do it was a bit ambiguous to me from the web page, the example perl script, and the help (in the plot plugin). The key idea is I need to have multiple data files for multiple lines. For example, in the build I made the following property data files. Each file represents one data line. valgrind_trunk_result.definitely.property valgrind_trunk_result.indirectly.property valgrind_trunk_result.possibly.property The contents of each file is only one line. For example,  valgrind_trunk_result.definitely.property is: YVALUE=0 This file is put under the directory of ${WORKSPACE} where the environment variable "WORKSPACE" is given by jenkins. Figure 1 shows my plot plugin setup in the jenkins

Stopping is not enough

Earthquake in Kyusyu, Japan still continues. No one knows when it completely stops yet. I care the people there and I also afraid the nuclear reactors they are still running there. (Japan only has two running reactors now, both are in Kyusyu area where the earthquake continues. The number of earthquakes more than scale 1 is 770 times so far.) There are several petition to stop the reactors now. I also joined. But, technically stopping them are not enough. Most of Japanese facility only have water cooling pools for nuclear fuels. If such pool had a crack by an earthquake and lost the water, it is dangerous. How do they stably supply cooling water, the earthquake can be a cause of trouble. Just loosing the electricity of the pumps causes an accident. All the reactors in Fukushima stopped when the earthquake came, but they could not maintain to cool the fuels. That we saw five years ago. To avoid an accident, we need to think about after stopping the reactors. I agree, let's first

Birthday Donation

My birthday party of this year was delayed. A birthday present is common here for a birthday party. But I have all tangible things I want, except one. Yet, I want to have several non-tangible things. However, they are either impossible for a birthday presents or meaningless. For example, I would like to have world peace, a world class free education system in many languages, I want to understand some mathematical concepts, I would like to be fluent of German, I would like to have more time for my volunteer activities, and so on. Thus, I asked some donation as a birthday present. I first show a list of organization I would like to donate. Then the people who join the party donate. I match the same amount from my pocket money to double the donation. This year was the second time. I think it went well. When I got a receipt from the organization, I will show it to the party participants. My cynical friends have already joke on them when they saw the paper, "it is just a paper and

Tranlstaion with patterns (Emacs Lisp)

I have following practice problems. I would like to translate them to Japanese and German. The $200$ is the $\\green{\\text{whole}}$. We are trying to find the $\\pink{\\text{part}}$ that makes up $11\\%$ of it: The $25$ is the $\\green{\\text{whole}}$. We are trying to find the $\\pink{\\text{part}}$ that makes up $12\\%$ of it: ... You might notice these problems differs only inside $$. So, I can replace them with the following regexp by emacs's query-replace-regexp function. The $\(.*\)$ is the $\(.*\)$. We are trying to find the $\(.*\)$ that makes up $\(.*\)$ of it: $\1$ は $\2$ です.私達はその $\4$ となるだけの $\3$ を探しています: You might also notice, you can see a pattern from this sentence The $200$ is the $\\green{\\text{whole}}$. We are trying to find the $\\pink{\\text{part}}$ that makes up $11\\%$ of it: to The $\(.*\)$ is the $\(.*\)$. We are trying to find the $\(.*\)$ that makes up $\(.*\)$ of it: I thought this is done by the following function: (query-replace-re

Super Tuesday

I am visiting US. Coincidentally, there was the super Tuesday. Some news  show Trump's domination. His motto is ``Make america great again''. However, his definition of word `great' is quite different from I know. He wants to build a wall on southern border and Mexico should pay it. He doesn't believe climate change. He wants to remove the public health care. He wants to bomb ISIS. He wants to restore the death penalty. (See http://www.nytimes.com/interactive/2016/us/elections/donald-trump-on-the-issues.html ) Currently, he is winning. I have a problem to understand of his definition of 'great'. If there is a problem inside a country, then the reason is outside (e.g., Mexico wall). If there is a problem, he just doesn't believe that (e.g., climate change), and so on. If he won, I am afraid what he would do. I can easily imagine it is a war to one of (or some of) ISIS, Russia, China, Mexico, some of Islamic countries, .... I am also afraid who actually

How to count zombis in Japanese?

``I don't know how to count zombies in Japanese.'' I voluntarily translate mathematics exercises in Khan academy ( https://www.khanacademy.org/ ) from English to Japanese/German.  You can learn anything on Khan academy. When I translate the following question: Liliana used 4 dark power crystals to raise 14 zombie soldiers. She wants to know how many zombie soldiers (z) she can raise with 10 dark power crystals... In Japanese, when you count, you added postfix depends on what you count. I know how to count people: 1人,2人, 3人. But, is a zombie a person? A zombie could be an animal, then, I should count them 1匹,2匹, 3匹.  Wait, is a zombie a dead body? Then I should count them 1体,2体, 3体. A zombie could be a novel ghost, then 1柱,2柱... The question told me they are zombie soldiers. Soldiers are the same as the people, then 1 人,2人, 3人. In the end, I decided to translate them as 1人,2人, 3人, this means a zombie is a person. I like translation work like this, quite interesting. Y

How can we make the quality of social media's article higher?

It's been long time since I left a social media. The reason was I could not use my time well on the social media. I think there could be a good way to use my time on it. Today, I watch the following TED talk, and think about other aspect of the social media. Wael Ghonim: Let's design social media that drives real change http://www.ted.com/talks/wael_ghonim_let_s_design_social_media_that_drives_real_change I also felt ``polarization of people'' when I used the social media. People gathered on a theme/page. Most of the people already like. interested in, or know the subject. They are not completely stranger. If people feel this page is not exactly they ware looking for, they would just leave the page. In the end, I am more interested in a talk with friends at a cafe. Usually I and my friends have some different opinions and I could found something new. Even we found a different opinions, we usually continue to talk and both try to know and understand the difference. B

No virtual machine on Oracle virtual box and Avira

December 2015, I suddenly cannot run Oracle VM Virtual Box (5.0.10) on Windows 7, my desktop machine. It failed to create a virtual machine, the error message is the following. VirtualBox - Error In supR3HardNtChildWaitFor --------------------------- Timed out after 60001 ms waiting for child request #1 (CloseEvents). (rc=258) where: supR3HardNtChildWaitFor what: 5 Unknown Status 258 (0x102) (258) - Unknown Status 258 (0x102) I relatively less use the virtual machine on this desktop machine. But when I would like to use Linux, then I need to reboot the machine. This is inconvenient. I have another windows 7 notebook, but I don't have this problem. Today I found the solution. https://avira.ideascale.com/a/dtd/Avira-sollte-das-Ausf%C3%BChren-von-VMs-in-Virtualbox-nicht-blocken/160234-26744#idea-tab-comments The combination of Avira's process protection and Virtual Box cause this problem. Avira announced the real solution will be provided at the release of 9th of Feb

My interesting book: Reading ``Capital'' with the idea of entropy

More than a half year ago, I read ``Capital'' by Karl Marx in Japanese. I read only a half of the volume 1.  This part is talking about the value of things. My first impression was that this is quite complicated and I didn't get well. But, at one point, I thought that he might be talking about entropy. Based on such wild hypothesis, many part of the book became clear to me. He wrote that the value of the thing is defined by human thought. Someone thinks a thing has a value. The value is relative. However, all the values are generated by human's labor. Thus, the labor should be the unit of the value. I understand this book in this way. An example is a value of linen. When a tailor made a shirt by linen, the textile weight or property doesn't change, however, the value (price) has been changed. The value of shirt is generated by labor. Entropy indicates how the state is in order in physics/informatics. Let's think about cleaning a room. You can collect dust i