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 <pthread.h> | |
| #define ITERATIONS 100000 | |
| long counter = 0; | |
| void *increment_counter(void *arg) { | |
| for (int i = 0; i < ITERATIONS/2; i++) { | |
| counter++; | |
| } | |
| return NULL; | |
| } |
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 <stdlib.h> | |
| #define _Bool unsigned int /* lcc doesn't define this */ | |
| #include <ncurses.h> | |
| #define MAX_LENGTH 100 | |
| typedef enum { NONE, UP, DOWN, LEFT, RIGHT } dir_t; | |
| typedef struct { | |
| int x, y; |
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
| .section __TEXT,__text,regular,pure_instructions | |
| .build_version macos, 13, 1 sdk_version 13, 1 | |
| .globl _variable_sort_2 ## -- Begin function variable_sort_2 | |
| .p2align 4, 0x90 | |
| _variable_sort_2: ## @variable_sort_2 | |
| .cfi_startproc | |
| ## %bb.0: | |
| pushq %rbp | |
| .cfi_def_cfa_offset 16 | |
| .cfi_offset %rbp, -16 |
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
| void variable_sort_2(int length, int *a) { | |
| if(length == 2){ | |
| if(a[0] > a[1]){ | |
| int temp = a[0]; | |
| a[0] = a[1]; | |
| a[1] = temp; | |
| } | |
| } | |
| } |
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
| .section __TEXT,__text,regular,pure_instructions | |
| .build_version macos, 13, 0 sdk_version 13, 1 | |
| .globl _variable_sort_2 ## -- Begin function variable_sort_2 | |
| .p2align 4, 0x90 | |
| _variable_sort_2: ## @variable_sort_2 | |
| .cfi_startproc | |
| ## %bb.0: | |
| pushq %rbp | |
| .cfi_def_cfa_offset 16 | |
| .cfi_offset %rbp, -16 |
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
| .section __TEXT,__text,regular,pure_instructions | |
| .build_version macos, 13, 1 sdk_version 13, 1 | |
| .file 1 "/tmp" "sort2.c" | |
| .globl _variable_sort_2 ## -- Begin function variable_sort_2 | |
| .p2align 4, 0x90 | |
| _variable_sort_2: ## @variable_sort_2 | |
| Lfunc_begin0: | |
| .loc 1 1 0 ## sort2.c:1:0 | |
| .cfi_startproc | |
| ## %bb.0: |
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
| /***************************************************************************/ | |
| /* micro-Max, */ | |
| /* A chess program smaller than 2KB (of non-blank source), by H.G. Muller */ | |
| /***************************************************************************/ | |
| /* version 4.8 (1953 characters) features: */ | |
| /* - recursive negamax search */ | |
| /* - all-capture MVV/LVA quiescence search */ | |
| /* - (internal) iterative deepening */ | |
| /* - best-move-first 'sorting' */ | |
| /* - a hash table storing score and best move */ |
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
| <html> | |
| <head> | |
| <script src="https://cdn.jsdelivr.net/npm/p5@1.3.1/lib/p5.js"></script> | |
| <ul> | |
| Screeps | |
| <ul> | |
| <li>Harvesters </li> | |
| <li>Upgraders</li> | |
| <li>Builders</li> | |
| </ul> |
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
| Original video: https://www.youtube.com/watch?v=j1FfVK6sj4I | |
| By: The Hated One | |
| Ultrasonic cross-device tracking: | |
| https://intellisec.de/pubs/2016-batmobile.pdf | |
| https://techcrunch.com/2014/07/24/silverpush-audio-beacons/ | |
| https://www.wired.com/2016/11/block-ultrasonic-signals-didnt-know-tracking/ | |
| https://thehackernews.com/2017/05/ultrasonic-tracking-signals-apps.html | |
| https://www.cbsnews.com/news/google-removes-apps-that-use-ultrasonic-frequencies-to-track-users/ | |
| https://www.zdnet.com/article/hundreds-of-apps-are-using-ultrasonic-sounds-to-track-your-ad-habits/ |
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
| # MU puzzle | |
| # From Gödel Escher Bach by Douglas R. Hofstadter | |
| # https://en.wikipedia.org/wiki/MU_puzzle | |
| # Nr. Formal rule Informal explanation Example | |
| # ----------------------------------------------------------------------------------- | |
| # 1. xI → xIU Add a U to the end of any string ending in I MI to MIU | |
| # 2. Mx → Mxx Double the string after the M MIU to MIUIU | |
| # 3. xIIIy → xUy Replace any III with a U MUIIIU to MUUU | |
| # 4. xUUy → xy Remove any UU MUUU to MU |
NewerOlder