« first day (168 days earlier)      last day (4773 days later) » 

Neo
12:13 AM
Sorry to post here but if any one knows how to help me with this, I need some serious help for a friend, I don't do classic ASP and a friend has a unsecure website with no input validation for mssql queries. I know no ASP but I would like to do something like in PHP where I access $_GET[] and $_POST[] arrays and go through each element and fix them. SOrry again to post here but as we speak someone is deleting users and data on the server and injecting XSS and XRF code
 
@Neo Try asking at security.stackexchange.com.
 
Neo
@jweyrich Tnx
 
 
2 hours later…
2:22 AM
I'm looking for assistance with a passing a const *this reference to a constructor. I've posted a write-up here stackoverflow.com/questions/5520691/….
 
 
2 hours later…
4:35 AM
The related questions list on this page is funny: stackoverflow.com/questions/5516413
 
 
2 hours later…
cpx
6:46 AM
Does the compiler really able to compile from PNG image?
 
@cpx Not any orthodox compiler, and I don't know of any unorthodox compilers either.
 
7:07 AM
Yep, compilers can't read pngs. Need an interpreter for that. That's why PHP is so popular btw.
 
sbi
@cpx It depends on the quality of the OCR you're using... :)
 
@sbi What new features have women acquired recently? ;)
 
sbi
7:23 AM
@FredOverflow Women still have the same old features we men never get tired of.
 
@sbi I don't know... if I really want to be drowned in constant babble and complaints, I could just compile some template code...
 
8:27 AM
room topic changed to Lounge<C++>: Where trespassing Singletons are shot on sight.
 
@FredOverflow hahahh great status ;)
 
 
3 hours later…
11:39 AM
Why is it that people hate singletons so hard?
 
@DavidRodríguezdribeas Because they are chronically overused in situations where their use is not necessary.
At least 9/10 singletons that I see don't need to be singletons but are used because a "global" is desired, but for some reason a singleton is considered more legitimate than a global object or an object with a global accessor.
 
@DavidRodríguezdribeas I'd say because they have no redeeming qualities. You combine two almost always bad qualities into one pattern, and the result is a pattern that's so rarely useful that I can only consider it an antipattern
 
...and if you don't really need global access they harm modularity and testability just like globals.
 
IF you want a global, make it a global. If you want to restrict something to a single instance, rethink your assumptions until you no longer want to do that. ;)
5
combining the two, into a structure that it's needlessly hard to make thread-safe, and makes testing near impossible, is just asking for trouble.
 
12:36 PM
would someone please like to clarify this doubt
 
12:52 PM
@fluty What's wrong with the answers that you had to your question on SO?
2
Q: type definition in parameter list

flutyint func(struct x{int a;}y); int main() { } The above code gives following error in c++ error: types may not be defined in parameter types while its run fine in c with warning,means in c type may be define in parameter list thus the following code should give redefination error in c int func...

 
Isn't it obvious from the error message?
void func( int a, int a ); // multiple parameters named 'a'??
 
1:07 PM
@fluty What's the part that you don't understand?
 
i did not understand...when i am doing something like ,int func(struct x{int a;}y);
error say you can,t define the type
is that means in parameter type ,,,defination does not take place in c++?
but when i am doing something like, int func(int a,int a) then why its giving an error because here redefination does not take place(in c++)..according to previous error
 
the type definition would effectively be hidden from anything but the function itself, in C++
the two parameters with the same name would mean only of them can be referenced by name - the compiler would have no way of knowing which one you'd mean with a
so both cases are really cases where you wouldn't be able to use what you're declaring
 
but why the error...you can not define the type in parameter list (only in c++)..since its mean when ever i am doing int a..its equivalent to extern int a...and even the error in int func(int a,int a) is different in c and c++
 
let's split the two questions, ok? because they really are different
 
ok
first i am confused, are the error equivalent that i am getting in c and c++
 
1:22 PM
C and C++ have different type systems: C++ is much stricter with its types
so defining a type that would basically be un-namable, in C++, wouldn't make sense
the type you're defining in the parameter list of your function would be un-namable
in C, in order to pass a parameter to a function, the parameter has to be of compatible type
not necessarily the same type
so in C - although it still doesn't make much sense to define a type in a parameter list, it makes a bit more sense for the compiler to allow it, because you would still be able to call the function
 
In other words, forget about C when writing C++.
3
 
ok clear about c
ahaaaa by saying un-nameable you mean i can,t access that type(in c++)
because its in parameter scope of function
 
hmm clear ,now i can move forward..thank you very much
 
that goes for C too, btw, but it's less of a problem there because types can be "compatible"
 
2:19 PM
folks
@CharlesBailey in C it does, but in C it would also do if it wouldn't be an op of void so this isn't really important. In C++0x it does sometimes, for volatile type qualified expressions. See open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1054
So volatile int i = 0; int main() { (void) i; } would read from i. But so would just do i; too. Both would not read from i in C++03.
A simple way to cause a read in C++03 is to just stick a + before the variable. :)
 
3:23 PM
@JohannesSchaublitb Ah, nice, I always forget about that. :)
 
 
1 hour later…
4:33 PM
did everyone doze off, or was that just me?
 
5:03 PM
@tina no idea - maybe you should ask on SO proper?
 
5:17 PM
If it has an editor, then it should also have editor options.
 
5:27 PM
try holding the control key while moving the mouse wheel - that works on a lot of editors
or maybe this page has the answer
 
6:24 PM
Any cricket fans. My country, India, has won 2011 world cup !!
The most awaited for since 1983.
 
7:20 PM
hey mahesh congratulation
felt lucky to observe such a great moment
 
 
1 hour later…
8:50 PM
how can i search for questions of a specific tag that are community wiki?
 
[tag] wiki:1?
 
9:12 PM
ohh
 
 
2 hours later…
10:54 PM
@tina perhaps this link can help you
 

« first day (168 days earlier)      last day (4773 days later) »