« first day (741 days earlier)      last day (4212 days later) » 

9:05 AM
Is it good to write GUI components' dimensions & coordinates (like "const int width = 800;" ) inside the corresponding components' class' header file?
Or should they be at top in cpp file?
 
@VinayakGarg In the C++ files, that way you don't have to rebuild the dependencies
 
@kbok Good reason!
 
hi c people
look at this c program
 
However there is one more option - to make them static member of class.
 
It displays the contents of file
 
9:10 AM
No
 
blargh, screw it.
 
I wan to display on ly that line which is ahaving text "this"
:'(
I dont know plz help @melak47
I know the function strstr()
But where to use it in this program
 
@DextOr uhh, what? I have no idea what you're talking about
 
plz BROTHER HELP
o_O
 
Where are the owners when we need them.
 
9:12 AM
ya
L/
 
@DextOr Just ask a question on stackoverflow. You're even allowed to send me a link once it's done.
 
I am not allowed to ask :P
PooR Me
:D
 
@DextOr: Why?
 
Why, may I ask ?
 
ya if you understan what is ma problem
@VinayakGarg I don't know :>
 
9:14 AM
we don't understand, you've not posted any code or any inkling that you've tried to solve the problem yourself
 
Poor People can't rais thair voices :P
 
Ell
ask on the main site
 
@DextOr: Please be clear in what you want. Post the link to code on pastebin.
 
Ell
there should be no reason why you can't
 
ok following C program displays contents of file
but I want to display only those lines in file which are having string "this"
Got it ????
 
9:17 AM
ah, you should have posted the link to pastebin
 
Ell
nobody likes reading big chunks of unformatted code :o
 
@DextOr and what is the problem with strsr?
 
You shouldn't use gets()
 
ok sorry for big code
 
9:18 AM
please create a ideone paste and put only links in chat
 
@Xeo We've implemented a monster. Supporting [hi:lo:] to have the semantics of [hi:lo:-1] is different from what Python does lol.
 
@DextOr: well your code is reading and printing the file a single char at a time. try reading a line at a time, then it should be obvious where to strsr
 
@DextOr: Yes use fgets() instead of fgetc() to read entire line.
 
ok then
where to use if condition
like
 
9:21 AM
after reading a line, before printing it
 
if( string == "this") ...
 
@DextOr [sic]
 
@melak47 which function to use to match
 
@DextOr strstr like you said?
 
ok I try
thx @melak47 and @VinayakGarg
 
Ell
9:23 AM
I still don't know why you couldn't have just asked on the main site o.O
 
if (strstr(line, what_you_are_searching_for)) { /* print line */ }
 
ooooooooooooohhhhhhh
:.
:>
 
I gotta go.
 
I think this should work
while( ( line = fgets(fp) ) != EOF )
if (strstr(line, "this")) { printf("%s",line); }
 
I see a load of C.
It makes me want to cry.
 
9:28 AM
@TonyTheLion Why? C is also nice.
 
Anyone following Google C++ style guide? Or any other good conventions.
 
^ google C++ style guide is a good convention?
 
^ lol
 
9:30 AM
:))
 
@VinayakGarg It's not good and no
 
I think he just misspelled "terrible"
 
@CatPlusPlus Ah, I will then keep consulting Lounge ;)
 
I like the one where they say "don't use references because they're hard :("
 
GCSG is retarded, and I think we even have a bookmark with explanation
Anyway gotta go
 
9:33 AM
@LuchianGrigore what a joke
 
Ell
anyone here do android?
 
Cat has done
 
@VinayakGarg My company want to adopt it, btw I'm leaving in one month.
 
but he doesn't like, surprisingly enough.
 
@VinayakGarg I have a half-finished article about it, I'll keep you posted if you want
 
9:35 AM
@kbok Sure :)
@Ell Android is slooow
 
Write a program in 'C' that accepts a sentence 's'
and a word 'W' as input. Now, the program should
print the starting position of right-most occurr ence of
'W' in 's'.
 
2
Q: Find the rightmost occurrence of a string t, in a string s

lameCorrected code: int strrindex(char *s, char *t) { int i, j, k, p; i = -1; for (k = 0; s[k] != '\0'; k++) { if (strlen(s) < strlen(t)) break; if (s[k] == t[0]) { for (p = k; s[p] != '\0'; p++) { j = p; while (s[j] != '\0' && s[j] == t[j-k] && t[...

 
thx @kbok :P
 
@TonyTheLion I am willing to agree with him on that.
 
user142019

Why Google style guide sucks, roughly.

Apr 22 at 18:22, 26 minutes total – 150 messages, 11 users, 1 star

Bookmarked Apr 22 at 18:54 by Cat Plus Plus

3
 
9:48 AM
off to meet WGP again
and then I'm seeing Skyfall with my ugly mutt sister
 
Have fun!
@DeadMG Oh. Let me know what you think afterwards.
 
@R.MartinhoFernandes oh, well I have too little experience to yet voice an opinion on Android
 
I shall do
and I shall also ensure that I do so in great depth so that everyone in the room is deeply spoiled
 
Oh, I don't want spoilers. I want to decide if it's worth paying for.
After Quantum of Solace I'm a bit reluctant.
 
How can you possibly spoil a James Bond movie ? "Drinks booze, kills bad guys, hump the girl(s)" is pretty much all there is to the movie.
Also the traitor is super obvious every time.
 
9:52 AM
that's the 1980's view
Casino Royale was a bucket of awesome
 
Quantum of Solace was a bucket of crap :(
 
Casino Royale was OK at best
Though I liked the "scratch my balls" moment
 
@WTP'-- meh I stopped reading when I realised it was just a cat and a dog winging about stuff. I am sure a lot of what they say I would agree with, but I can't put up with endless "do it this way because the other way is stupid and sucks" arguments
 
that was lols
 
@thecoshman Ow.
 
9:56 AM
> You’ve gotten your fill of internet memes.
Read more at http://thoughtcatalog.com/2012/19-things-you-should-stop-doing-in-your-20s/#ExxTlrk0sDXmik5l.99
lol, no I haven't :P
 
@WTP'-- 'Init methods should never, ever, ever, ever, ever, ever, ever, ever be used' and 'a class should be good to go for all it's functions as soon as the constructor is done ' - I have some little problem with these absolutes.
 
@R.MartinhoFernandes I'm not wrong though am I
 
@MartinJames why? Because they're absolutes, or because you actually know of situations where they don't hold?
 
> And thirdly, the code is more what you'd call "guidelines" than actual rules. Welcome aboard the Black Pearl, Miss Turner.
 
user142019
@MartinJames after the ctor has finished, exactly one of the following must be true:
 
user142019
9:58 AM
1) It throwed an exception.
2) The object is fully initialized and ready for use.
 
those rules are just common sense. Of course there are situations where common sense is not applicable (say, you're working in a code base which is already broken, and you can't/won't just refactor your way towards something sane), but no, as absolute rules go, that one is pretty sensible
 
@WTP'-- ..then your web browser may take several minutes to start up.
 
user142019
@MartinJames wtf?
 
@MartinJames ... what?
 
@WTP'-- threw is the word, not throwed
 
user142019
9:59 AM
My browser starts instantly when I click its icon.
 
I'm pretty sure browsers do not slow down if you eliminate init functions
 
If you're following rules blindly, you're not thinking. Get out of my programming.
 

« first day (741 days earlier)      last day (4212 days later) »