@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5



Comments:

<0> SufiBlade: Do you have a back-end?
<0> bah!
<1> But it only outputs ****.
<1> (Har har har)
<0> hehe
<2> isn't that the backbone?
<2> Some RegExp cracks here?
<3> a little
<0> Just as the question already.
<0> ^-^
<2> I'm searching for a shorter version of:
<2> to replace something like "\en-US\" by another pattern
<2> like "\de-DE\"
<2> anything more elegant?



<0> kirschkern: just like that?
<0> a fixed collaction to some other?
<2> yes
<0> then just do as you just did
<2> two lower cased letters followed by a minus followed by two upper case letters
<3> [a-z]{2}\-[A-Z]{2}
<2> DesT: Why escaping the minus?
<0> Don't escape the -.
<2> I thought there would be some keyword indicating an upper or lower character.
<0> even so, I don't see how that will make it any better.
<3> coz minus is an operatro init ?
<0> kirschkern: No.
<3> operator
<0> DesT: no.
<3> u sure
<0> DesT: Yes.
<2> - is no operator
<2> What should it stand for?
<0> kirschkern: some regex implmentation have - as non-greedy.
<0> .- is the same as .+?
<0> (in some regex implementations, not in javascript)
<2> Ah, ok. Didn't knew that.
<3> my bad
<2> Thanks. I'll stick with my current solution.
<0> even so, I don't see how making the pattern generic to target all two-lowercase-dash-two-uppercase is better than en-US
<3> http://www.codeproject.com/dotnet/RegexTutorial.asp
<2> fatbrain: While using just "en-US" would be the easiest, I don't know about the input or output string. I only know the pattern and replace the pattern in input by output.
<2> Some Localization stuff for Mozilla
<0> is it always one collaction that will be relaced to some-other?
<0> or do you want to translate them into something else depending on what the source-collaction is?
<0> like, en-US => en-UK while sv-SE => xx-YY
<2> I don't care about regions, just the main language
<2> But I still use the defacto standard with the language and region code
<0> yes, then what you had to start with will work just fine.
<2> Actually it works fine, but it looks a bit clumsy
<0> Well, how does it look?
<2> But while I couldn't remember the operator for lowercase/uppercase character and couldn't find anything documented, I thought I missed something
<0> regex is case-sensitive by default
<0> There's a ignore-case option tho.
<2> I know
<3> unless u use the switches
<3> |\W \d etc
<3> - |
<0> ?
<3> ?
<0> DesT: \W <- non-alpha, \d <- numerical
<4> non alpha means anything but the abc
<3> yes coupled with other things becomes Non Case sensitrive
<4> numerical means only numbers
<3> really thanks for that :P
<4> ignored
<3> lolol
<0> DesT: That's only because \w is short for [a-zA-Z0-9_]
<0> and \W [^....]
<3> yeh my poine exactly
<3> point
<0> well, it doesn't impact on the ignore-casing, it just includes both lower-/uppercase version of the alphas
<3> .. non case sensitive with exception of underscore
<4> DesT : please be quiet
<3> one thing ive learned about irc coding help channels is people dont know how to argue properly , its very comical, they get all hot and flustered and place u on ignore and say things like "please be quiet" , its a Discussion man CHILL OUT !!
<3> there is my 5 pence, njoy



<5> Can someone tell me why alert (String.fromCharCode(window.event.keyCode)); won't return the proper typed key on some values (ex: - which returns ) I guess it has something to do with unicode and ascii
<2> What keyCode?
<2> Number?
<5> keyCode = 72 if I do an Alert
<5> I typed the letter "h"
<5> this works but puts it in caps
<2> Yes
<5> keycode 109 (-) returns "m"
<2> using keyCode within an keydown handler will return the keycode, not the character code
<5> yep but this should give it back String.fromCharCode(window.event.keyCode)
<2> You may check for charCode within an keyPress handler
<2> The keyCode always refers to the key, not the character!
<2> (At least it should)
<5> I just tried it in keypress and it works... any reason why it works in keypress but not keydown ?
<1> Poor code.
<5> mine ?
<1> Yes.
<5> what would be better to return the typed key ? then String.fromCharCode(window.event.keyCode)
<1> http://www.quirksmode.org/js/introevents.html
<1> keyCode is IE O
<1> *only
<2> Herrick: Because the character is set on keypress not on keydown. charCode is only defined on keypress
<5> I know... it's for an intranet where IE is mandatory
<2> Pilum: keyCode is not IE only. However window.event is IE syntax
<5> kirschkern: if I validate the character on keyPress, can I still return false discard it so it doesnt appears on screen ?
<2> Usually not. You need to cancel the keypress event
<2> However, you may set a variable on keypress and, when set, cancel the keypress handler.
<5> Ok... I tried it it works, thanks... the only problem I have, setting the returnValue to False won't prevent the keyUp event to run
<2> Sorry, you may set the variable on *keydown*
<5> I understood :)
<2> Every key handler is called
<2> You cannot suppress it by canceling a previous handler
<5> thanks, that was really helpful
<6> telnet pinguin.eikon2.fs.ei.tum.de 2006
<7> hahahah
<7> is it live?
<8> how would i be able to check if something's an array in IE5? (Usually I'd just check against foo.constructor, but that doesn't exist for IE5)
<0> Tangram: Try the instanceof keyword
<0> foo instanceof Array
<8> ah
<8> i'll try that
<8> thanks
<0> you'r welcome.
<0> Hope it work :)
<8> it returns true :)
<0> great :)
<8> sweet
<8> thanks a ton
<8> is instanceof an IEism?
<8> my IDE doesn't recognize it as a JS keyword
<0> It's JS
<0> get a *better* IDE :P
<8> heh ok
<8> :)
<0> I only use SciTE for my code.
<0> it's the best.
<8> never heard of it
<8> i generally use vim, but am using dreamweaver right now
<8> :)
<9> hmmm scite looks interesting
<10> sukotto: you can get vim for windows, y'know
<9> I know. I tried it but it just didn't work for me. Dunno why
<9> like vi just fine at the commandline
<8> gvim lets you do things the 'windows' way
<8> ;)
<9> yeah, gvim
<8> like ctrl+[xcv]
<10> sukotto: it took me 6 days of constantly using vi before i stopped tearing my hair out. you just have to stick with it
<8> i used to hate vim
<8> now my stuff in other editors becomes peppered with :w's and 1G's


Name:

Comments:

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






Return to #javascript
or
Go to some related logs:

#linuxhelp
mac andek
print_r($_POST); in ASP
#linuxhelp
justjason undernet
coff ioana
#linux
+windows 2003 +RRAS ++port range
#teens
#london



Home  |  disclaimer  |  contact  |  submit quotes