Archive for the ‘Log’ Category

My Notes from LD23

Games I really liked:

Potential Tools:

Tools I usedl:

Advertisements

Read Full Post »

September 13, 2011

Bulk Insert Tip and Gotchas

A follow up tip to using the Bulk Insert trick with SQL Server.  You can edit the files using Excel and get around the broken comma escape problem by change the Windows setting for what a list delimiters is and using the pipe character, |, instead.  Source: Change Delimiter For Csv Export – Tip

Another gotcha I ran into is that the Bulk Insert doesn’t always use the id in the Identity columns and you can run into weird foegirn key problems.  You have to add the KEEPIDENTITY setting, for example:

BULK INSERT [dbo].[tablename]
FROM ‘C:tabeldatatablename.csv’
WITH
(
FIELDTERMINATOR =’|’,
ROWTERMINATOR = ‘n’,
FIRSTROW = 2,
KEEPIDENTITY
)

Role Base Custom Errors

Interesting way to use aspnetdb Roles to give developers detailed errors reports: Tip/Trick: Show Detailed ASP.NET Error Messages to Developers (and only to Developers)

Read Full Post »

September 6, 2011

Here’s an interesting way to populate a table with data from a script:

BULK INSERT [dbo].[tablename]
FROM ‘C:tabeldatatablename.csv’
WITH
(
FIELDTERMINATOR =’|’,
ROWTERMINATOR = ‘n’,
FIRSTROW = 2
)

One gotcha, is the server running the sql instance has to have access permissions to that directory and file. Otherwise, you will get some errors like:

Cannot bulk load file ‘C:tabeldatatablename.csv’ could not be opened. Operating system error code 3(The system cannot find the path specified.)

or

Cannot bulk load file ‘C:tabeldatatablename.csv’ could not be opened. Operating system error code 5(Access is denied)

Here’s the helpful post that clued me in: BULK insert error with UNC path and windows Authentication

Read Full Post »

August 28, 2011

Microsoft ACE

I’ve been working on accessing Microsoft Excel doucments via .Net’s System.Data.OleDb classes and ran into an interesting error: Provider=Microsoft.ACE.OLEDB.14.0 provider is not registered on the local machine.

It isn’t logical, but in the Ole Db connection string, you don’t use the version number 14.0 to access MS Office 2010 documents (even though that is the version number.)  You use 12.0. ex.

 Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:exec.xslx;Extended Properties=”Excel 12.0;HDR=YES;”

NOT

Provider=Microsoft.ACE.OLEDB.14.0;Data Source=C:exec.xslx;Extended Properties=”Excel 14.0;HDR=YES;”

Here’s the post that helped me figure that out: The Microsoft.ACE.OLEDB.14.0 provider is not registered on the local machine.

You get ACE, or the Access Database Engine here

Read Full Post »

June 24, 2011

Exploring other ways to create map visualizations

Here’s an intersting google map with zipcode and county boundaries added: Maps.Huge.Info Mapping Programs

Read Full Post »

June 21, 2011

Calculating Quantiles

Quantiles are buckets of data, a way of organizing data into a fixed number of bins.  It is good for ranking data, and especially useful when visualizing.  You probably are familiar with a few quantiles already and didn’t realize it.  You’ve heard of the median, right?  Well, the median is a 2-quantile.  Meaning two buckests of data, the top and the bottom.  Another one you know well is the 100-quantiles, commonly know as percentiles.  The good old  %.

I couldn’t find a simple way to calulate these in Excel, so I’m using the javascript library Protovis to do it, client side.

Polymaps is hard

I found working with Polymaps nearly impossble.  The documentation has completely empty pages and doesn’t explain some crucial magic that is going on.  In particular, I couldn’t divine the method being used to serve up tile boundaries via a restful url.  I can see where the variables for the tile positions are in the url, but the rest is obfuscated.  So, I couldn’t figure out how to create my own service for custom polygons, which makes it less useful.  Essentially good for copy pasting the examples, and substituting your own data but nothing more complicated than that.

 

Read Full Post »

June 9th, 2011

ST_Distance gotcha’s

ST_Distance_Sphere calculates only for WSG 80

ST_Distance_Spheroid allows you to define the sphere to calculate the distance over.

Spatial Reference System Identifier (SRID) 4326 aka WSG84 is specificed by

'SPHEROID["WGS 84",6378137,298.257223563]'

http://postgis.refractions.net/documentation/manual-1.4/ST_Distance_Spheroid.html
http://postgis.refractions.net/documentation/manual-1.4/ST_Distance_Sphere.html
http://www.bostongis.com/blog/index.php?/archives/48-Spatial-Differences.html

Read Full Post »

Older Posts »