| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12
Comments:
<0> ok thanks <1> Sol, do you have any idea how can I get the desktop maxY and maxX? please <2> Solamente, thanks for your explanations <1> google isn't helping me <2> and also Twister2, vawjr and many many others <2> now I'll hibernate <2> bbl <3> What would be a good/fast way to test if the start of a std::string x equals another y? <2> how many characters of x? <4> Run, u mean by start first letter ? <1> first x chars <3> I just hate it to make three string copies/temporaries, while all is needed is a test for each character of y. <3> no, x = "abcdefg"; y = "abcd"; <3> then y matches the start if x <5> where are you getting 3 copies/temporaries from? <2> aren't there any substring libraries out there?
<6> Run: find method. <3> rdragon: well, if you use substr() for example. <6> size_type find(const charT* s, size_type pos = 0) const <6> And various overloads of same. <7> std::equal(x.begin(), x.begin()+y.size(), y.begin()); // if y.size() <= x.size() <3> That would be rather cpu intensive when it's not found at pos 0 <7> yeah, or find.. <3> find that is. <8> string1.find(str2); ? <3> equal sounds like what I need. <1> :)) <5> what do you want to DO, Run? see if the first character is the same? <3> Suppose x is 10000000000 characters, then I REALLY don't want to use find. <5> if a[0] == b[0] <1> he wants to check if s.substr(x)==s2 <6> Then a substr of the test string, with length of the compare string <6> Test for equality <3> and so on for all chars of y, rdragon <1> but faster <8> whts the diff? the algorithm for find would be the same, it will stop after the first occurance no? <6> int compare(size_type pos, size_type n, const basic_string& s) const <6> Or that. <3> Solamente: that would make unnecessary copies thus. <7> std::equal(y.begin(), y.end(), x.begin()) // if y.size() <= x.size() <9> He has two strings, x and y. He's trying to find out if the string x starts with all of the characters in y. <5> does equal_range do that? <3> hmm, compare... <4> Run, aren't string.at (0) get the first character ? <6> Then use compare <6> There are several overloads <8> ah, ic <6> http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/cl***std_1_1basic__string.html <8> yeah, compare looks liek a winner <1> any idea on how do I get the position of the bottom right corner of the display? win32? <8> GetSystemMetrics() ? <6> sk8ing: GetSystemMetrics... and it's still not a C++ question. <1> I know <1> thank you <1> :D <6> sk8ing: http://www.charlespetzold.com/pw5/SysMets.c <10> sometimes I wonder why I bothered creating #win32 <10> all those questions are asked on either #C or #C++ <6> Indeed. <1> it's empty <6> Because EVERYONE ASKS HERE <6> And I'm tempted to cut them off. <10> you can bump them over to #win32, I guess <3> Hmm, I guess this will work <3> if (project_iter->directory().compare(0, iter->str().size(), iter->str()) == 0) <10> small chance the channel has a purpose <11> hey guys. <8> looks about right <1> I'm tempted to ask any kind of questions in here, it's the best place to get an answer for almost anything <10> we're not going to tell you who to vote for. <6> Win32 questions tend to annoy most of us, even the ones that code almost exclusively for Windows (like me). <1> it's not like I didn't google, I simply didn't knew how to do it <3> EVERY question should start with: After Googling for five hours, ... <8> sk8ing, also, remember multi monitor lovelyness <1> I'll say it is a windows bug <12> can anyone recommend a good book on metaprogramming? <6> Clickers: http://www.amazon.com/gp/product/0201734842/103-5014321-3907841?v=glance&n=283155
<6> And... <6> http://www.amazon.com/gp/product/0321227255/ref=pd_sim_b_4/103-5014321-3907841?%5Fencoding=UTF8&v=glance&n=283155 <12> thx :) clicking now <12> Solamente, are they books you can actually learn from for just ref? <3> Hmm, next problem: Given a function declaration... determine if it's C or C++. <6> Clickers: They're learning books. <12> Excellent :) thanks sol <6> That's an incorrect question. <8> C only, C++ only, or a union <6> int x(int y); /* This is both */ <9> Could you mean just checking to see if they are in an extern "C" <13> presence of scoping operator or bool perhaps would be another tip off <12> Solamente, one more question -- do you know how to use strings w/ boost::any? <13> as well as templates <6> Clickers: I haven't done it. <12> ok :) thx <6> What problem are you having? <12> i can get all types to work except std::string :P <6> Clickers: This doesn't seem to indicate any intrinsic problem: http://www.boost.org/doc/html/any.html <6> bool is_string(const boost::any & operand) <6> { <6> return any_cast<std::string>(&operand); <6> } <6> (From the next page) <12> yeah, i've been reading that too. when i p*** a string to an 'any' paramater, gcc states: "ISO C++ forbids ***ignments of arrays" <6> Without fiddling with it, I'm not sure. <6> And I'm in the middle of another body of code at the moment. <12> no prob :) you've helped me already :) <7> boost::any any = std::string("hello"); // this causes an error? <12> lemme check YU <3> . Of course we have X. But I'm a fighter for minority groups. I believe that on undernet there should not even be no moderation, but EVERY channel has the right for protection, if you understand what I mean. It's not up to any (human) to decide if we can give X or not. <3> **** <3> This is why I hate /msg ... <3> :) <12> yup, it died YU <14> sounds interesting <14> keep talking here! :D <14> so why are you a fighter for minority groups? <3> Swish: Well, you're too late.... I designed and implemented a method to have every channel p***word projected from the start, called Ap***/Up*** (or oplevels). <14> ah <7> Clickers, what error? <3> I designed that fice years ago, but "coder-com" people disliked me and I had no chance that they would want to cooperate with me (is: add the code) <14> i guess I was more interested in the reasoning behind it.. the philosophy <3> Therefore, I had the admins vote about it, and they approved it. <3> Then, the coders put it in the alpha branch of CVS and did nothing for it for four years. <14> heh <12> problem, brb yu - it's unstable for some reason <3> Once the ircu maintainer switched again, I got some cooperation and the whole system was finalized. It WORKED. <14> so is it being tested now? <14> or is it still tabled <12> al, linker messed up YU -- did it compile <3> But then... some group of people who basically hate me, lobbied and started a large political offensive.. and finally had the admins vote it down again (after FIVE years!) <3> So... now it's shot down again. That was last week or so, <3> The idea was this: If you create a channel that had not existed in the past 48 hours, then you can set a p***word with MODE #chan +A adminp***. With that p***word you are then able to set/change a +U userp***. Using that p***word as /JOIN #chan userp***, you'd get ops level 0. Opping people then gives them level 1 .. 2 etc. People with level x cannot deop people with level x-1. <12> Cool.. Thanks YUY0x7 -- it's working now... <12> lol <12> evil linkers <3> Empty channels would stay alive for 48 hours, therefore it makes no sense anymore to ddos people off. Takeovers are not possible anymore because the level 0 ops cannot be deopped. <3> Everything worked... it was finished. <3> But politics killed it. <3> Hell, it's in the server code right now - it's just disabled. <3> I really hate undernet, I can tell you that. <14> run, interesting <14> sounds a little like the chanfix on efnet <14> except that one is a week <3> (also: it would work such that IRC operators CANNOT interfer ... in order to avoid social engineering as well. Having an +A channel would make you God on that channel, cause even an IRC operator wouldn't be ABLE to take it away from you ... hum, one of the things some people didn't like "we won't be able to help them" yeah right, as if any help would be needed. <14> and unofficial (based on host) <3> I doubt chanfix works without human intervention on channels that are brand new and just created and are safe against social engineering of IRC operators. <3> The only "real" problem they came up with is that when you forget your adminp***... then you lose the channel. <14> why would you? <14> just attach an email to it as well <3> Exactly <3> write it down or something :/ <14> but the -real- challenge is how to smoothly transition all the channels to the new system
Return to
#c++ or Go to some related
logs:
conf thg520 #c++ #MissKitten #linux #MissKitten sspecter #chatzone brigikee #linuxhelp #linux
|
|