adb logcat | ndk-stack -sym <path to folder with .so files>
Example:
adb logcat | ndk-stack -sym ~/workspace.frostwire/frostwire-jlibtorrent/swig/bin/release/android/armeabi-v7a
from random import shuffle | |
''' | |
This module tries to solve the 8 queens problem. | |
''' | |
identity_rows = [0, 1, 2, 3, 4, 5, 6, 7] | |
def queens_attack_each_other(queen_a, queen_b): | |
'''True if 2 queens face each other''' | |
return queen_a[0] == queen_b[0] or queen_a[1] == queen_b[1] or abs(queen_a[0] - queen_b[0]) == abs(queen_a[1] - queen_b[1]) |
class Complex { | |
constructor(real, imag) { | |
this.real = real | |
this.imag = imag | |
} | |
length() { | |
return Math.sqrt(this.real * this.real + this.imag * this.imag) | |
} |
import hashlib | |
import binascii | |
def H(data): | |
if type(data) == str: | |
data = str.encode(data) | |
if type(data) == int: | |
data = data.to_bytes(4, 'big') | |
return hashlib.sha256(data).digest() |
import sqlite3 | |
# python script to cleanup double entries on the marketsnapshots table. | |
#CREATE TABLE marketsnapshots ( | |
# symbol TEXT, | |
# ... | |
# lastupdatetime INTEGER); | |
def symbolList(cur): |
git clone [email protected]:Distrotech/ucl.git | |
cd ucl | |
./configure CFLAGS="$CFLAGS -Wno-error=implicit-function-declaration" | |
make -j 10 | |
sudo make install |
#include <iostream> | |
int main() { | |
union { | |
unsigned int a; // 32 bit number, 4 bytes | |
unsigned char aa[4]; // access a's bytes as an array | |
}; | |
a = 0xaabbccdd; | |
printf("a: 0x%x\n", a); // a: 0xaabbccdd |
adb logcat | ndk-stack -sym <path to folder with .so files>
Example:
adb logcat | ndk-stack -sym ~/workspace.frostwire/frostwire-jlibtorrent/swig/bin/release/android/armeabi-v7a
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Canvas tutorial</title> | |
<script type="text/javascript"> | |
const max_x = 2048 | |
const max_y = 2048 | |
const bgcolor = 'rgb(0,0,0)' | |
const fgcolor0 = 'rgb(200, 0, 0)' |
private static void testListingNetworkInterfaces() { | |
try { | |
Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces(); | |
NetworkInterface iface; | |
while (networkInterfaces.hasMoreElements()) { | |
iface = networkInterfaces.nextElement(); | |
LOG.info("displayName:" + iface.getDisplayName() + " " + | |
"index:" + iface.getIndex() + " " + | |
"isUp:" + iface.isUp() + " " + | |
"isVirtual:" + iface.isVirtual() + " " + |