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 <cstdio> | |
#include <cmath> | |
#include <ctime> | |
#include <cassert> | |
#include <stdint.h> | |
#include <vector> | |
#include <boost/numeric/ublas/vector.hpp> | |
#include <boost/numeric/ublas/matrix.hpp> |
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 <cstdio> | |
#include <cstdlib> | |
#include <sys/time.h> | |
#include <unistd.h> | |
#include <time.h> | |
int main() | |
{ | |
struct timeval now; |
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 <stdio.h> | |
__attribute__((section(".plt"))) main; | |
__attribute__((constructor, destructor)) void _() { | |
if (main) { | |
__attribute__((cleanup(puts))) char _[] = "world!"; | |
} else { | |
__attribute__((cleanup(printf))) char _[] = "Hello, "; | |
main = 0xc3; |
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 <cstdio> | |
#include <cstdlib> | |
#include <cassert> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#define VERIFY(x) if (!(x)) { assert(x); abort(); } |
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 <cstdio> | |
#include <cstdlib> | |
#include <ctime> | |
template <typename T> void swap(T* a, T* b) { | |
T tmp = *a; | |
*a = *b; | |
*b = tmp; | |
} |
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 <cstdio> | |
int my_strlen(char* str) { | |
if (*str == 0) | |
return 0; | |
else | |
return my_strlen(str + 1) + 1; | |
} | |
int main() { |
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 <cstdio> | |
#include <cstdlib> | |
#include <string.h> | |
void reverse(char *str) | |
{ | |
char* ptr_start = str; | |
char* ptr_end = str + strlen(str) - 1; | |
while (ptr_start < ptr_end) |
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
git commit -a --allow-empty-message -m "" |
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 <cstdio> | |
#include <cstdlib> | |
#include <string.h> | |
int summarize_odd_numbers(int a, int b) | |
{ | |
int sum = 0; | |
for (int c = a; c <= b; c++) | |
{ | |
if ((c & 0x1) == 1) |
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
diff --cc bus/ibusimpl.c | |
index da24354,79dbf27..0000000 | |
--- a/bus/ibusimpl.c | |
+++ b/bus/ibusimpl.c | |
@@@ -196,11 -316,43 +196,42 @@@ bus_ibus_impl_set_trigger (BusIBusImpl | |
IBUS_CONTROL_MASK, | |
hotkey); | |
} | |
-#endif | |
} |
NewerOlder