Reverse the Comparison Condition for Safety

Hey, its been a long time since I post anything on this blog but it’s a start.

Today I would like to add programming tips, we all know about condition and comparison especially the “equals to” that sometimes got written as assignment because of one less ‘=’ in the line.

Ups, we all got destroyed because of one less character..

To avoid this kind of problem, we could just reverse the position of the compared value with the variable into..

So, even if You accidentally missing one ‘=’ character the compiler will generate errors (at least in PHP) and not destroying the humanity.

Error : the humanity is saved, err.. I mean “FATAL ERROR┬ásyntax error, unexpected ‘=’ on line number x” will be shown if You type this in PHP language.

There You go, no need to thank Me because I also read it somewhere, I just post it here as a reminder for Myself.

Continue reading »

Yeaa!! My Gmail Account is back!!

Yesterday was a happy day, My gmail account that I thought already lost because got hacked finally recovered.

March 16, the day when someone I know hack into My gmail account and change the password and recovery email, this man took what belongs to me and unfortunately I don’t know where is his location.

I trusted him, he knows the password and after almost 3-4 years he suddenly change the password.

For a few days I was angry, I was desperate, I would like to know why he hacked My account? Is he having financial problem? Is he suddenly got greedy? Those few days I was trying to recover My gmail account using the recovery page, but there is not a single result appear.

Continue reading »

Simple Banking Applications with Java

Hello fellow daoist,

Yesterday, I’m learning java by doing simple project named Banking Applications, it is not using any database, just a simple console that emulates the banking work flow.

Now, I want to share on how you can make one too. I assume that you already at level where you can create new project for java. So I will bypass any formality and just explain on the code.

First, you may want to create new project for java application ( I’m using Intellij IDEA IDE ), I named my project BankingApplications.

Continue reading »

Portfolio : Nyubot

Nyubot main Page


Nyubot is an online vending search for Indonesian Ragnarok Online ( idRO ). Made with PHP and Javascript to make it interactive without loading another page , and perl as an engine to gather data from the game.

Openkore was used as data input ( perl modified ) and PHP as back-end, Nyubot is a Ragnarok Online (idRO) game vending searcher and megaphone chat and guild war saver.

Not Available
Continue reading »

Visual Studio 2012 : Error! No export were found

Visual Studio 2012
Visual Studio 2012

Today, when I open my old project there was this error “No exports were found that match the constraint”, I then search google for this problem and the solution is fairly simple.

This error happen when I installed new unity 5.2.1f, the installer installed visual studio 2015, the problem is solved by clearing Visual Studio Component Model Cache.

Continue reading »

Unity : DrawTextureWithTexCoords Example and Tutorial

A few weeks earlier I was confused in how to use the DrawTextureWithTexCoords, searching with google gave no results, yes there are fews example and perhaps tips, but those are unclear to me.

Fortunatelly after trial and error, I finally understand how this function really works, stick to me for more explanation.

Unity Documentation :

DrawTextureWithTexCoords(Rect position, Texture image, Rect texCoords, bool alphaBlend = true);

Position : Rectangle on the screen to draw the texture within.
Texture : Texture to display.
texCoords : How to scale the image when the aspect ratio of it doesn’t fit the aspect ration to be drawn within.
alphablend : Whether to alpha blend the image on to the display (the default). If false, the picture is drawn on the display.

For more simple explanation,

Continue reading »

Unity : blue background when playing the scene


A few days ago, I got stuck in some problem.. it wasn’t so hard, the rendered game and executable unable to show me the background image, it’s just showing blue background and my sprite stuck in the middle.

Googling to find what the problem doesn’t show any results, until I got advice to restart unity… and problem was solved.

It seems unity had a bug that making the background image not showing in render game or executable compiled, the solution is actually simple, just restart the Unity and voila problem solved..

As for the sprite that stuck on center, just by check the root in the sprite solved the problem..

Oh yeah, I’m trying to learn how to use unity and blogging it as a reminder for many problem that may show up.. or just using it to store code library ?

Continue reading »

How to use animation offset in libgdx from texturepacker

While trying some new things after working all days, I encountered something annoying .. when I used texturepacker gui from codeandweb, the packer packs my image into one and use offset to maximize its compression.

This kind of packing is actually good, but it’s a little annoying because we must set the offset in libgdx to actually make the animation position line-up.

Packed by texturepacker
Packed by texturepacker

I browsed through google to find how to actually get the offset and apply it to the animation function in libgdx, but luck not in my side for a whole day … ah, as reminder I used this code to apply rotation from the left bug, because if you used the sprite as it is, you will get the same as the sprite above for animation.

Continue reading »