Posted by: sathyz on: November 11, 2008
Here are the few links that I got that helps you in testing your browser. (check the results for your browser too).
Posted by: sathyz on: November 11, 2008
Embedding video in HTML is very easy now, (no need to code streaming apis).
All we need to do is just use videos same as how we embed image. Firefox3.1 has this feature enabled and its very simple.
<video src="videofile.ogg" autoplay>
Your browser does not support the <code>video</code> element.
</video>
This will embed video in your page and starts steaming when sufficient data has been received.
Check the sample videos hosted at [2]
References:
Posted by: sathyz on: November 4, 2008
Wanna try gtalk over linux!!!
Try out empathy.
http://live.gnome.org/Empathy/
I have tried on ubuntu 8.04.
Check out the post on ubuntu forum on how to install empathy,
http://ubuntuforums.org/showthread.php?p=5118375#post5118375
There are few problems which are solved when I upgraded to 2.24.0.
when creating account empathy (configuring for your google account),
– don’t miss @gmail.com in the login id
If you got any issues follow the instructions in http://live.gnome.org/Empathy/Debugging to check the logs/outputs.
Posted by: sathyz on: October 2, 2008
f-spot (comes with ubunu) allows us to email the pictures. It will open the compose email for us with the pictures attached by itself. The usual problem is the attachment exists just for 30 secs. If we keep on composing the mail for more than 30 secs, the mail client will fail to attach. (bug/77135 ).
Work around : using gconf editor increase the value of /apps/f-spot/export/email/delete_timeout_seconds[1]
Posted by: sathyz on: August 26, 2008
I use Ubuntu. The most annoying part when using srt’s subtitles from opensubtitles.org is synchronization. Using gnome-subtitles editor failed even to load the srt files. There was subtitleeditor which loaded srt and allowed to edit timing but on saving the file, the format got changed and totem was not able to detect/load the subtitle.
Then just wrote a simple ruby script which can introduce delays. This can use only srt files. More over my first ruby application too.
http://github.com/sathyz/srt-editor-in-ruby/tree
override the string class and add function to convert string (time – that is read from srt file) to millisecs, perform the action (add/reduce delay) and override FixNum to convert the computed millisec to time ( string) which can be written in the srt file (in the same format as read).
that’s it done!!
Posted by: sathyz on: July 21, 2008
doctests – looks on doc strings for usage specified like interactive python sessions. The main use of doctest is to update the docstrings as the implementation changes.
def say_hello(name=None):
"""A comment
>>> say_hello()
Hello
>>> say_hello("Sathyz")
Hello Sathyz
>>> say_hello(1234)
1234
"""
from exceptions import TypeError
if name is None:
print "Hello"
elif isinstance(name,str):
print "Hello",name
else:
raise TypeError
if __name__=='__main__':
import doctest
doctest.testmod()
print "Tests done"
Executing this will give output like,
Z:\Spike\i-python>python say_hi.py
**********************************************************************
File "say_hi.py", line 7, in __main__.say_hello
Failed example:
say_hello(1234)
Exception raised:
Traceback (most recent call last):
File "E:\Python25\lib\doctest.py", line 1228, in __run
compileflags, 1) in test.globs
File "", line 1, in
say_hello(1234)
File "say_hi.py", line 16, in say_hello
raise TypeError
TypeError
**********************************************************************
1 items had failures:
1 of 3 in __main__.say_hello
***Test Failed*** 1 failures.
Tests done
Z:\Spike\i-python>
Posted by: sathyz on: July 19, 2008
To iterate dict common mistake what everyone will do is,
mapping = {5 : "5", 6 : "6"}
for key, val in mapping.items(): ...
Use iter* methods when possible
mapping = {5: "5", 6: "6"}
for key, val in mapping.iteritems(): ...
for key in mapping: ...
Posted by: sathyz on: May 28, 2008
If you are getting the problem : no digest for the ebuilds that you are using
gentoo-vm portage # emerge portage
Calculating dependencies ...done!
>>> emerge (1 of 15) app-misc/pax-utils-0.1.17 to /
!!! No package digest file found: /usr/portage/app-misc/pax-utils/files/digest-p
ax-utils-0.1.17
!!! Type "ebuild foo.ebuild digest" to generate it.
gentoo-vm portage #
give ‘ebuild pax-utils-0.1.17.ebuild digest‘
This will create digest for the package.
But if we need to create digest for all ebuilds that we use.. generating digests for all of them is a ridiculous job.
enable the feature ‘digest’ -> Auto generate digest for packages. This will solve the problem.
add the following in /etc/make.conf
FEATURES='digest'
Ref: http://gentoo-wiki.com/MAN_make.conf_5
Posted by: sathyz on: April 14, 2008
Posted by: sathyz on: April 14, 2008
Beach is always my favorite place for taking snaps. Usually beach would be beautiful during sunset/sunrise. This is a different experience.
Place : Asta lakshmi temple, Chennai.
Date : April 13th, 2008