@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14



Comments:

<0> the registry is bad mmmkay?:/
<1> I don't have a registry.
<2> of course you can use regedit and trade configs that way
<1> I do have NetInfo though
<2> a registry was a mistake
<2> netinfo is just like a registery :)
<2> well netinfo is more like a directory.
<3> At work I moved from one laptop to another and transferring PuTTY configs ****s. It should store it all in a config file in your home dir.
<2> (like LDAP)
<3> But that one issue is EASILY forgiveable since PuTTY rocks in almost every way and it's free, free, free as in beer!
<1> Who doesn't like free beer?
<2> Teckla, it should store configs as an RSS feed so you can synchronize them with your google account
<3> OrngeTide: Haha, awesome
<2> Teckla, you try google browser sync for firefox?
<3> OrngeTide: Nope, but it looks really handy
<2> now turning putty into something that can do windows console instead would be nice. cygwin is pretty ****ty in windows console. cut&paste is a chore.



<3> What would a console mode get you?
<4> is it wise to use a global int type variable for error response after the function has been called, something like errno but only a userdefined/developed?
<2> Teckla, well then you could go into cygwin and have proper cut and paste and proper terminal emulation
<2> [E]dvinas, not really. but it's often done.
<3> OrngeTide: Ah
<2> if you have TLS then you could make it a TLS global. that's not as bad.
<4> what's the main reason, why not?
<2> because if you go multithreaded you're kind of hosed.
<2> can't you just return it as a value or p*** a pointer that the error response goes into?
<3> Some kind of error getter function, and error setter function, could be written, and made threadsafe, which could be useful.
<2> yea. that's how many SQL libraries do it. you call like a geterror on your SQL handle.
<3> In fact, with some clever macros, you could even make it look like you're accessing a regular old global variable.
<4> so all i need to do is try to lock the variable and then read it? p*** it as a return value, then unlock again?
<3> Have an error getter that returns a pointer to a per-thread int, and an error setter that does the same.
<3> Then you can put some macros around those and literally do: FOO = 1; int error = BAR; etc.
<3> [E]dvinas: Not that kind of threadsafe.
<3> A per-thread error
<3> Using thread local storage.
<2> you want to make sure that the sequence is preserved. so you're reading the error for the function the current thread called. rather than the function that was ran in another thread.
<4> and ... if i will use it only in one thread? can i use it as global?
<2> i normally just only allow one thread per handle. and just store the error in the handle.
<2> indexing by thread id is a pain on some systems
<4> now my function returns pointer, and a NULL pointer in case of error... so i will change it that it always return a pointer, and in case of error, the info about it will be stored in the pointer to the structure of mine...
<5> uh, besides anything having to do with me, what do you people hate about he internet right now?
<6> you
<5> i love you man
<6> i know
<7> wtf ?
<6> yep
<7> what yep ?
<6> exactly
<8> doh. I want this bike: http://tinyurl.com/f34qy
<2> myrddin, sportsters are nice. you can pretty much upgrade a brand new 883 to a 1200 for less than the price of a 1200. and end up with a lighter bike. ehhe
<2> myrddin, harley engines are tempormental. and the sposters is basically hardley's answer to british road bikes of the 1950s.
<2> myrddin, the 2006 sportster is probably the way to go though. over the model you're looking at you get: rubber mounted engine for decreased vibration, bigger rear axle, reduce gear whine (helical cut gears).
<2> myrddin, oh and they don't use the engine as part of the frame on the newer models. which makes swapping out engines way easier.
<8> OrngeTide: yeah. the 2006's look nice, too.
<8> the thing with the tempormental engines though is mostly from the 70s, early 80s. I've read they've really cleaned up a lot.
<2> myrddin, are you looking for the rrmpa-rmp sound or a harley? otherwise i don't see much value in a v-twin:)
<2> indians have a better sound than harley anyways.
<2> myrddin, yea. they've cleared it up. and harley is using electronic ignition on some of their bikes now too.
<2> but generally harley is cautious about switching to modern technology.
<9> FINALLY! freakin' gaim wouldn't join this channel for a bit
<10> yo
<10> how can i create a function that only excepts most charcters from the keyboard
<10> like i got isalnum and isspace but what about &^$ etc
<10> ;[
<11> kthx: Well I'm not really sure what you're asking.. but isprint()?
<10> look ill show you
<10> http://rafb.net/paste/results/aKQftg22.html
<10> any quicker way to do it?
<11> Make a table?
<10> example?
<10> =[
<1> I like tables!
<11> It would just be an array from 0 to UCHAR_MAX, each entry having a value of 0 or 1.
<1> NSTableView FTW
<10> Ns?
<1> Yes.
<10> man i dont think i know how to that
<10> ;/



<1> Heh, it doesn't sound like it's what you want anyway.
<10> why?
<1> That's just to display and manipulate tables
<11> You could also just use strchr() and an array of valid characters.
<1> You still need to attach a datasource ot it
<1> But that can be as small as two methods
<10> err strchr would be even more messy?
<11> strchr() would be more messy than 20 lines?
<11> Yeah, OK.
<10> err
<10> enlightem me then
<10> =[
<10> id have to have like 20 strchr then
<11> if(strchr("`~! etc", yourchar) != NULL) ...
<10> yeah that would still be 20 lines
<11> No, you're wrong.
<10> err?
<11> I don't know what you're trying to convey with "err".
<10> ok
<10> i ahve 20 chars
<10> which i need to check
<10> which is 20 strchr's
<11> Yes, I know what you're doing.
<10> so?
<11> So you clearly don't understand how strchr() works. If that's the case, you could simply say that.
<10> does it work like strtok?
<11> Why would it?
<10> with multiple chars?
<10> like strtok you can specify multiple chars
<11> Before you decide something won't work, don't you think you should at least understand what it does?
<10> if you cant do that in strchr then how can it possible be more efficeint
<10> i never said it wont work
<10> id said it be messy
<11> Because you don't know how it works.
<10> well like to tell me?
<10> (+Xirtam) if(strchr("`~! etc", yourchar) != NULL) ...
<11> Not really, not if you can't simply say "I don't know what strchr() does".
<10> yourchar = 1 char?
<10> so....
<10> i know what it does
<10> searches for a string
<10> lmao
<11> No, it searched for a character.
<11> er, searches.
<10> yes so this mean i need 20 strchr's to be done and this isnt tidy
<11> You're wrong.
<10> why?
<10> grr
<10> i dont understand you
<10> i think you misunderstand what my code is doing
<11> Look: It searches a string for a particular character. You could make that string full of the characters you're looking for.
<10> so strchr(buff,abcdefgh);
<10> would work
<10> ?
<11> No, it certainly wouldn't.
<10> then youve misread my code
<11> Wrong.
<10> lol
<11> You just don't know how strchr() works.
<10> man
<10> can you give me an example?
<11> Even if you're unwilling to look at your documentation, you could look at the strchr() example I gave.
<10> omg i read
<10> WTF
<11> I'm sorry, I mean read and comprehend.
<11> If you don't, then ask a specific question.
<10> i have a buffer so how can 1 strchr check and see if 20 chrs are present if not do {};
<11> You're doing a whole bunch of checks on a single character (iClient->iRecvBuffer[i])
<10> yes
<10> because i want only those charcters to be allowed
<10> else it makes it a space
<11> You can replace all those single checks against '`', '~', etc with one call to strchr().
<11> Because you can see if that single character is contained in a string of "acceptable" characters.


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c
or
Go to some related logs:

#computers
im the jauggernaut
#politics
#gentoo
int32 gamedev
#delphi
#beginner
#nhl
#asp
#windows



Home  |  disclaimer  |  contact  |  submit quotes