Full Contact Computing
Bare knuckles, no holds barred computing

Mar
20

The other day I wanted to record some audio from a YouTube video and googled how to do it. Happily, I found Audacity. As the website explains, Audacity is:

“a free, easy-to-use and multilingual audio editor and recorder for Windows, Mac OS X, GNU/Linux and other operating systems. You can use Audacity to:

Record live audio.  
Convert tapes and records into digital recordings or CDs.
Edit Ogg Vorbis, MP3, WAV or AIFF sound files.
Cut, copy, splice or mix sounds together.
Change the speed or pitch of a recording
And more!”

It sounded good to me and I successfully grabbed my audio clip. However, there were a couple of times where the YouTube server loaded up and the playback paused, leaving a few seconds of silence in the audio. No problem! Audacity provides a visual representation that clearly showed the gaps, and I was able to click on each side of a gap and delete them. Now the audio plays seamlessly.

Audacity does far more than I have any idea what to do with, but the controls are easy to use and I may actually play with some audio files now that I have this great tool. And there is extensive documentation, which is a welcome relief from those programs that some developers toss out with barely a readme file. Quite the opposite – there is a good FAQ, a forum with over 20,000 members, and a Wiki with links to a huge selection of video tutorials, tips, tricks, and troubleshooting.

And it’s all free. I’m amazed. And a fan.

Get yours at  http://audacity.sourceforge.net/

Advertisements
Mar
19

An alias is a short command that replaces a longer command to save typing. For example:

 alias junk=’more junk.txt’ 

 will allow you to type    junk     alone and it will do a ‘more’ command on the file junk.txt. Now, this is a simple example and doesn’t really do much, but it can be much more sophisticated:

 alias error=’tail -100 /u01/app/oracle/diag/rdbms/test1/trace/alert_test1.log |grep ORA->>errorfile.txt‘

 This will tail the last 100 lines of the specified alert log and return any ORA- errors into a file named “errorfile.txt”. The beauty is that you can set almost anything up in an alias. Some shells will even accept arguments (variables) passed to the alias but since I am working with the Bash shell here with Oracle Enterprise Linux, I don’t have that option.

Here are the essential options for the alias command:

alias  – shows what aliases are set

unalias junk   – removes the alias named junk

You can set up all of your aliases in a file in the home directory named .aliases or .bash_aliases and source it or add the following to the .bashrc:

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi     

This will enable all of your new aliases to be used every time you log in – otherwise, any aliases you create will go away when you exit your terminal window.

Now for the most important thing – how to not get into trouble with aliases!

First is be careful! Be sure of your command before setting it as an alias. Be particularly careful with rm, which deletes files! In fact, you may want to set this alias:

alias rm=’rm –i’

which forces rm into interactive mode, requiring you to answer y or n to every file deletion. 

Secondly, as part of “being careful”, issue this command before creating an alias:

which junk  

This will return either a ‘no junk’ or an ‘alias junk=’ message that will indicate whether ‘junk’ is already used as an alias or command or not. If it is already set, and you set it to do something entirely different, bad things may happen.

That’s it for aliases. Now go out and save yourself some typing!

Mar
19

How can you prevent users from changing data, and lock them out even if they are the owner of the table?  This may be useful when an old database has to be kept open for reference only, or perhaps there will be a period of no modifications during a transition to a new database. The reasons vary, but the answer is quick and simple: 

Create a constraint in disable validate state.  How’s that for simple?

The constraint doesn’t have to do anything useful. This works as well as anything: 

alter table tablename
add constraint lock_out
check (0=0) disable validate;

The “disable validate” disables the constraint, drops the index on the
constraint, and (most importantly in this case) prevents any modification of
the constrained columns.  Any attempt to do DML gets the message:
 
ORA-25128: No insert/update/delete on table with constraint disabled and validated 
 
Reenable DML with:
alter table tablename
modify constraint lock_out
disable novalidate;

Or simply drop the constraint:
alter table tablename
drop constraint lock_out;
 
The constraint has no performance impact, and can be switched on and off instantly. Now go lock somebody out of their own tables!

Mar
19

You may occasionally run across files in Unix/Linux that have a special character that prevents deleting or accessing the file. What to do?

A semicolon (;) – Suppose you have a file named  a;b  . Try anything with this file and your shell will interpret it as:

a = filename
; = end of the command line
b = next command

So it will, in essence, error out.

Solution: Put the filename in single quotes:  ‘a;b’  and it can be manipulated.

But what if the filename contains an exclamation point? Even if it’s inside quotes the shell still sees it.

Solution: Use the backslash to tell the shell to ignore the “!”. For example   file!   Can be deleted with the command    rm file\!

The same thing works if there is a quote in the filename:   ‘file   is deleted with    rm \’file

Let’s try a really weird filename:   ‘file!’   Use   rm  \’file\!\’

Really tough one: How to delete   -filename

Unix interprets the dash as an option flag so it will not recognize anything after the dash as a filename.

Solution:  rm ./-filename

The “./” is used commonly to force execution of a command from the current directory, to prevent an identically-named command that is in the path from being executed instead. Using “./” in this context takes the dash out of the first character slot so that it is not interpreted as an option flag. 

OK, here’s the toughest one of all. Suppose that you have a non-printable character, like a control character (for example, Ctrl-g) in the filename. Impossible, right? No, it just takes a two step process and gets a little complicated.

Step 1: Get the inode number of the file. If the filename is something like junk.txt, then run:   ls –api *.txt     This will list all of the txt files with their inode number, or inum:

8062662 junk.txt

Step 2: Manipulate the file using the inum. You have to use the “find” command to do this. Using rm, for example:  rm 8062662, won’t work.

find . –inum 8062662 –exec mv {} junk2.txt \;  This will rename the file to junk2.txt.

find . -inum 8062662 -exec rm -i {} \;   Will delete the file.

Note that the “\;” is necessary to tell the command to terminate when completed.

Simple, right? Unix really is user-friendly, it’s just very selective about who it’s friends are!

Dec
24

Just got a Garmin nüvi 265W/265WT GPS a few weeks ago and it’s great.

  • Bright 4.3-inch diagonal color touchscreen; 480 x 272 pixels, WQVGA TFT display with white backlight
  • Sleek, ultra-thin design fits easily in pocket
  • Preloaded with City Navigator North America NT
  • Supports Bluetooth wireless technology for hands-free calling when paired with Bluetooth-enabled cell phones

 

I haven’t tried the Bluetooth yet but I’m not one to yak on the phone while driving much anyway.

This unit is the widescreen one, as opposed to the 265 which has only a 3.5 inch display. It has a touch screen and qwerty keyboard that is very responsive. Type an address or business name in and go.

Map accuracy has been excellent in the U.S. and Canada. There is also automatic routing where you can choose the fastest, shortest, avoid highways or tollroads, etc. There is a lifetime traffic alert feature that will pop up ads as a cost of having the feature. Once you’re seen one ad, though, you know to simply ignore the popups which are small and don’t obscure the screen. The alerts are in fairly good time to avoid slowdowns unless you get trapped on a tollway with few alternate routes.

The screen keeps an arrow in the corner showing which way your next turn will be along with the mileage. I have learned to glance over occasionally to make sure I am in the correct lane of multi-lane roads for the upcoming turn. Recalculations are quick if you miss a turn.

It also gives your speed and the current speed limit, which can be helpful.

Overall, a definite buy. It seems to be at the right price vs features point where it doesn’t lack for capabilities yet it doesn’t cost an arm and a leg.

Dec
24

I am not a big fan of Micro$oft  but I did find a nice little backup utility that they offer for free. Can’t beat the price.

http://www.microsoft.com/downloads/detai….&displaylang=en

The above link gives a description and download link. I have been running it to (1) backup 2 XP computers to a Linux file server via Samba and a drive letter mapping, and (2) to sync my music from my main XP computer to what I call MusicBox, which is an XP box set up as a (you guessed it) jukebox in my gameroom.

It works nicely although setting up each and every to-and-from backup directory is a bit tedious. If all of your junk is under “My Documents” then all you have to set is one, but my directory structure is a little more complicated than that. Also if you have more than one folder to back up, READ THE DIRECTIONS and add the -R to run all “pairs” (as they call the source and target folders) when you schedule the job.

SyncToy gives the option of incremental backups to include or exclude file deletions, 2-way syncs, and some other options that should take care of all of your backup needs short of a full bit-by-bit image backup.

I recommend creating a shortcut to the logfile and checking it regularly – I have seen several people religiously run backups for years only to find that the media are blank, or corrupt, or missed the critical files they needed. The log is created under the local user folder, i.e., C:\Documents and Settings\Admin\Local Settings\Application Data\Microsoft\SyncToy\2.0\SyncToyLog.log

So create a shortcut for your desktop, click on it every morning (you DID set up a scheduled job for SyncToy to run overnight, didn’t you?) and Notepad will open it up for you. Free, simple, easy to set up – go for it.

Dec
23

What does a flashlight have to do with computers? Crawl under a desk one time and try to find the right place to plug in a cable in the dark and you wouldn’t even think to ask that question.

So I found this cool flashlight at Target for $5.19 and couldn’t pass it up. I later heard my wife talking to her sister (no, not the Wicked Witch of the West one) on the phone later and she said she considered it pretty cheap to keep me entertained while she was shopping. I don’t know if that was an insult or not. Maybe I should have gotten two.

Anyway, this guy on YouTube gives a pretty good demo:

http://www.youtube.com/watch?v=96EEv-fxeIc

 I got the blue one, but red, green, and orange is also available, according to Life Gear’s website http://www.lifegearcompany.com/glowsticks.html

 The cool thing about it is the glowstick part. Sure, it’s a flashlight, but hit the switch again and the whole body of the flashlight lights up. Hit the switch again and the flashlight goes out but the glowstick part stays on. Hit it once more and the glowstick flashes. The glowstick part puts out enough light to read by at night. And there are no chemicals in this, like a Cyalume, so it doesn’t die after a few hours. They claim it will last 200 hours on flasher mode.

 The flashlight is 7.5 inches long and about .75 inch in diameter. It comes with a 20 inch lanyard with a quick-detach coupling. As shown in the video, you can swing the light by the lanyard in a circle and it will make a much bigger and brighter signal than just waving the thing in your hand. You can also pull the cap off of the end and there is a built-in whistle.

 Someone put a lot of thought into this and came up with a great little tool. It’s cheap enough to buy several and put in your desk, glove compartment, boat, backpack, survival kit, etc.

Dec
22

 http://www.logitech.com/index.cfm/gaming/mice_keyboard_combos/devices/285&cl=roeu,en

  I bought two of these keyboards and have had mixed results.  Mainly I was interested in the lighted keys, so I could turn the room lights off and still see to type. One keyboard only lighted up about two-thirds of the keys upon arrival. I sent it back and got a replacement, no problem. Initial reaction was that I like the way they felt, liked the stance, and they worked well as keyboards.

 The lighted key part, not so well. There are two brightness settings on the keys, apparently dim and less dim. Sure, I don’t want a keyboard that blinds me, but the power settings need to be brighter, and maybe even three settings instead of two. One of the keyboards now has only a single setting, fortunately the brighter of the two levels. It will no longer go off or go dimmer. If it was stuck on one of those settings, I’d send it back, but I just leave it on all of the time.

 My other complaint about the G11 is the position of the USB port, which I use for my mouse. It’s on the edge closest to your monitor – so close, in fact, that it sometimes hits the monitor support and I have to move the keyboard over or cant it so that it isn’t binding (and I’m afraid of breaking the USB). It wouldn’t have taken any effort for Logitech to turn this port 90°    or to recess it more under the keyboard. As is, I have to keep a two inch gap between that part of the keyboard and anything else.

There are 18 “G” function keys and a few others that I have never fooled with, but maybe they’re nice to have. The only other thing that I use is the volume control.

 Overall, a C+. My next lighted keyboard purchase, I’ll try another manufacturer.

Dec
22

I wanted to wait a bit before looking at Windows 7, to give enough time for a number of users to try it and reveal some of the glaring problems that we know will be there – after all, it is Windows!

 Tom’s Hardware takes its typical don’t-hurt-any-feelings, look-on-the-bright-side stance in this article http://www.tomshardware.co.uk/windows-7-performance,review-31751-10.html and compares Windows 7 to Vista. If you look through all of the tests, the results are virtually identical in almost every test. W7 will bootup faster and go into and out of standby and hibernation more quickly. Other than that, in 25 tests, W7 outperformed Vista by 10% or more on FOUR. You read that right – in 84% of the tests Windows 7 did not perform significantly better than Vista!

 Even in the tests that showed more than a 10% improvement over Vista, the difference was not very dramatic:

W7 will run

Left 4 Dead – 12% better framerates
Adobe video creation – 17.2% faster
PCMark Vantage memories Suite – less than 11% faster
WinRAR file compression – 11.11% faster

 Tom’s Hardware concludes “should you want to improve your Windows-based system, now is the time to change”. Reread that sentence. That is someone absolutely struggling to say something nice about a pig of an O/S. It doesn’t say “to get blazing fast improvement” or “this outclasses Vista by a mile!” or anything like that. It is damning by faint praise. Oh, and then they caution “provided that you find driver support for all of your components, which may be particularly tricky for some notebooks”. You mean W7 doesn’t support them??!?!!?

 How about a W7 vs XP shootout? Here we go http://www.pcmag.com/article2/0,2817,2355703,00.asp

 And the results are . . . . unimpressive. “We ran a slew of tests and were surprised to find that XP aced as many as Windows 7”. Hmmm. “Windows XP actually started up fastest, had the fastest Picasa video encoding, and had the best PCMark05 test result”. Really? Gee, I thought W7 was supposed to be such a great improvement. . . . XP is over the hill, you know, all that sort of thing.

PCMag’s conclusion? “disappointed not to see Windows 7 top all these tests, particularly that for startup speed, given the promises Microsoft made . . . For gamers, the results are pretty much a wash between XP and Windows 7. . . results aren’t unalloyed good news for Windows 7”.

Once again, it looks like the writer struggled to not just type out the phrase “Windows 7 is HORRIBLE!”.

 Oh, and there’s a one in three chance that your upgrade to W7 will fail http://arstechnica.com/microsoft/news/2009/12/most-windows-7-issues-are-upgrade-woes.ars

 and a higher chance that hackers will take over your machine http://www.theregister.co.uk/2009/12/10/win7_vista_security/ “Top security firm: Default Windows 7 less secure than Vista”

 Windows 7? I’m unimpressed, to make a massive understatement.

UPDATE: July 14, 2010 –  http://money.cnn.com/2010/07/13/technology/windows_xp/index.htm?source=cnn_bin&hpt=Sbin#comments  “Windows XP Just Won’t Go Away” notes that 74% of business customers are still running XP, and comments “They’re not willing to go from something that works to something that doesn’t work as well.”

Dec
21

Thought I would try FreeNAS http://www.freenas.org/ , which is a BSD Unix derivative. In a previous post, “Playing with Linux” https://fccomputing.wordpress.com/2009/12/21/playing-with-linux/ I had mentioned FreeNAS and the difficulty in getting an ISO downloaded that wasn’t corrupt. So I noticed that MaximumPC magazine had a copy of FreeNAS on CD in the mag and a pretty good writeup on how to do things with it.

First problem was “run_interrupt_driven_hooks: still waiting after 60 seconds for xpt_action” and still waiting and so on. I had to disable the FireWire (1394) and USB ports to get it to load (see https://fccomputing.wordpress.com/2010/04/21/run_interrupt_driven_hooks-still-waiting-error-fix/ for a detailed explanation of how to do this).  I had to dig out an old mouse and keyboard to replace the USB ones to go on. Now, FreeNAS is intended to run without keyboard, mouse, or monitor hooked up to it (via web GUI) but it is an irritation to have to take a backwards step to install it.

Then I went through the config per the magazine and this thing is fairly nasty! I got it to work but I can’t recommend it for a casual user at all. There are a lot of functions and it looks like a lot of capability, but it’s probably extreme overkill for a home user. Just load up Linux Mint http://www.linuxmint.com/ , install Samba https://fccomputing.wordpress.com/2009/12/21/setting-up-samba-on-linux/  , and BOOM, you have the same basic capability (file sharing, backups, music streaming) in a MUCH easier operating system. 

Now all I need is a webGUI that will work with Mint on a remote box.