I stumbled yesterday upon my first website I had created. This sure brings back memories on my old desktop PC, and keyboard sitting, and typing away at late nights 😉 http://www.naiksblog.info/shantibhushan/default.html
On another note, it does have some useful notes on Chasen (Japanese language morphological analysis tool), Mecab, Using Python with Chasen, Cygwin etc.
How many degrees angle between hour, minute hand when time is 3:15?
7.5°
360° full circle, therfore (360°/12 hrs) = 30° /hour.
At 3:15, minutes hand points to the 3, hour hand is ahead of 3 by 1/4th (15/60), which is 7.5° apart. (30°/4)=7.5°
Why are manhole covers round?
– Round covers can be easily rotated
– It’s easier to dig a circular hole
– Round castings are easier to machine using a lathe
– Easier to manufacture than custom-made covers
How will you generate random number between two given numbers
Assuming n1, n2 random number between them would be n1 + Math.random() * (n2 – n1)
How will you sort a million integers?
Split them into meaningful subsets, sort each subset, merge subset back
http://neopythonic.blogspot.com/2008/10/sorting-million-32-bit-integers-in-2mb.html
How many windows will be open in a 100 window room if you go around a 100 times toggling each window you come across? All windows are closed initially.
100 windows, all closed.
1st round, you toggle all windows i.e. all windows are opened
2nd round, you close all even-numbered windows – 2, 4, 6, …
3rd round, you open, close odd numbered winodws – 3, 6, 9,…
So after 100 times, windows open are windows who have been toggled odd number of times. For e.g. consider window 12, round 1 will make it open, 2 will make it closed, 3 will make it open, 4 closed, then directly 12 will make it open. Consider again, window 20 – 1 (open), 2 (close), 4 (open), 5 (close), 10 (open), 20 (close). Consider 7 – 1 (open), 7 (close). So window 12 got touched 5 times, window 20 got touched 6 times, window 7 touched 2 times.
So, in order to find “open” windows between 1-100, we have to find number having “odd” number of factors, which means numbers who have one repeated factor i.e. factor by same factor gives the number e.g. 16 has 1, 2, 4, 8, 16 – open window. It has 4 which means 4×4= 16. Consider 20 has 1, 2, 4, 5, 10, 20. No factor is repetitive.
Therefore, let us find numbers which are below 100, but are having square products, similar to 4×4 = 16 starting with 1, which gives 12=1, 22=4, 32=9, 42=16, 52=25, 62=36, 72=49, 82=64, 92=81, 102=100
So open windows are 1, 4, 9, 16, 25, 36, 49, 64, 81, 100 = 1o open windows
A party of four travelers comes to a rickety bridge at night. The bridge can hold the weight of at most two of the travelers at a time, and it cannot be crossed without using a flashlight. The travelers have one flashlight among them. Each traveler walks at a different speed: The first can cross the bridge in 1 minute, the second in 2 minutes, the third in 5 minutes, and the fourth takes 10 minutes to cross the bridge. If two travelers cross together, they walk at the speed of the slower traveler. What is the least amount of time in which all the travelers can cross from one side of the bridge to the other?
Obvious (but incorrect)
Not so obvious (correct answer)
Next…
A party of four travelers comes to a rickety bridge at night. The bridge can hold the weight of at most two of the travelers at a time, and it cannot be crossed without using a flashlight. The travelers have one flashlight among them. Each traveler walks at a different speed: The first can cross the bridge in 1 minute, the second in 2 minutes, the third in 5 minutes, and the fourth takes 10 minutes to cross the bridge. If two travelers cross together, they walk at the speed of the slower traveler.
What is the least amount of time in which all the travelers can cross from one side of the bridge to the other?
Hurray ! I received my bike license today in Japan ! In my first attempt itself ! Wish me congratulations !
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 – “合格” !
I was having trouble with my computer. So I called Richard, the 11-year-old next door whose bedroom looks like Mission Control, and asked him to come over.
Richard clicked a couple of buttons and solved the problem.
As he was walking away, I called after him, “So, what was wrong?”
He replied, “It was an ID ten T error.”
I didn’t want to appear stupid, but nonetheless inquired, “An, ID ten T error? What’s that? In case I need to fix it again.”
Richard grinned. “Haven’t you ever heard of an ID ten T error before?”
“No,” I replied.
“Write it down,” he said, “and I think you’ll figure it out.”
1)On solr.master:
+Edit scripts.conf:
solr_hostname=localhost
solr_port=8983
rsyncd_port=18983
+Enable and start rsync:
rsyncd-enable; rsyncd-start
+Run snapshooter:
snapshooter
After running this, you should be able to see a new folder named snapshot.*
in data/index folder.
You can can solrconfig.xml to trigger snapshooter after a commit or
optimise.
2) On slave:
+Edit scripts.conf:
solr_hostname=solr.master
solr_port=8986
rsyncd_port=18986
data_dir=
webapp_name=solr
master_host=localhost
master_data_dir=$MASTER_SOLR_HOME/data/
master_status_dir=$MASTER_SOLR_HOME/logs/clients/
+Run snappuller:
snappuller -P 18983
+Run snapinstaller:
snapinstaller
You should setup crontab to run snappuller and snapinstaller periodically.
Remember way back when – when you got your first management job. What do you wish someone had told you then? What would be the one tip you would give to a manager just starting out?
My desktop, a Dell Dimension 5150c, purchased about 3-4 years ago, was annoyingly noisy for a while. Last time when I changed the PSU, I thought the annoyance would go away. But it didn’t. The CPU fan, San Ace 80, was the main culprit. At sometimes (which was almost everytime) it used to power the CPU fan so loud, that to listen to music or watch a video, we had to pump up the volume to almost twice than usually should be.
Today I took up in my mind to replace it, and switched to a Kama-Flex.
Superbly quiet, about 2500 rpm, and cooling efficiency nothing comparable to the older one.
Was worth the try!
When i see such advertisements, it really infuriates me.
Are people so “dumb” as to expect this as something new offerred during Golden Week holidays in Japan? In today’s age, is there any ATM closed during holidays? Why then still make such catchy adverts claiming something already people expect, and present it as a beneficial service?