I’m sure some of you have found the need occasionally to use the “console” input/output support provided by the JDK via System.in and System.out — if nothing else just to implement an occasional more complicated command-line “scripty” app to be run in a Linux environment and piped input in or out from/to another program. The […]
Posts Tagged: programming
Apache Commons Modeler — Simple/Sample Usage
I’ve dealt in previous posts (here and on Cognitive Match‘s blog) with JMX and various things around it — as this is an area I have found more than useful in the JDK. It is therefore no surprise that recently I have turned my eyes to Apache Commons Modeler. The project lacks documentation, granted, and […]
J2ME: Scale an Image to Fit the Screen Size
It’s more and more common with the new generation of mobiles nowadays to have a megapixel camera built in the mobile itself. And with that comes the fact that if you ever want to allow your user to select one of the images s/he has captured with this camera (see above) you are dealing with […]
J2ME: Read an Image from the Device Filesystem
As you’ve seen with previous posts, I’m trying to make sure that all the stuff that used to be on my old website and people are still looking for is being brought back to light; and one of the search terms that I see redirecting people to my website is “j2me read file” — for […]
J2ME StopWatch Application
This is another resurrect from my old website — again, it seems people are visiting my site looking for this (old) J2ME application. Please be aware that I haven’t updated this application in ages — it was known to run last time I checked, but that was a while back. I suspect as such it’s […]
Checking the Memory Quota
This is somehow similar to the one above, except that this time an attacker can exploit the memory quota. This quota defines how much memory a user process can allocate at a time. If there is no capping on this value, a user process can try to allocate all the memory available in the system […]
AppNexus Webinar on Scalability — Part 1
Mike Nolet of AppNexus started a 2-part webinar on scaling their advertising business and I am glad I followed the first part (and I will definitely be there for the 2nd part!) as some interesting things came out of that. (As a note, for those who are interested, Mike has more details on internet advertising […]
StringBuilder — Memory Consumption
You have seen probably my initial post about creating StringBuilder’s in Java — and the continuation of it which looked at timings involved. As I promised, I have finally had some time to look at the memory consumption involved in using the 2 ways of creating a StringBuilder in Java. I have used a code […]
Creating StringBuilder in Java
I wrote in my previous post about StringBuilder’s in Java, and I felt I should provide some measurements around the whole discussion. So I put together some quick and dirty code which is good enough for a comparison of the 2 ways of creating a StringBuilder — bear in mind I said “comparison”, as such […]
About Data Comparison in Java
If you have been involved in some coding (Java or otherwise) more than likely at some point you had to deal with the situation where you have to compare some data — for the purpose of sorting items in a list, of validating input, or many of the many other situations that require it. And […]
Data Validation inside a List
Felt like sharing this, since there might be some other “dinosaurs” like myself (i.e. slow in their using the Apache Commons Collections) — and those guys might find this useful ๐ Occasionally you find yourself providing components that will be used by various modules in a project, and as such you have to employ strict […]
Neat Trick for Returning an Empty List in Java
I’ve found this post actually burried in my “Drafts” — it’s been there for sometime it seems. I recall writing about it on my mobile WordPress application, so I’m guessing I’ve saved it as draft on the blog with the view to apply the code pretty-printing and forgot about it quite likely ๐ So I […]
Arrays in Java
I seem to be on a roll today so I thought I’d mention this little tip that I have come across in the past when using arrays — more specifically bi-dimensional arrays. We think of such arrays (in Java and other languages as well!) quite often as a bit of a Scrabble board where we […]
Apache Commons Collections
I discovered this recently myself (having not been a big fan of Apache Commons Collections in the past) — and it’s a useful feature if you are dealing with a list of objects that can be compared by more than one property. For instance, consider you have a list of Person’s (see class below) which […]
Java StringBuilder
This is something that I have seen quite a few times while looking online at other people’s code so I thought I’d write about it quickly — preach the world and all that ๐ I’m referring here to the JDK class StringBuilder, however, those of you who know your JDK classes would surely have figured […]
Recent Comments