Search Results

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

Page 37/335 | < Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >

  • Java Matcher groups: Understanding The difference between "(?:X|Y)" and "(?:X)|(?:Y)"

    - by user358795
    Can anyone explain: Why the two patterns used below give different results? (answered below) Why the 2nd example gives a group count of 1 but says the start and end of group 1 is -1? public void testGroups() throws Exception { String TEST_STRING = "After Yes is group 1 End"; { Pattern p; Matcher m; String pattern="(?:Yes|No)(.*)End"; p=Pattern.compile(pattern); m=p.matcher(TEST_STRING); boolean f=m.find(); int count=m.groupCount(); int start=m.start(1); int end=m.end(1); System.out.println("Pattern=" + pattern + "\t Found=" + f + " Group count=" + count + " Start of group 1=" + start + " End of group 1=" + end ); } { Pattern p; Matcher m; String pattern="(?:Yes)|(?:No)(.*)End"; p=Pattern.compile(pattern); m=p.matcher(TEST_STRING); boolean f=m.find(); int count=m.groupCount(); int start=m.start(1); int end=m.end(1); System.out.println("Pattern=" + pattern + "\t Found=" + f + " Group count=" + count + " Start of group 1=" + start + " End of group 1=" + end ); } } Which gives the following output: Pattern=(?:Yes|No)(.*)End Found=true Group count=1 Start of group 1=9 End of group 1=21 Pattern=(?:Yes)|(?:No)(.*)End Found=true Group count=1 Start of group 1=-1 End of group 1=-1

    Read the article

  • Difference between these two namespaces in javascript

    - by Lol coder
    First off, all I'm trying to do is to structure my javascript code properly. I've been told I must not have anything global. So I took the 2 types of namespaces declaration from this answer and now asking you guys for the pros and cons of each. var namespace1 = new function () { var internalFunction = function () { }; this.publicFunction = function () { }; }; var namespace2 = { publicFunction: function () { } }; Also, how do i have a private function in the last one namespace2?

    Read the article

  • difference fixed width strings and zero-terminated strings

    - by robUK
    Hello, gcc 4.4.4 c89 I got into a recent discussion about "fixed width strings" and "zero terminated strings". When I think about this. They seem to be the same thing. A string with a terminating null. i.e. char *name = "Joe bloggs"; Is a fixed width string that cannot be changed. And also has a terminating null. Also in the discussion I was told that strncpy should never been used on 'zero terminated strings'. Many thanks for any susgestions,

    Read the article

  • Difference between Facebook query from iphone and from web

    - by Aashutosh
    Hi, I am creating a iphone application for the existing web application. The fql which is happening at the web is giving me right results but the fql happening at the iphone is not giving all the results. select name, pic_square, pic_big, uid, sex, birthday, relationship_status , current_location, meeting_sex, interests, music, tv, movies, books, quotes, education_history, work_history from user where uid = XXXXXXX is giving me different result in web when compared to the iphone. Thanks, Aashutosh

    Read the article

  • Difference between internet and Desktop jave EE app server

    - by immer
    Hello. I need some clarification. I know that in order to run a java EE project, one needs a java EE compliant application server, such as tomcat, jboss, glashfish, etc. But, i download these to my desktop, but how about when i run it online? Are Jboss, tomcat, glashfish, etc. application servers just for your desktop, or are these the app server internet service providers have as well. I am trying to use godaddy as my internet service provider; i called them, but the customer service guy didnt know what application server they had, or did i ask the wrong question? Or how can i know waht application server they have? Thank you, any help is greatly appreciated.

    Read the article

  • How to change XmlSchemaElement.SchemaType (or: difference between SchemaType and ElementSchemaType)

    - by Gregor
    Hey, I'm working on a XML Editor which gets all his information from the corresponding XSD file. To work with the XSD files I use the System.Xml.Schema Namespace (XmlSchema*). Because of an 'xsi:type' attribute in the XML I've to change the XmlSchemaType of an XmlSchemaElement. Until now I use in my code the 'ElementSchemaType' property of 'XmlSchemaElement'. The nice thing about it: it's read only. There is also in 'XmlSchemaElement' an 'SchemaType' property which is not read only, but always null (yes, XmlSchema and XmlSchemaSet are compiled). So how can I change the type of the 'XmlSchemaElement'? Or, also the same question: What is the diffrence between this two porperties? Some technical data: C#, .NET 3.5 The MSDN documentation is nearly the same for both: SchemaType Documentation: Gets or sets the type of the element. This can either be a complex type or a simple type. ElementSchemaType Documentation: Gets an XmlSchemaType object representing the type of the element based on the SchemaType or SchemaTypeName values of the element.

    Read the article

  • The difference between triangulation and mesh

    - by xiao
    I have done some computer graphical programming recently, and I have no experience before. I used the library call CGAL(computer geometry algorithm library). Also, I noticed that there is class for triangulation and also class for mesh. Is mesh just a kind of triangle net? Do they have any differences? Thanks!

    Read the article

  • Difference of two series in MySQL

    - by Brian
    I have a table with the following fields in MySQL: date, Value, Type. Type can be either exports or imports. I want a query that returns the trade deficit (exports-imports) for each month. Is this possible with a single query?

    Read the article

  • Help Forming An SQL Query That Selects The Max Difference Of Two Fields

    - by Frank
    I'm trying to select a record with the most effective votes. Each record has an id, the number of upvotes (int) and the number of downvotes (int) in a MySQL database. I know basic update, select, insert queries but I'm unsure of how to form a query that looks something like: SELECT * FROM topics WHERE MAX(topic.upvotes - topic.downvotes). Please excuse my made up SQL. The tutorials on SQL I find on the internet cover very basic stuff. Does anyone recommend a good book on this subject?

    Read the article

  • What's the difference between these LINQ queries ?

    - by SnAzBaZ
    I use LINQ-SQL as my DAL, I then have a project called DB which acts as my BLL. Various applications then access the BLL to read / write data from the SQL Database. I have these methods in my BLL for one particular table: public IEnumerable<SystemSalesTaxList> Get_SystemSalesTaxList() { return from s in db.SystemSalesTaxLists select s; } public SystemSalesTaxList Get_SystemSalesTaxList(string strSalesTaxID) { return Get_SystemSalesTaxList().Where(s => s.SalesTaxID == strSalesTaxID).FirstOrDefault(); } public SystemSalesTaxList Get_SystemSalesTaxListByZipCode(string strZipCode) { return Get_SystemSalesTaxList().Where(s => s.ZipCode == strZipCode).FirstOrDefault(); } All pretty straight forward I thought. Get_SystemSalesTaxListByZipCode is always returning a null value though, even when it has a ZIP Code that exists in that table. If I write the method like this, it returns the row I want: public SystemSalesTaxList Get_SystemSalesTaxListByZipCode(string strZipCode) { var salesTax = from s in db.SystemSalesTaxLists where s.ZipCode == strZipCode select s; return salesTax.FirstOrDefault(); } Why does the other method not return the same, as the query should be identical ? Note that, the overloaded Get_SystemSalesTaxList(string strSalesTaxID) returns a record just fine when I give it a valid SalesTaxID. Is there a more efficient way to write these "helper" type classes ? Thanks!

    Read the article

  • Difference in behaviour( gcc and MSVC++ )

    - by Prasoon Saurav
    Consider the following code. #include <stdio.h> #include <vector> #include <iostream> struct XYZ { int X,Y,Z; }; std::vector<XYZ> A; int rec(int idx) { int i = A.size(); A.push_back(XYZ()); if (idx >= 5) return i; A[i].X = rec(idx+1); return i; } int main(){ A.clear(); rec(0); puts("FINISH!"); } I couldn't figure out the reason why the code gives segmentation fault on Linux(IDE used: Code::Blocks) whereas on Windows(IDE used : MSVC++) it doesn't. When I used valgrind just to check what actually the problem was, I got this output. I got Invalid write of size 4 at four different places. Then why didn't the code crash when I used MSVC++? Am I missing something?

    Read the article

< Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >