Sunday, June 23, 2013

How to Send the Contents of the Clipboard to a Text File via the Send to Menu


We have previously covered how to send the contents of a text file to the Windows Clipboard with a simple Sent To shortcut, but what if you want to do the opposite? That is: send the contents of the clipboard to a text file with a simple shortcut.
No problem. Here’s how.

Copy the ClipOut Utility

While Windows offers the command line tool ‘clip’ as a way to direct console output to the clipboard, it does not have a tool to direct the clipboard contents to the console. To do this, we are going to use a small utility named ClipOut (download link at the bottom).
Simply download and extract this file to a location in your Windows PATH variable (if you don’t know what this means, just extract the EXE to your C:\Windows folder) and you are ready to go.

Add the Send To Shortcut

Open your Send To folder location by going to Run > shell:sendto
Create a new shortcut with the command:
CMD /C ClipOut >
Note the above command will overwrite the contents of the selected file. If you would like to append to the contents of the selected file, use this command instead:
CMD /C ClipOut >>
Of course, you could make shortcuts for both.
Give a descriptive name to the shortcut.
You’re finished. Using this shortcut will now send the text contents copied to your Windows Clipboard to the selected file.
It is important to note that the ClipOut tool only supports outputting text. If you had binary data copied to your clipboard then the output would be empty.

Changing the Icon

By default, the icon for the shortcut will appear as a command prompt, but you can easily change this by editing the properties of the shortcut and clicking the Change Icon button. We used an icon located in “%SystemRoot%\System32\shell32.dll”, but any icon of your liking will do.
As an additional tweak, you can set the properties of the shortcut to run minimized. This will prevent the command window from “blinking” when the send to command is run (instead it will blink in your taskbar which is hardly noticeable).


Wednesday, June 19, 2013

What is Overclocking?


Overclocking is the action of increasing a component’s clock rate, running it at a higher speed than it was designed to run. This is usually applies to the CPU or GPU, but other components can also be overclocked.
Increasing a component’s clock rate causes it to perform more operations per second, but it also produces additional heat. Overclocking can help squeeze more performance out of your components, but they’ll often need additional cooling and care.

What is Overclocking?

Your computer’s CPU comes from the factory set to run at a certain maximum speed. If you run your CPU at that speed with proper cooling, it should perform fine without giving you any problems.
However, you’re often not limited to that CPU speed. You can increase the CPU’s speed by setting a higher clock rate or multiplier in the computer’s BIOS, forcing it to perform more operations per second.
This can speed up your CPU — and therefore speed up your computer if your computer is limited by its CPU — but the CPU will produce additional heat. It may become physically damaged if you don’t provide additional cooling, or it may be unstable and cause your computer to blue-screen or restart.

Can You Overclock?

You may not be able to overclock your CPU. Many motherboards and Intel CPUs ship with locked multipliers, preventing you from tinkering with their values and overclocking your CPU. Intel sells expensive “Extreme Edition” CPUs with unlocked multipliers, targeted at enthusiasts that want to overclock and squeeze every bit of performance out of the CPU.
If you want to build the most powerful gaming PC imaginable with a water-cooling system so you can push its hardware to the limits with overclocking, you’ll need to take this into account when you buy the components and make sure you buy overclock-friendly hardware. If you have a standard CPU, you probably won’t be able to tinker with it much.

Why You Might Want to Overclock

The advantages to overclocking are clear: You get a faster CPU that can perform more operations per second. However, overclocking has become less critical over time — where overclocking once offered a more responsive desktop and faster performance in Microsoft Office, computers have become powerful enough that most users probably won’t even notice the difference. Your computer is likely bottle-necked by other things — perhaps a mechanical hard drive, if you don’t have solid-state storage — so you may not see a noticeable performance difference most of the time.
Gamers or enthusiasts that want their hardware to run as fast as possible may still want to overclock. However, even gamers will find that modern CPUs are so fast and games are so limited by graphics cards that overclocking doesn’t work the magic it used to.

How to Overclock

Every CPU is different, and every motherboard has different BIOS options. It’s not possible to provide a guide for overclocking that will work for everyone. But we’ll try to outline the basics, anyway:
  • Ensure Your System Has Proper Cooling: Your CPU comes with a heat sink and fan from the factory, which are designed to handle the amount of heat produced at the CPU’s standard speed. Speed it up and it will produce more heat. This means that you’ll probably need additional cooling. This can be in the form of an aftermarket heat sink that can dissipate more heat and/or a more powerful CPU fan that can blow the hot air away. You’ll want to have a good amount of free space inside your computer’s case so the air can move around and eventually be blown out by the fan in your computer’s case, which may also need to be upgraded. Air flow is very important for handling heat, as just having a heat sink or CPU fan won’t help if all that hot air stays trapped inside your case.
  • Consider Water-Cooling: Hardcore overclockers may want to use a water-cooling system, which is more expensive. Water-based coolant is pumped through tubes inside of the case, where it absorbs the heat. It’s then pumped out, where the radiator expels the heat into the air outside of the case. Water-cooling is much more efficient than air-cooling.
  • Overclock in the BIOS: You’ll need to go into your computer’s BIOS and increase the CPU clock rate and/or voltage. Increase it by a small amount, then boot your computer. See if the system is stable — run a demanding benchmark like Prime 95 to simulate heavy use and monitor your computer’s temperature to make sure the cooling is good enough. If it’s stable, try increasing it a little bit more and then run another test to ensure the PC is stable. Increase the amount you’re overclocking by bit by bit until it becomes unstable or the heat is too much, then drop back down to a stable level. Overclock little by little to ensure it’s stable, don’t just increase your CPU’s speed by a large amount at once.

The Downsides

When you overclock your CPU, you’re doing something you weren’t supposed to do with it — this will often void your warranty. Your CPU’s heat will increase as you overclock. Without proper cooling — or if you just overclock too much — the CPU chip may become too hot and may become permanently damaged.
This complete hardware failure isn’t as common, but it is common for overclocking to result in an unstable system. The CPU may return incorrect results or become unstable, resulting in system errors and restarts.
If you’re overclocking, you should slowly increase the clock rate and test every new level to make sure it’s stable. You should also monitor the temperature of your CPU and ensure that you have proper cooling. The cooling that came with your CPU probably won’t cut if. If you’re using a laptop without much space for additional air flow, don’t try to overclock — there’s generally just not enough space in a laptop to handle the heat.

Overclocking Resources

If you are interested in overclocking, you’ll want to find information that applies to your specific hardware. The web is full of forums where people discuss their overclocking experiences, like,  and guides for specific CPUs.
Note that even CPUs of the same model aren’t completely identical. One CPU may have more tolerance for overclocking, while another CPU over the same model may not be stable at the same speeds. This all comes down to natural variations in the manufacturing process.

Overclocking can apply to phones, too. There are apps that can overclock a rooted Android smartphone. However, between the additional heat and battery life hit, using these apps is generally not a smart idea.

Tuesday, June 18, 2013

Encode Secret Messages As BMP Images With Text to Color For Windows

Text to Color works more or less like a steganography tool. What makes it stand apart from a normal steganography technique, however, is that instead of embedding a text file into a user-selected picture, the application generates the image file on its own and lets you encode the text into it. The interface looks very flat and doesn’t complicate things with any configuration settings.
Here’s how it works: Text to Color doesn’t require any installation; once downloaded, just run its EXE file to launch the app. The simple interface of the app carries a total of five buttons, along with a text box. You can type in text yourself, copy and paste it from elsewhere, or select a TXT file by clicking the Load Text button.
Text to Color
Having done that, just click Encode Text and your selected text will instantly turn into an image file. Text to Color also displays a tiny preview of the image as highlighted in the screenshot below. This is the actual image that comes up when a user opens the file in an image viewer. The only further input required from your side is to hit Save image and type the file name. The application saves the image file as BMP. You can now transfer this file over any electronic medium or share it with your intended recipient, and no one will ever notice the underlying text should the file ever lands into the wrong hands.
Text to Color_Encode
You can also use this app to decipher an encrypted file. The decipher/decode process is also fairly simple. When you’re ready, click the Load Image button to select the ciphered image file. The application will let you save the decoded text into a TXT file.
During testing, I tried to cipher and decipher a couple of different files, and the tool worked exactly as advertised.
Secret Text File
While Text to Color works great as it is, it could have been improved even further if a password could be set when encoding, that would then be required for decoding the resulting image file back into text. We hope the developer adds this feature in a future update. The app works on Windows XP, Windows Vista, Windows 7 and Windows 8.

Why the 64-bit Version of Windows is More Secure


Most new PCs have been shipping with the 64-bit version of Windows — both Windows 7 and 8 — for years now. 64-bit bit versions of Windows aren’t just about taking advantage of additional memory. They’re also more secure than 32-bit versions.
64-bit operating systems aren’t immune to malware, but they do have more security features. Some of this also applies to 64-bit versions of other operating systems, such as Linux. Linux users will gain security advantages by switching to a 64-bit version of their Linux distribution.

Address Space Layout Randomization

ASLR is a security feature that causes a program’s data locations to be randomly arranged in memory. Before ASLR, a program’s data locations in memory could be predictable, which made attacks on a program much easier. With ASLR, an attacker has to guess the correct location in memory when trying to exploit a vulnerability in a program. An incorrect guess may result in the program crashing, so the attacker won’t be able to try again.
This security feature is also used on 32-bit versions of Windows and other operating systems, but it’s much more powerful on 64-bit versions of Windows. A 64-bit system has a much larger address space than a 32-bit system, making ASLR that much more effective.

Mandatory Driver Signing

The 64-bit version of Windows enforces mandatory driver signing. All driver code on the system must have a digital signature. This includes kernel-mode devices drivers and user-mode drivers, such as printer drivers.
Mandatory driver signing prevents unsigned drivers provided by malware from running on the system. Malware authors will have to somehow bypass the signing process through a boot-time rootkit or manage to sign the infected drivers with a valid certificate stolen from a legitimate driver developer. This makes it more difficult for infected drivers to run on the system.
Driver signing could also be enforced on 32-bit versions of Windows, but it isn’t — likely for continued compatibility with old 32-bit drivers that may not have been signed.
To disable driver signing during development on 64-bit editions of Windows, you would have to attach a kernel debugger or use a special startup option that doesn’t persist across system reboots.

Kernel Patch Protection

KPP, also known as PatchGuard, is a security feature only found on 64-bit versions of Windows. PatchGuard prevents software, even drivers running in kernel-mode, from patching the Windows kernel. This has always been unsupported, but it’s technically possible on 32-bit versions of Windows. Some 32-bit antivirus programs have implemented their antivirus protection measures using kernel patching.
PatchGuard prevents device drivers from patching the kernel. For example, PatchGuard prevents rootkits from modifying the Windows kernel to embed themselves in the operating system. If an attempt at kernel patching is detected, Windows will immediately shut down with a blue screen or reboot.
This protection could be put into place on the 32-bit version of Windows, but it hasn’t been — likely for continued compatibility with legacy 32-bit software that depends on this access.

Data Execution Protection

DEP allows an operating system to mark certain areas of memory as “non-executable” by setting an “NX bit.” Areas of memory that are supposed to hold data only will not be executable.
For example, on a system without DEP, an attacker could use some sort of buffer overflow to write code into a region of an application’s memory. This code could then be executed. With DEP, the attacker could write code into a region of the application’s memory — but this region would be marked as not-executable and could not be executed, which would stop the attack.
64-bit operating systems have hardware-based DEP. While this is also supported on 32-bit versions of Windows if you have a modern CPU, the default settings are more stringent and DEP is always enabled for 64-bit programs, while it’s disabled by default for 32-bit programs for compatibility reasons.
The DEP configuration dialog in Windows is a bit misleading. As Microsoft’s documentationstates, DEP is always used for all 64-bit processes:
“System DEP configuration settings apply only for 32-bit applications and processes when running on 32-bit or 64-bit versions of Windows. On 64-bit versions of Windows, if hardware-enforced DEP is available it is always applied to 64-bit processes and kernel memory spaces and there are no system configuration settings to disable it.”


64-bit versions of Windows run 32-bit Windows software, but they do it through a compatibility layer known as WOW64 (Windows 32-bit on Windows 64-bit). This compatibility layer enforces some restrictions on these 32-bit programs, which may prevent 32-bit malware from functioning properly. 32-bit malware will also be unable run in kernel mode — only 64-bit programs can do that on a 64-bit OS — so this may prevent some older 32-bit malware from functioning properly. For example, if you have an old audio CD with the Sony rootkit on it, it won’t be capable of installing itself on a 64-bit version of Windows.
64-bit versions of Windows also drop support for old 16-bit programs. In addition to preventing ancient 16-bit viruses from executing, this will also force companies to upgrade their ancient 16-bit programs that could be vulnerable and unpatched.
Given how widespread 64-bit versions of Windows now are, new malware will likely be capable of running on 64-bit Windows. However, the lack of compatibility can help protect against old malware in the wild.

Unless you use creaky old 16-bit programs, ancient hardware that only offers 32-bit drivers, or a computer with a fairly old 32-bit CPU, you should be using the 64-bit version of Windows. If you’re not sure which version you’re using but you have a modern computer running Windows 7 or 8, you’re likely using the 64-bit edition.
Of course, none of these security features is foolproof, and a 64-bit version of Windows is still vulnerable to malware. However, 64-bit versions of Windows are definitely more secure.

How to Test if Your ISP is Throttling Your Internet Connection


We’ve all heard the rumors and seen occasional evidence — some Internet service providers slow down certain types of traffic, like BitTorrent traffic. Other ISPs slow down their customers’ connections if they download too much data in a month.
But does your ISP do any of this? Here are a few simple ways you can test whether your ISP is performing any traffic shaping or bandwidth throttling on your connection.

Traffic Shaping

The Glasnost project provides web-based tests that can identify whether different types of traffic are being rate-limited (slowed down). For example, run the BitTorrent test and Glasnost will test whether your ISP is slowing down your BitTorrent transfers. Glasnost can also run tests to detect whether Flash video, eMule, Gnutella, Email, HTTP, SSH, or Usenet are being throttled or blocked by your ISP. Each test takes about eight minutes to run.
Glasnost measures the performance of different types of traffic between your computer and their servers. If the speeds are similar, no traffic shaping is likely occurring. If the speeds are different — for example, if BitTorrent traffic is much slower — then traffic-shaping is likely occurring.
Unfortunately, the Glasnost tests require you have the Java plug-in installed. If you want to run these tests, we recommend you uninstall Java or at least disable the Java plug-inimmediately after — the Java plug-in has been a big source of security problems. You should also watch out for the terrible Ask Toolbar and make sure not to install it while installing Java. We normally wouldn’t recommend using websites that require Java, but the Glasnost tests are the most widely recommended tests you can use.
As with other similar tests, you’ll want to run Glasnost tests while you’re not performing any large downloads on your network.

Bandwidth Limiting

Is your ISP slowing down your connection because you’ve used too much data? Some ISPs have been known to do this as a way of enforcing their bandwidth caps. Even ISPs that offer “unlimited” connections may throttle you after you hit a certain, usually large, threshold.
To test whether your ISP is slowing down your Internet connection over time, you’ll have to measure your Internet connection speed over time. For example, if your ISP is slowing your Internet speed down, it’s probably slowing it down towards the end of the month after you’ve used a large amount of data. You then probably have typical, fast speeds at the beginning of the next month.
You can monitor Internet speed variations over time by using the SpeedTest website. Run a test at the beginning of the month and run further tests regularly, especially at the end of the month. If you consistently see slower speeds near the end of the month, it’s possible that your ISP is throttling your bandwidth. You can sign up for a SpeedTest account to log your results and compare them over time.
Note that other factors can also affect SpeedTest results. For example, if you or any other person on your network is downloading or uploading on your connection, the measurement may not be accurate — you should perform a SpeedTest while your connection isn’t being used. The time of day can also impact your Internet connection speeds. You may see faster speeds at 3 a.m. when no one is using the shared line to your ISP rather than at 9 p.m. while everyone else in your neighborhood is using the line.
It’s also normal if you don’t see the maximum speeds your ISP is advertising — most people aren’t getting the Internet speeds they’re paying for.

Other Tools

The Measurement Lab (M-Lab) provides a variety of other tools that can be used to measure Internet connection data, testing for traffic shaping, measuring network performance, and diagnosing network problems. If you’re looking for other tools to test your connection, this is a good place to start.

If your ISP is throttling your connection, there’s not much you can do, unfortunately. You can switch ISPs and try to find a better one — assuming your ISP doesn’t have a monopoly in your area. You may also be able to pay for a more expensive plan with higher bandwidth allocation and, hopefully, without traffic shaping.

Thursday, June 13, 2013

Eclipse: Shortcut keys


Delete row. Try it! You no more need to grab the mouse and select the line, no more Home, Shift + End, Delete. Quick and clean.
ALT + Up/Down Arrow

Move the row (or the entire selection) up or down. Very useful when rearranging code. You can even select more rows and move them all. Notice, that it will be always correctly indented.
ALT + Left/Right Arrow

Move to the last location you edited. Imagine you just created a class Foo, and now you are working on a class Boo. Now, if you need to look at the Foo class, just press Alt+Left Arrow. Alt+Right Arrow brings you back to Boo.


Organize imports. What happens when you first use a class you have not yet imported? You will see an error. But when you press this magical combination, all your missing classes will be imported, and the unused imports will vanish.


Probably the most useful one. It activates the quick fix. Imagine you create a class, which implements some interface. You will get an error, because the inherited methods are not yet implemented. While you are on line where the error occurs, press this combination to activate the quick fix. Now, select the "Add unimplemented methods" option. You can use the quick fix at every error you ever receive.
Quick fix comes handy in other situations too. My favorite is the "Split variable declaration". Sometimes I need to broaden the scope of a variable. I activate the quick fix, split declaration, and use alt + arrow to put it where it belongs. You can find even more usages: Convert local variable to field, rename in file, Inline local variable..
You could use the "Split variable declaration" on the bar variable, and then move it with Alt+Arrows above the try block..
Or you could use the "Add unimplemented methods" fix here.
The best thing you can do if you see an error is to use the quick fix.

Open Type. Imagine, that you need to have a look at the Foo class. But, where is the Foo class? Is it in the Boo project and in the package? Or somewhere else? With this shortcut, you don't need to know. Just press it, type Foo and you are in.

Shows you a list of all open editors.


Use to move between open editors. This is an slower alternative to Ctrl + E. Comes handy in a situation when you want to periodically switch between two editors, something, what is nearly impossible with Ctrl+E as it sorts entries quite randomly. Or you might just use Alt+Arrows..


Move between views. When in editor, press Ctrl+F7 to switch to the Package Explorer, or hold Ctrl and press F7 multiple times to switch to other views.
Move between perspectives. The same as previous.

CTRL + F11

Runs the application. What gets launched depends on your settings. It will either launch the last launched class (my preffered way) or it will launch currently selected resource (the default way). If you want to change its behavior read the previous post.


Open new type wizard. This is not very quick because you have to select the wizard type (weather you want to create new class, jsp, xml or something else) in the next step. Much faster way would be if you could just hit the shortcut and invoke the particular wizard. It is possible, just keep reading..


Maximize or umaximize current tab.


Corrects indentation.


Formats code. You can make a beautiful looking code out of a mess with this. It requires a bit of setup, but it is well worth it. You can find its settings under Window->Preferences->Java->Code style->Formatter


Incremental search. Similar to the search in firefox. It shows you results as you type. Don't be surprised, if you hit this combination, nothing happens - at the first glance. Just start typing and eclipse will move your cursor to the first ocurence.


Shows you a list of your currently defined shortcut keys.

I don't like your shortcuts

Such is life nowadays. Remember, you can always change those bindings to match your preferences. Open Windows->Preferences->General->Keys. Now you can use the filter to find your shortcut and change its binding.
The real fun begins when you cannot find the command you are looking for. The key here, is to have the "Include unbounds commands" checkbox checked. It will show you all commands, even those, which have no keys bound.
While you are here, I recommend to add the following bindings:


Bind this to "Generate getters and setters". This is a "must have".


Bind this to SVN/CVS "Commit".


Bind this to SVN/CVS "Update".

Now, type "new" (without quotes) in the filter text. You should see a list of all new type wizards. Choose the most frequently used and assign them a shortcut. For example, the most used wizard for me is the new class wizard. Thus I assigned it the CTRL+SHIFT+N keys.

Let me demonstrate a quick way to create new class now.

Hit CTRL + SHIFT + N (or the combination you assigned in the previous step). This should bring up new class wizard. Type in the name and press ALT+E. You can now select a class which will be a superclass for the newly created class. Hit ALT+A and select all implemented interfaces . Now hitALT+F and your class will be generated. Eclipse will also provide the default implementation for all abstract and interface methods you inherited.

Did you notice the weird underscores everywhere in the dialog? They give you a hint about the shortcut key. Hit ALT and the underlined letter to press the button, check the checkbox or get focus for a textfield.
Did you notice the underscores?

I think that using shortcut keys is the fastest way to productivity and if not, then at least your wrists will say you a silent thanks. Now, don't wait, go on and assign keys to the features you use most.