Tutorials, solutions and tips on algorithms and programming.

Headline
[May 15, 2012 | Views: 8]
Integers are natively supported in Bash shell. However, what if we use floating point in Bash shell? The short and direct answer is using ‘bc‘ command – “An arbitrary precision calculator language.” Just run bc  and enter some floating point calculation expression, such as “1.2+8.2″, bc will give the result. In a script, ...
Read the full story »
[Oct 19, 2011 | Views: 1,784]
When do debugging and optimization, we sometimes need to generate and investigate into the assembly generated by the compiler. Generating a mixed source and assembly list will help the programmer a lot for debugging and optimization. gcc can achieve this by working the the assembler. Generate assembly list mixed with the ... read more »
[Mar 13, 2010 | Views: 775]
Vim provides some basic formatting commands. A combination of these commands with the editing commands will make the programmer happy. A list of basic text formatting commands in Vim: = is an operator that formats/indents text. i{ is a text object that specifies the surrounding code block. It should be used together with ... read more »
[Dec 15, 2009 | Views: 571]
I begin to use vim for programming. I like the tools that focus on one function. I used to use emacs. But I think I like vim more. For debugging, I use gdb. But I use the front end cgdb. I can see the codes with the cursor when debugging. I ... read more »
[Mar 10, 2011 | Views: 494]
read more »
[Dec 29, 2011 | Views: 460]
OCaml is an interesting functional language. There are lots learning materials on the Internet. I compile a list of resources for OCaml learning and reference. Recommended OCaml learning and reference material The book from Jason Hickey and the User’s Manual from INRIA are the best material I know to learn OCaml. A very ... read more »
[Oct 19, 2011 | Views: 425]
read more »
Recent
[May 15, 2012 | Views: 8]
Integers are natively supported in Bash shell. However, what if we use floating point in Bash shell? The short and direct answer is using ‘bc‘ command – “An arbitrary precision calculator ... read more »
[May 9, 2012 | Views: 12]
When we program in C, a C reference by hand is usually useful. The GNU C Reference Manual provides us a good reference for the C programming language implemented by ... read more »
[Dec 29, 2011 | Views: 460]
OCaml is an interesting functional language. There are lots learning materials on the Internet. I compile a list of resources for OCaml learning and reference. Recommended OCaml learning and reference material The ... read more »
[Dec 19, 2011 | Views: 120]
“The C language provides no built-in facilities for performing such common operations as input/output, memory management, string manipulation, and the like. Instead, these facilities are defined in a standard library, ... read more »
[Dec 3, 2011 | Views: 125]
I compile a list of C++ styles on the Internet. http://geosoft.no/development/cppstyle.html http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml http://www.mactech.com/articles/develop/issue_02/C%2B%2B_Style_Guide_v007.html http://www.cs.uga.edu/~dkl/1302/Fall99/style.html read more »
[Nov 11, 2011 | Views: 328]
This post collect the reference resource for x86-64 (also know as Intel 64, AMD 64) ISA / assembly language programming. x86-64 is a 64-bit extension of the Intel x86 instruction ... read more »
[Nov 9, 2011 | Views: 164]
Reference of the C++ Language Library, with detailed descriptions of its elements and examples on how to use its functions: http://www.cplusplus.com/reference/ C++ reference: http://www.cppreference.com/wiki/ read more »
[Nov 9, 2011 | Views: 401]
One cool feature of gcc is that it can inline assembly into C code. With inline assembly, the programmer can precisely control the execution of the processor, such as forcing ... read more »
[Oct 19, 2011 | Views: 425]
read more »