Skip to content

Instantly share code, notes, and snippets.

View KazukoShikiya's full-sized avatar

Kazuko Shikiya ( 敷矢 和子 ) KazukoShikiya

View GitHub Profile
@KazukoShikiya
KazukoShikiya / 10-evdev.conf
Last active November 27, 2015 03:25
Pimoroniの「Touchscreen Display Frame」を「Raspberry Pi 7” Touchscreen Display」に入れたとき、上下が逆向き表示になってしまう…の対処をしたら、タッチパネルの反応がおかしくなった…というときの設定
# この変更の前に、/boot/config.txtの末尾にlcd_rotate=2を追加しておく
# /usr/share/X11/xorg.conf.d/10-evdev.confの
# 既存の内容からIdentifierにtouchscreenと指定してあるところを探して
# そのSectionを以下のようになるように変更
....
Section "InputClass"
Identifier "evdev touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "dev/input/event*"
@KazukoShikiya
KazukoShikiya / PepperAndTwitter
Created June 6, 2015 08:53
JJUG主催で6/6に行われたPepperイベで作ったもの
import twitter4j.Query;
import twitter4j.QueryResult;
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterFactory;
import com.aldebaran.qi.Application;
import com.aldebaran.qi.CallError;
import com.aldebaran.qi.Session;
import com.aldebaran.qi.helper.EventCallback;
@KazukoShikiya
KazukoShikiya / HelloPepper.java
Last active August 29, 2015 14:20
4/28のPepperくんイベントで試したソースコード
import com.aldebaran.qi.Application;
import com.aldebaran.qi.Session;
import com.aldebaran.qi.helper.proxies.*;
public class HelloPepper {
public static void main(String[] args) throws Exception {
Application app = new Application(args,"tcp://pepper.local:9559");
try {
app.start();
Session session = app.session();
@KazukoShikiya
KazukoShikiya / index.js
Created April 18, 2015 01:06
Raspberry Pi and pi-blaster , Change PWM -sample??-
var http = require('http');
var url = require('url');
var piblaster = require('pi-blaster.js');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
var brightness = url.parse(req.url).pathname.slice(1);
if (brightness.length === 0 || isNaN(brightness)) {
@KazukoShikiya
KazukoShikiya / 1. BeforJava5
Last active August 29, 2015 14:08
配列要素を先頭から処理することについての進化
//Java5前には、配列先頭から要素を取り出す…は、こんな感じでした
public class BeforJava5{
public static void main(String[] args) {
List texts = new ArrayList();
texts.add("Hello");
texts.add("Good bye");
// Iterator(イテレータ)を使って、要素の先頭から末尾へと要素取り出しをする
Iterator ite = texts.iterator();
@KazukoShikiya
KazukoShikiya / sample2
Last active August 29, 2015 14:07
匿名クラス部分をラムダ式で書いた例(◆Java SE 8勉強会◆女子部もラムダ式に挑戦!…の復習用)
Runnable r1 = () -> { System.out.println("r1:並行処理してます"); };
@KazukoShikiya
KazukoShikiya / sample1
Last active August 29, 2015 14:07
Runnableインタフェースを匿名クラスで使った例(◆Java SE 8勉強会◆女子部もラムダ式に挑戦!…の復習用)
Runnable r1 = new Runnable(){
@Override
public void run(){
System.out.println("r1:並行処理してます");
}
}