-
Recent Posts
Archives
- October 2023
- March 2017
- February 2017
- January 2017
- December 2016
- October 2016
- August 2016
- June 2016
- May 2016
- April 2016
- March 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- April 2015
- March 2015
- January 2015
- November 2014
- October 2014
- September 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- April 2012
- March 2012
- February 2012
Categories
- Algorithm
- Artificial Intelligence
- Assembly
- C#
- C/C++
- Compiler
- Concepts
- Data Structures
- Default
- Design Pattern
- Distributed System & Cloud Computing
- Docker
- Electrical Engineering
- Git
- Investing
- Java
- JavaScript
- Latex
- Linux
- matlab
- Miscellaneous
- Networks
- Operating Systems
- Paper Summary
- PHP
- Probability
- Python
- Server
- Software Engineering
- Troubleshooting
- Unit Test
- Web
- Windows
Meta
Monthly Archives: September 2012
template in c++
C++ templates: Function templates: Class templates: Note that member functions of template class are considered function templates. Thus, the implementation (not the definition in the class) needs to have template attribute. Also note the template tag before the scope resolution … Continue reading
Posted in C/C++
Leave a comment
Type casting in c++
Implicit conversion: No need for operator. Automatically performed when a value is copied to a compatible type. Such as short to int, int to float, double to int, etc. Also include constructor or operator conversions. For example, the following conversion … Continue reading
Posted in C/C++
Leave a comment
typedef in C++
typedef c++ typedef allows you to create an alias for a data type. typedef [attributes] DataType AliasName; typedef also allows you to define an alias for a function. You must specify the return type of the function and its type(s) … Continue reading
Posted in C/C++
Leave a comment
Double Hashing
Apply a second hash function to the key when a collision occurs. The second hash function returns the number of positions from the collision point to insert. Cannot be 0. A popular second hash function would be: Hash2(key) = R – (key % … Continue reading
Posted in Algorithm
Leave a comment
“memset” in C++
memset function sets the first num bytes of the block of memory pointed by ptr to the specified value. Note that the value is interpreted as an unsigned char. Function prototype: void * memset (void * ptr, int value, size_t … Continue reading
Posted in C/C++
Leave a comment
“union” in C++
union is a user defined type that used the same block of memory for every its list member. All the members are allocated starting at the same location in memory, and thus allows the access to the same data with … Continue reading
Posted in C/C++
Leave a comment
#include header files with C preprocessor
The `#include’ command works by directing the C preprocessor to scan the specified file as input before continuing with the rest of the current file. The output from the preprocessor contains the output already generated, followed by the output resulting from the … Continue reading
Posted in C/C++
Leave a comment
misc quick notes
JRE: Java runtime environment, consists of JVM (abstract computing machine, have an instruction set that uses memory), Java platform core classes, supporting Java platform libs. JIT: just in time compiler, improvement execution performance, especially for long running, compute-intense programs. If JIT env var … Continue reading
Posted in Miscellaneous
Leave a comment
Cursor movement in Linux cmd line
The following keyboard shortcuts may help your cursor to move faster around Linux command line, and hopefully improve productivity :)
Things must know about Linux
Linux directory structure: Explanation of Linux directory structure. Install packages on Linux: – Extract the package using tar – Go to extracted folder and do (usually install under /usr/local directory). And then compile and install. Note that the last command … Continue reading