Blog 1

Random Talk on Random Thoughts

Approximation of a Bounded Simple Function by a Continuous Function

| Comments |

Problem

Today, I was puzzled by a remark of a proof that a simple function $f:[a,b] \to \R$ is equal to a step function $\psi:[a,b] \to \R$ (resp. a continuous function $g:[a,b] \to \R$) except on a set of arbitrarily small measure $\epsilon$.

If $m \le f(x) \le M \;\forall\, x\in [a,b]$, then $\bar{\psi} \triangleq (m \vee \psi) \wedge M$ and $\bar{g} \triangleq (m \vee g) \wedge M$ are step function and continuous function which satisfy $m \le \bar{\psi}$ and $m \le \bar{g} \le M$ so that $f = \bar{\psi}$ and $f = \bar{g}$ except on a set of measure less than $\epsilon$ respectively.

I can verify the above remark, but I wonder why we need to define $\bar{\psi}$ and $\bar{g}$ so as to guarantee that they are bounded below and above by $m$ and $M$ respectively.

Git Portable Home Path

| Comments |

Background

I often included Unicode characters in my commit messages, such as “Committed in a café”. Since I couldn’t input the character ‘é’ inside the Vim editor shipped with msysgit, and the curl utility didn’t get along well with my GVim Portable I decided to upgrade it.

Then I set up things after the installation of Git for Windows so that it works well with Vundle now.1 After that, I thought that it would be great if I can set it up on a USB stick so that the Vim editor with the powerful plugins can be executed on every M$ Win* 7 machine.

The first Google search result for “git portable” is the webpage for Git for Windows downloads. To get it installed on a USB device, don’t click “Save file” for the dialog box that popped up upon the page is loaded. Choose the “thumbdrive edition”.

Problem

Each time I opened the Vim editor from Portable Git Bash from the USB, a new .viminfo file was created in the home folder of current user in the C drive. (e.g. C:\Users\Foo\.viminfo) Therefore, it could be deduced that VIM installed (under /usr/share/vim/vim74) in the USB couldn’t load the configurations from .vimrc stored on the same USB. What an irony!

How can one build a truly portable Vim in the USB stick?

Multiple H1 Tags

| Comments |

Problem

The SEO Analysis of Bing Webmaster complained that each page of my blog had more than one <h1> tag.

I viewed the HTML code for the homepage of this blog to verify the warning message of this SEO tool. Then I found over three instances of the <h1> tag, at the top, in the sidebar, etc. To facilitate this process, I used git grep "<h1>".

Discussion

I searched for “h1” in the issues and the pull requests of Octopress on GitHub, and I got no results. I wondered why nobody reported this. As a result, I went to Google to search “octopress more than one h1 tag”. Finally, reading this article, I gave up the idea of changing the <h1> tags in the sidebar into <h2>.

Remarks

Like Google Webmaster, I can’t simply reset the URL of the site. To insert an ‘s’ into the protocol “http”, one needs to deleted the site and add it again. Fortunately, the verification of site ownership doesn’t need to be done again.

Stopped by Adobe Protected Mode

| Comments |

Problem

I tried opening a PDF file with the freeware Adobe Reader. Unluckily, Blocked by the popup window below, I couldn’t view the content of the file.

</source> The default is the 3rd choice.

I then attempted to open this file by checking the first or the second radio button.

</source> Neither of the 1st nor the 2nd worked.

Unfortunately, either choice gave rise to the same error.

Fatal Error

Result

I opened the file in another desktop machine.

Today's Print Error

| Comments |

Problem

I had sent a PDF file to a printer for printing. Then I was waiting for a person to finish her priting job. Unfortunately, an error occured, and she left without saying a word.

</source> A Print Error

Result

If I press the “Stop” button to continue with my work, she wouldn’t be able to know what’s wrong. Not hoping to get into any trouble with her, I had sent the job to another printer. I had finally got my copy of the document and returned home.

Adobe Reader Has Stopped Working

| Comments |

Problem

I opened Adobe Reader on a M$ Win* 7 desktop in a library so as to print a PDF file. I couldn’t understand why this window kept popping up.

</source> Adobe RdrCEF has stopped working

Result

Lacking time, I won’t find a solution for this problem.

If I choose to ignore this window, then the printing job can still be carried out. Therefore, I just waited until the document was printed. Then I closed Adobe Reader.

Remarks

I choose Sumatra PDF since it is licensed under GPL.

Google Webmaster Sitemap Warning

| Comments |

Problem

I uploaded my sitemap.xml to Google Webmaster, but I received warnings: 404.html was in the sitemap, but the crawl was blocked by robots.txt.

Discussion

Obviously, I should find a way to exclude the 404 page from the sitemap. In the old days, one can add the path name of the page to be excluded.1

However, the file plugins/sitemap_generator.rb has been deleted since commit 52f9119. How can the 404 page be excluded from the sitemap then?

Missing OS

| Comments |

I saw this error on a M$ Win* 7 machine. If I were the administrator, I would install GNU/Linux into that computer so that a free and reliable operating system can be found inside.

</source> Missing Operating System

Git for Windows, Curl, Gist.vim With Vundle (5)

| Comments |

Background

In the third post of this series, I ran the editor command

:!git config --list

inside GVim Portable, but I got a fatal error. I found out how to get Gist.vim work without solving this problem.

Problem

How to avoid this fatal error?

C:\Windows\system32\cmd.exe /c (git config --global --list)
fatal: unable to read config file 'C:\Temp\PortableApps\gVimPortable\Data\settin
gs/.gitconfig': No such file or directory
shell returned 128
Hit any key to close this window...

Another Blue Screen Windows 7

| Comments |

I saw a monitor which displayed the notorious blue screen of death this evening. Since I don’t know how to find out the reason of the problem from the coredump, I use Ubuntu.

</source> Win 7 BoD