When I had the class 「Fundamental of Computer Science」 tonight, my teacher present a slide that writes void main(). I pointed out the mistake that main function's return type should be int in C/C++.
The father of C++ program language, Bjarne Stroustrup, once posted this on his personal website in column C++ Style and Technique FAQ.
Continue reading Do NOT use "void main()" in C/C++
Yesterday evening, 0xSuu sent me a problem but which requires to write in brainfuck language. The complete problem is here.
Continue reading a brainfuck problem
I had a Foundation of Computer Science class this evening. And when I booted the computer, I found Ubuntu Linux was installed on it.
Continue reading Ubuntu force change passwd
Suppose you have a chain of video files, such as 1.mp4, 2.mp4, 3.mp4 and etc. They should be one video file but were cut into small video fragments.
Continue reading combine video files by ffmpeg
This post shows how to read and write an instance var in another class.
Continue reading Objective-C Runtime - Ivar
If you are tired of seeing Apple Logo or you prefer another logo at boot time, you can easily change it within this tiny tool now.
Continue reading Change OS X Boot Logo
Learning ncurses those days, so I wrote a command line tool which used to manage CPU. It is quite a simple program, but it still cost me about 4 hours to code, because I’m not so familiar with curses API.
Continue reading cputilx
How do you know whether you are involved in newly discovered bash security hole?
Continue reading Shellshock
This is a small but workable tool that help you manually switch on / off a specific CPU. This tool requires root privilege.
Continue reading CPUtils
Recently, I'm doing some development which need to remove PIE on a particular application. After my searching on Google, I found a tool named MyRemovePIE, and it's really useful. So I wrote a same function tool just for him. And yes, it's based on MyRemovePIE's codes.
Continue reading Remove PIE