Tag: al

  • SQL JOINS quick tutorial

    Table T1, Table T2

    INNER JOIN returns only matching rows from T1, T2

    LEFT OUTER JOIN returns (all T1 rows) X (matching T1 rows in T2)

    RIGHT OUTER JOIN returns (all T2 rows) X (matching T2 rows in T1)

    UNION returns only unique rows from T1, and T2.

    UNION ALL returns T1+T2 rows

  • https in 5 easy steps

    Simple 5 step guide to setting up https with your own self-signed certificate
    Prerequisites: Apache2, Ubuntu Server

    1. Generate local keypair
      /usr/bin/openssl genrsa -des3 -out {your domain name}.key 3072
    2. Create self-signed certificate
      /usr/bin/openssl req -new -key {your domain name}.key -x509 -out {your domain name}.crt

    3. Configure your host on port 443 to use the certificate
      <VirtualHost {your ip}:443>
      ...
      SSLEngine on
      SSLCertificateFile {path where certificate is}/{your domain name}.crt
      SSLCertificateKeyFile {path where key file is}/{your domain name}.key

      SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
      ...
      </VirtualHost>
    4. Optional: If you do not want to enter key password each you restart Apache, you can embed the password in key itself.
      /usr/bin/openssl rsa -in
      {path where key file is}/{your domain name}.key -out {path where key file is}/{your domain name}.key.nopass
      Remember to update your Apache configuration to use the new file
      # SSLCertificateKeyFile {path where key fileis}/{your domain name}.key
      SSLCertificateKeyFile {path where key file is}/{your domain name}.key.nopass
    5. That’s it view it. Restart your apache to load the new configuration. And try accessing your url with https://

    If you receive a certificate warning, simply accept it, and proceed. Congratulations, your communication is now encrypted, and safe from prying eyes!

    Self-signed certificate

  • Colors to your life

    Very often we are impressed with awe when we see a beautiful picture, photo, advert. The colors, their combination presents an alluring view just right for our eyes. If you notice more closer, you can seeing that more often the colors are complemented (red with white, green with blue…) to give a undistracted overall look. This is essentially because our eyes find this visually pleasant.

    I have a tool which can offer such combinations, and you should design your color combinations using the suggested patterns

    http://9i9.me/colors/index.html/ – For visually stunning color combinations

    Keep working!

  • Japanese women hate their husbands

    See top searches coming from Google for おっと (husband) in Japanese

    Japanese women hate husbands
    Japanese women hate husbands

    Almost all top suggestions refer to “husband should die”. I wonder what results are returned?

  • Is the lady spinning clockwise? or anticlockwise?

    Which direction is the lady spinning? - Clockwise or anti-clockwise
    Which direction is the lady spinning? – Clockwise or anti-clockwise

    Some see her spinning clockwise, some say anti-clockwise.

  • Optical illusion

    Optical illusion
    The image is stationary, yet you feel it is moving
  • 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.

  • Interesting alternatives to databases in opensource

    I stumbled upon this url. The list of various options on databases is pretty amazing.

    http://www.webresourcesdepot.com/25-alternative-open-source-databases-engines/

    It’s a definite read. I never knew so many existed.

  • Got my bike license – 大型二輪免許を一発合格しました

    Hurray ! I received my bike license today in Japan ! In my first attempt itself ! Wish me congratulations !

    Bike license in Japan
    My bike license in Japan

    Ok some background – I had a bike license from my country. I had not converted it to International License, so I had to opt only for conversion into Japanese license – 外国免許切り替え. I do have a car license obtained in Japan, so I was exempted from written test (which by the way is too difficult, trust me). Instead, I simply had to appear an actual driving test (which is again difficult, mind you). I was required to produce a translated copy of my original license from my country, which can be done in 30 mins in JAF offices. Rest are your passport (both old, new ones), an application form, few stamps which you can buy right there. I live in Tsukuba, so I had to goto Ibaragi License Center, which is situated in Mito. You can go during weekdays, from 09:00AM. Believe me, you better arrive early. There is plenty of crowd, for all sorts of licenses, and usually you have to spend almost whole day there, in case you pass the test and obtain the license. I spent close fo 6 hours today, but in the end I was a happy guy.

    Once they receive your application, they ask you few questions about your original license – How did you obtain it? Where did you practice? What kind of test did you appear for this license? How many cc bike? Learner’s license? etc. Unless there are any problems, you are then handed over a course map, and timings when your test will start. Mind you, the course map is given so that you “memorize” it, period. You are required to drive the exact course map, observing lane rules, traffic signs, signal, right or left indication, speed or slow. The usual advice is that you have some 45 mins in hand before your test starts. Thus, you should actually take the course map in hand, and walk the entire course by foot atleast once. I did that, making a mental note of the lanes, the distance around which I should turn on the indicator, and so on – till I burnt the course map into my brain cells !

    The most difficult are – Ipponbashi, and Slalom – for me. And I did literally walk on foot imagining I was on bike before my test started.

    I believe I was the only one appearing a bike test today – why I was alone sitting in the waiting room till my turn came. The instructor was kind enough to walk me (verbally) through the course map once again. He also gave me a brief about the bike – Honda CB750 – and for my own safety, in case I should fall, had me wear elbow, knee, body protector before the test.

    When the actual test started, the instructor actually sits in a watchtower, from which he had a complete view of the course. Once he gave a go, I just drove the same path I had walked on foot earlier. I was particularly careful about slow down sign, lane change, and making sure that I move my head from left to right wide enough to show that I am taking visual confirmations before proceeding. At one point when making a turn I did step down, but I guess that was OK, because if I’d had done the same on Ipponbashi or Slalom, or even S-letter, or Crank, I am out without any further discussion. Phew, I did feel once the bike will stop during Crank, but I was lucky enough to make it till the final stop.

    In the end, the instructor appraised my driving skills, and gave me the golden word – “合格” !

  • Japanese samurai language

    Japanese language is often interesting, when it comes to dialects. Try out standard Japanese into many other (un)known dialects here.