일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- Italy
- hbase
- Book
- program
- Artificial Intelligence
- Programming
- Linux
- erlang
- Software Engineering
- leadership
- history
- France
- web
- django
- management
- MySQL
- Malaysia
- Spain
- Python
- hadoop
- RFID
- essay
- comic agile
- Book review
- ubuntu
- programming_book
- Kuala Lumpur
- Java
- agile
- QT
- Today
- Total
목록Programming (347)
출처: http://yesarang.tistory.com/64 //hdr1.h class DummyBase{ private: int_i; public: DummyBase(int i): _i(i){} int Get(){return_i;} void Set(int i){_i=i;} }; //hdr2.h #include "hdr1.h" class Dummy: DummyBase{ public: Dummy(int i): DummyBase(i){} int operator() () {returnGet();} int operator() (int multi){returnGet() * multi;} }; //tips1.cpp #include "hdr1.h" #include "hdr2.h" int main() { DummyB..
//http://www.joinc.co.kr/modules/moniwiki/wiki.php/Site/C/Documents/Tip#s-2 #include void main() { const inti=3; //i=4;//compile error int*p=(int*)&i; printf("%d\t%d\n", i, *p); *p=4; printf("%d\t%d\n", i, *p); const intci1=4, ci2=8; //canNOT change value, can change the address const int*cip=&ci1; printf("%d\t%d\t%d\n", ci1, ci2, *cip); cip=&ci2; //*cip=0;//compile error printf("%d\t%d\t%d\n", ..
출처: http://www.joinc.co.kr/modules/moniwiki/wiki.php/Code/C/Scandir ------------------ no sort 10BSize 8192BValue 8192BSize 10A 10BValue 8192A 1048576BValue 1048576A 524288BSize 524288A 524288BValue 1048576BSize ------------------ alphasort 1048576A 1048576BSize 1048576BValue 10A 10BSize 10BValue 524288A 524288BSize 524288BValue 8192A 8192BSize 8192BValue ------------------ versionsort 10A 10BSi..
java의 Atomic* 같은 타입이 당연히 없으므로, thread마다 각각 할당해서 넘겨줬음 #include #include #include #include pthread_tthreads[5]; intdone[5]; void* thread_main(void*); typedef struct { intm_iThreadNum; charm_cChar; long**m_pplValues; }ThreadArg; //http://www.joinc.co.kr/modules/moniwiki/wiki.php/Site/Thread/Beginning/Example_pthread //gcc -o pthread1 pthread1.c -lpthread int main(void) { inti, j, k, rc, status; Thr..
//pthread1.c #include #include #include pthread_tthreads[5]; intdone[5]; void* thread_main(void*); //http://www.joinc.co.kr/modules/moniwiki/wiki.php/Site/Thread/Beginning/PthreadApiReference //http://www.joinc.co.kr/modules/moniwiki/wiki.php/Site/Thread/Beginning/Example_pthread //gcc -o pthread1 pthread1.c -lpthread int main(void) { inti, rc, status; printf("pid = %d\n", getpid()); for ( i = 0..
http://people.uncw.edu/tompkinsj/133/numbers/Reals.htm float | 1bit sign | 8 bit exponent | 23 bit mantissa | double | 1bit sign | 11 bit exponent | 52 bit mantissa | sign: 0 + 1 - exponent: exponent - 127 for float, exponent - 1023 for double mantissa: normalized 1-plus fraction print bits of 1.0D 00111111 11110000 00000000 00000000 00000000 00000000 00000000 00000000 (0000 00000000 00000000 00..
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.commons.math.stat.descriptive.DescriptiveStatistics; import org.apache.commons.math.stat.descriptive.SummaryStatistics; import org.apache.commons.math.stat.descriptive.rank.Percentile; //$ javac -cp .:./commons-math-2.2/commons-math-2.2.jar Te..
import java.util.ArrayList; import java.util.List; //http://abel-perez.com/example-functional-programming-fold-left-and public class TestFunctionalSum{ public static int foldLeft(List elements, int seed, Function function){ intaccumulated=seed; for ( final Integer element : elements ){ accumulated=function.apply(element, accumulated); } returnaccumulated; } public static void main(final String[]..
2011/04/26 - [Programming/Java] - Do not use loops for list operations 2011/04/28 - [Programming/Java] - Do not use loops for list operations 2011/04/28 - [Programming/Java] - Do not use loop for list iterations - lamdaj import fj.data.List; import fj.Effect; import fj.F; import static fj.data.List.single; //item 3 from http://codemonkeyism.com/generation-java-programming-style //http://code.goo..
2011/04/26 - [Programming/Java] - Do not use loops for list operations 2011/04/28 - [Programming/Java] - Do not use loops for list operations import java.util.ArrayList; import java.util.List; import com.google.common.collect.Lists; import ch.lambdaj.Lambda; import static org.hamcrest.Matchers.greaterThan; //item 3 from http://codemonkeyism.com/generation-java-programming-style //-cp .:./Guava/g..