Search Results

Search found 8367 results on 335 pages for 'temporal difference'.

Page 156/335 | < Previous Page | 152 153 154 155 156 157 158 159 160 161 162 163  | Next Page >

  • SQL Server 2005: Insert a row in a table and update the same row

    - by vikas
    eg:table pkey --guid annualpay datefrom dateto--if null means current record percentannualincrease percent annual increase will be calculated only if there is a difference in newly inserted and previously existing last differing value. percentannualincrease = ([newannualpay-just previous pay(if different from current)]/newannualpay)*100 eg newid(),5000,today,null,0--very first row newid(),5000,today+1,null(*),0 newid,5500,today+2,null(*),?????????????--> need to be calculated before insert *--insert will close the previous record by updating dateto=null to todays date How can I do this stuff in a trigger???

    Read the article

  • Outlook Contact Export to CSV format differences

    - by Jeffsline
    Outlook 2003 and Outlook 2007 allow you to export your contacts to CSV format. Is there a difference between the two or is this in fact the same format; in other words, are they backward compatible or did Outlook 2007 create some new fields that Outlook 2003 would have trouble importing?

    Read the article

  • Should we use temporary variables for the returned values of functions?

    - by totymedli
    I thought about this: Is there a performance difference in these two practices: Store the return value of a function in a temporary variable than give that variable as a parameter to another function. Put the function into the other function. Specification Assuming all classes and functions are written correctly. Case 1. ClassA a = function1(); ClassB b = function2(a); function3(b); Case 2. function3(function2(function1())); I know there aren't a big difference with only one run, but supposed that we could run this a lot of times in a loop, I created some tests. Test #include <iostream> #include <ctime> #include <math.h> using namespace std; int main() { clock_t start = clock(); clock_t ends = clock(); // Case 1. start = clock(); for (int i=0; i<10000000; i++) { double a = cos(1); double b = pow(a, 2); sqrt(b); } ends = clock(); cout << (double) (ends - start) / CLOCKS_PER_SEC << endl; // Case 2. start = clock(); for (int i=0; i<10000000; i++) sqrt(pow(cos(1),2)); ends = clock(); cout << (double) (ends - start) / CLOCKS_PER_SEC << endl; return 0; } Results Case 1 = 6.375 Case 2 = 0.031 Why is the first one is much slower, and if the second one is faster why dont we always write code that way? Anyway does the second pratice has a name? I also wondered what happens if I create the variables outside the for loop in the first case, but the result was the same. Why?

    Read the article

  • What DirectShow Interface to use for capturing to Stream instead of creating actual file?

    - by jhorton
    I've got a DirectShow project where I want to capture and stream to a webserver. I have seen how to capture and create a file, but I'm looking for ideas on how to capture into something like a MemoryStream to transport through a NetworkStream. I'm also using the library DirectShowLib for the ability to write in C# if that makes any difference. Of if there is a sample that I overlooked in the SDK I would greatly appreciate the direction. Thanks in advance.

    Read the article

  • Using Variables for Class Names in Python?

    - by Sam McAfee
    I want to know how to use variables for objects and function names in Python. In PHP, you can do this: $className = "MyClass"; $newObject = new $className(); How do you do this sort of thing in Python? Or, am I totally not appreciating some fundamental difference with Python, and if so, what is it?

    Read the article

  • comparing application with api

    - by Night Walker
    Hi all I am looking for some compare application that i will be able to use from my code . I need to compare files and know if they identical if not to get the lines and text where the difference was found. Most;y i compare a text(ASCII) files. So i need program with easy api for that thing. Thanks for help.

    Read the article

  • grails mockFor closure wierdness

    - by hvgotcodes
    Right, so when I set up my mock using the testing plugin's mockFor method, I expect a method that returns null. If I do myControl.demand.theMethod {return null} in the debugger, the value that I set the 'theMethod' call result to is some closure in the debugger. If I do myControl.demand.theMethod {->return null} the value is null, as expected. I dont understand the difference....

    Read the article

  • Detect pointer arithmetics because of LARGEADDRESSAWARE

    - by Suma
    I would like to switch my application to LARGEADDRESSAWARE. One of issues to watch for is pointer arithmetic, as pointer difference can no longer be represented as signed 32b. Is there some way how to find automatically all instances of pointer subtraction in a large C++ project? If not, is there some "least effort" manual or semi-automatic method how to achieve this?

    Read the article

  • Use of malloc() and free() in C++

    - by Matt H
    Is there any reason to use malloc and free in C++ over their more modern counterparts? Occasionally I see this, and I can't see why some people do it. Are there any advantages/disadvantage, or is there no real difference, except that it's just better to use C++ constructs in C++?

    Read the article

  • jquery document height reported incorrectly by IE (on XP) first time

    - by Zhami
    I'm having a "first time" problem with IE, which reports a different value for $(document).height(); when the page first loads versus subsequent queries. The difference is 17 pixels regardless of the opening size of the window -- on document ready, the height reported is 17 pixels larger than is subsequently reported. I wonder if this is an artifact of some aspect of my page (some margins or paddings somewhere), but so far can't account for 17 pixels.

    Read the article

  • how to adjust JFrame and JInternal frames with any screen size?

    - by Zakaria Marrah
    I am working on a swing application that starts with JFrame, but all the other frames are included as JInternalFrames, and i am facing some serious screen size problems when i instaled it in different computers, i used the following methode to set the JFrame in full screen Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setBounds(0, 0, screenSize.width, screenSize.height); JFrame.setExtendedState(JFrame.MAXIMIZED_BOTH); but thre is no no difference, i want also to adjust the JInternalFrames with the screen size too. if you have any suggestions, solution please help :D

    Read the article

  • Reflection: different ways to retrieve property value

    - by jules
    I'm retrieving an IEnumerable list of properties via following code: BindingFlags bindingFlag = BindingFlags.Instance | BindingFlags.Public; var dataProperties = typeof(myParentObject).GetProperties(bindingFlag); Then I'm iterating through the list and retrieving the value for each property. I've come across two different approaches to doing this, and just wondered what the difference is between them: 1) object propertyValue = property.GetGetMethod().Invoke(myObject, null); 2) object propertValue = property.GetValue(myObject, null)

    Read the article

  • GNU Emacs is crashing with -nw

    - by Jack
    When I run emacs with -nw option, the emacs really open, but I can't do more nothing. As if the user input is blocked and no keyboard signal is received and/or interpreted. I've tried run without load .emacs file and some other behaviors: emacs -nw -Q --no-desktop --debug-ini foo.c But makes no difference and strangely the GUI-version(using Gtk) is working fine. My gnu-emacs version is GNU Emacs 23.3.1 Any help to help to fix it is very appreciated.

    Read the article

  • Monitor vs Watch on SourceForge Tracker

    - by Vulcan Eager
    What exactly is the difference Watching and Monitoring a project on the SourceForge Tracker UI? PS: The tool tips are really helpful. Hold your mouse over the "Monitor" button and it says "Monitor this project"... hold it over "Watch" and it says nothing. That's really awesome coming from SF.

    Read the article

  • Qt releasing memory occopied by unneeded images

    - by Gerhman
    I have a QML Flickable with 3 QML image elements that cycle through 8 image files. My problem is for each new image it loads into memory it does not release the the unused image. This is causing memory usage to become double what is necessary at times. I would like to know if there is some function I can use to force it to unload all the unused images? If it makes a difference, this is mainly for Symbian.

    Read the article

  • Example of xargs' -x option in action

    - by Ole Tange
    GNU xargs has option '-x'. The man page says: -x Exit if the size (see the -s option) is exceeded. But xargs seems to not care if -x is set or not. I have been unable to make an example in which the -x has any effect at all. Please provide two examples in which the only difference is an added -x and that produce different output.

    Read the article

< Previous Page | 152 153 154 155 156 157 158 159 160 161 162 163  | Next Page >