This file contains hidden or 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.sd.doodle.server.model | |
import _root_.net.liftweb.mapper._ | |
import _root_.net.liftweb.util._ | |
class DrawingModel extends LongKeyedMapper[DrawingModel] with IdPK{ | |
def getSingleton = DrawingModel | |
object timestamp extends MappedLong(this) { |
This file contains hidden or 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
if( keyCode == ENTER ){ | |
if( focusElement == rect2 ) .... | |
if( focusElement == rect4 ) ... | |
// afaik the "name" button is rect 1, in which case we just loop through all lines and print the names | |
if( focusElement == rect1 ){ | |
for( int i =0; i < lines.length; i++ ){ | |
println( lines[i].substring( NAME_START, NAME_END ) ); | |
} | |
} |
This file contains hidden or 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
void printMaxValue( int start, int end ){ | |
int maxValue = 0; | |
println( "Considering " + lines.length + " lines: (chars " + start + " to " + end + ")" ); | |
for( int i = 0; i < lines.length; i++ ){ | |
if( lines[i].length() >= end ){ | |
println( i + ": extracted " + lines[i].substring( start, end ) + ", which parses as " + int( lines[i].substring( start, end ) ) ); | |
maxValue = max( maxValue, int( lines[i].substring( start, end ) ) ); | |
} |
This file contains hidden or 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
// put your PRICE_START, etc. constants at the very top of your program | |
int findMaxValue( int start, int end ){ | |
int maxValue = 0; | |
for( int i = 0; i < lines.length; i++ ){ | |
if( lines[i].length() >= end ){ | |
maxValue = max( maxValue, int( lines[i].substring( start, end ) ) ); | |
} | |
} | |
This file contains hidden or 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
color currentcolor; | |
RectButton rect1, rect2, rect3, rect4, rect5, rect6, rect7; | |
boolean locked = false; | |
Button focusElement = null; | |
Button focusOrder[]; |
This file contains hidden or 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
import processing.opengl.*; | |
import fullscreen.*; | |
SoftFullScreen fs; | |
PFont font; | |
boolean reloadFont = false; | |
void setup(){ | |
size( screen.width, screen.height, OPENGL ); | |
frameRate(2000); |
This file contains hidden or 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
for (int bild = 0; bild < anzahl_bilder; ++bild) { | |
for (int pixel=0; pixel < wid*hig; ++pixel) {// adding all images to one "ultra bright" image | |
allr[pixel] = alle_bilder[0][pixel]; | |
allg[pixel] = alle_bilder[1][pixel]; | |
allb[pixel] = alle_bilder[2][pixel]; | |
} | |
} |
This file contains hidden or 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
IntBuffer getsetBuffer = BufferUtil.newIntBuffer(1); | |
// int getset[] = new int[1]; | |
public int get(int x, int y) { | |
gl.glReadPixels(x, y, 1, 1, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, getsetBuffer); | |
// gl.glReadPixels(x, y, 1, 1, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, getset, 0); | |
int getset = getsetBuffer.get(0); | |
if (BIG_ENDIAN) { | |
return 0xff000000 | ((getset >> 8) & 0x00ffffff); |
This file contains hidden or 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 <iostream> | |
#include "../include/Stiffness_main.h" | |
#include "../include/Mesh.h" | |
#include "../include/TriMatrix.h" | |
#include "../include/Preconditioner.h" | |
using namespace std; | |
//==================================== | |
// f(x):=8 |
This file contains hidden or 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 <iostream> | |
#include "include/TriMatrix.h" | |
#include "include/Vector.h" | |
using namespace std; | |
// Implements the Dirichlet boundary condition to garantuee | |
// unique weak solution of boundary value problem | |
// | |
// $u(x_i)=g_D(x_i)$ |