Well, it apparently went away overnight. I had tried restarting my > computer and everything last night to no avail but i booted up today and > it's working. If I run into this again, I'll be sure to try that > command, thanks. > > Sorry for the waste of bandwidthThat smells like stale rpmdb lock, every reboot removes all locks, so does "rm -f /var/lib/rpm/__db*" (which is what is done when rebooting). Verify by doing cd /var/lib/rpm /usr/lib/rpm/rpmdb_stat -CA to display current locks. If no process that uses an rpmdb is active, then there should be no locks displayed. Any lock that persists is then stale. And stale locks are not usually a yum problem
73 de Jeff
Archive for August, 2007
Solving yum hangs
Posted in Uncategorized on August 27, 2007 by aghorasChanging NT Passwords offline
Posted in Uncategorized on August 24, 2007 by aghorasHere’s a program that can be used to reset NT passwords.
http://home.eunet.no/%7Epnordahl/ntpasswd/
Ripping CDs
Posted in Uncategorized on August 24, 2007 by aghorasCase #1: Ripping CDs
Robert is a diehard Kiss fan. He owns every Kiss CD ever recorded and wants to listen to Kiss at work. So he ripped his Kiss CDs (copied them to his hard disk) and converted them to MP3 format, and then brought them to work to annoy his co-workers. Beth, who works in the cubicle next to Robert, likes jazz. She tried to turn off the noise from next door by telling Robert that his MP3 files were illegal.
Text Box: Audio Home Recording Act – October 1992 Section 1008. Prohibition on certain infringement actions “No action may be brought under this title alleging infringement of copyright based on the manufacture, importation or distribution of a digital audio recording device, a digital audio recording medium, an analog recording device, or an analog recording medium, or based on the noncommercial use by a consumer of such a device or medium for making digital musical recordings or analog musical recordings.”
Robert told Beth that since he purchased the CDs, he could copy them and use them however he pleased, as long as the copies were for his own use. Beth did some research and showed Robert a page from the RIAA’s Web site that maintains that ripping songs from prerecorded CDs is illegal. Robert, afraid he was in hot water, retained the law firm of Dewey Cheatum and Howe. After billing him $400, they advised him not to worry. They told him that since the MP3 files were for his own use, he was protected by the Audio Home Recording Act. Who is right—the RIAA or Robert’s lawyers?
Audio Home Recording Act
The Audio Home Recording Act represents a historic compromise between the consumer electronics and recording industries. As part of this compromise, digital audio recording systems for consumers must include a device that prevents multiple-generation copies.
In exchange for this protection, U.S. manufacturers and importers must pay royalties of $1 to $8 per digital recording device. Two-thirds of these royalties go to the Sound Recording Fund, which allocates small percentages for nonfeatured artists and backup musicians. The other third goes to the Musical Works Fund and is split 50/50 between songwriters and music publishers.
The legality of ripping depends on the interpretation of several laws. The Audio Home Recording Act protects consumers who use digital or analog audio recording devices to make copies of prerecorded music, as long as the copies are for noncommercial use. But, because computers are not considered recording devices, as defined by the Audio Home Recording Act, Robert is not protected by this law when he rips his CDs.
The drafters of the Audio Home Recording Act didn’t realize or consider that personal computers would ever be used to record and play high-quality digital audio. They also did not foresee the impact of the Internet on the recording and broadcasting industries. Several bills related to these technologies have been enacted to update the law. (See the end of this chapter for a summary of key copyright laws.)
Even though ripping is not specifically addressed by current laws, it turns out that Robert does have the right to rip his own CDs, according to Bob Kohn, co-author of the leading treatise on music licensing, Kohn On Music Licensing (Aspen Law & Business 1999). Kohn maintains that making an MP3 copy from your CD for your own personal use is clearly permitted by Congress.
In 1971, when enacting legislation that protected sound recordings under the Copyright Act, Congress stated, “It is not the intention of [Congress] to restrain the home recording, from broadcasts or from tapes or records, of recorded performances, where the home recording is for private use and with no purpose of reproducing or otherwise capitalizing commercially on it. This practice is common and unrestrained today, and record producers and performers would be in no different position from that of the owners of copyright in recorded musical compositions over the past 20 years.”
It is therefore clear, according to Kohn, that Congress believed that the Doctrine of Fair Use, which is now embodied in Section 107 of the Copyright Act, protects audio home recording from copyright liability as long as the MP3 file is for your own, noncommercial use and you do not distribute copies of it to anyone else.
The ruling, in June 1999, by the U.S. Court of Appeals in the RIAA vs. Diamond Multimedia lawsuit over the Rio portable MP3 player makes it even clearer that Doctrine of Fair Use allows consumers to “space-shift” and “format-shift” music by ripping it to their hard disk and converting it to MP3.
So Robert’s MP3 files are perfectly legal, (although for a different reason than he was told by his lawyers), as long as he purchased (and still possesses) the original CDs. However, he may not sell or give copies away, or use the copies for any commercial purposes.
Where eclipse keeps plugin preferences
Posted in Eclipse on August 20, 2007 by aghorasEclipse keeps the plugin preferences (and templates in the case of VEditor) in the workspace under
./.metadata/.plugins/org.eclipse.core.runtime/.settings/net.sourceforge.veditor.prefs
Handling spaces in bash scripts
Posted in Programming on August 15, 2007 by aghorasTo handle spaces in bash scripts, set the IFS variable to $’\n’. e.g
#!/usrbin/bash
export IFS=$’\n’
for i in `find . -type f -name *.mp3`; do
mp3info -p “%a,%l,%n,%t,%F\n” “$i”
done
Keyboard short cuts and hot keys in Windows
Posted in Uncategorized on August 9, 2007 by aghorasUse this program to setup short cuts and hot keys in windows: http://www.autohotkey.com
Here are some instructions:
I have a Dell Laptop. It has an annoying little hotkey button that i wanted to re-asign to Media Center and not to use ‘Dell Quick Set’. I also didn’t want to download a full program to do this.
But i can across a program called AutoHotKey. This is an autoit based program that helps you to write your own scripts and compile them to programs to manage hotkeys.
Bellow is a simple step by step guide to creating a script using AutoHotKey for a special keyboard button which is currently unassigned.
1. Download and install AutoHotKey from http://www.autohotkey.com/download/
2. Open notepad and enter the following
Code:
#InstallKeybdHook
Save the file as KeyHook.ahk and close notepad
This will help you grap the keys id code for use latter.
[DURING STEPS 3 -7 DO NOT ENTER ANY PASSWORDS INTO YOUR COMPUTER AS THE SCIPT IS DESIGNED TO RECORD YOUR KEYSTROKES SO THAT YOU CAN IDENTIFY YOUR HOTKEY]
3. Run the new file you just created by double clicking its icon
You will notice a green icon with a H appears in your system tray, double click it.
4. A window will appear, in the window click View> Key History and Script Info
5. The window will change and it will show a list of the keys pressed since you started the script.
Press your hot key now
Press F5
6. The window will have refreshed and at the bottom you will see somwthing like this:
Code:
54 014 d 4.77 T 54 014 u 0.09 T 74 03F d 0.75 F5 Press [F5] to refresh.
In this case I pressed T as an example. But in your case it will show your hotkey. (Note: In the key column it may show a letter, ignore this)
Make a note of the value in the second column as i have shown in red for my case.
7. Go File>Exit
8. Open notepad and paste in the following:
Code:
#NoTrayIcon SC112:: Run %SystemRoot%ehomeehshell.exe return
Replace the number in red with your own from earlier and the text in blue with the path of the programm you want to run.
(Note: If it is not a special key replace the whole SC112 with the appropriote key found here: http://www.autohotkey.com/docs/KeyList.htm)
9. Save the script as whatever you want but with an .ahk file extension. eg HotKey.ahk
10. Use ‘Convert .ahk to .exe’ found in Start > All Programs > AutoHotKeys and compile it to an appropriate location. If you want you can then add it to startup by placing it in Start> Programs > Startup
By placing it in the startup folder the script will run when you logon allowing you to use the hotkey to open your specified program. There is no visible evidence that the program is running while it runs. To exit the program once launched you will need to open Task Manager (Ctrl + Alt + Dlt) go to proccesses locate the program by the name you saved it as , right click on it and click ‘End Proccess’
How to read xml files from Java (or Eclipse)
Posted in Uncategorized on August 8, 2007 by aghorasI would recommend not using vendor specific APIs. Use the JDK’s JAXP APIs instead:
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
Document document = documentBuilder.parse(new File(DATA_FOLDER + “DOMTreeNode.xml”));
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
transformer.transform(new DOMSource(document), new StreamResult(System.out));
DOT undirected graphs
Posted in Uncategorized on August 2, 2007 by aghorasTo draw undirected graphs see the following sample:
graph G {
e
subgraph clusterA {
a -- b;
subgraph clusterC {
C -- D;
}
}
subgraph clusterB {
d -- f
}
d -- D
e -- clusterB
clusterC -- clusterB
}