Thursday, February 17, 2005

Regular Expression Library

Regular Expression Library: "Welcome to RegExLib.com, the Internet's first Regular Expression Library. Currently we have indexed 898 expressions from contributors around the world."

An execellent website, thanks to Stuart Dunkeld via ProFox for pointing it out.

Wednesday, February 16, 2005

VFP 9 & opportunistic locking

A reader sent in the following:

“We recently discovered that our VFP8 app was encountering corrupt databases (error 2091) regularly and have determined the cause to be opportunistic locking on the server and workstations. We have been unable to find any reference to opportunistic locks or their impact on VFP RDBMS in any of the VFP documentation from vfp5 through 8.”

The resolution is related to how the OS is disk caching.

Windows XP SP2 / Win2k*:

Cut and paste the following into a file called woplocks.reg and run it on the workstations:



REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkStation\Parameters]
"EnableOplockForceClose"=dword:00000001
"EnableOplocks"=dword:00000000
"UseOpportunisticLocking"=dword:00000000


Cut and paste the following into a file called soplocks.reg and run it on the server

REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters]
"EnableOplockForceClose"=dword:00000001
"EnableOplocks"=dword:00000000


Novel settings are:

Opportunistic Locking set off
Cache Rights set off
Delay Rights set off
Packet Burst set off
True Commits set ON

Wednesday, February 09, 2005

Malicious Software Removal Tool

New tool from Microsoft, deals with malicous programs.

This tool scans for and cleans malicious software associated with the following security threats:
• Berbew
• Blaster
• DoomJuice
• Gaobot
• Korgo
• Mydoom
• Nachi
• Netsky
• Randex
• Sasser
• Zafi
• Zindos

Tuesday, January 25, 2005

EMS Professional Software and Specialty Services

Looking for a copy of old software manuals, or the install disks themselves? Check out EMS Old Software Exchange from here.

Also links to shareware, IQ testing, survival publishiing and build-it-yourself reading primer templates.

A golden find, thanks to Dave Bernard via the ProFox list.

Friday, January 21, 2005

Sleep Fox

Put VFP in a minimum resource wait state, but still pay attention to the internal event loop:


PROCEDURE DoSleep
LPARAMETERS tnSeconds
LOCAL lnSeconds
DECLARE Sleep IN WIN32API integer

lnSeconds = SECONDS()
DO WHILE SECONDS() - m.lnSeconds <> m.tnSeconds
    SLEEP(m.tnSeconds*100)
    DOEVENTS
ENDDO
CLEAR DLL SLEEP


Thanks to late night buddy
Garrett who has a recent post on using SourceGear Vault with VFP Project Manager. The single user version is free (as in beer).

Thursday, January 20, 2005

Named References in VFP-SQL

VFP allows us to use named references for fieldnames, tablenames, filenames, etc with its various commands. But, not always with the SQL sub-language...

This works:

REPLACE ALL (crsUpdates.FieldName) ;
    WITH (crsUpdates.NewValue);
    FOR PrimaryKey = (crsUpdates.PK)

but not this:

UPDATE table1;
    SET (crsUpdates.FieldName) = (crsUpdates.NewValue) ;
    WHERE table1.PrimaryKey = (crsUpdates.PK)

or any of these...

UPDATE table1 ;
    SET &crsUpdates..FieldName = (crsUpdates.NewValue) ;
    WHERE table1.PrimaryKey = (crsUpdates.pk)

UPDATE table1 ;
    SET EVALUATE(crsUpdates.FieldName) = (crsUpdates.NewValue) ;
    WHERE table1.PrimaryKey = (crsUpdates.pk)

However, if you hard-code the SET field, it works:

UPDATE table1 ;
    SET MyField = (crsUpdates.NewValue) ;
    WHERE table1.PrimaryKey = (crsUpdates.pk)

I'm sure it's been this way forever -- I've just don't recall running across it before.

Thursday, January 13, 2005

Joel on Software at Crossroads, Tues Jan 18th

Joel on Software Dinner: Bellevue WA Jan 18th

"I'm planning to come to Seattle in January to speak at an Amazon.com developer's conference. While I'm there, I thought it would be fun to meet some readers over dinner, so if you're going to be in the area, I hope you will be able to come!

I suggest we meet at the food court at the Crossroads Mall, at 7:30 PM Tuesday, January 18th, 2005."

Monday, January 10, 2005

Automating Telnet with Expect

As long as Telnet has been around, I was suprised to find that there is no native way to automate it.

I need a process on a Wintel box to access a TSX system remotely and kick off a process. Manually I can Telnet to the box, provide user/pass and then start the process. But when trying to automate the process I find there is no native way to respond to a password prompt from Telnet.

Enter "Expect". Written for *nix in TCL there is a port that runs on Wintel. The documentation is a bit sketchy, but I got it to work.

You can call Expect with -f and provide an input file. The input file for the whole process looks like this:


spawn telnet 1.0.2.24
expect "Logon please:"
send "myusername\r"
expect "Password:"
send "mypassword\r"
expect "32sys>"
set timeout 1000
send "c:\\bin\\myscript\r"
expect "32sys"


The \r is the return control, notice double back-slash for the directory name. The package comes with TCL source and its own version of telnet. The expect "32sys" lines have expect looking for the command line prompt.

Whatever you are calling on the remote side should have limited output, when working with TSX I get a minimum of 2 lines of control characters that look like garbage. Originally the remote process was reporting progress on exporting data... this made for too much information for Expect to ... well, expect.

Wednesday, January 05, 2005

Execscript kicks the Lama's ass

Andrew Ross-MacNeil turned me on to some interesting ideas with EXECSCRIPT at Devcon this year. I've always had a little program to set hot keys to clear my environment , build a project, ala Tom Rettig's CA.prg.

Writing conditional code from execution in a hotkey was always a bit limiting, but with EXECSCRIPT this is no longer true!



ON KEY LABEL f5 EXECSCRIPT ;
( ;
[ CLOSE ALL ] + CHR(10) + ;
[ CLEAR ALL ] + CHR(10) + ;
[ CLEAR ] + CHR(10) + ;
[ SET SYSMENU TO DEFAULT ] + CHR(10) + ;
[ BUILD APP myapp FROM myapp RECOMPILE ] + CHR(10) + ;
[ IF FILE("myapp.err") ] + CHR(10) + ;
[ MODIFY FILE myapp.err NOWAIT ] + CHR(10) + ;
[ ELSE ] + CHR(10) + ;
[ DO myapp ] + CHR(10) + ;
[ ENDIF ] ;
)

Tuesday, January 04, 2005

Visual FoxPro 9 Goes Gold / BetaNews babbles on incoherently...

A weak article with bad information about VFP9 release here.

Some mention of the extended report writer and …
“…FoxPro 9.0… embeds SQL in the FoxPro language, and is more extensible, allowing developers to introduce code that benefits their end user applications.”

How about the *native* SQL syntax has been extended to include virtually unlimited tables, joins, sub-queries and unions; projections, derived tables and enhanced correlation support?

How about new data types, new index types, enhanced data adaptors for cursors and xml?

How about more granular control on how tables are opened, records are refreshed, transactions are implemented?

How about Rushmore enhancements (especially the late breaking improvements to query optimization)?

How about language additions like CAST() and ICASE()?


If you’re gonna try to write an article based on a press release, at least get it fact checked.


Of course, the comments add salt to the wounds…1 Comment on the article entitled "Fox is Dead", then 4 comments on that comment defending the product.

Thursday, December 23, 2004

VFP: Change DSN Database on the fly

So I had to do some import work, using both SPT and Remote Views (which means a connection pointed to a DSN). Needed away to easily switch between databases.

It goes a little something like this...


*-- Flavor SERVER, UID and PWD to taste.
*-- Change server name in SetDataBase proc as well
#DEFINE C_CONNECT_SQL "DRIVER=SQL Server;SERVER=MyServer;UID=me;PWD=*;DATABASE="
#DEFINE HKEY_LOCAL_MACHINE -2147483646 && BITSET(0,31)+2
LOCAL lnConn && connection handle for SPT

SetDataBase("LIVE", @lnConn)

* do some stuff to LIVE data

SetDataBase("STAGE", @lnConn)

* do some stuff to STAGE data

*********************************************************
PROCEDURE SetDataBase(tcDatabase, tnConnection)
* Set connection handle to current database
tnConnection=SQLSTRINGCONNECT(C_CONNECT_SQL + m.tcDatabase )
* change DSN to current database
lcRegFile = HOME()+"samples\classes\registry.prg"
SET PROCEDURE TO (m.lcRegFile)
oReg = CREATEOBJECT("Registry")
oReg.SetRegKey("DataBase",m.tcDatabase ,;
"SOFTWARE\ODBC\ODBC.INI\MyServer",;
HKEY_LOCAL_MACHINE)
SET PROCEDURE TO
RETURN m.tnConnection
ENDPROC


sorry about the wrapping... this template isn't very code friendly...

Wednesday, December 22, 2004

100 programmers are lined up in a row by an assassin...

answers to technical interview questions

I was asked this question several months ago when I interviewed for a full-time gig at Microsoft. There were only 10 in the room, and I figured out how to save 6... but the best solution is much simpler than I imagined...

Thanks to John Donaghy for the link!

Monday, December 20, 2004

A Taste of XQuery for the DBA

A Taste of XQuery for the DBA

Eric McMullen has a good article on XPath in SQL 2005. XPath is the way to query XML data sets -- it's been well integrated into the next version of SQL Server.

VFP9 ships!

December 2004 - Letter from the Editor

WoHoo!

Mad props to the team, you guys did an amazing job!

Really large datasets in VFP

FoxPro Advisor :: The Ultimate Power & Speed of VFP


This article has been around for awhile, but it just surfaced in conversation recently. VFP is being used for the "Euro Tunnel". The data requirements for this application include 128 GB of data. Yes, VFP has a 2GB per table limit (not going to change), but this article points out how you can work around this limitation.

Monday, December 13, 2004

New Google trick

Well, new to me. Google Suggests type in a few characters and wait... (or hit the down arrow if you must...)

Friday, December 10, 2004

RF exposure FCC

I need a new cell phone, considering Bluetooth so I can have a wireless headset. Came across this:

"Tests for SAR are conducted using standard operating positions specified by the FCC with the phone transmitting at its highest certified power level in all tested frequency bands. Although the SAR is determined at the highest certified power level, the actual SAR level of the phone while operation can be well below the maximum value. This is because the phone is designed to operate at multiple power levels so as to use only the power required to each the network. In general, the closer you are to a wireless base station antenna, the lower the power output. Before a phone model is available for sale to the public, it must be tested and certified to the FCC that it does not exceed the limit established by the government-adopted requirement for safe exposure. The tests are performed in positions and locations (e.g., at the ear and worn on the body) as required by the FCC for each model. (Body-worn measurements may differ among phone models, depending upon available accessories and FCC requirements). While there may be differences between the SAR levels of various phones and at various positions, they all meet the government requirement for safe exposure.

For body worn operation, to maintain compliance with FCC RF exposure guidelines, use only accessories that contain no metallic components and provide a separation distance of 15mm (0.6 inches) to the body. Use of other accessories may violate FCC RF exposure guidelines and should be avoided."

Boot Camp - Mashing for Beginners

Great tutorial on "Mashing" -- puting two songs on top of each other. Includes Mackie's currently "Free" editor.

Tuesday, December 07, 2004

IBM Sells PC Business for $1.75 Billion

Well, maybe this means the Transnote could make a comeback.

Wednesday, November 24, 2004

Windows Installer Appears Every Time I Start an Application


I've run into this more than once, here is a an "unsupported" work around. Annoyances.org is a repository of such things...

Thanks to Tristan of ProFox.

Tuesday, November 23, 2004

Construx: Construx Estimate

"Construx Estimate contributes to project success by helping improve your software estimation capabilities. Estimate leverages a blend of proven estimation models to predict effort, budget, and schedule for your project based on size estimates. Estimate comes calibrated with industry data, but is most powerful when calibrated with your organization's data.
As part of our mission to advance the art and science of commercial software engineering, we provide Construx Estimate™ version 2.0 free of charge with a limited license."

Construx is the group that Steve McConnell (of Code Complete) runs. Great book, interesting tool. Thanks Boudewijn Lutgerink.

Monday, November 22, 2004

Firefox Extensions

Everybody knows how cool FireFox is... I've been addicted to tabbed browsing since Mozilla first introduced it. FireFox doesn't stop at just the browser... check out the extentions!

First -- if you love tabbed browsing, check out the Tabbrowswer Extentions. Great control over how tabs load and save. You can have all tabs come back up after a crash or even shutdown...

BlogThis! is like the Blogger link you get in the Google Toolbar...

FlashGot lets you pull down multiple files from a webpage in one move...

FoxyTunes lets you control Media Player, WinAmp, REAL, etc from a small controller in the browser status bar...

Oh... and a native behavior for FireFox... if you are on a site that supports RSS feeds, you should see a small orange icon in the bottom right hand corner of the screen. Click on it, and you'll create a bookmark that pulls the RSS feeds. Save the bookmark under the BookMarks ToolBar Folder and when you click on the link, you'll see the last several feeds from the site... too cool!

-dta
Toad® for SQL Server

"Toad® for SQL Server is a freeware tool that improves the productivity of developers and administrators by providing an easy-to-use development environment for T-SQL code."

Been around for awhile, this is a great tool -- a must for SQL Server DBA's and developers. Stored procedure version control, lots of automation...

Fully functional 60 day eval version available under Software Downloads.

Thursday, November 18, 2004

Who wants to be the Next Top Model?

Business Model Generator

"This is a free service provided by a research group of volunteers from the Sprott School of Business and Faculty of Engineering and Design at Carleton University in Ottawa, Canada.

We believe that sound business models are an essential, even fundamental, building block for new and established enterprises. For startups, a good business model can mean that the harder you work, the more money your enterprise will make, an obviously important consideration for new entrepreneurs. For existing businesses, even mega corporations, they need to continually update and revisit their business models to ensure that they are changing and responding to evolving conditions in their marketplaces."
Visual FoxPro 9.0: Still Here, Still Relevant

An OpEd piece I did for DevX.com.

I tried to provide managers a reason to give respect where it's due, and VFP die hards a reality check.

I was late getting it in, so I didn't get a chance to see the final before it went up, so there are a few errata.

If they don't get fixed, I'll post a follow-up here.

-dta

Tuesday, November 16, 2004

FlashPost

So the last month or so has looked like completing the contract testing gig with the Visual FoxPro team at Microsoft, restarting Alden Anderson (note to self: get a designer), speaking at DevCon, writing these articles and working at DevConnections and trying to restart this cranky Seattle Visual FoxPro Special Interest Group... which really, really needs a better name. ;)

Sorry I've been light on the posts, emails and phone-calls.

Thursday, October 28, 2004

CSharpFriends.com - C# Class Generator, ASP.NET Tools:

This is tool will automagically generate a complete c# class for you using 'raw' field inputs ( i.e input 'UserName', not 'strUserName' as my tool will prefix the type shortcut for you).

Friday, October 22, 2004

Pop!Tech - The Impact of Technology on People

"Pop!Tech is a one-of-a-kind intellectual and creative conference that explores the social impact of technology and the shape of things to come."

Wednesday, October 20, 2004

William Gibson blogs!

Of course he does... the father of "Cyberpunk" and all... but now it's marked!

Thanks GF!

Wednesday, October 13, 2004

NHibernate - a .NET based object persistence library for relational databases

NHibernate is a port of the excellent Java Hibernate relational persistence tool.

Hibernate is a powerful, ultra-high performance object/relational persistence and query service for Java. Hibernate lets you develop persistent classes following common Java idiom - including association, inheritance, polymorphism, composition and the Java collections framework. The Hibernate Query Language, designed as a "minimal" object-oriented extension to SQL, provides an elegant bridge between the object and relational worlds. Hibernate also allows you to express queries using native SQL or Java-based Criteria and Example queries.

Thursday, September 23, 2004

CoDe Magazine - What's New with Data in Visual FoxPro 9?

I little ditty I wrote late one night...

... well maybe it was more than one...
RE_INVIGORATE

The Data Archiving Service (DAS) is a piece of software that monitors and analyzes the traffic on websites. Each participant helps by contributing their websites data which is pooled together and displayed on this page (avaliable under 'DAS Community Stats') to help shed a greater understanding of current web surfing idiotisms. In return participants get realtime stats for their site! All reports are generated in real-time.

Wednesday, September 22, 2004

Tuesday, September 14, 2004

HELP?!

We find ourselves in need of a new place to live -- and quick!

Looking for a 2+ bed 1+ bath, pets allowed (2 female bassets, indoor raised), fenced backyard in the Seattle area. Need to be moved in by September 27th (yup, less than 2 weeks!).

Prefer older home, hardwood floors. $1200

If you have a lead please email house@sun-moon.net.

Thanks!

Friday, July 30, 2004

Sorting Algorithms Demo:

"We all know that Quicksort is one of the fastest algorithms for sorting. It's not often, however, that we get a chance to see exactly how fast Quicksort really is. The following applets chart the progress of several common sorting algorithms while sorting an array of data using in-place algorithms. This means that the algorithms do not allocate additional storage to hold temporary results: they sort the data in place. (This is inspired by the algorithm animation work at Brown University and the video Sorting out Sorting By Ronald Baecker from the University of Toronto (circa 1970!).) "

Thanks Garrett
YukonXML.com Home Page - The SQL Server 2005 Community Web site
Sample Code: Using Dropdownlist in Editable DataGrid ASP.Net sample code.

This was the kind of example I used when I did VFP training. It exposes containership and related databinding issues.
IBM Rational: Rival Microsoft Faces Uphill Battle:

"At the recent Rational Software Development User Conference, IBM Fellow and IBM Rational Chief Scientist Grady Booch delivered a keynote on his predictions of the software development landscape circa 2032, the 50th anniversary of Rational. Following his keynote, Booch sat down with eWEEK Senior Writer Darryl K. Taft to discuss Rational's development strategy going forward and the new competition from Microsoft Corp., which will enter the application lifecycle development tools market next year with Visual Studio Team System. Booch, a co-creator of UML (Unified Modeling Language), also discussed why the language is so relevant to the tools space. "
The .NET Developer's Guide to Windows Security

"A group of about forty people from the community kindly donated their time to help me port the copyedited version of the book from Word documents into this Wiki. Each person who helped added a PortedBy attribute to acknowledge their work. Thank you very much for the help - we ported a 400 page book into Wiki form in under a week, friends!"

Monday, July 26, 2004

Teemings - Extras - The Horror of Blimps Very, very funny. Thanks Garrett.

Sadly, it appears that ZanyBrainy went out of business as part of the FAO Shwartz Reorg.

But there are some pretty cool toys here...
Visual Studio 2005: Visual Studio 2005 Product Line Overview The new express tools are pretty slick. This page outlines the difference between express and pro systems.

Wednesday, July 21, 2004

AVERATEC I love my tiBook, but this Tablet has the right price...
USB Floppy Disk Drive RAID Too cool...

Monday, July 19, 2004

Cω What happened to Xen / X#?

say "C Omega"
PC Repair when all else fails...
 
(Thanks Woody)
The Jargon File Hacker speak.

Thursday, July 15, 2004

Monday, July 12, 2004

ODBC DSN Less Connection Strings for most every kind of ODBC driver out there.

Thursday, July 08, 2004

Wednesday, July 07, 2004

XP SP2 Windows Firewall various bits on dealnig with XPSP2 firewall issues.

Tuesday, July 06, 2004

TestFu 0.2 database testing tools (SQL Server)in .NET

Thursday, July 01, 2004

www.converters.tk Interesting site... but I can't vouch for the validity of the apps.

Wednesday, June 30, 2004

Explorer Switches

as in :

%windir%\explorer.exe /e, "C:\Program Files\"

Wednesday, June 23, 2004

Monday, June 21, 2004

Media Wiki: Wikipedia and Disinfopedia are based on this Wiki engine.

Tuesday, June 08, 2004

Visual Studio 2005 Team System

...now include a comprehensive set of proven process frameworks, best practices, prescriptive architecture guidance, and integrated life-cycle tools...


West Wind SOAP Manager Free SOAP manager replacement for the depreciating MS SOAP Toolkit.

Wednesday, June 02, 2004

Dabo is the easy to use, cross-platform, 3-tier, open source desktop database development framework.

Ed and Paul announce their work on Dabo, a runtime framework for creating 3-tier desktop apps that will run on all versions of Windows, Linux, and Macintosh OSX. Written in Python, and abstracting the wxPython GUI toolkit, it is written with ease of use, power, and flexibility in mind. We've worked to create a development environment where the commonly-needed things are easy to implement, and the rarely-needed things are still doable.

Monday, May 31, 2004

Welcome to Astronomy for Kids! When looking for the answer to "What is the name of our solar system".

see also why the words Luna and Sol are sometimes used ... ;)
Saskatchewan Learning | School Age | Evergreen Curriculum | Resources | Curriculum By Subject ... great resource for home schoolers.

Wednesday, May 26, 2004

Tuesday, May 25, 2004

Looking for the latest information on a .DLL that ships with a Microsoft Product?
DLL Help Database

Friday, May 21, 2004

Insert a column into an array:

dimension myarray[2,3]
myarray[1,1]="R1C1"
myarray[1,2]="R1C2"
myarray[1,3]="R1C3"
myarray[2,1]="R2C1"
myarray[2,2]="R2C2"
myarray[2,3]="R2C3"


=addcol(@myarray)
CLEAR
DISPLAY MEMORY LIKE myarray


FUNCTION addcol
PARAMETERS aArray
LOCAL nRows,nCols
nRows=ALEN(aArray,1)
nCols=ALEN(aArray,2)
DIMENSION aArray[nRows*(nCols+1)]

FOR i=(nCols+1) TO nRows*(nCols+1) STEP (nCols+1)
AINS(aArray,i)
NEXT
DIMENSION aArray[nRows,nCols+1]
return
ENDFUNC

Thanks to Peter Cushing via ProFox@leafe.com

Tuesday, April 27, 2004

joemarini.com .::. Tutorials Bloghorn: A Blog Reader Built in XAML.
Architecture Journal (by yag)
Fabulous Adventures In Coding
crosspost
The Code Project - Free Source Code and Tutorials I first heard about Marc Clifton on his work with MyXaml, a declarative UI language that shares a name and some principles with the XAML declarative language in Longhorn, but that works on .NET now. Until today, I had missed his earlier work on this subject: The Application Automation Layer: Introduction And Design, along with the rest of his 51 articles on CodeProject.com (wow).

Monday, April 19, 2004

Thursday, April 01, 2004

Google Job Opportunities: Google Copernicus Center is hiring: "Google is interviewing candidates for engineering positions at our lunar hosting and research center, opening late in the spring of 2007. This unique opportunity is available only to highly-qualified individuals who are willing to relocate for an extended period of time, are in top physical condition and are capable of surviving with limited access to such modern conveniences as soy low-fat lattes, The Sopranos and a steady supply of oxygen."
dropload.com This site rocks, especially now that it's hard to send pretty much any kind of attachment via email.

Create a free account, enter email address and upload the file. The recipient gets an email with a link to the file on dropload.com servers. File stays there for a few days before it is automatically deleted.

Note at the bottom of their webpage: Bookmark This Site Now - Win Prizes! (note: there are no prizes)