« first day (1790 days earlier)      last day (3161 days later) » 

user1804599
1:00 PM
yummy
 
user1804599
proper butter
 
user1804599
not that margarine shit
 
guys
how do you read a whole file into a std::string
 
@Mr.kbok std::stringstream and std::fstream maybe
I just had to write that fast
 
@Mr.kbok you must be kidding =/
 
1:01 PM
Not kidding
 
user406009
@Mr.kbok IIRC the easiest way was really annoying. First you find the length of the file.
 
I'm doing seekg(end), tellg(), then read()
 
@jaggedSpire Turns out even if I wanted to I can't take Computer Vision, 'cause it conflicts with another necessary class and there's no other available time. q_q
 
user406009
Yep, that's how I did it as well.
 
But maybe there's a better way.
 
Xeo
1:02 PM
streambuf iterators are another way
 
@Mr.kbok uh?
 
Xeo
or stream iterators over char
 
user406009
@Borgleader That says the best way is what kbok is already doing. "seekg(end), tellg(), then read()"
 
@Lalaland So its all good then.
 
@Borgleader I'm doing it, but I dislike the method
 
Xeo
1:04 PM
@Lalaland The accepted answer has no mention of read :P
it uses streambuf iterators
Jerry uses read
 
Isn't that method a bad idea for very large files?
E.g. you'll get shitloads of realloc?
 
Jerry's solution is definitely better, but my question was essentially is there an even better solution
@ThePhD yes
 
@ThePhD accepted answer, second bit of code
 
Xeo
Unless you combine the two
and do a tellg to reserve, and then copy through streambuf iterators
 
user406009
@Mr.kbok You can just mmap your file. Easy as one syscall :)
 
1:05 PM
I don't know why streams just don't have size for the current available stuff that's ready to be read.
That'd save so much effort.
 
user406009
Because it's a stream.
 
Xeo
Not all streams support seeking
 
user406009
Streams's sorta don't have size by definition.
 
siiiigh
 
user406009
@ThePhD fstream should have a size() though.
 
user406009
1:06 PM
That would be cool.
 
user406009
Although, what if you open a fstream tied to a unix pipe?
 
user406009
Is that even valid?
 
Probably.
 
@ThePhD If you have a size, then you already called read
@Lalaland Oh course.
 
Oh, also. Fuck.
... Just doing that to help contribute to our fuck count. We need to have more fuck than the entire Stack Exchange combined at some point.
 
1:11 PM
hello , does someone mind if i put some alternative solutions in this thread
 
Oh, look, flags
 
@Agawa001 what
 
Wait. Seriously?
 
I'm shocked and totally did not see that coming
 
user406009
@ThePhD Is another room beating us?
 
user406009
1:12 PM
Who?
 
user406009
I've got to check out this more fucked up room.
 
0
Q: Counting univalued subtrees

aakashjainIn a recent Codechef contest I had to write a program to count the number of univalued subtrees in a given tree. A subtree is univalued if all the nodes of the subtree have the same value. In the input, nodes are numbered 0 to N-1. Each node contains an integer value. Each node may have any numb...

 
@Lalaland We have more than the entire chat.SO server, I believe. And more than the regular chat.SE. But we have less than the entire Stack Exchange network at large.
I could be wrong. Might have to ask @Mysticial
 
@Agawa001 Its not even your question, so why are you posting it here?
 
2 mins ago, by Agawa001
hello , does someone mind if i put some alternative solutions in this thread
to avoid (deleted as offtopic) or dowvote torrents
 
user406009
1:14 PM
@Agawa001 People will respond if they want. Most random question dumps just get ignored.
 
@Agawa001 in what way would posting a solution to that question here be helpful?
 
Also, lol if you think that being on a sockpuppet will prevent downvotes.
If the question is bad, you'll probably be downvoted.
 
@Borgleader did you revise this code before ?
 
I don't understand, what do you want from us
 
To click ignore
 
1:16 PM
@Mr.kbok I thought he wanted to answer the question, but in here. I guess I was wrong, but thats the only thing that made sense to me.
 
ok just keep on your interesting conversation; wrong address
 
@Agawa001 Probably.
 
user406009
Hmm, according to youtube.com/watch?v=faYDPjI2zhU&t=1h11m44s, vulkan should be coming out before the end of the year.
 
user406009
Let's see if they can meet their promises.
 
@ThePhD noooooooooo
 
1:19 PM
Sep 5 at 0:10, by Borgleader
@Lalaland At the end of this year supposedly
y u no trust me =/
 
user406009
After watching the C++'s release fiascoes, I trust no one's promises any more.
 
rips out hair
Why does no pricewatch ever list the cooling ability of laptops.
 
because they want you to suffer
 
Because it's equally bad for all of them
 
@paul23 Buy a mac, everyone says they're cool
 
user406009
1:21 PM
@paul23 I always just buy cheap laptops. And then use a desktop for serious work.
 
user406009
Much more cost effective.
 
user406009
Laptops have an insanely high price/performance ratio.
 
@Lalaland Sorry need high end - and really dislike having to work on two things.
 
Then skip the laptop and buy just a desktop
 
I'm always travelling, and wish to play games while travelling.
 
user406009
1:22 PM
Simple. Play games from 4 years ago.
 
@Lalaland i got a good i7 and a gt460m with 6gb of ram for ~1300$ 3 years ago. that was pretty good hardware for the price.
 
user406009
That's what I do.
 
@Mr.kbok An excellent example of how popularity is no indicator of quality.
 
user406009
I mean, the top games of today really aren't that much better than the top games of 2010.
 
user406009
And then you disable all the fancy shadows.
 
1:23 PM
I'm looking into the 800-1000 euro range (~1000 - 1300 USD)
 
user406009
And lens flair.
 
@Puppy I honestly think the OS is fine for most noobs. Still overpriced though, but they don't know that
 
user406009
@Borgleader You could probably buy an equivalent desktop for half that price.
 
@paul23 Only laptops I've seen with good cooling (e.g., run a 60 FPS high-detail game like Killing Floor 2) are MSI laptops.
 
But for that money I really want to be sure it won't everheat if I play diablo 3
 
user406009
1:24 PM
@Mr.kbok does have a point. Mac is the king of laptop batter life.
 
They even made cooling a selling point of theirs with their "Jet Engine blah blah™" cooling whatever.
 
user406009
And high dpi displays.
 
@Mr.kbok Well, it's way overpriced and the software is shit at best.
 
Toshibas can and will overheat all the time.
 
Well my HP never overheated.
 
1:25 PM
Lenovo... I'm not sure.
I don't have any HP or Dell data either.
 
@Puppy The software is noob-friendly, that's what drives sales
 
user406009
I don't trust Lenovo any more.
 
yet my brother bought a consumer hp (I couldn't find this HP version anywhere in normal shops) overheats constantly
 
user406009
They blatantly screwed over their customers yet another time in the news.
 
@Mr.kbok The software is fucking annoying and I wouldn't give it to anybody, especially noobs.
 
1:26 PM
> consumer hp
Well, yea.
Consumer anything is shit-tier.
 
Mine is also actually solidly build (metal), while his is plastic.
 
@Puppy You say that, but people who buy Apple computers tried windows before and decided they like it more
 
@Lalaland nah not half, half would cover the price of the CPU,GPU,Mobo, then you still have ram PSU, case... it would be cheaper yes, but not by that much. also for a fair comparison id have to be buying a monitor with the PC because all laptops come with a monitor.
 
user406009
@Mr.kbok There is a difference between trying Windows and actually learning to use Windows effectively.
 
1:27 PM
@Mr.kbok Given the vanishingly small share of Mac on desktop, I can safely state that that hardly applies to anybody.
 
user1804599
OMG IT WORSK MYC OMCPILER WORKS
2
 
3v0
this is the most complex contents page iver ever seen
 
Are the MSI laptops any decent with power consumption (if I would NOT game, could I browse/use office for like 2 hours)?
 
user406009
Mac's are fine products. They are just ridiculously overpriced.
 
@Lalaland Macbooks have no VGA
Nor enough USB ports or even HDMI
 
user406009
1:29 PM
The adapters are like $10.
 
3v0
macbooks have one usb port
 
@3v0 -.-
 
@Lalaland And then the software is shit.
 
user406009
I thought it was two last I checked?
 
user406009
@Puppy Nah, the software is fine. Never had any issues when I used Mac.
 
3v0
1:29 PM
most makers dont just have one USB port for a reason
 
user406009
Except the lack of keyboard shortcuts for moving windows.
 
that's what you said about Linux as well and then you completely contradicted yourself
 
how is one enough... You know you have a mouse, a (gaming) keyboard, a headset and an external hard drive.
you need at least 4
 
so I might just not take your word for it
 
3v0
im tiried of apple trying to think differentyly :/
 
1:30 PM
@thecoshman that's BS
 
@paul23 2 ports for the HDD
@elyse Does it support verbibols now, too?
 
user1804599
No, not yet. :p
 
@набиячлевэлиь ?
 
3v0
dont even get me started on apple!
 
1:31 PM
Use eSATA for the drive and audio output for the audio
Mouse and keyboard can share one external hub
Problem solved
 
right, now you all applegize
 
3v0
that defeats the point!
 
@CatPlusPlus Uh I don't think many mobile external hard drives use anything but USB 3.
 
I don't think mobile anything is worth anything
 
@paul23 well, the good news is you're wrong.
 
3v0
1:33 PM
thats like saying og why not just have a GPU hub because it doesnt already have one build in
 
But mac prides itself in it's sleek feel (and thus ergonomics?). But as a person with RSI I really need to use a well designed mouse and keyboard. And apple with it's huge touchpad seems to be going against that.
Always surprises me how people can even stand using a touchpad for more than 10 minutes.
 
@Mr.kbok huh?
 
user406009
@paul23 Hook it up to an external monitor with mouse + keyboard then.
 
user406009
But at that point, you might as well just buy a desktop.
 
3v0
the fact that you have to buy a USB hub is stupid in itself
 
1:35 PM
Well like i said; I am in need of a mobile desktop. Something I can carry in my bag and put in place.
 
3v0
where is the logic in that, A computer is supposed to have connectivity
you know, like most non apple PC's do
 
pretty obvious really
you can choose not to have the hub if you don't need it or can't fit it
 
user406009
@paul23 Anyways, you are probably better off heading to the review sites.
 
if you put the hub inside the laptop more or less then you always have to have the hub regardless of whether you want it or can fit it
 
hehe I've read about 100 reviews already :P
 
3v0
1:36 PM
so what
theyd be on the motherboard most probably
not an internal hub
 
user406009
@paul23 You could just carry your desktop around in your bag with you ;)
 
@Lalaland I actually thought about that.
 
3v0
thats the point of a damn laptop/desktop
 
@thecoshman The guy is raving about how HTTP was great and stuff but no one cares about HTTP. It's not the essence of the web
 
But problem is monitor, those aren't nicely shaped.
 
user406009
1:38 PM
I usually just read books when I'm traveling anyways.
 
3v0
you dont see me using a fecking USB GPU because my desktop only allows for one DPU
 
@thecoshman Then he goes on to demonstrate how his system rocks while ignoring all the requirements people who maintain websites have
 
3v0
GPU*
 
user406009
So hard to focus and work effectively without a nice seat + monitor + mouse + keyboard.
 
3v0
lets face it, youre bound to forget to bring the usb hub if youre out
this isnt even a serious solution so just quit talking about it
 
1:39 PM
@EtiennedeMartel I do not get it...
 
0
Q: How do I find my Fully Quantified Domain Name on Linux?

Adam BirdsMy domain name is for example: coampany1.tk My Hostname of the server is also: company1.tk So what would my fully quantified domain name be? Many Thanks

fully quantified domain
 
3v0
its not even worth it just for the sake of having another few cm of space to add an extra port
 
@wilx The Toronto Maple Leafs is a shit team that has been shit for so long the last time they weren't shit, photographs were in black and white.
 
The answer is 1
 
3v0
and its cheaper too
 
user406009
1:41 PM
@Mr.kbok You didn't hear about the new discovery of quantum domain physics? It turns out that domains are not waves, but actually particles.
 
Currently Learning:

Linux (Its better than Windows)
 
3v0
also if you need power over USB your fucked
 
user406009
Linux does have some cool things.
 
user406009
Tiling windows managers are really nice.
 
2
Q: What is the difference between a recovery swap and a CDS?

kbokAs I understand it, recovery swaps and CDS are both used to privide hedging against the default risk of a loan. What is the difference between them?

woo popular question
 
3v0
1:42 PM
windows aero theme sucks
it looks too 2 dimentional (flat)
despite the transparency
 
user406009
People really overstate the difficulty of tiling wm's anyways. They are certainly easier to use than stuff like manytricks.com/moom.
 
@Lalaland I agree it's just to get used to it. And it's your own keybinds
what tiling wm do you use ?
 
user406009
i3. It's quite simple to use.
 
user406009
~5 important key bindings to know.
 
@EtiennedeMartel Oh.
 
1:51 PM
@Mr.kbok well it's true, no one cares about HTTP, they just want their websites to work. I don't think this system will work for most sites, but I think it's something great for certain use-cases
 
user1804599
yes
 
user1804599
4 is the square of 2
 
@ʎǝɹɟɟɟǝſ 25 = 16 + 9
 
user1804599
and 16 is the square of 4
 
1:52 PM
5^2 = 3^2 + 4^2
 
user1804599
so 4 + 4 + 4 + 4
 
user1804599
looll
 
user1804599
I donno
 
It's clearly B
 
@ʎǝɹɟɟɟǝſ Of course, @Borgleader just told you.
 
user1804599
1:53 PM
yay hello world works!
 
@EtiennedeMartel Methinks his plonks are showing
 
user406009
The true WTF is the percent of people voting A.
 
Why would you vote 16?
 
If you don't understand the question?
 
user406009
@ʎǝɹɟɟɟǝſ You are either an idiot or a troll.
 
1:54 PM
@Borgleader Why would I have you plonked
 
user1804599
@ʎǝɹɟɟɟǝſ Bad humour.
 
It's a multiple choice question. If you don't understand, pick one and hope you get it.
 
user406009
@EtiennedeMartel But why A?
 
user406009
@ʎǝɹɟɟɟǝſ Also, did he get it right?
 
@ʎǝɹɟɟɟǝſ ignorance
 
user406009
1:55 PM
The Lounge demands answers!
 
42
 
@Lalaland No, he went with what the audience said
 
user1804599
my compiler is a masterpiece
 
user406009
Lol. Although to be fair, under stress and time limited, it can be hard to do arithmatic.
 
user406009
Correctly.
 
1:57 PM
@Lalaland Because it's the first in the list.
 
@ʎǝɹɟɟɟǝſ Kinda looked like you did, besides its not impossible. Luc had me plonked for years
 
@Borgleader Luc plonks quickly, though.
 
@EtiennedeMartel but you should never pick the end options for multiple choice
 
@thecoshman Maybe these guys don't know.
 
user406009
Perhaps we should do a public deplonking every couple of years.
 
1:58 PM
@Borgleader Luc has like 80% of the room plonked
 
user406009
Sort of like a forgiveness of debt.
 
Luc is the only regular who treats this room as a C++ room.
When discussions of dicks get in the way, he plonks and carries on.
 
:25621375 the fools
#obnoxious
 
user406009
@EtiennedeMartel Is he afraid of human anatomy?
 
1:59 PM
#owner
 
@EtiennedeMartel :P
 

« first day (1790 days earlier)      last day (3161 days later) »