http://Bj83.de

Exception Handling in Java

public void FunctionName() throws Exception{ throw new Exception(); } throws gibt exception an die aufrufende funktion weiter UnexpectedException = unerwartete Exception Abfangen auch innerhalb der verarbeitung moeglich: try{ throw new UnexpectedException(); }catch(UnexpectedException ex){ ex.PrintStackTrace(); } Unexpected nur mit Try-Catch möglich!

Galaxy Note Serie als Grafik Tablet (mit dualscreens)

Apps Linux: Android: https://play.google.com/store/apps/details?id=at.bitfire.gfxtablet PC: http://rfc2822.github.io/GfxTablet/#part-1-uinput-driver Apps Windows: Android: https://play.google.com/store/apps/details?id=com.sunnysidesoft.VirtualTablet.lite PC: http://www.sunnysidesoft.com/virtualtablet/ I only tested the Linux Version, so here a short manual: – download android app and install – download pc programm from site (chmod a+x networktablet-x86_64) – run in a terminal the download pc programm (./networktablet-x86_64) – run app on smartphone If you…

Desktop App Starter

create a file with anyname.desktop [Desktop Entry] Version=1.0 Type=Application Name=DebDev.sh Comment=DebDev Exec=/home/mount_debdev.sh Icon=utilities-terminal Terminal=true StartupNotify=false GenericName=Test – Name: Text that will be displayed – Exec: script/file to run

Shell Script zum Samba (SMB) share mounten

echo “”; echo “*** Workspace from debdev ***” echo “”; if [ ! -d “/workspace” ]; then echo “/workspace dont exist, i create it…” mkdir /workspace echo “…set rights to 0777…” chmod 0777 /workspace echo “…mount debdev workspace into it.” sudo mount -t cifs //debdev/workspace /workspace -o user=nobody,password=abc else echo “Workspace Exist…” echo “…mount debdev…

VHost Konfiguration on Apache2

create directories (i use /var/www/ as base) root@dev:/var/www# mkdir sandbox root@dev:/var/www# chmod 0777 sandbox you can create a separate cgi-bin and log directory for each vhost, but i prefer one cgi-bin directory and one log directory for all vhosts. root@dev:/var# mkdir cgi-bin root@dev:/var# mkdir logs root@dev:/var# chmod 0777 cgi-bin root@dev:/var# chmod 0777 logs for a…

Samba Share einbinden von VirtualBox Images

apt-get install samba mv /etc/samba/smb.conf /etc/samba/smb.bak nano /etc/samba/smb.conf [global] workgroup = smb security = share share modes = yes guest account = mike [homes] comment = Home Directories browsable = no read only = no create mode = 0750 [images] path = /storage/vhd public = yes writable = yes comment = smb share printable =…

Bayern und das Ü

Wenn sich zwei Bayern voneinander verabschieden, fallen in der Regel für jedermann verständliche Worte wie Ciao oder Servus. Das urbayerische Pfiadi stößt in manchen Bundesländern bereits auf Abschreckung und Unverständnis. Warum aber sagen die Bayern eigentlich nicht einfach Tschüß wie überall in Deutschland? In der bayerischen Sprache gibt es den Umlaut ü gar nicht! Wie…

XML Handle mit JDom in Java

jar: http://www.jdom.org/ import java.io.File; import java.io.IOException; import java.util.*; import org.jdom2.*; import org.jdom2.input.SAXBuilder; public class xml_test { public String sFile; private SAXBuilder builder = new SAXBuilder(); private Document dXml; public xml_test() throws JDOMException, IOException { File file = new File(sFile); dXml = builder.build(file); Element elem = dXml.getRootElement(); List<Element> eXMLData = elem.getChildren(“XMLDATA”); for(int i = 0; i…

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: