THis is for MSVC
#define Get64B(hi, lo) ((((__int64)(hi)) << 32) | (unsigned int)(lo))
Specifically, what is the role of the 'operator <<' ?
Thanks for your help
Possible Duplicate:
GOTO still considered harmful?
I have read articles that advise on refraining from using the goto operator frequently, but never told why. I have googled this for ever and can't really find anything.
I wrote the following query, I think it's correct but I have a "missing operator" error.
SELECT * FROM results,Types WHERE results.a=Types.b
INTERSECT SELECT * FROM results,Types WHERE results.c=Types.b
Could somebody help me please?
Thanks a lot.
Using LINQ I'm looking to break down the following path string[], however I'd like to break it up to the point of the Binn folder. Is there a WHERE UNTIL operator in LINQ?
c:\ Program Files\ Microsoft SQL
Server\ MSSQL10.SQLEXPRESS\ MSSQL\
Binn\ sqlservr.exe
What I'd like todo
var words = from word in thepath
where UNTIL thepath == "Binn"
select word;
What i want to do is
for (list<cPacket *>::iterator i = cache.begin(); i != cache.end(); i++){
if( strcmp(i->getName(),id) == 0 ){
return true;
}
}
where getName is function of the class cPacket, But it does not work, i tries also
i.operator->()->getName(), and again nothing.
Can anybody help me?
my string style like this:
expression1/field1+expression2*expression3+expression4/field2*expression5*expression6/field3
a real style mybe like this:
computer/(100)+web*mail+explorer/(200)*bbs*solution/(300)
"+" and "*" represent operator
"computer","web"...represent expression
(100),(200) represent field num . field num may not exist.
I want process the string to this:
/(100)+web*+explorer/(200)bbs/(300)
rules like this:
if expression length is more than 3 and its field is not (200), then add brackets to it.
I have a struct like this, with an explicit conversion to float:
struct TwFix32
{
public static explicit operator float(TwFix32 x) { ... }
}
I can convert a TwFix32 to int with a single explicit cast: (int)fix32
But to convert it to decimal, I have to use two casts: (decimal)(float)fix32
There is no implicit conversion from float to either int or decimal. Why does the compiler let me omit the intermediate cast to float when I'm going to int, but not when I'm going to decimal?
To check if a type is a subclass of another type in C#, it's easy:
typeof (SubClass).IsSubclassOf(BaseClass); // returns true
However, this will fail:
typeof (BaseClass).IsSubclassOf(BaseClass); // returns false
Is there any way to check whether a type is either a subclass OR of the base class itself, without using an OR operator or using an extension method?
For a little while now javascript has the "map" function to loop over arrays.
It appears possible to use it as a 'foreach' operator for example:
var arr = ['a','b','c']
var doubles = arr.map(function(val){
return val + val
})
Is this better or worse than saying
for(var i in arr){ ...
50/50: saves having to use the index but adds a callback; it doesn't seem very common so I hesitate to use it but still want to.
I've been reading a couple books/online references about compiler theory, and keep seeing that particular operator coming up every once in a while (as seen here), specifically when the current topic is context free grammars. What does it mean? As well, how does it differ from =>?
Explanations with examples distinguishing => from =*> would be most helpful.
i am doing:
html = new WebClient().DownloadString("http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=" + biocompany);
and i am getting the error:
Error 1 Operator '&' cannot be applied to operands of type 'string' and 'string'
but i am not even using the & !
please help!
i was learning about c++ pointers... so the "-" operator seemed strange to me... instead of
ptr-hello();
one could write
(*ptr).hello();
because it also seems to work, so i thought the former is just a more convenient way
is that the case or is there any difference?
I have two fields
start_time
end_time - can be null
Now, depending on this I needs to differentiate between three states
Scheduled in future,
Currently running
Completed in past
Since mysql IF operator can not be nested, (Or I cant find an easy way to nest them), I cant find how to get the three state status.
I'm scraping data from the web, and I have several processes of my scraper running in parallel.
I want the output of each of these processes to end up in the same file. As long as lines of text remain intact, I the order of the lines does not matter. In UNIX, can I just pipe the output of each process to the same file using the operator?
I have an 'optional' parameter on a method that is a KeyValuePair. I wanted an overload that passes null to the core method for this parameter, but in the core method, when I want to check if the KeyValuePair is null, I get the following error:
Operator '!=' cannot be applied to operands of type System.Collections.Generic.KeyValuePair<string,object>' and '<null>.
How can I not be allowed to check if an object is null?
i was trying to call a static function of class using scope resolution operator, the way to access static function but still generating error. what are the possibilities.
Happily reading xml with
var q2 = from c in xmlDoc.Descendants("Ticket")
select new
{ Responded_Date = (DateTime)c.Element("Responded_Date") }
However when the tag is
<Responded_Date xsi:nil="true" />
I get "String was not recognized as a valid DateTime". I don't wish to use the null coalescing operator but simply to take the null and insert into datatable
These questions are a kind of game, and I did not find the solution for them.
It is possible to write ::: in C++ without using quotes or anything like this and the compiler will accept it (macros are prohibited too).
And the same is true for C# too, but in C#, you have to write ???.
I think C++ will use the :: scope operator and C# will use ? : , but I do not know the answers to them.
Any idea?
I'm writing a script to download a bunch of files, and I want it to inform when a particular file doesn't exist.
r=`wget -q www.someurl.com`
if [ $r -ne 0 ]
then echo "Not there"
else echo "OK"
fi
But it gives the following error on execution:
./file: line 2: [: -ne: unary operator expected
What's wrong?
I have an object which has both a copy constructor and assignment operator defined. It is enclosed inside a shared pointer.
I want to make another shared pointer that contains a copy of the original shared pointer (i.e. new shared pointer to a new memory location, which however, has the same data as the original object).
Thanks for any assistance.
hello i have problem with receiving data from serial port in c# in am inserting a new line operator at the end of data buffer. then i send this data buffer on serial port, after this my c# GUI receiver will take this data via Readline() function but it always give me raw data not the actual one how to resolve this problem.
I am looking for a functor that deletes its argument:
template<class T>
struct delete_functor
{
void operator()(T* p)
{
delete p;
}
};
Is there something like this in std, tr1 or boost?
The pipe operator in prolog returns one or more atomic Heads and a Tail list.
?- [a,b,c] = [a,b|[c]].
true.
Nesting multiple pipes in a single match can be done similar to this:
?- [a,b,c] = [a|[b|[c]]].
true.
What does the statement [a|b|c] infer about a, b and c?
updated_date = 08-Jun-2010;
I have a query like this
select * from asd whre updated_date <= todate('08-Jun-2010', 'dd-MM-yy');
but i am not getting any result. it is wotking only if todate is 09-Jun-2010...
ie my equalto operator is not working properly.
y is it like that
ny help?
A popular editor uses highlighting to help programmers avoid using C++ keywords in Java. The following words are displayed using the same colors as a syntax error:
auto delete extern friend inline redeclared register signed sizeof
struct template typedef union unsigned operator
Why would this be considered important?