Search Results

Search found 892 results on 36 pages for 'greg pagendam turner'.

Page 29/36 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Explanation of `self` usage during dealloc?

    - by Greg
    I'm trying to lock down my understanding of proper memory management within Objective-C. I've gotten into the habit of explicitly declaring self.myProperty rather than just myProperty because I was encountering occasional scenarios where a property would not be set to the reference that I intended. Now, I'm reading Apple documentation on releasing IBOutlets, and they say that all outlets should be set to nil during dealloc. So, I put this in place as follows and experienced crashes as a result: - (void)dealloc { [self.dataModel close]; [self.dataModel release], self.dataModel = nil; [super dealloc]; } So, I tried taking out the "self" references, like so: - (void)dealloc { [dataModel close]; [dataModel release], dataModel = nil; [super dealloc]; } This second system seems to work as expected. However, it has me a bit confused. Why would self cause a crash in that case, when I thought self was a fairly benign reference more used as a formality than anything else? Also, if self is not appropriate in this case, then I have to ask: when should you include self references, and when should you not?

    Read the article

  • Is converting this ArrayList to a Generic List efficient?

    - by Greg
    The code I'm writing receives an ArrayList from unmanaged code, and this ArrayList will always contain one or more objects of type Grid_Heading_Blk. I've considered changing this ArrayList to a generic List, but I'm unsure if the conversion operation will be so expensive as to nullify the benefits of working with the generic list. Currently, I'm just running a foreach (Grid_Heading_Blk in myArrayList) operation to work with the ArrayList contents after passing the ArrayList to the class that will use it. Should I convert the ArrayList to a generic typed list? And if so, what is the most efficient way of doing so?

    Read the article

  • Objective-C properties are not being recognized in header file?

    - by Greg
    Hey folks, I wonder if I'm doing something completely stupid here... I'm clearly missing something. I've gotten used to the pattern of defining properties of a custom class, however I seem to be hitting a point where extended classes do not recognize new properties. Case of point, here's my header file: import import "MyTableViewController.h" @interface MyRootController : MyTableViewController { NSMutableArray *sectionList; } @property (nonatomic, retain) NSMutableArray *sectionList; @end Now, for some reason that "sectionList" property is not turning green within my interface file (ie: it's not being recognized as custom property it seems). As a result, I'm getting all kinds of errors down in my implementation. The first is right at the top of my implementation where I try to synthesize the property: import "MyRootController.h" @implementation MyRootController @synthesize sectionList; That synthesize line throws the error "No declaration of property 'sectionList' found in the interface". So, this is really confusing. I'm clearly doing something wrong, although I can't put my finger on what. One thought: I am extending another custom class of my own. Do I need to specify some kind of super-class declaration to keep the architecture from getting sealed one level up? Thanks!

    Read the article

  • PHP/MySQL: Storing and retrieving UUIDS

    - by Greg
    I'm trying to add UUIDs to a couple of tables, but I'm not sure what the best way to store/retrieve these would be. I understand it's far more efficient to use BINARY(16) instead of VARCHAR(36). After doing a bit of research, I also found that you can convert a UUID string to binary with: UNHEX(REPLACE(UUID(),'-','')) Pardon my ignorance, but is there an easy way to this with PHP and then turn it back to a string, when needed, for readability? Also, would it make much difference if I used this as a primary key instead of auto_increment? EDIT: Found part of the answer: $bin = pack("h*", str_replace('-', '', $guid)); How would you unpack it?

    Read the article

  • flex 4: custom css value.

    - by greg
    is there any way to create a custom css value for a component and have it available to the skin class that component is using? for example, if i define this in a css file: s|Panel{ skinClass: ClassReference("PanelSkin"); myCustomValue: #CCCCFF; } is there a way to make myCustomValue available in the PanelSkin ?

    Read the article

  • Creating a Group of Groups in Django

    - by Greg
    I'm creating my own Group model; I'm not referring to the builtin Group model. I want each hroup to be a member of another group (it's parent), but there is the one "top" group that doesn't have a parent group. The admin interface won't let me create a group without entering a parent. I get the error personnel_group.parent_id may not be NULL. My Group model looks like this: class Group(models.Model): name = models.CharField(max_length=50) parent = models.ForeignKey('self', blank=True, null=True) order = models.IntegerField() icon = models.ImageField(upload_to='groups', blank=True, null=True) description = models.TextField(blank=True, null=True) How can I accomplish this? Thanks.

    Read the article

  • Winforms StatusStrip - why are there periods where it is blank when I'm updating it???

    - by Greg
    Hi, BACKGROUND: I have a WindowForms v3.5 application with a StatusStrip set to be used as a TooStripStatusLabel. I'm issues quite a lot of updates to it during a task that is running, however there are noticable periods where it is BLANK. There are no points when I am writing a blank to the status strip label either. QUESTION: Any ideas why I would be seeing period where the status strip label is blank, when I don't expect it to be? How I update it: private void UpdateStatusStrip(string text) { toolStripStatusLabel1.Text = text; toolStripStatusLabel1.Invalidate(); this.Update(); } thanks

    Read the article

  • QuickGraph - is there algorithm for find all parents (up to root vertex's) of a set of vertex's

    - by Greg
    Hi, In QuickGraph - is there algorithm for find all parents (up to root vertex's) of a set of vertex's. In other words all vertex's which have somewhere under them (on the way to the leaf nodes) one or more of the vertexs input. So if the vertexs were Nodes, and the edges were a depends on relationship, find all nodes that would be impacted by a given set of nodes. If not how hard is it to write one's own algorithms?

    Read the article

  • Rails: Different prices for different branches, association depending on two other models combined

    - by Greg Lemond
    I have three models: Service has_many :prices has_many :groups, through: prices Price belongs_to :service belongs_to :group Group has_many :prices I want to have an input field (Simple_Form) for every price. In views/services/_form.html.haml I do: simple_form_for @service do |f| simple_fields_for :groups do |g| simple_fields_for :prices do |p| p.input :price With this setup I only get input fields for already saved prices. How I can get a price field for every group? I tried to do it manually, but it got really nasty and didn't work either. Thanks for any ideas!

    Read the article

  • Qt: force resource reloading on every compilation.

    - by greg
    Is there a way to force QtCreator to recompile all the resources (images / qss files) i have specified in my qrc file every time i build the project? Currently if i change some styles in my qss file but dont remove the file and re-add it to the qrc file the old version of my qss file is used. Thanks.

    Read the article

  • How to exclude rows where matching join is in an SQL tree

    - by Greg K
    Sorry for the poor title, I couldn't think how to concisely describe this problem. I have a set of items that should have a 1-to-1 relationship with an attribute. I have a query to return those rows where the data is wrong and this relationship has been broken (1-to-many). I'm gathering these rows to fix them and restore this 1-to-1 relationship. This is a theoretical simplification of my actual problem but I'll post example table schema here as it was requested. item table: +------------+------------+-----------+ | item_id | name | attr_id | +------------+------------+-----------+ | 1 | BMW 320d | 20 | | 1 | BMW 320d | 21 | | 2 | BMW 335i | 23 | | 2 | BMW 335i | 34 | +------------+------------+-----------+ attribute table: +---------+-----------------+------------+ | attr_id | value | parent_id | +---------+-----------------+------------+ | 20 | SE | 21 | | 21 | M Sport | 0 | | 23 | AC | 24 | | 24 | Climate control | 0 | .... | 34 | Leather seats | 0 | +---------+-----------------+------------+ A simple query to return items with more than one attribute. SELECT item_id, COUNT(DISTINCT(attr_id)) AS attributes FROM item GROUP BY item_id HAVING attributes > 1 This gets me a result set like so: +-----------+------------+ | item_id | attributes | +-----------+------------+ | 1 | 2 | | 2 | 2 | | 3 | 2 | -- etc. -- However, there's an exception. The attribute table can hold a tree structure, via parent links in the table. For certain rows, parent_id can hold the ID of another attribute. There's only one level to this tree. Example: +---------+-----------------+------------+ | attr_id | value | parent_id | +---------+-----------------+------------+ | 20 | SE | 21 | | 21 | M Sport | 0 | .... I do not want to retrieve items in my original query where, for a pair of associated attributes, they related like attributes 20 & 21. I do want to retrieve items where: the attributes have no parent for two or more attributes they are not related (e.g. attributes 23 & 34) Example result desired, just the item ID: +------------+ | item_id | +------------+ | 2 | +------------+ How can I join against attributes from items and exclude these rows? Do I use a temporary table or can I achieve this from a single query? Thanks.

    Read the article

  • what's an easier rampup: ASP.net or WCF?

    - by Greg
    Hi I'm across winforms currently but want to write an app that users will have a LAN/WAN between them and database. So assuming I need to use WCF if I stick with winforms as the UI, or go ASP.net and go web, THEN which of these two approaches would be the easier rampup approach for me? Note wanted to use Entity Framework.

    Read the article

  • What's a good jQuery ligthbox plugin that cycles through images? (like a carousel)

    - by Greg
    I'm looking for a jQuery lightbox plugin that has the ability to, with it's next and previous buttons, cycle through images repeatedly. Like a carousel effect. I've been using jQuery Lightbox Plugin (balupton edition) but that doesn't have the option to continue cycling through images. It reaches the last image in the array and then disables the 'next' button. So to save me some time coding, what are some plugins you can recommend?

    Read the article

  • Modular HTML in Adobe AIR? Is It Possible?

    - by Greg Bulmash
    When I write HTML with a PHP backend, I usually have a single header file and a single footer file with some PHP variables in them. The base skeleton for every page calls the header, contains the body content, and then calls the footer. That way, if I want to make changes to the header sitewide, I change one file. I'm working on developing the UI in my first Adobe AIR app and I'm wondering if there's some way to include such files in an HTML based page template there. Obviously, with the file read/write abilities in AIR, I can write a Javascript routine to pull data from a header file, parse it, and inject it into a placeholder. It just seems like such a kludge. I'm thinking there's gotta be some simple way to import a block of HTML into a page without an iFrame or complex post-processor. Something like a PHP include statement or perhaps the old Server Side Includes. Any methods you guys can recommend?

    Read the article

  • Using preg_replace to replace all occurrences in php

    - by Greg-J
    Regex is absolutely my weak point and this one has me completely stumped. I am building a fairly basic search functionality and I need to be able to alter my user input based on the following pattern: Subject: %22first set%22 %22second set%22-drupal -wordpress Desired output: +"first set" +"second set" -drupal -wordpress I wish I could be more help as I normally like to at least post the solution I have so far, but on this one I'm at a loss. Any help is appreciated. Thank you.

    Read the article

  • Passing arguments to scope_procedure in searchlogic

    - by Greg
    I'd like to use searchlogic's scope_procedure feature like so class MyModelObject < ActiveRecord::Base scope_procedure :my_scope_proc, lambda { |p1, p2| { :conditions => "p1 >= #{p1} AND p2 < #{p2}" }} end Then, I am doing the search: scope = MyModelObject.search(:my_scope_proc => true) scope.all The above code obviously doesn't work because I didn't pass p1 and p2 parameters to my named scope. I can't figure out how to pass parameters to the named scope.

    Read the article

  • Giving proper credit to a projects contributors

    - by Greg B
    I've recently been working with an opensource library for a commercial product. The opensource code is distributed from the website of the company who sells the proprietary product as a zip file. The library is a (direct) port to C# of the original library which is in Java. As such, it uses methods instead of getter/setter properties. The code contains copyright notices to the supplier of the product. The C# port was originally provided to the company by a 3rd party individual. I have modified the source to be more C# like and added a couple of small features. I want to put my version of the code out there (Google code or where ever) so that C# users of the software can benefit from a more native feeling library. How can I and/or how should I amend the copyright notice to give proper credit to The comercial owner of the original source The guy who provided the original C# port Myself and anyone else who contributes to the project in the future The source is provided under the LGPL V2.1,

    Read the article

  • How do I rescue a small portion of data from a SQL Server database backup?

    - by Greg
    I have a live database that had some data deleted from it and I need that data back. I have a very recent copy of that database that has already been restored on another machine. Unrelated changes have been made to the live database since the backup, so I do not want to wipe out the live database with a full restore. The data I need is small - just a dozen rows - but those dozen rows each have a couple rows from other tables with foreign keys to it, and those couple rows have god knows how many rows with foreign keys pointing to them, so it would be complicated to restore by hand. Ideally I'd be able to tell the backup copy of the database to select the dozen rows I need, and the transitive closure of everything that they depend on, and everything that depends on them, and export just that data, which I can then import into the live database without touching anything else. What's the best approach to take here? Thanks. Everyone has mentioned sp_generate_inserts. When using this, how do you prevent Identity columns from messing everything up? Do you just turn IDENTITY INSERT on?

    Read the article

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