dinsdag 11 december 2012

processing and app engine

write in app.yaml


handlers:
- url: /static/js/processing.js
  static_files: static/js/processing.js
  upload: static/js/processing.js


make dir in the app directory
static/js      with processing 
static/processing   with the  pde files


woensdag 14 november 2012


import hashlib

       md5=hashlib.md5(data).hexdigest()
     
        sha1 = hashlib.sha1(data).hexdigest()
        sha256 = hashlib.sha256(data).hexdigest()


import zlib

    adler32 = zlib.adler32(data)
        crc32=zlib.crc32(data)

zaterdag 10 november 2012

audio javascript



links
http://chromium.googlecode.com/svn/trunk/samples/audio/javascript-processing.html
https://wiki.mozilla.org/Audio_Data_API

woensdag 5 september 2012

suikerbrood


350 gr bloem
150 ml melk
10 g suiker
1 zakje gist (7 g)
1 tl zout
2 el gembersiroop
20 g gesmolten boter
1 ei, 

150 g greinsuiker, (of suiker klontjes in stukjes)
snufje kaneel

zaterdag 18 augustus 2012

Wat zijn python eggs

Python eggs

Python eggs zijn een soort installatie bestanden.
On python eggs te kunnen draaien moet je eerst de volgende file downloaden
http://peak.telecommunity.com/dist/ez_setup.py


python2.7 ez_setup.py


Nu is easy_setup geinstalleerd.


gebruik nu

python2.7 ez_setup.py -U setuptools-0.6c11-py2.7.egg


normale python installatie


python2.7 setup.py build      will build the package underneath 'build/'
python2.7  setup.py install    will install the package

zondag 12 augustus 2012

python web engine

Al een tijd gezocht naar een web provider waar ik python en django kan draaien. Vandaag kwam ik er achter dat het gratis bij python kan.

En natuurlijk mijn eerste eigen servertje gebouwd. gedonder.appspot.com.

Alle problemen waar ik tegen aan liep heb ik hieronder proberen te beschrijven.





links
https://developers.google.com/appengine/docs/python/gettingstartedpython27/
http://www-personal.umich.edu/~csev/books/gae/lectures/
http://code.google.com/p/google-app-engine-samples/source/browse/trunk/myhangouts/myhangouts.html

zondag 22 april 2012

online sha1,md5,adler en crc berekening


Voor online berekening van  sha1, md5, rot13, adler32 crc32 
hexadecimale waardes, ascii en shannon entropy

klik: http://m.dataweg.nl/DumpData.py

zie ook cryptocalc.appspot.com

zaterdag 14 april 2012

processing in Netbeans


  • Install netbeans
  • New project -> java -> java Application
  • Fill in the project Name and the main class
  • click on finish



check in the project list and verify
 that new project is in the list.


Add the Processing Library core.jar. It is at the Processing files.






Give the file a name and add you're processing code.
Add @Overwrite all the processing functions( setup main mouse ...) 


Change the main file Ball.class add in the main call:

  public static void main(String[] args) {
        PApplet.main(new String[] {"--present", "nl.dataweg.ball.Ball"});
    }


donderdag 12 april 2012

zaterdag 17 maart 2012

piratebay op ziggo

Ziggo blokkeert tegenwoordig thepiratebay maar dat is makkelijk te omzeilen via een gratis proxy server
ga naar

http://freeproxyserver.net

en typ dan:
thepiratebay.se/

En je kan weer verder surfen.

woensdag 14 maart 2012

quick ref Xcode


Set a Label

    [BallenLAbel setText:@"sdfsdf"];


myLabel.text=[NSString stringWithFormat:@"x = %f",startPoint.x];

- (void)drawRect:(CGRect)rect {
    // Drawing code
    
//Make a simple rectangle and fill background BLUE with half Opeque
CGContextRef context = UIGraphicsGetCurrentContext();
//[[UIColor blueColor] set];
CGContextSetRGBFillColor(context, 0.0, 0.0, 1.0, 0.5);
rect = CGRectMake(20, 20, 40, 40);
CGContextFillRect(context, rect); 
    
//Make a simple RED line from 0,0 to 100, 100 in a FRAME
//CGContextSetRGBFillColor(context, 1.0, 0.0, 0.0, 1.0);
[[UIColor redColor] set];
CGContextMoveToPoint(context, 0, 0);
CGContextAddLineToPoint( context, 100,100);
CGContextStrokePath(context);
}




Create an instance
MyClass *foo;
foo = [[MyClass alloc] init];

Destroy an instance
[foo release];

Info to screen
NSLog(@"Write some comment");
// C string char *foo;
// NSString NSString *bar;
foo = "this is a C string";
bar = @"this is an NSString";
printf(foo);

MyClass.
#import 
@interface myClass : NSObject 
@end

MyClass.m
@implementation myClass
@end import

import
#import voor NSLog, NSObject, NSWindow




dinsdag 13 maart 2012

unix

tail -f /var/log/{messages,kernel,dmesg,syslog}
watch 'dmesg | tail -50'
multitail  
 
mount linux 
mount -t ext2 /image.img /mnt/image -o loop
 
 
mount fat /dos 
mount -t vfat /image.img /mnt/image -o loop 
 
mount -t debugfs none /sys/kernel/debug
 

zaterdag 10 maart 2012

MacBook-Air:~ 10A$ ssh root@192.168.2.103

passwd : alpine


change passwd

vrijdag 10 februari 2012

chr ord hex ascii



volgens ascii:


dec hex chr oct

49 31 1 061
97 61 a 141

ord('a')= 97
chr(97)='a'
oct() = 0
hex(255) = ff


int('8')=8

int('ff',16) =255


int('0xFF',16)=255
int('100',2) =4

"hello".encode("hex") = '68656c6c6f'
"68656c6c6f".decode("hex") = 'hello'

maak hex van een getal
binascii.hexlify(13399084)

calculate crc32
print binascii.crc32("hello world")&0xFFFFFFFF
print zlib.crc32("hello world")