Search Results

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

Page 29/335 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Difference between performSelectorInBackground and NSOperation Subclass

    - by AmitSri
    I have created one testing app for running deep counter loop. I run the loop fuction in background thread using performSelectorInBackground and also NSOperation subclass separately. I am also using performSelectorOnMainThread to notify main thread within backgroundthread method and [NSNotificationCenter defaultCenter] postNotificationName within NSOperation subclass to notify main thread for updating UI. Initially both the implementation giving me same result and i am able to update UI without having any problem. The only difference i found is the Thread count between two implementations. The performSelectorInBackground implementation created one thread and got terminated after loop finished and my app thread count again goes to 1. The NSOperation subclass implementation created two new threads and keep exists in the application and i can see 3 threads after loop got finished in main() function. So, my question is why two threads created by NSOperation and why it didn't get terminated just like the first background thread implementation? I am little bit confuse and unable to decide which implementation is best in-terms of performance and memory management. Thanks

    Read the article

  • Difference between putting variables in header vs putting variables in source

    - by Mohit Deshpande
    Say I declare a header file with a variable: int count; Then in the source file, I want to use count. Do I have to declare it as: extern int count Or can I just use it in my source file? All assuming that I have #include "someheader.h". Or should I just declare it in the source file? What is the difference between putting count in the header file vs the source file? Or does it not matter?

    Read the article

  • Difference between focus and focus-in(out)-event signals

    - by spajak
    Hello What's the difference between "focus" and "focus-in(out)-event" signals in GTK+? Which one is emitted firs? How are they related to keyboard(TAB) & mouse clicks. Do they depend on each other? I'm asking this because I want to keep track of currently focused widget within toplevel window and I don't want to test HAS_FOCUS flag of every widget when I need it. The widgets I'm interested of are deep inside other containers, boxes etc. What would be the best way in this situation for keeping & updating focused widget pointer?

    Read the article

  • difference between signtool and sn or al for assembly signing

    - by sveerap
    Hi, I see tool like SN which generates private/public key pair for signing an assembly. and using AL tool we can assign a strong name to an assembly And we have also Sign tool which is used for signing the assembly (probably for using with certificates exclusively?). What is the exact difference between the two?. Is it sign tool have to be used when working with certificates and can it we acheive it SN?. or are they totally different.? Please help.

    Read the article

  • Difference between implementing an interface and applying an attribute in C#

    - by RemotecUk
    This might be a stupid question but Ill ask anyway, I was reading "OOP Demystified: A Self-Teaching Guide by Jim Keogh and Mario Giannini" chapter 11 which covers interfaces. The examples in this book are C++. I noticed that C++ uses ISerializable to make a class serializable which you would implement where as in C# you just attribute the class with the [Serializable] attribute. What is the key difference here? Is it that with an interface you must provide the implementation where as if you attribute something the compiler will work out the implementation for you? I guess that with the [Serializable] attribute the .Net framework uses reflection to make the serialized object from the actual object. That said is it possible in that case to have an [Disposable] attribute or using my theory above the framework wont know how to actually dispose of an object hence you have to do it yourself? Would be grateful for a clarification. Thanks.

    Read the article

  • Difference between weblogic and websphere?

    - by Abhishek Jain
    I do not find actual difference between these two J2EE server. From my past experience, I found out following: WL is evolving more faster than WAS. WL is more user friendly than WAS. To simply deploy a application in WAS, we need to go in deep and its difficult to find if u are new to it. I found out that WAS is slower in some machine than WL. I found out that Classloading is easier to understand and effective in WL than WAS Above all are my experiences but not actual facts. I want to know more in this respect. Please clear my doubts. If possible please provide each J2EE server's pros and cons. -Abhishek

    Read the article

  • [PHP] Difference between normal and magic setters and getters

    - by Saif Bechan
    I am using a magic getter/setter class for my session variables, but I don't see any difference between normal setters and getters. The code: class session { public function __set($name, $value) { $_SESSION[$name] = $value; } public function __unset($name) { unset($_SESSION[$name]); } public function __get($name) { if(isset($_SESSION[$name])) { return $_SESSION[$name]; } } } Now the first thing I noticed is that I have to call $session->_unset('var_name') to remove the variable, nothing 'magical' about that. Secondly when I try to use $session->some_var this does not work. I can only get the session variable using $_SESSION['some_var']. I have looked at the PHP manual but the functions look the same as mine. Am I doing something wrong, or is there not really anything magic about these functions.

    Read the article

  • Difference between C# and java big endian bytes using miscutil

    - by Eric Hauser
    I'm using the miscutil library to communicate between and Java and C# application using a socket. I am trying to figure out the difference between the following code (this is Groovy, but the Java result is the same): import java.io.* def baos = new ByteArrayOutputStream(); def stream = new DataOutputStream(baos); stream.writeInt(5000) baos.toByteArray().each { println it } /* outputs - 0, 0, 19, -120 */ and C#: using (var ms = new MemoryStream()) using (EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Big, ms, Encoding.UTF8)) { writer.Write(5000); ms.Position = 0; foreach (byte bb in ms.ToArray()) { Console.WriteLine(bb); } } /* outputs - 0, 0, 19, 136 */ As you can see, the last byte is -120 in the Java version and 136 in C#.

    Read the article

  • Difference between Apache Tapestry and Apache Wicket

    - by Stephan Schmidt
    Apache Wicket ( http://wicket.apache.org/ ) and Apache Tapestry ( http://wicket.apache.org/ ) are both component oriented web frameworks - contrary to action based frameworks like Stripes - by the Apache Foundation. Both allow you to build your application from components in Java. They both look very similar to me. What are the differences between those two frameworks? Has someone experience in both? Specifically: How is their performance, how much can state handling be customized, can they be used stateless? What is the difference in their component model? What would you choose for which applications? How do they integrate with Guice, Spring, JSR 299? Edit: I have read the documentation for both and I have used both. The questions cannot be answered sufficently from reading the documentation, but from the experience from using these for some time, e.g. how to use Wicket in a stateless mode for high performance sites. Thanks.

    Read the article

  • Difference between normal and magic setters and getters

    - by Saif Bechan
    I am using a magic getter/setter class for my session variables, but I don't see any difference between normal setters and getters. The code: class session { public function __set($name, $value) { $_SESSION[$name] = $value; } public function __unset($name) { unset($_SESSION[$name]); } public function __get($name) { if(isset($_SESSION[$name])) { return $_SESSION[$name]; } } } Now the first thing I noticed is that I have to call $session->_unset('var_name') to remove the variable, nothing 'magical' about that. Secondly when I try to use $session->some_var this does not work. I can only get the session variable using $_SESSION['some_var']. I have looked at the PHP manual but the functions look the same as mine. Am I doing something wrong, or is there not really anything magic about these functions.

    Read the article

  • LINQ and set difference

    - by Pierre
    I have two collections a and b. I would like to compute the set of items in either a or b, but not in both (a logical exclusive or). With LINQ, I can come up with this: IEnumerable<T> Delta<T>(IEnumerable<T> a, IEnumerable<T> b) { return a.Except (b).Union (b.Except (a)); } I wonder if there are other more efficient or more compact ways of producing the difference between the two collections.

    Read the article

  • Difference between mutableArrayValueForKey and calling insertObject:inEmployeesAtIndex: directly

    - by jasonbogd
    I have a question regarding using KVO-compliant methods to insert/remove objects from an array. I'm working through Aaron Hillegass' Cocoa Programming for Mac OS X and I saw the following line of code (in the insertObject:inEmployeesAtIndex: method: [[undoManager prepareWithInvocationTarget:self] removeObjectFromEmployeesAtIndex:index]; Correct me if I'm wrong, but I always thought it was better to call mutableArrayValueForKey: and then removeObjectAtIndex:...so I tried changing the above line to this: [[undoManager prepareWithInvocationTarget:[self mutableArrayValueForKey:@"employees"]] removeObjectAtIndex:index]; And it didn't work. Can someone explain the difference and why the first line works but the second line doesn't?

    Read the article

  • Difference between 'Web Site' and 'Project' in Visual Studio

    - by Gudmundur Orn
    Duplicate http://stackoverflow.com/questions/344473/asp-net-website-or-web-application-project I have noticed that there is clearly a difference in what you get when you fire up Visual Studio 2008 and choose 'New Project' - 'ASP.NET Web Application' instead of 'New Web Site' - 'ASP.NET Web Site'. For example if you choose 'Project', then you can compile to .dll and each page gets a *.aspx.designer.cs codebehind file. 1) Why do we have these two different project types? 2) Which do you prefer? 3) Why would I choose one over the other? 4) What's the deal with the *.aspx.designer.cs files?

    Read the article

  • difference between DataContract attribute and Serializable attribute in .net

    - by samar
    I am trying to create a deep clone of an object using the following method. public static T DeepClone<T>(this T target) { using (MemoryStream stream = new MemoryStream()) { BinaryFormatter formatter = new BinaryFormatter(); formatter.Serialize(stream, target); stream.Position = 0; return (T)formatter.Deserialize(stream); } } This method requires an object which is Serialized i.e. an object of a class who is having an attribute "Serializable" on it. I have a class which is having attribute "DataContract" on it but the method is not working with this attribute. I think "DataContract" is also a type of serializer but maybe different than that of "Serializable". Can anyone please give me the difference between the two? Also please let me know if it is possible to create a deepclone of an object with just 1 attribute which does the work of both "DataContract" and "Serializable" attribute or maybe a different way of creating a deepclone? Please help!

    Read the article

  • Difference between 'scope' and 'namespace'?

    - by katriel
    What is the difference, in general, between the concepts of namespaces and scope? To my understanding, both describe the parts of a program in which a variable/object/method/function will be accessible. I understand that 'scope' tends to be a property of the variable (e.g., "This variable has global scope"), while a 'namespace' is a property of the program (e.g., "A Python function creates a local namespace"). Are there other differences? Global scope vs global namespace addresses a slightly narrower question: global namespaces in C++. http://www.alan-g.me.uk/tutor/tutname.htm states, There are a few very subtle differences between the terms but only a Computer Scientist pedant would argue with you, and for our purposes namespace and scope are identical. What are those subtle differences? Under what circumstances or with which kinds of languages do people use each concept?

    Read the article

  • Difference between piping a file to sh and calling a shell file

    - by Peter Coulton
    This is what was trying to do: $ wget -qO- www.example.com/script.sh | sh which quietly downloads the script and prints it to stdout which is then piped to sh. This unfortunately doesn't quite work, failing to wait for user input a various points, aswell as a few syntax errors. This is what actually works: $ wget -qOscript www.example.com/script.sh && chmod +x ./script && ./script But what's the difference? I'm thinking maybe piping the file doesn't execute the file, but rather executes each line individually, but I'm new to this kind of thing so I don't know.

    Read the article

  • Difference between halo and mx namespace

    - by Andree
    Hi there ! As far as I know, the support for library://ns.adobe.com/flex/halo namespace has been dropped, and now we have to use library://ns.adobe.com/flex/mx instead (reference). Can someone provide if there's any difference between the two namespaces? I am just starting to learn Flex and this change make me confused. For example, if I have an <mx:Tree> tag in my mxml document, the compiler complains that <mx:Tree> could not be resolved to a component implementation. But if I change my mx namespace to use the old one instead (halo), it successfully compiled without error. Thanks. Andree Updated: By the way, I use Flex SDK command line compiler in Windows. mxmlc --version Version 4.0.0 build 10485

    Read the article

  • How to select difference using sql?

    - by ganuke
    I wrote a sql query to retrieve data as follows: SELECT (MAX (b.filledqty) - MAX (a.filledqty)) AS filledtoday FROM clientordermas a, clientordermas b WHERE a.clordid = 'w9110126' AND b.clordid = 'w9110126' AND (SELECT max(a.price) FROM clientordermas a WHERE a.clordid = 'w9110126') < 1000; There are three records in the table for the given clordid with price values 800, 900 1200. So, what I need is to get the difference between 1200 and 900 which is 300. But, the above statement always returns 0. What I should get is MAX (b.filledqty) retuns 1200 and MAX (a.filledqty) retuns 900. But it is not happening. This is not the exact problem I am facing but a simplified version of it. Can someone please help?

    Read the article

  • ASP.NET MVC: What's the difference in concept between Service and Repository

    - by Richard77
    Hello, The question I'm asking is kind of subjective. I've seen twice, while exercising with real projects such as StoreFront, both Repository and Services. Sometimes they can just be folders or projects attached to the solution. But they contain classes and interfaces. So, I'd like to know what goes to the repository and what goes to the services. So far, I was familiar with repositories (we put methods and properties in the repository to reduce the complexity in the controller). How about the services? So, ASP.NET MVC: What's the difference in concept between Service and Repository? (Maybe none) My question is Kind of subjective, but I'd like to make sure that I'm not missing anything. Thanks for helping

    Read the article

  • What is difference between " * " and "Auto" in Silverlight Grid Layout Definitions

    - by user203687
    trying to understand the following: <Grid Name="Root"> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> </Grid> Can anyone help me in explaining the difference between * and Auto in the above snippet? thanks

    Read the article

  • Difference between C++ Keyboard keycode and JAVA KeyEvent keycode

    - by Auxiliary
    I noticed a difference between the keycodes that vkCode in C++ gives and the ones that Java's KeyEvent gives us. (Ofcourse the normal characters have the same code (0 = 48 just like the ASCII) but they differ in the other keys). Is there a way to 'translate' them from one to the other (What's the logic behind each one?) or am I supposed to use loads of switches and IFs for that. If it helps, my app is half in C++ and half in JAVA because of the Native Hooks that c++ gives us and it gets the keycodes of the keys that the user presses and then the java is going to use them. Thanks in advance.

    Read the article

  • difference between AJAX POST and GET

    - by Mohit Kumar
    $.ajax({ type: 'POST', url: path, data: '{AreaID: ' + parentDropdownList.val() + '}', contentType: 'application/json; charset=utf-8', dataType: 'json', success: function(response) { } }); In above code I am using type: 'POST'. My senior told me that I also can use 'GET' in type. But dint find the difference between 'POST' and 'GET' and I also want to know what is the use of type, contentType, and dataType. Could anyone one explain me why we use these type, contentType and dataType. Thanks in advance.

    Read the article

  • time difference on heroku server

    - by railsnew
    There seems to be a time difference on heroku server. >> Customer.last.id => 584 >> Customer.last.created_at => Thu, 06 May 2010 01:43:20 UTC +00:00 >> Time.zone => #<ActiveSupport::TimeZone:0x2b1dec47e5c0 @utc_offset=0, @tzinfo=#<TZInfo::DataTimezone: Etc/UTC>, @name="UTC"> >> Time.now => Wed May 05 19:05:15 -0700 2010 >> Time.now.zone => "PDT" Notice that current time is May 05 19...however, created_at date for last record is May 06 01:43. This does not make any sense. What can be causing this and how would I go about fixing this?

    Read the article

  • What is the difference between Window.load and document.readyState

    - by prakash
    Hi All, I have one question , In my ASP.NET MVC web application i have to do certain validation once page and all controls got loaded. In javascript i was using belwow line of code for calling a method. window.load = JavascriptFunctionName ; Some one from my team asked me not used above line of code Instead use JQuery to do the same document.attachEvent("onreadystatechange", function() { if (document.readyState === "complete") { CheckThis(); } }); Please help me in understanding what is the difference between two. When i tested by keeping alert in both Jquery check is executing first and calling the CheckThis function where as window.load is taking some time and executing after it. Please suggest

    Read the article

  • System.Interactive: Difference between Memoize() and MemoizeAll()?

    - by Joel Mueller
    In System.Interactive.dll (v1.0.2521.0) from Reactive Extensions, EnumerableEx has both a Memoize method and a MemoizeAll method. The API documentation is identical for both of them: Creates an enumerable that enumerates the original enumerable only once and caches its results. However, these methods are clearly not identical. If I use Memoize, my enumerable has values the first time I enumerate it, and seems to be empty the second time. If I use MemoizeAll then I get the behavior I would expect from the description of either method - I can enumerate the result as many times as I want and get the same results each time, but the source is only enumerated once. Can anyone tell me what the intended difference between these methods is? What is the use-case for Memoize? It seems like a fairly useless method with really confusing documentation.

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >