Wednesday, July 22, 2015

Why do people routinely slam doors?


Some people routinely slam doors behind them, instead of using the door knob or handle to close the door. Here are some of the good answers/reasons I've collected from various forums:


1

I have had lots of kids with Attention Deficit Disorder, they all slam doors, often talk loud, etc. They are distracted, not present to a door. I am pretty sure Einstein did not only slam doors, he also left them open. As i have seen with my ADD kids lol 

2

It seems like as people started giving more attention to their handheld devices and computers, i.e smart phone phenomenon,
they started losing the ability to navigate conscious life gracefully/graciously.

3

I attribute it to selfishness and laziness & perhaps a bit ego based (making sure their presence is noted)

4

My autistic boy is the one who slams them but he can't operate the door handles so he slams them to make sure it shuts. He hates loud noises unless it's him that is making them, that is when he loves them.

5

My roommate slams the shower door, kitchen cupboards, bathroom door, refrigerator door and her room door. I think it is so inconsiderate and telling of how immature she is. I have asked her to stop, to no avail. I realize that her room door often gets stuck and requires a little pushing but she also does little stuff like slamming the toilet seat down. 

6

I think it's mostly lack of awareness. They are not conscious about the other people around them, nor the noise they are making.

7

Basically bad manners, lack of consideration for others, lack of mindfulness and maybe fear of the quiet

8

Because they just don't care about what's behind them. Not the door, not the room they leave, not what occupies the space they have left. They just don't care.


------------------------------------

Here are some advise to people who are dealing with these kind of person:


1
If it bothers you that much...install some foam or slow closing doors/cupboards. Talk to her again. Move out or ask her to move out.

2
I'd sit down and have a talk with your roommate. Just say that you're very noise-sensitive, and that the sound of slamming doors is very abrasive to you. Or something to that effect; put it in your own words. If your roommate likes you and is a considerate, respectful person, they'll try to abstain from slamming every door, and will be quieter.


3
Show them how to properly close the door just like this kid in the picture


-------------------------------

If you think above advises won't work, just ignore them. It is either they will stop if they realize that you are not affected by it or you will get use to it but don't do the same thing. 

Monday, July 14, 2014

Takipi T-shirt

As promised, here is the free t-shirt I got from Takipi. =)



It took me a month to receive the package but it's okay since it was a package from USA to the Philippines. 

By the way, Takipi no longer provide free trial of their product (and sadly no more free t-shirt). I hope I will be able to evaluate more software (and get freebies too!).

Wednesday, May 28, 2014

Takipi -- Tool for monitoring Exceptions in a Java Application

I came across this very nice monitoring tool for java application while looking at my news feed.



Honestly, I was first interested in getting the t-shirt that's why I started installing Takipi on my laptop. =)

Anyway to share my experience, I had problem running it in my laptop because I was using Java 6 for 64-bit. My Java 7 is only 32-bit so I had to install 64-bit version of Java 7. The installer doesn't clearly say the problem. You will only find the problem by logging in to Takipi and the error is shown in Dashboard as "Incompatible JVM"



So after installing 64-bit JDK 7, I configured Takipi on my Eclipse IDE and run my first application. Takipi will keep asking you to throw an exception. So I created a small app that will throw an exception. 

Exception 1




Exception 2






However in Takipi Dashboard, it doesn't show any of the exception thrown by my application.
I contacted their support thru their website and got a response from their Project Manager. He was very accommodating and provides helpful information. He told me that the tool is actually made for Production use and the application should be running for more than 60 seconds before it can catch any exception I throw.

So I updated my code and added the following:




After running my application, Takipi Dashboard now shows the exception thrown by the application.



The following information will be shown when View button is clicked.


It also shows the code snippet that causes the exception. 




You will also get an e-mail notification whenever an Exception is encountered.





This is indeed very helpful tool in investigating a problem in a production environment and will greatly help the developer in looking for the affected code instead of spending a lot of time replicating the problem in local machine to be able to debug and find the same code snippet that causes the problem. Not to mention the clip arts used in every part of the presentation of data is very entertaining.

To start working on Takipi, go to their application website: https://app.takipi.com/

Instructions are simple and easy to follow:



Enjoy throwing exceptions! :)

---------------------------------------------------
By the way, I already redeemed my free t-shirt and provided the delivery information. I'll update this blog post once I get my free t-shirt. 

Wednesday, April 23, 2014

Passing System Property Resource from JNLP file to Java Webstart

Java have changed the way how system properties are passed from jnlp file to the javaws (Java Webstart).

Since the update of Java to 1.7.0_45, getting the system property using the following code will no longer work:
System.getProperty("myproperty");
There are two solution for this issue:
1. You need to sign the jnlp files

     See this link for instruction:
     http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/signedJNLP.html

2. Update the JNLP files to have additional prefix in the resource string variable

     Example: For log4j.configuration, here is what you need to do:
<resources>
<j2se version="1.7"/>
<jar href="lib/log4j-1.2.16.jar"/>
<property name="jnlp.log4j.configuration" value="file:///C:/log4j.properties "/>
</resources>

---------------------------------------------------------------------------------------------------------------------------------

I haven't tried the #1 yet because it is quite complex. Option #2 is the quickest solution. However, you need to update your program to also add a prefix when reading the system property.
System.getProperty("jnlp.myproperty");
For backward compatibility, it is recommended to always check for the old variable before using the new variable.

       String property = System.getProperty("jnlp.myproperty");
       if (property.isEmpty())
       {
             property = System.getProperty("myproperty");
       }

Feel free comment if you still encounter any issue related to this.

Credits to:
https://community.oracle.com/message/11239354

Monday, April 21, 2014

Launch Internet Explorer inside Google Chrome

According to a statistics, 56.4% of internet surfers uses Google Chrome followed by Firefox and Internet Explorer respectively.

Below is the latest statistics from w3school:

For Chrome users like me, we sometimes need to have alternative browser whenever a website we open is not compatible with Google Chrome. There are some website that doesn't open correctly or sometimes doesn't open at all in Google Chrome thus we had to open Internet Explorer just to open certain websites.

Good thing I discovered a Google Chrome Extension which allows you to open Internet Explorer inside Chrome!

Here's how it looks like:



You simply have to install the IE Tab extension from this link:
https://chrome.google.com/webstore/detail/ie-tab/hehijbfgiekmjfkfjpbkbammjbdenadd

Then once installation have completed, open the website normally by entering the url in address bar then click the IE Tab icon on the upper right side.

Now you will have the website opened in Internet Explorer inside Google Chrome.

For Firefox extension, see this link.

Credits to:
www.w3schools.com for the browser statistics

Monday, April 14, 2014

Fairy Tail 13th opening song - Breakthrough by Going Under Ground - Lyrics



Tanjun dakedo junsuina yatsu
Sono me ni wa itsumo utsutte itanda
Taisetsuna mono ashita no koto
Hontou no tsuyosa ga nanikatte koto

Kimi no koto wo omoidashite
Chippokena jibun ga okashiku natta
Nani mo kamo houridashite MIRAKURU misete yaru

Mae ni mae ni motto mae ni zenryouku de kakero
Zettai kouda to omotta toki ga unmei sa
Seiippai no koe de motte SOURU motte butsukatte ikeyo
Sankousho wo nirande tatte nanimo nan nee sa

Honne doushi de kenka shita toki
Wakari aenai to omotte itanda
Demo itsumademo kienakattana
Mune ni nokotta chiisana kakera

Kimi ga mite inakutatte
Mou boku wa nigedashitari shinai sa
Kono karada hitotsu motte MIRAKURU misete yaru

Mae ni mae ni motto mae ni zenryouku de kakero
Zettai kouda to omotta toki ga unmei sa
Seiippai no koe de motte SOURU motte butsukatte ikeyo
Sankousho wo nirande tatte nanimo nan nee sTanjun dakedo junsuina yatsu
Sono me ni wa itsumo utsutte itanda
Taisetsuna mono ashita no koto
Hontou no tsuyosa ga nanikatte koto

Kimi no koto wo omoidashite
Chippokena jibun ga okashiku natta
Nani mo kamo houridashite MIRAKURU misete yaru

Mae ni mae ni motto mae ni zenryouku de kakero
Zettai kouda to omotta toki ga unmei sa
Seiippai no koe de motte SOURU motte butsukatte ikeyo
Sankousho wo nirande tatte nanimo nan nee sa

Honne doushi de kenka shita toki
Wakari aenai to omotte itanda
Demo itsumademo kienakattana
Mune ni nokotta chiisana kakera

Kimi ga mite inakutatte
Mou boku wa nigedashitari shinai sa
Kono karada hitotsu motte MIRAKURU misete yaru

Mae ni mae ni motto mae ni zenryouku de kakero
Zettai kouda to omotta toki ga unmei sa
Seiippai no koe de motte SOURU motte butsukatte ikeyo
Sankousho wo nirande tatte nanimo nan nee saa

Tuesday, April 8, 2014

Changing log level in log4j without restarting your application

For instance,  you have an application deployed in production and you need to set the log level to debug to investigate an issue. Normally, you will edit the log4j.properties and restart the application in order to have the changes take effect.

What if there are many users currently logged in to the application and you are not allowed to restart?

Will you wait for every user to logoff? What if there are 24/7 operations running on the application?

In that case, restart is not an option. Reverting the log level back to original will also require another restart.

Solution
Implement Log4j file watchdog


Although you will still need to deploy code changes to implement the watcher, you only do it at first then the succeeding changes on your log4j configuration (log4j.properties) will no longer need application restart to take effect.

Here's how it's done
org.apache.log4j.Logger logger = null;
org.apache.log4j.PropertyConfigurator.configureAndWatch("C:\\log4j.properties");
logger = org.apache.log4j.Logger.getLogger("");
logger.info("Info Message");
logger.error("Error Message");
logger.warn("Warn Message");
logger.trace("Trace Message");



No idea on what is log4j and how to use it?
Visit https://logging.apache.org/log4j/1.2/

Saturday, April 5, 2014

Ragnarok Online is now on Android!

The first and the best MMORPG is now on Android!



Finally, I will be able to play our favorite RPG without going on my PC or laptop.
It's been 10 years since I played this game and now I can play it anywhere as long as there is internet.

Share this with your old friends and reminisce how you manage to defeat your strongest bosses such as Baphomet and Osiris! Explore the wildest dungeons of Glast Heim (GH). 

Quick Tips:

For starters, it's best to hold a Knife and kill as many Porings as you can kill before moving to next maps. Don't feel guilty killing these cute little pink porings as they will keep on spawning and will never be extinct. If someone else tries to kill your poring, say "Wak pow sawsaw!" because experience points will split.

Poring

When you form a party, don't forget to have a Acolyte or Priest and politely ask "Pa Heal Pow" before you become "deds" and don't say "Amp!".
We you see a friend on a map, call him "Oist!" or if are trying to mock him, "/gg"

/gg - means Good Game


Credits to:




Naruto Shippuden 357 - An Uchiha ANBU




When they learn that they are to be joined by Itachi Uchiha, the current members of the Anbu decide to test the young man's mettle. Meanwhile, Guy makes a bid to Hiruzen to let him join the Anbu after realizing that Kakashi is becoming withdrawn. However, Guy's request rejected by not only the Third Hokage, but also by Danzo who deems him be lacking the quality of "darkness". Fugaku congratulates Itachi for his enrollment into the Anbu reminding him of his obligation to the Uchiha, Danzo tasking Itachi with keep them informed of the clan's actions. Danzo and Hiruzen orchestrate a two-sided mission against the Hannya Black Ops, who they suspected to have double-crossed them: Guy, Kosuke, and two other ninja sent to exchange scrolls while unware that Kakashi and Itachi were sent to assassinate. A battle ensues and the Hannya are defeated, Guy watching in horror as Kakashi and Itachi carry out their mission. Returning to the village to be debriefed, fearing for his friend's state of mind, Guy pleads with Hirizen to relieve Kakashi of his duties in the Anbu. Meanwhile, in the Naka Shrine, the Uchiha hold a meeting with Itachi reporting the standing of the village as Shisui watches on. As he sat down, Itachi spots the stone monument behind his father and begins reading it with his Sharingan. 

Source: http://en.wikipedia.org/ 
Watch the episodehttp://animecrazy.eu/anime/naruto_shippuden-season-1-episode-357



Team RO ANBU Captain Kakashi

Wednesday, April 2, 2014

ConcurrentModificationException when you see nothing wrong in the code!

You may sometimes encounter exception such as ConcurrentModificationException and tried to look at the code with the given stacktrace and see nothing wrong. 

java.util.ConcurrentModificationException
 at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
 at java.util.HashMap$KeyIterator.next(Unknown Source)
 at c2.server.SessionManager.expireSessions(SessionManager.java:130)
 at c2.server.SessionExpiry.runThread(SessionExpiry.java:49)
 at c2.prm.IThreadAdmin.run(IThreadAdmin.java:276)

When you look at the code in SessionMager.expireSessions(), this is how it looks like:

                Set activeSessions = new HashSet();
                for (Iterator iterator = activeSessions.iterator(); iterator.hasNext();)
               {
                 Session session = (Session) iterator.next();

                 if (isSessionExpired(session))
                 {
                 activeSessions.remove(session);
                 }
             }

The exception is thrown in the highlighted line. On first look, were you able to pinpoint what's wrong in this code?

I admit. I didn't see what's wrong at first. I did a lot of research on google and tried few suggestions but nothing worked. My project is built on Java 1.3 therefore it's not easy to apply a fix especially if the code is not compatible.

After asking someone to have a second look and while explaining the situation, I finally realized what was wrong. It is the following line:

               activeSessions.remove(session);

So what it is trying to remove was an object from the collection itself!

By now you should have guessed the solution to this?

If you still haven't realized, the following is the solution.

                Set activeSessions = new HashSet();
                 for (Iterator iterator = activeSessions.iterator(); iterator.hasNext();)
                  {
                 Session session = (Session) iterator.next();
                
                 if (isSessionExpired(session))
                 {
                 iterator.remove();
                 }
                 }

Highlight to see the answer :)
AOL Directory Sumbit Url
Submit Site to Yahoo