Daily Archives

Articles indexed Saturday May 29 2010

Page 31/76 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • When should I add a file reference to a Delphi project ?

    - by Roland Bengtsson
    Unit files for standard VCL files like Dialogs, StringUtils etc is never referenced in a projects DPR-file. But when should I add a reference to the DPR-file ? Now I have own sourcefiles and source of own components. What about source files for Ravereport, Devexpress, Indy, Gnostice etc ? I want as fast codeinsight as possible, but of course I do not want to add bloat to the DPR-file. I use Delphi 2007 Regards

    Read the article

  • CopyLZFileName/CreateLZFileName.. what does LZ means?

    - by kiddo
    I am gathering small information regarding kernel dll functions.. and I found this function called CopyLZFileName/CreateLZFileName and some other functions related to this LZ.. I googled for it.. I cant find a proper source for it. From the name I guess it copies/creates file but am not sure what kind of file.. does LZ mean something to it. Please let me know.

    Read the article

  • C++: Platform indepentend game lib?

    - by Martijn Courteaux
    Hi, I want to write a serious 2D game, and it would be nice if I have a version for Linux and one for Windows (and eventually OSX). Java is fantastic because of its platform independent. But Java is to slow to write a serious game. So, I thought to write it in C++. But C++ isn't very cross-platform friendly. I can find game libraries for Windows and libraries for Linux, but I'm searching one that I can use for both, by recompiling the source on a Windows platform and on a Linux platform. Are there engines for this or is this idea irrelevant? Isn't it that easy (recompiling)? Any advice and information about C++ libraries would be very very very appreciated!

    Read the article

  • objective c compare two date strings in NSDate

    - by mac
    Hi I am having two date as string , that is assigned to two labels, one label holds current date string, that is may 29, 2010 similarly the other date will be selected by user in this same format, i need to check the user date is present, past , or future. by comparing with current date string. please provide some sample code. Thanks in advance.

    Read the article

  • Hibernate: Criteria vs. HQL

    - by cretzel
    What are the pros and cons of using Criteria or HQL? The Criteria API is a nice object-oriented way to express queries in Hibernate, but sometimes Criteria Queries are more difficult to understand/build than HQL. When do you use Criteria and when HQL? What do you prefer in which use cases? Or is it just a matter of taste?

    Read the article

  • Setting System.Drawing.Color through COM. Interop

    - by user58909
    I am trying to use Aspose.Words library through COM Interop. There is one critical problem: I cannot set color. It is supposed to work by assigning to DocumentBuilder.Font.Color, but when I try to do it I get OLE error 0x80131509. My problem is pretty much like this one: http://bit.ly/cuvWfc

    Read the article

  • link .a and .o files in GCC

    - by David
    hi! I have two precompiled library: X.a and Y.a and a test.cpp (without main function) source code use these two libraries. I compiled the C++ using: g++ -c test.cpp and I got 'test.o'. Now how can I link these three together to generate a .a file because test.cpp use some function in X.a and Y.a and other GCC libraries? BTW, I am doing these under Windows using MinGW. Can I rename this .a file to .lib and use this .lib in VC? Thanks!

    Read the article

  • Jointure in linq with a regular expression

    - by Graveen
    I'm actually using a join in linqtosql (via dblinq). I'm trying to include a regular expression in the join part of the linq query. from i in collectiona join j in collectionb on Regex.IsMatch(i.name, j.jokered_name) equals true (...) I agree i can push the RegExp check in the where part of the linq query, but i was wondering if it is possible in the join part ? The above code wants an "i equals j" code structure. One thing i think to perform is overriding Equals() which 'll contains the RegEx.IsMatch() stuff and put a simple i equals j in the join part. Any suggestions about my problem ?

    Read the article

  • NSFetchedResultsController: using of NSManagedObjectContext during update brings to crash

    - by Kentzo
    Here is the interface of my controller class: @interface ProjectListViewController : UITableViewController <NSFetchedResultsControllerDelegate> { NSFetchedResultsController *fetchedResultsController; NSManagedObjectContext *managedObjectContext; } @end I use following code to init fetchedResultsController: if (fetchedResultsController != nil) { return fetchedResultsController; } // Create and configure a fetch request with the Project entity. NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Project" inManagedObjectContext:managedObjectContext]; [fetchRequest setEntity:entity]; // Create the sort descriptors array. NSSortDescriptor *projectIdDescriptor = [[NSSortDescriptor alloc] initWithKey:@"projectId" ascending:YES]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:projectIdDescriptor, nil]; [fetchRequest setSortDescriptors:sortDescriptors]; // Create and initialize the fetch results controller. NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext sectionNameKeyPath:nil cacheName:nil]; self.fetchedResultsController = aFetchedResultsController; fetchedResultsController.delegate = self; As you can see, I am using the same managedObjectContext as defined in my controller class Here is an adoption of the NSFetchedResultsControllerDelegate protocol: - (void)controllerWillChangeContent:(NSFetchedResultsController *)controller { // The fetch controller is about to start sending change notifications, so prepare the table view for updates. [self.tableView beginUpdates]; } - (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath { UITableView *tableView = self.tableView; switch(type) { case NSFetchedResultsChangeInsert: [tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade]; break; case NSFetchedResultsChangeDelete: [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; break; case NSFetchedResultsChangeUpdate: [self _configureCell:(TDBadgedCell *)[tableView cellForRowAtIndexPath:indexPath] atIndexPath:indexPath]; break; case NSFetchedResultsChangeMove: if (newIndexPath != nil) { [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; [tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade]; } else { [tableView reloadSections:[NSIndexSet indexSetWithIndex:indexPath.section] withRowAnimation:UITableViewRowAnimationFade]; } break; } } - (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id <NSFetchedResultsSectionInfo>)sectionInfo atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type { switch(type) { case NSFetchedResultsChangeInsert: [self.tableView insertSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade]; break; case NSFetchedResultsChangeDelete: [self.tableView deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade]; break; } } - (void)controllerDidChangeContent:(NSFetchedResultsController *)controller { [self.tableView endUpdates]; } Inside of the _configureCell:atIndexPath: method I have following code: NSFetchRequest *issuesNumberRequest = [NSFetchRequest new]; NSEntityDescription *issueEntity = [NSEntityDescription entityForName:@"Issue" inManagedObjectContext:managedObjectContext]; [issuesNumberRequest setEntity:issueEntity]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"projectId == %@", project.projectId]; [issuesNumberRequest setPredicate:predicate]; NSUInteger issuesNumber = [managedObjectContext countForFetchRequest:issuesNumberRequest error:nil]; [issuesNumberRequest release]; I am using the managedObjectContext again. But when I am trying to insert new Project, app crashes with following exception: Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit_Sim/UIKit-984.38/UITableView.m:774 Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (4) must be equal to the number of rows contained in that section before the update (4), plus or minus the number of rows inserted or deleted from that section (1 inserted, 0 deleted).' Fortunately, I've found a workaround: if I create and use separate NSManagedObjectContext inside of the _configureCell:atIndexPath: method app won't crash! I only want to know, is this behavior correct or not?

    Read the article

  • JQuery UI - Select specific tabs dynamically

    - by richzilla
    Hi All. Im wanting to develop an entirely ajax back end for a website im developing, and im looking at using jquery ui. The tabs widget looks like it could be useful for my menu, however i want to know if theres a way to load a specific tab dynamically. So basically, if someone entered the url mysite.com/tab1 it would open the first tab, and tab2 would open the second etc. Can anyone point me in the right direction? Thanks

    Read the article

  • Partitioning mySQL tables that has foreign keys?

    - by Industrial
    Hi! What would be an appropriate way to do this, since mySQL obviously doesnt enjoy this. To leave either partitioning or the foreign keys out from the database design would not seem like a good idea to me. I'll guess that there is a workaround for this? Update 03/24: http://opendba.blogspot.com/2008/10/mysql-partitioned-tables-with-trigger.html http://stackoverflow.com/questions/1537219/how-to-handle-foreign-key-while-partitioning Thanks!

    Read the article

  • Creation obex connection without service discovery

    - by Vio
    Hello there my problem is this,i want to create an obex connection but i already know my server adress.The problem is how to get the connection url without service discovery.I use a normal java project for my server side and a midlet project for my client side.I will post the code maybe it helps. Server connection UUID uuid=new UUID("8841",true); String url="btgoep://localhost:"+uuid+";name=FTP;authenticate=false;master=false;encrypt=false"; SessionNotifier sn=(SessionNotifier)Connector.open(url); System.out.println("Now waiting for a client to connect"); sn.acceptAndOpen(this); System.out.println("A client is now connected"); When i try to connect with the client it doesn't get to the last line :(....any ideas why?Hope u can help...thanks

    Read the article

  • Integrating CMS Ektron and MVC application

    - by stuarty
    Hi I have two separate applications, a c# MVC app and a CMS (Ektron) app. I want the user to be able to move between the two application seamlessly without having to log into each application separately. What it the best (easiest) way to achieve this? I sort of have it working using web services but wonder if there is a better way. TIA Stuart

    Read the article

  • SharePoint itemDeleting evert is not working

    - by Clodin
    Hi! I have a site in SharePoint and I want to custom delete from a list. So, I'm creating the public class ListItemEventReceiver : SPItemEventReceiver { public override void ItemDeleting(SPItemEventProperties properties) { if (properties.ListTitle.Equals("Projects List")) { Projects pr = new Projects(); string projectName = properties.ListItem["Project Name"].ToString(); pr.DeleteProject(projectName); } } } Where 'Projects' class has 'DeleteProject' method who deletes the item. But it's doing nothing :( I mention that everything it's ok in Feature.xml Where am I wrong?

    Read the article

  • Apple: Time capsule, 2 questions

    - by Patrick
    1) Can I use time capsule as server ? Can I run operating systems on it ? 2) I'm using time machine with my mac with time capsule. Let's say my mac crashes, and I cannot use it anymore. Can i restore my mac disk on another laptop from time capsule ? In other words, can I have a perfect copy of my mac hard disk on another mac ? thanks

    Read the article

  • Very very weird problem with UIImageView property - I can access it then I can't, and it's not nil.

    - by just_another_coder
    Very very weird problem with UIImageView property on iPad application @interface MyViewController : UIViewController { IBOutlet UIImageView* coverImage; } @property(nonatomic, retain) IBOutlet UIImageView* coverImage; … more code @implementation MyViewController @synthesize coverImage; … more code - (void)viewDidLoad { [super viewDidLoad]; NSString* imageName = @"my_image.png"; UIImage* tempImage = [UIImage imageNamed:imageName]; [self.coverImage setImage:tempImage]; } The above code WILL display the image. In another part of code: -(IBAction) stopButtonPressed:(id)sender { [self.coverImage setHidden:YES]; NSLog(@"coverImage desc: %@", [coverImage description]); } The image will NOT disappear. I know the reference to the image isn't nil, because it gives me this output: 2010-05-29 17:37:40.706 MyApp[95360:207] coverImage desc: UIImageView: 0x5128420; frame = (0 0; 1024 768); autoresize = RM+BM; userInteractionEnabled = NO; layer = CALayer: 0x512bed0 In addition, if I move the code in viewDidLoad to another part of the class, and try to execute it from there, it fails to show the image at all.

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >