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
// top left | |
glTexCoord2f(tileX * tileWidth / ftexWidth, tileY * tileHeight / ftexHeight); | |
glVertex2i(x, y); | |
// top right | |
glTexCoord2f((tileX + 1) * tileWidth / ftexWidth, tileY * tileHeight / ftexHeight); | |
glVertex2i(x + tileWidth, y); | |
// bottom right | |
glTexCoord2f((tileX + 1) * tileWidth / ftexWidth, (tileY + 1) * tileHeight / ftexHeight); |
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 void initGL() { | |
//2D Initialization | |
/*glClearColor(0.0f,0.0f,0.0f,0.0f); | |
glDisable(GL_DEPTH_TEST); | |
glDisable(GL_LIGHTING);*/ | |
//glEnable(GL_TEXTURE_2D); | |
font = new TrueTypeFont(awtFont, false); | |
glMatrixMode(GL_PROJECTION); |
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
// Pass in the position information | |
GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, mCubeBufferIdx); | |
GLES20.glEnableVertexAttribArray(mPositionHandle); | |
mGlEs20.glVertexAttribPointer(mPositionHandle, POSITION_DATA_SIZE, | |
GLES20.GL_FLOAT, false, stride, 0); | |
// Pass in the normal information | |
GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, mCubeBufferIdx); | |
GLES20.glEnableVertexAttribArray(mNormalHandle); | |
mGlEs20.glVertexAttribPointer(mNormalHandle, NORMAL_DATA_SIZE, |
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
glVertexAttribPointer (s->attribLocation("a_position"), 2, GL_FLOAT, GL_FALSE, sizeof(vertex2f), 0); | |
glEnableVertexAttribArray (s->attribLocation("a_position")); | |
glVertexAttribPointer (s->attribLocation("aTextureCoord"), 2, GL_FLOAT, GL_FALSE, sizeof(vertex2f), (void *) (2 * sizeof (float))); | |
glEnableVertexAttribArray (s->attribLocation("aTextureCoord")); | |
glVertexAttribPointer (s->attribLocation("aColor"), 4, GL_FLOAT, GL_FALSE, sizeof(vertex2f), (void *) (4 * sizeof (float))); | |
glEnableVertexAttribArray (s->attribLocation("aColor")); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
<script type="text/javascript"> | |
// Initialize the node storage variables. |
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
var spawn = require('child_process').spawn, | |
ls = spawn('pcsc_scan', []); | |
var util = require('util'); | |
var atrfound = false; | |
console.log("pcsc_scan should be running now"); | |
ls.stdout.on('data', function (data) { | |
//console.log('stdout: ' + data); | |
var data = data.toString(); | |
data = data.replace(/\u001b\[\d{0,2}m/g, ''); // Remove ANSI colors. |
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
hello |
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
var spawn = require('child_process').spawn; | |
var reader; | |
var util = require('util'); | |
var csv = require('ya-csv'); | |
var restify = require('restify'); | |
var csvreader = csv.createCsvFileReader('folk.csv', { | |
'separator': ';', | |
'quote': '"', |
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
var spawn = require('child_process').spawn; | |
var util = require('util'); | |
var EventEmitter = require('events').EventEmitter; | |
function CardReader() { | |
var reader; | |
var lastUID = ""; | |
var me = this; |