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/sh | |
### BEGIN INIT INFO | |
# Provides: listen-for-shutdown.py | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
### END INIT INFO |
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 RPi.GPIO as GPIO | |
import subprocess | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP) |
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
protected final static String DBPATH = "./localdb"; | |
protected GraphDatabaseService db = null; | |
… | |
protected void startup() | |
{ | |
// instantiate the database | |
db = new GraphDatabaseFactory().newEmbeddedDatabase(DBPATH); | |
… |
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 com.musante.demo.demoandengine; | |
import org.andengine.engine.camera.Camera; | |
import org.andengine.engine.options.EngineOptions; | |
import org.andengine.engine.options.ScreenOrientation; | |
import org.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy; | |
import org.andengine.entity.scene.Scene; | |
import org.andengine.entity.scene.background.Background; | |
import org.andengine.entity.util.FPSLogger; | |
import org.andengine.ui.activity.SimpleBaseGameActivity; |
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
... | |
private int x = 100; | |
private int y = 100; | |
private int dx = 1; | |
private int dy = 1; | |
private Image img = null; | |
... |
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
... | |
g.drawString("Hello There!", 100, 100); | |
... |
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 com.musante.demo; | |
import org.newdawn.slick.AppGameContainer; | |
import org.newdawn.slick.BasicGame; | |
import org.newdawn.slick.GameContainer; | |
import org.newdawn.slick.Graphics; | |
import org.newdawn.slick.Image; | |
import org.newdawn.slick.SlickException; | |
/** |
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 com.musante.demo; | |
import org.newdawn.slick.AppGameContainer; | |
import org.newdawn.slick.BasicGame; | |
import org.newdawn.slick.GameContainer; | |
import org.newdawn.slick.Graphics; | |
import org.newdawn.slick.SlickException; | |
/** | |
* Slick Hello-world demo |
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
translate([-375,-375,-250]) | |
{ | |
cube([750,750,25]); | |
translate([0,0,525]) | |
cube([750,750,25]); | |
translate([0,0,240]) | |
cube([750,750,25]); | |
… |
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
public class SensorsActivity extends Activity implements SensorEventListener, OnItemSelectedListener | |
{ | |
... | |
} |
NewerOlder