Search Results

Search found 4593 results on 184 pages for 'operator equal'.

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

  • Order column in a datatable

    - by superartsy
    I have two tables - Parent table (Clients- ClntID,ClntName) And Child Table ( Orders- ClntID,OrderNumber,OrderDate) - Order Number column has a value equal to how many orders the Client has. It is not an autonumber ClntID ClntName 1 Company A 2 Company B ClntID OrderNumber OrderDate 1 1 11/1/2009 1 2 11/15/2009 2 1 2/12/2008 2 1 7/13/2009 If I have a dataset for these tables, how do I insert the data in the Orders table and increment the OrderNumber value correctly.

    Read the article

  • How to get a random node from a tree?

    - by ooboo
    It looks easy, but I found the implementation tricky. I need that for a simple genetic programming problem I'm trying to implement. The function should, given a node, return the node itself or any of its children such that the probability of choosing a node is normally distributed relative to its depth (so the function should return mostly middle nodes, but sometimes the root itself or the lowest ones - but that's not really necessary if that makes it significantly more complex, if all any node is chosen with equal probability, that's good enough). Thanks

    Read the article

  • Operation precedence on postgress

    - by user24691
    I have set new division on postgress pg_operator table because i want tath when is division by zero return 0. i have write this: create operator / ( procedure = zero_division, leftarg = double precision, rightarg = double precision); where zero_division is: CREATE OR REPLACE FUNCTION zero_division(double precision, double precision) RETURNS double precision AS 'select case when $2 = 0 then 0 else $1 / $2::real end;' LANGUAGE sql IMMUTABLE COST 100; when i run value/ 0 i get error of division.

    Read the article

  • int ** vs int [ROWS][COLS]

    - by user355638
    I have a 2D array declared like this: int arr[2][2]={ {1,2},{3,4}}; Now if I do: int ** ptr=(int**) arr; and: cout<<**ptr; I am getting a segmentation fault (using g++-4.0). Why so? Shouldn't it be printing the value 1 (equal to arr[0][0])?

    Read the article

  • How to get number of entries in a Lua table?

    - by romkyns
    Sounds like a "let me google it for you" question, but somehow I can't find an answer. The Lua # operator only counts entries with integer keys, and so does table.getn: tbl = {} tbl["test"] = 47 tbl[1] = 48 print(#tbl, table.getn(tbl)) -- prints "1 1" count = 0 for _ in pairs(tbl) do count = count + 1 end print count -- prints "2" How do I get the number of all entries?

    Read the article

  • C++ struct sorting

    - by Betamoo
    I have a vector of custom Struct that needs to be sorted on different criteria each time Implementing operator < will allow only one criteria But I want to be able to specify sorting criteria each time I call C++ standard sort. How to do that? Please note it is better to be efficient in running time.. Thanks

    Read the article

  • MySQL: SUM in WHERE clause

    - by checcco
    Hi guys, I've got this table CREATE TABLE `subevents` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(150) DEFAULT NULL, `content` text, `class` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM Each row can have a different value in the 'class' field. I'd like to select any number of rows, ordered randomly, as long as the sum of the values in the 'class' field is equal to 100. How could I accomplish it directly in the MySQL query without doing it later in PHP? Thanks everybody!

    Read the article

  • Comparing the values of two generic Numbers

    - by PartlyCloudy
    I want to compare to variables, both of type T extends Number. Now I want to know which of the two variables is greater than the other or equal. Unfortunately I don't know the exact type yet, I only know that it will be a subtype of java.lang.Number. How can I do that? Thanks!

    Read the article

  • Comparison of IPEndPoint objects not working

    - by Martin Mizzell
    I have an IPEndPoint a and b, whose IPAddress and Port are exactly the same, but the == operator is on the IPEndPoint not returning true. To make things even stranger, I tried to circumvent the problem by simply comparing the IPAddress and Port individually and it is STILL not returning true. Has anyone encountered this before? If so, I am all ears to performant solutions. We have collections of as many as 10k IPEndPoints and are querying into them via LINQ (PLINQ pretty soon).

    Read the article

  • From Now() to Current_timestamp in Postgresql

    - by xRobot
    In mysql I am able to do this: SELECT * FROM table WHERE auth_user.lastactivity > NOW() - 100 now in postgresql I am using this query: SELECT * FROM table WHERE auth_user.lastactivity > CURRENT_TIMESTAMP - 100 but I get this error: operator does not exist: timestamp with time zone - integer How can I resolve ?

    Read the article

  • How do I define my own operators in the Io programming language?

    - by klep
    I'm trying to define my own operator in Io, and I'm having a hard time. I have an object: MyObject := Object clone do( lst := list() !! := method(n, lst at(n)) ) But when I call it, like this: x := MyObject clone do(lst appendSeq(list(1, 2, 3))) x !! 2 But I get an exception that argument 0 to at must not be nil. How can I fix?

    Read the article

  • how to retrieve the most entered value from database mssql using vb.net ?

    - by D Infosystems
    if i have mssql database with record displayed below : Id Serv-code Value 1 100 3 2 100 4 3 100 3 4 100 3 5 101 5 6 101 5 the logic i want when i search for the record using serv_code 100 then the output will be the average means 3 will be displayed in textbox because the value 3 will be entered 3 times than 4 as shown above .... and if if i search record with serv_code 100 and if the value of serv_code is equal means 3 and 4 only then the recent entered value will be displayed in textbox..

    Read the article

  • returning aligned memory with new?

    - by Steve
    I currently allocate my memory for arrays using the MS specific mm_malloc. I align the memory, as I'm doing some heavy duty math and the vectorization takes advantage of the alignment. I was wondering if anyone knows how to overload the new operator to do the same thing, as I feel dirty malloc'ing everywhere (and would eventually like to also compile on Linux)? Thanks for any help

    Read the article

  • Swing: easiest way to align width of [dynamic][static][dynamic] components?

    - by java.is.for.desktop
    What is the easiest way in standard Java Swing to align three components in such a way that: the dynamic widths of Component1 and Component3 are adjusted to be equal, while Component2 (which is in between) has constant width? Imagine we have some resizable JPanel (such as inside a JFrame). Small width should look like this: [----------------whole JPanel----------------] [--Component1--] [Component2] [--Component3--] Big width should look like this: [------------------------whole JPanel------------------------] [------Component1------] [Component2] [------Component3------] Note: I just "trialed-and-errored" with GroupLayout for too long.

    Read the article

  • PHP MySQL query help

    - by user547794
    Hello, I am trying to use this query to return every instance where the variable $d['userID'] is equal to the User ID in a separate table, and then echo the username tied to that user ID. Here's what I have so far: $uid = $d['userID']; $result = mysql_query("SELECT u.username FROM users u LEFT JOIN comments c ON c.userID = u.id WHERE u.id = $uid;")$row = mysql_fetch_assoc($result); echo $row['username'];

    Read the article

  • ActionScript Reading Static Const Array

    - by TheDarkIn1978
    how can i evaluate weather my test array is equal to my static constant DEFAULT_ARRAY? shouldn't my output be returning true? public class myClass extends Sprite { private static const DEFAULT_ARRAY:Array = new Array(1, 2, 3); public function myClass() { var test:Array = new Array(1, 2, 3); trace (test == DEFAULT_ARRAY); } //traces false

    Read the article

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