Tag: play

  • Nicolas performing You should be dancing tonight

    Hilarious, isn't it?

  • Spring and Logback

    IoC, or DI definitely takes a perspective turnaround inside your head, but you get around it slowly.  I was playing around ways to integrate LogBack, and Spring – essentially around having Spring give me a pre-created instance of LogBack logger.

    I searched around posts, but most people seem to be against using Spring just for substituting one-line of Logback (Logger log = LoggerFactory.getLogger("LogbackTest");) to get your logger.

    I, on the other hand, was more interested in how to get Spring give me a LogBack logger instance without too much contrived hand-written code to achieve so. And with a bit of reading through Spring principles, documentation I found the way.

    Essentially, when using Logback’s LoggerFactory you have access to only a single getLogger() factory method. This is static which makes things a bit different for what Spring would call a bean – a class providing constructor, getter, setter methods. To circumvent this non-bean style, Spring provides what you call as static initializers a.k.a substitutes for constructors, which allow you to call a static method in lieu of calling a constructor on an object.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
     "http://www.springframework.org/dtd/spring-beans.dtd">
    
    <beans>
     <bean id="bean1" class="org.slf4j.LoggerFactory" factory-method="getLogger">
     <constructor-arg value="LogbackTest" />
     </bean>
    </beans>

    Now, this bean1 can be used as a regular bean inside your class

    ApplicationContext ctx = new FileSystemXmlApplicationContext("logbacktest.xml");
     Logger log = (Logger) ctx.getBean("bean1");
    
     log.debug("This is my first message");
     log.info("How about this information message");

    Throw in a logback.xml in your classpath, and viola you have a nice Spring injected dependency – log in your code, while still using Logback!

  • What do you see?

    What do you see?

    It’s not just an old woman, or a man… if you look carefully.

  • Secretmyth BDRips – audio/video out of sync

    More recently, all Secretmyth BDRips I download started to have a audio out of sync with video issue. Real sad, because the movie quality is too good when watching on a 24 inch screen. I use K-Lite, but it seems SecretMyth recommends either KMPlayer or VLC.

    The problem solved using VLC.

  • Visit to Mahesh’s place in Nishi-kasai

    We had a splendid day today! We were invited to Mahesh’s place in Nishi-kasai. Amrita, Nicolas enjoyed their playtime with little Vibha.

    We feasted on an extremely delicious lunch prepared by Rajshri (Mahesh’s wife) – Puran Poli, with Amti. And not to mention, how tasty the Bhaji was… ahaha yummy!

    The next was a well mixed dish of basmati rice with amti, one cannot describe it’s taste in words unless you eat it prepared from Rajshri’s hands once.

    All of us really enjoyed the short visit to our friends, and we could really say our visit as greatly satisfying (and appetizing) despite of the gloomy, rainy day outside.

    Some very funny moments, especially when Amrita, Nicolas decided to play with Mahesh, and Rajshri.

    We do wish to visit our friend often, and see how Amrita, Vibha’s new friendship grows deeper. Nicolas with his unsatisfied appetite, was eating anything that came in the way of his mouth. Hope he doesn’t upset his stomach with this cocktail of apple juice, bhaji, snacks, rice, puran poli, milk, and vitamin water (phew!)

  • Amrita turns 1 year today

    Our most beloved (did I mention adorable?) daughter turned 1 year today at exact 14:15H Japan time. Phew, it seems ages ago! She took full 3 days to choose to come out of mama’s cozy stomach room. She did give a hard time to her mother – got a sore throat from screaming with contraction pains.

    No matter what, she is the hearbeat of our life. There isn’t a single moment when we do not think of her. Our day starts only to end with her every time. Amrita is the most beautiful daughter for us.

    Today she got in the park with her mama, playing , enjoying the cool weather with mama of course 🙂 and then coming home for a NICE treat – a mango stuffed delicious yummy cake , which of course wasn’t to be eaten alone without her new friend , little Fumi.

    We wish you a HAPPY BIRTHDAY dearest Amrita!
    Roses are red, violets are blue,… whatever – we will always LOVE you! 😀