Wednesday, May 13, 2015

Ancient Window HLP File

I was digging around the primordial soup section of my archives and came across a program that uses the old Windows .hlp format. Thankfully Microsoft allowed me to download a reader.

Funny. I can remember building those .hlp files in RTF. *sigh* I'm so old.

Monday, April 20, 2015

Eclipse: Failed to Load the JNI Shared Library JVM.DLL

Tried to bring up Eclipse tonight and got the error "Failed to Load the JNI Shared Library C:\Windows\jre\bin\client\jvm.dll". Very strange since nothing updated in my Java client--to my knowledge.

Found the solution on StackOverflow. There was no VM path specified in Eclipse's ini file. I'm guessing somehow the default Java client got changed from the 64bit version Eclipse wants. Adding this VM path entry allowed Eclipse to launch once again:
-vm
C:\Program Files\Java\jre7\bin\javaw.exe

Sunday, January 20, 2013

Blogger Equivalent of LJ-CUT

Was going to post some writing on Blogger and didn't want a mile-long entry to impact casual browsers. LiveJournal has the LJ-CUT command which I've used for years. Wasn't sure what Blogger supported so poked around some.

The first solution I found was for Classic template users. Unfortunately it modifies the CSS and imapcts every entry. No thanks. The notes did mention a page summaries. This method had an actual tag to use and seemed pretty comfortable. Yet the header of this article pointed out that the feature already exists: Jump Breaks.

Being the typical developer I ignored formatting toolbar. Right next to the insert image and insert video buttons is the button I need.

*sigh*

Tuesday, November 16, 2010

Emergency DNS

Found a site that provides free DNS service. Their blog hasn't been updated in four years though…

Tuesday, December 2, 2008

C#: DateTime.ToString()

Looking for simple, direct examples of what the various DateTime conversion functions do which MSDN was completely incapable of providing. Found a great tutorial article that summarized them nicely:
result = theDate.ToString("y");       // result = "January 2007"
SpecifierDescriptionExample
dShort date format. This is equivalent to using ToShortDateString."03/01/2007"
DLong date format. This is equivalent to using ToLongDateString."03 January 2007"
fDate and time using long date and short time format."03 January 2007 21:25"
FDate and time using long date and time format."03 January 2007 21:25:30"
gDate and time using short date and time format."03/01/2007 21:25"
GDate and time using short date and long time format."03/01/2007 21:25:30"
mDay and month only."03 January"
rDate and time in standard Greenwich Mean Time (GMT) format."Wed, 03 Jan 2007 21:25:30 GMT"
sSortable date and time format. The date elements start at the highest magnitude (year) and reduce along the string to the smallest magnitude (seconds)."2007-01-03T21:25:30"
tShort time format. This is equivalent to using ToShortTimeString."21:25"
TLong time format. This is equivalent to using ToLongTimeString."21:25:30"
uShort format, sortable co-ordinated universal time."2007-01-03 21:25:30Z"
ULong format date and time."03 January 2007 17:25:30"
yMonth and year only."January 2007"

Tuesday, February 12, 2008

MSACCESS: Searching for Wildcards

Still end up using Microsoft Access alot when manipulating data. Since it uses the old Microsoft wildcard characters, I often forget how to search for the wildcards themselves. Found a good article that summarizes how to do just that:

Search stringMatch list settingResults
[*]Any Part of FieldReturns all records that contain an asterisk (*). This syntax also works for question marks (?), number signs (#), opening brackets ([), and hyphens (-).
 Whole FieldReturns records that consist only of an asterisk.
 Start of FieldReturns records that start with an asterisk.
*[*]*Any Part of FieldReturns all records that contain an asterisk (*) and any surrounding text. This syntax also works for question marks (?), number signs (#), opening brackets ([), and hyphens (-).
 Whole FieldSame result.
 Start of FieldSame result.
[!*]Any Part of FieldReturns all records that do not contain an asterisk. Keep in mind that this search pattern can return every letter of every word in a record when you use this setting in the Match list. This syntax also works for question marks (?), number signs (#), opening brackets ([), and hyphens (-).

Note  The search string *[!*]* will return records that contain asterisks because it finds all the text that surrounds the asterisk.

 Whole FieldReturns no results at all.
 Start of FieldReturns the first letter of any record that does not contain an asterisk.
ma*[ch]Any Part of FieldReturns all records that contain "ma" and either "c" or "h". For example, this string returns "march" and "match", and it also returns "math" and "manic".
 Whole FieldReturns all records that start with "ma" and end with either "c" or "h". For example, this string returns "march" and "match", and it also returns "math" and "manic".
 Start of FieldReturns all records that start with "ma" and contain "c" or "h".
ma*[!ch]Any Part of FieldHighlights the letters "m" and "a" and all text that follows those letters until it encounters a "c" or an "h". The following figures illustrate this.

| March |

| Match |

In other words, even though you're trying to exclude records that contain "c" and "h", you may see those records because Any Part of Field matches the text that precedes the brackets.

 Whole FieldReturns all records that do not contain a "c" or an "h" if those records end in "c" or "h". For example, the find operation does not return "manic" because the word ends with a "c", but it does return "maniacal" because characters follow the "c".
 Start of FieldReturns those records that start with "ma". Again, Access matches any text that precedes the characters enclosed in brackets, so you may see unwanted results.

Tuesday, July 10, 2007

C#: Drag'n'Drop

Been wanting to do an organizer for all the images I steal off the web. One of the first things I need to know how to do is to support drag'n'drop from the browser. Instead of going to a directory, I want the file to go to my vault.

Started out with a "C# drag drop" Google. First thing that came up was a six-year-old article from C-Sharp Corner. Was a simple file brower example that was pretty hard to follow. It was dated information anyway.

There was a very succint Microsoft knowledge base article that was more helpful. The example is doing something akin to what I'm looking to do: receiving a file or files dragged from elsewhere onto a listbox. It was pretty easy to put together and worked on first compile. Dropping an image from IE or Firefox over the list box would show the full path to the image's temporary file.

I wondered what else would be available so I went to the definition of DataFormats—there were twenty-one! They reminded me of clip board data types. Went to the MSDN summary and it covers how to create your own format for use on the clipboard.

Next I was wondering if I could access those other types. From the way I see Paste Special work in Microsoft applications, I suspected that the clipboard could make data available in multiple formats (unless they parse a rich source in your selected way). I was hoping the HTML format might include the URL source of the image I was dragging.

So I added another list box I called lstFormat and added the following code to the DragDrop event:
lstFormat.Items.Clear();
String[] formats = (string[])e.Data.GetFormats(false);
foreach (String format in formats)
{
lstFormat.Items.Add(format);
}
GetFormats has an overload that I specified false initially. By setting it to true, I got a larger list of all formats the source could be converted to. Very handy.

Now I need to spend some time figuring out how to work with these other formats.