dataset

The best way to mark (split?) dataset in each string

两盒软妹~` 提交于 2019-12-12 22:13:44
问题 I have a dataset containing 485k strings (1.1 GB). Each string contains about 700 of chars featuring about 250 variables (1-16 chars per variable), but it doesn't have any splitmarks. Lengths of each variable are known. What is the best way to modify and mark the data by symbol , ? For example: I have strings like: 0123456789012... 1234567890123... and array of lengths: 5,3,1,4,... then I should get like this: 01234,567,8,9012,... 12345,678,9,0123,... Could anyone help me with this? Python or

Class to DataSet / DataSet to class

霸气de小男生 提交于 2019-12-12 18:27:24
问题 Right now I'm trying to create a database handler that handles databases dynamically. Say I have a class of fieldtypes "String, int, bool, String" and want to turn this class into a table and all the fieldtypes into "fields" of a dataset? How can I do that? Also, can I create a few classes that inherits: "System.Data.DataSet", "System.Data.DataTable", "System.Data.DataRow", and some sort of Adapter to handle it. I know when you go into design mode and create a dataset the code is really hard

How do I cache a dataset to stop round trips to db?

前提是你 提交于 2019-12-12 18:20:50
问题 I am creating a search results page in C# in an ASP.NET 1.1 page. In my data layer I have a DataSet that stores the result of a plain old ADO.NET stored procedure call. The DataSet has two DataTables and I'm using a DataVIew to filter and sort the columns. I only want to fill the dataset once, and then work on the DataTables and derived DataView until the page is unloaded. How best should I cache the DataSet in my DAL so that it is filled only PageLoad? Do i put it in a Cache object, a static

Missing values for the data to be used in a Neural Network model for prediction

≡放荡痞女 提交于 2019-12-12 16:48:40
问题 I currently have a lot of data that will be used to train a prediction neural network (gigabytes of weather data for major airports around the US). I have data for almost every day, but some airports have missing values in their data. For example, an airport might not have existed before 1995, so I have no data before then for that specific location. Also, some are missing whole years (one might span from 1990 to 2011, missing 2003). What can I do to train with these missing values without

Synchronize DataSet

孤街醉人 提交于 2019-12-12 16:37:02
问题 What is the best approach to synchronizing a DataSet with data in a database? Here are the parameters: We can't simply reload the data because it's bound to a UI control which a user may have configured (it's a tree grid that they may expand/collapse) We can't use a changeflag (like a UpdatedTimeStamp) in the database because changes don't always flow through the application (e.g. a DBA could update a field with a SQL statement) We cannot use an update trigger in the database because it's a

Calculate correlation of data generated by function in R

随声附和 提交于 2019-12-12 16:27:44
问题 I have created the following function in R : timeseriesmodel <- function(N, x0, delta, variance) { z<-cumsum(rnorm(n=N, mean=0, sd=sqrt(variance))) t<-1:N x<-x0+t*delta+z return(x)} This function returns a vector 'x' of length 'N', representing the data points of a random walk with drift. In my case: timeseriesmodel(250,1,0,1.2) Now I should repeat this function 100 times, ending up with 100 timeseries data sets of length 250. Then I have to estimate the correlation between the 249th and

How can I sort a DataSet before doing a DataBind?

巧了我就是萌 提交于 2019-12-12 16:18:00
问题 I have data coming from the database in the form of a DataSet . I then set it as the DataSource of a grid control before doing a DataBind() . I want to sort the DataSet / DataTable on one column. The column is to complex to sort in the database but I was hoping I could sort it like I would sort a generic list i.e. using a deligate. Is this possible or do I have to transfer it to a different data structure? Edit I can't get any of these answer to work for me, I think because I am using .Net 2

C# DataSet, DataAdapter — How to change row state to invoke an INSERT?

怎甘沉沦 提交于 2019-12-12 15:43:38
问题 I am trying to implement a "Save As" button to take the data in a DataSet that was DataAdapter.Filled(), and INSERT into the database. The DataSet has 4 tables -- 1 parent (single row table), 3 child. with foriegn cascade delete/update constraints. My intention is to ask the user for a new primary key (complex) and then try to tell the DataAdapter or DataSet to mark all the rows (and subsequent new ones) in the 4 tables as DataRowState.Added; But DataRow.SetAdded() throws exception "Can only

WPF how to bind self-referential dataset to a treeview

你。 提交于 2019-12-12 14:35:18
问题 I am a total beginner in WPF. I would like to bind the following DataSet containing nodes and relations to a TreeView . The dataset is: internal static DataSet getData() { DataTable dt = new DataTable("data"); dt.Columns.Add("Id", typeof(int)); dt.Columns.Add("ParentId", typeof(int)); dt.Columns.Add("NodeDescription"); dt.Rows.Add(1, null, "Employees"); dt.Rows.Add(2, null, "Cars"); dt.Rows.Add(3, 1, "Men"); dt.Rows.Add(4, 1, "Women"); dt.Rows.Add(5, 2, "BMW"); dt.Rows.Add(6, 2, "Lexus"); dt

Viewstate in a .ashx Handler?

萝らか妹 提交于 2019-12-12 11:37:25
问题 I've got a handler (list.ashx for example) that has a method that retrieves a large dataset, then grabs only the records that will be shown on any given "page" of data. We are allowing the users to do sorting on these results. So, on any given page run, I will be retrieving a dataset that I just got a few seconds/minutes ago, but reordering them, or showing the next page of data, etc. My point is that my dataset really hasn't changed. Normally, the dataset would be stuck into the viewstate of