Category Archives: General

Flex: Show HTML text inside an Alert

As i just wanted to insert some bold text into an Alert box, I wondered why the Flex Alert doesn’t support HTML Text. So i wrote a Custom Alert class which just overwrites the regular Alert.show(). Through a trick, it allows to use HTML tags inside the text. package tools { import flash.display.Sprite; import mx.controls.Alert; import mx.core.IFlexModuleFactory; import mx.core.mx_internal; /** * Alert-Box [...]
Posted in General | Tagged | 4 Comments

Python script: Wait for a site to come up and notify me

For the last weeks, i’ve been working a lot with different servers, which take longer and longer to deploy new application bundles. Mostly i know that the deployment is complete when the website or the webservices of that application are up and return a successful status code (not 404). Another use case is when trying to [...]
Posted in General | Tagged | Leave a comment

Bash script: Recursively convert line breaks in all files from Dos/Windows to Unix AND Replace Tabs with Spaces.

It’s really annoying that on Windows, nearly every program that deals with text saves the text in Windows-format. That’s not good when you work in a multi-OS-environment. Another annoying thing are TABS, which often are much wider in Linux editors than in Windows, and are generally superflous as i think. Especially when programming Scala, where the [...]
Posted in General | Tagged , | Leave a comment

Get Weld project running in Glassfish Tools Bundle for Eclipse 1.2

Today i took a look into the GlassFish Tools Bundle for Eclipse to see if it could speed up my Java EE6-development. I was especially curious about the hot-deployment capabilities. After downloading the Glassfish Tools from the download site and importing a simple Weld-JEE-project (i was using the Maven archetype “weld-jsf-jee-archetype”), an error showed up, [...]
Posted in General | Tagged , , | Leave a comment

Enable Weld Logging on Glassfish with Maven

Just figured out how to use a Weld-injected Logger on Glassfish. Unfortunately, i couldn’t get Log4J12 as SL4J Implementation running, like the author of this post did (i hope i’ll find out later), but with the sl4j-jdk14 binding, the logging just works. Steps: Add the following dependencies to the pom.xml: <!-- SL4J API --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> [...]
Posted in General | Tagged , | 2 Comments

Use Ant-Contrib Tasks in Maven

I just messed around a while to get a simple Ant-contrib task running inside a Maven build – a simple <if>. The examples on the net weren’t very helpful or too bloated, so i’ll post a very simple one. The problem with Ant-contrib is that this library doesn’t come with the regular Ant-distribution. So it has to [...]
Posted in General | Tagged , | 3 Comments

Batch script: Convert long folder name to short 8.3 name

When running Windows, i often had problems with long folder-names, especially on the command line. Since Scala also has a problem with a JDK lying in a folder like “Program Files(x86)” i decided to write a little batch-helper to convert long folder names to the short 8.3-form. Then i put the short name of my JDK folder [...]
Posted in General | Tagged , | 2 Comments

Programmer approaching

And now for something completely different: No, i wasn’t the pilot. Not yet
Posted in General | Leave a comment

Maven & Scala: Add source folder to Eclipse Project

EDIT: You don’t need to do the things described here if you’re also using Scala. In this case, you can switch to the m2eclipse-scala integration which automatically adds the Scala source folder (beside some other useful things). Just solved one another annoying problem: Everytime i had to clean my maven-eclipse-project with “mvn eclipse:clean” and re-created the project, i [...]
Posted in General | Tagged , , | 2 Comments

Maven Scala Build Error “error while loading Function1, class file needed by Function1 is missing”

Scala and Maven… a kinda’ fragile combination Today i got the following error when trying to compile my scala-project with “mvn compile”: [ERROR] error: error while loading Function1, class file needed by Function1 is missing. [INFO] reference value Unit of package scala refers to nonexisting symbol. [ERROR] one error found [INFO] ———————————————————————— [ERROR] BUILD ERROR [INFO] ———————————————————————— [INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited [...]
Posted in General | Tagged , | Leave a comment