Search Results

Search found 3484 results on 140 pages for 'chris dubois'.

Page 103/140 | < Previous Page | 99 100 101 102 103 104 105 106 107 108 109 110  | Next Page >

  • What is the '^' in Objective-C

    - by Chris Paterson
    What does the '^' mean in the code below? @implementation AppController - (IBAction) loadComposition:(id)sender { void (^handler)(NSInteger); NSOpenPanel *panel = [NSOpenPanel openPanel]; [panel setAllowedFileTypes:[NSArray arrayWithObjects: @"qtz", nil]]; handler = ^(NSInteger result) { if (result == NSFileHandlingPanelOKButton) { NSString *filePath = [[[panel URLs] objectAtIndex:0] path]; if (![qcView loadCompositionFromFile:filePath]) { NSLog(@"Could not load composition"); } } }; [panel beginSheetModalForWindow:qcWindow completionHandler:handler]; } @end === I've searched and searched - is it some sort of particular reference to memory?

    Read the article

  • Changing output of Forms with Struts+Freemarker

    - by Chris
    I'm working on a Website with Struts2 and Freemarker. Whenever I add form tags such as: <@s.form action="foo" <@s.combobox (...)/ It generates a bunch of html/css/javascript that I don't need. Is there any way I can specify that no extra elements should be generated or do I really need to go into Freemarker.jar and edit the templates to my liking?

    Read the article

  • Modify onclick function with jQuery

    - by Chris Barr
    I've got a button that has an onclick event in it, which was set on the back end from .NET. Beside it is a checkbox <button class="img_button" onclick="if(buttonLoader(this)){WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions('uxBtnRelease', '', true, '', 'somepage.aspx?oupid=5&fp=true', false, true))} return false;" type="button">Release</button> <input type="checkbox" checked="checked" id="myCheckbox"> When the checkbox is clicked, needs to change the value of the query string in the URL inside the onclick function of the button. So far I have this, and the idea is right, but I keep getting errors when it's run: "Uncaught SyntaxError: Unexpected token ILLEGAL" var defaultReleaseOnClick=null; $("#myCheckbox").click(function(){ var $releaseBtn = $(".img_button"); if(defaultReleaseOnClick==null) defaultReleaseOnClick=$releaseBtn.attr("onclick"); var newOnClickString = defaultReleaseOnClick.toString().replace(/&fp=[a-z]+'/i,"&fp="+this.checked); $releaseBtn.removeAttr("onclick").click(eval(newOnClickString)); }); I know it seems kinda hacky to convert the function to a string, do a replacement, and then try to convert it back to a function, but I don't know any other way to do it. Any ideas? I've set up a demo here: http://jsbin.com/asiwu4/edit

    Read the article

  • Learning HTML - What is the BEST ONLINE RESOURCE?

    - by Chris Jacob
    The Goal: Use votes to rank nominated sites. The first answer to reach 100+ votes will be accepted. Please answer following these 5 simple rules: ONE SITE per answer. Link to each page if nominating a "series" of resources on a SITE. No "offline" books. Only online resources (tutorials, API references, blogs, screencasts, etc). Don't add "subjective" details/notes in your answer. Add them as a comment to the answer. Don't post duplicates. If your favourite is already listed Up Vote It! Example Answer: Site Name http://www.example.com Example Answer (site with a series of resources): Site Name http://www.example.com Series Name A http://www.example.com/video/a/1 http://www.example.com/video/a/2 Series Name B http://www.example.com/video/b/1

    Read the article

  • google collections ordering on map values

    - by chris-gr
    I would like to order a map based on the values. Function<Map.Entry<A, Double>, Double> getSimFunction = new Function<Map.Entry<A, Double>, Double>() { public Double apply(Map.Entry<A, Double> entry) { return entry.getValue(); } }; final Ordering<Map.Entry<A, Double>> entryOrdering = Ordering.natural().onResultOf(getSimFunction); ImmutableSortedMap.orderedBy(entryOrdering).putAll(....).build(); How can I create a new sortedMap based on the ordering results or a sortedset based on the map.keyset()?

    Read the article

  • where can I find a good ruby excel parser that also had good documentation?

    - by Chris Drappier
    Hi All, I've spent some time today looking for a pure ruby library that will parse an excel workbook. I could find the parseexcel gem in the repos, but the problem is that I can't find any documentation on it. and the rdoc is pitiful. so, my question is 1) is there good documentation out there for this gem? 2) if not, is there another gem that does the same thing that has good documentation? thx :) -C

    Read the article

  • If free() knows the length of my array, why can't I ask for it in my own code?

    - by Chris Cooper
    I know that it's a common convention to pass the length of dynamically allocated arrays to functions that manipulate them: void initializeAndFree(int* anArray, int length); int main(){ int arrayLength = 0; scanf("%d", &arrayLength); int* myArray = (int*)malloc(sizeof(int)*arrayLength); initializeAndFree(myArray, arrayLength); } void initializeAndFree(int* anArray, int length){ int i = 0; for (i = 0; i < length; i++) { anArray[i] = 0; } free(anArray); } but if there's no way for me to get the length of the allocated memory from a pointer, how does free() "automagically" know what to deallocate? Why can't I get in on the magic, as a C programmer? Where does free() get its free (har-har) knowledge from?

    Read the article

  • How can I copy an XmlNode from one XmlDocument to another?

    - by Chris Wenham
    I'm building a tool that authors/edits XML files, and I want to be able to populate it with template fragments defined in another XML file. For example, the tool has an "Add FooBarBaz Element" button that adds a element to the new document being created, and I want to add FooBarBaz by copying it from a template. Or let's say this is my template file: <Templates> <FooBarBaz Attribute="Value"> <ChildElement/> </FooBarBaz> </Templates> I can then grab a template fragment with .GetElementsByTagName("FooBarBaz"), and I'd like to be able to inject it into the new document with something like .AppendChild(templateNode). But the problem is that an XmlNode cannot be copied from one XmlDocument to another, even if you use .Clone() or .CloneNode(), because AppendChild() throws an exception saying that the template element belongs to another context. Is there an easy way to copy a System.Xml.XmlNode between System.Xml.XmlDocuments?

    Read the article

  • CoreData is saving model without the save: method being called

    - by chris
    I have a list of items with a plus button in the navigation bar that opens up a modal window containing a table of the models attributes, that displays a form when the table items are clicked (pretty standard form style). For some reason if I click the plus button to open the form to create a new model, then immediately click the done button, the person model is saved. The action linked to the done button does nothing but call on a delegate method notifying the personListViewController to close the window. The apple docs do state that the model is not saved after calling the insertNewObjectForEntityName: ... Simply creating a managed object does not cause it to be saved to a persistent store. The managed object context acts as a scratchpad. I am at a lost to why this is happening, but every time I click the done button I have a new blank item in the original tableView. I am using SDK v3.1.3 // PersonListViewController - open modal window - (void)addPerson { // Load the new form PersonNewViewController *newController = [[PersonNewViewController alloc] init]; newController.modalFormDelegate = self; [self presentModalViewController:newController animated:YES]; [newController release]; } // PersonFormViewController - (void)viewDidLoad { [super viewDidLoad]; if ( person == nil ) { MyAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; self.person = [NSEntityDescription insertNewObjectForEntityForName:@"Person" inManagedObjectContext:appDelegate.managedObjectContext]; } ... UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(done)]; self.navigationItem.rightBarButtonItem = doneButton; [doneButton release]; } - (IBAction) done { [self.modalFormDelegate didCancel]; } // delegate method in the original listViewController - (void) didCancel { [self dismissModalViewControllerAnimated:YES]; }

    Read the article

  • PHP Using session variables in array(s)

    - by Chris
    Hello, My question is how do i put these session variables into a array? I have tried countless ways but none of them work. Not really sure what to put in a array and what no and how to adress them. Currently when i fill in the form the data gets displayed in a table. Next when i press the hyperlink that takes me back to the same form, i wish to enter data again. This data should be added in a new row in the same display table. Best Regards. The code below (pardon me that it is not english). <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>ExpoFormulier</title> <body> <?php if (!empty($_POST)) { $standnaam = $_POST["standnaam"]; $oppervlakte = $_POST["oppervlakte"]; //value in the form van checkboxes op 1 zetten! $verdieping = isset($_POST["verdieping"]) ? $_POST["verdieping"] : 0; $telefoon = isset($_POST["telefoon"]) ? $_POST["telefoon"] : 0; $netwerk = isset($_POST["netwerk"]) ? $_POST["netwerk"] : 0; if (is_numeric($oppervlakte)) { $_SESSION["standnaam"]=$standnaam; $_SESSION["oppervlakte"]=$oppervlakte; $_SESSION["verdieping"]=$verdieping; $_SESSION["telefoon"]=$telefoon; $_SESSION["netwerk"]=$netwerk; header("Location:ExpoOverzicht.php"); } else { echo "<h1>Foute gegevens, Opnieuw invullen a.u.b</h1>"; } } ?> <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" id="form1"> <h1>Vul de gegevens in</h1> <table> <tr> <td>Standnaam:</td> <td><input type="text" name="standnaam" size="18"/></td> </tr> <tr> <td>Oppervlakte (in m^2):</td> <td><input type="text" name="oppervlakte" size="6"/></td> </tr> <tr> <td>Verdieping:</td> <td><input type="checkbox" name="verdieping" value="1"/></td> </tr> <tr> <td>Telefoon:</td> <td><input type="checkbox" name="telefoon" value="1"/></td> </tr> <tr> <td>Netwerk:</td> <td><input type="checkbox" name="netwerk" value="1"/></td> </tr> <tr> <td><input type="submit" name="verzenden" value="Verzenden"/></td> </tr> </table> </form> Second File: <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>ExpoOverzicht</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link href="StyleSheetExpo.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>Overzicht van de ingegeven standen in deze sessie</h1> <?php $standnaam = $_SESSION["standnaam"]; $oppervlakte = $_SESSION["oppervlakte"]; $verdieping = $_SESSION["verdieping"]; $telefoon = $_SESSION["telefoon"]; $netwerk = $_SESSION["netwerk"]; $result1 = 0; $result2 = 0; $result3 = 0; $prijsCom = 0; $prijsVerdieping = 0; for ($i=1; $i <= $oppervlakte; $i++) { if($i <= 10) { $tarief1 = 1 * 100; $result1 += $tarief1; } if($i > 10 && $i <= 30) { $tarief2 = 1 * 90; $result2 += $tarief2; } if($i > 30) { $tarief3 = 1 * 80; $result3 += $tarief3; } } $prijsOpp = $result1 + $result2 + $result3; if($verdieping == 1) { $prijsVerdieping = $oppervlakte * 120; } if(($telefoon == 1) || ($netwerk == 1)) { $prijsCom = 20; } if(($telefoon == 1) && ($netwerk == 1)) { $prijsCom = 30; } $totalePrijs = $prijsOpp + $prijsVerdieping + $prijsCom; echo "<table class=\"tableExpo\">"; echo "<th>Standnaam</th>"; echo "<th>Oppervlakte</th>"; echo "<th>Verdieping</th>"; echo "<th>Telefoon</th>"; echo "<th>Netwerk</th>"; echo "<th>Totale prijs</th>"; echo "<tr>"; echo "<td>".$standnaam."</td>"; echo "<td>".$oppervlakte."</td>"; echo "<td>".$verdieping."</td>"; echo "<td>".$telefoon."</td>"; echo "<td>".$netwerk."</td>"; echo "<td>".$totalePrijs."</td>"; echo "</tr>"; echo "</table>"; ?> <a href="ExpoFormulier.php">Terug naar het formulier</a> </body> </html> </body> </html>

    Read the article

  • Open an Emacs buffer when a command tries to open an editor in shell-mode

    - by Chris Conway
    I like to use Emacs' shell mode, but it has a few deficiencies. One of those is that it's not smart enough to open a new buffer when a shell command tries to invoke an editor. For example with the environment variable VISUAL set to vim I get the following from svn propedit: $ svn propedit svn:externals . "svn-prop.tmp" 2L, 149C[1;1H ~ [4;1H~ [5;1H~ [6;1H~ [7;1H~ ... (It may be hard to tell from the representation, but it's a horrible, ugly mess.) With VISUAL set to "emacs -nw", I get $ svn propedit svn:externals . emacs: Terminal type "dumb" is not powerful enough to run Emacs. It lacks the ability to position the cursor. If that is not the actual type of terminal you have, use the Bourne shell command `TERM=... export TERM' (C-shell: `setenv TERM ...') to specify the correct type. It may be necessary to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.svn: system('emacs -nw svn-prop.tmp') returned 256 (It works with VISUAL set to just emacs, but only from inside an Emacs X window, not inside a terminal session.) Is there a way to get shell mode to do the right thing here and open up a new buffer on behalf of the command line process?

    Read the article

  • Interview Question: .Any() vs if (.Length > 0) for testing if a collection has elements

    - by Chris
    In a recent interview I was asked what the difference between .Any() and .Length > 0 was and why I would use either when testing to see if a collection had elements. This threw me a little as it seems a little obvious but feel I may be missing something. I suggested that you use .Length when you simply need to know that a collection has elements and .Any() when you wish to filter the results. Presumably .Any() takes a performance hit too as it has to do a loop / query internally.

    Read the article

  • How do you override an existing html form to use jquery to post the form?

    - by Chris
    I have a simple form that I am currently posting back to the server to update a nickname. What jquery code do I add (without changing the form) so that the page will not refresh, but instead jquery will post the form in the background and then pop up an alert message containing the reply back from the server? <form method="post" action="http://www.myserver.com/update_nickname" name="input"> Quick form to test update_nickname:<br> New nickname:<input type="text" value="BigJoe" name="newNickname"><br> <input type="submit" value="Submit"> </form> <script src="jquery-1.4.2.min.js" type="text/javascript"> </script>

    Read the article

  • Why is image_hash empty for some ad_creatives? Is it because it is expired?

    - by Chris Conner
    I ran _"https://graph.facebook.com/act_47121778/adcreatives?access_token=_ and got the following results. Why are some creatives returning empty image hash? { "view_tag": "", "alt_view_tags": [ ], "creative_id": "6002716206572", "type": 1, "title": "Grow your fans!", "body": "Fan Page Owners! Grow your fanbase. Create quizzes for your page. Win $100 Weekly. Make money with our revenue share program.", "image_hash": "6ac30e43f21c8580361de92d3288ed68", "link_url": "http://www.facebook.com/quizwriter?sk=app_81434956828", "name": "Grow your fans!", "run_status": 1, "preview_url": "http://www.facebook.com/ads/api/creative_preview.php?cid=6002716206572", "count_current_adgroups": 1, "id": "6002716206572", "image_url": "http://creative.ak.fbcdn.net/v41818/flyers/109/44/1296329249810543669_1_31eb15ed.jpg" }, { "view_tag": "", "alt_view_tags": [ ], "creative_id": "6002444043572", "type": 1, "title": "Tennis Champs Social Game", "body": "Tennis Champ! Start with 5,000 dollars , beat out other players with your mad tennis skills and become the tennis champ! Socialize!", "image_hash": "", "link_url": "334886511760", "name": "Tennis Champs Social Game", "run_status": 1, "preview_url": "http://www.facebook.com/ads/api/creative_preview.php?cid=6002444043572", "count_current_adgroups": 2, "id": "6002444043572" },

    Read the article

  • Rails: translate ActiveRecord error template headers for a single model

    - by Chris
    Hi, I'm trying to rename the authlogic error messages in a Rails 3 app. The general format I found out working in Rails 3: de: errors: template: header: one: "Konnte {{model}} nicht speichern: ein Fehler." other: "Konnte {{model}} nicht speichern: {{count}} Fehler." body: "Bitte überprüfen Sie die folgenden Felder: But I want to change this for the authlogic user session model (and only for this one) because when the Login fails, the message "Could not save user session" does not make very much sense. How can I do that?

    Read the article

  • Using UNC path as paths location in Mecurial IIS6 Server2003

    - by Chris M
    I'm running the latest Mercurial and Python 2.6; IIS6 is using the wildcard ISAPI method to attach the site to the Mecurial hgwebdir_wsgi [paths] \ = \\COMP3254\TestRepo\* [web] baseurl = / allow_push = * push_ssl = false style = monoblue The setup works perfectly if I reference the local drive E:\repo* but doesnt work if I specify the network as above; I've given the server (MERCDEV01$) full permissions on the shared folder on COMP3254, I can't think of any other reason it wouldn't work. Any ideas?

    Read the article

  • Merge Primary Keys - Cascade Update

    - by Chris Jackson
    Is there a way to merge two primary keys into one and then cascade update all affected relationships? Here's the scenario: Customers (idCustomer int PK, Company varchar(50), etc) CustomerContacts (idCustomerContact int PK, idCustomer int FK, Name varchar(50), etc) CustomerNotes (idCustomerNote int PK, idCustomer int FK, Note Text, etc) Sometimes customers need to be merged into one. For example, you have a customer with the id of 1 and another with the id of 2. You want to merge both, so that everything that was 2 is now 1. I know I could write a script that updates all affected tables one by one, but I'd like to make it more future proof by using the cascade rules, so I don't have to update the script every time there is a new relationship added. Any ideas?

    Read the article

  • C# Recursion SumOfOnlyNeg Elements

    - by Chris
    Hello, A array gets filled up with random elements (negative and positive). Now i want to calculate the sum of ONLY the postive elements. Iterative there is no problem, but in the recursion version i can only get the sum of both negative and postive. How can i "check" in the recursive version that it only sums up the Postive elements? Best Regards. Iterative version: public int IterSomPosElem(int[] tabel, int n) { n = 0; for (int i = 0; i < tabel.Length; i++) { if (tabel[i] >= 0) { n += tabel[i]; } } return n; } Recursive version atm (sums up all the elements insteed, of only the positive) public int RecuSomPosElem(int[] tabel, int n) { if(n == 1) return tabel[0]; //stopCriterium else { return (tabel[n - 1] + RecuSomPosElem(tabel, n - 1)); // how to check, so it only sums up the postive elements and "ignores" the negative elements. } }

    Read the article

  • Avoiding configSections in .NET app.config files

    - by Chris Clark
    I'm looking for a way to avoid declaring my configuration section in the configSections inside the App.config file. Basically, I want to specify my configuration information just like I do for built-in .NET systems. For instance, when configuring WCF, I just put stuff in the <system.serviceModel>, I don't have to declare a section in the configSections up top. The same thing applies for <system.diagnostics> and many other namespaces. I know I could just load it up as an XML file and parse through it, but I'd prefer to stick with the pattern if possible. Moreover, looking at the WCF configuration with Reflector, I notice that it uses the same configuration subsystem (defined in System.Configuration). If you're wondering why this is important, it's because it's confusing our IT people. If it were self contained in one place, it would be much easier on them. I also realize I'll lose the ability to have multiple of the same section type, but that's not important in our case.

    Read the article

  • The remote server returned an error: (407) Proxy Authentication Required

    - by chris
    I'm getting this error when I call a web service: "The remote server returned an error: (407) Proxy Authentication Required". I get the general idea and I can get the code to work by adding myProxy.Credentials= NetworkCredential("user", "password", "domain"); or by using DefaultCredentials in code. My problem is that the call to the web service works in production without this. It seems like there is a non code solution involving Machine.config, but what is it? At the moment I can't get to the production boxes machine.config file to see what that looks like. I tried updating my machine.config as follows, but I still get the 407 error.

    Read the article

< Previous Page | 99 100 101 102 103 104 105 106 107 108 109 110  | Next Page >