This file contains hidden or 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
| // cc -o arr arr.c && ./arr | |
| #include <assert.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| typedef struct { | |
| size_t count; | |
| size_t capacity; | |
| } Header; |
This file contains hidden or 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> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <arpa/inet.h> | |
| #define PORT 8080 | |
| #define BUFFER_SIZE 1024 | |
| void respond(int client_socket) { |
This file contains hidden or 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
| // cc -o o ./o.c && ./o > o.py | |
| #include <stdio.h> | |
| #include <string.h> | |
| int main() | |
| { | |
| char buf[256]; | |
| const char *self = "# python ./o.py > o.c\nself = \"?\"\nfor x in self.split(chr(124))[1]:\n if ord(x) == 63:\n for y in self:\n if y == '\\n': print(\"\\\\n\", end='')\n elif y == '\"': print(\"\\\\\\\"\", end='')\n elif y == '\\\\': print(\"\\\\\\\\\", end='')\n else: print(f\"{y}\", end='')\n else:\n print(x, end='')\n|// cc -o o ./o.c && ./o > o.py\n#include <stdio.h>\n#include <string.h>\n\nint main()\n{\n char buf[256];\n const char *self = \"?\";\n int n = strlen(self);\n for (int i = 0; self[i] != 124; ++i) {\n if (self[i] == 63) {\n for (int j = 0; j < n; ++j) {\n switch (self[j]) {\n case '\\n': printf(\"\\\\n\"); break;\n case '\"': printf(\"\\\\\\\"\"); break;\n case '\\\\': printf(\"\\\\\\\\\"); break;\n default: printf( |
This file contains hidden or 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> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| int xs[] = {7,62,2,46,73,43,26,82,5,95,57,56,44,21,40,79,13,6,9,8,72,59,65,81,60,78,13,85,87,58,48,25,32,47,67,4,31,19,33,1,92,14,53,89,84,54,29,10,17,3,77,70,45,97,34,23,86,55,15,64,68,83,76,41,18,39,94,22,74,11,69,49,12,35,20,90,100,98,36,63,91,38,66,93,50,96,61,71,75,37,52,88,30,28,99,27,42,51,80,24,16}; | |
| int main() | |
| { | |
| int x = 0; | |
| for (int i = 1; i <= 100; ++i) { |
This file contains hidden or 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
| // $ cc -o checker checker.c | |
| // $ ./checker | |
| // $ ffmpeg -i output-%02d.ppm -r 60 output.mp4 | |
| #include <stdio.h> | |
| int main() | |
| { | |
| char buf[256]; | |
| for (int i = 0; i < 60; ++i) { | |
| snprintf(buf, sizeof(buf), "output-%02d.ppm", i); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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> | |
| #include "tb.h" | |
| int main() | |
| { | |
| TB_Arena a = {0}; | |
| tb_arena_create(&a, "ABOBA"); | |
| TB_Module* m = tb_module_create(TB_ARCH_X86_64, TB_SYSTEM_LINUX, false); | |
| printf("m = %p\n", m); |
This file contains hidden or 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
| // tsc -noErrorTruncation rule110.ts | sed 's/\[/\n[/g' | |
| type Tail<Xs extends Array<any>> = Xs extends [infer _, ...infer Rest] ? Rest : never; | |
| type Head<Xs extends Array<any>> = Xs extends [infer X, ...infer _] ? X : never; | |
| type Pair<X, Xs extends Array<X>> = [X, ...Xs] | |
| type Reverse< | |
| Items extends Array<any>, | |
| Acc extends Array<any> = [] | |
| > = Items extends [] ? Acc : Reverse<Tail<Items>, Pair<Items[0], Acc>>; |
This file contains hidden or 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
| // cc -w -include time.h -o qlock qlock.c // MIT Copyright (c) Tsoding | |
| char*s="// cc -w -include time.h -o qlock qlock.c // MIT Copyright (c) Tsoding\n" | |
| "char*s=\"?\";x,y,d[8],i,dx;f[]={31599,19812,14479,31207,23524,29411,29679,\n" | |
| "30866,31727,31719,1040};char*so,*si;p(ch){i=x/2/(3+2);dx=x/2%(3+2);if(i<8&&(y-5)\n" | |
| "/2<5&&dx<3&&(f[d[i]]>>((5-(y-5)/2-1)*3+dx))&1)printf(\"\\033[1;41;30m%c\\033[0m\",ch\n" | |
| ");else printf(\"%c\",ch);if(ch=='\\n'){y+=1;x=0;}else x+=1;}gd(){time_t t=time(NULL);struct\n" | |
| " tm*tm=localtime(&t);d[0]=tm->tm_hour/10;d[1]=tm->tm_hour%10;d[2]=10;d[3]=tm->tm_min\n" | |
| "/10;d[4]=tm->tm_min%10;d[5]=10;d[6]=tm->tm_sec/10;d[7]=tm->tm_sec%10;}main(){for\n" | |
| "(gd();;printf(\"\\n\\033[%dA\\033[%dD\",y+1,x),sleep(1),gd())for(so=s,x=0,y=0;*so;so++\n" | |
| ")if(*so==63)for(si=s;*si;si++)switch(*si){case'\\n':p('\\\\');p('n');p('\"');p('\\n')\n" |
This file contains hidden or 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,y,cx,cy,dx, | |
| dy,n,f[8][16] | |
| ,b[8][16];main | |
| (){f[0][1]=1; | |
| f[1][2]=1;f[2 | |
| ][0]=1;f[2][1 | |
| ]=1;f[2][2]=1 | |
| ;for(;;){for(cy | |
| =0;cy<8;++cy){ |
NewerOlder