data

Optimizing Importing of Data to SQL Server 2005 with C#

I have a table that has about 1/2 million records in it. Each month we get about 1/2 million more records to import. These are currently shoved into another table in the DB, but will eventually be loaded directly from a txt file. For each of these new records, I have to determine if we have that record already, and if we don't, then i...

.net mvc and editing data with forms

I have a form for editing gigs. The initial controller action is called "Edit". The form posts to a second controller action called "Update" So, once the form has posted, I use a bespoke ModelBinder which uses bindingContext.ModelState.AddModelError to add validation messages to the modelstate The Update copntroller action looks this...

How to get data sent with WebClient.UploadData

Hello all, i'm trying to upload some data from an ActiveX control to a webpage. The best way for me to do it is in a byte array through WebClient.UploadData. I'm having some trouble to find how i can retrieve my data on pageload... There are plenty of examples on how to send the data, but i am yet to find one that shows how to get the ...

What to put in a binary data file's header

I have a simulation that reads large binary data files that we create (10s to 100s of GB). We use binary for speed reasons. These files are system dependent, converted from text files on each system that we run, so I'm not concerned about portability. The files currently are many instances of a POD struct, written with fwrite. I need...

How can I export data in a legacy DOS application when no export option is available?

We've been given the task by my customer to export data from a legacy DOS system, using a RAIMA database, so it can be imported into a new system we are writing for them. It looks like the data is stored in a flat file format, though when we open the files most of the text is gibberish. We do see Raima Database Manager along the top ...

Sending binary data to (Rails) RESTful endpoint via JSON/XML?

Hello there, I am currently putting together a rails-based web application which will only serve and receive data via json and xml. However, some requirements contain the ability to upload binary data (images). Now to my understanding JSON is not entirely meant for that... but how do you in general tackle the problem of receiving bina...

Better (non-linear) binning

The last question I asked concerned how to bin data by x co-ordinate. The solution was simple and elegant, and I'm ashamed I didn't see it. This question may be harder (or I may just be blind). I started out with about 140000 data points and split them into 70 groups equally spaced along the x axis I then took the average position (x...

Matching jargon synonyms: This must be done by a human, but how can the human-entry part be optimized?

Background: Customer X has two lists of words. None of these words exists in any corpus of text in any known language. They are purely proprietary jargon. The first list is a list of words owned by Organization X. The second list is a list of words owned by his closest competitor, Organization Y. For a concrete example: Organization ...

Class vs Struct for data only?

Is there any advantage over using a class over a struct in cases such as these? (note: it will only hold variables, there will never be functions) class Foo { private: struct Pos { int x, y, z }; public: Pos Position; }; Versus: struct Foo { struct Pos { int x, y, z } Pos; }; Similar questions: http://stackov...

accessing image data from a bitmap given a pointer (on the iphone)

my problem is reading the pixel data correctly once i have the pointer so i have an image that takes up the whole iphone screen that has no alpha channel (24 bits per pixel, 8 bits per component, 960 bytes per row) and i want to find out the color of a pixel at a particular XY coordinate. i have the pointer to the data UInt8 *data = C...

DataModel for Workflow/Business Process Application

What should be the data model for a work flow application? Currently we are using an Entity Attribute Value based model in SQL Server 2000 with the user having the ability to create dynamic forms (on asp.net), but as the data grows performance is getting down and hard to generate report and worse if too many users concurrently query the ...

Check if a DataGridView/BindSource have changed data (VB.Net)

I have a WinForms app with a datagridview and a bindingsource. I want the user to confirm changes before I save them to the database. I don't want to pop up the confirmation dialog unless I know the user has made changes. So I need a way to check if changes have been made. Any suggestions? ...

Data Warehouse - business hours

I'm working on a Data Warehouse which, in the end, will require me to create reports based on business hours. Currently, my time dimension is granular to the hour. I'm wondering if I should be modifying my Time dimension to include a bit field for "business hour" or should I be creating some sort of calculated measure for it on the anal...

How do I separate out query string params from POST data in a java servlet

When you get a doGet or doPost call in a servlet you can use getparameterxxx() to get either the query string or the post data in one easy place. If the call was a GET, you get data from the url/query string. If the call was a POST, you get the post data all parsed out for you. Except as it turns out, if you don't put an 'action' attrib...

What tranformations are used by little-endian systems to convert data to network order?

What are the underlying transformations that are necessary to convert data in a little-endian system into network byte order? For 2 byte and 4 byte data there are well-known functions (such as htons, ntohl, etc.) to encapsulate the changes, what happens for strings of 1 byte data (if anything)? Also, Wikipedia implies that little-endian...

Does there exist a publicly accessible parsable Country/Country Code list?

I find that I always find it useful to have a list of all Countries and their country codes. If someone provided it in multiple formats (eg: SQL, DDL, Xml, CSV, JSON, YAML...). I've found sites that attempt to sell a list of countries but that seems crazy to me. Is there an open source project that I'm overlooking? If there isn't does a...

Use data with variable structure

Imagine a system that works with data, which structure changes over time. Say, for example, today your User object contains Name : String and Email : String, but tomorrow you need to add Age : Integer and Address which consists of Country, Zip code, etc. Then you may want to create new field User.Contacts and move Email and Address to th...

Gracefully remove a datasource from VS VB 2008 project?

Hi there What is the best way to remove a data source you no longer need from a VB2008 project? Deleting the Data source in the Solution Explorer throws up loads of errors. Deleting tables in the design view of the Dataset designer throws errors. Deleting the Table Adapters at the bottom of the form throws up errors, and now my Toolbox...

Data Exchange Design Proposal

Basically the situation we have is we need to be able to take data from an arbitrary data source (database, flat file, it could be anything really), morph the data so it maps to the schema we have, and then send us the data so we can store it. The data will be coming from ~200 different physical locations around the country and we'd lik...

Considering a new Rails app with existing data (not a db, actual data) -- what is the best way to proceed?

I have been tasked with developing a new retail e-commerce storefront for my current job, and I am considering tackling it with RoR to A) Build a "real" project with my limited Rails knowledge, and B) Give management quick turnaround and feedback (they are wanting to get this done ASAP and their deadlines are rather unrealistic - I'm tal...