Friday, December 14, 2012

cyberoam traffic management and QoS - solved

In an earlier post, I had mentioned how excessive "other" usage was causing issues with live audio streaming. Finally we seem to have hit upon a solution which does not need manual intervention or restarts of cyberoam.

The trick was to add a rule to reject all traffic at the Live times below the rule which allows traffic at the Live times on applying QoS rule of lower priority. There were a few hiccups due to the Live time schedule info changing during a Cyberoam upgrade - after the upgrade, we are able to set it only in intervals of 15 minutes instead of 1 minute intervals. But still, the rule appears to work fine now. I had set the traffic to be limited to 1 Mbps, and the traffic graph reflects it.

Now probably I can relax the rule to allow upto 4 Mbps traffic, but keep the QoS rule of lower priority for other traffic and higher priority for the live audio streaming.

Wednesday, December 12, 2012

more about making fulldome images from panoramas

My earlier observation about the panoramic image needing to be stretched 2.5 times vertically as a rule of thumb seems to be valid only for those pans which have exactly the same field of view as that particular pan! Trying out more panoramas, found that if the image appears vertically compressed after making the panorama, we need to crop the initial image by cutting off some of the top and bottom to make it more strip-like, then resize with stretching to a square shape, and then polar distort. The resizing to make a square is actually not essential, but it allows us to standardize on the image size as 2048x2048 etc. And conversely, if the image appears vertically stretched, add more sky at the top if cropping is not desired.

Then the pre-processing of the pans - the pan can be made straight with the help of the ruler by dragging it down in Gimp as mentioned at this page.

Tuesday, December 11, 2012

more details of rotating Pans on the dome

As mentioned in my earlier post, I'm using blender to rotate Panoramic images made into fisheye fulldome frames. By trial and error, got some insights on what looks good on our dome. A rotation from -30 degrees to +30 deg in 10 seconds is too fast. A 30 second clip seems desirable, and with only -15 deg to +15 deg of rotation.

For creating keyframes in blender, shortcut key is I (i, not L). In 3D view, select the object by right-clicking, N for numerically entering location/size values, press I after entering the desired values. Move to the next required keyframe, repeat the above. The rotations speed up and slow down at begin and end points by default - some sort of spline for velocity changes. Click on the Start and End frame to edit number of frames.

To delete a keyframe, one way is to go to Dope Sheet view, select the keyframe by right-clicking on it, and hitting the X key, or Key -> Delete Keyframes menu item.

Monday, December 03, 2012

bounce processing - flush file if too large

Bounce processing is one thing which keeps failing in the Sai Inspires list. And if the bounces are not processed, more emails will get bounced due to Yahoo and others thinking that we're spamming, and that makes the whole thing a mess.

I have been manually checking at the eventlog in phplist for the bounce processing messages. But instead of that, thought I would write a script to automatically check if the bounces file is too large - it will be large if it has not been processed, and then the processing will continue to fail, so we have to flush the file and start retrieving fresh emails as given at

So, have written a script to run as root cron,, with inspiration from this post, something like this:

CURRENT_DATE=`date +%Y-%m-%d' '%H:%M:%S`
find $FILE_TO_FLUSH -size +2k

while read file; do

  echo "$file is too large = $(stat -c%s "$file") bytes, flushing it with rm   and touch." > $MAIL_FILE

  mail -s "Automatic Bounce message check at $CURRENT_DATE" -c $MAIL_COPY $MAIL_DESTINATION < $MAIL_FILE

  touch $FILE_TO_FLUSH
  chown therelevantmailaccount:mail $FILE_TO_FLUSH
  chmod 660 $FILE_TO_FLUSH


The cron runs as root for the permissions required. I'd tested it with a dummy mail file which I tried making bigger / smaller etc. Today, 6 days after I made the script and put it in the cron, I got a mail from root with /var/mail/relevantfile is too large = 9209549 bytes, flushing it with rm and touch.

Virtualdub audio filter graph manipulation

Googled for help in manipulating the graphs in Virtualdub audio filters. Found this page which explains how to add and remove connections.
"To connect filters together, drag from an input pin of one node to the output pin of another. (Counter-intuitive, eh?) .... As with nodes, connections may be selected and deleted."

Sunday, December 02, 2012

f4v post-processor for playing f4v files

B wanted the audio from some f4v flash video files. Though I had flash video directshow codecs, the files were not opening in Virtualdub using AviSynth. Googled and found this page which guided me to the Adobe download site, where this explanation is given:
"Adobe Flash Media Server version 3.5 and later and Adobe Flash Media Live Encoder 3 can record content in MPEG-4 (F4V) format using an industry-standard recording technology known as "fragments" or "moof atoms." Some MPEG-4 compatible tools and players do not support moof atoms, and therefore cannot recognize files recorded by Flash Media Server. The F4V Post Processor tool aggregates the information from all the moof atoms into a single moov atom and outputs a new file. Use the F4V Post Processor tool to prepare F4V files for editing in Adobe Premiere® Pro, delivery over HTTP, or in video players that support H.264 and AAC formats, including Adobe Media Player."

So, I had to run the files through the f4vpp.exe and extract the audio from the post-processed files. The f4vpp process takes around 45 seconds for a 200 MB file and so on on my machine.

Saturday, December 01, 2012

irctc booking tips invalid

The new rules at the Indian Railways ticket booking site have made most of the old tips invalid. The mobile site used to be more responsive, but now booking is not allowed from the mobile site between 8 am and noon. Tatkal ticket booking is allowed only after 10 am and not at 8 am. "Quick Book" is also not allowed 8 am to noon. Also, the Tatkal ticket is available for booking only from the day before the journey date (and not two days before).

The mobile site uses user agent detection to redirect desktops to the desktop site. This detection is not so great - my HTC Wildfire with Android 2.3 has the default browser as well as Opera mobile being redirected to desktop site despite the mobile version setting being turned on. But User Agent switcher addon for firefox does the job with ease.

Edit: A couple of tips learnt from my experience this morning with Tatkal booking.
  1. Patience is a virtue - try, try, try again. On the third trial, after one hour of timeouts and service unavailable messages, got through.
  2. One timesaver would be to copy the From and To station fields in their entirety logging on to the site a few minutes before the 10 am deadline. Then, you can avoid waiting for the station pop-up, by pasting this info directly into the box. Confirmed working on Firefox.

wifi connection issue with HTC Wildfire

This morning, the HTC Wildfire refused to connect to wifi at work - kept saying "Scanning" after wifi was enabled. Reboots did not solve the issue. After I took it home too, it continued to refuse to connect. Many scary scenarios are described on the web, like having to do a factory reset. Anyway, turned on Airplane mode, turned off Airplane mode, and hey presto, wifi working again. In the evening after going back to work too, it connects without a hitch.

So, the solution was a simple Airplane mode toggle. Probably some hidden bug.

Thursday, November 29, 2012

why people hate phone companies

A lot of angst is due to unpleasant surprises, I guess. And also mis-communication. I saw an attractive scheme, RC21 on Airtel, wherein we can call US lines, UK landlines for 4p per second, Gulf for 11 p per second and so on, for 30 days. Charged with it on 31 Oct. I also had an active RC33 - all domestic calls, local as well as STD, at 1 rupee for 3 minutes, for 90 days. On 9 Nov, I recharged this RC33 since the 90 days were over. And then when I made ISD calls, was charged the full rate. Lost around Rs. 200 like this before I noticed. I thought this might be some issue with Airtel, since my 30 days were not yet up. Customer care did not explain the reason for this to happen the first time around - they either could not understand the issue or could not communicate. Email using the form on airtel website gave me an auto reply saying they would revert in 2 days, but there was no response. Called again, and got the explanation from the supervisor that the RC33 had overridden the RC21, only one benefit at a time!

What could Airtel have done to not cause this customer to be unhappy? They could introduce SMS alerts whenever  benefit recharges expire. Or even a single line in the recharge SMS for special recharges, saying that this recharge now over-rides other recharges etc. Or, of course, the best option would be for them to allow multiple benefits, but they may have business cases against that option.

Wednesday, November 28, 2012

taking screenshots with HTC Wildfire android phone

I'd installed Remote Web Desktop and wanted to take some screenshots. From the help page, found that I needed the USB driver installed if I wanted screenshots from my non-rooted phone. Many posts give different directions. This post as well as this one give the lines to be added to the inf file so that the HTC Wildfire will be recognized and the ADB driver installed. But on my install, though I added the following lines,
; HTC Wildfire
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C8B

%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C8B&MI_01
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0C8B
to the android_winusb.inf file, the add new hardware wizard did not recognize this folder as containing a suitable driver. Checked with USBDeview as given at this post, and the device instance had the serial number also in it. So, tried editing the inf file again, with
; HTC Wildfire

%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C8B\SH18NPY09904
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C8B&MI_01
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0C8B\SH18NPY09904
where the last few digits have been changed to hide my actual serial number :)
That also did not work. Then, these posts indicate that installing HTC Sync would solve the driver issues. So, went over to HTC's site, downloaded HTCSync for Wildfire S hoping it would work for my Wildfire as well, installed, worked - the new hardware wizard recognized the phone in USB debug mode now.

Remote Web Desktop needed the install_capture_service.bat to be run before doing screen capture in the web desktop window. Did so, and it worked.

Unfortunately, though the software mentions that the screenshot service has to be re-installed if the phone is rebooted, in practice, it has to be reinstalled if the Remote Web Desktop service is restarted, too. Have to go through
  1. Enable USB Debugging (didn't want to leave it on all the time)
  2. Start Remote Web Desktop service
  3. Run connect.bat, open a browser window and wait for Remote Web Desktop to appear, and then install_capture_service.bat
  4. Now take the screenshot as desired.
Edit: Found that the reason for requiring re-installation is that the service is not going into the background - ran it from terminal and found it was giving an "Operation not permitted" for going to the background. Hence has to be run every time...

documenting the process of changing a filename

When we have to change a filename on one of our broadcast files, we have to do the following:
  1. Ensure that the file is not currently in a pending playlist, or take suitable precautions like a backup copy of file.
  2. Rename the file in the local server saiwaves in both ~/audio as well as /local/audio24
  3. Rename the file or make a copy in ~/TOWRITE24KBPS and ~/TOWRITE96KBPS
  4. Make changes to both downloadfilename and filename in the local database
  5. Rename the file or make a copy in
  6. Rename the file or make a copy in the playout server
  7. Make changes in the web server database by logging in to Plesk.

Wednesday, November 21, 2012

optimizing phplist tables

Saw that our bounce processing on krishna was slow. Followed this advice, and did some table optimizing.

Optimize table for the bounce table, and optimize table for the user_user table. For this, logged on to mysql commandline client using the credentials mentioned at the phplist config file, and used the table names after listing them - we have custom table name prefixes.

mysql -u user -p (will ask for password)
mysql> show databases;
mysql> use my_database_name;
mysql> show tables;

 etc. as given here. Bounce table optimization took two and a half minutes, user_user table took 8 sec.

But still, the bounce processing takes a good half an hour or forty minutes. So, decreased the frequency of the bounce processing cron jobs, commented many of them out.

bounce processing speedup in phplist

Saw that our phplist installation was not showing any bounce process events in eventlog. Tried the purging of mbox method to make it operational again. Still did not see any bounce events the next day. Tried it manually by copy-pasting the crontab commands to the shell. Found that the bounce processing was taking around half an hour. Googled, tried out this solution. Implemented it using the mysql shell, guided by this command reference again got by googling and by using the username and pw in the phplist config file. Optimize table for bounces took under three minutes. For the user_user table, it took only 8 seconds. Unfortunately, at some point, I interfered with a cron job of bounce processing, so it started giving the message "A process for this page is already running". Googled and found my own post (!) on how to resolve the issue - run it from the web interface. Now the bounce processing takes only around 20 minutes.

Sunday, November 18, 2012

matlab work

Dr. S. wanted a bugfix for viewer3d.m which is work circa 2005 (or earlier?) It was working for Cardiac SPECT images, but not for Bone SPECT images. Error message was from interp3, complaining that matrix dimensions should be equal. Checked the images, found that the working images were 64x64 while the non-working images were 128x128. Luckily my Matlab install in Dharma was still intact. Found a line in the code,
Replaced this with

Now it works, except there is another bug which manifests if the number of images is less than 9. Have saved that bugfix for a rainy day :) Dharma worked just long enough for this fix, now it's not booting!

Wednesday, November 14, 2012

stellarium for displaying panoramas - nope

Explored Stellarium for display of panoramas in our mirrordome, using the camera move and mirrordome distortion capabilities of Stellarium 0.10.2. The pan is shown dimmed in stellarium, so the way to go for full brightness panoramic views would be to create fisheye images using this technique and rotate them in blender for a camera pan effect. Mapped onto a square surface in Blender, rotated it.

Monday, November 12, 2012

using stellarium for generating fulldome scenes

Tried out both stellarium and blender for generating fulldome scenes for our mirrordome setup. Using the starball file from Ron Proctor, rotated it by 30 degrees or so over 250 frames - 10 seconds of 25 fps video. Rendering took seven hours at around 90 seconds per frame. Using stellarium, I could generate starfields and rotate them in real-time, and capture using tools like Fraps and Taksi. Performance-wise, Fraps is better, and is more user-friendly. But Taksi's price is right for me - free.

Initially had some trouble setting up Taksi - things to note are:
  1. The capture shortcut key must be chosen so that it does not interfere with the software from which you're capturing. For eg. the default F6 key causes the Location window to open in Stellarium.
  2. Taksi does not capture with some of the available codecs, for eg. those codecs which are decode-only, obviously! So, we have to choose the codec with care. Xvid seems to be OK, but frame-rates drop quite a bit due to processing overhead. Have to compensate by playing the scene slowly and speeding up the captured video later.
  3. Had trouble hiding the gui with Stellarium 0.10.2 - the
    core.setGuiVisible(false) ; //hide tool bar
    doesn't seem to work. Upgraded to 0.11.4 and then found that the 0.10.2 was the last version where the mirror warping worked! Alexander has upgraded this bug to Critical, so hopefully it will be fixed soon. Merely installing 0.10.2 over 0.11.4 did not work - Stellarium did not load correctly at all. Uninstalled and re-installed, restarted, then it worked.
  4. Since my laptop display is 1280x800, in order to get a higher resolution screen capture, hooked up an external monitor. The AOC Spectrum 7VIrA did support 1920x1080, but not 1600x1200. Had to go to
    NVIDIA Control Panel -> Set up multiple displays -> Only use one display
    for getting single display mode - the short-cut Fn-F5 was not working. Even in single display mode, the screen-grab of KMPlayer did not show the video. But stellarium was being captured OK at around 4 fps by Taksi (with Xvid codec) and 12 fps by Fraps (with it's own Fraps codec). Single display mode was required, because even though stellarium gets captured in dual-screen mode, it uses the resolution of the primary monitor - 1280 x 800 in my case and not the 1920 x 1080 of the secondary monitor when switching to full-screen mode.
  5. This version 0.10.2 has a bug with the auto-hidden toolbars not popping up when moving the mouse to the left corner. Have to use false flags for auto_hide_horizontal_toolbar and auto_hide_vertical_toolbar in the config.ini at
    C:\Documents and Settings\\Application Data\Stellarium
  6. Tried out a script with screen capture after moving one degree, works.
    for(azi=90; azi<=300; azi+=1)
    core.moveToAltAzi(alt, azi, 1);
    core.screenshot("myscreenshot", false);

using a usb mem key drive to improve speed

Using flash memory for virtual memory does speed things up a bit on old computers - A asked me about it, I passed on this to him -

On Windows XP, it is this way:

Right-click on My Computer

Choose Properties

Choose the Advanced Tab

Click the Settings button under Performance (Visual effects, memory usage, etc)

Choose the Advanced tab

Click the Change button under Virtual Memory

Choose your USB mem key drive letter, choose custom size and enter the amount based on how much free space is available on your USB mem key. More than 4 GB would be good.

Choose the other hard disks drive letters and choose "No Paging File" for those disks.

Choose OK and restart the computer.

Of course, once you have set the paging file like this, you should not unplug your usb drive when the machine is on :)

Saturday, November 10, 2012

more options for making web radios on the cheap

A follow-up to my earlier post, here is another el-cheapo web radio, elegantly simple with power over ethernet, for parts under $30 if we sacrifice the display etc - found via -

I did contact Watterott, but they are busy for the next 6 months. Plus the mp3 decoder card used has now been superceded by a new model, so some changes would be needed to the design.

Tuesday, November 06, 2012

extracting audio from video file - without virtualdub etc

For non-technical users, extracting audio from video files like flv files or mp4 files can be done using VLC - this post shows how in detail.

panorama mapping formula

As mentioned in my previous post, the field of view is what decides the "stretching" if needed. As an empirical test, the original stadium pan in this post seems to be around 120 degrees horizontally and around 60 degrees vertically. So, vertically it would need to be multiplied by 3 to cover the full 180 from front to back, and horizontally it would need to be multiplied - again by 3 - to cover the 360 degrees all around the observer. And indeed, using white space instead of cloning to save time, using an image where the pan is the ower middle tile in a 3x3 set of tiles of the same size as the pan,

we get this polar image, which seems to be quite undistorted.
If we keep the same aspect ratio as the orig of this pic and reduce the white space, we get more coverage of the dome with the image. The extreme case of this would be to use the pan itself without any padding, since the padding is equal in horiz and vert directions in this case. Then we get this,
where we can see that the Hanuman statue which is further away from the horizon seems to be vertically stretched. On the dome also, it is seen to be vertically stretched. So, in general, we should shoot for images which are near the horizon, and we can clone the sky or mirror the image for filler.

Sunday, November 04, 2012

more on using panoramas on fulldome

But my posts so far have been for using a shortcut to displaying the panorama on the dome. Finishing up my previous post, here is the pan with the "visible" region having the interesting part of the pan, with the rest of the image filled with a mirror image and white space on top (which could have been replaced with "sky".) The amount of stretching required seems to be a bit ad-hoc, depending on the field of view, I suppose. If the field of view is more, then probably the stretching may not be required? Anyway, this was stretched 2.5x, and made into a rectangle and not a square before making polar - implying more stretching in that process.

Flat image, stretched and mirrored:

and the polar version,

For better results, I guess I should map the pan onto a cylindrical surface and use the view from the fisheye camera in Blender.
I'll check out the above image by animating it to make a full circle and watch it on the dome, and then proceed.

Saturday, November 03, 2012

displaying panoramas on fulldome

I had explored displaying panoramic photos on our mirrordome setup in an earlier post, just using Filters -> Distorts -> Polar Co-ordinates in Gimp on a square image. Here are some more details. The filter dialog box was as below,

Here, the map backwards prevents the resulting polar image from being left-right inverted. If Map from top is removed, the result is like these mini planets. The offset angle is entered so that Hanuman statue is centred on the resulting fulldome image.
Merely adding more 'sky' and making the pan square is not enough. The resultant fulldome image will appear squished down vertically. Example below.

This image, which is square,

becomes this image on doing polar co-ords distort

So, the image has to be vertically stretched 2.5x for it to look reasonably good. The image below is stretched 3x, it looks a bit vertically elongated on the dome:

3x stretched pan made into a square,
and then polar:

Now, if the image is not made into a square, still the polar distortion can be done. But the resulting image is as if the original had been stretched to make it into a square and then the polar distortion was done. For example, with this original image,

we get this,

which is the same as we get if we distort this image got by stretching the pan into a square,

Now, these are not 360 degree pans - more like 180 degrees or even less. Assuming 180 degrees, we would get an image like this if we were to add white space for the missing 180 more degrees - I have put in a text background colour to highlight the white space.

But this also yields a vertically squished image,

As our audience is front-facing, the region which is well visible to our audience is highlighted below,
So I can try and make pans with some clouds or a fade-to-grey or something for the non-visible part, and push the relevant pixels into the visible part. The non-visible part is around 25%, so we can try adding 25% to the width of the image and then making it polar.

Friday, November 02, 2012

HTC Wildfire update

The HTC Wildfire mobile phone informed me of a 4 MB software update, 2.25.720.4. Downloaded it on the phone, said that it needs to restart phone after the update. I was updating Opera, so waited till that finished before going back to the software update. For this, I had to go to Settings -> About Phone -> System software updates

Once the update was installed and the phone rebooted, it took a good 10 minutes to boot up. The HTC welcome screen ("quietly brilliant") was displayed for a while, then the lock screen came on, on unlocking also the HTC welcome screen, finally a progress box with percentages display, finally booted to the home screen.

using an xp machine as gateway

N wanted to use an XP machine as a gateway for a LAN which is normally not connected to the internet. Googled it and found that to use Windows XP as a router, it's a simple registry edit,
HKEY_LOCAL_MACHINESYSTEM  -> CurrentControlSet -> Services -> TcpipParameters -> IPEnableRouter
should be set to 1.

Step-by-step instructions on how to set gateway properties on each of the machines etc is given at

our DKIM keys

This story in Wired prompted me to check our DKIM key length for - this post indicates I have used 1024 bits, safe for now.

colour correction for mirrordome

As mentioned in my previous post, the colours in our projection were not very accurate - highlights washed out and so on. Changed the modes on the projector and viewed the blu ray movie which came along with the projector. With that movie, the modes sRGB, movie, presentation and bright all looked similar. But with our Darshan video, movie seemed a bit too reddish, with a slight excess of brightness over contrast. Presentation looked better, so currently have set it to presentation.

Tuesday, October 30, 2012

a brief descent into cell-phone purgatory

I had taken out my Airtel SIM card to try out radiosai using GPRS on an iphone and a windows mobile 5 phone. After putting it back into my HTC Wildfire Android phone, the phone started giving flash messages with junk characters at the rate of 3 messages every five minutes. The messages had two options - save or cancel. If saved, they were saved to the messages folder. The messages looked like this:
Q$ΦIΓ#OB@é(AR7kJM¥ jÆΨ3¡$d0
And when saved were seen to be from the number 4204.

Three messages every five minutes is too much to bear, right? Tried calling Airtel customer care. I did not know what exactly to ask them, I said junk characters are seen on my phone like a flash message. They said they will disable flash messages for my number. But the messages kept appearing. Went upto supervisor on Friday and Saturday. Still no respite - supervisor said that they are logging the issue, expect a resolution time of 48 hours. But till Tuesday, no respite.

The messages would stop at night after 9.30 or 10 pm and would start again the next day after 9 or 10 am. So I was led to believe this was some sort of message being sent by Airtel. But then I was wrong.

Finally thought of google - googled flash messages on airtel htc wildfire and found that these could be due to cell broadcast messages. Then googled disable cell broadcast htc wildfire and found this link which says Settings -> Call -> Other Call Settings -> Cell broadcast. But on my phone, it was in Settings -> Call -> Cell broadcast and was already disabled. I enabled it and then disabled it. And that resolved the issue!

recovering from rm *

V did an rm * on his system when trying to delete his Skype folder. Trying to recover deleted files from his Ubuntu Linux system with PhotoRec by booting with a Live CD.

We needed a root shell to go into the folder and run it - used sudo -i as given here.

Tried recovering from the unallocated space - 153,174,016 sectors - initially it estimated around 4 hours to completion. Actually took 8 hours. And it recovered 320,000 files in 600+ recovery folders! Digging out the actual files which were needed out of that mountain was another task, trying to use
find /folder/where/recovered/files/are -name '*ods'
didn't yield any results, probably open document spreadsheet files are not recognized as such by photorec and are saved as generic binary elf files?

Next step was a search within files for a known string contained within the file, like
find /folder/where/recovered/files/are -exec grep -l "Jaya Jaya" {} \;
But that takes a looong time, since there are many GBs of files. The idea is to do it in batches of a few thousand files. For eg. a search on saiwaves over 173 MB of 10 kB files - around 15,000 files -  took around 2 minutes.

Update: V says he proceeded in a semi-manual way. He used a tool 'search for files' which allowed him to search specifying file size limits and other parameters. He found that there are multiple copies of the same file (versions over time) which have been recovered. And he found that generally the files recovered which are in the same recovery folder were in the same folder to begin with. So he found some ods files with the 'contains string' method, and by opening them manually, found the latest version. mp3 files had their filenames stripped, but he was able to rename them back using an mp3 tagger tool. The whole process took him till 3 am to complete. He restored a backup he had made 15 days ago, and overwrote the files which he had modified over the last 15 days using the recovered files.

Thursday, October 25, 2012

gprs keep alive on Windows Mobile 5

Wanted to make my old Windows Mobile phone a usable internet radio. For that, gprs keep-alive was needed, since TCPMP by itself was not keeping the connection alive even when it was streaming. Instead of the $2 app, this registry hack did the trick.


for the relevant connection (which connects over GPRS, I had named mine as Mo), switch the "AlwaysOn" value from 0 to 1. Then, one can manually stop the GPRS connection from the Connection Manager by turning Data off, but to connect one just needs to do some sort of network activity like make a phone call or something like that, after which it automatically connects and remains connected.

Wednesday, October 24, 2012

disabling a single page in apache

I wanted to disable a html page which had a lot of graphics on it when we were doing live video streaming from the same box. Did it by editing /etc/apache2/sites-available/default

Added a line
RedirectMatch path/to/the/file.html
and restarted Apache.
/etc/init.d/apache2 restart

Saturday, October 20, 2012

more adjustments to the mirrordome

