Search Results

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

Page 8/377 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Comparing angles and working out the difference

    - by Thomas O
    I want to compare angles and get an idea of the distance between them. For this application, I'm working in degrees, but it would also work for radians and grads. The problem with angles is that they depend on modular arithmetic, i.e. 0-360 degrees. Say one angle is at 15 degrees and one is at 45. The difference is 30 degrees, and the 45 degree angle is greater than the 15 degree one. But, this breaks down when you have, say, 345 degrees and 30 degrees. Although they compare properly, the difference between them is 315 degrees instead of the correct 45 degrees. How can I solve this? I could write algorithmic code: if(angle1 > angle2) delta_theta = 360 - angle2 - angle1; else delta_theta = angle2 - angle1; But I'd prefer a solution that avoids compares/branches, and relies entirely on arithmetic.

    Read the article

  • SQL SERVER Difference Between GETDATE and SYSDATETIME

    Sometime something so simple skips our mind. I never knew the difference between GETDATE and SYSDATETIME. I just ran simple query as following and realized the difference. SELECT GETDATE() fn_GetDate, SYSDATETIME() fn_SysDateTime In case of GETDATE the precision is till miliseconds and in case of SYSDATETIME the precision is till nanoseconds. Now the questions is [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • How to get the Time Difference in C# .net

    - by Aamir Hasan
    A DateTime instance stores both date and time information. The DateTime class can be found in the System namespace.In order to retrieve the current system time, we can use the static property Now of the DateTime class.In this Example i have shown, how to calculate the difference between two DateTime objects using C# syntax. DateTime startTime; DateTime endTime;            startTime = Convert.ToDateTime("12:12 AM");            endTime = Convert.ToDateTime("1:12 AM");            var timeDifference = new TimeSpan(endTime.Ticks - startTime.Ticks);Response.Write("Time difference in hours is " + timeDifference.Hours);Link:http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx

    Read the article

  • What's the difference between AppMobi and PhoneGap?

    - by Ajmal
    I am new to the cross platform application development. I came across the very similar cross platform frameworks AppMobi and PhoneGaP. I found the basic difference between appmobi and phonegap is appMobi offers a complete cloud-based development system that includes a the XDK development tool. ie It's possible to develop Apple apps without owning a Mac using appMobi. I want to know Is there any differences between apk/ipa created using Appmobi and apk/ipa created using PhoneGap? Is there any difference in native features that can be used ? Also other differences between these two.

    Read the article

  • Difference between "/" at end of URL and without "/" [closed]

    - by user702325
    Possible Duplicate: Does it make a difference if your url ends in a trailing slash or not? Why treat these as different URLs? I am doing a 301 redirect in my WP application using .htaccess and have mapped some of the URLs which have either been removed from the new domain or the URL structure has been changed. While doing I got a doubt I have following URL structure in my .htaccess file RewriteCond %{HTTP_HOST} ^old.com$ [OR] RewriteCond %{HTTP_HOST} ^www.old.com$ RewriteRule ^tag/waiting$ http://www.new.com/tag/relationships [R=301,L] while checking this i found that at some places URL is like http://www.new.com/tag/relationships while at others its like http://www.new.com/tag/relationships/, while both refer to the same location but not sure if this will make any difference to SEO and search engines. Please suggest if the way i am doing mapping is correct or do i need to modify it to handle both UR

    Read the article

  • echo difference between ubuntu and RedHat

    - by arcomber
    I have mostly been experimenting with ubuntu but recently was using a Red Hat Enterprise system and was surprised at a difference I found setting and displaying env variables. In ubuntu I might have an interaction like this: acomber@mail:~$ export MY_VAR=i686-linux acomber@mail:~$ echo $MY_VAR i686-linux acomber@mail:~$ echo "$MY_VAR" i686-linux But on RHEL: acomber@mail:~$ export MY_VAR=i686-linux acomber@mail:~$ echo $MY_VAR acomber@mail:~$ echo "$MY_VAR" i686-linux I know this is a ubuntu forum but why the difference? Why do I need to enclose in quotes on RH? There are no spaces in the variable name?

    Read the article

  • NSMutableURLRequest returns null on real device, while returning image on simulator

    - by Yanchi
    I was testing my app that I've been working on for past 2 months. Basically it requests for JSON, that contains info about items. One field of JSON file is image_url. When I want to display this image, I need to download it from another server, that needs additional credentials. So it goes like this- In my cellForRowAtIndexPath I'm doing NSDictionary *aucdict = [jsonAukResults objectAtIndex:indexPath.row]; NSURL *imageURL = [NSURL URLWithString:[aucdict objectForKey:@"img_url"]]; NSString *authPString = [[[NSString stringWithFormat:@"login:password"]dataUsingEncoding:NSUTF8StringEncoding] base64EncodedString]; NSString *verifPString = [NSString stringWithFormat:@"Image %@",authPString]; NSMutableURLRequest *Prequest = [[NSMutableURLRequest alloc] initWithURL:imageURL]; [Prequest setValue:verifPString forHTTPHeaderField:@"Authorization"]; NSError *error = nil; NSURLResponse *resp = nil; NSData *picresult = [NSURLConnection sendSynchronousRequest:Prequest returningResponse:&resp error:&error]; UIImage *imageLoad = [[UIImage alloc] initWithData:picresult]; Now, I just obscured credentials (they are not login:password :)). My problem is, that right now, I get 3 items. All 3 have image on same server. I can get two of them with this code no problem. However third one is problematic, I always get (NULL) imageLoad. On my simulator, everything works fine, I get all 3 pictures. On real device I get error. I tried to NSURLConnection with error and response so I could debug better. This is what I got in my error. Printing description of error: Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “server name” which could put your confidential information at risk." UserInfo=0x1e5a3080 {NSErrorFailingURLStringKey=pictureLink.jpg, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSErrorFailingURLKey=pictureLink.jpg, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “server name” which could put your confidential information at risk., NSUnderlyingError=0x1e5a30e0 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “server name” which could put your confidential information at risk.", NSURLErrorFailingURLPeerTrustErrorKey=} I dont use SSL so Im really confused as what could cause this error. Btw, everything worked fine until now (this is my initial screen, so it's been done for good month and a half). Now I started to do graphics and this problem popped up :(

    Read the article

  • iPhone Simulator chrashes in NSKeyedUnarchiver after setting base SDK

    - by Florian
    Hi! I started a project in xcode (3.2 on snow leopard) with base sdk 3.1.2. Now I changed this setting to 3.0 and it compiles without a warning. There are no problems running the app on the device, but the simulator crashes on launch every time with the following exception: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive (0x4e, 0x49, 0x42, 0x41, 0x72, 0x63, 0x68, 0x69)' I do not use the NSKeyedUnarchiver, so why is the app trying to call it? And what archive is incomprehensible? I reset the simulator before building, so there are no userDefaults or anything else around. Thanks for your help!

    Read the article

  • dismissModalViewControllerAnimated: crashes in Simulator but not on phone

    - by Jon
    I'm doing the following: [self.parentViewController dismissModalViewControllerAnimated:YES] This code fails using the Simulator but works with no issues on the phone itself. The Simulator's console shows no erros. I used NSLog statements to pinpoint this line of code as the culprit. When running on the phone, however, the console(windoworganizer) shows that the above code is executed and the application proceeds forward with no problem. When running the code in debugger, the following statement appears at the bottom of the Xcode debug window: GDB: Data Formatters temporarily unavailable, will re-try after a 'continue'. (Not safe to call dlopen at this time.) Then a window dispalys stating: Loading 43672 stack frames. (that sounds bad) In the debug window the following line appears numerous times: [UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:] Without getting too deep into my code, does anyone know about or have experience with this type of condition? Thanks

    Read the article

  • Debuging to simulator crashes with "exited with status 5" unless I have breakpoint

    - by tigermain
    For some reason the app I am working on has very bad PMT! Literally! Most of the time I cannot debug using the simulator without putting a breakpoint in my AppDelegate. If I don't it exists with "status 5". If I put a break point in and simple continue it works perfectly well, it also works if I run the app in the simulator when not connected to the GDB. I have tried the source on a second machine with exactly the same results. I dont have this issue building to the device?!?!?! Thanks

    Read the article

  • iPhone Simulator Error: dyld: Symbol not found: _objc_collect_if_needed

    - by freespace
    I have been seeing the following error message a lot whenever I run something in the simulator: dyld: Symbol not found: _objc_collect_if_needed Referenced from: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation Expected in: /usr/lib/libobjc.A.dylib in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation I am running XCode 3.2.2 on OS X 10.6.3, and have reinstalled the SDK twice with no avail. This error makes running any code on the simulator something of a Russian Roulette, but with 5 out of 6 chambers loaded. I have checked the files mentioned in the error message, and they all checkout as being present. This sometimes go away if I restart XCode. Other times I have to logout, or even restart. And sometimes nothing works. I have googled this, even tried apple's developer forums. Other than a reference to this in the MonoTouch list, this bug appears to be completely unknown otherwise. Anything help would be greatly appreciated - this is a real PITA. Cheers, Steve

    Read the article

  • Debuging to simulator crashes with "exited with status 5" unless I debug

    - by tigermain
    For some reason the app I am working on has very bad PMT! Literally! Most of the time I cannot debug using the simulator without putting a breakpoint in my AppDelegate. If I don't it exists with "status 5". If I put a break point in and simple continue it works perfectly well, it also works if I run the app in the simulator when not connected to the GDB. I have tried the source on a second machine with exactly the same results. I dont have this issue building to the device?!?!?! Thanks

    Read the article

  • SQL SERVER – Difference Between GRANT and WITH GRANT

    - by pinaldave
    This was very interesting question recently asked me to during my session at TechMela Nepal. The question is what is the difference between GRANT and WITH GRANT when giving permissions to user. Let us first see syntax for the same. GRANT: USE master; GRANT VIEW ANY DATABASE TO username; GO WITH GRANT: USE master; GRANT VIEW ANY DATABASE TO username WITH GRANT OPTION; GO The difference between both of this option is very simple. In case of only GRANT – username can not grant the same permission to other users. In case, of the option of WITH GRANT – username will be able to give the permission it has received to other users. This is very basic definition of the subject. I would like to request my readers to come up with working script to prove this scenario. If can submit your script to me by email (pinal ‘at’ sqlauthority.com) or in comment field. Reference : Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL Query, SQL Scripts, SQL Security, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: SQL Permissions

    Read the article

  • SQL SERVER – Difference Between DATETIME and DATETIME2 – WITH GETDATE

    - by pinaldave
    Earlier I wrote blog post SQL SERVER – Difference Between GETDATE and SYSDATETIME which inspired me to write SQL SERVER – Difference Between DATETIME and DATETIME2. Now earlier two blog post inspired me to write this blog post (and 4 emails and 3 reads from readers). I previously populated DATETIME and DATETIME2 field with SYSDATETIME, which gave me very different behavior as SYSDATETIME was rounded up/down for the DATETIME datatype. I just ran the same experiment but instead of populating SYSDATETIME in this script I will be using GETDATE function. DECLARE @Intveral INT SET @Intveral = 10000 CREATE TABLE #TimeTable (FirstDate DATETIME, LastDate DATETIME2) WHILE (@Intveral > 0) BEGIN INSERT #TimeTable (FirstDate, LastDate) VALUES (GETDATE(), GETDATE()) SET @Intveral = @Intveral - 1 END GO SELECT COUNT(DISTINCT FirstDate) D_FirstDate, COUNT(DISTINCT LastDate) D_LastDate FROM #TimeTable GO SELECT DISTINCT a.FirstDate, b.LastDate FROM #TimeTable a INNER JOIN #TimeTable b ON a.FirstDate = b.LastDate GO SELECT * FROM #TimeTable GO DROP TABLE #TimeTable GO Let us run above script and observe the results. You will find that the values of GETDATE which is populated in both the columns FirstDate and LastDate are very much same. This is because GETDATE is of datatype DATETIME and the precision of the GETDATE is smaller than DATETIME2 there is no rounding happening. In other word, this experiment is pointless. I have included this as I got 4 emails and 3 twitter questions on this subject. If your datatype of variable is smaller than column datatype there is no manipulation of data, if data type of variable is larger than column datatype the data is rounded. Reference: Pinal Dave (http://www.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL DateTime, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Difference between sh file.sh and file.sh

    - by RAS
    I have two questions : What is the difference between executing sh filename.sh and filename.sh? How can I make both of them giving me the same output ? I'm asking this question as right now I'm facing a problem. I'm trying to run a Java + SWT application from terminal. When I do filename.sh, it gives me the desired output. But when I do sh filename.sh or bash filename.sh, it throws me an error : Exception in thread "main" java.lang.NoClassDefFoundError: MainForm/java Caused by: java.lang.ClassNotFoundException: MainForm.java at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: MainForm.java. Program will exit. I know this question is already asked here but I'm still not clear about it. I have gone through the following links : What is the difference between ./ and sh to run a script? Can scripts run even when they are not set as executable? Can anyone help me with this?

    Read the article

  • iOS6 Twitter integration

    - by Peter Warbo
    There seems to be a difference between the iPhone simulator and actual device when checking if Twitter is available. I check if a Twitter account is setup by using this code: [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]; In the simulator there is a nice UIAlertView informing the user that there are no Twitter accounts setup and two buttons one for Settings and one for Cancel. However when I run my app on my device it will not show the above UIAlertView. Why is that? And how can I catch what button is tapped in the above UIAlertView (since I did not instantiate it?) This is what it looks like on the simulator:

    Read the article

  • Is the difference between sudo and gksu the same as the difference between sudo -i and sudo -s?

    - by fred.bear
    Is the difference between sudo cmd and gksu cmd, the same as the difference between starting a shell with sudo -i and sudo -s? ... or put another way, Is sudo cmd the same as sudo -i cmd and gksu cmd the same as sudo -s cmd? EDIT: Based on what I read on an Ubuntu Documentation Page where it says: You should never use normal sudo to start graphical applications as root. You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. This prevents files in your home directory becoming owned by root. (AFAICT, this is all that's special about the environment of the started process with gksudo vs. sudo). The "AFAICT" doen't really give me full confidence that there is nothing more to it. (..a belated UPDATE: I tested his commemnt today (2 months later) about: "This prevents files in your home directory becoming owned by root." All files I created via sudo/gksu were all owned by "root", and the group was "root".) I've read parts of the info sudo and noticed the -i and -s seem to be doing the same thing as the AFAICT environment issue... but I hit overload.. so I've asked my question here. PS.. My question is not about sudo vs gksu .. It is more about: Is gksu the same as sudo -s .. and if not, how do they differ?

    Read the article

  • Universal iPhone/iPad Windows-based app with Core Data crashes on iPhone SDK 4 beta 3

    - by Tarfa
    Hi all. I installed iPhone OS 4.0 Beta 3. When I create a new Windows-based universal app with Core Data (File New Project Windows-based Application --- select Universal in drop down and check the "Use Core Data for storage" check box) the app launches fine into the iPhone simulator but crashes in the iPad simulator. The console message returned is: dyld: Symbol not found: _OBJC_CLASS_$_NSURL Referenced from: /Users/tarfa/Library/Application Support/iPhone Simulator/3.2/Applications/5BB644DC-9370-4894-8884-BAEBA64D9ED0/Universal.app/Universal Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation I'm stumped. Anyone else experiencing this problem?

    Read the article

  • SQL SERVER – Difference Between DATETIME and DATETIME2

    - by pinaldave
    Yesterday I have written a very quick blog post on SQL SERVER – Difference Between GETDATE and SYSDATETIME and I got tremendous response for the same. I suggest you read that blog post before continuing this blog post today. I had asked people to honestly take part and share their view about above two system function. There are few emails as well few comments on the blog post asking question how did I come to know the difference between the same. The answer is real world issues. I was called in for performance tuning consultancy where I was asked very strange question by one developer. Here is the situation he was facing. System had a single table with two different column of datetime. One column was datelastmodified and second column was datefirstmodified. One of the column was DATETIME and another was DATETIME2. Developer was populating them with SYSDATETIME respectively. He was always thinking that the value inserted in the table will be the same. This table was only accessed by INSERT statement and there was no updates done over it in application.One fine day he ran distinct on both of this column and was in for surprise. He always thought that both of the table will have same data, but in fact they had very different data. He presented this scenario to me. I said this can not be possible but when looked at the resultset, I had to agree with him. Here is the simple script generated to demonstrate the problem he was facing. This is just a sample of original table. DECLARE @Intveral INT SET @Intveral = 10000 CREATE TABLE #TimeTable (FirstDate DATETIME, LastDate DATETIME2) WHILE (@Intveral > 0) BEGIN INSERT #TimeTable (FirstDate, LastDate) VALUES (SYSDATETIME(), SYSDATETIME()) SET @Intveral = @Intveral - 1 END GO SELECT COUNT(DISTINCT FirstDate) D_GETDATE, COUNT(DISTINCT LastDate) D_SYSGETDATE FROM #TimeTable GO SELECT DISTINCT a.FirstDate, b.LastDate FROM #TimeTable a INNER JOIN #TimeTable b ON a.FirstDate = b.LastDate GO SELECT * FROM #TimeTable GO DROP TABLE #TimeTable GO Let us see the resultset. You can clearly see from result that SYSDATETIME() does not populate the same value in the both of the field. In fact the value is either rounded down or rounded up in the field which is DATETIME. Event though we are populating the same value, the values are totally different in both the column resulting the SELF JOIN fail and display different DISTINCT values. The best policy is if you are using DATETIME use GETDATE() and if you are suing DATETIME2 use SYSDATETIME() to populate them with current date and time to accurately address the precision. As DATETIME2 is introduced in SQL Server 2008, above script will only work with SQL SErver 2008 and later versions. I hope I have answered few questions asked yesterday. Reference: Pinal Dave (http://www.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL DateTime, SQL Optimization, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • What is the difference between nvidia-graphics-drivers and nvidia-graphics-drivers-updates

    - by Jarl
    I see that there are two packages nvidia-current and nvidia-current-updates. The apparently stem from nvidia-graphics-drivers and nvidia-graphics-drivers-updates respectively: https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers https://launchpad.net/ubuntu/+source/nvidia-graphics-drivers-updates I wonder why there are two packages, and what is the difference between these two packages?

    Read the article

  • Difference between programs in Software Centre and Launchpad PPA

    - by Lionthinker
    On several Ubuntu sites such as OMG Ubuntu there are summaries of new ppa's. These are useful programs, but they don't appear in the Software Center. However, in the center there are programs that specifically say are "community supported" and not Canonical supported. So what is the difference between Software Center programs and PPA's? It would be a lot more useful if more PPAs were in the center.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >