Tuesday, December 04, 2007

Clearing the ARP Cache

From Chris Sanders at windowsnetworking.com
You can view your workstations ARP table by typing “arp –a” from a command prompt. Deleting the ARP cache is just as simple and can be done from a command prompt by typing “netsh interface ip delete arpcache”.

Monday, November 05, 2007

Explore with this as Root, Explorer Hack

A friend at work created this registry file that allows you to view a folder as if it is the root. It simplifies the view so you can easily find the files you are currently working with.

It will add a "Explore with this as root" context (right-click) menu item on folders in Windows Explorer. When you execute it a new Windows Explorer window opens up with the selected folder as root with the folder pane showing.

explore_with_this_as_root.reg

Friday, October 05, 2007

A Tiny IDE for JavaScript

http://tide4javascript.com/

A great way to test out small snippets of javascript.

Sorting out Sorting

I recently found Everything Is Fast For Small n on codinghorror.com. Fascinating. It led me to Sorting out Sorting and the video below.






Click here to see the video at a larger size.
Video length: 31 minutes, 15 seconds.

Here is an abbreviated version of the video.

Saturday, August 25, 2007

Customize startup applications

Updated 2020-01-16

In Windows 10, Open Run, type shell:startup and hit Enter
https://www.thewindowsclub.com/startup-folder-in-windows-8

The slack.exe path on my machine
C:\Users\kids\AppData\Local\slack

Updated 2008-01-29

Use MSConfig.exe (from start\run) to disable their start up. Also look in "C:\Documents and Settings\All Users\Start Menu\Programs\Startup" and remove any programs that should start up. Use google to find out what each process does and why you need it.

MSConfig for Rich
InetCntrl - "Bsafe Online"
SHSTAT - Network Associates, virus scan
stsystra - comes with Dell PC, runs pc audio, need to function correctly
TBMon - Network Associates, virus scan
UdaterUI - Network Associates, virus scan

MsConfig I Uncheckedctfmon - " Some times my Windows XP is very slow and this file is the responsable"
hpcmpmgr - HP for my printer. I will update you if I need you. Don't steal my memory!
HPWuSchd - HP for my printer.
hpztsb09 - HP for my printer.
isuspm - Install shield update service. I will update you if I need you. Don't steal my memory!
issch - Install shield update service.
jusched - Java Runtime engine updater
MvMcTray - " runs in system tray, and gives you quick access to display settings."
NvCpl - NVIDIA Display Driver Service, "an unecessary service and have had mine disabled for
years"
nwiz - "the executable for the NVidia options and control panel. You don't need it on startup,uncheck it in msconfig"

Put the following shortcuts in each user's "C:\Documents and Settings\--username--\Start Menu\Programs\Startup"

Startup for Rich
Shortcut pointing to ("C:\Program Files\Mozilla Firefox\firefox.exe" http://mail.google.com/mail/)
"C:\Program Files\Google\Google Desktop Search\GoogleDesktop.exe" /startup
Shortcut to dsclock "C:\Program Files\DS Clock\dsclock.exe"
"C:\Program Files\OpenOffice.org 2.0\program\quickstart.exe"
"C:\Program Files\Juice\Juice.exe"

For Steph only
"C:\Program Files\MSN Messenger\msnmsgr.exe" /background

For kids
"C:\Program Files\Mozilla Firefox\firefox.exe" http://www.starfall.com/

Maybe
"C:\Program Files\ClearPlay\ClearPlay Easy Updates\ClearPlayEasyUpdates.exe"
"C:\Program Files\google\GoogleToolbarNotifier\GoogleToolbarNotifier.exe"

This way, my login does not start up Windows Live Messenger. And we only have one copy of the utilities running.

Monday, August 06, 2007

RegEx trick for sql field names

A new guy at work has shown me how powerful regular expressions are. Following is a trick for formatting the columns names of a SQL table.

Do a query in SQL Query Analyzer on your table like:
SELECT * FROM table WHERE 1=0

Results in

Column1 Column2 Column3 Column4

It will return 0 rows. Be sure to return the results as text (ctrl + T), so you can just copy the header row that will have all the field names, separated by a ton of spaces. Paste the results in Notepad++. Open up the replace dialog. Check the "Regular expressions".

Find \s+

"\s" means find any white space. "+" means repeat the previous character until you don't find it anymore.

Replace with \n,

That is a new line and a comma.

The final result is

Column1
,Column2
,Column3
,Column4

Notepad++ uses the POSIX regular expression language. I look forward to using it more.

Thursday, June 28, 2007

VS2005 Super Slow Design Mode ASPX

Earlier this year I upgraded my AjaxControlToolkit.dll. I started running into this problem that I found posted in the comments at A few VS 2005 SP1 Links and Information Nuggets

Friday, January 12, 2007 12:33 PM by Mark

I've run into a problem that started showing up randomly after SP1 was installed:

I attempt to view an aspx page in Design mode and at each control that is getting created takes at least 2 minutes. The window becomes unresponsive and all I see is:

Creating control 'controlName1'

a few minutes later.

Creating control 'controlName2'

After 10 minutes, I have to kill Visual Studio -- any insight into this?

-Mark


I eventually got a new working copy of my project from subversion and the issue went away. I must have found something like what was post later in the comments of the same article.

Thursday, January 25, 2007 5:39 PM by Dave Franke

Hi Scott,

Finally got around the problem. Not sure what it was. I checked my web.config files but did not see anything releated to two competing references. We work with TFS. So in the end I deleted everything in my workspace and retrieved all the source code and the problem was gone. Tried a Force Get latest before that but it did not work either.

Thanks,
Dave


I am not sure what it was but this solved it. It happened again after I upgraded AjaxControlToolkit.dll following the instructions here. I post it here so I won't forget again.

Thursday, June 14, 2007

Tuesday, June 12, 2007

Clearing the print queue

Occasionally our printer at home gets jobs stuck in the print queue. I write this so we can remember what my wife did to clear it.

We have a HP deskjet 3500, from the HP site

Introduction

When print jobs are initiated, they are stored in a print job list (print queue). If the printer does not complete the print job because it is off-line or the print spooler fails, the print jobs stay in the print queue and it becomes backed up.

Clearing the print queue
1. Click Start, click Settings, and then click Printers to open the Printer folder.
2. Double-click the Printer to open the print queue.
3. Click Printer in the menu.
4. Select Pause Printing if it is not already selected. This will stop all printing to the
printer.
5. Click Printer again and select Purge Print Documents or Cancel All Documents. Click Yes to confirm the action.
6. If there are any documents left in the queue, restart the print queue. Click Printer and then click Pause Printing to resume printing.
7. Click Printer again, then click Cancel All Documents or Purge Print Documents.
8. If there are still documents in the queue, restart the computer.


My wife also pressed and held down the power button on the printer. This worked to clear the print queue.

Friday, March 30, 2007

Hot key "Unformatted Text" in MS Word

Sometimes I like it when I paste things into MS Word and it retains all the formatting. Many times, I would rather it just paste it as unformatted text so I can make it merge with the rest of the doc.

Using MS-Word 2003, this is what I do so I can make Ctrl+Shift+V map to the Paste Special\Unformatted text.

Copy something off your browser with formatting.
MS-Word Tools\Macros\Record New Macro...
- Name macro PasteUnformatted
- Click the Assign Macro to Keyboard. Press Ctrl+Shift+V. Press Assign.
- Go to Edit\Paste Special. Choose Unformatted Text
- Click the Stop Button

View and/or edit the macro from the Tools\Macros\Macros... menu item
Select PasteUnformatted and click the edit button. It should look something like this.

Sub PasteUnformatted()
'
' PasteUnformatted Macro
' Macro recorded 3/30/2007 by Rich Alger
' this pastes the contents on the clipboard with no formatting
'
Selection.PasteAndFormat (wdFormatPlainText)
End Sub

See Paste Unformatted Macro

Once you are done you can use the Ctrl+Shift+V hot key to quickly paste in unformatted text.

UPDATE 2008-08-19
The last several times I had to do this, I always have to edit the macro and make sure it says wdFormatPlainText

UPDATE 2010-05-10
I was referring to this to get this to work in Outlook 2007. I just found that Ctrl+Alt+V brings up the "paste special" dialog box. You can arrow up and press enter. No need for a macro anymore. It works the same in Word 2007. "Alt, E, S" works in Word and Outlook 2003.

For other applications that do not have paste special you could use an application like PureText

Thursday, March 29, 2007

Disable new mail notifications in Trillian

I am setting up a new PC and could not remember how to disable trillian from notifying me when a new email comes.

For Trillian Basic 3.1 build 121: Trillian\TrillianPreferences... menu.
Advanced Preferences
Automation
Uncheck Mail: New Mail

Thursday, March 01, 2007

Google Maps Traffic

I first started using online traffic data to choose my driving home route. I commute from El Mirage, AZ to Tempe, AZ. At the end of 2005 I started using Google Earth. We were experimenting with it at work and considering buying an enterprise solution from them. We figured out how to make an overlay using the graphic at ADOT onto the Google Earth surface.

That worked quite well. The biggest problem I had with it is that it took 45 seconds or more to load Google Earth and to view the overlay. After a while, I stopped using it.

I then tried using traffic.com. I was intrigued by its stated ability to accept a route and email me if that route was too congested. I found that there were too many false positive reported and I was not always leaving work at the exact same time each day. I stopped using it too.

I had seen yahoo's traffic but the little dots didn't stand out to me.

A few months ago, I tried maps.live.com. It shows me stripes like ADOT does. Yet the stripes are only partially opaque, so you can see the street names underneath. It shows accidents, which is the real decider if I should go one way or another. I am able to create a url specifying the exact location and turns traffic on. I use this bookmark to see traffic every day. The final bonus it that is loads fast. It is up in about 7 seconds. Often I have to refresh it once to get the traffic to show, but that is real fast!

In about 10 - 15 second of looking at the image, I can tell which route to take. I can see any accidents and the resulting backup.

Yesterday, Google maps announced that they have traffic on their site. The most interesting part of their implementation is their coverage. They have data for the Loop 101. I do not know where they get this data from. Allpointsblog.com hasn't found out yet either. I have not been able to find it from ADOT. Another thing I noticed is that Google displays data I few minutes later than Microsoft.

Saturday, January 20, 2007

Firefox Settings and Windows Start Up

I like Slimbrowser. I have used it for years , mostly for a tabbed Internet Explorer. I recently got a new computer and decided to try FireFox as my primary browser.

I wanted it to behave more like Slimbrowser. I found the following FireFox add-ins,
Tabbrowser Preferences
LastTab
Duplicate
Faster Fox
Restart FireFox

My wife still uses Internet Explorer as the primary browser. There are enough sites out there that still do not work well with FireFox that I still want it too. I wanted to be able to open GMail with FF. I created a shortcut on my desktop with this target ("C:\Program Files\Mozilla Firefox\firefox.exe" http://mail.google.com/mail/)

I also was looking to reduce the number of programs running as well as quicken the Windows XP Home Edition login. I found MSConfig.exe. Just run from Start/Run and adjust it. My wife used Windows Live Messenger. I found in MsConfig where to disable its start up. I then could add a short cut to it in the StartUp folder of my wife's login. That way it starts up for her but not for me and the kids login.