« first day (788 days earlier)      last day (4150 days later) » 

user142019
12:02 AM
-1
Q: Best Method of Study

Peter AvalosI've been in a .NET developer for 8 years or so, but have always maintained by open source heart. I am looking to absolutely master C++ on a ridiculous level. Want some suggestions. I know C#, OOP, Design Patterns. Books? Sites? Tutorials?

 
user142019
> 8 years experience
 
@Zoidberg'-- I'm more concerned about the open source heart maintenance
 
@Zoidberg'-- lol
 
uh what is this site that starboard says normal folks can't look at
 
@Cheersandhth.-Alf private beta for anime/manga stackexchange
 
12:15 AM
oh
 
It will finally be mine!!! ( jinx.com/p/… )
 
user406009
When you open an fstream with a relative path, what is the root?
 
user142019
@Lalaland The current directory, usually.
 
^ This afaik
 
user142019
I answered it. No need to confirm my answers.
 
user142019
12:18 AM
They are correct by definition.
 
user406009
Anyway to get the the directory of the executable itself? When I use the visual studio debugger it uses the wrong directory.
 
user142019
I don’t know about Windows.
 
@Lalaland That's because by default visual studio launches the exe from the project directory not the directory containing the exe
2
A: How to check if a file exists with stat in visual studio c++ 2010?

BorgleaderOk, so to illustrate the quirks of running from the IDE here's a little test I did. Hopefully this should help you figure out how relative paths work in VS. So my folder hierarchy looks like this: /_Sandbox _Sandbox.sln /Debug _Sandbox.exe /shaders color.vert...

My answer here might help you
 
user142019
Oh of the executable itself.
 
12:20 AM
@Lalaland possibly via argv[0]
 
user142019
argv[0]
 
user142019
And except for argv[0] you cannot easily do it because you may have multiple hard links to the file.
 
user142019
At least, in Unix systems.
 
user142019
Haskell docs are so fucking dry.
 
user142019
> (<|>) :: f a -> f a -> f a
 
user142019
12:22 AM
> An associative binary operation.
 
user142019
Very useful indeed.
 
@Lalaland given that this room is publicly archived, calling your professor an idiot seems unwise...
 
@je4d Chances of his professor reading the archives are minimal
 
user142019
And the professor would need to know who Lalaland is.
 
user142019
Assuming that is not his/her real name.
 
user142019
12:26 AM
Maybe his professor is @FredOverflow!
 
user406009
Nope.
 
@Zoidberg'-- I see what you did there
 
user142019
I don’t.
 
I was referring to the edits
 
user142019
Okay. :P
 
12:38 AM
@Zoidberg'-- i am very annoyed that visual studio editor doesn't recognize symlinks as referring to same file. then it opens two or more views of same file. and ask whether to update its views when you save.
further annoyance: public services, on the net, that are closed between 11PM and 7AM.
 
user142019
@Cheersandhth.-Alf wat. That’s at most 66.666…% uptime.
 
user142019
Imagine Google had that.
 
well it's like 66% uptime. but last time i tried it was in daytime and then it sent access code to my phone, and just claimed some internal error when i logged in
:(
which means i'm probably not getting moneys for christmas
doesn't matter much to me, but i guess many others experience the same
folks who really need that
 
user142019
I read “monkeys”.
 
user142019
12:49 AM
Y U PLURALIZE MASS NOUNS. :P
 
user142019
I reassigned caps lock to control and now I’m annoyed whenever I have to work on another computer.
 
user142019
I constantly press caps lock + S.
 
2:43 AM
Guuiiiz guizguizguiz quick question.
 
@ThePhD NO! Oh wait, I guess I'm supposed to let you ask before I answer...
 
Lulz
But, uh
It's more of an SDK problem than anything
Windows, for some reason, has their own typedef somewhere off in the Windows SDK, like: typedef unsigned char byte;
 
@ThePhD Right.
 
It's defined in rpchdr.h . Unfortunately, it's not occluded by any #ifdef BYTE_DEFINED or anything.
So it classes with my namespace define MyNamespace::byte when I do a using namespace MyNamespace
Is there any way to nuke out the typedef?
 
Don't use using namespace x
 
2:46 AM
user image
2
 
@Rapptz :c For real? D:
 
Didn't they teach you to avoid it?
 
@ThePhD If you look in Windows.h there's a whole series of defines to exclude specific pieces. Offhand I don't remember if there's one to exclude that, but I'd guess there's a pretty decent chance.
 
@JerryCoffin Hm, not getting much luck. Tracing down all the RPC files so far, it seems like none of this should even make it in when I do #include <windows.h> because I have #define WIN32_LEAN_AND_MEAN on.
AAAGH MOTHER FUCKER
d3d10.h THAT BITCH
 
@ThePhD Clearly need to use OpenGL instead! :-)
 
