http://www.one-eyed-alien.net/ http://www.cs.hmc.edu/~hadas/
Category Archives: Uncategorized
&~ operation in C
commandline session switch (_NSIG_WORDS) { default: for (i = _NSIG_WORDS, ready = 0; –i >= 0 ; ) ready |= signal->sig[i] &~ blocked->sig[i]; break; case 4: ready = signal->sig[3] &~ blocked->sig[3]; ready |= signal->sig[2] &~ blocked->sig[2]; ready |= signal->sig[1] &~ blocked->sig[1]; ready |= signal->sig[0] &~ blocked->sig[0]; break; case 2: ready = signal->sig[1] &~ blocked->sig[1]; ready …
(java) bubble sort testing… 0.00003 Ver — 27 No.’s Related
$ 4.2.20 5 505—> time java BubbleSort real 0m0.247s user 0m0.172s sys 0m0.052s $ 4.2.20 6 506—> time java BubbleSort real 0m0.204s user 0m0.148s sys 0m0.036s $ 4.2.20 7 507—> time java BubbleSort real 0m0.207s user 0m0.152s sys 0m0.032s $ 4.2.20 8 508—> time java BubbleSort real 0m0.222s user 0m0.168s sys 0m0.032s $ 4.2.20 9 …
Continue reading “(java) bubble sort testing… 0.00003 Ver — 27 No.’s Related”
bogomips . Linux kernel
commandline session root@debian:~# cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 127 model name : AMD Sempron(tm) Processor LE-1150 stepping : 1 microcode : 0x83 cpu MHz : 1000.000 cache size : 256 KB fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : …
lshw . list hardware
commandline session root@debian:~# lshw debian description: Desktop Computer product: M61SME-S2 () vendor: Gigabyte Technology Co., Ltd. width: 64 bits capabilities: smbios-2.4 dmi-2.4 vsyscall32 configuration: boot=normal chassis=desktop uuid=30303141-3444-4632-3731-4236FFFFFFFF *-core description: Motherboard product: M61SME-S2 vendor: Gigabyte Technology Co., Ltd. physical id: 0 version: x.x serial: Sat Sep 01 22:38:46 2007 *-firmware description: BIOS vendor: Award Software International, …
grep . quantifiers. regular expressions.
commandline session $ 4.2.20 10 510—> cat worked Bubble sort Selection sort Insertion sort Shell sort Comb sort Merge sort Heapsort Quicksort Counting sort Bucket sort Radix sort Distribution sort Timsort $ 4.2.20 11 511—> cat worked | grep -E ?sort Bubble sort Selection sort Insertion sort Shell sort Comb sort Merge sort Heapsort Quicksort …
(java) bubble sort testing… 0.00002 Ver — 13 No.’s Related
$ 4.2.20 5 505—> time java BubbleSort real 0m0.218s user 0m0.160s sys 0m0.040s $ 4.2.20 6 506—> time java BubbleSort real 0m0.214s user 0m0.148s sys 0m0.044s $ 4.2.20 7 507—> time java BubbleSort real 0m0.210s user 0m0.140s sys 0m0.052s $ 4.2.20 8 508—> time java BubbleSort real 0m0.206s user 0m0.156s sys 0m0.032s $ 4.2.20 9 …
Continue reading “(java) bubble sort testing… 0.00002 Ver — 13 No.’s Related”
grep -E . ERE . Alternation
commandline session $ 4.1.5 1 16—> echo sdf | grep -E ‘a|b’ $ 4.1.5 2 17—> echo sdf | grep -E ‘a|b|c’ $ 4.1.5 3 18—> echo sdf | grep -E ‘a|b|c|d’ sdf $ 4.1.5 4 19—> echo sdf | grep -E ‘a|d’ sdf $ 4.1.5 5 20—>
POSIX character classes in relation to regular expressions
commandline session $ 4.2.20 43 543—> export LANG=en_IN $ 4.2.20 44 544—> ls Algorithms/[A-Z]* Algorithms/filereading.c Algorithms/wordmatch.c $ 4.2.20 45 545—> export LANG=POSIX $ 4.2.20 46 546—> echo $LANG POSIX $ 4.2.20 47 547—> locale LANG=POSIX LANGUAGE=en_IN:en LC_CTYPE=”POSIX” LC_NUMERIC=”POSIX” LC_TIME=”POSIX” LC_COLLATE=”POSIX” LC_MONETARY=”POSIX” LC_MESSAGES=”POSIX” LC_PAPER=”POSIX” LC_NAME=”POSIX” LC_ADDRESS=”POSIX” LC_TELEPHONE=”POSIX” LC_MEASUREMENT=”POSIX” LC_IDENTIFICATION=”POSIX” LC_ALL= $ 4.2.20 48 548—> ls Algorithms/[A-Z]* …
Continue reading “POSIX character classes in relation to regular expressions”
grep . Traditional Character Ranges.
commandline session $ 4.2.20 2 502—> cat worked Bubble sort Selection sort Insertion sort Shell sort Comb sort Merge sort Heapsort Quicksort Counting sort Bucket sort Radix sort Distribution sort Timsort $ 4.2.20 3 503—> grep -h ‘^[A-Z]’ worked Bubble sort Selection sort Insertion sort Shell sort Comb sort Merge sort Heapsort Quicksort Counting sort …