Bladeren bron

old quickies synced

LH 6 jaren geleden
bovenliggende
commit
9e649b060b
34 gewijzigde bestanden met toevoegingen van 3047 en 3 verwijderingen
  1. 1 3
      iZpl/src/main/java/de/nplusc/izc/iZpl/Utils/VlcInterface.java
  2. 73 0
      quickProgs/build.xml
  3. 16 0
      quickProgs/libs.txt
  4. 3 0
      quickProgs/manifest.mf
  5. 20 0
      quickProgs/src/Calculator.java
  6. 108 0
      quickProgs/src/FFBookMarksToPathFile/Converter.java
  7. 86 0
      quickProgs/src/SCrunch/ClosestPoints.java
  8. 67 0
      quickProgs/src/SCrunch/cruncher.java
  9. 28 0
      quickProgs/src/edu/wlu/cs/levy/CG/Checker.java
  10. 30 0
      quickProgs/src/edu/wlu/cs/levy/CG/DistanceMetric.java
  11. 64 0
      quickProgs/src/edu/wlu/cs/levy/CG/Editor.java
  12. 45 0
      quickProgs/src/edu/wlu/cs/levy/CG/EuclideanDistance.java
  13. 73 0
      quickProgs/src/edu/wlu/cs/levy/CG/HPoint.java
  14. 114 0
      quickProgs/src/edu/wlu/cs/levy/CG/HRect.java
  15. 40 0
      quickProgs/src/edu/wlu/cs/levy/CG/HammingDistance.java
  16. 32 0
      quickProgs/src/edu/wlu/cs/levy/CG/KDException.java
  17. 290 0
      quickProgs/src/edu/wlu/cs/levy/CG/KDNode.java
  18. 396 0
      quickProgs/src/edu/wlu/cs/levy/CG/KDTree.java
  19. 37 0
      quickProgs/src/edu/wlu/cs/levy/CG/KeyDuplicateException.java
  20. 35 0
      quickProgs/src/edu/wlu/cs/levy/CG/KeyMissingException.java
  21. 39 0
      quickProgs/src/edu/wlu/cs/levy/CG/KeySizeException.java
  22. 83 0
      quickProgs/src/edu/wlu/cs/levy/CG/Makefile
  23. 99 0
      quickProgs/src/edu/wlu/cs/levy/CG/NearestNeighborList.java
  24. 64 0
      quickProgs/src/hhn/Pfade.java
  25. 68 0
      quickProgs/src/hhn/PfadeMünzen.java
  26. 69 0
      quickProgs/src/hhn/Pfadevierschritt.java
  27. 81 0
      quickProgs/src/pv/UI.form
  28. 188 0
      quickProgs/src/pv/UI.java
  29. 372 0
      quickProgs/src/qucikprogs/Fickdich.form
  30. 318 0
      quickProgs/src/qucikprogs/Fickdich.java
  31. 37 0
      quickProgs/src/qucikprogs/GrayifierLSE.java
  32. 21 0
      quickProgs/src/qucikprogs/Overflower.java
  33. 24 0
      quickProgs/src/qucikprogs/QucikProgs.java
  34. 26 0
      quickProgs/src/qucikprogs/unAAX.java

+ 1 - 3
iZpl/src/main/java/de/nplusc/izc/iZpl/Utils/VlcInterface.java

@@ -149,9 +149,7 @@ public class VlcInterface implements PlaybackPlugin , MediaPlayerEventListener
             {
                 throw new UnsupportedOperationException("ERROR! invalid OSType detected, embedded VLC doesnt work here");
             }
-        }
-        //Native.load(RuntimeUtil.getLibVlcLibraryName(), LibVlc.class);
-        
+        }       
     }
     
     

+ 73 - 0
quickProgs/build.xml

@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<!-- By default, only the Clean and Build commands use this build script. -->
+<!-- Commands such as Run, Debug, and Test only use this build script if -->
+<!-- the Compile on Save feature is turned off for the project. -->
+<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
+<!-- in the project's Project Properties dialog box.-->
+<project name="qucikProgs" default="default" basedir=".">
+    <description>Builds, tests, and runs the project qucikProgs.</description>
+    <import file="nbproject/build-impl.xml"/>
+    <!--
+
+    There exist several targets which are by default empty and which can be 
+    used for execution of your tasks. These targets are usually executed 
+    before and after some main targets. They are: 
+
+      -pre-init:                 called before initialization of project properties
+      -post-init:                called after initialization of project properties
+      -pre-compile:              called before javac compilation
+      -post-compile:             called after javac compilation
+      -pre-compile-single:       called before javac compilation of single file
+      -post-compile-single:      called after javac compilation of single file
+      -pre-compile-test:         called before javac compilation of JUnit tests
+      -post-compile-test:        called after javac compilation of JUnit tests
+      -pre-compile-test-single:  called before javac compilation of single JUnit test
+      -post-compile-test-single: called after javac compilation of single JUunit test
+      -pre-jar:                  called before JAR building
+      -post-jar:                 called after JAR building
+      -post-clean:               called after cleaning build products
+
+    (Targets beginning with '-' are not intended to be called on their own.)
+
+    Example of inserting an obfuscator after compilation could look like this:
+
+        <target name="-post-compile">
+            <obfuscate>
+                <fileset dir="${build.classes.dir}"/>
+            </obfuscate>
+        </target>
+
+    For list of available properties check the imported 
+    nbproject/build-impl.xml file. 
+
+
+    Another way to customize the build is by overriding existing main targets.
+    The targets of interest are: 
+
+      -init-macrodef-javac:     defines macro for javac compilation
+      -init-macrodef-junit:     defines macro for junit execution
+      -init-macrodef-debug:     defines macro for class debugging
+      -init-macrodef-java:      defines macro for class execution
+      -do-jar:                  JAR building
+      run:                      execution of project 
+      -javadoc-build:           Javadoc generation
+      test-report:              JUnit report generation
+
+    An example of overriding the target for project execution could look like this:
+
+        <target name="run" depends="qucikProgs-impl.jar">
+            <exec dir="bin" executable="launcher.exe">
+                <arg file="${dist.jar}"/>
+            </exec>
+        </target>
+
+    Notice that the overridden target depends on the jar target and not only on 
+    the compile target as the regular run target does. Again, for a list of available 
+    properties which you can use, check the target you are overriding in the
+    nbproject/build-impl.xml file. 
+
+    -->
+</project>

+ 16 - 0
quickProgs/libs.txt

@@ -0,0 +1,16 @@
+ Datentr„ger in Laufwerk Q: ist Quellcode
+ Volumeseriennummer: 026B-DD87
+
+ Verzeichnis von Q:\iZinked\qucikProgs\lib_converttogradle
+
+14.05.2019  21:21    <DIR>          .
+14.05.2019  21:21    <DIR>          ..
+06.05.2015  20:14            53.918 commons-exec-1.1.jar
+06.05.2015  20:14           185.140 commons-io-2.4.jar
+14.05.2019  21:21                 0 libs.txt
+06.05.2015  20:14           775.587 mysql-connector-java-5.1.18-bin.jar
+06.05.2015  20:14           273.449 snakeyaml-1.13.jar
+06.05.2015  20:14         3.662.128 sqlite-jdbc-3.7.15-SNAPSHOT-2.jar
+06.05.2015  20:14           323.988 ToolKit.jar
+               7 Datei(en),      5.274.210 Bytes
+               2 Verzeichnis(se), 355.551.305.728 Bytes frei

+ 3 - 0
quickProgs/manifest.mf

@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+

+ 20 - 0
quickProgs/src/Calculator.java

@@ -0,0 +1,20 @@
+
+import java.util.PriorityQueue;
+
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class Calculator
+{
+    public static void main(String[] args)
+    {
+       // PriorityQueue
+    }
+}

+ 108 - 0
quickProgs/src/FFBookMarksToPathFile/Converter.java

@@ -0,0 +1,108 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package FFBookMarksToPathFile;
+
+import de.nplusc.izc.tools.IOtools.DBWriter;
+import de.nplusc.izc.tools.IOtools.FileTK;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class Converter
+{
+    static StringBuilder out = new StringBuilder();
+    public static void main(String[] args)
+    {
+        //1=r00t
+        
+        HashMap<String,ArrayList<String>> tree = new HashMap<>();
+        HashMap<String,String> fnames = new HashMap<>();
+        HashMap<String,ArrayList<String>> childrenMap = new HashMap<>();
+        DBWriter dbw = new DBWriter("", "D:\\loa\\000003\\places.sqlite", "", "", DBWriter.DBTYPE_SQLite);
+        String[][] bookmarksraw = dbw.queryTable("SELECT id,type,fk,parent,position,title from moz_bookmarks  ORDER BY id");
+        //System.out.println(Arrays.toString(bookmarksraw));
+        bookmarksraw[0][5]="r00t"; //hack um sinnvolle bezeichnung am anfang zu haben
+        for (String[] bookmarkData : bookmarksraw)
+        {
+            String key = bookmarkData[0];
+            if(bookmarkData[1].equals("2"))//folder
+            {
+                if(!bookmarkData[3].equals("0"))
+                {
+                   String parent = bookmarkData[3];
+                    
+                    if(!childrenMap.containsKey(parent))
+                    {
+                        childrenMap.put(parent, new ArrayList<>());
+                    }
+                }
+                childrenMap.put(key, new ArrayList<>());
+                if(!tree.containsKey(key))
+                {
+                    tree.put(key, new ArrayList<>());
+                }
+                fnames.put(key,bookmarkData[5]);
+            }
+            else
+            {
+                if(!bookmarkData[1].equals("1"))
+                {
+                    continue;
+                }
+                String parent = bookmarkData[3];
+                System.out.println("idparent = "+key+"|"+parent);
+                String datafield=dbw.querySingleCell("SELECT url FROM moz_places where id = "+bookmarkData[2]);
+                if(!tree.containsKey(parent))
+                {
+                    tree.put(parent, new ArrayList<>());
+                }
+                tree.get(parent).add(bookmarkData[5]+"=>"+datafield);
+            }
+        }
+        
+        //Integer[] fldr = fnames.keySet().toArray(new Integer[1]);
+        //Arrays.sort(fldr, Integer::compare);
+        System.out.println("");
+        
+        String internalpath = "/";
+        recurseBookMarks("1", internalpath, tree, fnames, childrenMap);
+        
+        String res = out.toString();
+        FileTK.writeFile(res, "D:\\loa\\000003\\books.txt");
+        //out.append(internalpath).append("\n");
+    }
+    private static void recurseBookMarks(String folder,String pathPrefix,
+            HashMap<String,ArrayList<String>> entries,HashMap<String,String> folders,HashMap<String,ArrayList<String>> childrenFolders)
+    {
+        pathPrefix=pathPrefix+folders.get(folder)+"/";
+        out.append(pathPrefix).append("\n");
+        ArrayList<String> childFolders = childrenFolders.get(folder);
+        if(childFolders!=null)
+        {
+            for (String childFolder : childFolders)
+            {
+                recurseBookMarks(childFolder, pathPrefix, entries, folders, childrenFolders);
+            }
+        }
+        ArrayList<String> etrs = entries.get(folder);
+        if(etrs==null)
+        {
+            return;
+        }
+        for (String etr : etrs)
+        {
+            out.append(pathPrefix).append(etr).append("\n");
+        }
+    }
+    
+    
+    
+    //"D:\\loa\\000003\\books.txt"
+}

+ 86 - 0
quickProgs/src/SCrunch/ClosestPoints.java

@@ -0,0 +1,86 @@
+/*
+
+package SCrunch;
+
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.PriorityQueue;
+import javax.imageio.ImageIO;
+
+public class ClosestPoints {
+
+    public static void main(String[] args) {
+        Collection<Point> points = new ArrayList<Point>();
+        Point origin = new Point(0, 0);
+        BufferedImage i = ImageIO.read(new File("C:\\users\\LH\\Desktop\\s1.png"));
+        while(i.getHeight()<1);
+        int h = i.getHeight();
+        int w = i.getWidth();
+        System.out.println(h+"|"+w);
+        for(int hi=0;hi<h;hi++)
+        {
+            for(int wi=0;wi<w;wi++)
+            {
+                if((i.getRGB(wi, hi)&0x00ffffff)==0x222222)
+                {
+                    points.add(new Point(wi, hi));
+                    System.out.println("spawnah");
+                }
+            }
+            System.out.println(hi+"/"+h);
+        }
+        
+
+        Collection<Point> closestPoints = new ClosestPoints().getClosestPoints(points, 5);
+        System.out.print(closestPoints);
+    }
+
+    public Collection<Point> getClosestPoints(Collection<Point> points, int k) {
+        PriorityQueue<Point> queue = new PriorityQueue<Point>(k);
+
+        for (Point point : points) {
+            if (queue.size() < k) {
+                queue.offer(point);
+            } else {
+                if (queue.peek().compareTo(point) < 0) {
+                    queue.poll();
+                    queue.offer(point);
+                }
+            }
+        }
+
+        return queue;
+    }
+
+}
+
+class Point implements Comparable<Point> {
+    int x, y;
+    double dist;
+
+    public Point(int x, int y, Point originPoint) {
+        this.x = x;
+        this.y = y;
+        this.dist = Math.hypot(x - originPoint.x, y - originPoint.y);
+    }
+
+    public Point(int x, int y) {
+        this.x = x;
+        this.y = y;
+    }
+
+    @Override
+    public int compareTo(Point that) {
+        return Double.valueOf(that.dist).compareTo(dist);
+    }
+
+    @Override
+    public String toString() {
+        return "x: " + x + " y: " + y;
+    }
+}
+
+*/

+ 67 - 0
quickProgs/src/SCrunch/cruncher.java

@@ -0,0 +1,67 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package SCrunch;
+
+import edu.wlu.cs.levy.CG.KDTree;
+import java.awt.Image;
+import java.awt.image.BufferedImage;
+import javax.imageio.ImageIO;
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.util.ArrayList;
+import org.yaml.snakeyaml.Yaml;
+
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class cruncher
+{
+    //0x222222
+    public static void main(String[] args) throws Exception
+    {
+        ArrayList<double[]> spawnahs = new ArrayList<>();
+        BufferedImage i = ImageIO.read(new File("C:\\users\\LH\\Desktop\\s3.png"));
+        KDTree<double[]> t = new KDTree(2);
+        while(i.getHeight()<1);
+        int h = i.getHeight();
+        int w = i.getWidth();
+        System.out.println(h+"|"+w);
+        for(int hi=0;hi<h;hi++)
+        {
+            for(int wi=0;wi<w;wi++)
+            {
+                if((i.getRGB(wi, hi)&0xFF000000)!=0) //0x00ffffff)==0xFF00FF)
+                {
+                    double[] s = new double[]{wi-8192,hi-8192};
+                    spawnahs.add(s);
+                    t.insert(s, s);
+                    System.out.println("spawnah");
+                }
+            }
+            System.out.println(hi+"/"+h);
+        }
+        
+        ArrayList<double[]> susp = new ArrayList<>();
+        int ix=0;
+        int j=spawnahs.size();
+        for (double[] is : spawnahs)
+        {
+            if(t.nearestEuclidean(is, 15).size()>=4)
+            {
+                susp.add(is);
+                System.out.println("SUS:"+ix+"/"+j);
+               
+            }
+             ix++;
+        }
+        
+        String sp = new Yaml().dump(susp);
+        RandomAccessFile r = new RandomAccessFile("D:\\emc2\\arca_slash\\spawnahs_3.txt", "rw");
+        r.write(sp.getBytes());
+    }
+}

+ 28 - 0
quickProgs/src/edu/wlu/cs/levy/CG/Checker.java

@@ -0,0 +1,28 @@
+// Checker.java : class for filtering KD-Tree matches by usability
+//
+// Copyright (C) Michael Lorton and Simon D. Levy 2014
+//
+// This code is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as 
+// published by the Free Software Foundation, either version 3 of the 
+// License, or (at your option) any later version.
+//
+// This code is distributed in the hope that it will be useful,     
+// but WITHOUT ANY WARRANTY without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public License 
+//  along with this code.  If not, see <http://www.gnu.org/licenses/>.
+//  You should also have received a copy of the Parrot Parrot AR.Drone 
+//  Development License and Parrot AR.Drone copyright notice and disclaimer 
+//  and If not, see 
+//   <https://projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+// and
+//   <https://projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+
+package edu.wlu.cs.levy.CG;
+
+public interface Checker<T> {
+    public boolean usable(T v);
+}

+ 30 - 0
quickProgs/src/edu/wlu/cs/levy/CG/DistanceMetric.java

@@ -0,0 +1,30 @@
+// DistanceMetric.java : Abstract distance metric class
+//
+// Copyright (C) Simon D. Levy 2014
+//
+// This code is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as 
+// published by the Free Software Foundation, either version 3 of the 
+// License, or (at your option) any later version.
+//
+// This code is distributed in the hope that it will be useful,     
+// but WITHOUT ANY WARRANTY without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public License 
+//  along with this code.  If not, see <http://www.gnu.org/licenses/>.
+//  You should also have received a copy of the Parrot Parrot AR.Drone 
+//  Development License and Parrot AR.Drone copyright notice and disclaimer 
+//  and If not, see 
+//   <https://projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+// and
+//   <https://projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+// 
+
+package edu.wlu.cs.levy.CG;
+
+abstract class DistanceMetric {
+    
+    protected abstract double distance(double [] a, double [] b);
+}

+ 64 - 0
quickProgs/src/edu/wlu/cs/levy/CG/Editor.java

@@ -0,0 +1,64 @@
+// Editor.java : class for adding/removing nodes from KD-Tree
+//
+// Copyright (C) Michael Lorton and Simon D. Levy 2014
+//
+// This code is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as 
+// published by the Free Software Foundation, either version 3 of the 
+// License, or (at your option) any later version.
+//
+// This code is distributed in the hope that it will be useful,     
+// but WITHOUT ANY WARRANTY without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public License 
+//  along with this code.  If not, see <http://www.gnu.org/licenses/>.
+//  You should also have received a copy of the Parrot Parrot AR.Drone 
+//  Development License and Parrot AR.Drone copyright notice and disclaimer 
+//  and If not, see 
+//   <https://projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+// and
+//   <https://projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+
+package edu.wlu.cs.levy.CG;
+
+
+public interface Editor<T> {
+    public T edit(T current) throws KeyDuplicateException;
+
+    public static abstract class BaseEditor<T> implements Editor<T> {
+        final T val;
+        public BaseEditor(T val) {
+            this.val = val;
+        }
+        public abstract T edit(T current) throws KeyDuplicateException;
+    }
+    public static class Inserter<T> extends BaseEditor<T> {
+        public Inserter(T val) {
+            super(val);
+        }
+        public T edit(T current) throws KeyDuplicateException {
+            if (current == null) {
+                return this.val;
+            }
+            throw new KeyDuplicateException();
+        }
+    }
+    public static class OptionalInserter<T> extends BaseEditor<T> {
+        public OptionalInserter(T val) {
+            super(val);
+        }
+        public T edit(T current) {
+            return (current == null) ? this.val : current;
+        }
+    }
+    public static class Replacer<T> extends BaseEditor<T> {
+        public Replacer(T val) {
+            super(val);
+        }
+        public T edit(T current) {
+            return this.val;
+        }
+    }
+}

+ 45 - 0
quickProgs/src/edu/wlu/cs/levy/CG/EuclideanDistance.java

@@ -0,0 +1,45 @@
+// EuclideanDistance.java : Class for Euclidean distance metric
+//
+// Copyright (C) Simon D. Levy 2014
+//
+// This code is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as 
+// published by the Free Software Foundation, either version 3 of the 
+// License, or (at your option) any later version.
+//
+// This code is distributed in the hope that it will be useful,     
+// but WITHOUT ANY WARRANTY without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public License 
+//  along with this code.  If not, see <http://www.gnu.org/licenses/>.
+//  You should also have received a copy of the Parrot Parrot AR.Drone 
+//  Development License and Parrot AR.Drone copyright notice and disclaimer 
+//  and If not, see 
+//   <https://projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+// and
+//   <https://projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+
+package edu.wlu.cs.levy.CG;
+
+class EuclideanDistance extends DistanceMetric {
+    
+    protected double distance(double [] a, double [] b)  {
+	
+	return Math.sqrt(sqrdist(a, b));
+	
+    }
+    
+    protected static double sqrdist(double [] a, double [] b) {
+
+	double dist = 0;
+
+	for (int i=0; i<a.length; ++i) {
+	    double diff = (a[i] - b[i]);
+	    dist += diff*diff;
+	}
+
+	return dist;
+    }     
+}

+ 73 - 0
quickProgs/src/edu/wlu/cs/levy/CG/HPoint.java

@@ -0,0 +1,73 @@
+// HPoint.java : Hyper-Point class supporting KDTree class
+//
+// Copyright (C) Simon D. Levy 2014
+//
+// This code is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as 
+// published by the Free Software Foundation, either version 3 of the 
+// License, or (at your option) any later version.
+//
+// This code is distributed in the hope that it will be useful,     
+// but WITHOUT ANY WARRANTY without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public License 
+//  along with this code.  If not, see <http://www.gnu.org/licenses/>.
+//  You should also have received a copy of the Parrot Parrot AR.Drone 
+//  Development License and Parrot AR.Drone copyright notice and disclaimer 
+//  and If not, see 
+//   <https://projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+// and
+//   <https://projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+
+package edu.wlu.cs.levy.CG;
+
+import java.io.Serializable;
+
+class HPoint implements Serializable{
+
+    protected double [] coord;
+
+    protected HPoint(int n) {
+	coord = new double [n];
+    }
+
+    protected HPoint(double [] x) {
+
+	coord = new double[x.length];
+	for (int i=0; i<x.length; ++i) coord[i] = x[i];
+    }
+
+    protected Object clone() {
+
+	return new HPoint(coord);
+    }
+
+    protected boolean equals(HPoint p) {
+
+	// seems faster than java.util.Arrays.equals(), which is not 
+	// currently supported by Matlab anyway
+	for (int i=0; i<coord.length; ++i)
+	    if (coord[i] != p.coord[i])
+		return false;
+
+	return true;
+    }
+
+    protected static double sqrdist(HPoint x, HPoint y) {
+	
+	return EuclideanDistance.sqrdist(x.coord, y.coord);
+    }
+    
+
+
+    public String toString() {
+	String s = "";
+	for (int i=0; i<coord.length; ++i) {
+	    s = s + coord[i] + " ";
+	}
+	return s;
+    }
+
+}

+ 114 - 0
quickProgs/src/edu/wlu/cs/levy/CG/HRect.java

@@ -0,0 +1,114 @@
+// HRect.java : Hyper-Rectangle class supporting KDTree class
+//
+// Copyright (C) Simon D. Levy 2014
+//
+// This code is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as 
+// published by the Free Software Foundation, either version 3 of the 
+// License, or (at your option) any later version.
+//
+// This code is distributed in the hope that it will be useful,     
+// but WITHOUT ANY WARRANTY without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public License 
+//  along with this code.  If not, see <http://www.gnu.org/licenses/>.
+//  You should also have received a copy of the Parrot Parrot AR.Drone 
+//  Development License and Parrot AR.Drone copyright notice and disclaimer 
+//  and If not, see 
+//   <https://projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+// and
+//   <https://projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+
+package edu.wlu.cs.levy.CG;
+
+import java.io.Serializable;
+
+class HRect implements Serializable{
+
+    protected HPoint min;
+    protected HPoint max;
+
+    protected HRect(int ndims) {
+	min = new HPoint(ndims);
+	max = new HPoint(ndims);
+    }
+
+    protected HRect(HPoint vmin, HPoint vmax) {
+
+	min = (HPoint)vmin.clone();
+	max = (HPoint)vmax.clone();
+    }
+
+    protected Object clone() {
+	
+	return new HRect(min, max);
+    }
+
+    // from Moore's eqn. 6.6
+    protected HPoint closest(HPoint t) {
+
+	HPoint p = new HPoint(t.coord.length);
+
+	for (int i=0; i<t.coord.length; ++i) {
+           if (t.coord[i]<=min.coord[i]) {
+               p.coord[i] = min.coord[i];
+           }
+           else if (t.coord[i]>=max.coord[i]) {
+               p.coord[i] = max.coord[i];
+           }
+           else {
+               p.coord[i] = t.coord[i];
+           }
+	}
+	
+	return p;
+    }
+
+    // used in initial conditions of KDTree.nearest()
+    protected static HRect infiniteHRect(int d) {
+	
+	HPoint vmin = new HPoint(d);
+	HPoint vmax = new HPoint(d);
+	
+	for (int i=0; i<d; ++i) {
+	    vmin.coord[i] = Double.NEGATIVE_INFINITY;
+	    vmax.coord[i] = Double.POSITIVE_INFINITY;
+	}
+
+	return new HRect(vmin, vmax);
+    }
+
+    // currently unused
+    protected HRect intersection(HRect r) {
+
+	HPoint newmin = new HPoint(min.coord.length);
+	HPoint newmax = new HPoint(min.coord.length);
+
+	for (int i=0; i<min.coord.length; ++i) {
+	    newmin.coord[i] = Math.max(min.coord[i], r.min.coord[i]);
+	    newmax.coord[i] = Math.min(max.coord[i], r.max.coord[i]);
+	    if (newmin.coord[i] >= newmax.coord[i]) return null;
+	}
+
+	return new HRect(newmin, newmax);
+    }
+
+    // currently unused
+    protected double area () {
+
+	double a = 1;
+
+	for (int i=0; i<min.coord.length; ++i) {
+	    a *= (max.coord[i] - min.coord[i]);
+	}
+
+	return a;
+    }
+
+    public String toString() {
+	return min + "\n" + max + "\n";
+    }
+}
+

+ 40 - 0
quickProgs/src/edu/wlu/cs/levy/CG/HammingDistance.java

@@ -0,0 +1,40 @@
+// HammingDistance.java : Class for Hamming distance
+//
+// Copyright (C) Simon D. Levy 2014
+//
+// This code is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as 
+// published by the Free Software Foundation, either version 3 of the 
+// License, or (at your option) any later version.
+//
+// This code is distributed in the hope that it will be useful,     
+// but WITHOUT ANY WARRANTY without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public License 
+//  along with this code.  If not, see <http://www.gnu.org/licenses/>.
+//  You should also have received a copy of the Parrot Parrot AR.Drone 
+//  Development License and Parrot AR.Drone copyright notice and disclaimer 
+//  and If not, see 
+//   <https://projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+// and
+//   <https://projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+// 
+
+package edu.wlu.cs.levy.CG;
+
+class HammingDistance extends DistanceMetric {
+    
+    protected double distance(double [] a, double [] b)  {
+
+	double dist = 0;
+
+	for (int i=0; i<a.length; ++i) {
+	    double diff = (a[i] - b[i]);
+	    dist += Math.abs(diff);
+	}
+
+	return dist;
+    }     
+}

+ 32 - 0
quickProgs/src/edu/wlu/cs/levy/CG/KDException.java

@@ -0,0 +1,32 @@
+// KDException.java : general exception class for KD-Tree library
+//
+// Copyright (C) Simon D. Levy 2014
+//
+// This code is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as 
+// published by the Free Software Foundation, either version 3 of the 
+// License, or (at your option) any later version.
+//
+// This code is distributed in the hope that it will be useful,     
+// but WITHOUT ANY WARRANTY without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public License 
+//  along with this code.  If not, see <http://www.gnu.org/licenses/>.
+//  You should also have received a copy of the Parrot Parrot AR.Drone 
+//  Development License and Parrot AR.Drone copyright notice and disclaimer 
+//  and If not, see 
+//   <https://projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+// and
+//   <https://projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+
+package edu.wlu.cs.levy.CG;
+
+
+public class KDException extends Exception {
+    protected KDException(String s) {
+        super(s);
+    }
+    public static final long serialVersionUID = 1L;
+}

+ 290 - 0
quickProgs/src/edu/wlu/cs/levy/CG/KDNode.java

@@ -0,0 +1,290 @@
+// KDNode.java : K-D Tree node class
+//
+// Copyright (C) Simon D. Levy 2014
+//
+// This code is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as 
+// published by the Free Software Foundation, either version 3 of the 
+// License, or (at your option) any later version.
+//
+// This code is distributed in the hope that it will be useful,     
+// but WITHOUT ANY WARRANTY without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public License 
+//  along with this code.  If not, see <http://www.gnu.org/licenses/>.
+//  You should also have received a copy of the Parrot Parrot AR.Drone 
+//  Development License and Parrot AR.Drone copyright notice and disclaimer 
+//  and If not, see 
+//   <https://projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+// and
+//   <https://projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+
+package edu.wlu.cs.levy.CG;
+
+import java.io.Serializable;
+import java.util.List;
+
+class KDNode<T> implements Serializable{
+
+    // these are seen by KDTree
+    protected HPoint k;
+    T v;
+    protected KDNode<T> left, right;
+    protected boolean deleted;
+
+    // Method ins translated from 352.ins.c of Gonnet & Baeza-Yates
+    protected static <T> int edit(HPoint key, Editor<T> editor, KDNode<T> t, int lev, int K)
+ 	throws KeyDuplicateException {
+        KDNode<T> next_node = null;
+        int next_lev = (lev+1) % K;
+	synchronized (t) {
+            if (key.equals(t.k)) {
+                boolean was_deleted = t.deleted;
+                t.v = editor.edit(t.deleted ? null : t.v );
+                t.deleted = (t.v == null);
+
+                if (t.deleted == was_deleted) {
+                	// if I was and still am deleted or was and still am alive
+                    return 0;
+                } else if (was_deleted) {
+                	// if I was deleted => I am now undeleted
+                    return 1;
+                }
+                // I was not deleted, but I am now deleted
+                return -1;
+            } else if (key.coord[lev] > t.k.coord[lev]) {
+                next_node = t.right;
+                if (next_node == null) {
+                    t.right = create(key, editor);
+                    return t.right.deleted ? 0 : 1;
+                }                
+            }
+            else {
+                next_node = t.left;
+                if (next_node == null) {
+                    t.left = create(key, editor);
+                    return t.left.deleted ? 0 : 1;
+                }                
+            }
+	}
+
+        return edit(key, editor, next_node, next_lev, K);
+    }
+
+    protected static <T> KDNode<T> create(HPoint key, Editor<T> editor)
+        throws KeyDuplicateException {
+        KDNode<T> t = new KDNode<T>(key, editor.edit(null));
+        if (t.v == null) {
+            t.deleted = true;
+        }
+        return t;            
+    }
+
+    protected static <T> boolean del(KDNode<T> t) {
+        synchronized (t) {
+            if (!t.deleted) {
+                t.deleted = true;
+                return true;
+            }
+        }
+        return false;
+    }
+
+    // Method srch translated from 352.srch.c of Gonnet & Baeza-Yates
+    protected static <T> KDNode<T> srch(HPoint key, KDNode<T> t, int K) {
+
+	for (int lev=0; t!=null; lev=(lev+1)%K) {
+
+	    if (!t.deleted && key.equals(t.k)) {
+		return t;
+	    }
+	    else if (key.coord[lev] > t.k.coord[lev]) {
+		t = t.right;
+	    }
+	    else {
+		t = t.left;
+	    }
+	}
+
+	return null;
+    }
+
+    // Method rsearch translated from 352.range.c of Gonnet & Baeza-Yates
+    protected static <T> void rsearch(HPoint lowk, HPoint uppk, KDNode<T> t, int lev,
+				  int K, List<KDNode<T>> v) {
+
+	if (t == null) return;
+	if (lowk.coord[lev] <= t.k.coord[lev]) {
+	    rsearch(lowk, uppk, t.left, (lev+1)%K, K, v);
+	}
+        if (!t.deleted) {
+            int j = 0;
+            while (j<K && lowk.coord[j]<=t.k.coord[j] && 
+                   uppk.coord[j]>=t.k.coord[j]) {
+                j++;
+            }
+            if (j==K) v.add(t);
+        }
+	if (uppk.coord[lev] > t.k.coord[lev]) {
+	    rsearch(lowk, uppk, t.right, (lev+1)%K, K, v);
+	}
+    }
+
+    // Method Nearest Neighbor from Andrew Moore's thesis. Numbered
+    // comments are direct quotes from there.   NearestNeighborList solution
+    // courtesy of Bjoern Heckel.
+   protected static <T> void nnbr(KDNode<T> kd, HPoint target, HRect hr,
+                              double max_dist_sqd, int lev, int K,
+                              NearestNeighborList<KDNode<T>> nnl,
+                              Checker<T> checker,
+                              long timeout) {
+
+       // 1. if kd is empty then set dist-sqd to infinity and exit.
+       if (kd == null) {
+           return;
+       }
+
+       if ((timeout > 0) && (timeout < System.currentTimeMillis())) {
+           return;
+       }
+       // 2. s := split field of kd
+       int s = lev % K;
+
+       // 3. pivot := dom-elt field of kd
+       HPoint pivot = kd.k;
+       double pivot_to_target = HPoint.sqrdist(pivot, target);
+
+       // 4. Cut hr into to sub-hyperrectangles left-hr and right-hr.
+       //    The cut plane is through pivot and perpendicular to the s
+       //    dimension.
+       HRect left_hr = hr; // optimize by not cloning
+       HRect right_hr = (HRect) hr.clone();
+       left_hr.max.coord[s] = pivot.coord[s];
+       right_hr.min.coord[s] = pivot.coord[s];
+
+       // 5. target-in-left := target_s <= pivot_s
+       boolean target_in_left = target.coord[s] < pivot.coord[s];
+
+       KDNode<T> nearer_kd;
+       HRect nearer_hr;
+       KDNode<T> further_kd;
+       HRect further_hr;
+
+       // 6. if target-in-left then
+       //    6.1. nearer-kd := left field of kd and nearer-hr := left-hr
+       //    6.2. further-kd := right field of kd and further-hr := right-hr
+       if (target_in_left) {
+           nearer_kd = kd.left;
+           nearer_hr = left_hr;
+           further_kd = kd.right;
+           further_hr = right_hr;
+       }
+       //
+       // 7. if not target-in-left then
+       //    7.1. nearer-kd := right field of kd and nearer-hr := right-hr
+       //    7.2. further-kd := left field of kd and further-hr := left-hr
+       else {
+           nearer_kd = kd.right;
+           nearer_hr = right_hr;
+           further_kd = kd.left;
+           further_hr = left_hr;
+       }
+
+       // 8. Recursively call Nearest Neighbor with paramters
+       //    (nearer-kd, target, nearer-hr, max-dist-sqd), storing the
+       //    results in nearest and dist-sqd
+       nnbr(nearer_kd, target, nearer_hr, max_dist_sqd, lev + 1, K, nnl, checker, timeout);
+
+       KDNode<T> nearest = nnl.getHighest();
+       double dist_sqd;
+
+       if (!nnl.isCapacityReached()) {
+           dist_sqd = Double.MAX_VALUE;
+       }
+       else {
+           dist_sqd = nnl.getMaxPriority();
+       }
+
+       // 9. max-dist-sqd := minimum of max-dist-sqd and dist-sqd
+       max_dist_sqd = Math.min(max_dist_sqd, dist_sqd);
+
+       // 10. A nearer point could only lie in further-kd if there were some
+       //     part of further-hr within distance max-dist-sqd of
+       //     target.  
+       HPoint closest = further_hr.closest(target);
+       if (HPoint.sqrdist(closest, target) < max_dist_sqd) {
+
+           // 10.1 if (pivot-target)^2 < dist-sqd then
+           if (pivot_to_target < dist_sqd) {
+
+               // 10.1.1 nearest := (pivot, range-elt field of kd)
+               nearest = kd;
+
+               // 10.1.2 dist-sqd = (pivot-target)^2
+               dist_sqd = pivot_to_target;
+
+               // add to nnl
+               if (!kd.deleted && ((checker == null) || checker.usable(kd.v))) {
+                   nnl.insert(kd, dist_sqd);
+               }
+
+               // 10.1.3 max-dist-sqd = dist-sqd
+               // max_dist_sqd = dist_sqd;
+               if (nnl.isCapacityReached()) {
+                   max_dist_sqd = nnl.getMaxPriority();
+               }
+               else {
+                   max_dist_sqd = Double.MAX_VALUE;
+               }
+           }
+
+           // 10.2 Recursively call Nearest Neighbor with parameters
+           //      (further-kd, target, further-hr, max-dist_sqd),
+           //      storing results in temp-nearest and temp-dist-sqd
+           nnbr(further_kd, target, further_hr, max_dist_sqd, lev + 1, K, nnl, checker, timeout);
+       }
+   }
+
+
+    // constructor is used only by class; other methods are static
+    private KDNode(HPoint key, T val) {
+	
+	k = key;
+	v = val;
+	left = null;
+	right = null;
+	deleted = false;
+    }
+
+    protected String toString(int depth) {
+	String s = k + "  " + v + (deleted ? "*" : "");
+	if (left != null) {
+	    s = s + "\n" + pad(depth) + "L " + left.toString(depth+1);
+	}
+	if (right != null) {
+	    s = s + "\n" + pad(depth) + "R " + right.toString(depth+1);
+	}
+	return s;
+    }
+
+    private static String pad(int n) {
+	String s = "";
+	for (int i=0; i<n; ++i) {
+	    s += " ";
+	}
+	return s;
+    }
+
+    private static void hrcopy(HRect hr_src, HRect hr_dst) {
+	hpcopy(hr_src.min, hr_dst.min);
+	hpcopy(hr_src.max, hr_dst.max);
+    }
+
+    private static void hpcopy(HPoint hp_src, HPoint hp_dst) {
+	for (int i=0; i<hp_dst.coord.length; ++i) {
+	    hp_dst.coord[i] = hp_src.coord[i];
+	}
+    }
+}

+ 396 - 0
quickProgs/src/edu/wlu/cs/levy/CG/KDTree.java

@@ -0,0 +1,396 @@
+package edu.wlu.cs.levy.CG;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.LinkedList;
+import java.util.Stack;
+
+/**
+* KDTree is a class supporting KD-tree insertion, deletion, equality
+* search, range search, and nearest neighbor(s) using double-precision
+* floating-point keys.  Splitting dimension is chosen naively, by
+* depth modulo K.  Semantics are as follows:
+*
+* <UL>
+* <LI> Two different keys containing identical numbers should retrieve the 
+*      same value from a given KD-tree.  Therefore keys are cloned when a 
+*      node is inserted.
+* <BR><BR>
+* <LI> As with Hashtables, values inserted into a KD-tree are <I>not</I>
+*      cloned.  Modifying a value between insertion and retrieval will
+*      therefore modify the value stored in the tree.
+*</UL>
+*
+* Implements the Nearest Neighbor algorithm (Table 6.4) of
+*
+* <PRE>
+* &*064;techreport{AndrewMooreNearestNeighbor,
+    *   author  = {Andrew Moore},
+    *   title   = {An introductory tutorial on kd-trees},
+    *   institution = {Robotics Institute, Carnegie Mellon University},
+    *   year    = {1991},
+    *   number  = {Technical Report No. 209, Computer Laboratory, 
+    *              University of Cambridge},
+    *   address = {Pittsburgh, PA}
+* }
+* </PRE>
+*  
+* Copyright (C) Simon D. Levy and Bjoern Heckel 2014
+*
+* This code is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as 
+* published by the Free Software Foundation, either version 3 of the 
+* License, or (at your option) any later version.
+*
+* This code is distributed in the hope that it will be useful,     
+* but WITHOUT ANY WARRANTY without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU Lesser General Public License 
+*  along with this code.  If not, see <http:*www.gnu.org/licenses/>.
+*  You should also have received a copy of the Parrot Parrot AR.Drone 
+*  Development License and Parrot AR.Drone copyright notice and disclaimer 
+*  and If not, see 
+*   <https:*projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+* and
+*   <https:*projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+*/
+public class KDTree<T> implements Serializable{
+    // number of milliseconds
+    final long m_timeout;
+    
+    // K = number of dimensions
+    final private int m_K;
+    
+    // root of KD-tree
+    private KDNode<T> m_root;
+    
+    // count of nodes
+    private int m_count;
+    
+    /**
+    * Creates a KD-tree with specified number of dimensions.
+    *
+    * @param k number of dimensions
+    */
+  
+    public KDTree(int k) {
+        this(k, 0);
+    }
+    public KDTree(int k, long timeout) {
+        this.m_timeout = timeout;
+	m_K = k;
+	m_root = null;
+    }
+    
+    
+    /** 
+    * Insert a node in a KD-tree.  Uses algorithm translated from 352.ins.c of
+    *
+    *   <PRE>
+    *   &*064;Book{GonnetBaezaYates1991,                                   
+	*     author =    {G.H. Gonnet and R. Baeza-Yates},
+	*     title =     {Handbook of Algorithms and Data Structures},
+	*     publisher = {Addison-Wesley},
+	*     year =      {1991}
+    *   }
+    *   </PRE>
+    *
+    * @param key key for KD-tree node
+    * @param value value at that key
+    *
+    * @throws KeySizeException if key.length mismatches K
+    * @throws KeyDuplicateException if key already in tree
+    */
+    public void insert(double [] key, T value) 
+    throws KeySizeException, KeyDuplicateException {
+        this.edit(key, new Editor.Inserter<T>(value));
+    }
+    
+    /** 
+    * Edit a node in a KD-tree
+    *
+    * @param key key for KD-tree node
+    * @param editor object to edit the value at that key
+    *
+    * @throws KeySizeException if key.length mismatches K
+    * @throws KeyDuplicateException if key already in tree
+    */
+    
+    public void edit(double [] key, Editor<T> editor) 
+    throws KeySizeException, KeyDuplicateException {
+	
+	if (key.length != m_K) {
+	    throw new KeySizeException();
+	}
+	
+        synchronized (this) {
+            // the first insert has to be synchronized
+            if (null == m_root) {
+                m_root = KDNode.create(new HPoint(key), editor);
+                m_count = m_root.deleted ? 0 : 1;
+                return;
+            }
+	}
+	
+        m_count += KDNode.edit(new HPoint(key), editor, m_root, 0, m_K);
+    }
+    
+    /** 
+    * Find  KD-tree node whose key is identical to key.  Uses algorithm 
+    * translated from 352.srch.c of Gonnet & Baeza-Yates.
+    *
+    * @param key key for KD-tree node
+    *
+    * @return object at key, or null if not found
+    *
+    * @throws KeySizeException if key.length mismatches K
+    */
+    public T search(double [] key) throws KeySizeException {
+	
+	if (key.length != m_K) {
+	    throw new KeySizeException();
+	}
+	
+	KDNode<T> kd = KDNode.srch(new HPoint(key), m_root, m_K);
+	
+	return (kd == null ? null : kd.v);
+    }
+    
+    
+    public void delete(double [] key) 
+    throws KeySizeException, KeyMissingException {
+        delete(key, false);
+    }
+    /** 
+    * Delete a node from a KD-tree.  Instead of actually deleting node and
+    * rebuilding tree, marks node as deleted.  Hence, it is up to the caller
+    * to rebuild the tree as needed for efficiency.
+    *
+    * @param key key for KD-tree node
+    * @param optional  if false and node not found, throw an exception
+    *
+    * @throws KeySizeException if key.length mismatches K
+    * @throws KeyMissingException if no node in tree has key
+    */
+    public void delete(double [] key, boolean optional) 
+    throws KeySizeException, KeyMissingException {
+	
+	if (key.length != m_K) {
+	    throw new KeySizeException();
+	}
+        KDNode<T> t = KDNode.srch(new HPoint(key), m_root, m_K);
+        if (t == null) {
+            if (optional == false) {
+                throw new KeyMissingException();
+            }
+        }
+        else {
+            if (KDNode.del(t)) {
+                m_count--;
+            }
+        }
+    }
+    
+    /**
+    * Find KD-tree node whose key is nearest neighbor to
+    * key. 
+    *
+    * @param key key for KD-tree node
+    *
+    * @return object at node nearest to key, or null on failure
+    *
+    * @throws KeySizeException if key.length mismatches K
+    
+    */
+    public T nearest(double [] key) throws KeySizeException {
+	
+	List<T> nbrs = nearest(key, 1, null);
+	return nbrs.get(0);
+    }
+    
+    /**
+    * Find KD-tree nodes whose keys are <i>n</i> nearest neighbors to
+    * key. 
+    *
+    * @param key key for KD-tree node
+    * @param n number of nodes to return
+    *
+    * @return objects at nodes nearest to key, or null on failure
+    *
+    * @throws KeySizeException if key.length mismatches K
+    
+    */
+    public List<T> nearest(double [] key, int n) 
+    throws KeySizeException, IllegalArgumentException {
+        return nearest(key, n, null);
+    }
+    
+    /**
+    * Find KD-tree nodes whose keys are within a given Euclidean distance of
+    * a given key.
+    *
+    * @param key key for KD-tree node
+    * @param d Euclidean distance
+    *
+    * @return objects at nodes with distance of key, or null on failure
+    *
+    * @throws KeySizeException if key.length mismatches K
+    
+    */
+    public List<T> nearestEuclidean(double [] key, double dist) 
+    throws KeySizeException {
+	return nearestDistance(key, dist, new EuclideanDistance());
+    }
+    
+    
+    /**
+    * Find KD-tree nodes whose keys are within a given Hamming distance of
+    * a given key.
+    *
+    * @param key key for KD-tree node
+    * @param d Hamming distance
+    *
+    * @return objects at nodes with distance of key, or null on failure
+    *
+    * @throws KeySizeException if key.length mismatches K
+    
+    */
+    public List<T> nearestHamming(double [] key, double dist) 
+    throws KeySizeException {
+	
+	return nearestDistance(key, dist, new HammingDistance());
+   }
+    
+    
+    /**
+    * Find KD-tree nodes whose keys are <I>n</I> nearest neighbors to
+    * key. Uses algorithm above.  Neighbors are returned in ascending
+    * order of distance to key. 
+    *
+    * @param key key for KD-tree node
+    * @param n how many neighbors to find
+    * @param checker an optional object to filter matches
+    *
+    * @return objects at node nearest to key, or null on failure
+    *
+    * @throws KeySizeException if key.length mismatches K
+    * @throws IllegalArgumentException if <I>n</I> is negative or
+    * exceeds tree size 
+    */
+    public List<T> nearest(double [] key, int n, Checker<T> checker) 
+    throws KeySizeException, IllegalArgumentException {
+	
+	if (n <= 0) {
+            return new LinkedList<T>();
+	}
+	
+	NearestNeighborList<KDNode<T>> nnl = getnbrs(key, n, checker);
+	
+        n = nnl.getSize();
+        Stack<T> nbrs = new Stack<T>();
+        
+	for (int i=0; i<n; ++i) {
+	    KDNode<T> kd = nnl.removeHighest();
+            nbrs.push(kd.v);
+	}
+	
+	return nbrs;
+    }
+    
+    
+    /** 
+    * Range search in a KD-tree.  Uses algorithm translated from
+    * 352.range.c of Gonnet & Baeza-Yates.
+    *
+    * @param lowk lower-bounds for key
+    * @param uppk upper-bounds for key
+    *
+    * @return array of Objects whose keys fall in range [lowk,uppk]
+    *
+    * @throws KeySizeException on mismatch among lowk.length, uppk.length, or K
+    */
+    public List<T> range(double [] lowk, double [] uppk) 
+    throws KeySizeException {
+	
+	if (lowk.length != uppk.length) {
+	    throw new KeySizeException();
+	}
+	
+	else if (lowk.length != m_K) {
+	    throw new KeySizeException();
+	}
+	
+	else {
+	    List<KDNode<T>> found = new LinkedList<KDNode<T>>();
+	    KDNode.rsearch(new HPoint(lowk), new HPoint(uppk), 
+	    m_root, 0, m_K, found);
+            List<T> o = new LinkedList<T>();
+            for (KDNode<T> node : found) {
+                o.add(node.v);
+	    }
+	    return o;
+	}
+    }
+    
+    public int size() { /* added by MSL */
+        return m_count;
+    }
+    
+    public String toString() {
+	return m_root.toString(0);
+    }
+    
+    private NearestNeighborList<KDNode<T>> getnbrs(double [] key) 
+    throws KeySizeException {
+	return getnbrs(key, m_count, null);
+    }
+    
+    
+    private NearestNeighborList<KDNode<T>> getnbrs(double [] key, int n, 
+    Checker<T> checker) throws KeySizeException {
+	
+	if (key.length != m_K) {
+	    throw new KeySizeException();
+	}
+	
+	NearestNeighborList<KDNode<T>> nnl = new NearestNeighborList<KDNode<T>>(n);
+	
+	// initial call is with infinite hyper-rectangle and max distance
+	HRect hr = HRect.infiniteHRect(key.length);
+	double max_dist_sqd = Double.MAX_VALUE;
+	HPoint keyp = new HPoint(key);
+	
+        if (m_count > 0) {
+            long timeout = (this.m_timeout > 0) ? 
+	    (System.currentTimeMillis() + this.m_timeout) : 
+	    0;
+            KDNode.nnbr(m_root, keyp, hr, max_dist_sqd, 0, m_K, nnl, checker, timeout);
+        }
+	
+	return nnl;
+	
+    }
+    
+    private  List<T> nearestDistance(double [] key, double dist, 
+    DistanceMetric metric) throws KeySizeException {
+	
+	NearestNeighborList<KDNode<T>> nnl = getnbrs(key);	    
+	int n = nnl.getSize();
+	Stack<T> nbrs = new Stack<T>();
+	
+	for (int i=0; i<n; ++i) {
+	    KDNode<T> kd = nnl.removeHighest();
+	    HPoint p = kd.k;
+	    if (metric.distance(kd.k.coord, key) < dist) {
+		nbrs.push(kd.v);
+	    }
+	}
+	
+	return nbrs;
+    }
+
+
+}
+

