Search Results

Search found 640 results on 26 pages for 'apophenia overload'.

Page 11/26 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Overloading framework methods in objective-c, or retaining local changes with framework updates.

    - by Jeff B
    I am using cocos2d to build an iPhone game. It's mostly done, but along the way I came across some things that I would like to handle better. I am fairly new to Objective C, and honestly I do more Perl scripting in my day-to-day job than anything, so my C skills are a little rusty. One of them is the fact that I have modified cocos2d files for some specific cases in my game. However, when I update to a new version, I have to manually pull my changes forward. So, the question is, what is the best way to deal with this? Some options I have thought of: Overload/redefine the cocos2d classes. I was under the impression that I cannot overload existing class functions, so I don't think this will work. Create patches that I re-apply after library updates. I don't think this will work as the new files won't necessarily be the same as the old ones, and if they were, I could just copy the whole file forward. Turn in my changes to Cocos2d. Not an option as my changes are very specific to my application. Am I missing something obvious? UPDATE: I will explain what I am doing to be more clear. Cocos2d has a CCNode object, which can contain children, etc. I added a shadow, which is very similar to a child, but handled a little differently. The shadow has an offset from the parent, and translates with it's parent, rotates around it's own center when the parent rotates, etc. The shadow is not included as a true child, however, so given the correct z-index, the shadows can render under ALL other objects, but still move with the parent. To do this I added addShadow functions to CCNode, and modified the setPosition and setRotate functions to move the shadowSprite: CCNode.m: -(id) init { if ((self=[super init]) ) { ... shadowSprite_ = nil; ... } } ... -(BOOL) addShadow: (CCNode*) child offset: (CGPoint) offset { shadowSprite_ = child; shadowSprite_.position = CGPointMake(position_.x+offset.x, position_.y+offset.y); return YES; } ... -(void) setRotation: (float)newRotation { rotation_ = newRotation; isTransformDirty_ = isInverseDirty_ = YES; if(shadowSprite_) { [shadowSprite_ setRotation: newRotation]; } } There is more, of course, including the prototypes in the .h file, but that is the basics. I don't think I need shadowSprite to be a property, because I don't need to access it after it has been added.

    Read the article

  • Recommended way to perform Lucene search without limit

    - by Thomas
    The Lucene documents tell me that "Hits" will be removed from the API in Lucene 3.0. Deprecated. Hits will be removed in Lucene 3.0. Use search(Query, Filter, int) instead. The proposed overload limits the number of documents returned to the value of the int. So my question is: what is the recommended way to perform a search in Lucene with no limit on the number of documents to be returned?

    Read the article

  • How do you make cin typesafe?

    - by cactusbin
    It is well known that cin is not typesafe (e.g. cin integer; and entering "fifty five" will cause it to flip out). I have seen many not-so-elegant ways to hand this, such as getlining a string and using sstream to convert it to a number, or looping with cin.fail() and clearing the stream and reentering it, etc. Is there any library or anyway to overload the inserter operator to make cin automatically typesafe?

    Read the article

  • c# eventhandling error

    - by bragin.www
    i have method private void getValues(object sender, EventArgs e) { int id = int.Parse(dgvTable.Rows[dgvTable.CurrentRow.Index].Cells[0].Value.ToString()); var values = from c in v.db.TotalDoc where c.TotalID == id select c.TotalAmount; dgvValues.DataSource = values; } and datagridview "dgvTable" error at this line dgvTable.CellClick += new EventHadler(getValues); error text is: No overload for 'getValues' matches delegate 'System.EventHandler' please help!

    Read the article

  • How to avoid fast rate page refresh in ASP.NET ?

    - by eugeneK
    I have a page that shows statistics for users, this cannot be cached because each user has different statistics and there are many thus the real time query must be made. What the way to avoid database server overload when user will click F5's to refresh or to ask different queries in short time intervals ?

    Read the article

  • FormsAuthentication, can I create a custom cookie?

    - by Blankman
    When the browser closes, I want the session to end = logged out. The FormAuthenticationTicket class doesnt' have a overload that is suitable for me. I don't want to set the expires property, so when the user closes the browser it logs him out. But I need: version, Name, UserData So I guess I have to create my own cookie? is there a way to create a custom cookie, but still uses forms authentication to encrypt and decrypt things?

    Read the article

  • Problem in converting ToDictionary<Datetime,double>() using LINQ(C#3.0)

    - by Newbie
    I have written the below return (from p in returnObject.Portfolios.ToList() from childData in p.ChildData.ToList() from retuns in p.Returns.ToList() select new Dictionary<DateTime, double> () { p.EndDate, retuns.Value } ).ToDictionary<DateTime,double>(); Getting error No overload for method 'Add' takes '1' arguments Where I am making the mistake I am using C#3.0 Thanks

    Read the article

  • Enterprise Library--Validator.cs How Abstract Class having definition??

    - by Soham
    Consider this piece of code: public abstract class Validator { protected Validator() { } protected abstract void ValidateCore(object instance, string value, IList<ValidationResult> results); public void Validate(object instance, string value, IList<ValidationResult> results) { if (null == instance) throw new ArgumentNullException("instance"); if (null == results) throw new ArgumentNullException("results"); ValidateCore(instance, value, results); } } TAKE a look at Validate() overload, how can an abstract class have definitions like this?

    Read the article

  • Operator overloading in C++

    - by user265260
    If you overload - like operator-(), it is to be used to the left of the object, however overloading () like operator()() it is used to the right of the object. How do we know which operator is to be used on the left and which ones to be used on the right?

    Read the article

  • How can an object not be compared to null?

    - by ProfK
    I have an 'optional' parameter on a method that is a KeyValuePair. I wanted an overload that passes null to the core method for this parameter, but in the core method, when I want to check if the KeyValuePair is null, I get the following error: Operator '!=' cannot be applied to operands of type System.Collections.Generic.KeyValuePair<string,object>' and '<null>. How can I not be allowed to check if an object is null?

    Read the article

  • Silverlight - round doubles away from zero

    - by Cornel
    In Silverlight the Math.Round() method does not contain an overload with 'MidpointRounding' parameter. What is the best approach to round a double away from zero in Silverlight in this case? Example: Math.Round(1.4) = 1 Math.Round(1.5) = 2 Math.Round(1.6) = 2

    Read the article

  • Overloading + to add two pointers

    - by iAdam
    I have a String class and I want to overload + to add two String* pointers. something like this doesn't work: String* operator+(String* s1, String* s2); Is there any way to avoid passing by reference. Consider this example: String* s1 = new String("Hello"); String* s2 = new String("World"); String* s3 = s1 + s2; I need this kind of addition to work. Please suggest.

    Read the article

  • Rvalues in C++03

    - by DeadMG
    How can you tell whether or not a given parameter is an rvalue in C++03? I'm writing some very generic code and am in need of taking a reference if possible, or constructing a new object otherwise. Can I overload to take by-value as well as by-reference and have the rvalue returns call the by-value function? Or do I have a very sickening feeling that this is why rvalue references are in C++0x?

    Read the article

  • Automatically download files in Ruby

    - by Obinna
    I'm trying to write a ruby script which automatically downloads some files from some server ever 30-45 minutes (to prevent overload) as long as my computer is turned on. It's possible that my computer might be turned off at some point, but the download should resume (probably re-download the current file). I already have the file list but I can't figure out how to make such a script to run autonomously. What are some ways I can do this?

    Read the article

  • How do I specify attributes for a Html.TextBox helper while maintaing the value retreival from ViewD

    - by BigJoe714
    I am using the Html.TextBox helper to create textboxes. I want to set attributes on the textbox, which I understand is done using the following overload: Html.TextBox (string name, object value, object htmlAttributes) However, I want to maintain the functionality where the html helper automatically uses the value from either ViewData or ViewData.Model and I do not see a way to just specify the name and the htmlAttributes. Is this possible?

    Read the article

  • Problem in converting ToDictionary<Datetime,double>() usinh LINQ(C#3.0)

    - by Newbie
    I have written the below return (from p in returnObject.Portfolios.ToList() from childData in p.ChildData.ToList() from retuns in p.Returns.ToList() select new Dictionary<DateTime, double> () {p.EndDate, retuns.Value }).ToDictionary<DateTime,double>(); Getting error No overload for method 'Add' takes '1' arguments Where I am making the mistake I am using C#3.0 Thanks

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >