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
| #!/usr/bin/python | |
| import re | |
| s="sesc_simulation_mark 3 (simulated) @7126013\naccumalated energy is: 291709047.314" | |
| #for i in re.findall('[-+]?[0-9]*\.?[0-9]*',s): | |
| # if i != '': | |
| # print i | |
| print [i for i in re.findall('[-+]?[0-9]*\.?[0-9]*',s) if i != ''] |
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
| from: http://www.beagleboard.org/irclogs/index.php?date=2009-03-06 | |
| echo "dvi e:1 u:1 t:0 h:1280/110/220/40 v:720/20/5/5 p:72000 " > /sys/devices/platform/omapfb/displays | |
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
| import glob | |
| import os | |
| patches = glob.glob("*.patch") | |
| kernel = [] | |
| framework = [] | |
| for patch in patches: | |
| print patch |
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
| git branch --track kernel_2.6.35.3_android_p4 remotes/origin/kernel_2.6.35.3_android_p4 | |
| git checkout kernel_2.6.35.3_android_p4 |
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
| setenv bootargs 'console=ttyO2,115200n8 androidboot.console=ttyO2 rw root=/dev/mmcblk0p2 rootfstype=ext3 rootdelay=1 init=/init vram=12M omapdss.def_disp=dvi omapfb.mode=dvi:1024x768@60' | |
| mmc rescan ; fatload mmc ${mmcdev}:1 ${loadaddr} uImage ; bootm ${loadaddr} |
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> | |
| int main (int argc, char *argv[]) { | |
| unsigned char bin=0b1010; | |
| unsigned char oct=012; | |
| unsigned char hex=0xA; | |
| unsigned char dec=10; | |
| unsigned char mask=1<<3|0<<2|1<<1|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
| #include <stdio.h> | |
| #include <unistd.h> | |
| int main(int argc, char *argv[]) { | |
| FILE *f = fopen("/tmp/maluta.txt","wb"); | |
| char x[17]="www.coding.com.br"; | |
| fwrite(x, sizeof(x[0]), sizeof(x)/sizeof(x[0]), f); | |
| fclose(f); |
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
| /* g++ callback.cpp -o callback */ | |
| #include <stdint.h> | |
| #include <iostream> | |
| class Memory{ | |
| public: | |
| Memory() { std::cout << "Memory()" << std::endl; }; | |
| ~Memory(){ std::cout << "~Memory()" << std::endl;}; |
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
| /* | |
| External customized tags. | |
| gcc -DTAG=\"Hello\ World\!\" tag.c -o tag | |
| */ | |
| #include <stdio.h> | |
| int main (int argc, char *argv[]) { | |
| printf("%s\n",TAG); | |
| } |
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
| #!/bin/sh | |
| DIR="tmp_"$$ | |
| JAR=`echo $1 | tr '.' ' ' | awk '{ print $1 }'` | |
| rm -rf $JAR.jar | |
| mkdir $DIR | |
| cp $1 $DIR | |
| cd $DIR | |
| echo "** Compiling java file..." | |
| javac -d . -g $1 | |
| echo "** Creating temporary jar..." |