Search Results

Search found 488 results on 20 pages for 'luke stanley'.

Page 17/20 | < Previous Page | 13 14 15 16 17 18 19 20  | Next Page >

  • Deleting object in NSMutableSet Core Data

    - by Luke
    Hi I am having trouble deleting an object in an NSMutableSet using core Data... I am trying to delete a "player" object in the second section of my tableview. I am getting the error Invalid update: invalid number of rows in section 1. The number of rows contained in an existing section after the update (6) must be equal to the number of rows contained in that section before the update (6), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out Take a look at my code. - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { if (indexPath.section==0){ }else{ Player *p = [self.fetchedResultsController.fetchedObjects objectAtIndex: indexPath.section]; [_team removePlayersObject:p]; [_team.players removeObject:p]; AppDelegate *delegate = [[UIApplication sharedApplication] delegate]; _managedObjectContext = delegate.managedObjectContext; [_managedObjectContext deleteObject:p]; [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationTop]; } } } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { switch(section){ case 0: return 7; case 1: return [self.fetchedResultsController.fetchedObjects count]; } return 0; }

    Read the article

  • NSTableView doesn't populate with array objects until a new object is added via the controller

    - by Luke
    I have an NSTableView and an array controller set up as shown here, using cocoa bindings: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/TableView/PopulatingViewTablesWithBindings/PopulatingView-TablesWithBindings.html#//apple_ref/doc/uid/10000026i-CH13-SW3 In my app delegate during applicationDidFinishLaunching I have the following snippet in here, initialising the array and filling it with objects array = [[NSMutableArray alloc] init]; SomeObject* foo = [[Object alloc] init]; foo.text = @"sup"; [array addObject:foo]; //Repeat this a few times However, when I build the app and run it I end up with an empty table. However, if I bind a button to the array controller's add: input and click it during runtime (this adds a new object to the array and table) then the table will show the new object first, with the objects added during applicationDidFinishLaunching following it. Why does this happen? And is there a way to make my table populate without having to add an element first?

    Read the article

  • Looping through with dates

    - by Luke
    I have created a fixture generator for football/ soccer games... $totalRounds = $teams - 1; $matchesPerRound = $teams / 2; $rounds = array(); $roundDates = array(); $curTime = time(); for ($i = 1; $i <= $totalRounds; $i++) { $rounds[$i] = array(); $numDays = $i * 4; $roundDates[$i] = strtotime("+".$numDays." days",$curTime); } foreach($roundDates as $time) { for ($round = 0; $round < $totalRounds; $round++) { for ($match = 0; $match < $matchesPerRound; $match++) { $home = ($round + $match) % ($teams - 1); $away = ($teams - 1 - $match + $round) % ($teams - 1); // Last team stays in the same place while the others // rotate around it. if ($match == 0) { $away = $teams - 1; } $rounds[$round][$match] = "$user[$home]~$team[$home]@$user[$away]~$team[$away]~$time"; } } } In the code, for $i = 1, i thought that if you want the first date 4 days from now, the i must be 1, so 1 * 4 = 4. If i was 0, 0 * 4 equals 0. I assume this is correct thinking? Anyway the main question is, trying to generate the dates isn't working. When i created a fixture list for 4 users home and away, I got 12 fixtures. 10 of these had the same date on them, and the other 2 didnt have a date. Can anyone help me with this? Thanks

    Read the article

  • fire jquery .animate oninput only once

    - by luke
    http://jsfiddle.net/nFFuD/ I'm trying to animate the search field in this example using jquery, making it move to the top of it's containing div oninput. I was originally using scriptaculous effect.move to do this, but I couldn't make the event only fire once, so if someone kept typing after the first keystroke, the effect would stop and start again from it's current position in the animation for each additional keystroke, which is stupid. I'm new to new to using jquery so please, take it easy if I'm not making very much sense.

    Read the article

  • How do I replace "this" in Java with something that works.

    - by Luke Alderton
    I'm looking to get the showGUI() method work, the compiler says "this" is not a static variable and cannot be referenced from a static context, what would I use to replace "this"? I've tried test.main (test being the package it's in). The reason I'm using the static method showGUI() is because I need the method to be called from another static method, as well as the startup() method. Below are my two main classes. public class Main extends SingleFrameApplication { @Override protected void startup() { showGUI(); } @Override protected void configureWindow(java.awt.Window root) { } public static Main getApplication() { return Application.getInstance(Main.class); } public static void main(String[] args) { launch(Main.class, args); } public static void showGUI() { show(new GUI(this)); } } public class GUI extends FrameView { public GUI(SingleFrameApplication app) { super(app); initComponents(); } private void initComponents() { //all the GUI stuff is somehow defined here } }

    Read the article

  • Syntax problem when checking for a file

    - by Luke
    This piece of code has previously worked but I have C&P it to a new place and for some reason, it now won't work! <? $user_image = '/images/users/' . $_SESSION['id'] . 'a.jpg'; if (file_exists(realpath(dirname(__FILE__) . $user_image))) { echo '<img src="'.$user_image.'" alt="" />'; } else { echo '<img src="/images/users/small.jpg" alt="" />'; } ?> As you can see, I am checking for a file, if exists, showing it, if not, showing a placeholder. The $_SESSION['id'] variable does exist and is being used elsewhere within the script. Any ideas what the problem is? Thanks

    Read the article

  • Zend Framework 2 without MVC

    - by Luke
    I'm currently using Zend Framework 2 for all my web tier development using the MVC module that's shipped with the framework. However, I want to implement my business logic in a separate layer, call it the business tier which is a non HTTP layer and expose it through AMQP, and I'd like to reuse my knowledge of PHP for implementing this. Since there is a lot of "stuff" that I need in this business layer such as configuration, a service manager, database access, etc, etc, I'd like to use all the goodies shipped with Zend Framework 2 for this. Are there any examples or tutorials out there on how to build a Zend Framework 2 application that is not build for the web tier and doesn't require the MVC module?

    Read the article

  • mysql fetch error

    - by Luke
    <? $res = $database->userLatestStatus($u); while($row=mysql_fetch_assoc($res)){ $status=$row['status']; echo "$status"; } ?> This is the code on my page, which is throwing up the following error: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource.... The database function: function userLatestStatus($u) { $q = "SELECT status FROM ".TBL_STATUS." WHERE userid = '$u' DESC LIMIT 1"; return mysql_query($q, $this->connection); } Any ideas what the problem is?

    Read the article

  • What is a .NET application domain?

    - by Luke
    In particular, what are the implications of running code in two different application domains? How is data normally passed across the application domain boundary? Is it the same as passing data across the process boundary? I'm curious to know more about this abstraction and what it is useful for. EDIT: Good existing coverage of the AppDomain class in general at http://stackoverflow.com/questions/622516/i-dont-understand-appdomains

    Read the article

  • Use AJAX to check for a new message

    - by Luke
    Quite simply, I need to alert the end user when they have a new private message. From a combination of research and other opinion, I realise I need to use AJAX for this. The mysql query would be SELECT id FROM tbl_messages WHERE to_viewed = 1 So when someone sends a message, I want an alert to popup on the screen to inform the user without a page reload. I have absolutely no idea what I am doing, but know what I want. Really need help with this, AJAX is definitely something I want to improve as it opens up greater possibilities! Thanks

    Read the article

  • Redirecting to a new site unless in a specified directory

    - by Luke Strickland
    Hello. I run an image hosting site. Lets just go with the following information. Site: imagehosting.com Tiny: imgho.st Directory: n/ Directory is where the images are stored. Anyways. I'm trying to figure out an apache rewrite method to redirect imgho.st to imagehosting.com UNLESS in the n/ directory. So unless the user is imgho.st/n/83md.png redirect to imagehosting.com. Could anybody help me out with this? Thanks!

    Read the article

  • Second query to SQLite (on iPhone) errors.

    - by Luke
    Hi all, On the iPhone, I am developing a class for a cart that connects directly to a database. To view the cart, all items can be pulled from the database, however, it seems that removing them doesn't work. It is surprising to me because the error occurs during connection to the database, except not the second time I connect even after the DB has been closed. #import "CartDB.h" #import "CartItem.h" @implementation CartDB @synthesize database, databasePath; - (NSMutableArray *) getAllItems { NSMutableArray *items = [[NSMutableArray alloc] init]; if([self openDatabase]) { const char *sqlStatement = "SELECT * FROM items;"; sqlite3_stmt *compiledStatement; if(sqlite3_prepare_v2(cartDatabase, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) { while(sqlite3_step(compiledStatement) == SQLITE_ROW) { int rowId = sqlite3_column_int(compiledStatement, 0); int productId = sqlite3_column_int(compiledStatement, 1); NSString *features = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 2)]; int quantity = sqlite3_column_int(compiledStatement, 3); CartItem *cartItem = [[CartItem alloc] initWithRowId:rowId productId:productId features:features quantity:quantity]; [items addObject:cartItem]; [cartItem release]; } } sqlite3_finalize(compiledStatement); } [self closeDatabase]; return items; } - (BOOL) removeCartItem:(CartItem *)item { sqlite3_stmt *deleteStatement; [self openDatabase]; const char *sql = "DELETE FROM items WHERE id = ?"; if(sqlite3_prepare_v2(cartDatabase, sql, -1, &deleteStatement, NULL) != SQLITE_OK) { return NO; } sqlite3_bind_int(deleteStatement, 1, item.rowId); if(SQLITE_DONE != sqlite3_step(deleteStatement)) { sqlite3_reset(deleteStatement); [self closeDatabase]; return NO; } else { sqlite3_reset(deleteStatement); [self closeDatabase]; return YES; } } - (BOOL) openDatabase { if(sqlite3_open([databasePath UTF8String], &cartDatabase) == SQLITE_OK) { return YES; } else { return NO; } } - (void) closeDatabase { sqlite3_close(cartDatabase); } The error occurs on the line where the connection is opened in openDatabase. Any ideas? Need to flush something? Something gets autoreleased? I really can't figure it out. --Edit-- The error that I receive is GDB: Program received signal "EXC_BAD_ACCESS". --Edit-- I ended up just connecting in the init and closing in the free methods, which might not be the proper way, but that's another question altogether so it's effectively persistent instead of connecting multiple times. Still would be nice to know what was up with this for future reference.

    Read the article

  • What does it mean when you try to print an array or hash using Perl and you get, Array(0xd3888)?

    - by Luke
    What does it mean when you try to print an array or hash and you see the following; Array(0xd3888) or HASH(0xd3978)? EXAMPLE CODE my @data = ( ['1_TEST','1_T','1_TESTER'], ['2_TEST','2_T','2_TESTER'], ['3_TEST','3_T','3_TESTER'], ['4_TEST','4_T','4_TESTER'], ['5_TEST','5_T','5_TESTER'], ['6_TEST','6_T','^_TESTER'] ); foreach my $line (@data) { chomp($line); @random = split(/\|/,$line); print "".$random[0]."".$random[1]."".$random[2]."","\n"; } RESULT ARRAY(0xc1864) ARRAY(0xd384c) ARRAY(0xd3894) ARRAY(0xd38d0) ARRAY(0xd390c) ARRAY(0xd3948)

    Read the article

  • Four Easy Ways to Save a Rocky CRM Relationship

    - by Divya Malik
     Today, I am pleased to introduce our guest blogger Luke Christianson. Luke is  an Application Sales rep based out of Minneapolis, MN.  You can find him on LinkedIn and follow him on Twitter. In any relationship, sooner or later, the excitement fades away.  The honeymoon period gives way to the old routines you had, before you committed to each other and you eventually begin doing things apart from one another.  I’m not talking about a marriage…  Well, I guess I am.Commitment to a CRM tool and building a deep and lasting relationship is not much different than the basics of a traditional love story.  After your controlled CRM pilot program, and maybe the National Sales Meeting where you couldn’t escape those three wonderful letters, CRM, you will soon find that if you haven’t designed an environment where it’s going to enable your reps to make more money, the relationship is doomed.   . If you’re currently in a dysfunctional CRM relationship, here are 4 simple tips to re-engaging users and getting that spark back. Shadow a Sales Rep:   Chances are you can find out exactly what is preventing your sales reps from using the application by simply watching how they go about their day.  Sales reps are driven by money, not by additional administrative duties.  Your system needs to be setup so that they can get the information they need quickly, facilitate making key updates and run their business out of one easy-to-use application.  Increase your sales team’s productivity by 5% automatically:    Cancel the weekly forecast calls with your reps and require them update their opportunities in CRM.  Something else that I’ve seen work extremely well, is when you do Monthly or Quarterly reviews, do not let your sales reps bring anything into the room with them; no spreadsheets, notebooks, or computers.  Everything they need to tell you should be able to be put into CRM and fully accessible by the Sales Manager at any time.  Tool time:      Make sure the tools that you have selected meet both your short-term goals and your long term goals.   You need tools that can adapt like your business does.  You probably can’t wait two months for an update to a picklist value or for the addition of a simple workflow rule.  Do you feel the tools that are in place can create the experience you want for your users? and finally, if all else fails... Keep It Simple, Stupid:     Do you really need to require 15 fields to create an Opportunity?  Do you need to clutter the interface with different reports that don’t add daily value?  Most CRM systems on the market today are flexible enough today that your admin could clean up most of the unnecessary interface ‘noise’ in a few hours.  If they're not, see #3. Every strong relationship can be tedious at times, you’ll fight and eventually make amends, you may even threaten to upgrade to a newer model…  But be patient and think about what you want to achieve and you’ll find a partner for life.

    Read the article

  • use awk to identify multi-line record and filtering

    - by nanshi
    I need to process a big data file that contains multi-line records, example input: 1 Name Dan 1 Title Professor 1 Address aaa street 1 City xxx city 1 State yyy 1 Phone 123-456-7890 2 Name Luke 2 Title Professor 2 Address bbb street 2 City xxx city 3 Name Tom 3 Title Associate Professor 3 Like Golf 4 Name 4 Title Trainer 4 Likes Running Note that the first integer field is unique and really identifies a whole record. So in the above input I really have 4 records although I dont know how many lines of attributes each records may have. I need to: - identify valid record (must have "Name" and "Title" field) - output the available attributes for each valid record, say "Name", "Title", "Address" are needed fields. Example output: 1 Name Dan 1 Title Professor 1 Address aaa street 2 Name Luke 2 Title Professor 2 Address bbb street 3 Name Tom 3 Title Associate Professor So in the output file, record 4 is removed since it doen't have the "Name" field. Record 3 doesn't have Address field but still being print to the output since it is a valid record that has "Name" and "Title". Can I do this with awk? But how do i identify a whole record using the first "id" field on each line? Thanks a lot to the unix shell script expert for helping me out! :)

    Read the article

  • IOUC Summit: Open Arms and Cheese Shoes

    - by Justin Kestelyn
    Last week's International Oracle User Group Committee (IOUC) Summit at Oracle HQ was a high point of the past year, for a number of reasons: A "quorum" of Java User Group leaders, several Java Champions among them, were in attendance (Bert Breeman, Stephan Janssen, Dan Sline, Stephen Chin, Bruno Souza, Van Riper, and others), and it was great to get face time with them. Their guidance and advice about JavaOne and other things are always much appreciated. Mix in some Oracle ACE Directors (Debra Lilley, Dan Morgan, Sten Vesterli, and others), and you really have the making of a dynamic group. Stephan describes it best: "We (the JUG Leaders) discovered that behind the more formal dress code the ACE directors are actually as crazy as we are." (See link below for more.) Thanks to Bert's (NLJug) kindness, I am now the proud owner of a bonafide, straight-from-the-NL cheese shoe. How the heck did he get this through security? I suggest that you also read more robust reports from Stephan, Arun Gupta, and of course "Team Stanley."

    Read the article

  • Quels points prendre en compte avant de se lancer vers la mobilité ? Le CMS ASP.NET DotNetNuke répond dans un livre blanc

    Découvrez les six points à prendre en compte avant de se lancer vers la mobilité selon DotNetNuke, dans un livre blanc publié par le CMS ASP.NET Le secteur du mobile a le vent en poupe. D'ici 2014, le nombre de pages affichées par les personnes utilisant les terminaux mobiles sera plus élevé que le nombre de visites effectuées depuis les ordinateurs de bureau et portables, selon une estimation de Morgan Stanley Research. Les entreprises pour maintenir leur présence sur Internet doivent donc songer à fournir dès à présent un accès rationalisé et facile à l'information pour les clients qui utilisent les smartphones et les tablettes. Comment préparer sa présence sur le mobile...

    Read the article

  • To be or not to be: a solutions architech [closed]

    - by jQwierdy
    short version: as a student taking a summer internship, whats more useful for later in my career, taking a job as a solutions Architect, or a software engineer? Long version: I'm a CS major in my 3rd year, I've interviewed with some of the big companies and did not get job offers year (Morgan Stanley, Microsoft, FacebooK) but did receive offers from a startup. I actually got two offers from the same start up. I really like the startup and despite the (much) lower wage at it compared to a bigger company, I could do solutions architecture. Solutions architects (I think) work more on figuring out high level solutions directly for clients, so I'd be working often with a sales team and developers. Everyone knows what (generally) a software engineer does. And so my question is this: for my career, what would be more beneficial to a) know how to do, and b) have on my resume.

    Read the article

  • Quels points prendre en compte avant de se lancer vers la mobilité ? Réponse dans un livre blanc par les développeurs du CMS DotNetNuke

    Découvrez les six points à prendre en compte avant de se lancer vers la mobilité selon DotNetNuke, dans un livre blanc publié par le CMS ASP.NET Le secteur du mobile a le vent en poupe. D'ici 2014, le nombre de pages affichées par les personnes utilisant les terminaux mobiles sera plus élevé que le nombre de visites effectuées depuis les ordinateurs de bureau et portables, selon une estimation de Morgan Stanley Research. Les entreprises pour maintenir leur présence sur Internet doivent donc songer à fournir dès à présent un accès rationalisé et facile à l'information pour les clients qui utilisent les smartphones et les tablettes. Comment préparer sa présence sur le mobile...

    Read the article

  • Getting more from an electricity monitor

    - by beakersoft
    Hi, I've recently got a free smart power electric energy monitor from my electric provider (npower, in the UK). While it is quite good i would like to pull the information from the monitor onto my home server, so i can get more detailed information and maybe graph it using mrtg or similar. Has anyone every tinkered about with them, how do the monitor and the display talk to each other (bluetooth/wifi) and any other info people might have. cheers Luke

    Read the article

  • Squid Log Rotation and Sarg

    - by beakersoft
    We have just setup squid as our proxy, and i was going to use Sarg to analyze the log files. I had initially set the Squid logs to rotate everyday so they dont get huge. The problem is i cant see an option in the squid config to read a folder full of squid log files (say *.log). Is there an easy way to do this or am i going to have to write a bash script or something to process them all into one before i get squid to read it? Cheers Luke

    Read the article

  • Applications Deployment with MDT

    - by beakersoft
    I have added a install for Silver light to my MDT server, so it can get installed when the image gets deployed. When I boot them machines it is asking me to install the applications, how can i get it to auto install the apps without prompting. I have added this line to the rules - I thought that would but seems to make no difference. I'm sure i must have missed something somewhere? Cheers Luke

    Read the article

  • Squid on Linux Windows Pass through authentication

    - by beakersoft
    We are setting up a new proxy based on squid on an ubuntu server, and would like to have pass through authentication work for the Windows/Internet Explorer client. We have put the line into the squid.conf for squid_ldap_auth, but this prompts for a username and password in internet explorer. It does work ok once the user puts it in. Whats the 'best' (standard) way of using pass through authentication? Cheers Luke

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20  | Next Page >