data

How do you write tests to test functions with variable return values?

I've got a simple function like this: function CreateFileLink() { global $Username; return date("d-m-y-g-i"); } How do you write code to test a function like that where the return data is variable? ...

Is there a conflict when using Data Caching and Lazy loading?

If I plan to use data caching do I have to worry about conflicts when also using deferred loading? It seems that with linq i am losing control of my data. ...

How do I turn OFF DML, ON DDL tracking in SQL Server 2008 Change Data Capture

Is there a way to turn OFF the DML tracking for SQL Server 2008 Change Data Capture? I'd like to only track all DDL statements. Thanks! ...

How can I extract x, y and z coordinates from geographical data by Python?

I have geographical data which has 14 variables. The data is in the following format: QUADNAME: rockport_colony_SD RESOLUTION: 10 ULLAT: 43.625 ULLON: -97.87527466 LRLAT: 43.5 LRLON: -97.75027466 HDATUM: 27 ZMIN: 361.58401489 ZMAX: 413.38400269 ZMEAN: 396.1293335 ZSIGMA: 12.36359215 PME...

Persisting data suited for enums

Most projects have some sort of data that are essentially static between releases and well-suited for use as an enum, like statuses, transaction types, error codes, etc. For example's sake, I'll just use a common status enum: public enum Status { ACTIVE(10, "Active"); EXPIRED(11, "Expired"); /* other statuses... */ /* c...

Which data structure should I use? (.NET)

Here is the structure of the data my object will need to expose (the data is NOT really stored in XML, it was just the easiest way to illustrate the layout): <Department id="Accounting"> <Employee id="1234">Joe Jones</Employee> <Employee id="5678">Steve Smith</Employee> </Department> <Department id="Marketing"> <Employee id="3223"...

Drawing massive amounts of data in NSView, or something else?

I have hundreds of thousands of points of time series data that I want to represent to the user. My current solution is to render said data to a PNG with a 3rd party library and then load that PNG into a NSImage and display it in a scroll view. This works great, except that: NSImages more than 32k pixels wide don't display properly ...

Cloud Computing and my company's data

I am looking into Cloud Computing for my company. The one question that I can't seem to get out of my head is; What happens to my data and the ability to use it if the Cloud computing company goes out of business? ...

Save CoreData-entities in NSUserDefaults

Imagine an CoreData entity (e.g. named searchEngine). NSManagedObjectContext manages some "instances" of this entity. The end-user is going to be able to select his "standard searchEngine" with a NSPopupButton. The selected object of NSPopupButton should be binded to the NSUserDefaults. The problem: 1) @try{save} a) If yo...

Client side Infragistics webgrid data populate..

I am using ultra web Grid.. I am populating data using datatable and the grid is bound to the datatable. I am able to fetch the data and show the grid from the database. I have a editable column in the grid, I need to loop thru this grid and populate the second grid in the same page.. How do i do ? Please give me the client side code...

How should I deserialize this string data?

My application receives strings that represent objects. I have to parse the strings to get the property values for the object I'm creating. Each object will have to know the specifics about how many attributes there are, what each attribute means, etc. However, I want to avoid having each class know about how to parse the string. I'd...

What's the best way to read mixed (i.e. text and binary) data?

I need to be able to read a file format that mixes binary and non-binary data. Assuming I know the input is good, what's the best way to do this? As an example, let's take a file that has a double as the first line, a newline (0x0D 0x0A) and then ten bytes of binary data afterward. I could, of course, calculate the position of the new...

Is there any guarantee of alignment of address return by C++'s new operation?

Hi, Most of experienced programmer knows data alignment is important for program's performance. I have seen some programmer wrote program that allocate bigger size of buffer than they need, and use the aligned pointer as begin. I am wondering should I do that in my program, I have no idea is there any guarantee of alignment of address r...

Is there a tool to DB Diff on 'data' for an ORACLE database?

We have an ORACLE 10g database with 100+ tables. The software used against this database is an order entry system. We are looking for some software (preferably free) or script which when ran will tell us which tables had a new row INSERTED or any data UPDATED....after we have generated a new 'order' from within ... Also which sequences...

How to distribute script using gdata-python-client?

I've written several scripts that make use of the gdata API, and they all (obviously) have my API key and client ID in plain-text. How am I supposed to distribute these? ...

Is it possible to send more than one model object to an ASP.NET MVC View?

On my start page, I'd like to display the first items from several different lists that i have on other pages - somewhat like the "recent" page here on SO displays both recent posts and recent comments. In my case I want to list the two most recent posts in a guest book, and the next upcoming event. In order to do this, how can I pass ...

NSManagedObjectID into NSData

I found this wonderful NSManagedObjectID. This would be very good for referencing an Entity/NSManagedObject/NSEntityDescription, right? Let's get an ID from an entity: NSEntityDescription *entity = [self newEntity]; NSManagedObjectID *objID = [entity objectID]; So... any idea how to get this objID into a string? Or better: NSData...

How do I 'load data' with multiple tables?

I have three tables. For simplicity let's say they are: tbl1, tbl2, tbl3 both tbl2, and tbl3 have f-keys linking to tbl1 I am using 'load data infile...' as I really need the +16,000 writes/second I am getting right now with it. I don't use auto-increment because I need the f-keys for my child records. So I create my txtfile on the ...

How does UI could be for data transformation between 2 DBs in c# ?

Hi, I am developing a c# win form. In it, i wanna to transfer data between 2 DBs. Data divide into 3 different categories (like employees, courses and letters). Now, I wanna to know that how UI for this type of program could be? I think having a for example progress bar could be fine. What's you opinion? Thank you..... ...

What's the simplest way to import a System.Data.DataSet into Excel?

In .NET 2.0 (in this case VB), is there a standard API that'll serialize a DataSet object into a stream that can be saved as a tab-delimited file and opened directly in Excel? Or does one have to create the delimited file manually by iterating through the members of the table collection? In this case, the DataSet's small, consisting ...