随笔分类 -  Coding Notes

Little thoughts over coding..
Learning BSD.sys/queue.h
摘要:This file includes 4 data-structures.. Insteresting because they are written in 1994.. to make it easier using the structures.. LIST: the common usage 阅读全文

posted @ 2016-09-09 17:29 三叁 阅读(984) 评论(0) 推荐(0)

C: strcpy & memcpy & scanf/printf format specifier.. escape characters..
摘要:well, strcpy differs from memcpy in that it stops copy at \0 the format specifier is a string.. which can be assigned to a char*.. like.. strcpy(a,"%d 阅读全文

posted @ 2016-09-03 22:10 三叁 阅读(264) 评论(0) 推荐(0)

Compile Time Assertion..
摘要:The most seen assertion are during runtime, but this one is at compile time, to give the error more quickly.. I do not quite understand why need this 阅读全文

posted @ 2016-08-30 14:53 三叁 阅读(444) 评论(0) 推荐(0)

ABI & API
摘要:API defines the programning language and function entry point, arguments type, order. ABI defines the programming compiled version to be according to 阅读全文

posted @ 2016-08-05 17:49 三叁 阅读(178) 评论(0) 推荐(0)

GCC: compilation process..
摘要:gcc -I -L -l -D -g -O -o -Wall about the -0 option.. ref to the following table.. Set the compiler's optimization level. +increase ++increase more +++ 阅读全文

posted @ 2016-08-04 20:07 三叁 阅读(315) 评论(0) 推荐(0)

C: define many functions using predefine..
摘要:/* Defines COUNTER. There must be exactly one such definition at file scope * within a program. */ #define COVERAGE_DEFINE(COUNTER) \ DEFINE_STATIC_PE... 阅读全文

posted @ 2016-08-02 21:56 三叁 阅读(229) 评论(0) 推荐(0)

asm: Writing Inline Assembly
摘要:A usual IA includes these parts: the first line includes asm [volatile], it means the contents in the following parenthesis is IA. the AssblerTemplate 阅读全文

posted @ 2016-07-20 12:14 三叁 阅读(152) 评论(0) 推荐(0)

About struct in C
摘要:something new: to set value in struct can be in case i cannot view picture.. i write the snippet here .. the dot punctuation means the member of the s 阅读全文

posted @ 2016-07-19 13:47 三叁 阅读(266) 评论(0) 推荐(0)

GDB: basics
摘要:Before Debugging, generating the debugging info using gcc -g3 *.c/cpp; then gdb ~.out/exe using commands: b [n] set breakpoint at line n r [re]run the 阅读全文

posted @ 2016-07-18 20:11 三叁 阅读(149) 评论(0) 推荐(0)

C/C++ kubetu
摘要:reference sign & use predefine in c, but const in c++ 阅读全文

posted @ 2016-07-17 14:31 三叁 阅读(130) 评论(0) 推荐(0)

Using Python defined functions in packages ..
摘要:Using Vim.. Python programing seems easier because YCM helps presenting all the arguments required in its order.. But there's one more problem that's 阅读全文

posted @ 2016-05-27 17:15 三叁 阅读(142) 评论(0) 推荐(0)

Python 3.5.1 Syntax & APIs(Continue Updating..
摘要:instead of print(x) to escape the default line-changing-output. print(str.ljust(size)) left-alignment with given size, samely, str.rjust(size) works j 阅读全文

posted @ 2016-04-29 09:41 三叁 阅读(280) 评论(0) 推荐(0)

Rar related CMD
摘要:recursively add folder Document to archive: (with all the files) recursively add folders to archive: (with all the files) add path etc to certain file 阅读全文

posted @ 2016-04-20 17:03 三叁 阅读(134) 评论(0) 推荐(0)

Qt 5.5 tr usage
摘要:in .cpp file, wherever you want, wrap QString with a tr("somesz") rendering it ready to be translated. in .pro file, specify the readable translation 阅读全文

posted @ 2016-04-20 16:24 三叁 阅读(222) 评论(0) 推荐(0)

Got Stucked in C++ Static Library Loading.. for some time
摘要:I used to load library using 1 single .dll file, so when I happen to do method calling between 2 projects in a solution, I got puzzled.. In the soluti 阅读全文

posted @ 2016-04-19 16:11 三叁 阅读(218) 评论(0) 推荐(0)

Java R&W Related
摘要:In Java, byte = 8 bit, char = 16 bit In C/C++, char = 8 bit There is difference because Java uses Unicode, however C uses ASCII as basic character col 阅读全文

posted @ 2016-04-18 12:31 三叁 阅读(183) 评论(0) 推荐(0)

Java Networking Related (Java Examples in a Nutshell 3rd Edition)
摘要:Examples to: Use URL class to parse URLs and download the network resources specified by a URL Use URLConnection class to gain more cntrl over the dow 阅读全文

posted @ 2016-04-16 09:39 三叁 阅读(203) 评论(0) 推荐(0)

Java Concurrent Topics
摘要:To prevent Memory Consistency Errors(MCEs), it is good practice to specify synchronized class specifier, and mark all the related methods as synchroni 阅读全文

posted @ 2016-04-15 15:23 三叁 阅读(166) 评论(0) 推荐(0)

Java Interrupt Related
摘要:In Java, the main process can have several threads at a time, but only a few of them can run concurrently, so it is needed to cancel some thread at ti 阅读全文

posted @ 2016-04-15 13:46 三叁 阅读(174) 评论(0) 推荐(0)

How to write a probeContentType() and Usage?
摘要:Files.probeContentType() is an instance of FileTypeDetector class's abstract method String FileTypeDetector.probeContentType(), it's an extension base 阅读全文

posted @ 2016-04-14 12:05 三叁 阅读(270) 评论(0) 推荐(0)

导航