Archivi per la Categoria 'Java'
Recently I got surprised by following case.
In Java you can declare an array in following valid ways:
String[] strings = new String[] { "foo", "bar" };
// the above is equivalent to the following:
String[] strings = { "foo", "bar" };
So following Java code is perfectly valid:
public class Foo {
public void doSomething(String[] arg) {}
[...]
Install Tutorial: Ubuntu 9.04, Apache with SSL, Subversion over HTTP / HTTPs, and Trac
36 Commenti Pubblicato da Luigi il 27 Agosto 2009 in Java, Internet, Linux, Software, WebThis tutorial will guide you through installation of Apache, HTTPS, Subversion and Trac, in order to have an (almost) complete development environment for your team.
This article is divided in following steps
1. Installing Subversion
2. Installing Apache
3. Configuring Apache with SSL
4. Configuring Subversion with Apache (and SSL)
5. Installing Trac
You may choose for example to see how [...]
Today I got this error on OSX terminal doing a "svn import" of a project created with a maven archetype.
My svn configuration defines that when I commit Java or XML sources it automatically adds the property svn:eol-style=native (see: svn automatic properties). But the project created with maven is mixing different type of end of lines, [...]
Making Eclipse JavaHL working, recompiling Subversion from the sources
2 Commenti Pubblicato da Luigi il 13 Maggio 2009 in JavaToday I reinstalled my laptop with Ubuntu 9.04 (64bit version) and it runs like a charm.
Now I am reinstalling all the things I need for work, and of course eclipse with subclipse plugin.
Facing the usual problem with JavaHL, this time I wanted to fix it; because on OSX/Linux if you run different versions of command [...]
Native compilation of Java code offers some advantages over distributing .jar files:
it cannot be easily decompiled/reversed/hacked
it doesn't require a JVM on the user's computer
it doesn't require a startup shell script
performances: some people believes that native code run faster; I'm a little bit skeptical about this point
On the other side, you loose on
cross platform portability
reusability: [...]
Best comments in source code
0 Commenti Pubblicato da Luigi il 24 Aprile 2009 in Java, Software, Life, universe and everythingFound this nice thread on StackOverflow:
What is the best comment in source code you have ever encountered?
A fun read. I'm trying hard to keep myself to post some snippet; fortunately I've not enough reputation on StackOverflow to post answers
I've been writing about tracing http requests or other kind of connections, as this can be very helpful doing system integration work. And recently I discovered two other tools that I never used before.
The first one is netcat (also known as nc: if you are on a Unix box you can learn about it with [...]
Testing components that use JNDI to get DataSources and other resources can be annoying, because (hopefully) you don't want to run your unit tests inside the application server. JNDI is a good example of how the ServiceLocator makes testing harder.
When you can't turn around the JNDI to get your resources and inject them into your [...]
Checking if an IP is in a subnet range. SubnetUtils.SubnetInfo isInRange bug.
1 Commento Pubblicato da Luigi il 25 Marzo 2009 in JavaToday I used commons-net to verify when an IP address is in a subnet specified in CIDR notation. So, I got a bug.
This code:
SubnetUtils utils = new SubnetUtils("77.24.0.0/16");
System.out.println("lower address: " + utils.getInfo().getLowAddress());
System.out.println("higher address: " + utils.getInfo().getHighAddress());
System.out.println("77.23.255.254 is in range? :" + utils.getInfo().isInRange( "77.23.255.254" ));
gives this output:
lower address: 77.24.0.1
higher address: 77.24.255.254
77.23.255.254 is in range? :true
Obviously the [...]
Which one do you read best?
A.
B.
Don't read this until you've answered yourself:
˙xnuıl ɯoɹɟ sǝɯoɔ ǝldɯɐs puoɔǝs ǝɥʇ 'xso ɯoɹɟ uǝʞɐʇ sı ǝldɯɐs ʇsɹıɟ ǝɥʇ
Cerca
Info
Stai navigando negli archivi del sito NewInstance per la categoria 'Java'.
Gli articoli lunghi sono troncati. Clicca sul titolo dell'articolo per leggerlo interamente.Calendario
| L | M | M | G | V | S | D |
|---|---|---|---|---|---|---|
| « Gen | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||
Archivi
- Gennaio 2010 (2)
- Dicembre 2009 (1)
- Novembre 2009 (3)
- Settembre 2009 (2)
- Agosto 2009 (4)
- Luglio 2009 (1)
- Giugno 2009 (2)
- Maggio 2009 (4)
- Aprile 2009 (2)
- Marzo 2009 (7)
- Febbraio 2009 (5)
- Gennaio 2009 (2)
- Dicembre 2008 (1)
- Novembre 2008 (8)
- Ottobre 2008 (12)
- Settembre 2008 (3)
- Agosto 2008 (2)
- Luglio 2008 (6)
- Giugno 2008 (16)
- Maggio 2008 (2)
- Aprile 2008 (3)
- Marzo 2008 (6)
- Ottobre 2007 (1)
- Settembre 2007 (1)
- Agosto 2007 (5)
- Luglio 2007 (6)
- Giugno 2007 (6)
- Maggio 2007 (1)
- Marzo 2007 (1)
- Febbraio 2007 (2)
- Gennaio 2007 (1)
- Dicembre 2006 (2)
- Novembre 2006 (4)
- Ottobre 2006 (7)
- Settembre 2006 (1)
- Agosto 2006 (2)
- Luglio 2006 (6)
- Giugno 2006 (3)
- Febbraio 2006 (1)
- Gennaio 2006 (1)
- Dicembre 2005 (5)
- Novembre 2005 (2)
- Ottobre 2005 (2)
- Settembre 2005 (7)
- Agosto 2005 (2)
- Luglio 2005 (8)
- Giugno 2005 (12)
Categorie
- Books (7)
- Eclipse (10)
- Errors (2)
- Firefox (7)
- Hardware (14)
- Horror Code (8)
- Internet (17)
- Java (85)
- JavaScript (8)
- Life, universe and everything (29)
- Linux (44)
- Mac (18)
- Software (25)
- Speeches and Conferences (8)
- Web (19)
- Windows (16)
Ultimi Post
- Syntactic sugar and Java arrays.
- 3G USB Stick on Ubuntu
- Ipod touch with Linux
- Karmic and Luks: USB drive encryption made (almost) easy
- Suspend/Resume in Karmic /2
- Suspend/Resume problem in Ubuntu Karmic 9.10 running on MacBook Pro 5.1
- MacBook International Keyboard and Linux
- Mighty Mouse: reverse horizontal scrolling workaround on Ubuntu Linux 9.04
- Skype 2.1.0.47 beta released, and amd64 packages available!
- Linux RAM Disks

