Two nice little bugs today which sums up most of my day
How not to use iterators:
while(views.iterator().hasNext()) {
View currentView = (View) views.iterator.next();
currentView.update();
}
Bing that basically crashed my Firefox (this is part of a GWT app) when running it as well as my Netbeans / GWT debugger. Notice that Firefox was so good to tell me that apparently the script I was running in a weird manner.
And it was indeed in an endless loop as you can guess: invoking the iterator() method returns a new Iterator object every time (which it is supposed to do, I’m the dumb one in that story). Thus, I was basically getting the same “next()” object every time and hasNext() was thus always true
Anyway that fixes it:
Iterator viewsIt = views.iterator();
while(viewsIt.hasNext()) {
View currentView = (View) viewsIt.next();
currentView.update();
}
Ok that was a trivial one, but actually so trivial that I just felt like shaming me a little more and publishing it here
Customize the Default Username (Author) in Netbeans 6.7:
- Open the netbeans.conf file
- Locate the ‘netbeans_default_options’ property
- Add the discussed property to the list of options as ‘-J-Duser.name=\”Dominique Guinard\”‘
Source
A while ago I was blogging about some experiences with the Google Web Toolkit (GWT) and Netbeans.
I reported on the existence of a great plugin (GWT4NB) that GWT-enables your Netbeans (starting from NB 6.5).
Well today I upgraded to NB 6.7 (from 6.5), to GWT4NB 2.6 (from 2.0.4) and to GWT 1.7 (from 1.5.3) and could not compile my GWT project anymore. Here are the steps I went through to make it run again:
- Create an new empty Web project. When Netbeans asks you what framework you’d like to use (last sept of the wizard) select the Google Web Toolkit.
- Be sure that the GWT Installation Folder points to the latest version of GWT (1.7 in my case).
- Copy the content of both:
build-gwt.xml and gwt.properties to these files in your old project.
- Make sure you keep the entry
gwt.module=... of your old project.
- You might need to check the properties of the old project and make sure the “Frameworks” entry is referencing the latest version of GWT.
This should do, you should now be able to run and compile the old project with the latest GWT and GWT4NB plugin (at least it worked for me!).
What do I do When my Outlook Calendar is Freezing… Well:
1) I rename my ost file to ost.old located in (in my case):
C:\Users\\AppData\Local\Microsoft\outlook\outlook.ost
2) Re-launch outlook.
By doing so you actually force a re-sync with the Exchange (outlook) server and get a fresh .ost file.
WARNING: If your outlook is not syncing with a server (which is often the case, especially for local install) this will not work.
August 13th, 2009 in
Windows |
No Comments
This command is useful when you want to clean a directory tree from all the .svn folders it might contain:
find . -name ".svn" -exec rm -rf {} \;
Basically it “finds” all the .svn folders and excutes rm -rf on each of these.
August 12th, 2009 in
Linux | tags:
command,
shell,
svn |
No Comments
1) Get the BlueZ stack and RFComm and minicom for your Linux distro.
2) Do hcitool scan to scan for Bluetooth devices and get the Bluetooth address of the one you want to connect to, e.g.: 00:80:98:E7:CA:16
3) Do rfcomm connect 0 00:80:98:E7:CA:16 1 which basically creates virtual serial port for your Bluetooth device. The first 0 means that you want to bind your Bluetooth device (e.g. Plogg) to the /dev/rfcomm0 virtual port. The second argument is the BT address of your device, the third is the BT channel to be used.
4) Connect to the Plogg by launching minicom -s, go to the Serial Port Setup menu item and change the entry Serial Device to point to /dev/rfcomm0, i.e. the virtual port for your Plogg.
5) You can now browse the Plogg’s functionality in command line. Note that this tutorial should work for other BT devices as well.
March 18th, 2009 in
Uncategorized |
4 Comments
Today I was trying to access our SVN server from behind a proxy. I configured my Ubuntu general proxy settings but actually that still did not work for the SVN client. After a bit of web-browsing I figured out that the SVN client has its own proxy setting: go to:~/.subversion and edit the server file. Uncomment and edit these lines:
[global]
http-proxy-host = YOURPROXY
http-proxy-port = YOURPROXYPORT
January 19th, 2009 in
Linux |
No Comments
Today I had to face quite an interesting experience! While listening to music (to David Vendetta, great DJ btw!!) using windows media player I started to experience some latency and bwwwwip sounds once in a while. Surprising since I actually never experienced that until today.
The only thing I changed today was that I plugged my new monitor to the docking station, a digital monitor! As surprising as is can be it turned out to be the reason for the delay! I guess since the T61 does not have a digital output the docking station has to somehow convert it to digital which seems to consume some CPU… Not exactly sure about that but anyway the patch is simply to use the analog output of the docking station. Again since the T61 does not have a digital output it does not seem to be such a problem (i.e. no quality loss I guess).
Did it for me, at least…
January 15th, 2009 in
Hardware,
Windows |
No Comments
To get the Paralist latex package on Ubuntu run that:
sudo apt-get install texlive-latex-extra
I kept getting that error:
Metric (TFM) not found
when trying to compile latex documents based on the IEEE Transaction Style.
I eventually found out that my Ubuntu was missing an important font package, namely the “texlive-fonts-recommended” package, this solved it:
sudo apt-get install texlive-fonts-recommended