« first day (327 days earlier)      last day (4613 days later) » 

9:00 PM
@AlfPSteinbach I thought that was an answer too, but seems not good enough for SO
 
@sbi. Well I am glad to be helpful. Actualy If I could see you laptop in real time it would be a pease of cake. I worked 2 years in computer repair service. (done your situation things a lot). Anyway. Leave it over nigh and hope that the water didnt short some parts in mainboard.
 
0
Q: how to pull my privates from class?

PRASHANT Pi have inherited class that has to many privates, is hard to work against: public partial class Report_Aux { public Report_Aux() { logger = Log.Instance; dContext = new DataContext(ConfigurationManager.AppSettings["DataContextConnectionString"]); created = Util.Ge...

lol title
 
sbi
@AlfPSteinbach A backup he has. Not all that new, but he has one. What he doesn't have is the money to buy a new laptop.
 
@TonyTheTiger lol that is funny
 
"pull my privates" - who puts their privates in a class???
 
9:03 PM
@sbi oh.
 
grab the left nut!
 
sbi
1 hour ago, by DeadMG
"Look how it just comes out without a hitch". That's what she said.
 
@TonyTheTiger dayum, +6 comment
 
9:08 PM
@TonyTheTiger ah my comment does not apply now, someone edited the title
 
Some people are just no fun.
Imagine how SO would look like under our reign.
 
@CatPlusPlus I feel the presence of Robert Harvey
my comment may get deleted
 
It would be glorious.
 
@CatPlusPlus now that would be cool
 
magnanimous
 
9:11 PM
Plenty of fucks would be given.
 
I think SO has lost it's sense of humor, the only last place with some humor is here
we need to fight to keep that here :)
 
fight the system!
 
oh fuck
just remembered my last exam is tomorrow
 
and it's that module that I really hate, the "Did you memorize this rotation matrix formula?" module
 
9:21 PM
hmmm
I hate memorizing formulas, remember having to do it for Physics classes
 
So, did you ?
 
no
that's why I didn't pass it the previous time
it also asks about really, really old stuff, like very limited colour displays
even phones have 32bit colour now
 
-1
Q: C++ subclass using keyword question

SSight3Say I have the following: template<typename TemplateItem> class TestA { public: TemplateItem Item; void Function1(){;} void Function2(){;} void Function3(){;} void Function4(){;} //Etc etc number of functions is quite lengthy }; templat...

Lol this guy.
 
@DeadMG wp7 pre-mango doesn't ;)
 
I love the link to FAQ that already has a different solution than what he wants to use.
 
9:28 PM
> No, it isn't. See question. Updated. Surprised most people are unfamiliar with it.
 
well, I sincerely doubt that they have, e.g., monochrome displays
 
What a condescendent tool.
 
Welp, downpoo.
 
> "Did you know that writing C++ will make you swear considerably more than PHP" Maybe PHP programmers are illiterate.
@kbok LOL
 
@TonyTheTiger That's not true.
 
9:30 PM
@TonyTheTiger give the guy a crash course in statistics. It could just as well be that swearing makes you write C++!
 
I speak from experience.
 
@TonyTheTiger Hey, that's from me ?
Are you digging into the star history ?
 
> Using this-> is the same difference as I would have to include this-> at every instance when I simply want to inherit the functions.
 
@kbokthe I was just browsing your twitter
 
Ah ok.
 
9:31 PM
 
@CatPlusPlus huh?
 
@CatPlusPlus > I am not here to fix the template problem, I am here to find a way for the using keyword to be used beyond individual function calls.
lol
 
I WRITE BROKEN CODE AND DON'T WANT TO FIX IT, BUT HOW DO I FIX IT?
 
ok, here's a question
why on earth would you view a single image as multiple images in a plane with less resolution?
 
9:35 PM
@DeadMG donno
 
well
one image has one colour produced when it's viewed
and I get some of the pallette stuff, because it would save memory if you don't need the full range at once
but what and why on earth would you have multiple planes? that just doesn't make sense
 
> The code is just pseudo code. It's not actually erroneous code. If you read the comments it asks about the using keyword's usage. Please learn to read people.
I hereby promote them from a tool to an idiot.
 
Tomorrow is my last day
by 6PM I'll be unemployed.
 
of what?
oh join the club
 
Of my current internship.
I think it'll be time for me to write an operating system kernel or something like that.
 
9:44 PM
oh have fun with that
 
have I mentioned how much I truly despise my university course?
 
you have mentioned it yes
 
Failing at programming something is what could bring the most experience.
 
but we're glad you've reminded us
true
 
@TonyTheTiger good, because I wish that I could stab it in the face.
 
9:46 PM
thank god it has no face
 
Oh no, it's the purple-shirted university course stabber!
 
how did you know I was wearing a purple shirt?
 
I wish the Java compiler had a face, so I could stab it.
 
You always do.
 
9:47 PM
he has very good eyes, he's a cat after all :P
 
what's up with Java?
 
it sucks, haven't you noticed?
 
Nothing. Absolutely nothing. It's so nothing it collapses onto itself.
 
Beats C++
 
oh noes a troll
 
9:48 PM
No.
 
@AndrewFielden ideone.com/lNgqZ
 
Or, to elaborate, noooooooooooooooooooooooooooo.
 
@AndrewFielden Are you trolling ?
 
9:49 PM
ok
 
Ideone Y U LOG ME OUT.
 
I think I figured out this multiple plane thing
he's actually just talking about bit masking
 
oh then bashing C++ in this room is not a good idea
 
and then using it for some completely obscure reason
 
ok sorry
 
9:49 PM
@DeadMG have you googled it?
 
no
but I think it likely hasn't been used since like, the 1970s
 
C++ is far from perfect, but Java is even further.
 
It's funny how trolls come out at midnight. Must be about feeding them with meat or something.
Anyway, gotta tidy up. later
 
although it probably doesn't help that the lecturer wrote the notes and left off half the supporting images
 
@TonyTheTiger :)
 
9:54 PM
Hey @LucDanton, how would you translate "Navrant" ?
 
good night :)
 
10:28 PM
oh crap
I think I ate too m any cookies
 
I find it distinctly unfunny
don't need abdominal pain along with everything else
 
@DeadMG Planar video modes have the memory arranged to correspond to the output channels -- one plane each for red, green, and blue. To minimize its address footprint, only one was typically "visible" to the processor at any given time. It was used on PCs for 16-color modes up through VGA (and a bit beyond).
 
that's not what the lecture material is discussing, that's just bit-shifting
the lecture material is discussing holding physically several distinct images
not just operating on one channel at a time
 
Ah, I knew a mod would come clean up a good comment: stackoverflow.com/questions/7354451/…
 
10:41 PM
@DeadMG That doesn't sound much like planar video at all. That sounds more like an image pyramid, such as you'd use for texturing.
 
I've reviewed quite a few 3D texturing techniques and never seen anything like it
ultimately, the screen only displays one image at a time, so why would you ever want to store more than one in the frame buffer?
that's notwithstanding the need for multiple frame buffers for e.g. double buffering, of course
 
@DeadMG For textures, you typically start with the size as some power of two. You then generate lower and lower resolution versions, all the way down to a single pixel. This gives an easier starting point for generating the size you'll display on screen.
 
yeah, that's mipmapping
and I get mipmapping and why you would want to have multiple resolutions in memory
but why in the frame buffer? you apply textures before stuff gets put in the frame buffer
you don't put textures in the frame buffer, you put the final image in
especially since all of the proposed images would be the same resolution
 
The other common use is of tiles -- breaking a large image into pieces, and loading only those pieces that are at least partially visible at any given time.
 
right, but why not just load the relevant pieces into the final image composite directly?
especially considering the drastic image quality changes that you're talking about, where every additional plane you load is significantly less colour information available
 
11:07 PM
@DeadMG I think we're reaching (passing?) the point at which I know enough of what you're talking about to comment on it meaningfully.
 
yeah
but let's just say I'd be one hell of a lot happier if during the module we had written one single measly line of code
even some shitty pseudocode or something
 
Anyone here by any chance
 
hello
 
Hey, yipeee
:)
 
@Anthony You're the only person who can tell us about over there.
 
11:11 PM
I am really sorry to bug you but I really need a favor... I can't tell if my server is reachable or not from other internet connections. I host a number of websites for clients. All I need to know if a website shows up or not.
www.cusafe.ie and www.wghca.ie
An insurance company and Hospital Group
@Potatoswatter good one :P
I know it's not a C++ issue buy I really am stuck, panicing almost
 
@Anthony This isn't an IT forum, and if you're responsible for keeping a hospital online, you really shouldn't be here at all.
 
I know
I just figured someone wouldnt mind :P
It's not a hospital
 
neither of them worked for me btw
 
ah
Brill, perfect thanks
I was afraid of that :(
Thanks for the help
 
11:14 PM
ok
so I've been wondering about unsigned ints
when you cast a negative int into it
"If the destination type is unsigned, the resulting value is the least unsigned integer congruent to the source integer (modulo 2^n where n is the number of bits used to represent the unsigned type)"
could someone please explain this sentence to me?
I just go 0_0 when I read it
 
@Rabenholz Modulo arithmetic is the same as two's complement.
It means -1 maps to the largest number the type can represent.
 
ohhhhhh
okay
 
@DeadMG Does that site just ping or look for a 404/500 return? Or do you know?
 
so if you had 4 bits
for -1
 
@Rabenholz It means that if your negative value is -x, when cast to unsigned it becomes 2^n - x, where n is the number of bits of the unsigned type.
 
11:17 PM
you would get 1111 binary?
 
However, modular arithmetic is more general and doesn't depend on an underlying binary system.
 
@Anthony How would I know?
 
2^(n-x)?
 
No, (2^n)-x.
 
no, (2^n) - x
 
11:18 PM
Hence the Standard defines it that way to cover the possibility of implementation-defined unsigned decimal types.
 
@DeadMG Sorry. I was hoping you might know. Not to worry. Thanks.
 
okay, thanks
I think I understand it now
 
@RMartinhoFernandes If the value is x and x is negative, then the result of the cast is x + 2^n
 
@Potatoswatter Yes, that's the same as what I said.
 
Ah yes. I was confused by the double negative.
 
11:22 PM
:)
 
2
Q: C++ cin positive integers only

SujayThis is my first time on Stackoverflow. I was making a program to find out MPG for a car. I was wondering how can I make the cin statement only accept positive integers only? and also, if you do enter a invalid input, can you reset it? I am not sure if that makes sense. I didn't have to do this f...

What's up with this? 5 answers and nobody knows about istream::clear.
 
OMG, so much nasty in the answers.
 
Okay, so earlier I was given the advice to combine an (x,y) coordinate into one value by using "(((uint64_t)x) << 32) | y"
but won't that give the wrong values if you go into the negatives?
 
@Rabenholz Who told you to do that? There's no advantage over a struct or std::pair.
 
Misguided advice.
 
11:35 PM
if you're holding more than one value, then make a structure for it
 
do you do your own memory management in c++ ?
 
there's a gc ?
 
wtf
then ?
 
11:43 PM
There's RAII.
 
who the
is that ?
it runs automatically ?
 
yes
basically the compiler destroys objects for you when they leave scope
 
so it's like a gc
garbage collection
 
no, not at all
 
11:45 PM
@Interstellar_Coder It's a language construct. There's nothing to "run" per se, but also you don't have to explicitly do anything.
 
does it not free memory ?
 
because
a GC collects all objects
 
@Interstellar_Coder It releases resources.
 
well not all
 
deterministic destruction only collects the objects you program it to collect
 
11:45 PM
it goes back to the root
and sees if there's a link back
 
and secondly
 
if not then it's in a queue
 
deterministic destruction is just that- deterministic
 
a GC is non-deterministic- it collects when it wants, suspends your program, and you can't influence it
thirdly
 
11:46 PM
but you said it runs automatically
 
a GC can only collect memory that was allocated off the GC heap, it can't do anything else
 
do you have control over it ?
 
deterministic destruction can perform any function
it does
 
int main() {
	if(1 == 1) {
		foo x; // a foo object is created here
		// blah blah do stuff
	} // the x object is automatically destroyed here
}
 
effectively, you register a special function, like a finalizer
you don't have to do anything at the call site
then when the object goes out of scope, the compiler calls it for you
 
11:47 PM
similar to c#
kinda
 
it's like using the Closable interface- for every object- and having the compiler generate try { ... } finally { obj.close(); } for every object for you
 
Er, IDisposable.
 
um, it's similar to using but it doesn't suck in a number of ways that using does
@RMartinhoFernandes Java is Closable, C# is IDisposable
I guess he didn't actually say, but I assumed he was from Java
 
1 min ago, by Interstellar_Coder
similar to c#
 
sure, but I was writing before he said that
 
11:49 PM
Ok.
 
well i'm into web at the moment
but i was a c# programmer at one time
so the concept seemed similar
 
FTR, in Java 7 it would be try(Closable obj = ...) { ... }.
 
using is kind of like RAII
but using has a few flaws that RAII doesn't have
 
First being its manual nature.
 
yeah- you automatically using every object, and you automatically Dispose() all member objects
and every object inherits from IDisposable
 
11:50 PM
hello there ! I have a generic question related to OOD/OOP : Suppose I have two objects Message and Gateway , the message object represents sms entity while the gateway object implements how to send and receive message. Now to send/receive a message I don't need all the attributes of message object. So should I pass the whole message object or just the attributes/properties of message required by gateway object?
 
Both work.
 
you could do either but prefer the second
 
The first has a more flexible interface.
 
the second is less coupled
 
It's tradeoffs all the way down.
 
11:52 PM
lol
 
so its upto me? I feel that its better to pass the whole message object because
1. I do not when an extra property/attribute of message will be required by gateway
ohhk
 
@Sudhi It's always up to you.
There are no rules.
 
seems like some divergence of opinion here, is there a good/best practice?
 
nobody can make you code one way or the other
 
ohhk, thank you for the quick answer
 
11:53 PM
you have to make your own choice
 
@Sudhi I would pass the whole object. In particular, only the gateway should really be aware of which parts of the message object it cares about.
 
i guess it depends on how often you will add properties
 
@JerryCoffin : agreed, my thoughts exactly
@InterstellarCoder : I am developing rite now, so I expect lot of addition/subtraction/modification
 
well, I would say that the message object should know what parts it can change without breaking the gateway
 
WTF.
0
Q: I'm in need of a project idea or open source project involving multithreading

RinumOriginally posted here: I'm also hoping the user R.. will see this and post his project idea here.

 
11:54 PM
if you send the whole message object, you can't know what is and isn't safe to use
but if you only send what you need, then the message object knows what you don't need and it knows what it can change without breaking the gateway
 
@DeadMG : well, private and public methods should take care of that, shouldn't they?
 
@DeadMG Problems arise when your gateway needs to use more/less/different parts of the message.
 
how would it be sending the whole object if the gateway can only access some of it?
@RMartinhoFernandes YAGNI
 
By using void send(message const&) it can use whatever it pleases.
 
@DeadMG : the idea is, gateway will have entire Message object. The message class itself will be well-structured (thats my job) so its representation and structure is consistent. Gateway will use its public methods to abstract data/properties need to send/receive message
 
11:57 PM
yeah, and then the message is completely locked and can never change, because you don't know what it needs
 
The parts a message can change without breaking the gateway are the usual: the public interface.
 
right
so actually, it can't use whatever it pleases, at all, because it can only access the public interface
 
@DeadMG YAGNI?
 
You Ain't Gonna Need It @RMartinhoFernandes
@DeadMG : Bingo !
 
YAGNI would apply if you were paying some price for it, instead of making a gain
@Sudhi In that case, I fail to see what the actual difference is between your choices
 
11:59 PM
@DeadMG You are paying a price: locking down the send function.
Oh, the comments here: stackoverflow.com/q/7352873/46642 Priceless!
 

« first day (327 days earlier)      last day (4613 days later) »