+ 37 - 0
quickProgs/src/edu/wlu/cs/levy/CG/KeyDuplicateException.java

@@ -0,0 +1,37 @@
+package edu.wlu.cs.levy.CG;
+
+/**
+* KeyDuplicateException is thrown when the <TT>KDTree.insert</TT> method
+* is invoked on a key already in the KDTree.
+*
+*
+* Copyright (C) Simon D. Levy 2014
+*
+* This code is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as 
+* published by the Free Software Foundation, either version 3 of the 
+* License, or (at your option) any later version.
+*
+* This code is distributed in the hope that it will be useful,     
+* but WITHOUT ANY WARRANTY without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU Lesser General Public License 
+*  along with this code.  If not, see <http:*www.gnu.org/licenses/>.
+*  You should also have received a copy of the Parrot Parrot AR.Drone 
+*  Development License and Parrot AR.Drone copyright notice and disclaimer 
+*  and If not, see 
+*   <https:*projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+* and
+*   <https:*projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+*/
+public class KeyDuplicateException extends KDException {
+
+    protected KeyDuplicateException() {
+	    super("Key already in tree");
+    }
+    
+    // arbitrary; every serializable class has to have one of these
+    public static final long serialVersionUID = 1L;
+}

+ 35 - 0
quickProgs/src/edu/wlu/cs/levy/CG/KeyMissingException.java

@@ -0,0 +1,35 @@
+// KeyMissingException.java : cKey-size mismatch exception supporting KDTree class
+//
+// Copyright (C) Simon D. Levy 2014
+//
+// This code is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as 
+// published by the Free Software Foundation, either version 3 of the 
+// License, or (at your option) any later version.
+//
+// This code is distributed in the hope that it will be useful,     
+// but WITHOUT ANY WARRANTY without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public License 
+//  along with this code.  If not, see <http://www.gnu.org/licenses/>.
+//  You should also have received a copy of the Parrot Parrot AR.Drone 
+//  Development License and Parrot AR.Drone copyright notice and disclaimer 
+//  and If not, see 
+//   <https://projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+// and
+//   <https://projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+
+package edu.wlu.cs.levy.CG;
+
+public class KeyMissingException extends KDException {  /* made public by MSL */
+
+    public KeyMissingException() {
+	super("Key not found");
+    }
+    
+    // arbitrary; every serializable class has to have one of these
+    public static final long serialVersionUID = 3L;
+    
+}

+ 39 - 0
quickProgs/src/edu/wlu/cs/levy/CG/KeySizeException.java

@@ -0,0 +1,39 @@
+package edu.wlu.cs.levy.CG;
+
+/**
+* KeySizeException is thrown when a KDTree method is invoked on a
+* key whose size (array length) mismatches the one used in the that
+* KDTree's constructor.
+*
+* Copyright (C) Simon D. Levy 2014
+*
+* This code is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as 
+* published by the Free Software Foundation, either version 3 of the 
+* License, or (at your option) any later version.
+*
+* This code is distributed in the hope that it will be useful,     
+* but WITHOUT ANY WARRANTY without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+*  You should have received a copy of the GNU Lesser General Public License 
+*  along with this code.  If not, see <http:*www.gnu.org/licenses/>.
+*  You should also have received a copy of the Parrot Parrot AR.Drone 
+*  Development License and Parrot AR.Drone copyright notice and disclaimer 
+*  and If not, see 
+*   <https:*projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+* and
+*   <https:*projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+* 
+*/
+public class KeySizeException extends KDException {
+
+    protected KeySizeException() {
+	super("Key size mismatch");
+    }
+    
+    // arbitrary; every serializable class has to have one of these
+    public static final long serialVersionUID = 2L;
+    
+}

+ 83 - 0
quickProgs/src/edu/wlu/cs/levy/CG/Makefile

