Blog on technical talks, new softwares, algorithm, fedora linux, windows, hacking, spoofing
Tuesday, April 26, 2011
Money Speech
Have you read the "Atlas Shrugged" by Ayn Rand? Well, I'm sad I never finished because of my neck issue. But I kept remembering a speech on Money by one of the lead characters. It really puts all I think and agree about money. I'm sure most people I know/like will agree with me. You can read it here http://www.freerepublic.com/focus/news/2158115/posts
Saturday, April 16, 2011
Fixing Hindi on Android
Recently I rooted and moded my Spica to Android 2.2 froyo by Cyanogenmod but it looks like they haven't put much thought to Hindi/Nepali fonts.
Even earlier the vowel signs were all messed up.
But I couldn't find any fix for this instead I found a work around in opera mini.
First let me tell you one thing, opera mini is a must app.
Open opera mini, in the address bar type
config:
In the bottom, there is an option
Use bitmap fonts for complex fonts
Set it to YES
And it will work only in opera mini. Well something is better than nothing.
Tuesday, April 12, 2011
Upside down skype video on Fedora 14 64bit
Yes that happens on my laptop:
Laptop: Asus K40AB
Web-cam: Chicony CNF7129
It seems Asus mounted the camera upside down in the laptop. The windows driver internally inverts the image and displays it.
Here's a simple trick that I learnt from the ubuntu forums.
If you run skype with:
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype
There are two things to fix this situation:
1. The boring way: Create a shortcut on the desktop, with the above line as the executing application. This fixes the issue for only one user and cannot be invoked by the run command.
2. The fun way:
i. Log in to the super user
ii. Go to /usr/bin
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype.main
And you are done. Now running skype will call the above script which has a fix thus the video is displayed correctly.
Still facing an issue? Post a comment.
Update: having issues with LD_PRELOAD, check updated article on my new blog here.
Laptop: Asus K40AB
Web-cam: Chicony CNF7129
It seems Asus mounted the camera upside down in the laptop. The windows driver internally inverts the image and displays it.
Here's a simple trick that I learnt from the ubuntu forums.
If you run skype with:
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype
It fixes the issue. But running it that way always isn't a fun.
There are two things to fix this situation:
1. The boring way: Create a shortcut on the desktop, with the above line as the executing application. This fixes the issue for only one user and cannot be invoked by the run command.
2. The fun way:
i. Log in to the super user
$ suEnter the password
ii. Go to /usr/bin
# cd /usr/biniii. Rename skype to skype.main
# mv skype skype.mainiv. Create a new file skype with the below content:
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype.main
# echo "LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype.main" > skypev. Make the new skype executable
# chmod 755 skype
And you are done. Now running skype will call the above script which has a fix thus the video is displayed correctly.
Still facing an issue? Post a comment.
Update: having issues with LD_PRELOAD, check updated article on my new blog here.
Sunday, April 10, 2011
No sound through headphones in Fedora 14
Sometimes there is no audio from the headphones. In that case, open a terminal, run alsamixer, i.e.
$ alsamixer
The alsamixer window is displayed.
Press F6 button and select "HDA ATI SB" from the list of sound cards and press enter.
Check that none of the mixers are mute (MM is shown below them if they are mute). If none are mute and are at high level but still you can hear no sound, go to the Front Mic, press up-arrow key and then the down-arrow key.
This works for me all the time.
Still have a problem, drop a comment.
$ alsamixer
The alsamixer window is displayed.
Press F6 button and select "HDA ATI SB" from the list of sound cards and press enter.
Check that none of the mixers are mute (MM is shown below them if they are mute). If none are mute and are at high level but still you can hear no sound, go to the Front Mic, press up-arrow key and then the down-arrow key.
This works for me all the time.
Still have a problem, drop a comment.
Thursday, April 7, 2011
Installed froyo on my Samsung Galaxy Spica I5700
Just used this video: http://www.youtube.com/watch?v=RnnX-5FU0O8&feature=related
to install Froyo on to my spica. Its working great.
to install Froyo on to my spica. Its working great.
Tuesday, March 1, 2011
Prime Number in Perl with a twist
Just a few days ago, I learned that all prime numbers > 3 can be represented as multiple of 6 +1 or -1.
So here's a code in perl to find nth prime number.
#!/usr/bin/perl
print "Enter the number: ";
chomp($num = <>);
$i = 3;
$no_of_prime = 3;
$prime = 0;
if ($num == 1)
{
print "1st prime is 2 \n";
}
elsif ($num == 2)
{
print "2nd prime is 3 \n";
}
elsif ($num > 2)
{
$index = 1;
$powindex = 1;
$no_of_prime = 2;
while($no_of_prime < $num)
{
$prime = (6 * $index) + ((-1) ** $powindex);
$j = 2;
$is_prime = 1;
while($j <= ($prime ** 0.5))
{
if(($prime % $j) == 0)
{
$is_prime = 0;
break;
}
$j = $j + 1;
}
if ($is_prime == 1)
{
$no_of_prime++;
}
if(($powindex % 2) == 0)
{
$index = $index + 1;
}
$powindex = $powindex + 1;
}
print $num, "th prime is: ", $prime, "\n";
}
else
{
print "Invalid number\n";
}
#END
So here's a code in perl to find nth prime number.
#!/usr/bin/perl
print "Enter the number: ";
chomp($num = <>);
$i = 3;
$no_of_prime = 3;
$prime = 0;
if ($num == 1)
{
print "1st prime is 2 \n";
}
elsif ($num == 2)
{
print "2nd prime is 3 \n";
}
elsif ($num > 2)
{
$index = 1;
$powindex = 1;
$no_of_prime = 2;
while($no_of_prime < $num)
{
$prime = (6 * $index) + ((-1) ** $powindex);
$j = 2;
$is_prime = 1;
while($j <= ($prime ** 0.5))
{
if(($prime % $j) == 0)
{
$is_prime = 0;
break;
}
$j = $j + 1;
}
if ($is_prime == 1)
{
$no_of_prime++;
}
if(($powindex % 2) == 0)
{
$index = $index + 1;
}
$powindex = $powindex + 1;
}
print $num, "th prime is: ", $prime, "\n";
}
else
{
print "Invalid number\n";
}
#END
Monday, February 28, 2011
USB Tethering SPICA on fedora
I just usb tethered SPICA on fedora 14.
Here's what I did (could be ugly than other tutorial but works)
But before that, the following helped me.
http://code.google.com/p/azilink/
http://androidforums.com/samsung-i7500/19510-adb-linux.html
http://idolinux.blogspot.com/2010/06/usb-tether-android-with-linux.html <-- Better read this site, than the below thing.
Part 1: Install the driver:
1. Create a new file /etc/udev/rules.d/51-android.rules
vi /etc/udev/rules.d/51-android.rules
2. Copy and paste the below line
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
3. Then in the terminal type:
chmod a+r /etc/udev/rules.d/51-android.rules
Part 2: Install the ADB:
1. Download the Android SDK. It is a .tgz file, extract it.
2. On the terminal go to the extracted folder. It has a sub-folder, tools. Go to tools/
3. Run ./android
4. A GUI comes up, on the left panel select "Avaiable Package".
5. Select "SDK Platform Android 1.5, API 3" from it and click on Install selected. Next Accept the license.
6. Now go to the/platform-tools/
7. Just to test adb is working, try
./adb shell
It should open a shell. That is actually your phone. If it didn't work, try reading the above links. Or try
./adb devices
This will show the device connected.
I got the following:
List of devices attached
5700db4ac5a1 device
My device is a Samsung Spica 5700
Part 3: azilink to tether:
Now install the azilink to your phone. Simply type
./adb install/azilink-2.0.2.apk
Follow the above given blog.
Here's what I did (could be ugly than other tutorial but works)
But before that, the following helped me.
http://code.google.com/p/azilink/
http://androidforums.com/samsung-i7500/19510-adb-linux.html
http://idolinux.blogspot.com/2010/06/usb-tether-android-with-linux.html <-- Better read this site, than the below thing.
Part 1: Install the driver:
1. Create a new file /etc/udev/rules.d/51-android.rules
vi /etc/udev/rules.d/51-android.rules
2. Copy and paste the below line
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
3. Then in the terminal type:
chmod a+r /etc/udev/rules.d/51-android.rules
Part 2: Install the ADB:
1. Download the Android SDK. It is a .tgz file, extract it.
2. On the terminal go to the extracted folder. It has a sub-folder, tools. Go to tools/
3. Run ./android
4. A GUI comes up, on the left panel select "Avaiable Package".
5. Select "SDK Platform Android 1.5, API 3" from it and click on Install selected. Next Accept the license.
6. Now go to the
7. Just to test adb is working, try
./adb shell
It should open a shell. That is actually your phone. If it didn't work, try reading the above links. Or try
./adb devices
This will show the device connected.
I got the following:
List of devices attached
5700db4ac5a1 device
My device is a Samsung Spica 5700
Part 3: azilink to tether:
Now install the azilink to your phone. Simply type
./adb install
Follow the above given blog.
Subscribe to:
Comments (Atom)