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
<!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
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
// 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
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
// 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
@Override | |
public void draw() { | |
this.sprite.getTexture().bind(); | |
int tileSize = ScrollGame.tManager.sheets.get(0).getTileSize(); | |
double row = this.sprite.getsY(); | |
double col = this.sprite.getsX(); | |
double v0 = tileSize * row * (1/this.height); | |
double v1 = tileSize * (row + 1) * (1/this.height); |
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 org.cognitive; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import org.newdawn.slick.opengl.Texture; |
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
<html> | |
<head></head> | |
<body> | |
<h1>Meny</h1> | |
<a href="listansatte.php">List ansatte</a> | |
<p> | |
<a href="avdskjema.html">Legg til avdeling</a> | |
</body> | |
</html |