I've used KatMouse for many years on Windows 7 computers. It lets you scroll whichever window your mouse pointer is over, using your mouse-wheel. The window doesn't need to have focus - you can scroll a window without having clicked it first.

It's especially useful for Windows Explorer. You can scroll through the left pane to find the folder you're interested in, click that folder so that its files are displayed in the right pane, and then immediately scroll down through the files in the right pane without another click.

Whenever I use a computer without this functionality, it feels tedious and awkward having to click before being able to scroll. So naturally, on my newer Win8.1 computer, I installed KatMouse as well. At first it worked fine. But later on, it was intermittently not working. So I searched for a fix.

In doing so, I discovered that Windows 10 has the same functionality built-in and enabled by default. Even better, Windows 8 has this functionality too, although it requires a registry tweak to enable it:
  
   HKEY_CURRENT_USER\Control Panel\Desktop
   Set the MouseWheelRouting value to 3 to turn it on, or 1 to turn it off
   Logout and back in


The built-in functionality even works on some windows, such as Task Manager, which KatMouse didn't work on.

I was curious whether the registry tweak would work in Windows 7 too, so I tried it out. Windows 7 did not have the MouseWheelRouting key by default, so added it. However, it did not work on Windows 7. This only works on Windows 8 +.
Eclipse stores the "Installed JREs" information in the following 3 files.

  • .metadata\.plugins\org.eclipse.jdt.launching\.install.xml


  • This file has an entry for each item on the "Installed JREs" preferences page.
    Example:
       <entry loc="C:\Program Files\Java\jdk1.6.0_45" stamp="1427484124643"/>
       <entry loc="C:\Program Files\Java\jdk1.7.0_80" stamp="1456355788382"/>
       <entry loc="C:\Program Files\Java\jdk1.8.0_92" stamp="1468644229263"/>

    The "stamp" attribute value is based on the last-modified timestamp of the corresponding folder.
    It is the number of seconds, including milliseconds, since Jan 1, 1970. (see http://www.epochconverter.com/)

    This Windows PowerShell command lists the timestamps of the objects in the current folder, including seconds but not milliseconds:
       Get-ChildItem . -Force | Select-Object FullName, CreationTime, LastAccessTime, LastWriteTime, Mode, Length

    This WMIC command lists the last-modified time for a particular folder, including microseconds:
       WMIC FSDIR where name="C:\\Program Files\\Java\\jdk1.6.0_45" get lastmodified |findstr /brc:[0-9]

    This WMIC command lists the last-modified time for a particular file, including microseconds:
       WMIC DATAFILE where name="C:\\Program Files\\Java\\jdk1.6.0_45\\README.html" get lastmodified |findstr /brc:[0-9]


  • .metadata\.plugins\org.eclipse.jdt.launching\libraryInfos.xml

  • This file has a <libraryInfo> section with info on jars and paths for each entry listed in above file


  • .metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.launching.prefs


  • This file has an entry for each item on the "Installed JREs" preferences page, each with an id attribute.
    The id attributes do not correspond to the timestamp numbers in the .install.xml file.
    They are probably instead set based on when the entry was added on the Installed JREs page.

    The "defaultVM" attribute indicates which entry (based on its id) should be used as the default JRE.
    (linebreaks added to below example for readability)

    eclipse.preferences.version=1
    org.eclipse.jdt.launching.PREF_DEFAULT_ENVIRONMENTS_XML=
    org.eclipse.jdt.launching.PREF_VM_XML=
    <?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n
    <vmSettings defaultVM\="57,org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType13,1468699399553" defaultVMConnector\="">\r\n
    <vmType id\="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType">\r\n
    <vm id\="1468694696902" name\="jdk1.8.0_92" path\="C\:\\Program Files\\Java\\jdk1.8.0_92"/>\r\n
    <vm id\="1468699348306" name\="jdk1.6.0_45" path\="C\:\\Program Files\\Java\\jdk1.6.0_45"/>\r\n
    <vm id\="1468699399553" name\="jdk1.7.0_80" path\="C\:\\Program Files\\Java\\jdk1.7.0_80"/>\r\n
    </vmType>\r\n
    </vmSettings>\r\n

    Eclipse compares the timestamps listed in the .install.xml file to the current last-modified timestamps of the corresponding folders.

    If the timestamp listed in the file matches the timestamp of the folder, Eclipse recognizes the entry as valid.
    If the timestamp listed in the file is newer than the timestamp of the folder, then Eclipse won't recognize the entry.

    If the timestamp listed in the file is older than the timestamp of the folder, indicating a change to the files in the JRE folder, Eclipse will regenerate the <libraryInfo> section in the libraryInfos.xml file and update the .install.xml with the new timestamp.

    If you want to manually update the org.eclipse.jdt.launching.prefs file with a new entry for a new Java path, you don't have to calculate the matching timestamp number. You can simply set the stamp attribute to a value that you know is less than the actual folder timestamp (for example, Jan 1, 2014), and then let Eclipse update the files.
When playing a video on the Amazon website in Firefox, the closed captions option was available but not working. Even after turning the option "On", no captions would display. The captions worked ok in other browsers.

I tried running Firefox in safe mode, with all add-ons disabled. That way, the captions also worked. I narrowed it down to a problem with the NoScript add-on. Enabling scripts globally didn't make a difference (I already had Amazon.com whitelisted). To fix the problem, I had to change the XSS settings - in the NoScript settings window, under Advanced - XSS, unselect the checkbox for "Sanitize cross-site suspicious requests".

Rather than turning off XSS protection for all sites, you can instead add a URL pattern to exclude from the protection. I tried this: ^https?://([a-z,-]*)\.amazon\.com/.*
Oddly, using that, the captions still don't display the first time I open the video. But if I close and reopen it, then they do display.
Unlike IrfanView, which requires several steps to sharpen a multi-page PDF, ImageMagick can do it in a single step, using its "convert.exe" command line utility.

I've found that the following parameters give good results for scanned text documents.
They use the "unsharp" parameter, which despite its name is used to sharpen an image.

For 300 dpi scanned documents:

C:\util\ImageMagick-6.9.3-4-portable-Q16-x64\convert.exe -density 300 -unsharp 10x3.2+5.0+0.10 -compress jpeg -quality 75 [input file] [output file]

For 600 dpi scanned documents:

C:\util\ImageMagick-6.9.3-4-portable-Q16-x64\convert.exe -density 600 -unsharp 30x5.5+3.0+0.10 -compress jpeg -quality 75 [input file] [output file]

References:
Sharpening using ImageMagick
ImageMagick command line options
Windows Update is acting odd today on my Win7 computer.

One svchost.exe process had high CPU usage (~50%) for a long time. Resource Monitor showed it was due to the wuauserv (Windows Update) service. At this point, I had no notification of any updates available in the Task Bar. Windows Update is configured to notify me that updates are available, but not to automatically download or install them. So there was no obvious reason for the service to be using a lot of CPU.

I rebooted, and the same thing happened again.

Then I opened Windows Update from the Control Panel, and it showed 26 important and 8 optional updates available. I clicked to download and install them (186.9 MB).

11 minutes later, the download progress was still showing 0% complete, so I clicked to stop it.

I tried restarting the Windows Update service from the Services panel, but got the message "Windows could not stop the Windows Update service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion".

I ended the offending svchost.exe process from Task Manager, and restarted the Windows Update service. I again clicked to download & install the updates.

Svchost/wuauserv started using a lot of CPU again.
50 minutes later, the download showed 3% complete - at least it finally was making progress. Another 80 minutes later, it finally finished and wants to reboot.

And now 15 minutes later without having rebooted yet, TrustedInstaller.exe has been using a lot (~50%) of CPU the whole time.

Hopefully after I reboot, the CPU usage will go back to normal.

If I ignored these things, they'd probably eventually complete on their own and not be issues. But it bothers me when background processes use a lot of resources, with no easy way for me to tell what is going on.

This person may be having the same problem, but I'm not sure.

Yep, after rebooting, walking away, and coming back to my computer a few hours later, it's back to normal.
Everything had been working fine on Eclipse Kepler + Java 1.6. As I was building a new local environment, I decided to upgrade my Eclipse at the same time.

I downloaded the latest Eclipse version, Mars. It requires a minimum Java level of 1.7 to run. Our code is only tested on Java 1.6. So I planned to run Eclipse on the latest Java version, 1.8, while running our code on 1.6. I set the compiler compatibility level to 1.6.

First there was the Git issue as mentioned in the prior post.

Then when I tried building the code, strange things happened. First there were memory / heap space errors, and crashes. After finding the right Java memory settings to avoid those issues, the build no longer crashed, nor did it complete. It went on and on... and periodically popped up tons of windows all with the same message, while doing so. It seemed stuck in a loop.

Rather than switching to Java 1.7 and risking still having the same problem, I decided to try Eclipse Luna + Java 1.6. At least that would be a partial upgrade. (I vaguely recall a coworker having a different compile issue with Kepler + 1.7, so it's probably good I didn't try 1.7.)

Everything seemed fine with Luna. The builds worked, and the code ran ok.

Then I wanted to debug one of our other projects which uses Maven. But the File - Import menu and the Preferences window were missing the Maven entries, even though Eclipse showed Maven as being installed.

It seemed like my Eclipse might be corrupted, so I downloaded a fresh copy. With the fresh copy, the Maven entries were there! Then I installed the Spring Tool Suite in the fresh workspace, as the other projects require Spring. But after the install, the Spring entries were missing from the menus and Preferences window! Even though they had been present in the first workspace!

Now I had one workspace with the Maven entries present and the Spring ones missing, and another workspace with the Spring entries present but the Maven ones missing.

It finally occurred to me to check the Eclipse .log files in both workspaces. Both .log files showed startup errors related to the m2e and Spring components requiring at least Java 1.7. (Don't ask me why Spring seemed to be working ok in the 1st workspace but not the 2nd.)

So, after all that, I'm going back to using Kepler. There's a team tasked with doing a technology upgrade project, so hopefully they'll get our code compatible with the latest Java and then I'll be able to upgrade Eclipse.
I have a Windows 7 computer with Git installed.

In both Eclipse Kepler and Eclipse Luna, when I open Preferences - Team - Git - Configuration, and select the System Settings tab, there is a Browse button which lets me select my Git install folder. Selecting this folder causes the page to be automatically updated with the Git system-wide settings.

In Eclipse Mars, there is no Browse button, and the other buttons are disabled, so I can't load the Git system-wide settings. It seems like a bug. Has anyone else had this problem?

The Mars version of the Eclipse Help, like the prior versions, still indicates that there should be a Browse button:
If you use Git for Windows as a companion to EGit, make sure EGit knows where Git is installed so it can find the "system wide settings", e.g. how core.autocrlf is set. Go to the settings and look under Team>Git>Configuration and then the System Settings tab.

If you selected one of the options to use Git from the Command Line Prompt when you installed Git for Windows, then the location of the system wide settings is filled in with a path and everything is fine. If not, use the Browse button to locate where Git is installed, e.g. C:\Program Files(x86)\Git.


My user settings are picked up okay from my %HOMEDRIVE%\%HOMEPATH% folder. I've tried defining a HOME environment variable, but that made no difference. The Browse button was still missing.

I tried adding my Git folder to my PATH, and that made no difference either. But now I don't remember if I had added the install folder or the bin folder to my PATH... I suppose I can do that test again.

Update: A workaround for the problem is to put your Git bin folder in your PATH environment variable. See comment below.
According to the Tomcat Class Loader How-To page, Tomcat has 4 class loaders.

The Bootstrap class loader loads Java stuff.
The System class loader, when using the Tomcat startup scripts, loads a few jars from the Tomcat bin folders.
The Common class loader loads jars from the Tomcat lib folders.
The WebappX class loader loads jars from the application's WEB-INF/classes and lib folders.

My application's open-source jars are all maintained in a few special folders. For testing the application, I want Tomcat to load the jars from those folders, to avoid having to copy all the jars into the WEB-INF/lib folder. (I don't want to build and deploy a WAR file just for testing).

So, I'm using a "setenv.bat" file in the CATALINA_BASE/bin folder, with a SET CLASSPATH statement to load the jars from the open-source folders.

I start Tomcat with the startup.bat file (on Windows). It works. But only when I also include Tomcat\bin\tomcat-juli.jar and Tomcat\lib\servlet-api.jar in the SET CLASSPATH statement. Otherwise Tomcat gets startup errors.

I understand why tomcat-juli.jar needs to be included even though the System class loader is supposed to load it. My open-source jars include a different version of the juli jar, which is not the one Tomcat needs. When the open-source juli jar is in the WEB-INF\lib folder, the Tomcat\bin version takes precedence. However, when it is in the SET CLASSPATH statement in setenv.bat, it gets loaded first unless you list the other jar first.

The mystery (to me), is why do I need to include servlet-api.jar in the SET CLASSPATH statement? My open source folders (as far as I can tell) don't have any other version of that jar. When I don't include the jar in the statement, I get a ClassNotFound error on javax.servlet.ServletContainerInitializer.

According to the Tomcat documentation, servlet-api.jar is supposed to be loaded by the Common class loader. So why doesn't that happen?

Is the Common class loader not used, when starting Tomcat via the startup scripts?

Process Explorer seems to show that the Tomcat\lib\ jars are all loaded - they are listed in the Java process' "Files" section.
I have a laptop set up with a docking station and dual monitors. One monitor is connected to the docking station's VGA port, and the other to the DVI port. The monitors are configured to both duplicate the laptop's desktop. I generally only use one monitor at a time and leave the other one turned off. One is on a desk for use while sitting down, the other is on a shelf higher for use from a standing position.

One morning, after placing the laptop on the docking station and waking it from sleep, the main monitor on the desk would not display the desktop like usual. After showing some of the wake-up/startup screens, the monitor simply went dark as if it wasn't getting any signal. When I opened the laptop to press the function key for switching between the dual monitor modes, the laptop locked up (for a still unknown reason) and even the laptop screen went dark. This happened several times in succession after force-rebooting the laptop.

I eventually found that while the bottom monitor wouldn't turn on to begin with, that the top one would. Whenever this happens again (which it did again today), I simply need to bring up the "Screen Resolution" window on the top monitor, and set it back to the "Duplicate" display mode. Somehow the settings are getting changed to only display the desktop on the top monitor, and I just need to change them back. Opening the laptop is not necessary for this.

Update: After posting the above, there were a couple of times after waking the laptop from sleep when neither monitor nor the laptop screen would display anything, and so I still had to force a reboot.

I discovered some hot-keys, which I'll try if the problem happens again.
Windows key + P: brings up the window for switching between the computer and projector displays. Keep holding down the Windows key while pressing P one or more times to cycle through the options. Then release both keys to switch to that option.

Ctrl + Alt + F1 or F3 or F4 (etc): switches the display to the laptop, VGA monitor, or digital monitor. The specific hot-key combinations can be found by right-clicking the desktop, selecting "Graphics Properties...", and then selecting the item for "Options and Support".
My browser kept showing this message when I tried to access JPG image files in one of my website's folders:
"The requested URL was rejected. If you think this is an error, please contact the webmaster. Your support ID is: ..."

The same error occurred on multiple browsers, and rebooting my router did not help. Images in the other website folders displayed without a problem.

The folder path had "/etc/" in the name. After renaming the "etc" folder to a different name, I was then able to access the images in my browser. Apparently some security script on the server was blocking requests to any URLs containing /etc/.
Vonage's monthly prices seem to have gone up a lot over the last few years. But there are still many other cheaper options.

VoIP Reviews & Prices - a chart comparing 13 different VoIP services.
Check your privacy settings - how to check/update your privacy settings on various popular sites
Microsoft Sysinternals - has many useful tools for monitoring and troubleshooting Windows applications.
YouTube seems to open most videos in playlist mode nowadays, which causes the next video in the list to automatically start playing after the current one finishes. On each video, you can unselect the autoplay icon in order to turn it off. But that only disables it for the current video.

To disable playlists for all videos, you can install the Firefox "Redirector" add-on, which lets you enter rules for redirecting from one URL to another URL.

Enter a new redirect with these values:
Include Pattern:https://www.youtube.com/watch?v=*&list=*
Exclude pattern:
Redirect to: https://www.youtube.com/watch?v=$1
Pattern Type: wildcard
Enabled: checked
Here's a Windows trick I recently learned:

In Windows Explorer, if you click Shift+Right/Alt-Click on a file, the context menu that is shown will include the option "Copy as path". Selecting this will copy the full path + filename, surrounded by double-quotes, to to the clipboard.

That's much easier than what I've been doing up till now: selecting the path, copying it, pasting it, appending a slash, right-clicking the file and clicking Rename in order to select and copy it, and then pasting it after the path.
JarFish is a useful tool for dealing with Java classpath issues.

It lets you search all the jar files under a specific folder to find a given class.
Example: java -jar jarfish-1.0-rc7.jar find ClassBeingSearchedFor C:\projectFolder\lib

The package name prefixes (such as com.abc.) do not need to be included in the class name that you list in the command, but the class name is case sensitive.

It also lets you search all the jar files under a specific folder to find any classes which exist in more than one jar file.
Example: java -jar jarfish-1.0-rc7.jar dupes C:\projectFolder\lib
In this post, I gave instructions on how to sharpen blurry PDF files using IrfanView.

I noticed recently however, that sharpening a PDF file in this manner may result in a loss of resolution in the sharpened file. When one views the sharpened PDF file at a high zoom level, much more pixelation may be visible than in the original file at the same zoom level.

After some research, I've figured out how to avoid such loss of resolution.

IrfanView's settings are stored in an "i_view32.ini" file. The file may exist in one or more of the following locations:
- the IrfanView program install folder
- C:\Users\[user-name]\AppData\Roaming\IrfanView
- C:\Users\[user-name]\AppData\Local\VirtualStore\Program Files (x86)\IrfanView

On my Windows 7 computer, different versions of the file are in each of these 3 folders, but based on the file timestamps, the one in the last folder is the one which actually gets updated and used.

Two sections of the ini file are related to viewing and saving PDF files.

One section is labelled "[Ghostscript]". This has the Ghostscript PlugIn settings which are used for reading the PDF image data into memory and rendering it. The values can be updated from within IrfanView by selecting Options - Properties/Settings... - Plugins - Postscript Options. My original Ghostscript PlugIn DPI settings were 96x96, which explains why I was losing resolution when re-saving PDF files. The DPI settings here should be set at least as high as the resolution of the original file. If you scan files at 300 dpi, then use 300x300. If you scan at 600 dpi, then use 600x600.

Note that when using higher DPI values, the conversion process will take longer, and the intermediate TIF file will be much larger in size. Adequate disk space is required.

The other relevant section is labelled "[ImPDF]". This corresponds to the "PDF Settings" window that is shown when saving a file in IrfanView to PDF format. To avoid large PDF file sizes, "Activate Compression" should be selected on the "Compression" tab. For both 300 and 600 dpi, I've found that the "JPEG (high quality)" setting gives very good quality with relatively small file sizes.

Using a batch file

If using the batch file method of sharpening a PDF file as mentioned in the prior post, the ini file that you use should contain both the [Ghostscript] and [ImPDF] sections. I've found it easiest to update the DPI and Compression settings as mentioned above (as well as the Advanced Batch Conversion settings as mentioned in the prior post) from within IrfanView, and then to copy the ini file from the above-mentioned location to my chosen folder.

It is best to update your batch file to use the copied ini file on both steps. That way, your batch file will always give the same results regardless if you later change the settings within IrfanView while working with other files.

   "C:\Program Files (x86)\IrfanView\i_view32.exe" %1 /advancedbatch /ini="C:\bat\irfanviewSharpen" /convert=%~p1\%~n1_x.tif

   "C:\Program Files (x86)\IrfanView\i_view32.exe" %~p1\%~n1_x.tif /ini="C:\bat\irfanviewSharpen" /convert=%~p1\%~n1_x.pdf

   @del %~p1\%~n1_x.tif

The above commands keep the original PDF file unchanged, and create another PDF file with "_x" on the end of the name. You can compare both files to verify that no loss of resolution has occurred, and that the amount of sharpening is satisfactory. If not, try updating each of the settings that were mentioned until you get the desired results.
I have several of my email accounts configured in Thunderbird, including a Yahoo mail account.

Yahoo automatically moves spam messages into a "Bulk Mail" folder. I like to skim the items in that folder once in a while before deleting them, to make sure they are truly spam. What I don't like is that by default, Thunderbird highlights the Bulk Mail folder in bold and plays the new mail notification sound every time it gets a new message. I found a solution on this page - the next to last post by user "geoyo1". It is as follows.

Create a new message filter.
In the "Match all of the following" drop-down, select "Customize..."
For "New Message Header", enter "X-YahooFilteredBulk". This item will then be added to the drop-down. Select it.
Set the rest of the filter to "contains" a value of "."
For the action, select "Mark As Read".

Menu - Tools - Options...
Select Advanced - Config Editor...
Right-click and select "New / String", to enter a new property with name "mail.server.default.applyIncomingFilters" and value "true".

This way, Thunderbird will automatically mark all the messages in the Bulk Mail folder as read, and it won't highlight the folder nor play the new mail notification sound when new messages arrive in that folder.
Firefox has a setting: "Options - Content - Colors... - Allow pages to choose their own colors, instead of my selections above". This item is selected by default.

If you unselect this item, this will cause problems with Yahoo's webmail interface:

- The Gear icon will no longer display on the top right corner of the page.
- The Emoticons pop-up window will be blank
- The Paperclip icon or the "Attach from my computer" menu item may not work - the File Upload window never displays. (This happened on one computer but not another, so I'm not completely sure of its cause.)

Internet Explorer has similar display problems, when in Internet Options under "General - Accessibility", you select "Ignore colors specified on webpages". If you happen to select "Ignore font styles specified on webpages", that even causes many of the Yahoo Mail action icons to disappear.

Profile

djinncoyote

October 2016

S M T W T F S
      1
2345678
9101112 131415
16171819202122
23242526272829
3031     

Syndicate

RSS Atom

Most Popular Tags

Active Entries

Style Credit

Expand Cut Tags

No cut tags