Search Results

Search found 1527 results on 62 pages for 'rob windsor'.

Page 44/62 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • How do I change the color of a Cocos2d MenuItem?

    - by Rob Sawyer
    [MenuItemFont setFontSize:20]; [MenuItemFont setFontName:@"Helvetica"]; //I'm trying to change the color of start (below item) MenuItem *start = [MenuItemFont itemFromString:@"Start Game" target:self selector:@selector(startGame:)]; MenuItem *help = [MenuItemFont itemFromString:@"Help" target:self selector:@selector(help:)]; Menu *startMenu = [Menu menuWithItems:start, help, nil]; [startMenu alignItemsVertically]; [self add:startMenu];

    Read the article

  • How can I send GET data to multiple URLs at the same time using cURL?

    - by Rob
    My apologies, I've actually asked this question multiple times, but never quite understood the answers. Here is my current code: while($resultSet = mysql_fetch_array($SQL)){ $ch = curl_init($resultSet['url'] . $fullcurl); //load the urls and send GET data curl_setopt($ch, CURLOPT_TIMEOUT, 2); //Only load it for two seconds (Long enough to send the data) curl_exec($ch); //Execute the cURL curl_close($ch); //Close it off } //end while loop What I'm doing here, is taking URLs from a MySQL Database ($resultSet['url']), appending some extra variables to it, just some GET data ($fullcurl), and simply requesting the pages. This starts the script running on those pages, and that's all that this script needs to do, is start those scripts. It doesn't need to return any output. Just the load the page long enough for the script to start. However, currently it's loading each URL (currently 11) one at a time. I need to load all of them simultaneously. I understand I need to use curl_multi_*, but I haven't the slightest idea on how cURL functions work, so I don't know how to change my code to use curl_multi_* in a while loop. So my questions are: How can I change this code to load all of the URLs simultaneously? Please explain it and not just give me code. I want to know what each individual function does exactly. Will curl_multi_exec even work in a while loop, since the while loop is just sending each row one at a time? And of course, any references, guides, tutorials about cURL functions would be nice, as well. Preferably not so much from php.net, as while it does a good job of giving me the syntax, its just a little dry and not so good with the explanations.

    Read the article

  • Changing Color with LinearLayout and TextView in Java (Android)

    - by Rob S.
    I'm a relatively new Android developer and I noticed what seems like an oddity to me that I'm hoping someone can explain. I have LinearLayout ll. This line of code fails for me when executed: ll.setBackgroundColor(R.color.white); However this line of code works: ll.setBackgroundResource(R.color.white); I assume its simply because I have white defined in my resources. However, I've also tried passing 0xFFFFFF in setBackgroundColor() and that doesn't work either. Similarly with my TextView text this line of code fails when executed: text.setTextColor(R.color.white); I can see my TextView so I know I initialized it correctly (like my LinearLayout which I can also see). So I guess my question boils down to: How do I properly use LinearLayout.setBackgroundColor() and TextView.setTextColor() ? Thanks a ton in advance. I've read through the docs and tried to find information online via googling and haven't come up with anything.

    Read the article

  • Windows DDK development with MinGW?

    - by Rob
    Is it possible to develop a Windows driver (specifically a PDF-like printer driver that displays the data on-screen instead of actually printing) without using Visual Studio? I'm thinking of using free C++ tools such as MinGW/gcc.

    Read the article

  • Using the filename for GET data and making the PHP page output as a JPG extension?

    - by Rob
    Alright, currently I'm using GD to create a PNG image that logs a few different things, depending on the GET data, for example: http://example.com/file.php?do=this will log one thing while http://example.com/file.php?do=that will log another thing. However, I'd like to do it without GET data, so instead http://example.com/dothis.php will log one thing, and http://example.com/dothat.php will log the other. But on top of that, I'd also like to make it accessible via the JPG file extension. I've seen this done but I can't figure out how. So that way http://example.com/dothis.JPG will log one thing, while http://example.com/dothat.JPG logs the other. The logging part is simple, of course. I simple need to know how to use filenames in place of the GET data and how to set the php file to be accessible via a jpg file extension.

    Read the article

  • Rails 3.2.3 mysql error "max_prepared_stmt_count"

    - by Rob Momary
    I am running a Rails 3.2.3 app deployed with apache2/passenger on a virtual host with a mysql database server. I got this error after a lot of traffic was hitting the site: ActiveRecord::StatementInvalid (Mysql::Error: Can't create more than max_prepared_stmt_count statements (current value: 16382) I'm thinking it has something to do with the amount of traffic, but if so I have to find a way around this. Anyone had this error before? I can't figure out how to stop it. Here's what i see in mysql: mysql show global status like 'com_stmt%'; | Com_stmt_close | 1720319 | Com_stmt_execute | 2094137 | | Com_stmt_fetch | 0 | | Com_stmt_prepare | 1768924 | | Com_stmt_reprepare | 0 | | Com_stmt_reset | 0 | | Com_stmt_send_long_data | 0 | +-------------------------+---------+ I am running resque gem.

    Read the article

  • efficient sort with custom comparison, but no callback function

    - by rob
    I have a need for an efficient sort that doesn't have a callback, but is as customizable as using qsort(). What I want is for it to work like an iterator, where it continuously calls into the sort API in a loop until it is done, doing the comparison in the loop rather than off in a callback function. This way the custom comparison is local to the calling function (and therefore has access to local variables, is potentially more efficient, etc). I have implemented this for an inefficient selection sort, but need it to be efficient, so prefer a quick sort derivative. Has anyone done anything like this? I tried to do it for quick sort, but trying to turn the algorithm inside out hurt my brain too much. Below is how it might look in use. // the array of data we are sorting MyData array[5000], *firstP, *secondP; // (assume data is filled in) Sorter sorter; // initialize sorter int result = sortInit (&sorter, array, 5000, (void **)&firstP, (void **)&secondP, sizeof(MyData)); // loop until complete while (sortIteration (&sorter, result) == 0) { // here's where we do the custom comparison...here we // just sort by member "value" but we could do anything result = firstP->value - secondP->value; }

    Read the article

  • iphone float vs integer rounding?

    - by Rob
    Okay, from what I understand, an integer that is a fraction will be rounded one way or the other so that if a formula comes up with say 5/6 - it will automatically round it to 1. I have a calculation: xyz = ((1300 - [abc intValue])/6) + 100; xyz is defined as an NSInteger, abc is an NSString that is chosen via a UIPicker. I want the calculation (1300 - [abc intValue]) to add 1 to 100 for each 6 units below 1300. For example, 1255 should result in xyz having a value of 100 and 1254 should result in a value of 101. Now, I understand that my formula above is wrong because of the rounding principles, but I am getting some CRAZY results from the program itself. When I punched in 1259 - I got 106. When I punched in 1255 - I got 107. Why would it behave that way?

    Read the article

  • When should I use print instead of echo in PHP?

    - by Rob
    I understand that echo is slightly faster, and print can be used as a function, but I've been reading an e-book on PHP, and the writer is using print, instead of echo, to output very simple text. print "Your name is $name\n"; So my question is, when would it be appropriate for me to use print as opposed to echo?

    Read the article

  • Add view overlay to iPhone app

    - by Rob Lourens
    I'm trying to do something like this: - (void)sectionChanged:(id)sender { [self.view addSubview:loadingView]; // Something slow [loadingView removeFromSuperview]; } where loadingView is a semi-transparent view with a UIActivityIndicatorView. However, it seems like added subview changes don't take effect until the end of this method, so the view is removed before it becomes visible. If I remove the removeFromSuperview statement, the view shows up properly after the slow processing is done and is never removed. Is there any way to get around this?

    Read the article

  • Define Javascript slider hit/rollover area

    - by Rob
    Hey, Im having an issue defining the hit area for a javascript sliding element. See example: http://www.warface.co.uk/clients/warface.co.uk/ Please slide over the grey box on the right side to reveal the button, although this works I would only like for the slider to only be triggered by rolling over the red block. CSS .slidingtwitter { /* -- This is the hit area -- */ background: #ccc; width:255px; height:55px; overflow: hidden; top:50%; right: 0px; /* -- This is the sliding start point -- */ position: fixed; font-family: Gotham, Sans-Serif; z-index: 50; } .slidingtwitter.right { right:0px; } .slidingtwitter .caption { /* -- This is the sliding area -- */ background: #fff; position: absolute; width:260px; height:55px; right: -205px; /* -- This is the sliding start point -- */ } .slidingtwitter a { color: #484848; font-size: 20px; text-transform: uppercase; } .slidingtwitter a:hover { color: black; } .slidingtwitter .smaller { font-size: 12px; font-family: Gotham Medium; } .twitterblock { background: #f35555 url("styles/images/button_twitter.png") no-repeat 14px 15px ; width:35px; height:35px; padding:10px; float:left; display:block; } .slidingtwitter .followme { background: url("styles/images/button_arrowheadthin.jpg")no-repeat right 0; height:35px; display:block; float:left; line-height:14px; width:140px; margin:10px 0px 0px 14px; padding-top:6px; padding-right: 40px; } JS $('.slidingtwitter').hover(function(){ $(".slide", this).stop().animate({right:'0px'},{queue:false,duration:400}); //Position on rollover },function() { $(".slide", this).stop().animate({right:'-205px'},{queue:false,duration:400}); //Position on rollout }); Any suggestions would be much appreciated.

    Read the article

  • Starting a code library.

    - by Rob Stevenson-Leggett
    Hi, I've been meaning to start a library of reusable code snippets for a while and never seem to get round to it. I think my main problems are: Where to start. What structure should my library take? Should it be a compiled library (where appropriate or just classes I can drop into any project? Or a library project that can be included? In my experience, a built library will quickly become out of date and the source will get lost. So I'm leaning towards source libraries that I can export from SVN and include in any project. Intellectual property. I am employeed, so a lot of the code I write is not my IP. How can I ensure that I don't give my own IP away using it on projects in work and at home? I'm thinking the best way would be to licence my library with an open source licence and make sure I only add to it in my own time using my own equipment and therefore making sure that if I use it in a work project the same rules apply as if I was using a third party library. I write in many different languages and often would require two or more parts of this library. Should I look at implementing a few template projects and a core project for each of my chosen reusable components and languages? Has anyone else got this sort of library and how do you organise and update it?

    Read the article

  • Iphone newb Question - How to export information to a website?

    - by Rob
    I am a new iphone developer and was wondering if I could get some help with some code. I just want to know how to export basic character strings and variables to a website to be used by a third-party program. Basically, if I had something as basic as: int variableOne; int variableTwo; What code would I use to export these variables to a website?

    Read the article

  • Tidy for SQL

    - by Rob
    I'm looking for a tool that that I can use to clean up (formatting, tabs etc...) my stored procedures and views. Is there anything like html's tidy, but for SQL which is free/open source?

    Read the article

  • Creating transparent gridlines

    - by Rob Penridge
    I'm trying to get the chart's gridlines to be transparent but it doesn't seem to be supported: http://support.sas.com/documentation/cdl/en/grstatug/63302/HTML/default/viewer.htm#n1f71f6e9v037an1jy274v66z4r1.htm I'm doing to try and blend the gridlines with the chart background color (which in my code can change between colors) which would make the gridlines subtle rather than jarring when background colors change. Here is my code: ** ** TAKE THE DEFAULT STYLE BEING USED. MODIFY IT SO THAT ** GRAPH GRIDLINES WILL BE GREEN AND MOSTLY TRANSPARENT *; proc template; define style my_style; parent = styles.default; style GraphGridLines from GraphGridLines / contrastcolor=green transparency=.05; end; run; ** ** LAYOUT TEMPLATE FOR A SIMPLE SERIES CHART *; proc template; define statgraph mychart; begingraph; layout overlay / wallcolor=black xaxisopts=(display=(line) griddisplay=on) yaxisopts=(display=(line)) ; seriesplot x=name y=height / lineattrs=(color=white); endlayout; endgraph; end; run; ** ** PLOT SAMPLE DATA USING CUSTOM STYLE AND CHART LAYOUT WE JUST DEFINED *; ods graphics / width=640 height=640 ; ods html style=my_style; proc sgrender data=sashelp.class template=mychart; run; ods html close; Is there another way to achieve this effect by blending the green color with the background color?

    Read the article

  • MySQL Query For Copying Contents Into Another Field, Same Row

    - by Rob Adler
    Is there a single query (subqueries in it are allowed) where I can copy the content of one field into another field, per row. Example: price, and priceBackup Records: 45.55 47.77 45.55 copies into priceBackup for that specific row, 47.77 copies into priceBackup for that specific row. I do have a primary key, auto increment on it under 'id'. Thanks guys!

    Read the article

  • Can Wordpress Duplicate An Entire Page Structure?

    - by rob walsh
    I have a wordpress site that i've been working on that has some pages (as in NOT posts) that a client changes content on in order to target particular keywords. these pages have been using podscms for content management. The client now wants to be able to duplicate these pages any number of times and edit the text within them. So basically, he wants to be have a dozen or so versions of about 4 linked pages. Does anyone know if it's possible to duplicate an entire multipage structure like this in WP? Or any WP driven sites that implement segmentation similarly?

    Read the article

  • Leftover Nav Bar in Landscape View

    - by Rob Bonner
    Hello, I am working to force a view into landscape mode, and have picked up all kinds of cool tips to make this happen, but am stuck on one item that is left on the screen. I have my XIB file laid out in landscape, and in my code I create the view controller normally: RedeemViewController *aViewController = [[RedeemViewController alloc] initWithNibName:@"RedeemViewController" bundle:nil]; aViewController.hidesBottomBarWhenPushed = YES; aViewController.wantsFullScreenLayout = YES; [[self navigationController] pushViewController:aViewController animated:YES]; Inside the controller viewDidLoad I complete the following: [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight]; [[self navigationController] setNavigationBarHidden:YES animated:YES]; [UIView beginAnimations:@"View Flip" context:nil]; [UIView setAnimationDuration:.75]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; if (self.interfaceOrientation == UIInterfaceOrientationPortrait) { self.view.transform = CGAffineTransformIdentity; self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(90)); self.view.bounds = CGRectMake(0.0, 0.0, 480, 320); } [UIView commitAnimations]; What I end up with is a perfectly rotated view, with a grey vertical bar on the left side (see pic). So to the question, how do I get rid of the bar? Edit: I am pretty sure this is the navigation bar that is not being hidden. This is a duplicate of another post, with some modified code, the other question was being answered with the bug.

    Read the article

  • Catch a PHP Object Instantiation Error

    - by Rob Wilkerson
    It's really irking me that PHP considers the failure to instantiate an object a Fatal Error (which can't be caught) for the application as a whole. I have set of classes that aren't strictly necessary for my application to function--they're really a convenience. I have a factory object that attempts to instantiate the class variant that's indicated in a config file. This mechanism is being deployed for message storage and will support multiple store types: DatabaseMessageStore FileMessageStore MemcachedMessageStore etc. A MessageStoreFactory class will read the application's preference from a config file, instantiate and return an instance of the appropriate class. It might be easy enough to slap a conditional around the instantiation to ensure that class_exists(), but MemcachedMessageStore extends PHP's Memcached class. As a result, the class_exists() test will succeed--though instantiation will fail--if the memcached bindings for PHP aren't installed. Is there any other way to test whether a class can be instantiated properly? If it can't, all I need to do is tell the user which features won't be available to them, but let them continue one with the application. Thanks.

    Read the article

  • Multithreaded linked list traversal

    - by Rob Bryce
    Given a (doubly) linked list of objects (C++), I have an operation that I would like multithread, to perform on each object. The cost of the operation is not uniform for each object. The linked list is the preferred storage for this set of objects for a variety of reasons. The 1st element in each object is the pointer to the next object; the 2nd element is the previous object in the list. I have solved the problem by building an array of nodes, and applying OpenMP. This gave decent performance. I then switched to my own threading routines (based off Windows primitives) and by using InterlockedIncrement() (acting on the index into the array), I can achieve higher overall CPU utilization and faster through-put. Essentially, the threads work by "leap-frog'ing" along the elements. My next approach to optimization is to try to eliminate creating/reusing the array of elements in my linked list. However, I'd like to continue with this "leap-frog" approach and somehow use some nonexistent routine that could be called "InterlockedCompareDereference" - to atomically compare against NULL (end of list) and conditionally dereference & store, returning the dereferenced value. I don't think InterlockedCompareExchangePointer() will work since I cannot atomically dereference the pointer and call this Interlocked() method. I've done some reading and others are suggesting critical sections or spin-locks. Critical sections seem heavy-weight here. I'm tempted to try spin-locks but I thought I'd first pose the question here and ask what other people are doing. I'm not convinced that the InterlockedCompareExchangePointer() method itself could be used like a spin-lock. Then one also has to consider acquire/release/fence semantics... Ideas? Thanks!

    Read the article

  • Creating a new Guid inside a code snippet using c#

    - by Rob
    I want to make an intellisense code snippet using Ctl K + Ctl X that actually executes code when it runs... for example, I would like to do the following: <![CDATA[string.Format("{MM/dd/yyyy}", System.DateTime.Now);]]> But rather than giving me that string value, I want the date in the format specified. Another example of what I want is to create a new Guid but truncate to the first octet, so I would want to use a create a new Guid using System.Guid.NewGuid(); to give me {798400D6-7CEC-41f9-B6AA-116B926802FE} for example but I want the value: 798400D6 from the code snippet. I'm open to not using an Intellisense Code Snippet.. I just thought that would be easy.

    Read the article

  • How do I compare two PropertyInfos or methods reliably?

    - by Rob Ashton
    Same for methods too: I am given two instances of PropertyInfo or methods which have been extracted from the class they sit on via GetProperty or GetMember etc, (or from a MemberExpression maybe). I want to determine if they are in fact referring to the same Property or the same Method so (propertyOne == propertyTwo) or (methodOne == methodTwo) Clearly that isn't going to actually work, you might be looking at the same property, but it might have been extracted from different levels of the class hierarchy (in which case generally, propertyOne != propertyTwo) Of course, I could look at DeclaringType, and re-request the property, but this starts getting a bit confusing when you start thinking about Properties/Methods declared on interfaces and implemented on classes Properties/Methods declared on a base class (virtually) and overridden on derived classes Properties/Methods declared on a base class, overridden with 'new' (in IL world this is nothing special iirc) At the end of the day, I just want to be able to do an intelligent equality check between two properties or two methods, I'm 80% sure that the above bullet points don't cover all of the edge cases, and while I could just sit down, write a bunch of tests and start playing about, I'm well aware that my low level knowledge of how these concepts are actually implemented is not excellent, and I'm hoping this is an already answered topic and I just suck at searching. The best answer would give me a couple of methods that achieve the above, explaining what edge cases have been taken care of and why :-)

    Read the article

  • MVC C# Controller Method to return Tables

    - by Rob Tiu
    I'm a real beginner with MVC and my issue is this, I have a mdf database with multiple tables and I want to have a method return "ANY" table from the database and pass it to a aspx view. Examples of other tables in the database: Articles, Products, Supplies Here is an example of my code to view an Article Table from the database: //USING LINQ-SQL CONTEXT DATABASE public ActionResult ArticlePage() { tinypeas_db_contextDataContext context = HttpContext.Application["context"] as tinypeas_db_contextDataContext; try { return View(context.Articles); } catch { return Json(false, JsonRequestBehavior.AllowGet); } } How would I modify this method to dynamically pass any table to the view? Or should I be using something else other than Linq-to-SQL

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >