Sunday, February 10, 2008

HP printer spooling error

Sometimes the documents to be printed in queue are not able to get removed. You may try to hard reset the printer but it usually so happens that even after restarting the queue remains and and subsequent documents to be printed stay on the queue.
use this script to remove the spooling error you may get trying to remove documents from printing.

@echo off
net stop "print spooler"
del /q "%SystemRoot%\system32\spool\PRINTERS\*.*"
net start "print spooler"
ping localhost -n 5 > nul

save the above script in a .BAT file and run it.

Thursday, January 3, 2008

Set Gtalk status message to your current music track

Following are the steps:

1. Set your status message in GTalk to "Show current music track".
2. Open Windows Media Player and go to Tools.
3. Go to Plug-ins->options.
4. Under the plug-in tab look for the category "Background".
5. Check "Google talk music plugin".

That's it you are done.
GTalk doesn't work with VLC media player. :(

Tuesday, September 25, 2007

SQL injection - all you need is a syringe

SQL injection is the art of modifying possible queries accepted by database programs employed in security settings either for a website or a network.
Instead of talking about it in length it would be better to show you the way to another blog which talks about it in great detail.

FR3DC3RV Online Security Blog

Wikipedia article tells some basic techniques:

http://en.wikipedia.org/wiki/SQL_injection

An article on an indian website with the SQL injection flaw:
(www.incredibleindia.org) discovered by susam pal

#references : en.wikipedia.org

Saturday, September 1, 2007

Another online judge: PKU Judge Online

SPOJ (Sphere Online Judge) isn't very friendly to newbie programmers. It has mostly tough problems which take a lot of time. PKU (Peking University) Judge is more newbie friendly and at the same time has extreme difficulty problems. It has over 7000 problems which promise to never end.
For programmers who have just stepped into this wonderful world of algorithms and programs it would be great if they start from PKU online judge. Is as interactive as sphere in terms of submitting code online and checking the result.
The scoring system is a little tough because your rank would also depend on how many wrong submissions you made which is not the case of sphere. So it would be wise to correctly check everything including even the smallest extra whitespace which is not needed.
It also has more types of error definitions. Example if your solution is correct but your presentation is wrong then it would say so (not in the case of sphere).
Here is the link:
http://acm.pku.edu.cn/JudgeOnline/
Just register and start solving.

Thursday, August 30, 2007

Using arrays for passing by reference

A very common thing you learn when learning a new language specifically C or C++; passing an array name as an argument leads to passing by reference.
What you can do with it:
Supposedly you want to pass a large amount of similar data ( eg. lots of variables concerning a rocket's trajectory) then you can store all data in an array and send it off. Obviously all data must be of same data-type.

Wednesday, August 29, 2007

Can't open registry editor or task manager?

If you aren't able to open your registry editor or task manager even though you are the administrator then you have got a problem.
Probably you have a virus or a malware attack. Now better to scan and find the infected files and stuff.
But even after doing a check up you still can't solve the problem then following are some registry solutions.

If you can't open the registry editor then go to START->RUN and paste the following command:

REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 0 /f

Hopefully this should solve the problem.

For enabling the task manager:

REG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableTaskMgr /t REG_DWORD /d 0 /f

Hope this solves your problem.

Tuesday, August 7, 2007

Handling big numbers in c or c++

When i say big numbers i mean very big numbers. Numbers with digits near or in excess of 100.
We know that the greatest number you can enter is by using long double.
But there is a way to handle the biggest numbers : lets say the factorial of 100.
The solution is strings. You can use strings to input numbers and even create functions to perform operations on them just like on normal numbers. I am in the process of creating theses functions. Will post them as soon as they are ready.