Am about to do a homework, and i need to store quite a lot of information (Dictionary) in a data structure of my choice. I heard people in my classroom saying hash-tables are the way to go. How come?
I'm getting average prices by week on 7 million rows, it's taking around 30 seconds to get the job done.
This is the simple query:
SELECT AVG(price) as price, yearWEEK(FROM_UNIXTIME(timelog)) as week from pricehistory where timelog > $range and product_id = $id GROUP BY week
The only week that actually gets data changed and is worth averaging every time is always the last one, so this calculation for the whole period is a waste of resources. I just wanted to know if mysql has a tool to help out on this.
I think the question is clear enough. Some of the columns in my datawarehouse table could have a relationship to a primary key. But is it good practice? It is denormalized, so it should never be deleted again (data in datawarehouse). Hope question is somewhat clear enough.
Hi I need some sample MS SQL Employee database with data such as id, surname, name, age, adress etc. It must be quite big, I search with google, but I don't find any good sample.
Can any body help ?
Hi, is it possible to handle two data sources in the UIPickerView?
I have here a segmented control that would control the display of the picker view.
So, for example, when first segment is clicked, the picker will display person's name. Then, when second segment is clicked, picker will display place's name.
Thanks
I want to send the below data to default.ctp, I want to display menus in all the pages, I'm using Auth, The problem is if I'm logged in I get the Menus correctly, but if I logout, I'm getting error saying variable'$topMenu' not found.
The MenuController can be accessed only if logged in.
$this->loadModel('Menu');
$this->set('topMenu',$this->Menu->find('all'));
Any help on how to solve this?
None of the scribe examples I've seen actually mention the best way to take logs/logfiles and send them to scribe. I could configure a logrotate script that has a postrotate section that "cats" the rotated file to scribe (but then I get minutes latency at best).
The other option is to keep a "tail -f= | my_scribe_sender" and hope that the process never gets killed. However then you really can't guarantee that you're not missing/duplicating data.
I have a three column Table View populated by two NSMutableDictionaries which share the same keys (ie key | value1 | value2 ) with dict1(key,value1) and dict2(key,value2).
I want to manually enter data in the third column and create the key/value objects in dict2. But when I do that, my code picks the wrong key :S
Here's the code for the delegate :
- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
{
if ([[aTableColumn identifier] isEqualToString:@"value2"])
{
[dict2 setValue:anObject forKey:[[[aTableView tableColumnWithIdentifier:@"key"] dataCellForRow:rowIndex] stringValue ]];
}
}
Any idea ?
I'm searching files and returning lines that include the search text, and I'm not really sure the best way to display the information I get. Every time I get a match, I want to show, in some sort of control, the File it came from, and the whole text line. (aka streamreader.ReadLine() result). First I tried just putting it all in a read-only text box, but it doesn't have a scroll bar.
What is the best form control to help me display this data neatly?
Hi all,
I've a scenario where my java program has to continuously communicate with the database table, example my java program has to get the data of my table when new rows are added to it at runtime. There should be continuous communication between my program and database.
if the table has 10 rows initially and 2 rows are added by the user, it must detect this and return the rows.
My program shouldn't use AJAX and timers.
Please Help.
The Core Data Programming Guide talks a lot about what not to overwrite. So the question is: What is good to overwrite?
Like I see it, I can't overwrite -init or -initWithEntity:insertIntoManagedObjectContext:
So where else would be a good overwrite point to set up some basic stuff? Or is it generally not needed to do custom initialization? Does the whole thing rely only on accessing properties which then start to do fancy things? So no custom initializations?
how do i write a query that returns aggregate sales data for California in the past x months.
----------------------- -----------------------
| order | | customer |
|-----------------------| |-----------------------|
| orderId int | | customerId int |
| customerId int | | state varchar |
| deposit decimal | -----------------------
| orderDate date |
-----------------------
-----------------------
| orderItem |
|-----------------------|
| orderId int |
| itemId int |
| qty int |
| lineTotal decimal |
| itemPrice decimal |
-----------------------
I recently read that using flexible array members in C was poor software engineering practice. However, that statement was not backed by any argument. Is this an accepted fact?
(Flexible array members are a C feature introduced in C99 whereby one can declare the last element to be an array of unspecified size. For example: )
struct header {
size_t len;
unsigned char data[];
};
I have a drop down box which is used to fetch the data from db and dosplays it.Now,i need to put them in form and when i click update button,it should get in to db.
How do ,i do this? Give me a snippet?
Thanks in advance.
Is there any existing Python library that can validate data in Excel format? Or what kind of keyword should I use to search such an open source project? Thanks.
Hi
im using qt , and i parse complex json data structure but i find my self doing to many
loops each time i need to parse this JSON , i wander how or what can be the best way to
handle big JSON structures
I am doing a project on Calculix Data Visualiser. It is a civil based project. I need to show the structure of beams before applying force and the structure after the force is applied.
I need to change the color of the beams to RED where more force is applied. But i am just able to change the color for lines and not for the phase as a whole. SO pls help me out.
Hi all,,,
I am trying to do a small thing, any 1 help me, I really appricciate...
I have a drop down menu,I want when I select the value, it will call the related data, which I am access with php+mysql, I dont want to jump to other page and show
I'm new in iOS development and i need simple example (project) with explained two-entity coreData with to-many relationship between A and B entities on iOS6 with storyboard interface and ARC. In storyboard should be two UITableView controllers which present entities A and B and two UIViewControllers which present adding string data from text fields
I searched in many books, sites, video lessons like "lynda.com", but i still not understand how and where i should implement two-entity coredata with one to-many relationship in code.
Can someone give me link to understandable tutorial or put the project on GitHub?
I am populating data using
<select name="test">
<option value='<%=session.getAttribute("tList")%>'><%=session.getAttribute("tList") %></option>
</select>
but the values are getting display in a single row in the combo box not row wise,where i am going wrong ?
Is it possible to read stdin as binary data in Python 2.6? If so, how?
I see in the Python 3.1 documentation that this is fairly simple, but the facilities for doing this in 2.6 don't seem to be there.
If the methods described in 3.1 aren't available, is there a way to close stdin and reopen in in binary mode?
What are the advantages of using C++ based Classes/Objects over using legacy C Structures for managing standard Data Structures like Linked List, Stack, Tree, Queue ..etc? Let me know if the question is not clear.