Search Results

Search found 4206 results on 169 pages for 'equals operator'.

Page 93/169 | < Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >

  • ordering by a property on a joined table linq to sql

    - by Gazeth
    I have the following linq query from o in context.Opportunities join i in context.Interactions on o.OpportunityID equals i.OpportunityID into ints from i in ints.DefaultIfEmpty() orderby i.StatusID descending, o.StatusID descending select o Now i want to then do a distinct on the opportunities table but doing so removes my orderby. I know that you can do Distinct().OrderBy but how do i get a reference to the interactions table that was joined when I'm only selecting the opportunity entity?

    Read the article

  • pls give reason why this java program always comes to the else part

    - by Anbu
    public class Test { public static void main(String[] args){ if (5.0 5) // (5.0<5) for both case it is going to else System.out.println("5.0 is greater than 5"); else System.out.println("else part always comes here"); /another sample/ if (5.0 == 5) System.out.println("equals"); else System.out.println("not equal"); } } can any one explain the first "if statement" why it always come to else part

    Read the article

  • concurrentmodificationexception hashmap in java

    - by chetan
    I write following code but when this run it generate concurrentmodificationexception if( attendancePolicy.getType().equals( AttendanceConstants.EMPLOYEE_ATTENDANCE_POLICY ) ) { synchronized( attendancePolicy.getListEmployee() ) { for( EmployeeAttendancePolicy employeeAttendancePolicy : attendancePolicy.getListEmployee() ) { employeeInfo = employeeInfoSessionBeanLocal.findEmployeeInfoEntityByEmployeeInfoId( employeeAttendancePolicy.getEmployeeId() ); if( employeeInfo != null ) { employeeAttendancePolicy.setEmpName( employeeInfo.getFirstName() + " " + employeeInfo.getMiddleName() + " " + employeeInfo.getLastName() ); company = companySessionBeanLocal.findCompanyById( employeeInfo.getCompanyId() ); employeeAttendancePolicy.setCompanyName( company.getName() ); department = departmentSessionBeanLocal.findDepartmentEntityByDepartmentId( employeeInfo.getDepartmentId() ); employeeAttendancePolicy.setDepartmentName( department.getName() ); } else { attendancePolicy.getListEmployee().remove( employeeAttendancePolicy ); } } } }

    Read the article

  • Java lang object

    - by Neeraj
    why java Object class has two methods hashcode() and equals()? One of them looks redundant and its percolated to the bottom most derived class?

    Read the article

  • What is MySql equivalent of Sql Server Full Text Search?

    - by Nitesh Panchal
    Hello, I have worked with Sql Server in past and used it's very nice feature called Sql Full Text Search. Now i have to work with MySql. Can anybody tell me what is equivalent of Full Text Search in MySql? I am using free edition of MySql and not a commercial one. If not, then what else can we do to mimic Full Text Search and get over the limitations of LIKE operator? Thanks in advance :)

    Read the article

  • Doubt in Conditional inclusion

    - by Philando Gullible
    This is actually extracted from my module (Pre-processor in C) The conditional expression could contain any C operator except for the assignment operators,increment, and decrement operators. I am not sure if I am getting this statement or not since I tried using this and it worked.Also for other manipulation a probable work around would be to simply declare macro or function inside the conditional expression,something like this to be precise. Also I don't understand what is the rationale behind this rule. Could somebody explain? Thanks

    Read the article

  • How to differentiate two tables

    - by Nemat
    I have two tables and I want to get all records from one table that are different from the records in second table. Eg.: if we have four records in the first table like A,B,C,D and three records in the second table thats A,B,C then the answer of query should be D. I have tried "EXCEPT" operator but it doesn't work fine. Kindly help me in writing correct query for the given problem.

    Read the article

  • mysql: Can I use two "where"s? Like, "SELECT * FROM table WHERE something and something"?

    - by KeriLynn
    I have a table with my products and I'm trying to write a page that would pull bracelets with certain colors from the database. So here's what I have right now (in php): $query = "SELECT * FROM products WHERE (products.colors LIKE '%black%')"; But I only want to select rows where the value for the column "category" equals "bracelet". I've tried a few different things, but I keep getting warnings and errors. I appreciate any help you can give, thank you!

    Read the article

  • Using two threads and controlling one from the other in java?

    - by sidra
    Can someone please help me out. I need to use two threads in a way that one thread will run permanently while(true) and will keep track of a positioning pointer (some random value coming in form a method). This thread has a logic, if the value equals something, it should start the new thread. And if the value does not equal it should stop the other thread. Can someone give me some code snippet (block level) about how to realize this?

    Read the article

  • MongoDB using NOT and AND together

    - by Stankalank
    I'm trying to negate an $and clause with MongoDB and I'm getting a MongoError: invalid operator: $and message back. Basically what I want to achieve is the following: query = { $not: { $and: [{institution_type:'A'}, {type:'C'}] } } Is this possible to express in a mongo query? Here is a sample collection: { "institution_type" : "A", "type" : "C" } { "institution_type" : "A", "type" : "D" } { "institution_type" : "B", "type" : "C" } { "institution_type" : "B", "type" : "D" } What I want to get back is the following: { "institution_type" : "A", "type" : "D" } { "institution_type" : "B", "type" : "C" } { "institution_type" : "B", "type" : "D" }

    Read the article

  • Why doesn't this inner class compile?

    - by Vincenzo
    This is my code: #include <algorithm> class A { void f() { struct CompareMe { bool operator() (int i, int j) { return i < j; } } comp; int a[] = {1, 2, 3, 4}; int found = std::min_element(a[0], a[3], comp); } } Error message: no matching function for call to ‘min_element(int&, int&, A::f()::CompareMe&) What am I doing wrong?

    Read the article

  • equal insread of distinct

    - by MirooEgypt
    SELECT DISTINCT IncreasmentAmount, Name, regionid FROM Pricing.GroupOfRegions where regionid in (6,7) i have this result 12.80 AB 6 13.00 ABC 6 15.00 AC 6 12.80 AB 7 13.00 ABC 7 i wanna add more condition where IncreasmentAmount are equals which means i got the rows where regionid in (6,7) and have the same IncreasmentAmount so i got finally 12.80 AB 6 12.80 AB 7

    Read the article

  • LINQ display row numbers

    - by timvaines
    I simply want to include a row number against the returned results of my query. I found the following post that describes what I am trying to achieve but gives me an exception http://vaultofthoughts.net/LINQRowNumberColumn.aspx "An expression tree may not contain an assignment operator" In MS SQL I would just use the ROWNUMBER() function, I'm simply looking for the equivalent in LINQ.

    Read the article

  • Intermediate values in C++

    - by sterh
    Hello. I can not find how to implement a design in C++. In the language of Delphi in case the operator can write the following design: case s[j] of '0'..'9','A'..'Z','a'..'z','_': doSomeThing(); How can i do the same in c++. Attracts me is the construction type 'a' .. 'z' and etc... Thank you

    Read the article

  • Using rowDiffs() to calculate difference in values in matrix

    - by user1723765
    I'm using the rowDiffs() command to calculate the step by step difference in 116 rows in a matrix. I get the following error: Error in r[i1] - r[-length(r):-(length(r) - lag + 1L)] : non-numeric argument to binary operator I have no idea why this is happening. I could take the diff() separately for each row and it would work. Any ideas? Here's the data: https://dl.dropbox.com/u/22681355/data.csv Code: a=rowDiffs(data)

    Read the article

  • AS3 - Can I know if a class implements an interface (or is a subclass of another class) ?

    - by lk
    With this code function someFunction(classParam:Class):Boolean { // how to know if classParam implements some interface? } i.e. Comparing classParam with IEventDispatcher interface: someFunction(EventDispatcher) // returns true someFunction(Object) // returns false I know it can't be done with is operator. But, is there a way to do it? Is there a way to know if a class implements some interface? (or is a subclass of another class?)

    Read the article

< Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >