Notepad++ syntax coloring

Lately, my external editor of choice has been Notepad++. It’s flexible, highly configurable, and supports user-defined syntax coloring. Of course, it doesn’t ship with a syntax coloring file for VFP, so I came up with my own. After a while, I got tired of typing in commands as I got to them, and wrote a program to generate the whole thing.

Read the rest of this entry »

Posted by Garrett on October 28th, 2008 in Code Sample, Original, VFP | 1 Comment

How do I copy thee?

Let me count the ways.

Posted by Garrett on September 15th, 2008 in Programming | No Comments

Visual F# Express?

Well, not exactly, but some Googling led me to these posts, which show how to put it together yourself using the Visual Studio Shell.

Which reminds me, Craig Boyd and Bo Durban are still working on VFPStudio. Wish I could get to SWFox for the presentation Craig is giving…

Posted by Garrett on August 15th, 2008 in Microsoft, Programming, VFP | No Comments

Random Perl snippet

This one messed me up until I figured out that splitting on comma instead of comma-space gave me a leading space in the strings, which then sorted weirdly.

H:\>perl -e “print join qq/, /, sort {$a <=> $b } split /, /, qq/2, 3, 5, 10, 19, 20, 58, 64, 65, 330, 452, 721, 797, 798, 799, 978, 1036, 1037, 1045, 1061, 1128, 1129, 1232, 1290, 1471, 858, 895, 1289, 1248, 64, 1479, 1464, 59, 65, 58, 1465, 1466, 1326, 1290, 1326, 1615, 1679/”

2, 3, 5, 10, 19, 20, 58, 58, 59, 64, 64, 65, 65, 330, 452, 721, 797, 798, 799, 858, 895, 978, 1036, 1037, 1045, 1061, 1128, 1129, 1232, 1248, 1289, 1290, 1290, 1326, 1326, 1464, 1465, 1466, 1471, 1479, 1615, 1679

Posted by Garrett on June 3rd, 2008 in perl | No Comments

Branching in Subversion

Brian Simser has a great step-by-step post explaining how to do branching in Subversion. Check it out!

Posted by Garrett on May 7th, 2008 in Source Control | No Comments

LINQ to Regex

Roy Osherove has created a LINQ custom provider to create regular expressions in a readable fashion.

            var query = from match in
               RegexQuery.Against("sdlfjsfl43r3490r98*(*Email@somewhere.com_dakj3j")
                        where match.Word.Repeat.AtLeast(1)
                            .Literal("@")
                            .Word.Repeat.AtLeast(1)
                            .Literal(".")
                            .Choice.Either(
                                 Pattern.With.Literal("com"),
                                 Pattern.With.Literal("net"))
                            .IsTrue()
                        select match;

Posted by Garrett on May 6th, 2008 in Programming | No Comments

Adventures in Oracle

*raises an eyebrow* You mean Oracle does hierarchical data natively? Neat.

SELECT groupid, parentid, groupname, LEVEL
		, CAST(SYS_CONNECT_BY_PATH(groupname, ':') as char(100)) testPath ;
	FROM ml.hiergrps ;
	START WITH groupname = 'Enterprise' ;
	CONNECT BY PRIOR groupid = parentid
Groupid Parentid Groupname Level Testpath
1.00 0.00 Enterprise 1.00 :Enterprise
2.00 1.00 MyLogic 2.00 :Enterprise:MyLogic
3.00 2.00 Assessment-Plan 3.00 :Enterprise:MyLogic:Assessment-Plan
4.00 2.00 History of Present Illness 3.00 :Enterprise:MyLogic:History of Present Illness
5.00 2.00 Visit Manager 3.00 :Enterprise:MyLogic:Visit Manager
6.00 5.00 TEST DATA 4.00 :Enterprise:MyLogic:Visit Manager:TEST DATA
7.00 1.00 TEST 2.00 :Enterprise:TEST

Posted by Garrett on May 2nd, 2008 in Programming | No Comments

Just density without intensity…

I couldn’t remember how to get VFP editboxes to accept tabs as input instead of instruction to move to the next control, so I was coding something elaborate in the KeyPress event to handle it.

After all, remembering the AllowTabs property would be just too easy…

Posted by Garrett on April 30th, 2008 in Programming, VFP | No Comments

Using Sedna’s “My” for settings management

Andrew MacNeill has a good article over here about using the new “My” class, that shipped with Sedna, to store application configuration information.

Posted by Garrett on April 28th, 2008 in VFP | No Comments

Creating an FLL

Seeing Craig Boyd’s FLLs inspired me to finally figure out how to do them myself. I learned C in school, so I have a passing familiarity with it, though I’m very rusty. I’ll assume that if you’re reading this, you’re about at the same level.

Read the rest of this entry »

Posted by Garrett on April 26th, 2008 in VFP | 5 Comments

« Previous Entries