More tweaking after my previous post about mirrordome adjustments in our Planetarium. The distortions of lines which should be vertical becoming slanting on the sides, and of spheres becoming oblate spheroids in projection, were all due to projector and mirror positioning. The default warp settings are for a setup like this, (as shown at Paul's website)

But our mirror and projector were much more angled, like this,

As a result of that, we needed to use keystone correction to make the image on the mirror rectangular in shape (instead of trapezoidal) as seen from the projector as in the somewhat exaggerated drawing below.

The projector and mirror do need to be tilted because ours is a tilted dome, but they should be aligned so that the image on the mirror is rectangular. As Paul pointed out, digital keystone correction reduces the effective number of pixels and so the clarity of the image suffers.

Taking a look at the Bangalore Planetarium as suggested by Paul, found that their Mitsubishi UD 8400 projector with the rated 6500 lumens ($10,000)was giving a much better image, not just in brighness, but also colour accuracy and focus. In comparison, our Optoma EP1080 is 3600 lumens. The pixelation, screen door effect etc was similar, but not so noticeable since their audience sits further away from the dome.

To be done: adjusting projector positioning and colour calibration for more improvements. Also can explore other projectors. Paul also mentioned the Optoma TH7500 (6000 lumens, $9,000) and the Optoma EH2060 (4000 lumens, $1,500) as a cost-effective alternative.

Friday, October 19, 2012

making our own internet radio

Thought this Raspberry Pi hack of a home-built wifi radio would be a good starting point for us to make our own low-cost internet radio for people to listen to radiosai. But then, the cost would be around Rs. 3,000, and for that price Mutant radios are available in the US during discounts. Also, the Raspberry Pi based device is a bit difficult to configure to use the home wifi access point for non-techies. Also, SK said that he has had discussions with a Hyderabad-based mobile-phone assembling company for making our own internet radio with SIM-based connectivity instead of wifi, which would be more usable etc.

Later, I made the following two documents for different options for connectivity:

Options for people in India -

Options for people overseas -

Technical details for connecting -

(Even though internet radios are available in India, the prices are nearly double the prices in US. Hence, other devices are mentioned as options for people in India. The Logitech squeezebox, for eg. is $100 in the US, but Rs. 12,000 in India.)

Edit - another inexpensive web radio option explored here.

deleting all contacts on iphone

Easy way to do it for the console enthusiasts: just ssh into the phone, delete the files in /User/Library/AddressBook and then reboot.
Was let to it by this forum thread, which has the wrong path mentioned.

Monday, October 15, 2012

more on typing in Hindi on Mac

In August, I'd passed on the following info to A, when he wanted an alternative to copy-pasting Hindi text from google transliterate for use in Google Docs and other apps:

Looking further for typing Devanagari on Mac, found this discussion,

Accordingly, there seems to be phonetic Hindi typing built-in on the Mac. It says,
activate the Devanagari Qwerty keyboard in system prefs/international/input menu and then select it in the "flag" menu at the top right of the Finder and type away.
The Mac Devanagari Qwerty keyboard is similar to the transliterate, but a little different, as described at this link.

To generate default conjuncts, type the first character followed by the Halant (also called Virama) key, then the next character. To generate explicit half-forms for alternative conjuncts, or independent half-forms, type the character followed by the Halant key and the Nukta key. To generate an "eyelash RA," type RA plus Nukta plus Halant. To generate a Nukta consonant, type the character plus Nukta. To prevent conjuncts, type two Halants.
Note that the Halant/Virama key is the D key on Devanagari keyboards and the F key on Devanagari-QWERTY keyboards. The Nukta key is the ] key on Devanagari keyboards and the Shift-F key on Devanagari-QWERTY keyboards. RA is the J key on Devanagari keyboards and the R key on Devanagari-QWERTY keyboards.

A tried it out, and used the "Show Keyboard layout" option to actually see all the keys. Pressing modifier keys like Alt, Command, Control and Shift and also combinations like Shift-Command etc are used for some of the letters. A bit more clunky than google transliterate, but more reproducible and accurate.

Later, A had a problem - the documents he produces in this manner were not compatible with CorelDraw which was being used by Ag on a Windows machine. So, A has to type on iLeap on a Windows machine for Ag's use. The issue seemed to be that of Unicode versus ISCII encoding. So I told hime the following:

The type of font used by google transliterate (and typing with Mac Hindi Qwerty keyboard selection) is called Unicode.

The type of font used by ileap and Coreldraw etc is called Type 1 font, or 8 bit Ascii font, or in the case of Indian letters, ISCII.

What you need is conversion of unicode to type 1 for Hindi fonts.

Such a tool seems to be available at this link where if you scroll down, you find a tool called Unidev which seems to do this Unicode to Ascii conversion. There also seems to be this php code, which could possibly be used to do something like the same conversion. There is also a quick and dirty fix, which probably may not work correctly for Hindi, which is suggested here, simply to use, in the Windows command prompt,
type unicode-file-name > ASCII-text-file-name

Wednesday, October 10, 2012

live video streaming options

Looking for options for streaming live video for more concurrent viewers than currently supported by our single dedicated server, found a nice guide to setting up wowza on AWS at   Google Hangouts on Air had the problem that it did not work with firewire video inputs on MacOS.   We don't have Youtube live streaming partner status yet.   P wanted a way in which we could push the stream to our server using multiple connections for fail-safe operation. Did not find any such option which would work with our Wowza server.   Other options:

1. Hire from

By paying $500, we can get 4000 viewer hours, which will be enough for 22/23 Nov.

2. Hire from

$400 for 3000 viewer hours.

3. Hire from

$350 for 3000 viewer hours.

4. We can hire one more server from Voxel,

$180, and get 4000 GB of traffic. We will still be limited to around 1000 simulaneous viewers with this option.

5. We can hire from,

$170 and get 1000 GB traffic, or maybe even $100 for 500 GB traffic, with unlimited simultaneous viewers.

This seems a good option, since 22/23 Nov traffic is expected be < 1000 GB for video. Also, no hassles of setting up.

6. We can hire from Amazon Web Services,

with bandwidth charged at $0.12 per GB = $120 for 1000 GB. But we have to do some setup ourselves, and if traffic is high, set up additional instances etc. Difficult, in my opinion, since we will all be busy at that time.

For decision-making, our past statistics at

would be useful. Especially the Feb (Shivaratri) & April (Samadhi day) stats.

Later, P added BitGravity which belongs to Tata as another option if we get good pricing, and also the unlimited new plan from livestream, for use all year round.

Monday, October 08, 2012

Korg nanokontrol problem - USB cable issue

The Korg NanoKontrol midi controller used for live recordings did not work at all despite many attempts at disconnecting and re-connecting. Had to use the mouse and trackpad. Some tips:

  • Hovering over a track and using the scrollwheel of the mouse will move the corresponding fader. Rotating the wheel slowly makes small changes, rotating the wheel fast makes large changes.
  • Clicking on a point on a fader causes the fader position to move to that point.
  • Multi-touch on the trackpad - two-finger slide is similar to rotating scrollwheel.

Tried out another USB cable - thankfully that made it work.

Wednesday, October 03, 2012

exporting video as a frame sequence

KMPlayer has an option. But did not seem to be working.
says that the latest version seems to do it.

says ffmpeg can do it.
the -y option means overwrite without asking.

But simplest is Virtualdub,
showed the way using File -> Export -> Image Sequence.

In Virtualdubmod, the menu item is File -> Save image sequence

For exporting the video as an image sequence for tgawarper, I need not bother about aspect ratio - tgawarper will warp it anyway in the correct manner if the frame contains a fisheye view with no black edges.

Sunday, September 30, 2012

multiple calendars in iPhone Calendar App

A wanted to sync his calendar as well as the studio recording calendar on his iPhone, and asked me how this could be done. Googled it and found that apparently the procedure for multiple calendars is using Google Sync.

The method for setting up Google Sync on an iPhone is given at   But we didn't follow through with it, since his phone took a very long time to sync over spotty GPRS.

Saturday, September 29, 2012

javascript issues with

Helping out someone on which offers free web hosting, found that some javascript menus were just not working. The exact same page on another host was working. Then found that many people had trouble with 000webhost and javascript, as seen in this forum thread. Even disabling the analytics code did not help with the javascript menu, though other javascript code was running on that page. Finally worked around it by just not using the javascript part of the menu.

Friday, September 28, 2012

a post about not using Antivirus

This slashdot post seems to validate my stand about not using antivirus.

Best AV is almost as good as nothing at all
  The only thing AV provides is a false sense of security. With AV, you're waiting until AFTER an infection occurs and then HOPING the AV company you've chosen has A) seen the malware before, B) bothered to add a signature to their definitions list, and C) is actually capable of removing the virus.

Better ideas: Turning on AppLocker & running most of the time as an unprivileged user. Check out OSSEC for use as a File Integrity Monitor and Host-based Intrusion Detection System. Disable unnecessary services, remove unnecessary programs, use an ad-blocker, a "default deny all" firewall policy and get a 3rd party patch manager to keep all your non-MS bits up to date. Secunia PSI is a free patch manager/vuln scanner for home use - there are others.

For a detailed description of just how bad AV is at protecting systems, check out the blog post at

Sunday, September 23, 2012

revisiting awstats - streaming audio stats

Had earlier configured awstats for analysing the streaming video logs from the Wowza server and for the web-server statistics on Now added configuration for streaming audio - icecast log analysis.

Also made a change in the analysis conf, changed LogFormat from 4 to 1 so that user agents can be parsed.

For the icecast logs, just copied the web server analysis conf, and changed the following parameters:

Friday, September 21, 2012

"Listen now" page needing compatibility mode in IE

Many Internet Explorer users had trouble with our "Listen Now" page.

This link works with browsers which have flash plugin installed and javascript enabled, or with browsers which have HTML5 mp3 support like Safari on iPad/iPhone. But this link has problems with Internet Explorer on Win7 and above. Or perhaps the issue is with IE7 and above. On some machines, the page needs compatibility mode enabled in order for the audio to play. On some machines, the player does not display until the page is refreshed, even though the audio is heard.

We had not made much headway in solving this bug for the last one year. Then we sent this to a volunteer, who suggested the following links,

The second link  refers to multiple instances, probably that is not our issue.

The first link  seems to be addressing our issue at the bottom of that page:
Internet Explorer 9 Beta (Win)
The Flash is disabled in jPlayer by default due to bugs with Flash's ExternalInterface in this browser.
The IE9 bugs listed there, and at places like here , here, and here seem to be the issue. We tried one of the workarounds mentioned on one of the posts, ie adding

!DOCTYPE html (within angle brackets)
to the top of the php page. That was not enough. Then our volunteer pointed us to this page, and accordingly we added the meta tag
http-equiv="X-UA-Compatible" content="IE=EmulateIE7"
to the top of the php page.

And that seemed to solve both the issues in IE, by forcing IE to use compatibility mode.

Wednesday, September 19, 2012

finding large attachments in gmail

P sent me this labnol link for using findbigmail to find and delete large attachments in gmail accounts. It uses IMAP and a temporary token to connect.

Monday, September 17, 2012

side load apps on android

A sent me this makeuseof link, for downloading and installing apps on android devices which don't have the Google Play Store. The useful part of that article is the mention of the apk downloader chrome extension - a useful tool, though it breaks Google's terms of use.

Thursday, September 13, 2012

PHPlist - issues with spaces into words

Our Sai Inspires emails has had this problem for years - some random word(s) will have spaces introduced in them. Instead of 'message', for eg, it would be seen as 'mes sage' or something like that. Apparently this was due to the long message string, the MTA seems to put in a newline by itself. This problem was discussed here, but we did not implement it in our setup since PA thought copy-pasting the text separately would solve the issue. But of course, it did not, so PB implemented this solution now.
$htmlmessage = wordwrap($htmlmessage, 60, "\r\n");
in admin/sendemaillib.php @ line 634

Monday, September 03, 2012

connection issues and workaround - more notes

In my earlier post, I had mentioned restarting management services on Cyberoam as a workaround for connection issues with BUTT live audio streaming. This is of course a very crude kludge, P tried to make a better solution using Firewall rules a couple of days later, giving the TCP packets to the relevant ports to the relevant ip address a higher priority and guaranteed bandwith.

Unfortunately the problem persisted. A couple of weeks later, I had problems. Got disconnected many times in the evening during live. Reconnected within 10-15 seconds every time. My guess is that other usage was dropping the connection due to congestion - it was getting disconnected when Cyberoam shows the peak usage, upload.

I tried making some more firewall rules, by putting in a Bandwidth policy, Other_Usage, and putting it to the rule number 1 on cyberoam firewall rules, ie Any host to Any host all services accept. This bandwidth policy allows 100 kbps guaranteed, 4 Mbps burstable, but with priority 2. The live streaming rules have priority 0 as P had created.

Even this did not solve the problem, sometimes even now there are connection issues when there is a lot of video streaming (youtube etc) traffic from Studio. Probably using only essential services and not doing bandwidth hungry tasks during the live times would be the solution.

Sunday, September 02, 2012

projectors in Mandir

Today the permanently installed projectors in Mandir were inaugurated. They are 17000 lumen Panasonic projectors, PT-DW17KU. Unfortunately, due to suspected ground loops in the signal, the live mix could not be displayed during the evening program. Long cable run and lack of isolation from the audio console which uses a different line for AC power might be possible causes.

Radiosai Playlist emails

P made a change to the accessdb2/display_playlist.php file to make it show an editable text file - he now edits the AsiaStream playlist email before sending in the case of Thursday, to accommodate the live broadcast during the day.

Tuesday, August 28, 2012

filing income tax return online - extra notes

In my earlier post, I had outlined how I filed my income tax return online. After uploading the xml file, I got the pdf file as expected, in my email id which is hosted using Google Apps for Domains. This was from and was a zipped pdf file. After mailing it by ordinary post, I got an acknowledgement email after 10 days or so, from with a password protected pdf file as an attachment. Unfortunately, the pdf was corrupted, and was not readable using Foxit Reader 3.0 or the latest Adobe Reader. I dashed off an email to and they replied asking me to "please contact us at 0124-2438000 or 1800-180-1961 (Toll Free)." Tried calling the tollfree number, they redirected me to the CPC (Centralised Processing Centre), a Bangalore number with 080 STD code. Since the website had a section showing this acknowledgement, I thought perhaps I need not have a copy of the pdf, so I did not follow up.

A month or so later, now, I have received "Intimation U/S 143(1)" from the same - again a password protected pdf as an attachment, again corrupted. This time I contacted CPC using their new tollfree number 1800 425 2229. The agent told me that their system had problems with some mail servers, and that yahoo and rediffmail accounts are known to work. He said that if I changed my email on the website at My Account -> Update Phone/Email and then call back after 4 days, they can resend the email. After changing to my rediffmail account, called them back, and this time the password-protected pdf mail attachment opens fine. So they have some issues with the mail server at, my guess is that with the digitally signed pdf, something non-standard is happening with the MIME encoding.

Sunday, August 26, 2012

TCP/IP stack repair

P had a laptop brought to him for troubleshooting, it was not connecting to the LAN or the internet using either the ethernet port or Wifi. Suggested that he try with a Linux live CD to rule out hardware problems, and that if hardware issues were ruled out, it might be some sort of driver issue with Windows. The next day, he got back to me with the solution.

Your guess was right. Had to do a TCP/IP stack repair to resolve the connection issue.

Followed the steps given here :

TCP/IP stack repair options for use with Vista or 7.

Start - All Programs - Accessories and right click on Command Prompt, select "Run as Administrator" to open a command prompt.

Reset WINSOCK entries to installation defaults: netsh winsock reset catalog

Reset IPv4 TCP/IP stack to installation defaults: netsh int ipv4 reset reset.log

Reset IPv6 TCP/IP stack to installation defaults: netsh int ipv6 reset reset.log

Reboot the machine.

Tuesday, August 14, 2012

cost effective planetarium mirrordome projection

Tried out a Blu-Ray player, Sony BDP S 190 for projection for our mirror-dome. Got more clarity on the dome over our earlier VGA output method. Most probably the improvement is due to the blurring in the earlier VGA signal due to the cable length, while the Blu Ray player uses HDMI, and hence an all-digital signal path.

In case someone is interested in using this technique for "pre-warped" mirrordome projection, it is extremely cost-effective. Create the shows, warp as desired, put them on Blu-Ray or USB mem stick, no computer needed for playout.

Sunday, August 05, 2012

removing background from drawing or line art

I was requested to put in some drawings onto a website in such a way that the background image of the website showed through. At first I thought I needed to make jpgs with similar region of background, but this led to seams being visible at the edges of the jpg since the background was complex and not a single colour. Finally settled on png files with transparency.

For getting the line drawings to that state, first I thought about converting to vector format. Explored but found that the free online version was too low res for my needs. Then came across this post - I needn't go the vector way, since the images I had were higher resolution than what I needed for the website. So, just used Select -> Color Range in Gimp, was able to select the line art alone without the white background, was able to paste it into a new transparent layer in Gimp, and could proceed from there.

sms spam on Airtel

I've started getting some SMS spam on my Airtel number. As pointed out by Prasanto, I've logged a complaint with Airtel, (or the last link at this page)  after getting my DND registration number by smsing MY DND to 1909.

Tuesday, July 31, 2012

long filename problems

One of our filenames was too long, and probably because of that, had multiple entries in the website database. Renamed it on the servers, changed database entries to reflect the shorter name.

one more bug

I'd listed some bugs in the MFD in my last post, and had posted about Mac OS X Lion's flawed SMB implementation. P contributes one more:
Yesterday we were trying to take a print in Landscape from a Mac computer through Libre office app to the new HP printer. There was no option to change the orientation from Portrait to Landscape. Did a bit of google and found this workaround.

The solution is to use TextEdit to change the orientation, save it (like A4 Landscape) an then use it with other apps. While using the TextEdit to change the orientation, keep all other apps closed to enable it later to pick the new printer settings.

labour-saving with ADF

The Studio recently got a multi-function device (MFD) - the scanner - copier - network printer HP MFP 400 series M425 and I had the pleasure of using the automatic document feeder (ADF) for scanning a book. The job which would have taken me around 20 minutes per page of typing - 50 hours - or at least 10 hours of scanning and OCR using my old flatbed scanner, was over in just 1 hour. Proof-reading for corrections took another 5 hours or so for the 150 page Octavo sized book.

Just a word about this particular MFD - the driver software is quite buggy. Noticed so far:
  1. Printing from Windows, there seems to be no way to over-ride the printing on both sides of the paper. Even though the single-side printing is chosen in the print dialog box, printer prints on both sides. While printing from Mac, this issue is not seen.
  2. Scanning with OCR - when done with 'Greyscale' mode and scanning of both sides of the paper is chosen, scanning fails after the first side with an error. Probably the scanning of both sides of the paper with ADF is supported only in 'Black and White' mode.
  3. Device doesn't respond when it is in power-saving mode. Have to remove paper or do something to make the printer "wake up" after which it responds to print (or scan) commands from the network.
  4. Printer is very sensitive to paper jams. The earlier MFD in the Studio was able to print on a wide variety of paper, even thin paper. This one is finicky, jams with paper thinner than "copier paper".

Wednesday, July 25, 2012

manual changes to schedule page

P contributed this nugget - he manually edited the csv file to create an entry into Thursday's schedule, with the description having a link to the live schedule page. The filename could be fictitious, since the downloadable and streamable flags were set to zero.

Friday, July 20, 2012

procedure for UPS turn on and off

The  APC SmartUPS RT 5000 which was lent to Planetarium by P has some slightly unintuitive on-off procedure.

When there is mains power:
Switch on - First switch on input power, if not already on. Wait for 10 seconds or so for various relays to click, with the fan spinning up immediately. Only then press the ON button, for output to appear.

When there is no mains power:

Switch on - If the inverter and fans are off, first press (and release) ON button to start the fans spinning. After 5 seconds, keep ON button pressed till it emits a long beep after 4 seconds or so. Release the ON button during the long beep in order to cold start UPS output.

Switch off - Pressing the OFF button just stops the output - doesn't stop charging or the fans. There doesn't seem to be any way of turning off the fans when the UPS is connected to power - probably the charging circuits need the fans. So, if you want the UPS to be quiet and the fans switched off, you need to switch off inputs mains AC power, then long press the OFF button for completely switching off.

Tuesday, July 17, 2012

smb issues on Mac OS X Lion

P reported that on the machines which he upgraded to Mac OS X Lion, password-less access to guest SMB shares was no longer happening.

According to this page,
Lion dropped support for SMB1 and supports only SMB2. Maybe this is the reason?

This thread describes the same problem - guest user not working.

More discussions on this topic....

Finally, P got it working with SMBup. A much more elegant solution than installing Xcode and installing samba via macports etc etc.

Saturday, July 14, 2012

projector upgrade

A conversation with AB led to some research on possible projector upgrades for the Planetarium. Our current projector has around 2 megapixel count. For doubling the resolution, currently the only projector seen is this Sony 4k projector which costs 20 times as much as our projector. Even if we get our hands on that projector, it does not have the ability to focus at the distances we want.

And then there are the dedicated planetarium projectors, which give really good displays, but which cost in crores, like this one at page 11/13.
Some more projector info came from the E&S page - which gave info about this JVC model and searching for that one led to this one for "just" $8K. And a review too.

Friday, July 13, 2012

screen capture with video annotation​s

There was a conversation by email regarding this. S asked the question, K replied.

The question:
Have you used any screen capture s/w other than camstudio.. camstudio is great but its video annotation feature doesnt while creating a video tutorial, if i want the webcam to also show my face in a small window in a corner of the screen, the video annotations under tools menu is supposed to work..but for some reason doesn't...

The answer:
I am assuming you are using the free version from techsmith called Camstudio. There is a commercial version called Camtasia Studio. I am currently using version 3.0 in my office.

Camtasia (the commercial version) is by far one of the best tools for screen recording. Is there a specific reason you want full motion video captured via your webcam? The reason I am asking is this:

Screen recording is done at a much lower frame rate than full motion video. A typical camtasia recording will be at 5 frames per second while full motion video is 25 frames per second. Even the 5 frames per second is further reduced when the recording tool detects that there has been no change to the screen for more than 5 seconds. I would suggest not using a built in webcam recording unless absolutely essential.

These are some good alternatives I have tried:

ViewletCam ( - Affordable and excellent after sales service.

Adobe Presenter (Powerpoint specific). 
Adobe Captivate - Generic elearning authoring tool from Adobe. This not as good as Camtasia Studio or Viewletcam. It is known to be buggy and I have had issues with rendering after a successful recording. It fails to detect changes in the screen and hence misses out some important activity on the screen.

Wednesday, June 27, 2012

fades to trims

After watching a fulldome show of Space Opera where the sequences were cropped using Trim in avisynth, found the abrupt cut transitions were too jarring in most cases. So, added 5 frame fades, like below:

FadeIO0(Trim(mix,73200,73220),5) ++ \
FadeIO0(Trim(mix,73457,73477),5) ++ \
FadeIO0(Trim(mix,4621,57424),5) ++ \
FadeIO0(Trim(mix,58301,59714),5) ++ \
FadeIO0(Trim(mix,60757,68115) ,5)
# FadeIO0 does the fade without adding any black frame at the begin or end.

While doing the export from avs to avi in Virtualdub, a virtualdub audio filter is required for this show, to reduce gain by 50%, as below.

Monday, June 18, 2012

filing income tax return online

Filing the income tax return is seen with trepidation by many (most?) people. Some of the pain associated with it can be reduced by knowing more about the process. Encouraged by this post by a colleague, I decided to try and file my own return this year. Keeping at hand income statement, investment and other transaction history, LIC and other receipts, PAN numbers of all entities, etc. is of course necessary, so I invested in a (physical) folder to keep all the papers in one place. Even after doing so, I was initially stumped while entering the numbers - the deductions need to be grouped according to section! (Section of the IT Act).

Some googling + a couple of phone calls solved the questions in my mind.

If I have to mention losses like short term capital loss - investing in a fund and then redeeming it at a loss during the financial year - then I have to use not the ITR1 form, but the ITR2 form.

LIC premia for simple life insurance come under 80C, Health Insurance premia under 80D, Infrastructure bonds under 80CCF

Specific LIC schemes come under 80CCC - specifically mentioned in the premia receipts.

Tax saving mutual funds come under 80C, as mentioned in the mutual fund transaction statement.

SSSIHL donations come under "100% deduction without qualifying limit" in the 80G section since universities come under this ambit,

Now there may be misconceptions or errors in this post - in case you notice any, please let me know in the comments or by email to hn_88 at rediffmail dot com

Saturday, June 16, 2012

back to Linux on the Toshiba AC100

Have gone back to Linux on the Toshiba AC100 since it is probably of more use that way as a general purpose machine. After installing the proprietary NVidia driver, which is supposed to be required for HDMI out, found that suspend / hibernate don't work any more. The system does not come out of suspend - no display. Battery life seems to be only 4 hours now. Not sure if this is due to Linux or due to lessening of life over the last few months.

Thursday, June 14, 2012

escaping quotes in php

The TFD folks had trouble entering the TFD - they had copy-pasted the TFD into the data entry form which uses php, and on submitting it, got errors like
Warning: odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''In spiritual matters // snip

Guessed that this was due to unescaped quotes. Asked him to manually remove the quotes before submitting. It worked. But he was again stumped by an apostrophe which again caused hiccups. Checked with P and he changed the code from

//$singlequote= "\'";

//$replace_singlequote= "''";
//$messageposted = str_replace($singlequote,$replace_singlequote,$messageposted);

and so on to

messageposted = htmlspecialchars($messageposted);