This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <time.h> | |
#include <iostream> | |
int main(int argc, char** argv) | |
{ | |
srand (time(NULL)); | |
std::cout << rand() % 100 + 1 << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make test | |
Running tests... | |
Test project /home/gnomy/entityx/branches/no-boost/build | |
Start 1: entity_test | |
1/5 Test #1: entity_test ...................... Passed 0.01 sec | |
Start 2: event_test | |
2/5 Test #2: event_test ....................... Passed 0.00 sec | |
Start 3: system_test | |
3/5 Test #3: system_test ...................... Passed 0.00 sec | |
Start 4: tags_component_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g++ -v | |
Using built-in specs. | |
COLLECT_GCC=g++ | |
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.1/lto-wrapper | |
Target: x86_64-redhat-linux | |
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.1-20130603/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.1-20130603/obj-x86_64-redhat-linux/clo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num=0 | |
while True: # loop 1 | |
if num==6: | |
while True: # loop 2 | |
if num>20: | |
break # breaks out of loop 2 | |
num = num + 2 | |
if num==100: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x=0 | |
while x < 20: | |
if x < 4: | |
x = x+1 | |
break # remove | |
else: | |
y = 0 | |
while y<2: | |
x = x+x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Multiple | |
Line | |
Comment | |
*/ | |
/* Generally you see it | |
* with the *'s | |
* when it is dictating a copyright header |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num = 0 | |
def addOne(n): | |
n = n + 1 | |
return n | |
print num | |
num = addOne(num) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int num = 0; | |
void addOne(int& n) | |
{ | |
n++; | |
} | |
// another way to write addOne | |
int addOne(int n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
g++ ns.cc -o ns && ./ns | |
*/ | |
#include <iostream> | |
const float currentNS = 762677; | |
const float avgDailyGrowth = 0.005274; | |
int main() |
NewerOlder