Search Results

Search found 9410 results on 377 pages for 'simulator difference'.

Page 19/377 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Average Difference and Direction Between Values in Excel with Blanks

    - by 114
    I have a sheet that looks something like this: Sheet 1 1 2 3 4 5 6 7 8 9 10 11 1 6 2 3 5 3 4 2 4 9 4 5 6 4 6 6 7 5 3 3 3 10 8 4 8 8 9 4 11 12 12 6 10 11 8 5 5 4 9 4 7 6 What I would like to be able to do is find the average difference and direction between values in each column. For example, the first 4 rows would look like: Average Difference # + Movements # -Movements 1 2 2 1 0 3 4 (2+5+5)/3 2 1 Blanks represent N/A values due to insufficient information, and differences are calculated successively i.e. col2-col1, col3-col2, col4-col3 If I just take the differences and make a duplicate table with the formula =C2-B2 copied across issues arise whenever there is a blank space between two values or at the beginning of the row. Is there an easy way to fix this or another way to do this that I might be missing?

    Read the article

  • Calculate year for end date: PostgreSQL

    - by Dave Jarvis
    Background Users can pick dates as shown in the following screen shot: Any starting month/day and ending month/day combinations are valid, such as: Mar 22 to Jun 22 Dec 1 to Feb 28 The second combination is difficult (I call it the "tricky date scenario") because the year for the ending month/day is before the year for the starting month/day. That is to say, for the year 1900 (also shown selected in the screen shot above), the full dates would be: Dec 22, 1900 to Feb 28, 1901 Dec 22, 1901 to Feb 28, 1902 ... Dec 22, 2007 to Feb 28, 2008 Dec 22, 2008 to Feb 28, 2009 Problem Writing a SQL statement that selects values from a table with dates that fall between the start month/day and end month/day, regardless of how the start and end days are selected. In other words, this is a year wrapping problem. Inputs The query receives as parameters: Year1, Year2: The full range of years, independent of month/day combination. Month1, Day1: The starting day within the year to gather data. Month2, Day2: The ending day within the year (or the next year) to gather data. Previous Attempt Consider the following MySQL code (that worked): end_year = start_year + greatest( -1 * sign( datediff( date( concat_ws('-', year, end_month, end_day ) ), date( concat_ws('-', year, start_month, start_day ) ) ) ), 0 ) How it works, with respect to the tricky date scenario: Create two dates in the current year. The first date is Dec 22, 1900 and the second date is Feb 28, 1900. Count the difference, in days, between the two dates. If the result is negative, it means the year for the second date must be incremented by 1. In this case: Add 1 to the current year. Create a new end date: Feb 28, 1901. Check to see if the date range for the data falls between the start and calculated end date. If the result is positive, the dates have been provided in chronological order and nothing special needs to be done. This worked in MySQL because the difference in dates would be positive or negative. In PostgreSQL, the equivalent functionality always returns a positive number, regardless of their relative chronological order. Question How should the following (broken) code be rewritten for PostgreSQL to take into consideration the relative chronological order of the starting and ending month/day pairs (with respect to an annual temporal displacement)? SELECT m.amount FROM measurement m WHERE (extract(MONTH FROM m.taken) >= month1 AND extract(DAY FROM m.taken) >= day1) AND (extract(MONTH FROM m.taken) <= month2 AND extract(DAY FROM m.taken) <= day2) Any thoughts, comments, or questions? (The dates are pre-parsed into MM/DD format in PHP. My preference is for a pure PostgreSQL solution, but I am open to suggestions on what might make the problem simpler using PHP.) Versions PostgreSQL 8.4.4 and PHP 5.2.10

    Read the article

  • Thread vs async execution. What's different?

    - by Eonil
    I believed any kind of asynchronous execution makes a thread in invisible area. But if so, Async codes does not offer any performance gain than threaded codes. But I can't understand why so many developers are making many features async form. Could you explain about difference and cost of them?

    Read the article

  • C# compare algorithms

    - by public static
    Hi, Are there any open source algorithms in c# that solve the problem of creating a difference between two text files? It would be super cool if it had some way of highlighting what exact areas where changed in the text document also.

    Read the article

  • NSURL Connection will/won't load data

    - by jkap
    So here's my issue: I followed the NSURLConnection tutorial in the iPhone Developer Documentation almost to the T, and it only kinda works. Here's where it all goes wrong: The object seems to be created correctly and delegates to connectionDidFinishLoading, but with any URL I try to load the response data always ends up only being 0 bytes. I am running in the simulator if that makes any difference. Here's my relevant code: - (void)viewDidLoad { [super viewDidLoad]; self.title = @"WVFS Player"; //create a request NSURLRequest *theRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://wvfs.josh-kaplan.com/nowPlaying.php"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; // create a connection NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if(theConnection) { // create the datum responseData=[[NSMutableData data] retain]; } else { // code this later } } - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { [responseData setLength:0]; } - (void)connectionDidFinishLoading:(NSURLConnection *)connection { // make it work NSLog(@"Succeeded! Received %d bytes of data:",[responseData length]); // release it [connection release]; [responseData release]; } And here's my log output: [Session started at 2010-03-14 09:01:09 -0400.] 2010-03-14 09:01:14.784 WVFS[19571:207] Succeeded! Received 0 bytes of data: Any ideas? Thanks, Josh

    Read the article

  • message queue full error in blackberry

    - by Rahul Varma
    Hi , I have coded to get the info from the user and send an email of clicking a button. The program is getting executed for a while and then the simulator is crashing showing error "DE427"-Message queue full... Here's the code that i have done... if(field==SendMail) { Message m = new Message(); Address a = null; try { a = new Address("[email protected]", "Rahul"); } catch (AddressException e) { // TODO Auto-generated catch block e.printStackTrace(); } Address[] addresses = {a}; try { m.addRecipients(net.rim.blackberry.api.mail.Message.RecipientType.TO, addresses); m.setContent("Name:"+Name.getText().toString()+"\n"+ "Phone :"+Phone.getText().toString()+ "\n"+ "Date & Time:"+DateShow.getText().toString()+"\n"+"Make:"+Make.getText().toString()+ "\n"+"Model:"+Model.getText().toString()+"\n"+"Miles:"+Miles.getText().toString()+"\n"); m.setSubject("Appointment Request (Via Blackberry app)"); } catch (MessagingException e) { // TODO Auto-generated catch block e.printStackTrace(); } Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(m)); } Can anyone tell me what the error is and how to rectify the problem....Plz...

    Read the article

  • Why do I have memory problems?

    - by Tattat
    I got this error from XCode: objc[8422]: FREED(id): message release sent to freed object=0x3b120c0 I googled and find that is related to the memory. But I don't know which line of code I go wrong, any ideas? After I launch my app in simulator, it prompts a second, than, no other error except the error above. @implementation MyAppDelegate @synthesize window; @synthesize viewController; - (void)applicationDidFinishLaunching:(UIApplication *)application { // Override point for customization after app launch [window addSubview:viewController.view]; [window makeKeyAndVisible]; [self changeScene:[MainGameMenuScene class]]; } - (void)dealloc { [viewController release]; [window release]; [super dealloc]; } - (void) changeScene: (Class) scene { BOOL animateTransition = true; if(animateTransition){ [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.5]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:window cache:YES]; //does nothing without this line. } if( viewController.view != nil ) { [viewController.view removeFromSuperview]; //remove view from window's subviews. [viewController.view release]; //release gamestate } viewController.view = [[scene alloc] initWithFrame:CGRectMake(0, 0, IPHONE_WIDTH, IPHONE_HEIGHT) andManager:self]; //now set our view as visible [window addSubview:viewController.view]; [window makeKeyAndVisible]; if(animateTransition){ [UIView commitAnimations]; } }

    Read the article

  • Problem with video playback on iPad with MPMoviePlayerViewController

    - by Symo
    Hello everybody... I have been fighting some code for about a week, and am hoping that someone else may have experienced this problem and can point me in the right direction. I am using the MPMoviePlayerViewController to play a video on the iPad. The primary problem is that it works FLAWLESSLY on the iPad Simulator, but will not play at all on the iPad. I have tried re-encoding the video to make sure that isn't an issue. The video I'm using is currently a 480x360 video encoded with H.264 Basline 3.0 with AAC/LC audio. The video plays fine on the iPhone, and also does play through Safari on the iPad. The video actually loads, and you can scrub through the video with the scrubber bar and see that it is there. The frames actually display, but just will not play. If you click play, it just immediately stops. Even when I have mp.moviePlayer.shouldAutoplay=YES set, you can see the player attempt to play, but only for a split second (maybe 1 frame?). I have tried just adding view with the following code: in .h ------ MPMoviePlayerViewController *vidViewController; @property (readwrite, retain) MPMoviePlayerViewController *vidViewController; in .m ------ MPMoviePlayerViewController *mp=[[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:videoURL]]; [mp shouldAutorotateToInterfaceOrientation:YES]; mp.moviePlayer.scalingMode=MPMovieScalingModeAspectFit; mp.moviePlayer.shouldAutoplay=YES; mp.moviePlayer.controlStyle=MPMovieControlStyleFullscreen; [videoURL release]; self.vidViewController = mp; [mp release]; [self.view addSubview:vidViewController.view]; float w = self.view.frame.size.width; float h = w * 0.75; self.vidViewController.view.frame = CGRectMake(0, 0, w, h); I have also just tried to do a: [self presentMoviePlayerViewControllerAnimated:self.vidViewController]; which I actually can not get to orient properly...always shows up in Portrait and almost completely off the screen on the bottom, and the app is only intended to run in either of the Landscape views... If anybody needs more info, just let me know. I'm about at my wits end on this. ANY help will be GREATLY appreciated.

    Read the article

  • C Differences on windows and Unix OS

    - by zapping
    Is there any difference in C that is written in Windows and Unix. I teach C as well as C++ but some of my students have come back saying some of the sample programs does not run for them in Unix. Unix is alien for me. Unfortunately no experience with it whatsoever. All i know is to spell it. If there are any differences then i should be advising our department to invest on systems for Unix as currently there are no Unix systems in our lab. I do not want my students to feel that they have been denied or kept aloof from something.

    Read the article

  • How do I create a list of timedeltas in python?

    - by eunhealee
    I've been searching through this website and have seen multiple references to time deltas, but haven't quite found what I'm looking for. Basically, I have a list of messages that are received by a comms server and I want to calcuate the latency time between each message out and in. It looks like this: 161336.934072 - TMsg out: [O] enter order. RefID [123] OrdID [4568] 161336.934159 - TMsg in: [A] accepted. ordID [456] RefNumber [123] Mixed in with these messages are other messages as well, however, I only want to capture the difference between the Out messages and in messages with the same RefID. So far, to sort out from the main log which messages are Tmessages I've been doing this, but it's really inefficient. I don't need to be making new files everytime.: big_file = open('C:/Users/kdalton/Documents/Minicomm.txt', 'r') small_file1 = open('small_file1.txt', 'w') for line in big_file: if 'T' in line: small_file1.write(line) big_file.close() small_file1.close() How do I calculate the time deltas between the two messages and sort out these messages from the main log?

    Read the article

  • RSpec: in-depth differences between before(:all) and before(:each)

    - by gmile
    Ok, so I've ran into a very strange issue, directly connected with before blocks. I'm doing a integration testing via Watir and RSpec. For a simple test to check if user can perform a login I'm creating a 'user' record in the db by means of factory_girl. So I put the following code: before(:each) do @user = Factory(:user) end if "should perform a login" do # do stuff end In do stuff I call a browser and see how the user tries to login. Unfortunately, somehow he cannot do that — "Username isn't valid". After some investigation I discovered that if I put the code for creating user in before(:all) block, everything magically works. How's that? What's the difference between :all and :each in this context? Also, If I put the code for creating user actually in the test body, it still doesn't work (i.e. user somehow isn't added to the DB or something).

    Read the article

  • Comparison tool with easy line insertion

    - by Miro Kropacek
    Back in good old days I used to use a tool for file comparison with one incredible feature -- you open file1, file2, see a difference, no magic here. But then you could insert an empty line(s) into file1 with one keyboard combo and into file2 with another keyboard combo. So you could easily adjust how are C / asm function aligned in case diff engine failed to recognize similar stuff. Of course, after the adjust (insertion / removal of one or more lines in either file) whole diff was "recalculated". I fail to find similar feature in diff, KDiff, ... I'd prefer Linux app but I'm OK with Windows app as last resort... Thanks for any hint!

    Read the article

  • Getting number of days between [NSDate date] and string @"2010-11-12"

    - by grobald
    Hello i have a question. in short: i need a function which receives [NSDate date] and string @"2010-11-12" and returns the amount of days between those two dates. more explanation: I need to store a date from a server in the format @"2010-11-12" in my NSUserdefaults. The meaning of this date is the expireDate of a feature in an iPhone App. Everytime i press on a button for this feature i need to check if the difference in days between the current time-[NSDate date] and @"2010-11-12" is greater than 0. That means tahat the feature is disabled. its making me crazy mabey its to dead simple.

    Read the article

  • Installing a configuration profile on iPhone - programmatically

    - by Seva Alekseyev
    Hi all, I would like to ship a configuration profile with my iPhone application, and install it if needed. Mind you, we're talking about a configuration profile, not a provisioning profile. First off, such a task is possible. If you place a config profile on a Web page and click on it from Safari, it will get installed. If you e-mail a profile and click the attachment, it will install as well. "Installed" in this case means "The installation UI is invoked" - but I could not even get that far. So I was working under the theory that initiating a profile installation involves navigating to it as a URL. I added the profile to my app bundle. A) First, I tried [sharedApp openURL] with the file:// URL into my bundle. No such luck - nothing happens. B) I then added an HTML page to my bundle that has a link to the profile, and loaded it into a UIWebView. Clicking on the link does nothing. Loading an identical page from a Web server in Safari, however, works fine - the link is clickable, the profile installs. I provided a UIWebViewDelegate, answering YES to every navigation request - no difference. C) Then I tried to load the same Web page from my bundle in Safari (using [sharedApp openURL] - nothing happens. I guess, Safari cannot see files inside my app bundle. D) Uploading the page and the profile on a Web server is doable, but a pain on the organizational level, not to mention an extra source of failures (what if no 3G coverage? etc.). So my big question is: how do I install a profile programmatically? And the little questions are: what can make a link non-clickable within a UIWebView? Is it possible to load a file:// URL from my bundle in Safari? If not, is there a local location on iPhone where I can place files and Safari can find them? EDIT on B): the problem is somehow in the fact that we're linking to a profile. I renamed it from .mobileconfig to .xml ('cause it's really XML), altered the link. And the link worked in my UIWebView. Renamed it back - same stuff. It looks as if UIWebView is reluctant to do application-wide stuff - since installation of the profile closes the app. I tried telling it that it's OK - by means of UIWebViewDelegate - but that did not convince. Same behavior for mailto: URLs within UIWebView. For mailto: URLs the common technique is to translate them into [openURL] calls, but that doesn't quite work for my case, see scenario A. For itms: URLs, however, UIWebView works as expected... EDIT2: tried feeding a data URL to Safari via [openURL] - does not work, see here: http://stackoverflow.com/questions/641461/iphone-open-data-url-in-safari EDIT3: found a lot of info on how Safari does not support file:// URLs. UIWebView, however, very much does. Also, Safari on the simulator open them just fine. The latter bit is the most frustrating.

    Read the article

  • iPhone wb dev with jqTouch

    - by sea_1987
    Hi there, I am some real trouble getting the transitions working for my iPhone site, I am trying to add the 'flip' transition using, <a class="button flip href="#about">About</a> However I get no flip transition nor do is navigate to the about anchor, here is my HTML, <!DOCTYPE html> <head> <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> <title>Elfm Iphone</title> <script src="javascript/jquery.1.3.2.min.js" type="text/javascript" charset="utf-8"></script> <script src="javascript/jqtouch.min.js" type="text/javascript" charset="utf-8"></script> <link rel="stylesheet" href="css/jqtouch.css" type="text/css" media="screen" title="no title" charset="utf-8"> <link rel="stylesheet" href="themes/apple/theme.css" type="text/css" media="screen" title="no title" charset="utf-8"> <link rel="stylesheet" href="css/base.css" type="text/css" media="screen" title="no title" charset="utf-8"> <script type="javascript/text"> $.jQTouch({ icon:'kilo.png', statusBar:'black' }); </script> </head> <body> <div id="about"> <div class="toolbar"> <h1>About</h1> <p>Some about blurb, telling the users about the station and the site, in most cases this won't be a very extensive page, just some background information, nothing that will overface the user and not want them to carry on listening. I would probably be a good idea to push the user to the stream as well. This could be done as an internal link, something like, why not listen to our <a href="http://www.twovalleysradio.co.uk/iphone/stream.pls">live feed?</a></p> </div> </div> <div id="blog"> <div class="toolbar"> <h1>Blog</h1> </div> <p>The blog should be an easy things to implement we should just be able to use the stations RSS feed from wordpress and then style up the entries with CSS to match the look and feel of the sites. We could possibly implement the nice listing features that come with the theme available and if not we could easily build our own theme.</p> </div> <div id="home" class="current"> <div class="toolbar"> <h1>Home</h1> <a class="button flip" href="#blog">Blog</a> </div> <div id="header"> <img src="images/elfm-header.png" alt="ELfm" title="ELfm" /> </div> <div id="content"> <p>Here's a load of text about is and where it's based and why it's coll and who listen to it and a load more blurb and now I'm just adding filler for the sake of it and I know dynamic text is a pain because then we have to consider what happens if there is too much of it but we'll show a live preview on the web service of what the app would look like.</p> </div> <div id="play"> <div id="button"> <a class="play_stream" href=""> Play </a> </div> </div> </div> <div id="twitter"> <div id="tweet"> </div> </div> </body> </html> I am testing this is Chrome and Safari and also the iPhone simulator.

    Read the article

  • Difference between httpd and httpd-devel package on CentOS 5

    - by superbarney
    I'm trying to update PHP 5.1 to 5.3 on CentOS 5.10. On the server, httpd-devel is installed but trying to install php53 on CentOS 5, it wants to install httpd. This is a production server so I need to know if it's safe to install httpd when httpd-devel is already installed. The php package (5.1.6) on CentOS 5 does not have the httpd dependency. What is the difference between httpd-devel and httpd?

    Read the article

  • What is the difference between safety and security?

    - by Lernkurve
    Question What is the difference between safety and security in the context of information management or computer science? Elaboration This could be the canonical answer for people searching for it. Let me know if superuser.com is the wrong site for this question. I have, of course, googled it and haven't found an answer that seemed short and to the point. Wikipedia wasn't very helpful either: safety, information security.

    Read the article

  • Difference between Xen PV, Xen KVM and HVM?

    - by JP19
    Hi, I know that Xen is usually better than OpenVZ as the provider cannot oversell in Xen. However, what is the difference between Xen PV, Xen KVM and HVM (I was going through this provider's specs? Which one is better for what purposes and why? Edit: For an end-user who will just be hosting websites, which is better? From efficiency or other point of view, is there any advantage of one over the other?

    Read the article

  • Difference ProxyPass and RewriteRule

    - by Wesho
    I just came across a case where ProxyPass (ProxyPassMatch to be exact) is being used in an Apache configuration file. This mod_proxy rule is being used to proxy from a whole cluster to one specific server, when a certain file is requested which only resides on that server. Now I'm a bit confused since I can't grasp why something like this cannot be achieved using a RewriteRule. So in essence I want to ask: What is the difference between ProxyPassMatch and a RewriteRule in this case?

    Read the article

  • What's the difference between RDP vs VNC ?

    - by Jonathan
    Okay I was playing around with the iPhone Jaadu App and I realized I download the wrong desktop client. So what's really the difference between the RDP and VNC? (because there is Jaadu RDP and Jaadu VNC 2 different app) They both provide the same function? features ?

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >