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> | |
void main() | |
{ | |
short unsigned int x; | |
for (x = 0; (x & 0xF0) < 0x90; x += 0x10 ) { | |
for ( x &= 0xF0; (x & 0x0F) < 9; x++) | |
if ((x >> 4) % 3 != (x & 0x0F) % 3) | |
printf("A = %d, B = %d\n", (x >> 4) + 1, (x & 0x0F) + 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
BYTE i = 81; | |
while (i--) | |
{ | |
if (i / 9 % 3 != i % 9 % 3) | |
printf("A = %d, B = %dn", i / 9 + 1, i % 9 + 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
#!/bin/bash | |
dest_dir=~/workspace/src-tree | |
if [ ! -z "$1" ]; then | |
dest_dir=$1 | |
fi | |
curr_dir=$PWD | |
dirname=$(basename $dest_dir) |
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> | |
int removeMultipleSpace(char baseStr[]) | |
{ | |
char *p = baseStr; | |
char *t = baseStr; | |
while ( *p ) { | |
if ( *p == ' ' ) { | |
*t++ = *p++; |
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> | |
int removeMultipleSpace(char baseStr[]) | |
{ | |
char *p = baseStr; | |
char *t = baseStr; | |
while ( *p ) { | |
if ( *p == ' ' ) { | |
*t++ = *p++; |
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
D:\>DEBUG A.COM | |
-U | |
13FB:0100 B100 MOV CL,00 | |
13FB:0102 88C8 MOV AL,CL | |
13FB:0104 B311 MOV BL,11 | |
13FB:0106 F6E3 MUL BL | |
13FB:0108 B30A MOV BL,0A | |
13FB:010A F6F3 DIV BL | |
13FB:010C 8AC4 MOV AL,AH | |
13FB:010E 88C2 MOV DL,AL |
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
APK is pulled from Nexus6p and dumped with `aapt dump permissions base.apk` | |
package: com.eg.android.AlipayGphone | |
uses-permission: name='com.alipay.permission.ALIPAY_UPDATE_CREDENTIALS' | |
uses-permission: name='com.android.launcher.permission.INSTALL_SHORTCUT' | |
uses-permission: name='android.permission.BLUETOOTH' | |
uses-permission: name='android.permission.CHANGE_WIFI_STATE' | |
uses-permission: name='android.permission.CAMERA' | |
uses-permission: name='android.permission.ACCESS_NETWORK_STATE' | |
uses-permission: name='android.permission.MODIFY_AUDIO_SETTINGS' |
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> | |
#include <stdlib.h> | |
#include <String.h> | |
#define MAX_LINE_NUM 1000 | |
#define MAX_COLUMN_NUM 30 | |
#define MAX_RECORD_LENGTH 51 | |
#define IDENT_LENGTH 4 | |
void readFile(char A[MAX_LINE_NUM][MAX_COLUMN_NUM][MAX_RECORD_LENGTH], int *numOfLine, int *numOfCol); |
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
/* | |
create `build.sbt` and add following content | |
``` | |
scalaVersion := "2.11.1" | |
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" | |
libraryDependencies += "com.typesafe.play" %% "play" % "2.5.12" | |
libraryDependencies += "com.typesafe.play" % "play-ws_2.11" % "2.5.12" | |
``` |
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
#!/usr/bin/env python3 | |
""" | |
Binary Indexed Tree / Fenwick Tree | |
https://www.hackerearth.com/practice/notes/binary-indexed-tree-made-easy-2/ | |
https://www.topcoder.com/community/data-science/data-science-tutorials/binary-indexed-trees/ | |
https://www.youtube.com/watch?v=v_wj_mOAlig | |
https://www.youtube.com/watch?v=kPaJfAUwViY | |
""" |
OlderNewer