Archive for 'Tips and Tricks'
Windows 7: Solutions to can’t sleep problems.
March 2, 2010 by InF, under How To, Software, Tech Posts, Tips and Tricks.

Hello folks. Sorry for lack of recent posts. Been taken up with uni lately. Anyway, I have recently migrated to Windows 7. I have to say Microsoft has done a magnificent job this time, especially when I compare Win7 and Vista. Performance on Win7 is awesome. And there are lots of usability improvements, which makes 7 a very nice software.
However, I was having a problem: I couldn’t manually sleep my computer. If I did it from the Orb/Start menu, the screen would turn off, the PC would shut for like a millisecond, before starting back up, and prompting me for login.
Turns out there are a few things that can cause this error, and they are easy to troubleshoot. Try these steps if you are having the same problem as me.
1) Update your drivers.
This should be pretty obvious. An old driver might be causing an issue. So just update your drivers, specially for your video card and it should correct any problem. If it still doesn’t work, move on.
2) Try to see which requests are keeping the PC on.
Open a Command Prompt. You can do it by typing “cmd” from the Run menu, or simply open the Start Menu, and type “Command Prompt” in the “Search Programs and Files” bar.
Type this command: “powercfg -requests” without quotes. Then press Enter. You will see a list of programs that could be making requests. Windows Media Player is a usual culprit. Just close them, and it should work. If you have “None.” marked, move on.
3) A specific device is keeping the PC from sleeping
Still in the command prompt, type “powercfg -devicequery wake_armed”. You will see a list of devices that can wake up your PC. For me, I got my Network card, Keyboard and Mouse in that list. Turns out it was my mouse that was responsible for waking up the machine.
What to do? Simple: Go to device manager ( Start Menu – Control Panel (View by: Large Icons, top right) – System – Device Manager (left sidebar) ). Find your device that you think is causing the problem. For me it was the mouse, but I had to try disabling each individually. So, find your mouse in that list, e.g. Mice and other pointing devices, right-click it, choose Properties and go to the Power Management tab. Uncheck the box “Allow this device to wake the computer“.
Validate the windows with Ok, close Control Panel, and you should be all ok. Try sleeping your computer now.
That’s it for this small guide. I hope it helps you. Step 3 solved my problem. My computer now sleeps when I want it to sleep.
No Comments
How many spam comments do you get?
July 31, 2009 by Guru, under Annoyances, Internet, Tips and Tricks.
Today is my last day at work at Vinivi. Kind of I have completed everything I had to do albeit I took more time I normally would have done these “things”. Just approved 2 comments and I thought, “lets see the stats for the number of spam comments blocked”.
21,257 Spam Comments Blocked
What are your current spam count?
A definition of spam from Wikipedia.
Spam is the abuse of electronic messaging systems (including most broadcast media, digital delivery systems) to send unsolicited bulk messages indiscriminately. While the most widely recognized form of spam is e-mail spam, the term is applied to similar abuses in other media: instant messaging spam, Usenet newsgroup spam, Web search engine spam, spam in blogs, wiki spam, online classified ads spam, mobile phone messaging spam, Internet forum spam, junk fax transmissions, social networking spam, and file sharing network spam.
Source: Wikipedia
An example of a Spam Comment as outlined by the SecuriTeam Blog
<strong>malware blocker…</strong>
Your topic %TITLE% was interesting when I found it on %DAY% searching for %KEYWORD%. Thanks, %URL%…
Some Links of Interest:
- What is Comment Spam
- Preventing Comment Spam (From Google)
- How to Stop Comment Spam
- Comment Spam (Six Apart)
You might also be interested in Protecting yourself against Plagiarism.
Note: This is in no way material to protect yourself against comment spam.
4 Comments
Firefox displays weird characters as headings (solution)
June 19, 2009 by InF, under Firefox, Software, Tech Posts, Tips and Tricks.
I am currently using Firefox, latest version that is 3.0.11 at the time of writing, and I encountered a strange problem on some sites, one of which is the famous Smashing Magazine. The headings were displayed using weird characters, or what it would seem, special characters. You can see a screenshot below.
At first, I thought it was a problem with character encoding. Changing to UTF-8 did not solve the problem, nor did switching off Auto-Detect from View menu – Character Encoding solve anything. Well, basically, after a lot of trying out solutions, it was not a problem with charset or encoding.
I tried other solutions but none seemed to work. One of them gave me a clue as to what the problem is. It was going to Tools – Options – Content – (Fonts & Colors) Advanced – (uncheck) “Allow pages to choose their own fonts, instead of my selections above”. This rendered all pages without custom fonts, except my default of Times New Roman. The problem was solved.
The workaround indicated that the problem resided with my fonts. I thus went and checked out the website source and the stylesheet and found out that Smashing Magazine uses Helvetica font as primary font for h2 tags. This line was found in the source and stylesheet respectively (I shortened the code with …’s):
<ul class="topic-list"> <li> <h2><a...> ... </a></h2>
ul.topic-list h2{font:44px Helvetica,Arial, ...}
If you don’t know, Helvetica is a proprietary font and doesn’t come with installs of Windows by default. It didn’t come with mine, on both my XP and Vista installs, so I’m assuming it doesn’t come by default.
The Solution:
So what can you do? Apparently, nothing. You cannot acquire the Helvetica font for free and install it. Unless you are willing to pay for it, you are stuck.
Now, if you are crafty enough, you can use some Google powers and try to find the font by… let’s just say, alternative means. I am not posting links here, because I do not encourage piracy. I managed to find a copy of Helvetica somewhere, installed it and problem was solved. You can see the results below.
If you do want to do what I did, you just need to find a copy of Helvetica from somewhere, install it, restart Firefox and the problem should be solved.
Another plausible solution would be for sites with such problems to substitute their fonts for those people do have on their machines. But we cannot require this from site designers. Another way would be to be able to find an addon or similar for Firefox that would allow for font substitution. If you know of such a solution, you are free to share it with us.
A bit of strangeness here is that, since Firefox did not find Helvetica on my machine, it should have used Arial. I cannot understand why it did not.
If you do install the Helvetica font and still get the problem, maybe it’s another font being used and that you don’t have.In this case: check the website source, find which element it is, search the stylesheet for that element, find which font it is and install the font. Restart Firefox, and the problem should be solved.
Hope my solution helps. That’s it! Kinda easy, wasn’t it?
Note: I uninstalled Helvetica after I tested the solution, for those of you who were interested!
11 Comments
Backup your hamachi profile
June 1, 2009 by Guru, under Software, Tips and Tricks.
Many times you need to format your PC and start anew. What about your so loved Hamachi configs and your so long “had”, ip address? Backing it up need only a minor copy-and-paste. (In a safe location).
The easy way
- Launch Hamachi
- Click on the “pulley” looking icon on the bottom left corner of Hamachi – “Configure Hamachi”
- From the pop-up menu choose “Preferences“
- On the left pane of the opened window entitled “Status and Configuration“, select “System“ (again presented with a pulley icon)
- Now, you would be presented with 3 buttons. Click on the one with caption, “Open Configuration folder”
- Hamachi configuration folder will be opened. Go up one level
- Finally you will see a folder named “Hamachi”.
- Copy it in a safe location and you would be safe.
The “not so lengthy” way
C:\Users\Guru\AppData\Roaming\
Replace “Guru” by your username, open location and finally copy and paste folder “Hamachi”
You can open the location by navigating one level at a time to the required directory or simply press Windows Button + R to open the “Run” dialog box, paste the location in the text box and hit Enter to go to the “Roaming” directory.
Easy?
No Comments
PostgreSQL Database Cluster Initialisation Failed Solution
April 22, 2009 by InF, under Tips and Tricks.
I’ll keep this one short and sweet. For those of you that have tried to install PostgreSQL (mine was 8.3.7-1) on Windows Vista and got the error Database Cluster Initialisation Failed error at the end of the install, read this.
The problem is that Vista has some safety features associated with setting permissions on the Program Files folder. Basically, even if you are an admin, you can’t change permissions on some folders like Program Files and Windows folder itself. This causes initdb to be unable to create some folders and the database cluster. What this means for you is that you need to install PostgreSQL in another folder that is not inside Program Files.
By the way, if you have forgotten your Postgres account password while installing the first time, just open a Command Prompt in Vista (If you don’t know how, Google for it). Then type the command “net user”. You will see a list of users on your computer. Find Postgre’s account. It’s usually “postgres“. Then you need to change its password by typing “net user postgres new_password” where new_password is… well, a new password for the account. You will be needing that postgres account during install. You will need admin privileges to do this change however.
Firstly, uninstall any failed installations. Use the Control Panel or the PostgreSQL installer in the install folder.
During the install, you will be prompted to choose where you want to install the program. Just select a location in another place. Like “C:\PostgreSQL” or something similar. It may even be on your desktop. But not inside Program Files. Not inside Windows folder. However, it’s not as easy. Bear with me.
After the install, you will still see that darned error message (or something like non-fatal error occured). Do not despair! (For Windows Power Users, we are just assigning Full Control permission to Postgres account on the new PostgreSQL install folder). For other users, read on if you don’t know how to do it.
Go to where you just installed PostgreSQL. In this case, the C: drive. There, right-click on the folder (usually called PostgreSQL), and go to Properties – Security tab. Click on the Edit button. You will now see some usernames and other stuff. Click on the Add button. In the “Enter the object names to select” box, enter “postgres” and press Check. Postgres’ user account should appear there. Click on Ok.
Now from the “Group or Usernames” box, select the Postgres account. In the window below, with lots of checkboxes, assign permission “Full Control” in the Allow Column to it. Note, if you don’t want to allow full control, just give it read/write. But I just went ahead and gave it Full Control. (I was tired and annoyed. The “World’s most advanced open source database” had failed to install!). Click on Ok and wait a bit for permissions to be applied.
Then, just do a re-install. Do not uninstall anything. Just run the setup again. It’ll say that a PostgreSQL install folder already exists and other stuff. Just click on Next until the install finishes. If you see “file cannot be copied” errors, click on the “ignore” button when needed.
That’s it. PostgreSQL should be up and running on Vista now. Hope it works for you too as it did for me, and that my guide is helpful to anybody. If it works, or if you have other solutions, let us know. Thanks for reading!
12 Comments
Keep the command prompt open after using Run
March 17, 2009 by InF, under Tips and Tricks.
If you are a Windows user, you know that sometimes you really need to make use of the Command Prompt, for things like “ping” or “tracert”. Unless you are a GUI fanatic.
But have you noticed that sometimes when you type a command in the Run box, the prompt closes immediately after execution? There must be a way to keep it open, right?
Today, I will share that trick with you, and it’s really simple to do.
First, you need to see what I mean. Type “ping google.com” in the Run box and type enter or press Ok. The prompt should close after execution of the ping, not giving you time to see the results.
If this has ever happened to you (it does for me, on Windows Vista), then try this:
Before you type your command, put in “cmd /k” before.
For example, if “ping” closes for the prompt after execution, try “cmd /k ping google.com” or any other address.
I have tested on WinXP and Vista. Both work. Hope this is useful to you someday.
5 Comments
Firefox Tip: Keep bookmarks menu open after click
March 10, 2009 by InF, under Firefox, Software, Tech Posts, Tips and Tricks.
If you have been using Firefox, and like me, make full use of your bookmarks and the Bookmarks Toolbar, then you must have noticed that as soon as you click a link, the menu closes, making multiple-selection of bookmarks to open impossible. That’s a huge annoyance for me.
Luckily, there is a solution that works for the Bookmarks menu, the Bookmarks Toolbar folders (if you have created folders in there. If not, create them! It maintains order) and the History Menu, in case you want to restore multiple closed sites.
The solution is really simple: Just get the Stay-Open Addon from here: https://addons.mozilla.org/en-US/firefox/addon/6459
Install it just as you would for any other addon and restart Firefox. No configurations are needed. It worked out-of-the-box for me. However, it works only for Firefox 3 and up I think.
Now, how to use it?
Simple. Open the Bookmarks menu, or other menus I mentioned above, and middle-click an item. You will notice that the menu remains open. You can now continue to middle-click other items if you want to open more.
There is not much to configure, except a single option available in “about:config”. I didn’t require it till now. It’s CTRL-Click functionality which I didn’t need.
Voila! This should help you keep those menus open while you open multiple sites without the menus closing after each click. Specially useful if you use Live Bookmarks from within Firefox to read RSS feeds. You can now open multiple feed items without that menu closing. This is so useful! Makes me wonder why this option is not already a default in Firefox…