2:54 AM
I'm trying to make it so my engine can run-time switch between the two.
Currently, though, I'm only trying to get DirectX working.
 
@Xeo but wouldn't it seem weird?
 
Xeo
Nah, absolutely not!
Also, I'd say the ping should only contain a reference back to the other chat, like "@Rapptz: Anime.SE ping [link]"
 
Who is this handsome Rappts fellow
 
Maybe if I just...
change this single define in windows.h ...
Can't hurt anyone, right?
 
Why are you so hellbent on using namespace mynamespace?
 
2:59 AM
Because it's awesome.
 
Is the namespace name too long for you?
 
OH GOD WHAT HAVE I DONE I'VE BLOWN UP WINDOWS AAGH I'M SORRY WINDOWS PLS FORGIB MEEE
 
Xeo
@ThePhD points gun Say that again?
 
@ThePhD Apparently you blew up your caps lock key too...
 
@Xeo Um. It's a mildly useful feature given the right circumstances and right placement and correct usage and pleasedon'tshoot.
 
3:01 AM
Why don't you use namespace y = mynamespace if it's too long?
Sounds easier than whatever the hell you're trying to do
 
@Rapptz I just want to know what person thought it'd be a bright idea to have 'byte' defined as a normal type in windows.h
Without a define guard or anything.
 
they also define DWORD but no one is complaining. Maybe someone is, I don't know actually.
Also I'm pretty sure it's BYTE with all caps not byte. I could be wrong though
 
Xeo
Y'know, you could do #undef byte in a cpp
 
DWORD is all caps and I would never use Dword for anything except windows, because I'm fairly certain that's the only place which demands you use dword too.
Also, there's BYTE, and then there's the regular byte (search for byte, match case)
 
3:05 AM
do #undef byte
 
... It's a typedef.
 
You're complaining about byte but a couple lines on top you have #define small char
How does it feel using small instead of char? Kidding of course.
 
I don't feel anything. It's all the windows's include's fault
 
Are you indirectly including it?
 
Or more specifically, DirectX 11, because it includes it despite my demand for WIN32_LEAN_AND_MEAN
What's weird is it's used everywhere
I don't get why they don't use BYTE like the rest of the library.
 
3:10 AM
Are you indirectly including it?
 
@Rapptz Yes. I have to. It's part of d3d11/10/9.h
There is no #ifndef to get rid of it.
Unless I just don't want touse DirectX.
Which is an entertaining, feverishly gratifying thought,
but only a thought. :c
 
Why does d3d11.h use it?
 
I dunno. I'm throwing out a guess that rpc means Remote Procedure Call here, but I'm not sure.
In either case, there's no defines or anything to shoot it up before it happens, so I can't get rid of it. I'll just live with it and typedef unsigned char Byte instead.
 
NICE I was right.
I'm so good at this.
 
3:21 AM
Hi guys i'm new to programming
i'm not sure if i'm in the right chat room
but can anyone help with the following: goodchow.hk/content/45-good-chow-s-steak-sandwich
i want to move the 'good chow's steak sandwich' to the top of the screen and let's start cookin closer to the sandwich
 
I.. what
 
