Search Results

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

Page 78/377 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • what's the difference between /etc/init.d/sshd start and /usr/sbin/sshd?

    - by jasono
    I'm having issues with passwordless ssh. I've checked, double checked and checked again that I have everything set up correctly. Both machines are RHEL6 and when the destination machine first boots up passwordless ssh does not work. If I stop ssh (service sshd stop or /ect/init.d/sshd stop) and then start it directly (/usr/sbin/sshd) passwordless ssh works fine. If I start ssh via the service (service sshd start or /etc/init.d/sshd start) passwordless ssh does not work. Just for testing I've tried commenting out the entire start() function in /etc/init.d/sshd and replace it with /usr/sbin/sshd - that still fails to allow passwordless ssh. I believe that this means that something in the /etc/init.d/sshd file is causing the screw up but I don't know enough about linux to narrow the issue down.

    Read the article

  • What is the difference between running a Windows service vs. running through shell?

    - by Zack
    I am trying to troubleshoot an issue on a Windows 2008 server where running attempting to connect to a "Timberline Data Source" ODBC driver crashes if the call is in a "service" context, but succeeds if the call is initiated manually in a Remote Desktop session. I have set the service to run as my user. I'm wondering if, all else being equal (user, machine, etc), are there any fundamental security/environment differences between running a process as a service vs manually? --- Implementation Details --- In case it is helpful for anyone, I had a system that started as an attempt to connect to a Timberline Database using ODBC and a Python CGI script called via IIS 7. The script itself works fine, however, as soon as I attempt to perform the ODBC connect function, the script crashes without throwing an exception. The script was able to connect fine when executed via command line. The same thing happened when using a C#/.net service, attempting to run via Apache, Windows Scheduler or even a 3rd party scheduling tool. With the last option (the 3rd party scheduling tool, pycron) I set the service up log in as my user and had the same issue (I confirmed via Task Manager that the process running user was, in fact, me). It just doesn't make sense to me why a service, which should be running as my user, appears to still be operating in a different security context or environment. Also, if it's important, the Timberline database is referenced by computer name on the network ("\\timberline-server\Timberline Office\Accounts\AT" or something to that effect) I also realized that, as Joel pointed out, the server DOES have a mapped drive ("Y:" which is mapped to "\\timberline-server\Timberline Office") The DSN is set up at the "System DSN" level which, according to the ODBC Administration Tool, means that the DSN is available to users and services Since I'm not allowed to answer this question yet, I'll post the solution that I arrived on: As Joel Coel mentioned, there actually was a mapped drive scenario. I didn't realize this because the DSN specified a path using UNC. However, it seems as though the actual Timberline Driver referred to a mapped drive. Since services don't start with the mapped drive, I was forced to add the drive mapping code into my service. Since it was written in python, I used code from a Stackoverflow answer that was able to map the drive on the fly.

    Read the article

  • Solaris: What is the difference between .so and .so.1 files?

    - by Rob Goretsky
    I am trying to understand how/why certain library files are dynamically loaded by the linker on Solaris. I am using ldd to see this (with the -s switch to see what paths are tried by the linker). As an example, if I run "ldd /usr/local/bin/isql -s" I notice that one of the libraries that is searched for is called "libodbc.so.1". I notice that this does NOT match a file it finds along the way called "libodbc.so". So, it finally resolves to a place where there is a symbolic link between "libodbc.so.1.0.0" and "libodbc.so.1". My question is - what is the significance of the ".1" here? Is it to indicate a version number? Why do some installers create these symbolic links, while others don't?

    Read the article

  • Gentoo server time issue, can't manually set time, NTPD won't correct, too big of a time difference

    - by kevingreen
    So, my server is living in the future, unfortunately I can't get lottery numbers, or stock picks out of it. It thinks this is the time: Thu Nov 7 04:07:18 EST 2013 Not correct, I tried to set the time manually via date in a few ways # date -s "06 NOV 2013 14:48:00" # date 110614482013 -- same output, same problem Which outputs Wed Nov 6 14:48:00 EST 2013, but when I check the date again, it's still set to Nov 7th 0400 or whatever. I checked my system messages, and I see this pop up often: Nov 7 03:54:00 www ntpd[4482]: time correction of -47927 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time. Which makes sense, we're way off the correct time. But I can't seem to manually fix it. So now what? Also, I'm wondering if my hardware clock is setup correct, hwclock doesn't return any values. Would that be causing issues? This is a virtualized server, I don't have direct access to the hypervisor, but I can talk to who does, assume I can explain myself well enough. Thanks

    Read the article

  • Difference between "bit-number" in filesystem and that in OS (like 32,64 bit)?

    - by learner
    I encountered 2 terms ,"FAT32", a file system and "Windows Vista 32 bit". I found that the meaning of a 32 bit OS is that that the OS deals with data in chunks of minimum size 32 bits. I don't quite understand the depth of that, but I figure ,every file in that system with that OS should have a minimum size of 32 bits. I also read that these 32 bits are used to hold data of files' location(reference) and details. Which of it is it? I have also read that 4 GB of RAM is all that is needed at the most if you're on a 32 bit OS. But I don't understand why. If there are 32 bits to hold info about files and their locations,there can be 2^32 possible combinations of it. But I have found in many places,2^32 is divided by 1024 thrice to get 4GB. Why? Did that 2^32 become equal to 2^32 bytes? And about filesystems I read a similar explanation for what 32 means in FAT32. It is supposed to mean that 32 bits are used to number file system block. Now how is different from the number before the OS?

    Read the article

  • ffmpeg What's the difference between -to and -t options?

    - by Vantuz
    Command ffmpeg -ss 5:09 -i foo.mkv -to 5:10 -c copy bar.mkv works exactly like ffmpeg -ss 5:09 -i foo.mkv -t 5:10 -c copy bar.mkv Is it a bug? Using Zeranoe git-bd75651 for Windows 64-bit >ffmpeg -version ffmpeg version N-57906-gbd75651 built on Nov 4 2013 18:09:19 with gcc 4.8.2 (GCC) configuration: --disable-static --enable-shared --enable-gpl --enable-version3 - -disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enabl e-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --ena ble-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmo dplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enab le-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis - -enable-libvpx --enable-libwavpack --enable-libx264 --enable-libxavs --enable-li bxvid --enable-zlib libavutil 52. 51.100 / 52. 51.100 libavcodec 55. 41.100 / 55. 41.100 libavformat 55. 21.100 / 55. 21.100 libavdevice 55. 5.100 / 55. 5.100 libavfilter 3. 90.101 / 3. 90.101 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc 52. 3.100 / 52. 3.100

    Read the article

  • Node.js Lockstep Multiplayer Architecture

    - by Wakaka
    Background I'm using the lockstep model for a multiplayer Node.js/Socket.IO game in a client-server architecture. User input (mouse or keypress) is parsed into commands like 'attack' and 'move' on the client, which are sent to the server and scheduled to be executed on a certain tick. This is in contrast to sending state data to clients, which I don't wish to use due to bandwidth issues. Each tick, the server will send the list of commands on that tick (possibly empty) to each client. The server and all clients will then process the commands and simulate that tick in exactly the same way. With Node.js this is actually quite simple due to possibility of code sharing between server and client. I'll just put the deterministic simulator in the /shared folder which can be run by both server and client. The server simulation is required so that there is an authoritative version of the simulation which clients cannot alter. Problem Now, the game has many entity classes, like Unit, Item, Tree etc. Entities are created in the simulator. However, for each class, it has some methods that are shared and some that are client-specific. For instance, the Unit class has addHp method which is shared. It also has methods like getSprite (gets the image of the entity), isVisible (checks if unit can be seen by the client), onDeathInClient (does a bunch of stuff when it dies only on the client like adding announcements) and isMyUnit (quick function to check if the client owns the unit). Up till now, I have been piling all the client functions into the shared Unit class, and adding a this.game.isServer() check when necessary. For instance, when the unit dies, it will call if (!this.game.isServer()) { this.onDeathInClient(); }. This approach has worked pretty fine so far, in terms of functionality. But as the codebase grew bigger, this style of coding seems a little strange. Firstly, the client code is clearly not shared, and yet is placed under the /shared folder. Secondly, client-specific variables for each entity are also instantiated on the server entity (like unit.sprite) and can run into problems when the server cannot instantiate the variable (it doesn't have Image class like on browsers). So my question is, is there a better way to organize the client code, or is this a common way of doing things for lockstep multiplayer games? I can think of a possible workaround, but it does have its own problems. Possible workaround (with problems) I could use Javascript mixins that are only added when in a browser. Thus, in the /shared/unit.js file in the /shared folder, I would have this code at the end: if (typeof exports !== 'undefined') module.exports = Unit; else mixin(Unit, LocalUnit); Then I would have /client/localunit.js store an object LocalUnit of client-side methods for Unit. Now, I already have a publish-subscribe system in place for events in the simulator. To remove the this.game.isServer() checks, I could publish entity-specific events whenever I want the client to do something. For instance, I would do this.publish('Death') in /shared/unit.js and do this.subscribe('Death', this.onDeathInClient) in /client/localunit.js. But this would make the simulator's event listeners list on the server and the client different. Now if I want to clear all subscribed events only from the shared simulator, I can't. Of course, it is possible to create two event subscription systems - one client-specific and one shared - but now the publish() method would have to do if (!this.game.isServer()) { this.publishOnClient(event); }. All in all, the workaround off the top of my head seems pretty complicated for something as simple as separating the client and shared code. Thus, I wonder if there is an established and simpler method for better code organization, hopefully specific to Node.js games.

    Read the article

  • UITableView backgroundColor always gray on iPad

    - by rjobidon
    Hi, When I set the backgroundColor for my UITableView it works fine on iPhone (device and simulator) but NOT on the iPad simulator. Instead I get a light gray background for any color I set including groupTableViewBackgroundColor. Steps to reproduce: Create a new navigation-based project. Open RootViewController.xib and set the table view style to "Grouped". Add this responder to the RootViewController:- (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor blackColor]; } Select Simulator SDK 3.2, build and run. You will get a black background (device and simulator). Select your target in the project tree. Click on Project : Upgrade Current Target for iPad. Build and run. You will get a light gray background. Revert the table view style to Plain and you will get a black background. Thanks for your help!

    Read the article

  • Unable to change the value of the variable

    - by Legend
    I'm using a discrete event simulator called ns-2 that was built using Tcl and C++. I was trying to write some code in TCL: set ns [new Simulator] set state 0 $ns at 0.0 "puts \"At 0.0 value of state is: $state\"" $ns at 1.0 "changeVal" $ns at 2.0 "puts \"At 2.0 values of state is: $state\"" proc changeVal {} { global state global ns $ns at-now "set state [expr $state+1]" puts "Changed value of state to $state" } $ns run Here's the output: At 0.0 value of state is: 0 Changed value of state to 0 At 2.0 values of state is: 0 The value of state does not seem to change. I am not sure if I am doing something wrong in using TCL. Anyone has an idea as to what might be going wrong here? EDIT: Thanks for the help. Actually, ns-2 is something over which I do not have much control (unless I recompile the simulator itself). I tried out the suggestions and here's the output: for the code: set ns [new Simulator] set state 0 $ns at 0.0 "puts \"At 0.0 value of state is: $state\"" $ns at 1.0 "changeVal" $ns at 9.0 "puts \"At 2.0 values of state is: $state\"" proc changeVal {} { global ns set ::state [expr {$::state+1}] $ns at-now "puts \"At [$ns now] changed value of state to $::state\"" } $ns run the output is: At 0.0 value of state is: 0 At 1 changed value of state to 1 At 2.0 values of state is: 0 And for the code: set ns [new Simulator] set state 0 $ns at 0.0 "puts \"At 0.0 value of state is: $state\"" $ns at 1.0 "changeVal" $ns at 9.0 "puts \"At 2.0 values of state is: $state\"" proc changeVal {} { global ns set ::state [expr {$::state+1}] $ns at 1.0 {puts "At 1.0 values of state is: $::state"} } $ns run the output is: At 0.0 value of state is: 0 At 1.0 values of state is: 1 At 2.0 values of state is: 0 Doesn't seem to work... Not sure if its a problem with ns2 or my code...

    Read the article

  • MIPS assembly: big and little endian confusion

    - by Barney
    I've run the following code snippet on the MIPS MARS simulator. That simulator is little endian. So the results are as follows: lui $t0,0x1DE # $t0 = 0x01DE0000 ori $t0,$t0,0xCADE # $t0 = 0x01DECADE lui $t1,0x1001 # $t1 = 0x10010000 sw $t0,200($t1) # $t1 + 200 bytes = 0x01DECADE lw $t2,200($t1) # $t2 = 0x01DECADE So on a little endian MIPS simulator, the value of $t2 at the end of the program is 0x01DECADE. If this simulator was big endian, what would the value be? Would it be 0xDECADE01 or would it still be 0x01DECADE?

    Read the article

  • UITableView backgroundColor always grey on iPad

    - by rjobidon
    Hi, When I set the backgroundColor for my UITableView it works fine on iPhone (device and simulator) but NOT on the iPad simulator. Instead I get a light grey background for any color I set including groupTableViewBackgroundColor. Steps to reproduce: Create a new navigation-based project. Open RootViewController.xib and set the table view style to "Grouped". Add this responder to the RootViewController:- (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor blackColor]; } Select Simulator SDK 3.2, build and run. You will get a black background (device and simulator). Select your target in the project tree. Click on Project : Upgrade Current Target for iPad. Build and run. You will get a light grey background. Revert the table view style to Plain and you will get a black background. Thanks for your help!

    Read the article

  • varchar comparison in SQL Server

    - by Ram
    I am looking for some SQL varchar comparison function like C# string.compare (we can ignore case for now, should return zero when the character expression are same and a non zero expression when they are different) Basically I have some alphanumeric column in one table which needs to be verified in another table. I cannot do select A.col1 - B.col1 from (query) as "-" operator cannot be applied on character expressions I cannot cast my expression as int (and then do a difference/subtraction) as it fails select cast ('ASXT000R' as int) Conversion failed when converting varchar 'ASXT000R' to int Soundex would not do it as soundex is same for 2 similar strings Difference would not do it as select difference('abc','ABC') = 4 (as per msdn, difference is the difference in the soundex of 2 character expressions and difference =4 implies least different) Is there any other way of doing it ?

    Read the article

  • Interface Builder "Simulate Interface" not working

    - by bpapa
    I am using Interface Builder to play around with some ideas. I never noticed that there is a "Simulate Interface" feature which apparently will render the nib in the iPhone simulator. So, I created a view, put one component in there (a Segmented Control), saved it, selected "Simulate Interface", the simulator launched but... nothing rendered in the simulator. Just a black screen. I thought maybe my nib wasn't complete enough, so I've tried it with all of my old nibs and I'm having the same problem with all of them. None of them render in the simulator at all. Is there some trick that I'm missing?

    Read the article

  • Static Libraries on iPhone device

    - by Akusete
    I have two projects, a Cocoa iPhone application and a static library which it uses. I've tested it successfully on the iPhone simulator, but when I try to deploy it to my iPhone device I get (symbol not found) link errors. If I remove the dependancy of the library the project builds/runs fine. I have made sure all the build settings are set to iPhoneOS not the simulator. Im sure its something simple, but has anyone run into similar problems moving from iPhone simulator to device? --EDIT: I have managed to create new projects (one for the application and one for the static library), and successfully get them to run on the iPhone or simulator. But I have a very strange problem... for each specific project I cannot get it working for BOTH the device and the simulator... I have double checked the build settings, made sure the libraries that are being references are for the matching build settings (I believe) but I cannot resolve these linking errors. I think I must be doing something very wrong... all the apple documentation says 'its super simple - one click' but this is giving me a lot of problems. This is probably something to do with xCode build settings, but I cannot seem to understand why selecting the different build platforms and rebuilding the libraries does not work.

    Read the article

  • ipad tabbar rotation

    - by MaKo
    hi, please help with this noob questions but really making me go crazy if I create a project from scratch (using windows based app) for the ipad, and add a tabbar , with firstviewController, and secondviewController, it works fine, starts in landscape mode, but in info.plist I set it to Landscape(left home button), but really in simulator starts with the button on the right side! in the FirstViewController.m (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) return YES; else { return NO; }} so it starts in landscape, and rotates as the simulator rotates, but if I create a template app for iphone tabbar, set the info.plist Initial interface orientation Landscape (left home button) and add the code above, IT DOESNT WORK!!! simulator starts with button at left but tab bar on the side, same problem that I had with an app that Im porting from iphone to ipad, (landscape intended) I get to the landscape start mode, but the tab bar remains on the side! also the only way to make the old ported app to show the simulator on the side was with UIInterfaceOrientation UIIntefaceOrientationLandscapeLeft (didnt work with Initial interface orientation), does not let me choose the value for the key, but it shows the simulator on landscape,, so,, what can I do please to show the tab bar on landscape mode??? the tabbar from scratch was made to see if the code will work , but it didnt?? why does it work in the tab bar made from windows app and not tab bar app? I just want the tab bar to show in landscape ahhh, thanks

    Read the article

  • transfering a container of data to different classes

    - by user340699
    I am passing a vector of bids from Trader class to Simulator class.which class then passes it on to the auctioneer class.something seems messed up, can anyone spot it please. Below is part of the code: Error: 199 expected primary-expression before '&' token //Class of Origin of the vector. class Trader { private: int nextBidId; public: Trader(); ~Trader(){}; Bid getNextBid(); Bid getNextBid(int trdId, int qty, int price, char type); void loadRange( vector <Bid> & bids ) {} ; void loadRange(BidList &, int trdId, int qty, int price, char type, int size); }; //To be received by the Simulator class Simulator { vector <Bid> list; Trader trader; Auctioneer auctioneer; public: void run(); }; // Passing the vector into a function in simulator Simulator::accept_bids(bid_vector::const_iterator begin, bid_vector::const_iterator end){ vector<Bid>::iterator itr; } //Its journey should end with the Auctioneer. who displays the data class Auctioneer { public: vector <Bid>v2;// created a new vector to hold the objects void accept_bids(vector<Bid> & bids); void displayBids(){return bids} };

    Read the article

  • segemented control in iphone not appearing as in interface builder

    - by zecougar
    here is what i see in IB and here is what appears in the simulator i've used a segmented control with style = "Bezelled". When i change the style to "Bar", IB and simulator are consistent in the display. the style is set in interface builder and not in code, if that matters Also - the edges look rather ugly in the simulator. not what i expected even when it rendered incorrectly. Thanks in advance

    Read the article

  • how to pass vector objects from one class to another

    - by gnwillix
    I am trying to make a program that generates bids automatically, then pack them into a vector and send them to the auctioneer.The simulator class, the simulator can then pass the bids to the auctioneer.How do I implement this communication.I thinking of sending the all vector conatiner of bids to the simulator.Can anyone demostrate a better way of sening vector objects from one class to another.

    Read the article

  • SSAS Compare: an intern’s journey

    - by Red Gate Software BI Tools Team
    About a month ago, David mentioned an intern working in the BI Tools Team. That intern happens to be me! In five weeks’ time, I’ll start my second year of Computer Science at the University of Cambridge and be a full-time student again, but for the past eight weeks, I’ve been living a completely different life. As Jon mentioned before, the teams here at Red Gate are small and everyone (including the interns!) is responsible for the product as a whole. I’ve attended planning sessions, UX tests, daily meetings, and everything else a full-time member of the team would; I had as much say in where we would go next with the product as anyone; I was able to see that what I was doing was an important part of the product from the feedback we got in the UX tests. All these things almost made me forget that this is just an internship and not my full-time job. First steps at Red Gate Being based in Cambridge, Red Gate has many Cambridge university graduates working for them. They also hire some Cambridge undergraduates for internships each summer. With its popularity with university graduates and its great working environment, Red Gate has managed to build up a great reputation. When I thought of doing an internship here in Cambridge, Red Gate just seemed to be the obvious choice for my first real work experience. On my first day at Red Gate, David, the lead developer for SSAS Compare, helped me settle in and explained what I’d be doing. My task was to improve the user experience of displaying differences between MDX scripts by syntax highlighting, script formatting, and improving the difference identification in the first place. David suggested how I should approach the problem, but left all the details and design decisions to me. That was when I realised how much independence and responsibility I’d have. What I’ve done If you launch the latest version of SSAS Compare and drill down to an MDX script difference, you can see the changes that have been made. In earlier versions, you could only see the scripts in plain text on both sides — either in black or grey, depending on whether they were the same or not. However, you couldn’t see exactly where the scripts were different, which was especially annoying when the two scripts were large – as they often are. Furthermore, if parts of the two scripts were formatted differently, they seemed to be different but were actually the same, which caused even more confusion and made it difficult to see where the differences were. All these issues have been fixed now. The two scripts are automatically formatted by the tool so that if two things are syntactically equivalent, they look the same – including case differences in keywords! The actual difference is highlighted in grey, which makes them easy to spot. The difference identification has been improved as well, so two scripts aren’t identified as different if there’s just a difference in meaningless whitespace characters, or when you have “select” on one side and “SELECT” on the other. We also have syntax highlighting, which makes it easier to read the scripts. How I did it In order to do the formatting properly, we decided to parse the MDX scripts. After some investigation into parser builders, I decided to go with the GOLD Parser builder and the bsn-goldparser .NET engine. GOLD Parser builder provides a fairly nice GUI to write, build, and test grammar in. We also liked the idea of separating the grammar building from parsing a text. The bsn-goldparser is one of many .NET engines for GOLD, and although it doesn’t support the newest features of GOLD Parser, it has “the ability to map semantic action classes to terminals or reduction rules, so that a completely functional semantic AST can be created directly without intermediate token AST representation, and without the need for glue code.” That makes it much easier for us to change the implementation in our program when we change the grammar. As bsn-goldparser is open source, and I wanted some more features in it, I contributed two new features which have now been merged to the project. Unfortunately, there wasn’t an MDX grammar written for GOLD already, so I had to write it myself. I was referencing MSDN to get the formal grammar specification, but the specification was all over the place, so it wasn’t that easy to implement and find. We’re aware that we don’t yet fully support all valid MDX, so sometimes you’ll just see the MDX script difference displayed the old way. In that case, there is some grammar construct we don’t yet recognise. If you come across something SSAS Compare doesn’t recognise, we’d love to hear about it so we can add it to our grammar. When some MDX script gets parsed, a tree is produced. That tree can then be processed into a list of inlines which deal with the correct formatting and can be outputted to the screen. Doing all this has led me to many new technologies and projects I haven’t worked with before. This was my first experience with C# and Visual Studio, although I have done things in Java before. I have learnt how to unit test with NUnit, how to do dependency injection with Ninject, how to source-control code with SVN and Mercurial, how to build with TeamCity, how to use GOLD, and many other things. What’s coming next Sadly, my internship comes to an end this week, so there will be less development on MDX difference view for a while. But the team is going to work on marking the differences better and making it consistent with difference indication in the top part of comparison window, and will keep adding support for more MDX grammar so you can see the differences easily in every comparison you make. So long! And maybe I’ll see you next summer!

    Read the article

  • SQL SERVER – DATEDIFF – Accuracy of Various Dateparts

    - by pinaldave
    I recently received the following question through email and I found it very interesting so I want to share it with you. “Hi Pinal, In SQL statement below the time difference between two given dates is 3 sec, but when checked in terms of Min it says 1 Min (whereas the actual min is 0.05Min) SELECT DATEDIFF(MI,'2011-10-14 02:18:58' , '2011-10-14 02:19:01') AS MIN_DIFF Is this is a BUG in SQL Server ?” Answer is NO. It is not a bug; it is a feature that works like that. Let us understand that in a bit more detail. When you instruct SQL Server to find the time difference in minutes, it just looks at the minute section only and completely ignores hour, second, millisecond, etc. So in terms of difference in minutes, it is indeed 1. The following will also clear how DATEDIFF works: SELECT DATEDIFF(YEAR,'2011-12-31 23:59:59' , '2012-01-01 00:00:00') AS YEAR_DIFF The difference between the above dates is just 1 second, but in terms of year difference it shows 1. If you want to have accuracy in seconds, you need to use a different approach. In the first example, the accurate method is to find the number of seconds first and then divide it by 60 to convert it to minutes. SELECT DATEDIFF(second,'2011-10-14 02:18:58' , '2011-10-14 02:19:01')/60.0 AS MIN_DIFF Even though the concept is very simple it is always a good idea to refresh it. Please share your related experience with me through your comments. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, PostADay, SQL, SQL Authority, SQL DateTime, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Bodies do not stay sticked together by joint in retina display

    - by Mike JM
    I'm rehearsing on Box2D revolute joints. Everything's going pretty well except for one thing. For some reason bodies joined together with revolute joints do not stay sticked, they start getting apart from each other from the app start when I run it on retina device or simulator. On non retina device it works just fine, as expected. Here's the screenshot of the non-retina version: And here's the behavior when I run the same app on retina device/simulator: I'm taking content scale factor into account.

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >