Search Results

Search found 11817 results on 473 pages for 'fetched property'.

Page 7/473 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • nonatomic property in model class when using NSOperationQueue (iPhone)?

    - by Andrew B.
    I have a custom model class with an NSMutableData ivar that will be accessed by custom NSOperation subclasses (using an NSOperationQueue). I think I can guarantee thread-safe access to the ivar from multiple NSOperations by using dependencies, and I can guarantee that I don't access the ivar from other code (say my main app thread) by waiting until the Q has finished all operations. Should I use a nonatomic property specification, or leave it atomic? Is there a significant impact on performance?

    Read the article

  • Make a Crystal Report with data fetched from two differents tables

    - by Selom
    Hi, Im using vb.net and I need to fetch data from two different tables and display it in form of report. These are the schemas and data of my two tables: CREATE TABLE personal_details (staff_ID integer PRIMARY KEY, title varchar(10), fn varchar(250), ln varchar(250), mn varchar(250), dob varchar(50), hometown varchar(250), securityno varchar(50), phone varchar(15), phone2 varchar(15), phone3 varchar(15), email varchar(250), address varchar(300), confirmation varchar(50), retirement varchar(50), designation varchar(250), region varchar(250)); INSERT INTO personal_details VALUES(1,'Mr.','Selom','AMOUZOU','Kokou','Sunday, March 28, 2010','Ho',7736,'024-747-4883','277-383-8383','027-838-3837','[email protected]','Lapaz Kum Hotel','Sunday, March 28, 2010','Sunday, March 28, 2010','Designeur','Brong Ahafo'); CREATE TABLE training( training_ID integer primary key NOT NULL, staff_ID varchar(100), training_level varchar (60), school_name varchar(100), start_date varchar(100), end_date varchar(100)); INSERT INTO training VALUES(1,1,'Primary School','New School','Feb 1955','May 1973'); INSERT INTO training VALUES(2,1,'Middle/JSS','Ipmc','Feb 1955','May 1973'); Im trying to fetch and display data from the tables above the following way: Dim rpt As New CrystalReport1() Dim da As New SQLiteDataAdapter Dim ds As New presbydbDataSet ds.EnforceConstraints = False If conn.State = ConnectionState.Closed Then conn.Open() End If Dim cmd As New SQLiteCommand("SELECT p.fn, t.training_level FROM personal_details p INNER JOIN training t ON p.staff_ID = t.staff_ID", conn) cmd.ExecuteNonQuery() da.SelectCommand = cmd da.Fill(ds) rpt.SetDataSource(ds) CrystalReportViewer1.ReportSource = rpt conn.Close() My problem is that nothing displays on the report unless I take off either the training fields or the personal_details fields from the report. Need your help. Thanks

    Read the article

  • Set the property hibernate.dialect error message

    - by user281180
    I am having the following error when configuring mvc3 and Nhibernate. Can anyone guide me what I have missed please. the dialect was not set. Set the property hibernate.dialect. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: NHibernate.HibernateException: The dialect was not set. Set the property hibernate.dialect. Source Error: Line 16: { Line 17: NHibernate.Cfg.Configuration configuration = new NHibernate.Cfg.Configuration(); Line 18: configuration.AddAssembly(System.Reflection.Assembly.GetExecutingAssembly()); Line 19: sessionFactory = configuration.BuildSessionFactory(); Line 20: } My web.config is as follows: <configSections> <section name="cachingConfiguration"type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings,Microsoft.Practices.EnterpriseLibrary.Caching"/> <section name="log4net"type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/> <section name="hibernate-configuration"type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"/ <appSettings> <add key="BusinessObjectAssemblies" value="Keeper.API"></add> <add key="ConnectionString" value="Server=localhost\SQLSERVER2005;Database=KeeperDev;User=test;Pwd=test;"></add> <add key="ClientValidationEnabled" value="true"/> <add key="UnobtrusiveJavaScriptEnabled" value="true"/> </appSettings> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="connection.connection_string">Server=localhost\SQLServer2005;Database=KeeperDev;User=test;Pwd=test;</property> <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property> </session-factory> </hibernate-configuration>

    Read the article

  • Can't access annotation property of subclassed uibutton

    - by Tzur Gazit
    I have a mapView to which I add annotations. The pin's callout have a button (rightCalloutAccessoryView). In order to be able to display various information when the button is pushed, i've subclassed uibutton and added a class called "Annotation". @interface CustomButton : UIButton { NSIndexPath *indexPath; Annotation *mAnnotation; } @property (nonatomic, retain) NSIndexPath *indexPath; @property (nonatomic, copy) Annotation *mAnnotation; - (id) setAnnotation2:(Annotation *)annotation; @end Here is "Annotation": @interface Annotation : NSObject <MKAnnotation> { CLLocationCoordinate2D coordinate; NSString *mPhotoID; NSString *mPhotoUrl; NSString *mPhotoName; NSString *mOwner; NSString *mAddress; } @property (nonatomic, assign) CLLocationCoordinate2D coordinate; @property (nonatomic, copy) NSString *mPhotoID; @property (nonatomic, copy) NSString *mPhotoUrl; @property (nonatomic, copy) NSString *mPhotoName; @property (nonatomic, copy) NSString *mOwner; @property (nonatomic, copy) NSString *mAddress; - (id) initWithCoordinates:(CLLocationCoordinate2D)coordinate; - (id) setPhotoId:(NSString *)id url:(NSString *)url owner:(NSString *)owner address:(NSString *)address andName:(NSString *)name; @end I want to set the annotation property of the uibutton at - (MKAnnotationView *)mapView:(MKMapView *)pMapView viewForAnnotation:(id )annotation, in order to refer to it at the button push handler (-(IBAction) showDetails:(id)sender). The problem is that I can't set the annotation property of the button. I get the following message at run time: 2010-04-27 08:15:11.781 HotLocations[487:207] *** -[UIButton setMAnnotation:]: unrecognized selector sent to instance 0x5063400 2010-04-27 08:15:11.781 HotLocations[487:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIButton setMAnnotation:]: unrecognized selector sent to instance 0x5063400' 2010-04-27 08:15:11.781 HotLocations[487:207] Stack: ( 32080987, 2472563977, 32462907, 32032374, 31884994, 55885, 30695992, 30679095, 30662137, 30514190, 30553882, 30481385, 30479684, 30496027, 30588515, 63333386, 31865536, 31861832, 40171029, 40171226, 2846639 ) I appreciate the help. Tzur.

    Read the article

  • Winforms DataBind to Control's Visible Property

    - by B Z
    WinForms, .NetFramework 3.5 Are there any known issues when databinding to a control's visible property? The control is always NOT visible regardless of what my property is. Public ReadOnly Property IsRibbonCategory() As Boolean Get Return True End Get End Property I tried the control's text property and other properties and they seem to work correctly. I am trying to set a Panel's visible property. Using a BindingSource. Thx in advance.

    Read the article

  • Windsor Container: How to specify a public property should not be filled by the container?

    - by George Mauer
    When Instantiating a class, Windsor by default treats all public properties of the class as optional dependencies and tries to satisfy them. In my case, this creates a rather complicated circular dependency which causes my application to hang. How can I explicitly tell Castle Windsor that it should not be trying to satisfy a public property? I assume there must be an attribute to that extent. I can't find it however so please let me know the appropriate namespace/assembly. If there is any way to do this without attributes (such as Xml Configuration or configuration via code) that would be preferable since the specific library where this is happening has to date not needed a dependency on castle.

    Read the article

  • Do I have to deliver my utility and helper code to clients?

    - by deviDave
    Over the years I've created a bunch of Java utility and helper libraries which I just attach to new projects. Then, when I deliver code to my clients, I send all the code except for the libraries themselves (not JARs but source code files). A client complained that he could not compile the project as some libraries were missing. I tried explaining him about my own libraries, but he was not satisfied. How do you handle such situations? I am still apporting changes to these libraries often and I cannot compile JARs each time I start working on some new project. How to overcome this issue - not to share private libraries (personal intellectual property) and have happy clients?

    Read the article

  • How to add space between the images being fetched using database through php

    - by ParveenArora
    I am using following code to fetch images using database with php. while($row = mysql_fetch_array($result)) //To excute result query { echo "<a href='http://".$row['website']."' target='_blank'><img src=\"" . $PathImage . $row['logo'] . "\" height = $FooterWidth /></a>XX; } Here I am using $row[logo] is fetching the path of images stored on the server and XX to put the spaced between the images having the same color of text XX as background, and but I want to use the proper method I know this can be done using table but I want to do it without using table. Any Suggestions?

    Read the article

  • displaying the values in textbox based on AJAX fetched entries

    - by Anurag
    hello, I've a table in which addition rows can be generatred as per the user need by clicking a javascript function. Each row has a drop down list, and based on the values of this an AJAX script fetchs some values which has to be displayed in corresponding textfields of the same row.. here is the code for HTML.. <td><div align="center"> <label> <select name="gcno1" id="gcno1" onchange="fetch_gc(this)"> <option value="0">NIL</option> <option value="2">1</option> <?php while($row=mysql_fetch_array($result)) { ?> <option value="<?php echo $row[0]; ?>"><?php echo $row[0]; ?></option> <?php }?> </select> </label> </div></td> <td><div align="center"><input name="date1" id="date1" type="text" size="10" /> </div></td> and here is the AJAX which I'm writing... xmlhttp = new XMLHttpRequest(); var value=encodeURIComponent(document.getElementById('gcno1').value); var parameters="param1="+value; xmlhttp.open("POST", 'fetch_gc.php', true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.send(parameters); xmlhttp.onreadystatechange=function(){ if(xmlhttp.readyState == 4 && xmlhttp.status == 200) { var detail=xmlhttp.responseText.split('+'); alert(detail[0]); document.getElementsByName('date1').value=String(detail[0]); alert("life " + document.getElementById('gcno1').value); } } The alert inside the AJAX shows the correct response text, detail[0] but is unable to put the value in corresponding textbox i.e. with name 'gcno1'...... Please help me with this problem...

    Read the article

  • Relational MySQL - fetched properties?

    - by Kelso.b
    I'm currently using the following PHP code: // Get all subordinates $subords = array(); $supervisorID = $this->session->userdata('supervisor_id'); $result = $this->db->query(sprintf("SELECT * FROM users WHERE supervisor_id=%d AND id!=%d",$supervisorID, $supervisorID)); $user_list_query = 'user_id='.$supervisorID; foreach($result->result() as $user){ $user_list_query .= ' OR user_id='.$user->id; $subords[$user->id] = $user; } // Get Submissions $submissionsResult = $this->db->query(sprintf("SELECT * FROM submissions WHERE %s", $user_list_query)); $submissions = array(); foreach($submissionsResult->result() as $submission){ $entriesResult = $this->db->query(sprintf("SELECT * FROM submittedentries WHERE timestamp=%d", $submission->timestamp)); $entries = array(); foreach($entriesResult->result() as $entries) $entries[] = $entry; $submissions[] = array( 'user' => $subords[$submission->user_id], 'entries' => $entries ); $entriesResult->free_result(); } Basically I'm getting a list of users that are subordinates of a given supervisor_id (every user entry has a supervisor_id field), then grabbing entries belonging to any of those users. I can't help but think there is a more elegant way of doing this, like SELECT FROM tablename where user->supervisor_id=2222 Is there something like this with PHP/MySQL? Should probably learn relational databases properly sometime. :(

    Read the article

  • Implement delegates for Core Data's fetched results controller or not

    - by Spanky
    What advantage is there to implementing the four delegate methods: (void)controllerWillChangeContent:(NSFetchedResultsController *)controller (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id )sectionInfo atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath (void)controllerDidChangeContent:(NSFetchedResultsController *)controller rather than implement: (void)controllerDidChangeContent:(NSFetchedResultsController *)controller Any help appreciated // :)

    Read the article

  • CoreData: Same predicate (IN) returns different fetched results after a Save operation

    - by Jason Lee
    I have code below: NSArray *existedTasks = [[TaskBizDB sharedInstance] fetchTasksWatchedByMeOfProject:projectId]; [context save:&error]; existedTasks = [[TaskBizDB sharedInstance] fetchTasksWatchedByMeOfProject:projectId]; NSArray *allTasks = [[TaskBizDB sharedInstance] fetchTasksOfProject:projectId]; First line returns two objects; Second line save the context; Third line returns just one object, which is contained in the 'two objects' above; And the last line returns 6 objects, containing the 'two objects' returned at the first line. The fetch interface works like below: WXModel *model = [WXModel modelWithEntity:NSStringFromClass([WQPKTeamTask class])]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(%@ IN personWatchers) AND (projectId == %d)", currentLoginUser, projectId]; [model setPredicate:predicate]; NSArray *fetchedTasks = [model fetch]; if (fetchedTasks.count == 0) return nil; return fetchedTasks; What confused me is that, with the same fetch request, why return different results just after a save? Here comes more detail: The 'two objects' returned at the first line are: <WQPKTeamTask: 0x1b92fcc0> (entity: WQPKTeamTask; id: 0x1b9300f0 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p9> ; data: { projectId = 372004; taskId = 338001; personWatchers = ( "0xf0bf440 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WWPerson/p1>" ); } <WQPKTeamTask: 0xf3f6130> (entity: WQPKTeamTask; id: 0xf3cb8d0 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p11> ; data: { projectId = 372004; taskId = 340006; personWatchers = ( "0xf0bf440 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WWPerson/p1>" ); } And the only one object returned at third line is: <WQPKTeamTask: 0x1b92fcc0> (entity: WQPKTeamTask; id: 0x1b9300f0 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p9> ; data: { projectId = 372004; taskId = 338001; personWatchers = ( "0xf0bf440 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WWPerson/p1>" ); } Printing description of allTasks: <_PFArray 0xf30b9a0>( <WQPKTeamTask: 0xf3ab9d0> (entity: WQPKTeamTask; id: 0xf3cda40 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p6> ; data: <fault>), <WQPKTeamTask: 0xf315720> (entity: WQPKTeamTask; id: 0xf3c23a0 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p7> ; data: <fault>), <WQPKTeamTask: 0xf3a1ed0> (entity: WQPKTeamTask; id: 0xf3cda30 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p8> ; data: <fault>), <WQPKTeamTask: 0x1b92fcc0> (entity: WQPKTeamTask; id: 0x1b9300f0 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p9> ; data: { projectId = 372004; taskId = 338001; personWatchers = ( "0xf0bf440 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WWPerson/p1>" ); }), <WQPKTeamTask: 0xf325e50> (entity: WQPKTeamTask; id: 0xf343820 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p10> ; data: <fault>), <WQPKTeamTask: 0xf3f6130> (entity: WQPKTeamTask; id: 0xf3cb8d0 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WQPKTeamTask/p11> ; data: { projectId = 372004; taskId = 340006; personWatchers = ( "0xf0bf440 <x-coredata://CFFD3F8B-E613-4DE8-85AA-4D6DD08E88C5/WWPerson/p1>" ); }) ) UPDATE 1 If I call the same interface fetchTasksWatchedByMeOfProject: in: #pragma mark - NSFetchedResultsController Delegate - (void)controllerDidChangeContent:(NSFetchedResultsController *)controller { I will get 'two objects' as well. UPDATE 2 I've tried: NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(ANY personWatchers == %@) AND (projectId == %d)", currentLoginUser, projectId]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(ANY personWatchers.personId == %@) AND (projectId == %d)", currentLoginUserId, projectId]; Still the same result. UPDATE 3 I've checked the save:&error, error is nil.

    Read the article

  • Will the changes of a property in a "StaticResource instance" reflected in UI ?

    - by Anish
    I have used object data provider to create instance of my view-model as below: <ObjectDataProvider x:Key="Datas" ObjectType="{x:Type ViewModel:UserControlViewModel}"> </ObjectDataProvider> <DataTemplate x:Key="SourceGrid"> <WPFToolKit:DataGrid x:Name="SourceDataGrid" ItemsSource="{Binding Source={StaticResource Datas},Path=SourceGridData}" CanUserSortColumns="True" GridLinesVisibility="None" IsSynchronizedWithCurrentItem="True" SelectionUnit="FullRow"></WPFToolKit:DataGrid> </DataTemplate> My question is... as I am using the instance - "Datas" as staticResource, will the changes to the property "SourceGridData" get reflected in UI? ItemsSource="{Binding Source={StaticResource Datas},Path=SourceGridData}" `

    Read the article

  • Playframework sends 2 queries for fetched query

    - by MRu
    I currently have problems with the JPA at the play framework 1.2.4. I need to have a UserOptions model in a separate database and want to join it lazyly cause its only needed in one query. In this query I want to load the options eagerly and by searching I found out that can only be done by using a join query. If I use eager instead oder lazy, everything would be fine by using User.findById() and the options and the user is found in one query. But play sends two queries when I use a 'left join fetch' query. So heres the query: User.find(" SELECT user FROM User user LEFT JOIN FETCH user.options options WHERE user.id = ? ", Long.parseLong(id)).first(); And here the models: @Entity public class User extends Model { @OneToOne(mappedBy = "user", fetch = FetchType.LAZY) public UserOptions options; // ... } @Entity public class UserOptions extends Model { @OneToOne(fetch = FetchType.LAZY) public User user; } The question is why play sends two query for the fetch query? Thanks in advance

    Read the article

  • Getting Values from fetched Core Data

    - by user571905
    Hi there, Thanks to the wonderful people on this forum, I have overcome most of my Core Data woes. However one persists, and I'm certain it is a simple fix. I have a recipe app that parses an XML doc on load and puts the data in Core Data. Then I search that Core Data for particular recipes, ingredients, etc. Everything is working with one exception... I cannot do anything with the data I retrieve. For example, I search the core data for "eggplant" and get this at the end of the process: "<RecipeData: 0x6112a40> (entity: RecipeData; id: 0x6113880 <x-coredata:///RecipeData/tCDE9A0EE-DA3F-4BD0-AEF8-3C038586991D4> ; data: {\n ingredients = \"Eggplant|Cheese|Tomatoes|\";\n name = \"Eggplant Parm\";\n time = 40;\n})" How do I get the info out of there? I tried looping through, but that causes the app to crash: for (NSString* key in selectedRecipe) { id value = [selectedRecipe objectForKey:key]; NSLog(@"IN LOOP: %@", value); } Any suggestions? Thank you for your time.

    Read the article

  • KindError: Property r must be an instance of SecondModel, why ?

    - by zjm1126
    class FirstModel(db.Model): p = db.StringProperty() r=db.ReferenceProperty(SecondModel) class SecondModel(db.Model): r = db.ReferenceProperty(FirstModel) class sss(webapp.RequestHandler): def get(self): a=FirstModel() a.p='sss' a.put() b=SecondModel() b.r=a b.put() a.r=b a.put() self.response.out.write(str(b.r.p)) the error is : Traceback (most recent call last): File "D:\Program Files\Google\google_appengine\google\appengine\ext\webapp\__init__.py", line 511, in __call__ handler.get(*groups) File "D:\zjm_code\helloworld\a.py", line 158, in get a.r=b File "D:\Program Files\Google\google_appengine\google\appengine\ext\db\__init__.py", line 3009, in __set__ value = self.validate(value) File "D:\Program Files\Google\google_appengine\google\appengine\ext\db\__init__.py", line 3048, in validate (self.name, self.reference_class.kind())) KindError: Property r must be an instance of SecondModel thanks

    Read the article

  • Help: Instance Variables & Properties [iPhone]

    - by Devoted
    In something like this: @interface Control_FunViewController : UIViewController { UITextField *nameField; UITextField *numberField; } @property (nonatomic, retain) IBOutlet UITextField *nameField; @property (nonatomic, retain) IBOutlet UITextField *numberField; I understand that "UITextField *nameField;" is an instance variable and "@property ..." is a property. But what do these individual things do? I guess what I'm really asking is how the property is used for example in the implementation file (.m)

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >