Konfiguration DCHP unter Windows

17. August 2010

Der folgende Befehl exportiert die aktuellen Einstellungen vom DHCP-Server “srvdc” in die Datei “dump.txt”.

netsh dhcp server \\srvdc dump > dump.txt

XML-Datei erzeugen

05. August 2010
import org.w3c.dom.Document;
import com.sun.org.apache.xerces.internal.dom.DocumentImpl;
import org.w3c.dom.Element;
import com.sun.org.apache.xml.internal.serialize.OutputFormat;
import com.sun.org.apache.xml.internal.serialize.XMLSerializer;

Document doc = new DocumentImpl();
Element root = doc.createElement("xTree");
doc.appendChild(root);

Element e = doc.createElement("xTreeFile");
e.setAttribute("label", "label1");
e.setAttribute("type", "type1");
e.setTextContent("abc");

root.appendChild(e);

OutputFormat format = new OutputFormat(doc);
format.setIndenting(true);
format.setIndent(4);
String[] str = new String[]{"xTreeText"};
format.setCDataElements(str);
format.setNonEscapingElements(str);
OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream("C:/Temp/test.xml"), "UTF-8");
Writer output = new BufferedWriter(out);
XMLSerializer serializer = new XMLSerializer(output, format);
serializer.serialize(doc);

Textbearbeitung mit Ant

10. Juni 2010

Mit folgendem Tag werden innerhalb der JNLP-Datei die Werte für “codebase” und “main-class” ausgetauscht.

<replace dir="C:/Entwicklung/Projekt/dist">
   <include name="launch.jnlp"/>
   <replacefilter token=‘codebase="file:/C:/Entwicklung/Projekt/dist/"’ value=‘codebase="http://domain.de/p/"’/>
   <replacefilter token=‘main-class="bob.pokolm.Main"’ value=‘main-class="bob.pokolm.MainTwo"’/>
</replace>

Benutzereingabe bei Ant

10. Juni 2010

Mit dem folgenden Fragment wird ein Kennwort erfragt, ein Skript gestartet und das Kennwort als Parameter übergeben.

<target name="deploy-over-script" depends="clean,jar" description="Kopiert Projekt zum Server.">
   <input message="Kennwort:"  addproperty="my.pass" />
   <exec executable="cmd">
      <arg value="/c"/>
      <arg value="C:/Projekt/deploy_over_script.cmd"/>
      <arg value="${my.pass}"/>
   </exec>
</target>

Neural Networks

10. Juni 2010

Spielen und Simulieren

04. April 2010

The FlightGear flight simulator project is an open-source, multi-platform, cooperative flight simulator development project.

0 A.D. (pronounced “zero ey-dee”) is a free, open-source, cross-platform real-time strategy (RTS) game of ancient warfare. In short, it is a historically-based war/economy game that allows players to relive or rewrite the history of Western civilizations, focusing on the years between 500 B.C. and 500 A.D.

Arena Live is a free, open source, Quake-based massive multiplayer, first person shooter.

Nexuiz is a free open-source first person shooter that runs on Windows, Linux and OSX.

Online Image Editor

06. März 2010

Die Möglichkeiten vom Image Editor Phonix sind beeindruckend. Das Video vermittelt davon einen ersten Eindruck. Einmal gestartet fühlt sich die Anwendung wie ein Desktop-Programm an.

Attribut “userAccountControl” auswerten

21. Februar 2010

Der weitere Ablauf in einem Bash-Skript sollte davon abhängen, ob Computerkonten im Active Directory aktiviert oder deaktiviert sind. Der Status der Benutzer- und Computerkonten wird im Active Directory vom Attribut “userAccountControl” bestimmt.


typeset -i ACTRL
ACTRL=`ldapsearch -x -LLL -b "dc=firma,dc=de" -h srvdc01 \
   -D "CN=admin,CN=Users,DC=firma,DC=de" -w XXXXX -s sub \
   "(&(objectCategory=computer)(cn=$i))" userAccountControl | \
   grep -r "^userAccountControl:.*" | \
   sed ’s/^userAccountControl: //g’`
ACTRL=$ACTRL\&2
if [ $ACTRL -gt 0 ]; then