It's web programming.
If DeadMG was here, he could help you.
 
If DeadMG was here he'd make fun of him
 
That.. that too.
Then again, this isn't the best place to ask about HTML/CSS/ASP.NET/etc/ questions/
 
where would be the best place?
 
3:23 AM
Not sure.
 
There are other chat rooms.. I guess
 
3:50 AM
 
4:01 AM
@Bryan post an SO question with the original HTML/XHTML and CSS (in readable format)
dunno if *ML and CSS is really acceptable as SO question (it's not programming!), but try it anyway
 
Xeo
4:24 AM
0
Q: Java encryption and C decryption using AES

인성준I am trying to encrypt and decrtypt using Java and C. Each of the works fine, but the two are not compatible together. I am hoping to get source examples of Java-encryption and c-decryption. Could any of you provide it please?

What the fuck.
Talks about encryption using Java and C, tags C++11.
 
Hi.anyone here to help my lack of knowledge in looping.
 
@Xeo Haha, this is getting confusing, now I have 2 chat windows + 3 other tabs to watch for. (SO, meta, Anime)
Although SO has been particularly slow - probably because it's too close to the holidays.
 
Xeo
Since I switched my tab filtering, it doesn't have too much output anymore.
Since I'm basically only interested in C++11 and templates at the moment.
 
4:50 AM
Still up and about @Xeo?
 
He's been arguing about anime for a bit
 
Xeo
Aye
 
Yeah, we're just have our attention split between this room and Anime.
 
Xeo
SO is just stealing my time right now. :( I should sue 'em.
Btw @Mysticial, what did you think of that AMV?
 
4:53 AM
@Xeo Haven't watched it yet since I'm in a group meeting.
 
Xeo
Oh, I see.
 
> Does anyone know why ill-form occurred on the UTF-8? (...) If i have a code point: U+4E8C or "二" In UTF-8, it's "E4 BA 8C" while in UTF-16, it's "4E8C". Where is this "BA" comes from?
 
guys,I am facing lot of trouble in looping.Is there any proper site to learn basics and complex loopings(for,while,foreach.....)
 
Xeo
@picasa How about every book about learning programming ever? :)
 
I thought those were pretty straight forward
They're basically.. in English. Unless it isn't your first language.
 
4:56 AM
I'm sure even the bad books explain this moderately well.
 
Xeo
Oh yeah, does the Puppy's tutorials cover that yet?
 
No idea.
Haven't looked at them since he redesigned everything.
Being busy sucks.
@Xeo Looking at this codepuppy.co.uk/cpptuts/Beginning/index.aspx, I thought it would be in "Flow control", but that only covers ifs.
Failpuppy?
 
@SethCarnegie Or maybe for me...
0
A: C++ Optimize if/else condition

Jerry CoffinLet me preface this with the fact that what I'm going to outline here is fragile and not entirely portable -- but under the right circumstances (which are pretty much what you've specified) I'm reasonably certain that it should work correctly. One point it depends upon is the fact that IEEE flo...

 
Xeo
5:21 AM
Should I be worrying if I constantly get those "too many request, proof you're not a robot" pages when searching something with Google?
 
You're typing too fast and querying too fast after you type.
 
@Xeo Does seem a bit odd -- I virtually never run into those on Google. Maybe the robot has some ideas...
 
Xeo
@ThePhD Wat?
Really?
ooh, wait, I can see how that might happen with the "instant search"
Wait no, that doesn't make sense.
 
@Xeo Just my guess actually. It's only happened to be when I lightning-typed my queries and then hit enter like a boss.
 
Xeo
The little search-edit-field doesn't do instant-search.
I think, atleast.
It only does recommendations for the search term
 
5:27 AM
I dunno then. Maybe you're searching for robot-like things?
Alrighty.
I've successfully created a bastardization of ogonek that I can sort of use in VC++ but preserves 0 of the functionality of ogonek.
.... It's not really ogonek anymore, lulz.
 
I am not sure what that means. You deleted all the source code?
 
@R.MartinhoFernandes Lol, no silly willy. I just created my own 'encoding' class. It doesn't have any of the validation stuff ogonek has, or the thoroughness, or even any kind of normalization, which makes it stupendously bad.
I think the only upside is that there's a base virtual 'TextEncoding' class that I can use to change encodings on the fly for things like my readers, which might need to change encoding in the middle of reading a file or something.
As far as porting ogonek itself, I still suck balls at deciphering these template errors, so it's not going so well.
 
@ThePhD I have no idea what to think now.
Yup, completely flabbergasted.
 
Well, really, I just needed a base class to work with my Readers (which are not allowed to be templated at the moment). After that, the actualy UTF8TextEncoding or ASCIITextEncoding classes still have templated functions for things like EncodeOne.
 
I don't think I've ever seen a more blatant case of YAGNI.
In this case, it's more like IAGH (It Ain't Gonna Happen).
 
5:37 AM
:c But it will.
I mean, it's happened with Endianess thus far anyhow.
 
Wut.
Why the fuck is your input completely and utterly broken?
 
It was just for a stream that contained FLAC data in it. FLAC is always written big-endian style, but I keep everything else to little endian. So, uh. I needed to change the endianess. Fixed*
 
"but I keep"?
Ah. As usual. A self-inflicted problem.
 
Well everything else in the universe that I use is little-endian, with the exception of FLAC and PNG.
 
Making it an hybrid abomination does not make it little-endian either.
 
5:42 AM
Well... the goal was to call the same functions on the same class, rather than spawning a new Reader of some sort.
 
So in the end you are left exactly where you started "everything else in the universe that you use is little-endian, still with the exception of FLAC and PNG, with the exception that now you have a horrid mixture."
 
How else am I supposed to solve it? Resave or change the endianess of every FLAC and PNG file I come into contact with? D:
 
I mean, when the data's done being processed, it ends up little-endian... I don't mind that the reader's messy, just so long as the output is clean, right?
 
You normalize everything into a sane default after reading.
@ThePhD You said the input changed endianness halfway through.
10 mins ago, by ThePhD
I think the only upside is that there's a base virtual 'TextEncoding' class that I can use to change encodings on the fly for things like my readers, which might need to change encoding in the middle of reading a file or something.
"in the middle of reading a file"
If it's still not clear, that is madness.
 
5:45 AM
Well yeah, the raw data or the file's or stream's bytes would (like in my flacpak), but that's in just the input. When the data's done being read, it always come out to being little-endian.
 
So, you are saying FLAC files have mixed endianness?
 
Nooo. The stream they're packed in has mixed endianness.
The streams I'm writing to disc to compress things and bundle things.
 
@ThePhD How's writing to disk related to reading.
Are you trying really hard to confuse me?
 
Blurgh.... I'm sorry. I'm explaining this wrong.
 
It is working.
 
5:49 AM
Noo I'm not trying to confuse. ;~;
 
There is a proposal to add animated glyphs to OpenType. WTF.
 
Okay, from the top:

Sometimes, I have files that have mixed-endianness. They're not native files that everyone else defines. They're the personal files I use for my game, to pack data together (this includes textures, audio, etc.). My audio file of choice for Lossless audio is FLAC, which is big-endian. However, by default, the descriptors and data that accompanies the raw FLAC files in these big packed files on disc is always little-endian. So, when the reader reads "Hey next up is on FLAC data", it has to change endianness so it can read the big-endian style FLAC data, because I don't re
Does it make sense now?
 
Oh well. Ok.
I can see how I would design that so it makes no difference anyway, but I know nothing about your design.
 
The same thing can happen with the text encoding of a block of text that accompanies some of this stuff. Something might just be straight ASCII, while other parts of it might be UTF32. Personally, everything I do is UTF8 (because it's endianness-agnostic, thankfully), but if I do encounter a blob of UTF32, I'd like to tell the reader "Hey, next is UTF32 data", and for it to change to 'UTF32Encoding' and read the data out and store it in Ram as my default string choice (which is usually UTF8).
So when I do something like "ReadString", I want it to read UTF32 data, but spit out my normal type I usually use for texts/strings (UTF8).
 
Ok, I get it.
It does sound like this reader is doing too much, and knowing too much. Personally I'd just have it mmap the appropriate sections and have smaller specialized readers deal with whatever is in the blob.
 
6:00 AM
Ah.
 
This scales all the way down to ints, actually.
 
Well, I dunno. My first thought was to have templated readers, and to just pass in a bunch of template arguments for things like Encoding and Endianess.
The other way I thought to do it was to just have a single reader which takes things like an Endianess and such as parameters, and to hold references to those for its lifetime.
So far I've been going route #2, which is why I usually need to have a base class for things like TextEncoding or Endianness so they can serve as the abstract type that the readers use.
Albeit, strict inheritance at times can kind've suck, though template inheritance feels kinda the same anyways...
 
@MarkGarcia, If I'm correct, the first sounds something like Bee-yarn-uh.
 
@chris Hehe.
@chris Damn you're fast.
 
I'm not even going to try pronouncing his last name without someone speaking it to me repeatedly.
I also have 0 Danish speaking capabilities.
 
6:11 AM
@chris I have even heard someone pronounce it as "Strawstrowp".
0
Q: c issue error is used unitilialized in this funciton

Bjesua Sagastumei cant fix the problem how do you do that? i would like to have some ideas from you to fix this error... the error that shows me is: "Warning: 'inicioLista' is used initialialized in this funciton ....... #include <stdio.h> #include <stdlib.h> struct registro { int valor; ...

Look at the first comment of the first question!
 
@Rapptz, I forgot about that!
 
Awwwwwwwww! No headphones!!!
 
Now if only I didn't have this hidden VLC window playing music
I hear "stroh-stroh"
 
6:16 AM
The one part of C++ nobody knows: How to pronounce the creator's name.
 
Unless you're European.
 
Hence the Yes, this probably is the most frequently asked question :-)
 
hi
 
I had a hard time spelling it at first until I got used to it
 
i wanted to hook an application to windows login screen
 
6:17 AM
Some know-it-all guy humiliated me for that.
But... He's wrong!
 
@techno, What kind of application and what version of Windows?
 
how am i supposed to do it,is writing a windows service necessary?
@chris windows7
 
A service is your best bet, but depending on what the program does, you might have some troubles.
 
@techno You have 7? Try holding a window and shake it left and right. The background windows will minimize.
 
@MarkGarcia, I disabled that.
 
6:19 AM
@chris i just need to read user password
 
I forget what it's called now.
 
@chris Is it a bug?
 
@MarkGarcia, It's a feature. It has a name.
I've actually done it accidentally, but not much when I was trying to.
 
Aero Shake or just "Shake"
Stupid name, I know.
 
@chris Hehe. Bugs are features though.
 
6:20 AM
@techno, Good luck. Services can't easily interact with the user.
 
And it works up and down too!
 
I think I actually tried either a keyboard hook or GetAsyncKeyState with my computer startup service and it didn't work.
 
@Rapptz Stupid is too mild a word.
 
@chris i don't want a service,i just want to hook to windows login screen and read the password the user types in
 
Why would you want to read the password? Windows already has that feature out of the box.
Also, no one will help you write malware. Right, guys?
 
6:21 AM
Yeah I ignored him instantly because the intentions were clear from the first question.
 
Depends what it's for. Getting the user's password doesn't sound as promising as other things.
 
In other words, you're trying to write a keylogger....
 
@R.MartinhoFernandes It's technically a spyware.
 
@R.MartinhoFernandes Holy cow! its not a malware
 
Riiiiight.
 
6:22 AM
@techno Just ask it on SO. I promise, you'll get lots of responses.
 
I enjoy writing malicious programs that are fun.
 
@chris And fun means...
 
oh come on guys
 
No, Mysticial is right.
 
@MarkGarcia, Nothing that causes actual damage, but something I can laugh at when it runs.
For example, turning all typed text into leetspeak.
 
6:23 AM
Word of advice: make sure you explain why you need to do this in your question, or it will simply be downvoted and closed and deleted.
2
 
@R.MartinhoFernandes SHHHHHHHHH
 
@chris "Actual damage", hmmm.
 
@techno Is that a phishing site?
 
@techno, They probably use a credential provider for that.
 
6:24 AM
no man
just see
 
And that's very tricky to get working.
 
@chris :)
 
And there's almost no information on it.
 
yeah
 
If you do get one working, though, take advantage of it and combine it with your camera or something.
 
6:25 AM
i was thinking how they might have done it
 
I am sure there is more information about it on SO than on chat. (Hint: there are about thirty people here, yet thousands lurking on SO)
 
@chris yeah! need to get it working :(
 
@R.MartinhoFernandes, But 30 who look at winapi tagged questions :)
 
@R.MartinhoFernandes Technically, 8.
 
@chris And here?
 
6:26 AM
0
 
I count, I don't know about anyone else.
 
:)
 
I think my obsession with raw winapi is too strong.
 
Jerry Coffin and Alf are good with winapi but both are gone
 
6:27 AM
I should be thinking of C# solutions before I think of winapi ones.
 
Seriously, if there is a lack of information about this you want to create it. You do that with questions on SO, not here.
 
@Rapptz And I doubt either one will help someone write a keylogger.
 
@Mysticial :P
 
@Mysticial, Keyloggers are easy enough. One on the logon screen? Maybe not as much.
 
I've written many. Does that make me a bad person?
 
6:29 AM
It's funny, I only realized a few days ago that you can replace something there (e.g. the utilities manager program) and yours will run instead.
So I've been having fun running random programs before I log in.
Of course it's password protected as well.
Wait, how did I get in here from doing my university applications?
 
@chris You can probably do it by listening on the BIOS ports.
That said, I shouldn't be giving him any ideas.
 
That reminds me. I kind of want to write a ring 3 driver, but I don't really :p
According to my friend, he looked at some DDK stuff and it was overly complicated as well.
That's kind of what I do. I just look into how to do something I haven't done before. Drivers have crossed my mind.
Great, my login for the application site expired.
 
Oh, I'm an idiot.
 
-3
Q: Where and how to learn JavaScript? - Beginners

Saqib SabirI want to learn JavaScript but First of all I am searching a visual tool to debug JavaScript, Just like Microsoft Visual Basic Express for VB.net with this tool we can debug our application and gets errors and can check our code are correct or not, Same features I am searching for JavaScript. Can...

lol most of the answers link to w3schools
 
@Rapptz wow...
lol
 
6:41 AM
Ouch.
 
downvotes incoming
 
w3schools is the old cplusplus.com for web developers.
 
ahaha
 
@chris YEAH!
@chris You meant that to be starred, don't you?
 
I made it unambiguous.
 
6:43 AM
Silly chris wouldn't star whore like that.
 
It's now a short, self-contained, complete, correct expression.
 
And yet another answer for w3schools.
This hilarious.
 
w3school is a very best site, but as i mention i m searching for visual tool. Well Thank I will try w3school @Mysticial — Saqib Sabir 41 secs ago
Wut?
 
Weren't there flags a few days ago because of it?
LOL
 
@Rapptz, Yup lol.
 
6:46 AM
yep
 
That was my first in-chat flag thingy.
I thought it was a reply.
Do not be concerned if there are no Grade Nine or Ten courses listed. They better not be.
 
@Mysticial: Maybe he thought that you are amused because your most favorite site on the Internet gets mentioned this often.
 
Who downvoted the w3school answer?
 
Ell
Mornin all
 
ahahaha, he accepted one of the w3schools answers.
 
6:52 AM
lmao.
 
What's that stream modifier that let you ignore whitespaces on input?
 
skipws
 
@chris Yes. Thanks.
 

« first day (788 days earlier)      last day (4150 days later) »