Omgili - forum search, search forums  
  

Discussions about think that b c

Displaying 1 - 10 out of 187,743 discussions.  
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
In Ruby, I'd like to convert a slash-separate String such as "foo/bar/baz" into ["foo/bar/baz", "foo/bar", "foo"]. I already have solutions a few lines long; I'm looking for an elegant one-liner. It also needs to work for arbitrary numbers of segments...
Started by on , 4 posts by 4 people.  
The highest voted answer works, but here is a slightly shorter way to do it that I think.
I want to achieve the following: Have a AxBxC matrix (where A,B,C are integers). Access that matrix not as matrix[a, b, c] but as matrix[(a, b), c], this is, I have two variables, var1 = (x, y) and var2 = z and want access my matrix as matrix[var1, var...
Started by on , 3 posts by 3 people.  
If var1 = (x,y) , and var2 = z , you can use matrix[var1][var2] I think you can simply subclass.
Hi all, OK so I have two datatables A and B. They are both produced from CSV files. I need to be able to check which rows exist in B that do not exist in A. Is there a way to do some sort of query to show the different rows or would I have to iterate ...
Started by on , 7 posts by 7 people.  
You can use the Merge and GetChanges methods on the DataTable to do this: A.Merge(B); // this will add to A any records that are in B but not A return A.GetChanges(); // returns records originally only in B Just FYI: Generally speaking....
Ask your Facebook Friends
In 32 bit integer math, basic math operations of add and multiply are computed implicitly mod 2^32, meaning your results will be the lowest order bits of the add or multiply. If you want to compute the result with a different modulus, you certainly could...
Started by on , 7 posts by 7 people.  
Then a*b mod 2^N-1 = p+q mod 2^N-1 since....
This can require 64-bit computations, or you can split a and b into 16-bit parts and compute on 32-bits.
Suppose you can compute a*b as p*2^N+q.
But it's probably in that paper somewhere.
There are a few ways to do this in javascript. Foremost and most readable and flexible is probably: if (a){ //b } else { //c } Something else that only* works with assigning and is less readable is: var foo = 'c'; if (a){ foo = 'b'; } My main question...
Started by on , 5 posts by 5 people.  
They do not evaluate to the same result as the latter as it is... .
Var foo = a && b || c; -> foo is true if a and b are true or c is true.
Var foo = a ? b : c; -> foo is b when a is true else c.
A='''b="ddd"''' eval(repr(a)) print str(a) print b Please try to use the code, rather than text, because my English is not very good, thank you
Started by on , 4 posts by 4 people.  
A='''b="ddd"''' >>> eval(compile(a,'<string>','exec')) >>> print str(a) b="ddd" >>> print b ddd The problem is that you're actually executing the statement 'b="ddd"' which is not an assignment....
Class a(object): b = 'bbbb' def __init__(self): self.c = 'cccc' I think they are the same; is there any difference?
Started by on , 5 posts by 5 people.  
'b' is a class 'a' has no attribute 'c' >>> a().b 'bbbb' >>> a().c 'cccc' Instances of the classYes, there ....
Of a , while c is an instance variable which will exist independantly for each instance.
I tried to use the following example codes by using a ? b : c expression: DateTime? GetValue(string input) { DateTime? val = string.IsNullOrEmpty(input) ? null : DateTime.Parse(input); return val; } I got compiling error since in the a ? b : c expression...
Started by on , 6 posts by 6 people.  
In your original example c is a DateTime (since DateTime.Parse returns a DateTime), and....
The compiler is ensuring that b and c in your a ? b: c are of the same type.
? , then the compiler can implicit cast the other .
EDIT: This question is more about language engineering than C++ itself. I used C++ as an example to show what I wanted, mostly because I use it daily. I didn't want to know how it works on C++ but open a discussion on how it could be done. That's not ...
Started by on , 11 posts by 11 people.  
To introduce a type? did you forget to write differently with respect to the first 'b'? don't you thinkI honestly think that this whole passing by value/passing by reference idea in C++ is misleading not allow the programmer to do number....
I just ran into a piece of code that not only compiles, but gives the expected result (where x is an integer value): int y = (int)(0.5 * x * x + + + 0.6 * x + 1.2); It took me a while to figure out what happens and I must say it was an interesting operator...
Started by on , 5 posts by 5 people.  
Int z2 = a + - - b; // '+' + '-' = '-' , the resulting....
Int z1 = a + - + b; // '+' + '-' = '-' , the resulting '-' + '+' = - again.
Subtract Equal signs = add So int z = a + + + b; // '+' + '+' = '+' , the resulting '+' + '+' = + again.
Page: 1   2   3   4   5   6   7   8   9   10  
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost