Archive for September, 2012

September 22, 2012

Eclipse Task Tags Meaning

by Jay Jonas

TODO, along with FIXME and XXX, is known in Eclipse as a task tag, and is indexed by the IDE to let you find the spots marked with those tags easily. You can edit such tags in the Eclipse Preferences -> Java -> Compiler -> Task Tags.

This is the list for default Eclipse Task Tags and their meaning:

TODO

Comments that mark something for later work, later revision or at least later reconsideration. ODO comments should be considered a very useful technique, although like all good things on Earth, there’s certainly potential for abuse.

FIXME

A standard put in comments near a piece of code that is broken and needs work.

 XXX

A marker that attention is needed. Commonly used in program comments to indicate areas that are kluged up or need to be. Some hackers like `XXX’ to the notional heavy-porn movie rating. Use it to flag something that is bogus but works. Use FIXME to flag something that is bogus and broken.

ZZZ   /* This tag is mine!  ; ) */

Sometimes I like to use this marker for a stuff that was commented as deprecated just to remind me what happened there. However, when I’m sure, I delete it along with the code.

// TODO Need to optimize this before the end of the world.
// FIXME This won't work if the programmer is missing. 
// XXX This method badly needs refactoring: should be decaffeinated.
// ZZZ This was useful before the Y2K Millennium Bug.

--
From Sun/Oracle's Java code conventions, section 10.5.4:

Advertisements
September 3, 2012

How to delete a print job that is stuck in the print queue

by Jay Jonas

Printing problems are some of the most frustrating problems that we experience as computer users.

Last week I had some problems with stuck network printer jobs in Windows 2003 Server. Forget to press Cancel button. Forget to turn off and on your printer. Forget the Control Panel. Go straight forward to the core of the problem, be radical.

Start Notepad and write down the following command:

@echo off
pause Press ENTER to continue or CTRL+C to Cancel
net stop spooler
del %systemroot%\system32\spool\printers\*.shd
del %systemroot%\system32\spool\printers\*.spl
net start spooler
pause The Command Script has finished. Press ENTER to exit.

Save this to a command script text file and named it as DeletePrintJobs.bat. Save it where you could easy find it. For example, save it in C:\.

Now that you have created the command script file, you will run it. To run it, you will write the name of the command script file in the Run box, including the path where you save it.

Click Start, and then click Run. In the Open box, write C:\DeletePrintJobs.bat and Click OK.

Notice that the Command Prompt window opens to run the command script file that you created. Notice also that this window will wait for a confirmation when starting and also when finishing. If you do not see the Command Prompt window open, check that you saved the command script file by using the correct name and that you entered the correct command script file name in the Run box.

Note 1 If this method does not work the first time, or if you cannot print anything after you use this method, restart your computer, double check for typo errors and then try again.

Note 2 To use this method, you must have Computer Administrator status