Search Results

Search found 58499 results on 2340 pages for 'temporal data'.

Page 128/2340 | < Previous Page | 124 125 126 127 128 129 130 131 132 133 134 135  | Next Page >

  • Data structure for an ordered set with many defined subsets; retrieve subsets in same order

    - by Aaron
    I'm looking for an efficient way of storing an ordered list/set of items where: The order of items in the master set changes rapidly (subsets maintain the master set's order) Many subsets can be defined and retrieved The number of members in the master set grow rapidly Members are added to and removed from subsets frequently Must allow for somewhat efficient merging of any number of subsets Performance would ideally be biased toward retrieval of the first N items of any subset (or merged subset), and storage would be in-memory (and maybe eventually persistent on disk)

    Read the article

  • Does MS Access update the data on the clipboard from a query when the data in the database changes?

    - by leeand00
    I was just debugging a macro in MS Access, and when it hit the breakpoint ran a query and I copied the data from it to the clipboard. Some of the values were null before stepping to the next step, then I ran the next step which ran a query which changed the data I had on the clipboard. I then pasted the data and the values that were null before had been changed by the query...leading to a rather large WTF on my part when I pasted the data. So my question is, does MSAccess update the data on the clipboard when it changes in the database? That's the only explanation I have for what occurred there.

    Read the article

  • When does the DENY delete rule in Core Data actually deny deletion of an object?

    - by dontWatchMyProfile
    An Employee has an inverse relationship to it's Department and vice versa. The Employee entity has an Relationship called department, and it has a DENY delete rule. Employee shall be deleted. Now: Does DENY actually deny deletion of employee, because department is still referencing a Department? Or does it mean that a Department can't be deleted because an Employee is referencing it?

    Read the article

  • Couldn't I just pass an copied string to an Core Data property?

    - by dontWatchMyProfile
    The docs say: The default implementation does not copy attribute values. If the attribute value may be mutable and implements the NSCopying protocol (as is the case with NSString, for example), you can copy the value in a custom accessor to help preserve encapsulation (for example, in the case where an instance of NSMutableString is passed as a value). So instead of getting into trouble and inconvenience with overwriting accessors in my NSManagedObject subclass, couldn't I simply do something like this? myManagedObject.firstName = [[firstNameMutableStr copy] autorelease]; This would have the exact same effect, or not? The dynamic implementation would retain that anyways ... so.... why not the easy way?

    Read the article

  • How can I share dynamic data array between Applications?

    - by Ehsan
    Hi, I use CreateFileMapping, but this method was not useful,because only static structure can be shared by this method. for example this method is good for following structure: struct MySharedData { unsigned char Flag; int Buff[10]; }; but it's not good for : struct MySharedData { unsigned char Flag; int *Buff; }; would be thankful if somebody guide me on this, Thanks in advance!

    Read the article

  • Render different view depending on the type of the data

    - by Miau
    Hi there So lets suppose we have an action in a controller that looks a bit like this: public ViewResult SomeAction(int id) { var data = _someService.GetData(id); ... //create new view model based on the data here return View(viewModel); } What I m trying to figure out is the best way to render a diferent view based on the type fo the data. the "_someService.GetData method returns an data that knows its out type (ie not only you can do typeof(data) but also you can do data.DataType and you ll get an enum value so I could achieve what I m trying to do doing something kinda like this public ViewResult SomeAction(int id) { var data = _someService.GetData(id); //I m mapping fields to the viewModel here var viewModel = GetViewModel(data); swtich(data.DataType) case DataType.TypeOne: return View("TypeOne", viewModel); break; ... } But this does not seem to be the nicest way, (I dont event know if it would work) Is this the way to go? Should I use some sort of RenderPartial Aproach? after all , waht will change in the view is mostly the order of the data (ie the rest of the view would be quite similar) Cheers

    Read the article

  • How to programaticly access min and Max values defined in a core-data model designed with XCode ?

    - by Xav
    I was expecting to find that in the NSAttributeDescription class, but only the default value is there. Behind the scene I tought a validationPredicate was created but trying to reach it using NSDictionary* dico= [[myManagedObject entity] propertiesByName]; NSAttributeDescription* attributeDescription=[dico objectForKey:attributeKey]; for (NSString* string in [attributeDescription validationWarnings]) just get me nowhere, no validationWarnings, no validationPredicates... any thoughts on this ? Edit1: It seems that getting the entity straight from the managedObject doesn't give you the full picture. Getting the Entity from the NSManagedObjectModel permits to reach the validationWarnings & validationPredicates...

    Read the article

  • Getting sync(uploading) multipale data on the remote server from iphone

    - by Ajay
    i am try to sync or upload the data on the remote server from iphone but not getting it.I try this from 1 week but didn't success how can solve this .I am using the NSURLConnection methods or any one give idea on ASIHTTPRequest method but i am new for *ASIHTTPReques*t .I need this method only .For this code like this -(void)sendRequestforContent { //this for finding the date of sync on the server NSDate* date = [NSDate date]; //Create the dateformatter object NSDateFormatter* formatter = [[[NSDateFormatter alloc] init] autorelease]; //Set the required date format [formatter setDateFormat:@"dd-MMM-yyyy"]; //Get the string date NSString* str = [formatter stringFromDate:date]; NSError *error = nil; NSHTTPURLResponse *response = nil; NSMutableData *postBody = [NSMutableData data]; NSURL *url = [NSURL URLWithString:@"http://www.google.com"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; NSString *boundary = @"-------------------a9d8vyb89089dy70"; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary]; [request setHTTPMethod:@"POST"]; [request setValue:contentType forHTTPHeaderField:@"Content-Type"]; [postBody appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //this is for TOKEN_API [postBody appendData:[@"Content-disposition: form-data; name=\"Token\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[tokenapi dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //this for the CONTENT_ID [postBody appendData:[@"Content-disposition: form-data; name=\"contentID\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[content_id dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //this for the CONTENTTYPE_ID [postBody appendData:[@"Content-disposition: form-data; name=\"contentTypeID\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; NSString *ContentTypeString = [NSString stringWithFormat:@"%d",content_type]; [postBody appendData:[ContentTypeString dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //this for the CONTENT_Location_Id [postBody appendData:[@"Content-disposition: form-data; name=\"contentLocationID\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[contenLocation_id dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //this is for the User_Caption [postBody appendData:[@"Content-disposition: form-data; name=\"userCaption\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[user_caption dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //this is for the User_Comment [postBody appendData:[@"Content-disposition: form-data; name=\"userComment\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[user_comment dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //this for the Tags [postBody appendData:[@"Content-disposition: form-data; name=\"tags\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[tag dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //this for the Date_Record [postBody appendData:[@"Content-disposition: form-data; name=\"dateRecorded\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[date_recorded dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //this for the image_data [postBody appendData:[[NSString stringWithFormat:@"Content-disposition: form-data; name=\"image_file\"; filename=\"%@\"\r\n",@"image.jpg"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[@"Content-Type: image/jpg\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:image]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //this for the Share_type [postBody appendData:[@"Content-disposition: form-data; name=\"shareType\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; NSString *ShareString = [NSString stringWithFormat:@"%d",share_type]; [postBody appendData:[ShareString dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //this for the Views [postBody appendData:[@"Content-disposition: form-data; name=\"views\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; NSString *ViewsString = [NSString stringWithFormat:@"%d",views]; [postBody appendData:[ViewsString dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //this for the PLAY_time [postBody appendData:[@"Content-disposition: form-data; name=\"playTime\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; NSString *TimeString = [NSString stringWithFormat:@"%d",play_time]; [postBody appendData:[TimeString dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //this for the Posted_By [postBody appendData:[@"Content-disposition: form-data; name=\"postedBy\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[postred_by dataUsingEncoding:NSUTF8StringEncoding]]; //this for the AVG_Rating [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[@"Content-disposition: form-data; name=\"avgRating\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; NSString *AvgString = [NSString stringWithFormat:@"%d",avg_rating]; [postBody appendData:[AvgString dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[@"Content-disposition: form-data; name=\"LastSyncDate\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[str dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [request setHTTPBody:postBody]; NSData *shoutData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; NSString *returnString = [[NSString alloc] initWithData:shoutData encoding:NSUTF8StringEncoding]; NSLog(@"%@",returnString); } it is not going into the this mthods -(void)connectionDidFinishLoading:(NSURLConnection *)connection { loginStatus = [[NSString alloc] initWithBytes: [webData mutableBytes] length:[webData length] encoding:NSUTF8StringEncoding]; NSLog(@"%@",loginStatus); } It show me html page on console I hope people help me to solve it out

    Read the article

  • Architectural Design for a Data-Driven Silverlight WP7 app

    - by Rosarch
    I have a Silverlight Windows Phone 7 app that pulls data from a public API. I find myself doing much of the same thing over and over again: In the UI, set a loading message or loading progress bar in place of where the content is Get the content, which may be already in memory, cached in isolated file storage, or require an HTTP request If the content can not be acquired (no network connection, etc), display an error message If the content is acquired, display it in the UI Keep the content in main memory for subsequent queries The content that is displayed to the user can be taken directly from a data source, such as an ObservableCollection, or it may be a query on a data source. I would like to factor out this repetitive process into a framework where ideally only the following needs to be specified: Where to display the content in the UI The UI elements to show while loading, on failure, and on success The URI of the HTTP request How to parse the HTTP response into the data structure that will kept in memory The location of the file in isolated storage, if it exists How to parse the file contents into the data structure that will be kept in memory It may sound like a lot, but two strings, three FrameworkElements, and two methods is less than the overhead that I currently have. Also, this needs to work for however the data is maintained in memory, and needs to work for direct collections and queries on those collections. My questions are: Has something like this already been implemented? Are my thoughts about the topic above fundamentally wrong in some way? Here is a design I'm thinking of: There are two components, a View and a Model. The View is given the FrameworkElements for loading, failure, and success. It is also given a reference to the corresponding Model. The View is a UserControl that is placed somewhere in the UI. The Model a class that is given the URI for the data, a method of how to parse the data, and optionally a filename and how to parse the file. It is responsible for retrieving the data and notifying the View whenever the current status (loading/fail/success) changes. If the data downloaded from the network is different from the cache, the network data takes precedence. When the app closes or is tombstoned, the model writes the data to the cache. How does that sound?

    Read the article

  • Is it compulsory to learn about Data Structures if you want to be a Java/C++ programmer ?

    - by happysoul
    So do I like really need to learn about them ? Isn't there an interesting way to learn about stacks, linked lists, heaps ,etc ? I found it a boring subject. **While posting this question it showed some warning.Am I not allowed to post such a question ? Admins please clarify and I will delete it :/ Warning :: The question you're asking appears subjective and is likely to be closed.

    Read the article

  • Searching for online database software/cms

    - by ButterdBread
    I am searching for a software or CMS that manages and displays large online databases, as some kind of frontend to MySQL or any other database. It should be accessible through the browser, be as secure as possible (offering login). The data I'd like to store would be personal information such as name, adress and birthday - also I'd need to be able to add custom fields as well. Also forms and the possibility to download the data in an excel? table would be great. PHPmyadmin is not an option, it should be similar to a CRM but more closely adapted to managing database tables, searching for entries and filtering data. It should be possible to have many user accounts with different rights, with each of them being able to acces certain parts of the data and entering own data. Is there something out there, that might get close to what I imagine? I appreciate any help!

    Read the article

  • How do I ensure data consistency in this concurrent situation?

    - by MalcomTucker
    The problem is this: I have multiple competing threads (100+) that need to access one database table Each thread will pass a String name - where that name exists in the table, the database should return the id for the row, where the name doesn't already exist, the name should be inserted and the id returned. There can only ever be one instance of name in the database - ie. name must be unique How do I ensure that thread one doesn't insert name1 at the same time as thread two also tries to insert name1? In other words, how do I guarantee the uniqueness of name in a concurrent environment? This also needs to be as efficient as possible - this has the potential to be a serious bottleneck. I am using MySQL and Java. Thanks

    Read the article

  • Building a decision-making game in jQuery? Where would I store data....

    - by redconservatory
    I built a slideshow/decision-making game in Flash but would like to try to redo it using jQuery. The slideshow part seems simple enough, however I have a series of user decisions that I'm not sure how to approach. In flash, if the user makes a decision, I would just store this in a variable or shared local objects, is this the same for jQuery? i.e. mix regular javascript variables with the jQuery?

    Read the article

  • How to write a value validation method for core data?

    - by mystify
    The docs say: you should implement methods of the form validate:error:, as defined by the NSKeyValueCoding protocol so lets say I have an attribute which is an int: friendAge I want to make sure that any friend may not be younger than 30. So how would I make that validation method? -validateFriendAge:error: What am I gonna do in there, exactly? And what shall I do with that NSError I get passed? I think it has an dictionary where I can return a humanly readable string in an arbitrary language (i.e. the one that's used currently), so I can output a reasonable error like: "Friend is not old enough"... how to do that?

    Read the article

  • What's does "cardinality of an relationship" mean in Core Data?

    - by dontWatchMyProfile
    From the docs: If all of a managed object's relationship delete rules are Nullify, then for that object at least there is no additional work to do (you may have to consider other objects that were at the destination of the relationship—if the inverse relationship was either mandatory or had a lower limit on cardinality, then the destination object or objects might be in an invalid state). Does someone have an example of this cardinality thing? What's this good for and what's important to know about this? (sounds very important...)

    Read the article

  • How to store and collect data for mining such information as most viewed for last 24 hours, last 7 d

    - by Kirzilla
    Hello, Let's imagine that we have high traffic project (a tube site) which should provide sorting using this options (NOT IN REAL TIME). Number of videos is about 200K and all information about videos is stored in MySQL. Number of daily video views is about 1.5KK. As instruments we have Hard Disk Drive (text files), MySQL, Redis. Views top viewed top viewed last 24 hours top viewed last 7 days top viewed last 30 days top rated last 365 days How should I store such information? The first idea is to log all visits to text files (single file per hour, for example visits_20080101_00.log). At the beginning of each hour calculate views per video for previous hour and insert this information into MySQL. Then recalculate totals (for last 24 hours) and update statistics in tables. At the beginning of every day we have to do the same but recalculate for last 7 days, last 30 days, last 365 days. This method seems to be very poor for me because we have to store information about last 365 days for each video to make correct calculations. Is there any other good methods? Probably, we have to choose another instruments for this? Thank you.

    Read the article

  • Most performant way to check how many objects are referenced by an to-many relationship in Core Data

    - by dontWatchMyProfile
    Lets say I have an employees relationship in an Company entity, and it's to-many. And they're really many. Apple in 100 years, with 1.258.500.073 employees. Could I simply do something like NSInteger numEmployees = [apple.employees count]; without firing 1.258.500.073 faults? (Well, in 100 years, the iPhone will easily handle so many objects, for sure...but anyways)

    Read the article

  • Which kind of changes can't I do with lightweight migration in Core Data?

    - by dontWatchMyProfile
    I recently tried a lot of different stuff with lightweight migration. These all work: 1) Rename attributes (with renaming identifier specified) 2) Add attributes 3) Add new entity + new attribute + inverse relationship to an already existing entity 4) remove existing entity + relationships to that entity = It almost looks like just about anything can be handled with LM. Did I miss something? In which cases am I getting into trouble and need an some more complex approach?

    Read the article

  • servlet ArrayList and HashMap problem witch result

    - by nonameplum
    Hi, I have that code List<Map<String, Object>> data = new ArrayList<Map<String, Object>>(); Map<String, Object> item = new HashMap<String, Object>(); data.clear(); item.clear(); int i = 0; while (i < 5){    item.put("id", i);    i++;    out.println("id: " + item.get("id"));    out.println("--------------------------");    data.add(item); } for(i=0 ; i<5 ; i++){    out.println("print data[" + i + "]" + data.get(i)); } Result of that is: id: 0 -------------------------- id: 1 -------------------------- id: 2 -------------------------- id: 3 -------------------------- id: 4 -------------------------- print data[0]{id=4} print data[1]{id=4} print data[2]{id=4} print data[3]{id=4} print data[4]{id=4} Why only last element is stored?

    Read the article

  • Write a program for a report derived from the data in the data file JEWELRY. The data is to be input

    - by Taylor
    here is the JEWELRY file 0011 Money_Clip 2.000 50.00 Other 0035 Paperweight 1.625 175.00 Other 0457 Cuff_Bracelet 2.375 150.00 Bracelet 0465 Links_Bracelet 7.125 425.00 Bracelet 0585 Key_Chain 1.325 50.00 Other 0595 Cuff_Links 0.625 525.00 Other 0935 Royale_Pendant 0.625 975.00 Pendant 1092 Bordeaux_Cross 1.625 425.00 Cross 1105 Victory_Medallion 0.875 30.00 Pendant 1111 Marquis_Cross 1.375 70.00 Cross 1160 Christina_Ring 0.500 175.00 Ring 1511 French_Clips 0.687 375.00 Other 1717 Pebble_Pendant 1.250 45.00 Pendant 1725 Folded_Pendant 1.250 45.00 Pendant 1730 Curio_Pendant 1.063 275.00 Pendant this is the program i have used #include <iostream> #include <string> #include <iomanip> #include <fstream> using namespace std; struct productJewelry { string name; double amount; int itemCode; double size; string group; }; int main() { // declare variables ifstream inFile; int count=0; int x=0; productJewelry product[50]; inFile.open("jewelry.txt"); // file must be in same folder if (inFile.fail()) cout << "failed"; cout << fixed << showpoint; // fixed format, two decimal places cout << setprecision(2); while (inFile.peek() != EOF) { // cout << count << " : "; count++; inFile>> product[x].itemCode; inFile>> product[x].name; inFile>> product[x].size; inFile>> product[x].amount; inFile>> product[x].group; // cout << product[x].itemCode << ", " << product[x].name << ", "<< product[x].size << ", " << product[x].amount << endl; x++; if (inFile.peek() == '\n') inFile.ignore(1, '\n'); } inFile.close(); string temp; bool swap; do { swap = false; for (int x=0; x<count;x++) { if (product[x].name>product[x+1].name) { //these 3 lines are to swap elements in array temp=product[x].name; product[x].name=product[x+1].name; product[x+1].name=temp; swap=true; } } } while (swap); for (x=0; x< count; x++) { //cout<< product[x].itemCode<<" "; //cout<< product[x].name <<" "; //cout<< product[x].size <<" "; //cout<< product[x].amount<<" "; //cout<< product[x].group<<" "<<endl; } system("pause"); // to freeze Dev-c++ output screen return 0; } // end main

    Read the article

< Previous Page | 124 125 126 127 128 129 130 131 132 133 134 135  | Next Page >