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 "Lpd6803.h" | |
Lpd6803 lpd(12, 13, 1); | |
// DIN - #12 | |
// SCK - #13 | |
// 1 pcs of lpd6803 in serial | |
void setup() | |
{ |
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 <Wire.h> | |
#include <math.h> | |
int BH1750address = 0x23; | |
byte buff[2]; | |
int mic_pin = 2; | |
int switch_pin = 13; | |
bool is_on = false; | |
void setup() |
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
-startup | |
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar | |
--launcher.library | |
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807 | |
-product | |
org.eclipse.epp.package.cpp.product | |
--launcher.defaultAction | |
openFile | |
-showsplash | |
org.eclipse.platform |
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 | |
export PATH=/home/agu/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin:$PATH | |
/home/agu/tools/eclipse-cdt/eclipse |
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/zsh | |
curl -s "https://octodex.github.com/" | grep "<img.*data-src" | grep -o "/image[^\"]*" | while read line; do | |
wget 'https://octodex.github.com'$line | |
done |
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 | |
tmpfile=/tmp/$$.txt | |
iconv -f cp936 -t utf-8 $1 > $tmpfile | |
mv $tmpfile $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
#include <cstdio> | |
#include <cstdlib> | |
int compare (const void * a, const void * b) { | |
return ( *(int*)b - *(int*)a ); | |
} | |
void max(int *buff, int length, int * p1, int *p2) { | |
qsort(buff, length, sizeof(int), compare); | |
*p1 = buff[0]; |
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 python | |
import sys | |
import os | |
import cx_Oracle | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.AL32UTF8' |
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
package demo; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import processing.core.PApplet; | |
import processing.core.PVector; | |
import demo.DmPoint; |
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
const int pingTrig = 9; // transmission pin | |
const int pingEcho = 8; //receiving pin | |
void setup() { | |
// initialize serial communication: | |
Serial.begin(9600); | |
pinMode(pingTrig, OUTPUT); | |
pinMode(pingEcho, INPUT); | |
} |
OlderNewer