Monday, 9 July 2012
Friday, 15 June 2012
Wednesday, 13 June 2012
Tuesday, 15 March 2011
Bean considerations 23:10
e.g.
public class PersonBean implements java.io.Serializable {
private String name;
private boolean deceased;
......
/** No-arg constructor (takes no arguments). */
public PersonBean() {
}
Question: Do we have to modify the code for a longer one for the sake of standards? Couldn't we use a "Hybrid bean"? a hybrid bean ...
Wednesday, 2 February 2011
ANTLR's plugin in Eclipse 13:53
From the ANTLR website, you must get eclipse's plugin:
- Go to WIKI (on top of the page)
ANTLR - WIKI
- Then click Integration with Development Environments (on the right side)
Integration with Development Environments

- Go to the Eclipse's section.
There are two choices under Eclipse: antlrDT and antlr IDE
- choose antlr IDE
- And click on the link to source forge
Source Forge

- In Eclipse go to help, install new software
- Choose Helios - http://download.eclipse.org/releases/helios from the list of Software Sites
- Uncheck Group Items by category
- In the search box type Dynamic Languages

- Check Dynamic Languages Toolkit - Core Frameworks.
- Then type GEF.
- Check Graphical Editing Framework.
- Type Zest.
- And check Graphical Editing Framework Zest Visualization Toolkit.
- Click next, the three chosen options should appear in the window
- Click next and complete the installation.
Go back to the source forge website Source Forge
- Click the Download/Install tab
- And copy the address at "via Update Manager" (http://antlrv3ide.sourceforge.net/updates)
In Eclipse, go to "help" then "install new software" and add a new location in the list of software sites:
e.g. Antlr IDE at http://antlrv3ide.sourceforge.net/updates
- Check ANTLR IDEv2.1.1.
- Click next twice, accept the licence and click finish That should start the installation of the plugin.
- Restart eclipse.
In the Window menu, go down to preferences.
- Click ANtlr in the menu on the left side.
- Then Builder.
- Click add and browse to the directory where we put the ANTLR jar.
- Next, select "Code Generator" and choose "Project relative folder" and input a name such as "antlr-generated" that will keep the grammars in a separated directory.
- Check "append java package to output folder".

For more complete detailed information, you should check Scott Stanchfield's page on Vimeo. ANTLR 3.x Tutorial
Tuesday, 21 December 2010
Firefox Flash player Ubuntu 10.10 LTS 64bit 13:43
sudo add-apt-repository ppa:sevenmachines/flash && sudo apt-get update && sudo apt-get install flashplugin64-installer.
You can refer to https://help.ubuntu.com/community/RestrictedFormats/Flash#installation for more detailed information.
Thursday, 2 December 2010
Installing Apache Tomcat on Windows7 21:03
- Download Apache Tomcat from the website http://tomcat.apache.org/index.html
- Unzip it
- Place the folder in a directory suitable for your system
e.g. C:\Program Files\Whatever
- If the classpath is correctly set, at the command prompt, navigate to the \bin folder of your apache-tomcat-
- run startup.bat to start it up
- shutdown.bat to stop the server
- check with your browser if the server is correctly running, by typing in the address bar, http://localhost:8080
- Apache's Tomcat web page should load with no problem
- Now you're ready to develop your best web apps.
How to set the Java Classpath 20:45
Control Panel->System->advanced system settings->environment variables->system variables:
Create new variables:
->click new
variable name: CLASSPATH, variable value: C:\Program Files\Java\jdk1.6.0_22
variable name: JAVA_HOME, variable value: C:\Program Files\Java\jdk1.6.0_22
variable name: Path, variable value: ...;...;C:\Program Files\Java\jdk1.6.0_22\bin; (append it to the existing path, don't forget the semi-columns(;))
Saturday, 6 November 2010
Google Maps in Android (emulator) 21:18
I've done that using Eclipse, so here it goes. Locate your .android folder, on Ubuntu/Linux, that's in ~/.android, it's a hidden file, (hence the dot .android, type ls -a for hidden files), on Windows 7, its location is at C:\Users\
To install keytool, once again go to the Help menu, install new software (in Helios), click add for a new repository, add
http://keytool.sourceforge.net/update, (check http://keytool.sourceforge.net/), then follow the usual procedure to install plugins in Eclipse.Once installed, they'll be a menu called keystore, choose open keystore, browse to the "debug.store" in the .android folder, and type "android" as password. It took me a while to find the password ... In the lower part of eclipse, where the console usually is, select the keytool tab if it's not already, double click on "androiddebugkey", the certificate should open and the MD5 Fingerprint displayed. Copy it and go to Maps API Key Signup - http://code.google.com/android/add-ons/google-apis/maps-api-signup.html, you need a valid Google account for that, accept their terms and conditions, and paste the key where it says so. It should give you back the key to insert in your code. That's in your project folder in Eclipse, open main.xml located in the res then layout folder and where it says apiKey, insert it. Now theoretically, it should display a Google map in your app. And it does!
Your main.xml should look like this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<com.google.android.maps.MapView
android:id="@+id/mapview1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="Your API Key" />
</LinearLayout>
Android SDK Intallation Log 14:49
Next, from within Eclipse, mine is Eclipse Helios, you must install the ADT plugin for Eclipse, so choose the help menu, then install new software, click then the add button to add a repository, something like Android plugin for the name and https://dl-ssl.google.com/android/eclipse/ for the location. Select the check box next to Developers tools and start with the installation.
Once it's installed, it needs to be configured. Select Window->Preferences then Android from the left panel. Update the location of your Android folder by clicking Browse. It should now know where to locate all the necessary class files to start developing.
Last thing to do, select the help menu, go to Android SDK and AVD Manager, then click on the available packages to get the Google APIs that you might need. Select the ones that are relevant for your work, in my case, I'll stick for now to the latest version of Google API, i.e. version 8, you should that in order to run on older versions of Android, your app should be tested on the previous APIs, and thus downloaded now. I haven't got to that part since I'm not comercialising my software (for now), so I'll skip for later on, I feel nonetheless, that it wont't be easy to make it work on all the previous platforms.
After installing the API, all should be ready now to code your first Android app.
Nota: To run it under Linux 64bit, you need to install the ia32-libs package using apt-get:
apt-get install ia32-libs (Ubuntu 10.10LTS 64bit)
Friday, 5 November 2010
Eclipse Installation Log 18:04
As I forgot to install the Java Devolopment Kit (JDK), I pointed to Sun's website (pardon me, Oracle's brand new machine) and got JDK 6 Update 22 (Java SE Development Kit 6u22), after chosing Linux 64 bits, which lead to jdk-6u22-linux-x64.bin.
I've moved the binary file to
/usr/local/bin/, and eclipse's as well. I'm running Ubuntu 10.04 LTS on Virtual Box. As sudo, I've run the Java script, that's ./jdk-6u22-linux-x64.bin at the prompt. It started to decompress and finally created everything in a folder called jdk1.60.22. Next step the always tricky part of setting the path to the Java home in the PATH. So sudo (whatever editor you use, I might Vim), that's
sudo vim ~/.bashrc (bashrc is a hidden file in your home directory and configure the shell environment, you need to type ls -a in order to see it). At the end of the file, I've inserted:
export JAVA_HOME=/usr/local/bin/jdk1.6.0_22
export PATH=$JAVA_HOME/bin:$PATHWhen I type at the prompt,
echo $PATH the JAVA_HOME is appended. I took me a while. Problem: Eclipse wouldn't launch, it was giving a error saying no Java virtual machine found. After some digging, (online digging?!) I've come up to this site http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse/1409590#1409590 and this one at http://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse/3275659#3275659. Following instructions, I altered a file called Eclipse.ini in the Eclipse folder. I just added two lines:
-vm
/usr/local/bin/jdk1.6.0_22/bin/java
the whole file looks like this:
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1.R36x_v20100810
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
/usr/local/bin/jdk1.6.0_22/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx384m Just added a launcher on my desktop and that it, it works. It sounds simple but almost got the whole afternoon. I'm actually suffering from time management problems, that means I STRESS!
Ok, next step, installing Android platform.
Sunday, 26 September 2010
Bluetooth Marketing Software 20:02
Thursday, 28 May 2009
JAVA - AWT 15:05
My first screencast made with Camtasia. It's got good feedback, for a change.
AWT is Java's set of classes that allows a developer to construct programs with graphical interfaces with windows, panels, and a whole collection of components. It also implements mechanisms that deal with events, which can be mouse clicks, button presses, or even text typed in. Every time an event is triggered, some code will listen to it and respond with an appropriate action.
Initially, it was platform dependent and unreliable, but Swing later came and was built on top of AWT's classes, as a more modern improvement to correct these problems.
...........................................................
O meu primeiro screencast feito com Camtasia. Foi bem recebido, para variar.
AWT é o conjunto de classes que permitem ao programador construir programas com interfaces gráficos com janelas, paneis e uma grande colecção de componentes. Também implementa mecanismos que lidam com eventos, que podem estes serem cliques de rato, cliques em botões, ou até texto introduzido pelo teclado. Cada vez que um evento é disparado, haverá código que estará a escuta e que responderá com uma acção apropriada.
Inicialmente, AWT estava dependente da plataforma e pouco estável, mas Swing apareceu depois e foi construído por cima das classes do AWT, como uma mais moderna melhoria a fim de corrigir estes problemas.
Sunday, 26 October 2008
Intruders II 22:27
Today after a scan, the following message appeared in Spybot (antirootkit software - looks decent), it was deleting a key in the registry, probably from my last operations, see post Intruders.
Product: RegistryFix
Threat: Malware
Company URL:
_http://www.noadware.net/_
Company product URL:
_http://www.registryfix.com/_
Description
Software belongs to Marketflip Technologies like the rogue antispyware software NoAdware or Spyware Solver. Its domain is registered through domains by proxy. Neither license nor website state proper contact information or any information about the company. False positives and warning messages serve to make the user buy the software. This software is identical to ErrorClean which is also from Marketflip Technologies.
Friday, 17 October 2008
Intruders 22:56
On the 12th of October, I've inadvertedly turned off my firewall/anti virus for a few minutes. The result as you can imagine is that I've got infected, not me, my computer, by a series of weird diseases, all grouped in the same package, or probably from the result of the same original sin. My firewall started shooting scary messages like the one in the picture. The funny thing is that when I clicked on "enable protection", it'd just send me to a page telling me to buy antimalware/antivirus software from two different brand. To buy an antivirus I didn't even know?! I thought it was really weird. And scary, seen the nature of the messages popping up in my screen. So I took note of the names of the trojans, and after digging in the net here's what came up.

trojan-Clicker.Win32.Tiny.h
Trojan-Spy.Win32.GreenScreen
Trojan-Spy.Win32.KeyLogger.aa
Trojan-Spy.Win32.Agent.bq
Trojan-Spy.HTML.Bankfraud.dq

Trojan-Clicker.Win32.Tiny.h Description
Trojan-Clicker.Win32.Tiny.h is an imaginary Trojan name used to threaten and trick users into buying the rogue anti-spyware application PC Antispy. The user gets infected after downloading the video codec that infects the computer with a nasty Trojan. This Trojan then displays a fake "Windows Security Alert" message which recommends to download a software (most probably PC Antispy) to resolve the issue. The message reads:
"Windows Security Alert
To help protect your computer, Windows Firewall has detected activity of harmful software. Do you want to block this software from sending data over the internet?
Name: Trojan-Clicker.Win32.Tiny.h
Risk Level: CRITICAL
Description: This is spy trojan that installs itself to the system, hides itself and then captures screen images and saves them to disk files in encrypted form. Thus it allows to a hacker to watch screen images."
PC Antispy or whatever software the fake Trojan-Clicker.Win32.Tiny.h alert message recommends will not fix your PC but might actually expose you to more security threats
from "http://www.spywareremove.com/removeTrojanClickerWin32Tinyh.html"
PCAntispy, also known as PC-Antispy and PC Anti Spy, is a rogue anti-spyware program that sells itself as a spyware removal superhero under the slogan: "Protecting Against Intruders". Ironically, PCAntispy is an intruder itself. PCAntispy is a clone of PCAntispyware and will use any means necessary to lure you into buying the full PCAntispy program.
Zlob Description
Spyware Image
It is a backdoor designed to give the attacker remote control over a compromised PC. It changes essential computer settings and modifies certain files. Zlob starts automatically on every Windows startup and hides its activities by injecting code into explorere.exe. It waits for remote connections and allows the attacker to download and install additional software, execute certain commands and manage the entire computer. Zlob can be very dangerous. Use antivirus and malware removal tools in order to get rid of this spyware.
from "http://www.spywareremove.com/removeZlob.html"
This Trojan opens a range of web pages without the knowledge or consent of the user. It is a Windows PE EXE file. It is 5120 bytes in size. It is packed using FSG. The unpacked file is approximately 23KB in size.
Installation
Trojan-Clicker.Win32.Tiny.h
The Trojan adds a rule to the Windows Firewall which permits any network activity caused by the Trojan.
from "http://www.viruslist.com/en/viruses/encyclopedia?virusid=108900"
Trojan-Spy.HTML.Bankfraud.dq (Kaspersky Lab) is also known as: Phish-BankFraud.eml.a (McAfee), Trojan.Bankfraud (Doctor Web), HTML.Phishing.Bank-1 (ClamAV), HTML/Bankfraud.gen (Eset)
from "http://www.viruslist.com/en/viruses/encyclopedia?virusid=75870"
First off, never trust a bug that tells you to buy something to get rid of it. It's always a scam, exportion to be exact.
Run the McAfee free scan and see exactly which virus you have and list it out here. If the one you think you have is "Trojan.spy.html.bankfraud.dq" you need to dig a little deeper. That trojan was targeted towards a specific bank's customers (unless you are a Regions bank customer.).
I would run MSCONFIG and stop disable all programs you do not recognize, then reboot and perform another scan. Then go to TrendMicro.com and reseach each one of them. Trend is pretty good at giving the manual removal workaround.
from "http://answers.yahoo.com/question/index?qid=20080728223233AAzKkOh"
I checked a few forums, all saying to download such and such software, which I did for a few, but after running them, nothing could be found, desperatly. On one the forums, someone had the idea (I've lost the address of that source, forgive) to check all files created and modified during the last two days, in the System32 folder in Windows, you know, with the search tool (or find, on other OS's). In the list that's come up, there was someting called "juxslopm.exe" which caught my attention, well that a very strange name that I've never come across before. At first, I could not delete it, which was a quite risky solution if my suspicion was proved wrong. So I changed its name to C:\Windows\System32\juxslopmOld.exe and left it for a while. After a few hours, the creepy messages were gone, and all was back to normal. So I've assumed that was my culprit, I've moved to my desktop, and now it allows me to delete. And more, my antivirus (AVG) has recognized it and accused,
trojan horse generic11.azou
process Name: C:\Windows\Explorer.EXE
Process ID: 3440
too late, I did it first. I still don't understand why it took so long to identify the trojan. It's still on my desk, where I can see its dead corpse, yeah, I feel like a bounty killer.
Conclusion: they infect me and then offer to cure me, my computer actually, I'm still allright. That's a bit sci-fi, but probably a good marketing strategy, for who is not, or can't afford to inform himself. Those guys who are selling the miraculous software should have problems for doing that.