@@ -0,0 +1,83 @@
+# Makefile : builds KDTree.class Java library
+#
+# Copyright (C) Simon D. Levy 2014
+#
+# This code is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as 
+# published by the Free Software Foundation, either version 3 of the 
+# License, or (at your option) any later version.
+#
+# This code is distributed in the hope that it will be useful,     
+# but WITHOUT ANY WARRANTY without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public License 
+#  along with this code.  If not, see <http:#www.gnu.org/licenses/>.
+#  You should also have received a copy of the Parrot Parrot AR.Drone 
+#  Development License and Parrot AR.Drone copyright notice and disclaimer 
+#  and If not, see 
+#   <https:#projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+# and
+#   <https:#projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+
+ALL =  KDTree.class
+
+PUB = KDTree.java KeyMissingException.java KeySizeException.java \
+      KeyDuplicateException.java
+
+all: $(ALL)
+
+JFLAGS = -Xlint -classpath ../../../../../
+
+KDTree.class: KDTree.java KDNode.class HRect.class KeySizeException.class \
+              KeyMissingException.class KeyDuplicateException.class \
+              NearestNeighborList.class DistanceMetric.class
+	javac $(JFLAGS) KDTree.java
+
+KDNode.class: KDNode.java HRect.class  KeySizeException.class \
+             KeyMissingException.class KeyDuplicateException.class
+	javac $(JFLAGS) KDNode.java
+
+HRect.class: HRect.java HPoint.class
+	javac $(JFLAGS) HRect.java
+
+HPoint.class: HPoint.java
+	javac $(JFLAGS) HPoint.java
+
+KeySizeException.class: KeySizeException.java
+	javac $(JFLAGS) KeySizeException.java
+
+KeyMissingException.class: KeyMissingException.java
+	javac $(JFLAGS) KeyMissingException.java
+
+KeyDuplicateException.class: KeyDuplicateException.java
+	javac $(JFLAGS) KeyDuplicateException.java
+
+NearestNeighborList.class: NearestNeighborList.java
+	javac $(JFLAGS) NearestNeighborList.java
+	
+DistanceMetric.class: DistanceMetric.java
+	javac $(JFLAGS) DistanceMetric.java
+	
+doc: $(PUB)
+	javadoc -classpath ../../../../../ -public $(PUB)
+	
+mvdoc:
+	rm -rf docs/*
+	mv *.html docs
+	mv stylesheet.css docs
+	mv package-list docs
+	mv edu docs
+	
+clean:
+	rm -f *.class  *.html package-list stylesheet.css *~
+
+backup:
+	cp *.java bak
+	cp Makefile bak
+
+restore:
+	cp bak/*.java .
+	cp bak/Makefile .
+

+ 99 - 0
quickProgs/src/edu/wlu/cs/levy/CG/NearestNeighborList.java

@@ -0,0 +1,99 @@
+// NearestNeighborList.java : A solution to the KD-Tree n-nearest-neighbor problem
+//
+// Copyright (C) Bjoern Heckel and Simon D. Levy 2014
+//
+// This code is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as 
+// published by the Free Software Foundation, either version 3 of the 
+// License, or (at your option) any later version.
+//
+// This code is distributed in the hope that it will be useful,     
+// but WITHOUT ANY WARRANTY without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public License 
+//  along with this code.  If not, see <http://www.gnu.org/licenses/>.
+//  You should also have received a copy of the Parrot Parrot AR.Drone 
+//  Development License and Parrot AR.Drone copyright notice and disclaimer 
+//  and If not, see 
+//   <https://projects.ardrone.org/attachments/277/ParrotLicense.txt> 
+// and
+//   <https://projects.ardrone.org/attachments/278/ParrotCopyrightAndDisclaimer.txt>.
+// 
+
+package edu.wlu.cs.levy.CG;
+
+import java.util.*;
+
+
+class NearestNeighborList<T> {
+
+    static class NeighborEntry<T> implements Comparable<NeighborEntry<T>> {
+        final T data;
+        final double value;
+
+        public NeighborEntry(final T data,
+                             final double value) {
+            this.data = data;
+            this.value = value;
+        }
+
+        public int compareTo(NeighborEntry<T> t) {
+            // note that the positions are reversed!
+            return Double.compare(t.value, this.value);
+        }
+    };
+
+    java.util.PriorityQueue<NeighborEntry<T>> m_Queue;
+    int m_Capacity = 0;
+
+    // constructor
+    public NearestNeighborList(int capacity) {
+        m_Capacity = capacity;
+        m_Queue = new java.util.PriorityQueue<NeighborEntry<T>>(m_Capacity);
+    }
+
+    public double getMaxPriority() {
+        NeighborEntry p = m_Queue.peek();
+        return (p == null) ? Double.POSITIVE_INFINITY : p.value ;
+    }
+
+    public boolean insert(T object, double priority) {
+        if (isCapacityReached()) {
+            if (priority > getMaxPriority()) {
+                // do not insert - all elements in queue have lower priority
+                return false;
+            }
+            m_Queue.add(new NeighborEntry<T>(object, priority));
+            // remove object with highest priority
+            m_Queue.poll();
+        } else {
+            m_Queue.add(new NeighborEntry<T>(object, priority));
+        }
+        return true;
+    }
+
+    public boolean isCapacityReached() {
+        return m_Queue.size()>=m_Capacity;
+    }
+
+    public T getHighest() {
+        NeighborEntry<T> p = m_Queue.peek();
+        return (p == null) ?  null : p.data ;
+    }
+
+    public boolean isEmpty() {
+        return m_Queue.size()==0;
+    }
+
+    public int getSize() {
+        return m_Queue.size();
+    }
+
+    public T removeHighest() {
+        // remove object with highest priority
+        NeighborEntry<T> p = m_Queue.poll();
+        return (p == null) ?  null : p.data ;
+    }
+}

+ 64 - 0
quickProgs/src/hhn/Pfade.java

@@ -0,0 +1,64 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package hhn;
+
+import java.math.BigInteger;
+import java.util.Arrays;
+
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class Pfade
+{
+    public static void main(String[] args)
+    {
+        System.out.println(calculatePaths(11));
+    }
+    
+    public static BigInteger calculatePaths(int n)
+    {
+        BigInteger[][] table=new BigInteger[2][];
+        table[n%2]=new BigInteger[n+1];
+        Arrays.fill(table[n%2], BigInteger.ZERO);
+        table[n%2][0]=BigInteger.ONE;
+        for(int x=n-1;x>=0;x--)//von rechts nach links scannen
+        {
+            //System.out.println("X="+x);
+            BigInteger[] tableadd=new BigInteger[x+1];
+            Arrays.fill(tableadd, BigInteger.ZERO);
+            BigInteger[] tabletouse = table[(x+1)%2];
+            for(int y=0;y<=x;y++)//hochwärts scannen
+            {
+                if(y-4>=0)
+                {
+                   // System.out.println("-4");
+                    tableadd[y]=tableadd[y].add(tabletouse[y-4]);
+                }
+                if(y-1>=0)
+                {
+                    //System.out.println("-1");
+                    tableadd[y]=tableadd[y].add(tabletouse[y-1]);
+                }
+                //System.out.println("+-0");
+                tableadd[y]=tableadd[y].add(tabletouse[y]);
+                if(y+1<=x+1)
+                {
+                    //System.out.println("+1");
+                    tableadd[y]=tableadd[y].add(tabletouse[y+1]);
+                }
+                if(y+4<=x+1)
+                {
+                    //System.out.println("+4");
+                    tableadd[y]=tableadd[y].add(tabletouse[y+4]);
+                }
+            }
+            table[x%2]=tableadd;
+        }
+        return table[0][0];
+    }
+}

+ 68 - 0
quickProgs/src/hhn/PfadeMünzen.java

@@ -0,0 +1,68 @@
+package hhn;
+
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+
+import java.math.BigInteger;
+import java.util.Arrays;
+
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class PfadeMünzen
+{
+    public static void main(String[] args)
+    {
+        System.out.println(calculatePaths(524288/4));
+    }
+    
+    private static final int[] cvals={3, 5, 7, 101};
+    
+    
+    public static BigInteger calculatePaths(int n)
+    {
+        
+        //speichertabelle, aktuell und letzte
+        BigInteger[][] table=new BigInteger[2][];//eine seite initialisieren mit leerem array (n modulo 2, gibt entweder 0 oder 1, nächster lauf wechselt
+        table[n%2]=new BigInteger[n+1]; 
+        Arrays.fill(table[n%2], BigInteger.ZERO);//array füllen
+        table[n%2][0]=BigInteger.ONE;//eine zelle auf 1 seeded, da von def vorherigen reihe je 1 pfad hingeht // magie enthalten
+        for(int x=n-1;x>=0;x--)//von rechts nach links scannen
+        {
+            if(x%1000==0)
+            {
+                System.out.println(((float)x/(float)n)*100);
+            }
+            //System.out.println("X="+x);
+            BigInteger[] tableadd=new BigInteger[n+1];//tabellenspalte für neue werte
+            Arrays.fill(tableadd, BigInteger.ZERO);//füllen
+            BigInteger[] tabletouse = table[(x+1)%2];//tabellenspalte für spalte 1 rechts rausziehen
+            for(int y=0;y<=n;y++)//hochwärts scannen
+            {
+                for (int coinvalue : cvals)
+                {
+                    //tableadd[y]=tableadd[y].add(tabletouse[y-4]);
+                    if(y-coinvalue>=0)
+                    {
+                        tableadd[y]=tableadd[y].add(tabletouse[y-coinvalue]);
+                        //System.out.println(tabletouse[y-coinvalue]+"eingefügt auf ("+x+"|"+y+") @"+coinvalue);  //debuglogging
+                    }
+                }
+                if (y == n)
+                {
+                    tableadd[y] = tableadd[y].add(tabletouse[y]);
+                    //System.out.println(tabletouse[y] + "flachgegriffen auf  (" + x + "|" + y + ")");//Debuglogging
+                }
+            }
+            table[x%2]=tableadd;
+            //tabelle zurücknudeln
+        }
+        //rlement an 0|0 enthält das ergebnis
+        return table[0][n];
+    }
+}

+ 69 - 0
quickProgs/src/hhn/Pfadevierschritt.java

@@ -0,0 +1,69 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+
+import java.math.BigInteger;
+import java.util.Arrays;
+
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class Pfadevierschritt
+{
+    public static void main(String[] args)
+    {
+        System.out.println(calculatePaths(11));
+    }
+    
+     public static BigInteger calculatePaths(int n)
+    {
+        //speichertabelle, aktuell und letzte
+        BigInteger[][] table=new BigInteger[2][];//eine seite initialisieren mit leerem array (n modulo 2, gibt entweder 0 oder 1, nächster lauf wechselt
+        table[n%2]=new BigInteger[n+1]; 
+        Arrays.fill(table[n%2], BigInteger.ZERO);//array füllen
+        table[n%2][0]=BigInteger.ONE;//eine zelle auf 1 seeded, da von def vorherigen reihe je 1 pfad hingeht // magie enthalten
+        for(int x=n-1;x>=0;x--)//von rechts nach links scannen
+        {
+            //System.out.println("X="+x);
+            BigInteger[] tableadd=new BigInteger[x+1];//tabellenspalte für neue werte
+            Arrays.fill(tableadd, BigInteger.ZERO);//füllen
+            BigInteger[] tabletouse = table[(x+1)%2];//tabellenspalte für spalte 1 rechts rausziehen
+            for(int y=0;y<=x;y++)//hochwärts scannen
+            {
+                
+                
+                //arithmetik um innerhalb der grenzen zu bleiben
+                if(y-4>=0)
+                {
+                   // System.out.println("-4");
+                    tableadd[y]=tableadd[y].add(tabletouse[y-4]);
+                }
+                if(y-1>=0)
+                {
+                    //System.out.println("-1");
+                    tableadd[y]=tableadd[y].add(tabletouse[y-1]);
+                }
+                //System.out.println("+-0");
+                tableadd[y]=tableadd[y].add(tabletouse[y]);
+                if(y+1<=x+1)
+                {
+                    //System.out.println("+1");
+                    tableadd[y]=tableadd[y].add(tabletouse[y+1]);
+                }
+                if(y+4<=x+1)
+                {
+                    //System.out.println("+4");
+                    tableadd[y]=tableadd[y].add(tabletouse[y+4]);
+                }
+            }
+            table[x%2]=tableadd;
+            //tabelle zurücknudeln
+        }
+        //rlement an 0|0 enthält das ergebnis
+        return table[0][0];
+    }
+}

+ 81 - 0
quickProgs/src/pv/UI.form

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
+  <Properties>
+    <Property name="defaultCloseOperation" type="int" value="3"/>
+  </Properties>
+  <SyntheticProperties>
+    <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+    <SyntheticProperty name="generateCenter" type="boolean" value="false"/>
+  </SyntheticProperties>
+  <AuxValues>
+    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="0" attributes="0">
+              <EmptySpace min="-2" pref="30" max="-2" attributes="0"/>
+              <Component id="jScrollPane1" min="-2" pref="816" max="-2" attributes="0"/>
+              <EmptySpace pref="102" max="32767" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="0" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Component id="jScrollPane1" min="-2" pref="530" max="-2" attributes="0"/>
+              <EmptySpace pref="27" max="32767" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+  <SubComponents>
+    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+      <AuxValues>
+        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+      </AuxValues>
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+      <SubComponents>
+        <Component class="javax.swing.JTable" name="tblT">
+          <Properties>
+            <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
+              <Table columnCount="2" rowCount="1">
+                <Column editable="true" title="URL" type="java.lang.String"/>
+                <Column editable="true" title="Zeitpunkt" type="java.lang.String"/>
+              </Table>
+            </Property>
+            <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor">
+              <TableColumnModel selectionModel="0">
+                <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
+                  <Title/>
+                  <Editor/>
+                  <Renderer/>
+                </Column>
+                <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
+                  <Title/>
+                  <Editor/>
+                  <Renderer/>
+                </Column>
+              </TableColumnModel>
+            </Property>
+            <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor">
+              <TableHeader reorderingAllowed="true" resizingAllowed="true"/>
+            </Property>
+          </Properties>
+        </Component>
+      </SubComponents>
+    </Container>
+  </SubComponents>
+</Form>

+ 188 - 0
quickProgs/src/pv/UI.java

@@ -0,0 +1,188 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package pv;
+
+import de.nplusc.izc.tools.IOtools.DBWriter;
+import de.nplusc.izc.tools.IOtools.FileTK;
+import java.util.ArrayList;
+import java.util.List;
+import javax.swing.table.DefaultTableModel;
+
+/**
+ *
+ * @author LH
+ */
+public class UI extends javax.swing.JFrame
+{
+
+    /**
+     * Creates new form UI
+     */
+    public UI()
+    {
+        initComponents();
+        
+        String fp = "D:\\src\\ff-history2txt\\in.sqlite";
+        String fp2="D:\\src\\ff-history2txt\\out.txt";
+        DBWriter dbw = new DBWriter("", fp, "", "", DBWriter.DBTYPE_SQLite);
+        //String[][] items = dbw.queryTable("SELECT url , id FROM moz_places");
+        String[][] idmap = dbw.queryTable("SELECT place_id , visit_date from moz_historyvisits  ORDER BY visit_date");
+       // List<String> l = new ArrayList<>();
+        StringBuffer sb = new StringBuffer();
+         int i=0;
+         int j=0;
+         int k=0;
+         boolean c = false;
+      //   if(idmap.length>50000){c=true;
+      //   System.out.println("chunkered");
+      //   }
+        for (String[] ue : idmap)
+        {
+            String date = (new java.text.SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(new java.util.Date (Long.valueOf(ue[1])/1000)));
+            String datafield=dbw.querySingleCell("SELECT url FROM moz_places where id = "+ue[0]);
+            
+            //if(datafield.contains("trafficholder.com"))
+            {
+            
+            ((DefaultTableModel)tblT.getModel()).setValueAt(datafield, i, 0);
+            ((DefaultTableModel)tblT.getModel()).setValueAt(date, i, 1);
+            ((DefaultTableModel)tblT.getModel()).addRow(new String[]{""});
+            i++;
+            
+            sb.append(date).append("|").append(datafield).append("\n");
+            }
+            j++;
+            System.out.println(j+"/"+idmap.length);
+        /*    if(c)
+            {
+                if(i%50000==0&&i!=0)
+                {
+                    FileTK.writeFile(sb.toString(), fp2+"chunk_"+k);
+                    sb=new StringBuffer();
+                    k++;
+                }
+            }
+            */
+        }
+        
+       if(!c)
+       {
+           FileTK.writeFile(sb.toString(), fp2);
+       }
+        //dbw.closeConn();
+    }
+
+    /**
+     * This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents()
+    {
+
+        jScrollPane1 = new javax.swing.JScrollPane();
+        tblT = new javax.swing.JTable();
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+
+        tblT.setModel(new javax.swing.table.DefaultTableModel(
+            new Object [][]
+            {
+                {null, null}
+            },
+            new String []
+            {
+                "URL", "Zeitpunkt"
+            }
+        )
+        {
+            Class[] types = new Class []
+            {
+                java.lang.String.class, java.lang.String.class
+            };
+
+            public Class getColumnClass(int columnIndex)
+            {
+                return types [columnIndex];
+            }
+        });
+        jScrollPane1.setViewportView(tblT);
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addGap(30, 30, 30)
+                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 816, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addContainerGap(102, Short.MAX_VALUE))
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 530, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addContainerGap(27, Short.MAX_VALUE))
+        );
+
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String args[])
+    {
+        /* Set the Nimbus look and feel */
+        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
+        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
+         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
+         */
+        try
+        {
+            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
+            {
+                if ("Nimbus".equals(info.getName()))
+                {
+                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
+                    break;
+                }
+            }
+        }
+        catch (ClassNotFoundException ex)
+        {
+            java.util.logging.Logger.getLogger(UI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (InstantiationException ex)
+        {
+            java.util.logging.Logger.getLogger(UI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (IllegalAccessException ex)
+        {
+            java.util.logging.Logger.getLogger(UI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (javax.swing.UnsupportedLookAndFeelException ex)
+        {
+            java.util.logging.Logger.getLogger(UI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        //</editor-fold>
+
+        /* Create and display the form */
+        java.awt.EventQueue.invokeLater(new Runnable()
+        {
+            public void run()
+            {
+                new UI().setVisible(true);
+            }
+        });
+    }
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JTable tblT;
+    // End of variables declaration//GEN-END:variables
+}

+ 372 - 0
quickProgs/src/qucikprogs/Fickdich.form

@@ -0,0 +1,372 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+  <Properties>
+    <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+      <Dimension value="[32767, 10]"/>
+    </Property>
+  </Properties>
+  <AuxValues>
+    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="0" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Component id="lblPostleitzahl" alignment="0" min="-2" pref="98" max="-2" attributes="0"/>
+                  <Component id="lblOrt" alignment="0" min="-2" pref="98" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Component id="txfOrt" max="32767" attributes="0"/>
+                  <Component id="txfPostleitzahl" max="32767" attributes="0"/>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+          <Group type="102" attributes="0">
+              <EmptySpace min="-2" pref="19" max="-2" attributes="0"/>
+              <Component id="lblPicture" min="-2" pref="134" max="-2" attributes="0"/>
+              <EmptySpace max="32767" attributes="0"/>
+              <Component id="btnHCnageIMG" min="-2" pref="140" max="-2" attributes="0"/>
+              <EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
+          </Group>
+          <Group type="102" alignment="0" attributes="0">
+              <Group type="103" groupAlignment="1" attributes="0">
+                  <Component id="jLabel3" min="-2" max="-2" attributes="0"/>
+                  <Group type="103" groupAlignment="0" attributes="0">
+                      <Group type="103" groupAlignment="0" max="-2" attributes="0">
+                          <Group type="102" attributes="0">
+                              <EmptySpace min="-2" pref="85" max="-2" attributes="0"/>
+                              <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
+                          </Group>
+                          <Group type="102" alignment="1" attributes="0">
+                              <EmptySpace max="32767" attributes="0"/>
+                              <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
+                          </Group>
+                          <Group type="103" groupAlignment="0" attributes="0">
+                              <Group type="103" groupAlignment="0" attributes="0">
+                                  <Group type="102" attributes="0">
+                                      <EmptySpace min="-2" pref="36" max="-2" attributes="0"/>
+                                      <Component id="lblAddresse" min="-2" pref="72" max="-2" attributes="0"/>
+                                  </Group>
+                                  <Component id="lblnachname" alignment="1" min="-2" pref="72" max="-2" attributes="0"/>
+                              </Group>
+                              <Group type="102" alignment="1" attributes="0">
+                                  <EmptySpace max="-2" attributes="0"/>
+                                  <Component id="lblVorname" min="-2" pref="72" max="-2" attributes="0"/>
+                              </Group>
+                          </Group>
+                      </Group>
+                      <Group type="102" attributes="0">
+                          <EmptySpace max="-2" attributes="0"/>
+                          <Group type="103" groupAlignment="0" attributes="0">
+                              <Component id="lbltelNr" min="-2" pref="98" max="-2" attributes="0"/>
+                              <Component id="lblEmail" alignment="0" min="-2" pref="98" max="-2" attributes="0"/>
+                          </Group>
+                      </Group>
+                  </Group>
+              </Group>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="102" alignment="0" attributes="0">
+                      <EmptySpace min="-2" pref="28" max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="0" attributes="0">
+                          <Component id="txfTelNr" alignment="1" max="32767" attributes="0"/>
+                          <Component id="txfLand" max="32767" attributes="0"/>
+                      </Group>
+                  </Group>
+                  <Group type="102" alignment="0" attributes="0">
+                      <EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="0" attributes="0">
+                          <Component id="txfNachname" alignment="0" max="32767" attributes="0"/>
+                          <Component id="txfStraße" alignment="0" max="32767" attributes="0"/>
+                          <Component id="txfEmail" alignment="0" max="32767" attributes="0"/>
+                          <Component id="txfVorname" alignment="0" max="32767" attributes="0"/>
+                          <Component id="txfHausnummer" alignment="1" max="32767" attributes="0"/>
+                      </Group>
+                  </Group>
+                  <Group type="102" alignment="0" attributes="0">
+                      <EmptySpace min="-2" pref="25" max="-2" attributes="0"/>
+                      <Component id="jLabel6" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                      <Component id="txfGeburtsdatum" min="-2" pref="32" max="-2" attributes="0"/>
+                      <EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
+                      <Component id="jLabel4" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Component id="txfMonat" min="-2" pref="29" max="-2" attributes="0"/>
+                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                      <Component id="jLabel5" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                      <Component id="txfjahr" min="-2" pref="49" max="-2" attributes="0"/>
+                      <EmptySpace min="0" pref="12" max="32767" attributes="0"/>
+                  </Group>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+          <Group type="102" alignment="1" attributes="0">
+              <EmptySpace max="32767" attributes="0"/>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="102" attributes="0">
+                      <Component id="btnSpeichern" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                      <Component id="btnZurucksetzen" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace type="separate" max="-2" attributes="0"/>
+                  </Group>
+                  <Group type="102" alignment="1" attributes="0">
+                      <Component id="cbxAddToGroup" min="-2" pref="154" max="-2" attributes="0"/>
+                      <EmptySpace min="-2" pref="29" max="-2" attributes="0"/>
+                  </Group>
+              </Group>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Component id="btnZuruck" min="-2" max="-2" attributes="0"/>
+                  <Component id="addToGroup" min="-2" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace min="-2" pref="31" max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" alignment="0" attributes="0">
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="102" attributes="0">
+                      <EmptySpace min="-2" pref="135" max="-2" attributes="0"/>
+                      <Component id="btnHCnageIMG" min="-2" max="-2" attributes="0"/>
+                  </Group>
+                  <Group type="102" alignment="1" attributes="0">
+                      <EmptySpace min="-2" pref="21" max="-2" attributes="0"/>
+                      <Component id="lblPicture" min="-2" pref="137" max="-2" attributes="0"/>
+                  </Group>
+              </Group>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="102" alignment="0" attributes="0">
+                      <EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="3" attributes="0">
+                          <Component id="txfVorname" alignment="3" min="-2" max="-2" attributes="0"/>
+                          <Component id="lblVorname" alignment="3" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="3" attributes="0">
+                          <Component id="lblnachname" alignment="3" min="-2" max="-2" attributes="0"/>
+                          <Component id="txfNachname" alignment="3" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="3" attributes="0">
+                          <Component id="lblAddresse" alignment="3" min="-2" max="-2" attributes="0"/>
+                          <Component id="txfStraße" alignment="3" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="3" attributes="0">
+                          <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
+                          <Component id="txfHausnummer" alignment="3" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                      <EmptySpace min="-2" pref="13" max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="0" attributes="0">
+                          <Component id="txfPostleitzahl" alignment="0" min="-2" max="-2" attributes="0"/>
+                          <Component id="lblPostleitzahl" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                      <EmptySpace type="unrelated" max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="3" attributes="0">
+                          <Component id="lblOrt" alignment="3" min="-2" max="-2" attributes="0"/>
+                          <Component id="txfOrt" alignment="3" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                  </Group>
+                  <Group type="102" alignment="0" attributes="0">
+                      <EmptySpace min="-2" pref="222" max="-2" attributes="0"/>
+                      <Group type="103" groupAlignment="3" attributes="0">
+                          <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
+                          <Component id="txfLand" alignment="3" min="-2" max="-2" attributes="0"/>
+                      </Group>
+                  </Group>
+              </Group>
+              <EmptySpace type="unrelated" max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="3" attributes="0">
+                  <Component id="txfTelNr" alignment="3" min="-2" pref="22" max="-2" attributes="0"/>
+                  <Component id="lbltelNr" alignment="3" min="-2" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace min="-2" max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="3" attributes="0">
+                  <Component id="txfEmail" alignment="3" min="-2" max="-2" attributes="0"/>
+                  <Component id="lblEmail" alignment="3" min="-2" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace type="unrelated" max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="103" groupAlignment="3" attributes="0">
+                      <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <Component id="txfGeburtsdatum" alignment="3" min="-2" max="-2" attributes="0"/>
+                  </Group>
+                  <Group type="103" alignment="0" groupAlignment="3" attributes="0">
+                      <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <Component id="txfjahr" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <Component id="txfMonat" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
+                  </Group>
+              </Group>
+              <EmptySpace min="-2" pref="21" max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="3" attributes="0">
+                  <Component id="cbxAddToGroup" alignment="3" min="-2" max="-2" attributes="0"/>
+                  <Component id="addToGroup" alignment="3" min="-2" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace type="separate" max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="3" attributes="0">
+                  <Component id="btnSpeichern" alignment="3" min="-2" max="-2" attributes="0"/>
+                  <Component id="btnZurucksetzen" alignment="3" min="-2" max="-2" attributes="0"/>
+                  <Component id="btnZuruck" alignment="3" min="-2" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+  <SubComponents>
+    <Component class="javax.swing.JButton" name="btnHCnageIMG">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Bild &#xe4;ndern"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JTextField" name="txfVorname">
+    </Component>
+    <Component class="javax.swing.JLabel" name="lblVorname">
+      <Properties>
+        <Property name="horizontalAlignment" type="int" value="4"/>
+        <Property name="text" type="java.lang.String" value="Vorname:"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="lblnachname">
+      <Properties>
+        <Property name="horizontalAlignment" type="int" value="4"/>
+        <Property name="text" type="java.lang.String" value="Nachname:"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JTextField" name="txfNachname">
+    </Component>
+    <Component class="javax.swing.JLabel" name="lblAddresse">
+      <Properties>
+        <Property name="horizontalAlignment" type="int" value="4"/>
+        <Property name="text" type="java.lang.String" value="Stra&#xdf;e:"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JTextField" name="txfStra&#xdf;e">
+    </Component>
+    <Component class="javax.swing.JLabel" name="lblPostleitzahl">
+      <Properties>
+        <Property name="horizontalAlignment" type="int" value="4"/>
+        <Property name="text" type="java.lang.String" value="Postleitzahl:"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="lblOrt">
+      <Properties>
+        <Property name="horizontalAlignment" type="int" value="4"/>
+        <Property name="text" type="java.lang.String" value="Ort:"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="lbltelNr">
+      <Properties>
+        <Property name="horizontalAlignment" type="int" value="4"/>
+        <Property name="text" type="java.lang.String" value="Telefonnummer:"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="lblEmail">
+      <Properties>
+        <Property name="horizontalAlignment" type="int" value="4"/>
+        <Property name="text" type="java.lang.String" value="Email:"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JButton" name="btnSpeichern">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Speichern"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JButton" name="btnZurucksetzen">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Zur&#xfc;cksetzen"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JButton" name="btnZuruck">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Zur&#xfc;ck"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JTextField" name="txfPostleitzahl">
+    </Component>
+    <Component class="javax.swing.JTextField" name="txfOrt">
+    </Component>
+    <Component class="javax.swing.JTextField" name="txfTelNr">
+    </Component>
+    <Component class="javax.swing.JTextField" name="txfEmail">
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel1">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Hausnummer"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JTextField" name="txfHausnummer">
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel2">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Land"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JTextField" name="txfLand">
+    </Component>
+    <Component class="javax.swing.JLabel" name="lblPicture">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="BILD @Thomas"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JComboBox" name="cbxAddToGroup">
+      <Properties>
+        <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
+          <StringArray count="4">
+            <StringItem index="0" value="Item 1"/>
+            <StringItem index="1" value="Item 2"/>
+            <StringItem index="2" value="Item 3"/>
+            <StringItem index="3" value="Item 4"/>
+          </StringArray>
+        </Property>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JButton" name="addToGroup">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Zur Gruppe adden"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel3">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Geburtsdatum"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JTextField" name="txfGeburtsdatum">
+    </Component>
+    <Component class="javax.swing.JTextField" name="txfMonat">
+    </Component>
+    <Component class="javax.swing.JTextField" name="txfjahr">
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel4">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Monat:"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel5">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Jahr:"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel6">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Tag"/>
+      </Properties>
+    </Component>
+  </SubComponents>
+</Form>

+ 318 - 0
quickProgs/src/qucikprogs/Fickdich.java

@@ -0,0 +1,318 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package qucikprogs;
+
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class Fickdich extends javax.swing.JPanel
+{
+
+    /**
+     * Creates new form Fickdich
+     */
+    public Fickdich()
+    {
+        initComponents();
+    }
+
+    /**
+     * This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents()
+    {
+
+        btnHCnageIMG = new javax.swing.JButton();
+        txfVorname = new javax.swing.JTextField();
+        lblVorname = new javax.swing.JLabel();
+        lblnachname = new javax.swing.JLabel();
+        txfNachname = new javax.swing.JTextField();
+        lblAddresse = new javax.swing.JLabel();
+        txfStraße = new javax.swing.JTextField();
+        lblPostleitzahl = new javax.swing.JLabel();
+        lblOrt = new javax.swing.JLabel();
+        lbltelNr = new javax.swing.JLabel();
+        lblEmail = new javax.swing.JLabel();
+        btnSpeichern = new javax.swing.JButton();
+        btnZurucksetzen = new javax.swing.JButton();
+        btnZuruck = new javax.swing.JButton();
+        txfPostleitzahl = new javax.swing.JTextField();
+        txfOrt = new javax.swing.JTextField();
+        txfTelNr = new javax.swing.JTextField();
+        txfEmail = new javax.swing.JTextField();
+        jLabel1 = new javax.swing.JLabel();
+        txfHausnummer = new javax.swing.JTextField();
+        jLabel2 = new javax.swing.JLabel();
+        txfLand = new javax.swing.JTextField();
+        lblPicture = new javax.swing.JLabel();
+        cbxAddToGroup = new javax.swing.JComboBox();
+        addToGroup = new javax.swing.JButton();
+        jLabel3 = new javax.swing.JLabel();
+        txfGeburtsdatum = new javax.swing.JTextField();
+        txfMonat = new javax.swing.JTextField();
+        txfjahr = new javax.swing.JTextField();
+        jLabel4 = new javax.swing.JLabel();
+        jLabel5 = new javax.swing.JLabel();
+        jLabel6 = new javax.swing.JLabel();
+
+        setMaximumSize(new java.awt.Dimension(32767, 10));
+
+        btnHCnageIMG.setText("Bild ändern");
+
+        lblVorname.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+        lblVorname.setText("Vorname:");
+
+        lblnachname.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+        lblnachname.setText("Nachname:");
+
+        lblAddresse.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+        lblAddresse.setText("Straße:");
+
+        lblPostleitzahl.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+        lblPostleitzahl.setText("Postleitzahl:");
+
+        lblOrt.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+        lblOrt.setText("Ort:");
+
+        lbltelNr.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+        lbltelNr.setText("Telefonnummer:");
+
+        lblEmail.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+        lblEmail.setText("Email:");
+
+        btnSpeichern.setText("Speichern");
+
+        btnZurucksetzen.setText("Zurücksetzen");
+
+        btnZuruck.setText("Zurück");
+
+        jLabel1.setText("Hausnummer");
+
+        jLabel2.setText("Land");
+
+        lblPicture.setText("BILD @Thomas");
+
+        cbxAddToGroup.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
+
+        addToGroup.setText("Zur Gruppe adden");
+
+        jLabel3.setText("Geburtsdatum");
+
+        jLabel4.setText("Monat:");
+
+        jLabel5.setText("Jahr:");
+
+        jLabel6.setText("Tag");
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+        this.setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addComponent(lblPostleitzahl, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(lblOrt, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addGap(28, 28, 28)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addComponent(txfOrt)
+                    .addComponent(txfPostleitzahl))
+                .addContainerGap())
+            .addGroup(layout.createSequentialGroup()
+                .addGap(19, 19, 19)
+                .addComponent(lblPicture, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                .addComponent(btnHCnageIMG, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addGap(28, 28, 28))
+            .addGroup(layout.createSequentialGroup()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                    .addComponent(jLabel3)
+                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+                            .addGroup(layout.createSequentialGroup()
+                                .addGap(85, 85, 85)
+                                .addComponent(jLabel2))
+                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                                .addComponent(jLabel1))
+                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                    .addGroup(layout.createSequentialGroup()
+                                        .addGap(36, 36, 36)
+                                        .addComponent(lblAddresse, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))
+                                    .addComponent(lblnachname, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))
+                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                                    .addContainerGap()
+                                    .addComponent(lblVorname, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))))
+                        .addGroup(layout.createSequentialGroup()
+                            .addContainerGap()
+                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                .addComponent(lbltelNr, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                .addComponent(lblEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)))))
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(28, 28, 28)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(txfTelNr, javax.swing.GroupLayout.Alignment.TRAILING)
+                            .addComponent(txfLand)))
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(29, 29, 29)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(txfNachname)
+                            .addComponent(txfStraße)
+                            .addComponent(txfEmail)
+                            .addComponent(txfVorname)
+                            .addComponent(txfHausnummer, javax.swing.GroupLayout.Alignment.TRAILING)))
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(25, 25, 25)
+                        .addComponent(jLabel6)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addComponent(txfGeburtsdatum, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addGap(18, 18, 18)
+                        .addComponent(jLabel4)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(txfMonat, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addComponent(jLabel5)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addComponent(txfjahr, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addGap(0, 12, Short.MAX_VALUE)))
+                .addContainerGap())
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addComponent(btnSpeichern)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addComponent(btnZurucksetzen)
+                        .addGap(18, 18, 18))
+                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                        .addComponent(cbxAddToGroup, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addGap(29, 29, 29)))
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addComponent(btnZuruck)
+                    .addComponent(addToGroup))
+                .addGap(31, 31, 31))
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(135, 135, 135)
+                        .addComponent(btnHCnageIMG))
+                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                        .addGap(21, 21, 21)
+                        .addComponent(lblPicture, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(18, 18, 18)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                            .addComponent(txfVorname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                            .addComponent(lblVorname))
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                            .addComponent(lblnachname)
+                            .addComponent(txfNachname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                            .addComponent(lblAddresse)
+                            .addComponent(txfStraße, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                            .addComponent(jLabel1)
+                            .addComponent(txfHausnummer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                        .addGap(13, 13, 13)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(txfPostleitzahl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                            .addComponent(lblPostleitzahl))
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                            .addComponent(lblOrt)
+                            .addComponent(txfOrt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(222, 222, 222)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                            .addComponent(jLabel2)
+                            .addComponent(txfLand, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(txfTelNr, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(lbltelNr))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(txfEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(lblEmail))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                        .addComponent(jLabel3)
+                        .addComponent(jLabel6)
+                        .addComponent(txfGeburtsdatum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                        .addComponent(jLabel5)
+                        .addComponent(txfjahr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addComponent(txfMonat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addComponent(jLabel4)))
+                .addGap(21, 21, 21)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(cbxAddToGroup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(addToGroup))
+                .addGap(18, 18, 18)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(btnSpeichern)
+                    .addComponent(btnZurucksetzen)
+                    .addComponent(btnZuruck))
+                .addContainerGap())
+        );
+    }// </editor-fold>//GEN-END:initComponents
+
+    
+    
+    
+    
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JButton addToGroup;
+    private javax.swing.JButton btnHCnageIMG;
+    private javax.swing.JButton btnSpeichern;
+    private javax.swing.JButton btnZuruck;
+    private javax.swing.JButton btnZurucksetzen;
+    private javax.swing.JComboBox cbxAddToGroup;
+    private javax.swing.JLabel jLabel1;
+    private javax.swing.JLabel jLabel2;
+    private javax.swing.JLabel jLabel3;
+    private javax.swing.JLabel jLabel4;
+    private javax.swing.JLabel jLabel5;
+    private javax.swing.JLabel jLabel6;
+    private javax.swing.JLabel lblAddresse;
+    private javax.swing.JLabel lblEmail;
+    private javax.swing.JLabel lblOrt;
+    private javax.swing.JLabel lblPicture;
+    private javax.swing.JLabel lblPostleitzahl;
+    private javax.swing.JLabel lblVorname;
+    private javax.swing.JLabel lblnachname;
+    private javax.swing.JLabel lbltelNr;
+    private javax.swing.JTextField txfEmail;
+    private javax.swing.JTextField txfGeburtsdatum;
+    private javax.swing.JTextField txfHausnummer;
+    private javax.swing.JTextField txfLand;
+    private javax.swing.JTextField txfMonat;
+    private javax.swing.JTextField txfNachname;
+    private javax.swing.JTextField txfOrt;
+    private javax.swing.JTextField txfPostleitzahl;
+    private javax.swing.JTextField txfStraße;
+    private javax.swing.JTextField txfTelNr;
+    private javax.swing.JTextField txfVorname;
+    private javax.swing.JTextField txfjahr;
+    // End of variables declaration//GEN-END:variables
+}

+ 37 - 0
quickProgs/src/qucikprogs/GrayifierLSE.java

@@ -0,0 +1,37 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package qucikprogs;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import javax.imageio.ImageIO;
+
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class GrayifierLSE
+{
+    public static void main(String[] args) throws Exception
+    {
+        BufferedImage bi = ImageIO.read(new File("D:\\picts\\fullrgb\\art_gen++\\8192x2048\\hue0_one\\s=9263\\result00999.png"));
+        while(bi.getHeight()<1);
+        int x=bi.getWidth();
+        int y=bi.getHeight();
+        BufferedImage out = new BufferedImage(x, y, BufferedImage.TYPE_BYTE_GRAY);
+        for (int i = 0; i < y; i++)
+        {
+            for (int j = 0; j < x; j++)
+            {
+                out.setRGB(j, i, bi.getRGB(j, i)/256*256);
+            }
+            System.out.println(i);
+            
+        }
+        ImageIO.write(out, "png", new File("D:\\picts\\fullrgb\\art_gen++\\8192x2048\\hue0_one\\s=9263\\crunchy.png"));
+    }
+}

+ 21 - 0
quickProgs/src/qucikprogs/Overflower.java

@@ -0,0 +1,21 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package qucikprogs;
+
+import org.yaml.snakeyaml.Yaml;
+
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class Overflower
+{
+    public static void main(String[] args)
+    {
+        System.out.println(new Yaml().dump(new java.awt.Point()));
+    }
+}

+ 24 - 0
quickProgs/src/qucikprogs/QucikProgs.java

@@ -0,0 +1,24 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package qucikprogs;
+
+/**
+ *
+ * @author LH
+ */
+public class QucikProgs
+{
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String[] args)
+    {
+        int year=104;
+        
+        boolean is_leap=(!(year%100==0&& !(year%400==0))&&year%4==0);
+        System.out.println(is_leap);
+    }
+}

+ 26 - 0
quickProgs/src/qucikprogs/unAAX.java

@@ -0,0 +1,26 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package qucikprogs;
+
+import de.nplusc.izc.tools.IOtools.FileTK;
+import de.nplusc.izc.tools.baseTools.Tools;
+import javax.swing.JTextArea;
+
+/**
+ *
+ * @author LH
+ */
+public class unAAX
+{
+    public static void main(String[] args)
+    {
+        String[] lst = FileTK.getDirectoryContent("C:\\Users\\LH\\Desktop\\         \\#SG\\Sound\\to\\Synth", true);
+        for (String f : lst)
+        {
+            Tools.runSingleCmd(true, true, true, true, new JTextArea(),System.out, "C:\\Users\\LH\\Desktop\\         \\#SG\\Sound\\to\\Synth", 
+                   true, "C:\\Users\\LH\\Desktop\\         \\#SG\\Sound\\to\\test.exe","-o",f+".wav",f); 
+        }
+    }
+}