Hello stackoverflow,
I have a data file of almost 9 million lines (soon to be more than 500 million lines) and I'm looking for the fastest way to read it in. The five aligned columns are padded and separated by spaces, so I know where on each line to look for the two fields that I want.
My Python routine takes 45 secs:
import sys,time
...
I need to extract data from non delimited text files using C#. Basically, I need to remove all unwanted character then mark the end of a line and add a line break. Once the data has been separated into individual lines I need to loop through each line in turn and extract values using Regular Expressions. I have been doing this with Perl ...
What I want to do is:
$array_data = array( "a" => array(1, 2, 3), "b" => array( 1, 2, 3 ) );
$table_converted = CONVERT_TO_MYSQL_TABLE( $array_data );
while ($row = mysql_fetch_assoc( $table_converted )) {
echo $row['a'] . " union " . $row['b'];
}
Thanks!
...
I'm building a CLI survey app in Java that lets users answer multiple-choice questions. Please tell me how my approach can be improved.
Each answer to a question is recorded as an int, which is the index of that choice in the array of choices for that question. All answers for a survey are saved as an int array. I'm thinking of seriali...
I have a pre-binned frequency table for a rather large dataset. That is, a single column vector of bins and a single column vector of counts associated with those bins. I'd like R to plot a histogram of this data by doing further binning and summing the existing counts. For example, if in the pre-binned data I have something like [(0.01,...
I would like to click on the header of a dojo data grid and retrieve information such as if it is sorted and what direction is it sorted in, the column index, and the column name. Has anyone done this.
...
I have an iPhone app that is using CoreData. I recently made some minor changes to the data model and now every time the app is opened I get an error "Can't find model for source store".
I have 2 version of the data model and the only changes I've made were some additions of some fields. I was following the guide here which worked initi...
I'm trying to get the Body Mass Index (BMI) classification for a BMI value that falls within a standard BMI range - for instance, if someone's BMI were 26.2, they'd be in the "Overweight" range.
I made a list of tuples of the values (see below), although of course I'm open to any other data structure. This would be easy to do with SQL's...
Hello there,
I am using VS 2010, MVC, VS 2005
I create .dbml file as my model and map tables inside .dbml file
i join tables using LINQ to SQL. I want to display record of two tables i.e. tbl_class, tbl_subject
COde in my controller looks like this
public ActionResult SubjectByTeacher()
{
var DataContext = new SM...
I want to be able to package data in a apk, which is read by my main app.
Is there a way that I can put the data in apk, and then upon install automatically hook that data into the ContentProvider in my main app?
The other possibility is to have each add-on be a content-provider, and have the app look for it, but then I fragment the au...
Good day.
An online ticketing engine is 'shared' by several ticketing sites. For example, tickets for one particular destination.
My question is, how to display latest data in real time as to prevent overlapping or double-seating (one seat sold two times).
Thanks.
...
I need an example of what drill up/down is ( + if it's graphical ) for a better understanding of these operations. I'm new to the whole Data Warehouse subject so high level explanations would be appreciated.
...
Hi All,
Upon clicking a button I need to send a collection and a few other variables to server in Json form.For each value in the collection the server code (C# ) wil update those other variables in the DB.
For example there is a ‘classnumber’ collection with values (First, Second, Third, ….),other variables (‘teacher_name’ and ‘subjec...
Hello all.
I work with a senior developer who is a guru .NET architect. We have had many constructive arguments over the last 6+ months and generally I concede defeat in most of our discussions. I have learned stacks from working with him. There is one design problem we are currently in disagreement with, however, and I would like some ...
hu giys,
I am trying to pass some information of a server in which the script is running to next url or server.
I tried using curl. i have following two disadvantages:
1.) if cannot locate file it will tell file not found
2.) it waits till the remote file execution is completed.
How can i overcome both of the things either by using ...
I'd like to slurp the following data about historical inventions into a convenient Ruby data structure:
http://yootles.com/outbox/inventions.xml
Note that all the data is in the XML attributes.
It seems like there should be a quick solution with a couple lines of code.
With Rails there'd be Hash.from_xml though I'm not sure that would...
I'm having a store locator (tableview) and a map view. Basically I want to easily go back and forth these two without having to worry about memory. The tableview downloads a chunk of data and parses them into the tableview.
Is there a way I can not load the table view's data again? Something like a modal view controller, but pushing it ...
what is the difference between the terms edge and path in graph data structure
...
Would you please tell me, in how many ways jquery's .data() can be used.
$("element").data('field','value');
or
$("element").data({'field':'value', 'f2': 'v2' });
is there any other way, we can accompany more data like an array or something?
...
Overlap in terminology makes search for answers difficult for this one.
I'm looking for advice on the best way to implement a multiple-column display of my QuerySet that fills each column top to bottom over X columns. Meaning that the number of items in each column equals the QuerySet count divided by X (number of columns).
Using Offs...