Skip to content

Instantly share code, notes, and snippets.

@luelista
luelista / Vector.VObject.Serialize.vb
Created January 24, 2011 19:43
Serialisierung der Klasse VObject
Overridable Function Serialize() As String()
Dim data(18) As String
data(1) = Me.GetType.Name
data(2) = bounds.X
data(3) = bounds.Y
data(4) = bounds.Width
data(5) = bounds.Height
data(6) = ZIndex
data(7) = name
data(8) = created
@luelista
luelista / Person.java
Created February 10, 2011 20:45
Unsere wunderbare Hausaufgabe vom 2011-02-07 ...
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* Class Person
*/
public class Person {
//
'-->
'--> mw_fraktal01.vb
#Reference System.Windows.Forms.dll
#Reference System.Data.dll
#Reference System.Drawing.dll
#Reference siaIDEMain.dll
@luelista
luelista / receiver_info.pl
Created February 19, 2011 21:39
Verwaltet TechniSat TechniStar S1 Receiver über Netzwerk
#!/usr/bin/perl
# receiver_info.pl
# Verwaltet TechniSat TechniStar S1 Receiver über Netzwerk
# Copyright (c) 2011 Max Weller <perl AT max-weller.de>
use strict;
use LWP::UserAgent;
use Getopt::Std;
@luelista
luelista / adb-conv-moritzformat.pl
Created February 25, 2011 11:35
Konvertiert Adress-Datensätze zwischen den zwei komischen Datenformat aus dem Info-Unterricht...
#!/usr/bin/perl
use Data::Dumper;
use strict;
my @felder = qw(Name Vorname Strasse Hausnr PLZ Ort);
sub write_to_file { my %data = %{$_[0]}; my @contacts = @{$_[1]};
print $data{$_}, "|" for (@felder);
print $_, "|" for (@contacts);
print "\n";
public static void saveData() throws Exception {
FileWriter w = new FileWriter("adressen.txt");
for(Person p : personen) {
p.writeToFile(w);
}
w.close();
}
public static void readData() throws Exception {
BufferedReader r = new BufferedReader(new FileReader("adressen.txt"));
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
sub tryit {
print "trying $_[0]:$_[1] ... ";
my $r = $ua->post("http://www.rise-of-light.de/secure/login.php",
Content => "username=".$_[0]."&passwd=".$_[1]);
if($r->header("Location") =~ /welcome/) {
@luelista
luelista / gist:996169
Created May 27, 2011 21:07
perl one-liner for Collatz sequence
$ perl -e "$_=shift;while($_>1){if($_%2){$_*=3;$_++;}else{$_/=2;}print++$c,\"# $_\n\"}" 12345
@luelista
luelista / wikipedia-philosophy-loop.pl
Created May 27, 2011 21:36
Wikipedia trivia: if you take any article, click on the first link in the article text not in parentheses or italics, and then repeat, you will eventually end up at "Philosophy".
#!/usr/bin/perl
use strict;
use warnings;
use Switch;
use LWP::Simple qw($ua);
# changing User Agent string because Wikipedia.org blocks default LWP::Simple User Agent
$ua->agent("WikiBot/0.1");
@luelista
luelista / __SimpleImage.class.php
Created October 25, 2012 00:22
Extend Taskfreak to support elRTE Wysiwyg Editor and Image upload via copy-paste ....... description of difference to regular taskFreak and SCREENSHOT here: http://test.teamwiki.de/taskfreak-mods/
<?php
/*
* File: SimpleImage.php
* Author: Simon Jarvis
* Copyright: 2006 Simon Jarvis
* Date: 08/11/06
* Link: http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php
*
* This program is free software; you can redistribute it and/or