Search Results

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

Page 75/377 | < Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >

  • What difference does it make to use several script blocks on a web page?

    - by Jan Aagaard
    What difference does it make to use more than one script block on a web page? I have pasted in the standard code for including Google Analytics as an example, and I have seen the same pattern used in other places. Why is this code separated into two separate script blocks instead of just using a single one? <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try{ var pageTracker = _gat._getTracker("UA-xxxxxx-x"); pageTracker._trackPageview(); } catch(err) {} </script>

    Read the article

  • Is there a semantic difference <span>'s and <div>'s?

    - by DavidR
    I know when coding HTML, I'm supposed to keep semantics in mind, e.g., h1 needs to be a main header, h2 needs to be a subheader, tables need to be tables, use <em> for emphasis instead of <i>, etc. Is there a proper difference between divs and spans except one is a block and the other is in-line? When I was learning I was told that <span>'s were for styling text mid-line. If I had a small blurb of text that I needed positioned at a certain point in my webpage, one that doesn't warrent a <p> tag, would I use a span should I stick with div's? What if that text needs to cover two lines (i.e., it needs a width) if it contains nothing but text, what should I use?

    Read the article

  • C++ is there a difference between assignment inside a pass by value and pass by reference function?

    - by Rémy DAVID
    Is there a difference between foo and bar: class A { Object __o; void foo(Object& o) { __o = o; } void bar(Object o) { __o = o; } } As I understand it, foo performs no copy operation on object o when it is called, and one copy operation for assignment. Bar performs one copy operation on object o when it is called and another one for assignment. So I can more or less say that foo uses 2 times less memory than bar (if o is big enough). Is that correct ? Is it possible that the compiler optimises the bar function to perform only one copy operation on o ? i.e. makes __o pointing on the local copy of argument o instead of creating a new copy?

    Read the article

  • Is there a difference between NSString compare: and isEqual(ToString): ?

    - by frenetisch applaudierend
    Occasionally I find code which tests if two NSStrings are the same like this: if ([str1 compare:str2] == NSOrderedSame) { // Do something } Now, I believe this is less readable than using isEqualToString: and it also has some nasty side effects, like if str1 == nil the if(..) evaluates to true, or when str2 == nil havoc might break upon us according to the Apple docs. But before I crusade against those statements in my companys code, I wanted to make sure I didn't miss some important point. So my question basically boils down to: Is there any difference between a compare: to NSOrderedSame and isEqual:?

    Read the article

  • What is the difference between as="element()+" and as="element()*" in XSL?

    - by Rachel
    What is the difference between using as="element(data)+" and as="element(data)" in xsl:variable. The below XSL solution works if use "+" but not when i use "". Can some one clarify. XSL code: <xsl:variable name="insert-data" as="element(data)+"> <xsl:for-each select="$insert-file/insert-data/data"> <xsl:sort select="xsd:integer(@index)"/> <xsl:variable name="index" select="xsd:integer(@index)" /> <xsl:variable name="nodeName" select="@nodeName" /> <data nodeName="{$nodeName}" index="{@index}" text-id="{$main-root/*//*[@id=$nodeName]/text()[sum((preceding::text(), .)/string-length(.)) ge $index]/generate-id(.)}"> <xsl:copy-of select="node()"/> </data> </xsl:for-each>

    Read the article

  • What's the Difference Between These Two Ruby Class Initialization Definitions?

    - by michaelmichael
    I'm working through a book on Ruby, and the author used a slightly different form for writing a class initialization definition than he has in previous sections of the book. It looks like this: class Ticket attr_accessor :venue, :date def initialize(venue, date) self.venue = venue self.date = date end end In previous sections of the book, it would've been defined like this: class Ticket attr_accessor :venue, :date def initialize(venue, date) @venue = venue @date = date end end Is there any functional difference between using the setter method, as in the first example, vs. using the instance variable as in the second? They both seem to work. Even mixing them up works: class Ticket attr_accessor :venue, :date def initialize(venue, date) @venue = venue self.date = date end end

    Read the article

  • What's the Difference Between These Two Ruby Class Initialaztion Definitions?

    - by michaelmichael
    I'm working through a book on Ruby, and the author used a slightly different form for writing a class initialization definition than he has in previous sections of the book. It looks like this: class Ticket attr_accessor :venue, :date def initialize(venue, date) self.venue = venue self.date = date end end In previous sections of the book, it would've been defined like this: class Ticket attr_accessor :venue, :date def initialize(venue, date) @venue = venue @date = date end end Is there any functional difference between using the setter method, as in the first example vs. using the instance variable in the second? They both seem to work. Even mixing them up seems to work: class Ticket attr_accessor :venue, :date def initialize(venue, date) @venue = venue self.date = date end end

    Read the article

  • What's the difference between Path and Polygon control? + issues when designing custom drawing user

    - by tomo
    I'm starting to design a custom control with rather complex drawing. It will be a kind of chart (a kind of radar chart). It will be composed of a few axises with labels, line-regions (like spider-network) and filled shapes. The main question is what's the difference between using Path control and Polygon control? What's better to use here? The goal is to prepare control with minimal amount of c# and try to do as much as possible in xaml / binding. The next important requirement is that control should resize to parent containers' width - if possible without any long recalulations in c#.

    Read the article

  • Percentage difference between different values in the same keys of two different arrays.

    - by Paul
    Hey. I'm looking for a solution to this problem. I got 2 arrays, like this: array(2) { [20100526]=> array(1) { ["ga:pageviews"]=> string(5) "19088" } [20100527]=> array(1) { ["ga:pageviews"]=> string(5) "15566" } } array(2) { [20100526]=> array(1) { ["ga:pageviews"]=> string(5) "12043" } [20100527]=> array(1) { ["ga:pageviews"]=> string(5) "11953" } } Now I'd like to create a new array, with the % difference between the values per key. Would be something like this: array(2) { [20100526]=> array(1) { ["ga:pageviews"]=> string(5) "88,23" } [20100527]=> array(1) { ["ga:pageviews"]=> string(5) "74,54" } } Can anyone help me how to create that array?

    Read the article

  • What is the difference between binding data in data grid view methods ??

    - by Ashish
    What is the difference between binding data in data grid view methods ?? <ItemTemplate> <asp:LinkButton ID="lnkBtnUserName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"UserFirstName")%>' CommandArgument='<%# Eval("UserID") %>' OnClick="lnkBtnUserName_Click" /> </ItemTemplate> and this second one <asp:TemplateField HeaderText="Employee ID"> <ItemTemplate> <asp:Label ID="lblempid" runat="server" Text='<%# Bind("EmpId.EmpId") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> means in method 1 Text='<%# DataBinder.Eval(Container.DataItem,"UserFirstName")%>' CommandArgument='<%# Eval("UserID") %>' method 2 Text='<%# Bind("EmpId.EmpId") also explain use one this CommandArgument='<%# Eval("UserID") in 1st one ????

    Read the article

  • Difference between Class Abstraction and Object Interfaces in PHP?

    - by Mark Tomlin
    What is the difference between a Class Abstraction and an Object Interfaces in PHP? I ask because, I don't really see the point to both of them, they both do the same thing! So, what are the advantages of disadvantages using both against one or the other? Class Abstraction: abstract class aClass { // Force extending class to define these methods abstract public function setVariable($name, $var); abstract public function getHtml($template); } Object Interface: interface iClass { // Force impementing class to define these methods public function setVariable($name, $var); public function getHtml($template); }

    Read the article

  • what is the difference between static class and normal class?

    - by Phsika
    when i prefer static or normal class? Or what is the difference between them? using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace staticmethodlar { class Program { static void Main(string[] args) { SinifA.method1(); } } static class SinifA { public static void method1() { Console.WriteLine("Deneme1"); } } public static class SinifB { public static void method2() { Console.WriteLine("Deneme2"); } } public class sinifC { public void method3() { Console.WriteLine("Deneme3"); } } public class sinifD : sinifC { void method4() { Console.WriteLine("Deneme4"); } sinifC sinifc = new sinifC(); // i need to use it:) } }

    Read the article

  • Jython: Is there any difference between adding to sys.path vs passing -D?

    - by trinth
    I have a python application that is trying to load some Java libraries (specifically Axis2 web services). When I add the necessary jars in Eclipse via PyDev Project Source Folders, everything seems to work fine. However, I want to be able to do this at run time by adding to sys.path, but then my application doesn't seem to work. In both cases I can load the jars just fine, but something must be different for there to be different results. My question is, is there a difference between adding jars via the sys.path at run time with sys.path.append() versus passing -D to the jython interpreter?

    Read the article

  • Whats the difference between a C++ and a Cocoa Project in Xcode?

    - by david
    I need to work with TagLib for my project. I've created a framework (and I tried using it as a lib) but the compiler cannot find #include < strings on compiling (No such file or Directory). I've created a test C++ project and it #includes < strings just fine. I've looked at the project settings and I cannot find a difference between them. But the standard cocoa projects obviously so not have the search path set to include C++ libraries (Or am I completely getting it wrong?). I've searched for a solution but no one else seems to have run into this problem.

    Read the article

  • What is the difference between these two ways of creating NSStrings?

    - by adame
    NSString *myString = @"Hello"; NSString *myString = [NSString stringWithString:@"Hello"]; I understand that using method (1) creates a pointer to a string literal that is defined as static memory (and cannot be deallocated) and that using (2) creates an NSString object that will be autoreleased. Is using method (1) bad? What are the major differences? Is there any instances where you would want to use (1)? Is there a performance difference? P.S. I have searched extensively on Stack Overflow and while there are questions on the same topic, none of them have answers to the questions I have posted above.

    Read the article

  • (iphone) Does it make difference to provide more images when the object is moving in a straight line?

    - by Eugene
    Hi. Among many animation scenarios, there are times when I want an object to move a straight line then change direction, move another straight line and so forth. Assuming I would use either UIImageView or CABasicAnimation with image arrays. Does it make difference to provide more images when the object is moving in a straight line? For example, point1 ---------point2 ------- point3 (all points are in a straight line) Providing an image at point2 to UIImageView or CABasicAnimation, gives any better animation result, assuming I don't need to change the animation speed along the course? If I were flashing each image myself, yes it would make the animation look smooth, but I'm giving the images to UIImageView/CABasicAnimation, and wonder what they do. Thank you

    Read the article

  • Is there any difference in the implementation of these three validation methods?

    - by dontWatchMyProfile
    Core Data is calling these methods in certain situations: - (BOOL)validateForInsert:(NSError **)outError; - (BOOL)validateForUpdate:(NSError **)outError; - (BOOL)validateForDelete:(NSError **)outError; I wonder if they're doing anything different, or if they're essentially doing the exact same things. As far as I know, these methods call the -validateValue:forKey:error: method once for every property. The only difference I can imagine is in the .validateForDelete: method. I see no reason why to validate an object when it shall be deleted, except for applying delete rules, probably only in the case of the DENY rule.

    Read the article

  • How to check if the sum of some records equals the difference between two other records in t-sql?

    - by Dan Appleyard
    I have a view that contains bank account activity. ACCOUNT BALANCE_ROW AMOUNT SORT_ORDER 111 1 0.00 1 111 0 10.00 2 111 0 -2.50 3 111 1 7.50 4 222 1 100.00 5 222 0 25.00 6 222 1 125.00 7 ACCOUNT = account number BALANCE_ROW = either starting or ending balance would be 1, otherwise 0 AMOUNT = the amount SORT_ORDER = simple order to return the records in the order of start balance, activity, and end balance I need to figure out a way to see if the sum of the non balance_row rows equal the difference between the ending balance and the starting balance. The result for each account (1 for yes, 0 for no) would be simply added to the resulting result set. Example: Account 111 had a starting balance of 0.00. There were two account activity records of 10.00 and -2.5. That resulted in the ending balance of 7.50. I've been playing around with temp tables, but I was not sure if there is a more efficient way of accomplishing this. Thanks for any input you may have!

    Read the article

  • What's the difference between FireBug's conole.log() and console.debug() ?

    - by 6bytes
    A very simple code to illustrate the difference. var x = [0, 3, 1, 2]; console.debug('debug', x); console.log('log', x); // above display the same result x.splice(1, 2); // below display kind of a different result console.debug('debug', x); console.log('log', x); The javascript value is exactly the same but console.log() displays it a bit differently than before applying splice() method. Because of this I lost quite a few hours as I thought splice is acting funny making my array multidimensional or something. I just want to know why does this work like that. Does anyone know? :)

    Read the article

  • Is there any difference these two pieces of code?

    - by Poiuyt
    #include<stdio.h> class A {public: int a; }; class B: public A {private: int a;}; int main(){ B b; printf("%d", b.a); return 0; } #include<stdio.h> class A {public: int a; }; class B: private A {}; int main(){ B b; printf("%d", b.a); return 0; } I ask because I get different errors: error: 'int B::a' is private error: 'int A::a' is inaccessible Apart from what the errors might reveal, is there any difference at all in the behaviour of these two pieces of code?

    Read the article

  • Hi, i have a c programming doubt? I want to know the difference between the two and where one is use

    - by aks
    Hi, i have a c programming doubt? I want to know the difference between the two and where one is useful over other? suppose i have a struct called employee as below: struct emp{ char first_name[10]; char last_name[10]; char key[10]; }; Now, i want to store the table of employee records, then which method should i use: struct emp e1[100]; // Or struct emp * e1[100]; I know the two are not same but would like to know a use case where second declaration would be of interest and more advantageous to use? Can someone clarify?

    Read the article

  • ExpressJS: What is the difference between app.local and res.local?

    - by aeyang
    I'm trying to learn Express and in my app I have middleware that passes the session object from the Request object to my Response object so that I can access it in my views: app.use((req, res, next) -> res.locals.session = req.session next() ) But app.locals is available to the view as well right? So is it the same if I do app.locals.session = req.session? Is there a convention for the types of things app.locals and res.locals are used for? I was also confused on what the difference is between res.render() and res.redirect()? When should each be used? Thanks for reading. Any help related to Express is appreciated!

    Read the article

  • Using GCC 4.2 to compile *.mm files is very very slow, but LLVM has done a very good job, any difference?

    - by jianhua
    My project is obj-c and C++ hybirid, filled with by both *.m and *.mm. When compiling, if choose GCC 4.2, *.m obj-c source files compile speed is very fast but *.mm very very slow, but LLVM 2.0 can do a very good job, it is very fast for both *.m and *.mm. My question: Is there any difference between LLVM and GCC 4.2 during compliling *.mm files? why GCC 3.2 is so slow? Any ieda or discussion will be appreciated, thanks in advance. ENV: XCODE 4.0.1

    Read the article

  • tcp flags in iptables: What's the difference between RST SYN and RST and SYN RST ? When to use ALL?

    - by Kris
    I'm working on a firewall for a virtual dedicated server and one of the things I'm looking into is port scanners. TCP flags are used for protection. I have 2 questions. The rule: -p tcp --tcp-flags SYN,ACK,FIN,RST SYN -j DROP First argument says check packets with flag SYN Second argument says make sure the flags ACK,FIN,RST SYN are set And when that's the case (there's a match), drop the tcp packet First question: I understand the meaning of RST and RST/ACK but in the second argument RST SYN is being used. What's the difference between RST SYN and RST and SYN RST ? Is there a "SYN RST" flag in a 3 way handshake ? Second question is about the difference between -p tcp --tcp-flags SYN,ACK,FIN,RST SYN -j DROP and -p tcp --tcp-flags ALL SYN,ACK,FIN,RST SYN -j DROP When should ALL be used ? When I use ALL, does that mean if the tcp packet with the syn flag doesn't have the ACK "and" the FIN "and" the RST SYN flags set, there will be no match ?

    Read the article

  • What is the difference between AF_INET and PF_INET constants?

    - by Denilson Sá
    Looking at examples about socket programming, we can see that some people use AF_INET while others use PF_INET. In addition, sometimes both of them are used at the same example. The question is: Is there any difference between them? Which one should we use? If you can answer that, another question would be... Why there are these two similar (but equal) constants? What I've discovered, so far: The socket manpage In (Unix) socket programming, we have the socket() function that receives the following parameters: int socket(int domain, int type, int protocol); The manpage says: The domain argument specifies a communication domain; this selects the protocol family which will be used for communication. These families are defined in <sys/socket.h>. And the manpage cites AF_INET as well as some other AF_ constants for the domain parameter. Also, at the NOTES section of the same manpage, we can read: The manifest constants used under 4.x BSD for protocol families are PF_UNIX, PF_INET, etc., while AF_UNIX etc. are used for address families. However, already the BSD man page promises: "The protocol family generally is the same as the address family", and subsequent standards use AF_* everywhere. The C headers The sys/socket.h does not actually define those constants, but instead includes bits/socket.h. This file defines around 38 AF_ constants and 38 PF_ constants like this: #define PF_INET 2 /* IP protocol family. */ #define AF_INET PF_INET Python The Python socket module is very similar to the C API. However, there are many AF_ constants but only one PF_ constant (PF_PACKET). Thus, in Python we have no choice but use AF_INET. I think this decision to include only the AF_ constants follows one of the guiding principles: "There should be one-- and preferably only one --obvious way to do it." (The Zen of Python)

    Read the article

< Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >