niedenzu

Hints and tricks for developers

Martins Amazon Wunschliste

PATH manipulation via VBS or JavaScript 6. December 2016

Sometimes it is not possible to edit the PATH variable on your Computer. – In my case the admin blocked the panel – but my user has sufficient rights to do so.
Be carefull. Do save your Environment variable somewhere in a textfile.
It is possible to damage your system.

You can call the script with the cscript scripting host.
Don’t forget to reopen a new Shell to see the result of your effort.
The current Command-Shell does not show any differece

the following script is in VBScript. But you can translate it easily to Javascript.

No Comments on PATH manipulation via VBS or JavaScript
Categories: JavaScript Windows

Migration JEE4 auf JEE5 auf eine WAS7

Die hier vorgestellte Vorgehensweise ist nur interessant, wenn Sie den Einsatz auf einem WebSphere-Applikationsserver betreiben.
Die Umstellung von JEE4 auf JEE5 erfolgt durch Anpassug des Deployment-Descriptors (web.xml) der Web-Anwendung.

Schilderung des Problem:

Nach der Umstellung von

ibm-web-bnd.xml
ibm-web-ext.xml

No Comments on Migration JEE4 auf JEE5 auf eine WAS7

Maven-Konfiguration mit Eclipse

maven3

Damit Eclipse mit der Maven-Verzeichnisstruktur arbeitetn kann muß man Maven innerhalb von Eclipse kongigurieren.

Als erstes muß man maven auf sein Sytem kopieren und ein paar Umgebungsvariablen einstellen.

M2_HOME: C:/Programme/Apache Software Foundation/apache-maven-2.2.1
JAVA_HOME: C:/Programme/IBM/SDP/jdk
Path: %M2_HOME%bin

Installation von Maven muß ein einem Verzeichnis ein.

das zweite bild

zweites bild

No Comments on Maven-Konfiguration mit Eclipse
Tags: ,
Categories: Maven

WordPress Migration

how to save legcy data

  • Save your old wp-config.php from you legacy installation

Man sollte sich die Datei wp-config.php vom dem Alt-System sichern.
Sicherung des upload-Verzeichnis (Dort wurden die upgeloadedten Dateien von WordPress abgelegt).
Evt. Sicherung des alten Themes.
Export über der Datenbank über phpMyAdmin.
Anpassung des Export-Files. Hinzufügen von use ´dbname´.

Installation of new WordPress-System

  • Download des Zip-Archives das WordPress enthält.
No Comments on WordPress Migration
Tags:
Categories: Tools Uncategorized

Nützliche Links

Nützliche Links

Firewall C:\Windows\System32\Firewall.cpl Windows7

AppWizzard C:\Windows\System32\appwiz.cpl windows7

domain_user

%SystemRoot%\SYSTEM32\rundll32.exe dsquery,OpenQueryWindow

No Comments on Nützliche Links
Tags: ,
Categories: Windows

Function to calculate amount of labour days between two dates

To determin the eleapsed time in days for in insurence company we had to dynamicly
calculate them.

In an earlier project we realized that it wasn’t a good idea to run a batch thats precalculates the values.

The almausr.feiertag table is used to save holidays.
(It’s the german word for holiday).

No Comments on Function to calculate amount of labour days between two dates
Tags: ,
Categories: DB2 SQL

SimpleProxyServer 5. December 2016

You need a Proxy-Server to track the traffic.
But you are not allowed to install one.
All you have is Java.

Here ist the a solution.

No Comments on SimpleProxyServer
Tags: ,
Categories: Java

Replace tabs with whitspaces 6. October 2016

Our code was analysed by the sonar tool. One rule says that you should not use tab-characters.
So I needed to replace all tab-characters by 4 spaces

I used the sfk.exe .

converts the tabs of all Java-Files in the src-directory to 4 space-character.

No Comments on Replace tabs with whitspaces
Tags: ,
Categories: Uncategorized

Maven 5. February 2016

validate – validate the project is correct and all necessary information is available
compile – compile the source code of the project
test – test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
package – take the compiled code and package it in its distributable format, such as a JAR.
integration-test – process and deploy the package if necessary into an environment where integration tests can be run
verify – run any checks to verify the package is valid and meets quality criteria
install – install the package into the local repository, for use as a dependency in other projects locally
deploy – done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.

create eclipse project of your pom.xml

mvn eclipse:eclipse
No Comments on Maven
Categories: Java Maven

PreparedStatementWrapper 23. April 2015

No Comments on PreparedStatementWrapper
Tags: ,
Categories: DB2 Java

highlight form elements with jquery



//highlight form elements....


document.styleSheets[0].insertRule("::-webkit-input-placeholder { color: green; font-weight: bold ;  background-color:rgba(255,255,255,1); border: 1px solid green}", 0);


$.each($("input"), function() {
	if ($(this).attr('name')) {
		$(this).val("");//evtl inhalte loeschen
		//if ($(this).attr('hasDatepicker')) {
			//wenn Datepicker, dann Felder vergroessern
			$(this).removeAttr("size");
			$(this).removeAttr("maxlength");
			
		//}
		$(this).attr("placeholder",$(this).attr('name'));			
	}

});


$.each($("select"), function() {
	if ($(this).attr('name')) {
		$(this).prepend("");
		$(this).css({ color : "green", fontWeight: "bold" }).val($(this).attr('name'));
		$(this).val($(this).attr('name'));
	}
});



$.each($("input[type=radio], input[type=file]"), function() {
	if ($(this).attr('name')) {
		$(this).before("
"+ $(this).attr('name') +"
"); } }); $.each($("input[type=hidden]"), function() { //nur elemente die ein name attrib haben.. if ($(this).attr('name')) { $(this).removeAttr("type"); $(this).before("
"+ $(this).attr('name') +"\n(hidden)
"); } });
No Comments on highlight form elements with jquery
Categories: Uncategorized

Server Portal 24. February 2015

c:\IBM\PortalServer\AppServer\bin>startserver WebSphere_Portal
ADMU0116I: Toolinformationen werden in der Datei
           C:\IBM\PortalServer\wp_profile\logs\WebSphere_Portal\startServer.log
           protokolliert.
ADMU0128I: Das Tool wird mit dem Profil wp_profile gestartet.
ADMU3100I: Die Konfiguration des Servers wird gelesen: WebSphere_Portal
ADMU3200I: Der Server wurde gestartet. Es wird auf den Initialisierungsstatus
           gewartet.

No Comments on Server Portal
Categories: Uncategorized

Gute Einfürung in Graphviz 19. February 2015

http://4webmaster.de/wiki/Graphviz-Tutorial

No Comments on Gute Einfürung in Graphviz
Tags:
Categories: Uncategorized

mobaxterm 18. February 2015

wget
vi
grep

F11 = full screen

No Comments on mobaxterm
Categories: Uncategorized

graphviz windows mac

mac – commandline.

dot -Tsvg eingabe.dot -o meinedatei.svg

No Comments on graphviz windows mac
Tags: ,
Categories: Tools

i18n for php 13. February 2015

Good example can be found.

http://www.onlamp.com/pub/a/php/2002/06/13/php.html

Install homebrew

download the tools

execute them

/usr/local/opt/gettext/bin/msgfmt messages.po

No Comments on i18n for php
Categories: php

Cross join


Cross join mostly used:

By learning sql you will soon get in touch with joins.
The following examples show this type of join which is called cross join.
The result is a Cartesian product between the two tables.

select * from a, b

In more complex queries you have to use the ansi syntax to make the query more readable.
This makes it easier to understand the query later – or if someone else tries to understand what
you are doing.

ansi syntax of cross join

select * from a
cross join b

This was just an example the see how it works.
This is an example where you about what I’m taking about

select * from a
cross join b
join c
on b.id = c.b_id
join d
on c.id = d.c_id

So don’t forget. That there are not only

  • joins (with join condition)
  • left joins
  • left outer joins

but also the cross join.

No Comments on Cross join
Categories: Maven

Maven Release Plugin 11. February 2015

mvn release:clean
mvn release:prepare
mvn release:perform

-DskiptTests

m2_release_plugin
Installation eine hpi_Datei- die hat den gleichen Aufbau wie ein war.

No Comments on Maven Release Plugin
Categories: Maven

maven-scm-provider-svnjava 3. February 2015

If you whant to use a pure java implementation of a cvs client you got to download
the latest version of it.


  
    com.google.code.maven-scm-provider-svnjava
    maven-scm-provider-svnjava
    2.1.1
    compile
  

https://oss.sonatype.org/content/repositories/releases

https://oss.sonatype.org/content/repositories/releases/com/google/code/maven-scm-provider-svnjava/maven-scm-provider-svnjava/2.1.1/

No Comments on maven-scm-provider-svnjava
Categories: Maven

Sonar Postgresql 30. January 2015

Do you want to use Sonar with postgresql?
Then read the following articel.

https://github.com/darianmiller/devmachine/wiki/Configure-Sonar-to-Utilize-PostgreSQL

This can be very handy if you want to use the maven sonar pluging.
All results of the scan will be stored to this DB.

No Comments on Sonar Postgresql
Categories: Uncategorized