I hereby claim:
- I am shichao-an on github.
- I am shichaoan (https://keybase.io/shichaoan) on keybase.
- I have a public key whose fingerprint is 9547 1ADF DFE5 3DBC A547 EA7E 7EC8 C7F8 8037 E444
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Below are the Big O performance of common functions of different Java Collections. | |
List | Add | Remove | Get | Contains | Next | Data Structure | |
---------------------|------|--------|------|----------|------|--------------- | |
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array | |
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List | |
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.user.loginscript</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/bin/mkdir</string> | |
<string>-p</string> | |
<string>/private/tmp/Downloads</string> | |
</array> |
#include <stdio.h> | |
#include <stdlib.h> | |
#define test(x) ({ \ | |
typeof(x) _x = (x); \ | |
_x += 1; \ | |
_x; \ | |
}) | |
int main(int argc, char* argv[]) |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char * argv[]) | |
{ | |
struct | |
{ | |
bool a: 1; | |
bool b: 1; |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct string | |
{ | |
int length; | |
char chars[]; | |
} string; | |
int main(int argc, char * argv[]) |
#include <stddef.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct | |
{ | |
int x; | |
short y[3]; | |
long long z; | |
} data_t; |
#include <stdio.h> | |
#include <stdlib.h> | |
/* the array name by default is a pointer to its first element, | |
* similar to test2 | |
*/ | |
void test1(int len, int x[]) | |
{ | |
int i; | |
for (i = 0; i < len; i++) |
#!/usr/bin/env bash | |
# Check if SBC is stable and send a notification | |
OUTSIDE_HOST="${1:-8.8.8.8}" | |
PING_COUNT=15 | |
PING_TIMEOUT=15 | |
PING_INTERVAL=0.5 | |
ASC_MBP="10.0.1.10" | |
STATUS="unknown" |