Posts

The best way to join Strings in Java

Joining strings in java is quite simple, just take two strings and add them using the "+" sign as follows: String s = "One" + " Two"; Which results in: s == "One Two". The thing is that String objects in Java are immutable, so you can't actually change any string, which means that in the following example: String a = "One"; String x = a; in memory now: (a == x) a = a + " Two";  Will result in the following in-memory statement:  ( a != x ) which is a reason for many many bugs in many programs. Another side effect of immutable objects is that every "change" of the string will actually create a new one, resulting in lots of dead objects which will later on be ditched by the garabage collector, but in the meanwhile they consume memory, and will use CPU to collect them. StringBuilder / StringBuffer The simplest solution supplied by Java is using StringBuilder / StringBuffer (Strin...

Launch the perfect set of hundreds of offline free games with a launcher in under 5 minutes

If you want to play good games, but don't want to play online games, and don't want to waste your time for searching games one after the other till you find a decent and free good game then just read this post and I will guide you to the perfect and effortless set of free games you can obtain in 5 minutes. These games will fit any person with the following requirements from his games: Only free games Don't care about graphics (So if a game has good playability you want to play it even if it is 20 years old) Hundreds of games to pick from Obtain them in 5 minutes Have a nice launcher where each game will have a picture and you only need to click the picture to play the game The answer is simple my friend, you are looking for a good console games emulator with a beautiful launcher. Emulators, emulate a specific gaming machine so, for example, you can download a Nintendo (NES) emulator and play all of the Nintendo original games. But still you will nee...

Tools for Wickets Development with IntelliJ's Idea

One of Java's most popular web frameworks is Wicket. If you want to start developing Wickets let me guide you through the installation of 2 plugins which will make your development much more productive. I will write the steps to install these plugins, but I will write them in a short way, if you want a more detailed guide please refer to this page: Installing Wicket Source 1. IntelliJ --> Settings --> Plugins --> Browse Repositories --> Search for "Wicket" --> Install Wicket Forge & Wicket Source. 2. Restart IntelliJ 2.5. You have installed the 2 plugins and you are set to go (the next steps are highly recommended but optional) - WicketForge lets IntelliJ understand Wicket (you can now start a new Wicket file etc), WicketSource lets IntelliJ understand the html wicket ids, which means that you can click on a wicket:id and jump to it's definition in the code / html. The following steps are optional and will enable your browser to ...

Start Working with AutoIT

I have decided I needed a quick GUI creator which can create a small exe file displaying the GUI, with no system dependencies like a .NET framework or Java runtime. What options do I have for a Quick GUI Creator? Maybe there are many options I am not aware of, but after extensive searching I found these two: Auto Hot keys AutoIT (Saw some recommendations to try Delphi or Pascal for this task but I passed) Both tools began from the same code source, autohotkeys branched off and continued to be open source while AutoIT is more commercial. I have compared the two (well, not actually compared, just google'd out other's comparisons) and found out that the AutoHotKeys is slightly better and is more open sourced (which makes it the better solution) but lacks in one field which is crucial for me - the script syntax is awful!  That tipped the balance (as a programmer i couldn't stand AHK's syntax) so I chose AutoIT. How to get Started with AutoI...

Quick GUI Creation

I am working on a project of recreating an old game of Sierra called King's Quest IV - The Perils of Rosella in 3d , I am not working alone, we are a whole team working together. We are using a gaming engine called AGS, which helps in creating games - especially quest games, anyway, this engine enables us to also play video files, but it supports natively only the compressed Theora format, which is an open source video codec which is the equivalent of DIVX just open source (Later on, Google bought the rights for this codec, and have [graded it and are actively using it, but they have left the previous version for the joy of the public). So our graphic designer has created several video files which then she wanted to convert to the Theora format, but apparently it is hard to find a decent codec converter which doesn't need a license in computer science in order to just use it, why? because it is an open source project so anybody who wants to use it needs to be an IT ge...

Amazing PHP site generator

Let's say I have a Database with data. Now, lets assume I want to have a site around this database, which users and admins can access and have access to the data using nice GUI'd tables with the specific data I want each group to be exposed to. When I think of designing such a site, I think of the following requirements: The site must be lightweight , there is no need for any heavy "Engine" here. The site should be built using good coding practices, so I want it to have an MVC engine. I want not to worry about the sql queries, I want not to worry about sql injection, I want DB schema changes to be minor (coding wise) in short - I want an ORM . I want some CRUD functionality I want a nice GUI which means using a lightweight Templating system like Smarty which will preferably use great JS libraries , Twitter Bootstrap, font Awesome etc . One would think I am asking for too much - well, nothing is too much, it just will take a lot of time to develop th...

APK Viewer

In a previous post I wrote about "How to read Android apk contents" , since then I have tested those apps and have drawn conclusions. There is no need for all of those apps, all one needs is two main apps which can do everything one might want with his apks! The clear winners are: APKInspector APK Multi Tool These two application complement each other and let you view any aspect of an APK (apkInspector) and change it as you wish (apk multi tool). I have explained a bit about APK Multi Tool in the previous post about reading android apk contents and so I want to clarify a bit about APK Inspector. APKInspector is a python application which runs only on linux and needs several packages to be installed for it to run. The above requirements can frighten many people so a virtual box (Oracle virtual box) was created using the  Ubuntu OS and all packages (as well as the main app) already are installed on it. In order to download this virtual machine ...