programming

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

wlyc - Linux Yamaha Receiver Webcontrol

GitHub repository
https://github.com/panticz/wlyc
Demo
http://dl.panticz.de/wlyc/wlyc3900.html

https://raw.githubusercontent.com/panticz/wlyc/master/wlyc

#!/bin/sh

URL="http://cdn1.iconfinder.com/data/icons/super-mono-basic/blue"

# get parameter
p1=`echo "$QUERY_STRING" | cut -d"&" -f1 | cut -d"=" -f2`
case "$QUERY_STRING" in
   *\&*)
   p2=`echo "$QUERY_STRING" | cut -d"&" -f2 | cut -d"=" -f2`
   ;;
esac

# parameter
# cmd 1
# cmd 2
# image url
# alt and title text
# short description
# accesskey
link() {
    echo "<div class='l'><a href='?p1=$1&p2=$2' accesskey='$6'><img src='$URL/$3' alt='$4' title='$4'>$5</a></div>"
}

# run command
/root/lyc $p1 $p2





# head
echo "Content-type: text/html"
echo ""

echo "<html>"
echo "<head>"
echo "<link href='http://dl.panticz.de/wlyc/wlyc.css' rel='stylesheet' type='text/css'>"
echo "</head>"
echo "<body>"

# print command
echo "<div class='cmd'>$p1 $p2</div>"

# control
echo "<div class='title'>Power</div>"
link power off button-cross_basic_blue.png "Power Off" OFF
link power on button-power_basic_blue.png "Power On" ON

echo "<div class='title'>Input</div>"
link input dvd disc_basic_blue.png DVD DVD
link input net music_basic_blue.png "Internet Radio" NET
link input usb usb-stick_basic_blue.png USB USB
link input pc computer_basic_blue.png PC PC

echo "<div class='title'>Volume</div>"
link mute on speaker-mute_basic_blue.png Mute "MUTE" m 
link volume down button-remove_basic_blue.png Display "VOL-" -
link volume up button-add_basic_blue.png Display "VOL+" +
link volume -70 speaker_basic_blue.png "Volume -70 dB" -70
link volume -65 speaker_basic_blue.png "Volume -65 dB" -65
link volume -60 speaker_basic_blue.png "Volume -60 dB" -60
link volume -55 speaker_basic_blue.png "Volume -55 dB" -55
link volume -50 speaker_basic_blue.png "Volume -50 dB" -50
link volume -45 speaker_basic_blue.png "Volume -45 dB" -45
link volume -40 speaker_basic_blue.png "Volume -40 dB" -40
link volume -35 speaker_basic_blue.png "Volume -35 dB" -35
link volume -30 speaker_basic_blue.png "Volume -30 dB" -30


echo "<div class='title'>OSD</div>"
link osd display desktop_basic_blue.png Display DISP
link osd menu site-map_basic_blue.png Menu MENU
link osd left navigation-left_basic_blue.png Left LEFT
link osd up navigation-up_basic_blue.png Up UP
link osd enter button-check_basic_blue.png Enter ENTER
link osd down navigation-down_basic_blue.png Down DOWN
link osd right navigation-right_basic_blue.png Right RIGHT

echo "<div class='title'>DSP</div>"
link dsp 2ch equalizer_basic_blue.png 2ch 2ch
link dsp 7ch equalizer_basic_blue.png "7ch Stereo" 7ch

echo "<div class='title'>Memory</div>"
link memory 1 inbox_basic_blue.png "Memory 1" 1
link memory 2 inbox_basic_blue.png "Memory 2" 2
link memory 3 inbox_basic_blue.png "Memory 3" 3
link memory 4 inbox_basic_blue.png "Memory 4" 4
link memory 5 inbox_basic_blue.png "Memory 5" 5
link memory 6 inbox_basic_blue.png "Memory 6" 6

echo "<div class='title'>Media</div>"
link prev "" button-rew_basic_blue.png Previous PREV
link stop "" button-stop_basic_blue.png Stop STOP
link play "" button-play_basic_blue.png Play PLAY
link next "" button-ff_basic_blue.png Next NEXT

echo "</body>"
echo "</html>"

Links
http://your.recier.ip/YamahaRemoteControl/UnitDesc.xml

Java: Add autocompletion to a (editable) JComboBox

1. Download this source code and add to your Java project:
http://www.orbital-computer.de/JComboBox/source/AutoCompletion.java

2. Add folowing code to enable autocompletion for your JComboBox:
AutoCompletion.enable(yourComboBox);

For further information about JComboBox and AutoCompletion see:
http://www.orbital-computer.de/JComboBox/
https://today.java.net/pub/a/today/2007/07/19/adding-auto-completion-to-swing-comboboxes.html

HqEclipse

You can install the plugin using the Eclipse Update Manager:

Help > Install new Software
Work with: http://hge.javaforge.com/hgeclipse

[ OK ]
check HqEclipse
[ Next > ]
[ Next > ]
check "I accept the terms of the license agreement"
[ Finish ]
 
confirm Security Warnings dialog with [ OK ]
 
Restart your Eclipse
 
 
 
https://j2m.googlecode.com/hg/
https://hgeclipse-demo.googlecode.com/hg/
 
http://code.google.com/p/hgeclipse-demo/

SmartGWT

https://raw.githubusercontent.com/panticz/installit/master/dep/install.smartgwt.sh
 
# install smart gwt
wget http://smartgwt.googlecode.com/files/smartgwt-2.4.zip -P /tmp
sudo unzip /tmp/smartgwt-2.4.zip -d /usr/share/
sudo ln -sf /usr/share/smartgwt-2.4/ /usr/share/smartgwt
sudo ln -sf /usr/share/smartgwt/smartgwt.jar /usr/share/java/
sudo ln -sf /usr/share/smartgwt/smartgwt-skins.jar /usr/share/java/
 
# restart tomcat server
sudo /etc/init.d/tomcat6 restart
 
 
# create default GWT Project
File > New > Web Application Project
 
Project name:
Smart
 
Package:
smart
 
[ Finish ]
 
 
# a

Create GWT-Ext project under NetBeans

copy "js" dir from gwt-ext archive int project web folder
 
Main.gwt.xml
add
        <inherits name="com.gwtext.GwtExt"/>
 
 
welcomeGWT.html
add
        <link rel="stylesheet" type="text/css" href="js/ext/resources/css/ext-all.css" />
        <link id="theme" rel="stylesheet" type="text/css" href="js/ext/resources/css/xtheme-silverCherry.css"/>
        <script type="text/javascript" src="js/ext/adapter/yui/yui-utilities.js"></script>
        <script type="text/javascript" src="js/ext/adapter/yui/ext-yui-adapter.js"></script>
        <script type="text/javascript" src="js/ext/ext-al

MagentoConnector - Connecting to Magento API with Java using SOAP

# continuation on github
https://github.com/magja/magja
 
<strong>Project Magja on Google Code:</strong>
http://code.google.com/p/magja/
 
Magento Connector for Java, a free wrapper / library to manage Magento informations from a Java application. The latest version (source code) can be downloaded from 
https://github.com/panticz/magja
http://code.google.com/p/magja/
 
If someone is interested in co-development, please contact my over my homepage,
http://www.panticz.de/contact 
 
How to start:
1.

Java2Snom

public String getSnomSetting(String phoneIp, String field) {
    String value = "";
 
    try {
        URL url = new URL("http://" + phoneIp + "/settings.htm");
        BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
 
        String inputLine;
        while ((inputLine = in.readLine()) != null) {
            if (inputLine.indexOf(field) == 0) {
                value = inputLine.substring(inputLine.indexOf(":") + 1).trim();
            }
        }
 
        in.close();
    } catch (Exception e) {
        System.out.println("[!] getSnomSetting:" + 

/etc/init.d/fiXorg.sh

#!/bin/sh
 
if [ $(date +%H) -gt 18 ]; then
	echo "activate Xorg ATI" 
	ln -sf /etc/X11/xorg.conf.ati  /etc/X11/xorg.conf
else
        echo "activate Xorg NVIDIA"
	ln -sf /etc/X11/xorg.conf.nvidia  /etc/X11/xorg.conf
fi
 
exit 0
 
 
# chmod +x /etc/init.d/fiXorg.sh
# update-rc.d fiXorg.sh defaults 20

syncStore.sh

#!/bin/bash
 
SERVER=YOUR_STORE.COM
MAIL=YOU@YOUR_DOMAIN.COM
 
 
function create_item_description() {
	# set java classpath
	export CLASSPATH=/media/programme/java/classpath/RitterDefault_lin.jar:/media/programme/java/classpath/ojdbc14.jar
 
	# export descriptions from db
	for i in 2 3 7; do
		java LagerlisteCreator -q "Webshop" "${SERVER}_${i}" > /tmp/${SERVER}_${i}.out
 
		if [ ! $?
Syndicate content