Edit two of your repository files: /etc/yum.repos.d/fedora.repo and /etc/yum.repos.d/fedora-updates.repo. Now un-comment all the lines that start with the term baseurl and place a comment before all lines that start with mirrorlist. This should be done for both the above files.
Now edit /etc/hosts file and append the following to it’s contents:
80.239.156.215 mirrors.fedoraproject.org
213.129.242.84 mirrors.rpmfusion.org
Friday, December 3, 2010
Wednesday, November 10, 2010
Ubuntu 10.10 Netbook on Lenovo S10-3C
Ubuntu would not detect the keyboard during installation. I had to use an external keyboard to install the distro. Now do the following to get the keyboard working:
go to /etc/default
sudo vi grub
edit the line GRUB_CMDLINE="" to read GRUB_CMDLINE="noapic acpi=off"
save this file and run the following command:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Now reboot the system and VOILA the keyboard begins to work.
Admirably everything else works fine except that after shutdown we have to press the power button when the UBUNTU screen is displayed. A very small price to pay :-)
go to /etc/default
sudo vi grub
edit the line GRUB_CMDLINE="" to read GRUB_CMDLINE="noapic acpi=off"
save this file and run the following command:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Now reboot the system and VOILA the keyboard begins to work.
Admirably everything else works fine except that after shutdown we have to press the power button when the UBUNTU screen is displayed. A very small price to pay :-)
Friday, July 30, 2010
Openoffice Macro Script for function to convert numbers to string
Paste this script in a new module in Tools->Organize macros->Openoffice.org Basic->My Macros
This is not a script developed by me. I have debugged the original version for a error when it had to deal with amount less than 10 Paise. I am using it for my OO installation.
==================
Function SpellNumber(ByVal MyNumber)
Dim Rupees, Paise, Temp
Dim DecimalPlace, Count, DeciUnit
Dim Place() as string
ReDim Place(9) As String
Place(2) = "Thousand "
Place(3) = "Lakh "
Place(4) = "Crore "
Place(5) = "Arab "
Place(6) = "Kharb "
' String representation of amount.
If MyNumber < 1 Then
MyNumber = Trim(Str(MyNumber))
DeciUnit = InStr(MyNumber, "E")
If DeciUnit > 0 Then
MyNumber = "0.0" + left(MyNumber,1)
End If
Else
MyNumber = Trim(Str(MyNumber))
End If
' Position of decimal place 0 if none.
DecimalPlace = InStr(MyNumber, ".")
' Convert Paise and set MyNumber to Rupee amount.
If DecimalPlace > 0 Then
Paise = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
Else
Paise = ""
End If
Count = 1
if MyNumber <> "" then
Temp = GetHundreds(Right(MyNumber, 3))
If Temp <> "" Then Rupees = Temp & Place(Count) & Rupees
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
End if
Do While MyNumber <> ""
Temp = GetTens(Right(MyNumber, 2))
If Temp <> "" Then Rupees = Temp & Place(Count) & Rupees
If Len(MyNumber) > 2 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 2)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Rupees
Case "One "
Rupees = "(Rupee One "
Case ""
Rupees = "(Rupees Nil "
Case Else
Rupees = "(Rupees " & Rupees
End Select
Select Case Paise
Case ""
Paise = "Only)"
Case "One "
Paise = "& Paisa One Only)"
Case Else
Paise = "& Paise " & Paise & "Only)"
End Select
SpellNumber = Rupees & Paise
End Function
' Converts a number from 100-999 into text
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
' Convert the hundreds place.
If Mid(MyNumber, 1, 1) <> "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & "Hundred "
End If
' Convert the tens and ones place.
If Mid(MyNumber, 2, 1) <> "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
' Converts a number from 1 to 99 into text.
Function GetTens(TensText)
Dim Result As String
Result = "" ' Null out the temporary function value.
If len(TensText) = 1 then
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
Else
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
Select Case Val(TensText)
Case 10: Result = "Ten "
Case 11: Result = "Eleven "
Case 12: Result = "Twelve "
Case 13: Result = "Thirteen "
Case 14: Result = "Fourteen "
Case 15: Result = "Fifteen "
Case 16: Result = "Sixteen "
Case 17: Result = "Seventeen "
Case 18: Result = "Eighteen "
Case 19: Result = "Nineteen "
Case Else
End Select
Else ' If value between 20-99...
Select Case Val(Left(TensText, 1))
Case 2: Result = "Twenty "
Case 3: Result = "Thirty "
Case 4: Result = "Forty "
Case 5: Result = "Fifty "
Case 6: Result = "Sixty "
Case 7: Result = "Seventy "
Case 8: Result = "Eighty "
Case 9: Result = "Ninety "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
End If
End If
GetTens = Result
End Function
' Converts a number from 1 to 9 into text.
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One "
Case 2: GetDigit = "Two "
Case 3: GetDigit = "Three "
Case 4: GetDigit = "Four "
Case 5: GetDigit = "Five "
Case 6: GetDigit = "Six "
Case 7: GetDigit = "Seven "
Case 8: GetDigit = "Eight "
Case 9: GetDigit = "Nine "
Case Else: GetDigit = ""
End Select
End Function
This is not a script developed by me. I have debugged the original version for a error when it had to deal with amount less than 10 Paise. I am using it for my OO installation.
==================
Function SpellNumber(ByVal MyNumber)
Dim Rupees, Paise, Temp
Dim DecimalPlace, Count, DeciUnit
Dim Place() as string
ReDim Place(9) As String
Place(2) = "Thousand "
Place(3) = "Lakh "
Place(4) = "Crore "
Place(5) = "Arab "
Place(6) = "Kharb "
' String representation of amount.
If MyNumber < 1 Then
MyNumber = Trim(Str(MyNumber))
DeciUnit = InStr(MyNumber, "E")
If DeciUnit > 0 Then
MyNumber = "0.0" + left(MyNumber,1)
End If
Else
MyNumber = Trim(Str(MyNumber))
End If
' Position of decimal place 0 if none.
DecimalPlace = InStr(MyNumber, ".")
' Convert Paise and set MyNumber to Rupee amount.
If DecimalPlace > 0 Then
Paise = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
Else
Paise = ""
End If
Count = 1
if MyNumber <> "" then
Temp = GetHundreds(Right(MyNumber, 3))
If Temp <> "" Then Rupees = Temp & Place(Count) & Rupees
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
End if
Do While MyNumber <> ""
Temp = GetTens(Right(MyNumber, 2))
If Temp <> "" Then Rupees = Temp & Place(Count) & Rupees
If Len(MyNumber) > 2 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 2)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Rupees
Case "One "
Rupees = "(Rupee One "
Case ""
Rupees = "(Rupees Nil "
Case Else
Rupees = "(Rupees " & Rupees
End Select
Select Case Paise
Case ""
Paise = "Only)"
Case "One "
Paise = "& Paisa One Only)"
Case Else
Paise = "& Paise " & Paise & "Only)"
End Select
SpellNumber = Rupees & Paise
End Function
' Converts a number from 100-999 into text
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
' Convert the hundreds place.
If Mid(MyNumber, 1, 1) <> "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & "Hundred "
End If
' Convert the tens and ones place.
If Mid(MyNumber, 2, 1) <> "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
' Converts a number from 1 to 99 into text.
Function GetTens(TensText)
Dim Result As String
Result = "" ' Null out the temporary function value.
If len(TensText) = 1 then
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
Else
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...
Select Case Val(TensText)
Case 10: Result = "Ten "
Case 11: Result = "Eleven "
Case 12: Result = "Twelve "
Case 13: Result = "Thirteen "
Case 14: Result = "Fourteen "
Case 15: Result = "Fifteen "
Case 16: Result = "Sixteen "
Case 17: Result = "Seventeen "
Case 18: Result = "Eighteen "
Case 19: Result = "Nineteen "
Case Else
End Select
Else ' If value between 20-99...
Select Case Val(Left(TensText, 1))
Case 2: Result = "Twenty "
Case 3: Result = "Thirty "
Case 4: Result = "Forty "
Case 5: Result = "Fifty "
Case 6: Result = "Sixty "
Case 7: Result = "Seventy "
Case 8: Result = "Eighty "
Case 9: Result = "Ninety "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
End If
End If
GetTens = Result
End Function
' Converts a number from 1 to 9 into text.
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One "
Case 2: GetDigit = "Two "
Case 3: GetDigit = "Three "
Case 4: GetDigit = "Four "
Case 5: GetDigit = "Five "
Case 6: GetDigit = "Six "
Case 7: GetDigit = "Seven "
Case 8: GetDigit = "Eight "
Case 9: GetDigit = "Nine "
Case Else: GetDigit = ""
End Select
End Function
Sunday, June 20, 2010
Fun with gtkpod on FC-13
Connected my Ipod Video to my FC-13 machine. It was immediately detected and mounted. Fired up gtkpod and got the file listing without hitch. Made a few changes by adding and deleting a few songs. This too went ahead smoothly. I then quit after saving changes,
After the ipod was unmounted and detached from the USB port, all the songs had DISAPPEARED! But the available space indicated that the files were in there somewhere. Plugged it bak into the USB and gtkpod faithfully listed all the files.
Went back to Itunes on my Vista laptop. Initially vista would not detect the ipod. I reset the ipod while it was still plugged into the USB. Then it got detected. Started itunes, first and foremost updated to the latest firmware version 1.13. After the new firmware got installed, the ipod did a self reset. iTunes then displayed all the songs without any loss.
Did a thorough research on the net and found that in order to not mess up the ipod database the following has to be done before first time using gtkpod:
1. Plug in the ipod into the USB.
2. Open a terminal window. Become superuser by "su -" command.
3. Run command "mount" You can see the mount details of the ipod.
This line will have the actual name of the ipod and its mount
point usually in the /media folder. We need two values from
this line. In my case they were "/dev/sdb2" and "/media/STEVE".
STEVE is the name of my ipod. The first value is the device
associated to the ipod and the second its mount point.
4. Run the command:
/usr/bin/ipod-read-sysinfo-extended /dev/sdb2 /media/STEVE
Replace the two values as per the result of your "mount" command.
5. Unmount the ipod and replug it. Now you can run gtkpod safely
to file manipulations in the ipod without making the files disappear :-)
I found http://gtkpod.wikispaces.com quite useful in my quest to restore my ipod without losing anything.
After the ipod was unmounted and detached from the USB port, all the songs had DISAPPEARED! But the available space indicated that the files were in there somewhere. Plugged it bak into the USB and gtkpod faithfully listed all the files.
Went back to Itunes on my Vista laptop. Initially vista would not detect the ipod. I reset the ipod while it was still plugged into the USB. Then it got detected. Started itunes, first and foremost updated to the latest firmware version 1.13. After the new firmware got installed, the ipod did a self reset. iTunes then displayed all the songs without any loss.
Did a thorough research on the net and found that in order to not mess up the ipod database the following has to be done before first time using gtkpod:
1. Plug in the ipod into the USB.
2. Open a terminal window. Become superuser by "su -" command.
3. Run command "mount" You can see the mount details of the ipod.
This line will have the actual name of the ipod and its mount
point usually in the /media folder. We need two values from
this line. In my case they were "/dev/sdb2" and "/media/STEVE".
STEVE is the name of my ipod. The first value is the device
associated to the ipod and the second its mount point.
4. Run the command:
/usr/bin/ipod-read-sysinfo-extended /dev/sdb2 /media/STEVE
Replace the two values as per the result of your "mount" command.
5. Unmount the ipod and replug it. Now you can run gtkpod safely
to file manipulations in the ipod without making the files disappear :-)
I found http://gtkpod.wikispaces.com quite useful in my quest to restore my ipod without losing anything.
Thursday, June 10, 2010
GnuCash 2.2.9 on FC-13
FC-13 comes bundled with the 2.3.11 version of GnuCash. Unfortunately this version is not compatible with 2.2 and earlier versions and will not recognize the file headers while trying to open data files of those versions. This means doom for users who upgraded mid-year and found data incompatibility.
I ran :
rpm -qa | grep gnucash
Then the following were listed:
gnucash-2.3.11-1.fc13.i686
gnucash-docs-2.2.0-4.fc12.noarch
removed the two packages separately using
rpm -ev package-full-name --nodeps
I downloaded the source 2.2.9 tar file from the GnuCash website and got about compiling it in FC-13. So here is the procedure I had to adopt to get it running.
Afer the above tar file is extracted. Run the "./configure" command as root from the extracted directory. This may have to be done many times because each time some lib files etc., may be found missing and we need to install them through the Gnome software manager.
After a clean exit is made from "./configure". Run the "make" command, in my case I got an error "goffice/graph/gog-style.h: No such file or directory".
From wiki.gnucash.org, I found the solution.
uninstalled "goffice-devel-0.8.1-1.fc13.i686" and "goffice-0.8.1-1.fc13.i686" using
rpm -ev package-full-name --nodeps
downloaded "goffice-0.6.6-4.fc12.i686.rpm" and "goffice-devel-0.6.6-4.fc12.i686.rpm" from "http://rpm.pbone.net"
installed these by
rpm -ivh package-full-name --nodeps
Ran the "./configure" and "make" commands again.
This time, the "make" exited without error. Then I ran the "make install" command and a working GnuCash 2.2.9 got installed.
I ran :
rpm -qa | grep gnucash
Then the following were listed:
gnucash-2.3.11-1.fc13.i686
gnucash-docs-2.2.0-4.fc12.noarch
removed the two packages separately using
rpm -ev package-full-name --nodeps
I downloaded the source 2.2.9 tar file from the GnuCash website and got about compiling it in FC-13. So here is the procedure I had to adopt to get it running.
Afer the above tar file is extracted. Run the "./configure" command as root from the extracted directory. This may have to be done many times because each time some lib files etc., may be found missing and we need to install them through the Gnome software manager.
After a clean exit is made from "./configure". Run the "make" command, in my case I got an error "goffice/graph/gog-style.h: No such file or directory".
From wiki.gnucash.org, I found the solution.
uninstalled "goffice-devel-0.8.1-1.fc13.i686" and "goffice-0.8.1-1.fc13.i686" using
rpm -ev package-full-name --nodeps
downloaded "goffice-0.6.6-4.fc12.i686.rpm" and "goffice-devel-0.6.6-4.fc12.i686.rpm" from "http://rpm.pbone.net"
installed these by
rpm -ivh package-full-name --nodeps
Ran the "./configure" and "make" commands again.
This time, the "make" exited without error. Then I ran the "make install" command and a working GnuCash 2.2.9 got installed.
Subscribe to:
Posts (Atom)