« first day (669 days earlier)      last day (4294 days later) » 

3:02 PM
@JonathanLaf no I can verify this... the 'toggle' is trying to calculate the new height based on the elements within it. This is probably the wrong way to do things. you should know the elements in your own menu - hard code that sucker.
jsfiddle.net/rlemon/hYLGr/5 (ignore my 'stop()' code that was me messing around)
 
rad
anybody?
 
@rad you mean like the facebook 'wall input' or twitters auto growing inputs?
 
@rlemon thank you i'll try hardcoded like this, I hope the client wouldn't change the menu loll ;)
 
@FabrícioMatté sorry if i'm disturbing but can you explain how you get the values from my site? I want to populate all the course names and change with the current site's html file for the momen
moment*
 
@rlemon renders terribly in Chrome...
 
rad
3:06 PM
@rlemon not like the facebook 'wall input', I want the width to be adjusted automatically according to the data that is being pulled up from the database. And I am not a Twitter user, so not sure about auto-growing input but it sounds similar to me
 
ohh then why are you using js to manipulate this
there was a time when servers served up the code they wanted the client to see
 
back
@ilis not sure what you meant "get values from your site", i just ctrl+c ctrl+v'd it. Do you want to implement ajax or something?
by the way can you edit the HTML? otherwise it won't be an easy task
whenever you say populate i think about ajax so sorry if that's unrelated :P
 
i handle accordion menus as like tableviews of iOS(obj c) so i use populte. i dont need ajax for the moment. your sample shows two cources but i want to show all the cources as you have done
@FabrícioMatté
 
Oh I see
Was your site made in php/asp or something? I forgot
 
php
 
3:20 PM
oh then it's easy
 
php-jquery-mysql-html
 
find where it echoes those titles
 
then?
i know where they are echoed
 
and wrap them inside the <div class="classwhichIforgotButIsInTheFiddleWhichIcantFind">
well
 
3:21 PM
if you have a templating engine it'll be in a template file, otherwise it'll be in the php page itself
 
I need some regex help
var str = "some (yawn&red) string";
str.match( /\(([^\)]+)/g );
["(yawn&red"]
I want to get ["yawn&red"], without the parenthese
 
Positive-Lookbehind
10 secs
 
I really have to read this <<
 
@FabrícioMatté in fact i dont know so much web dev. but i have read almost all of manuals on php.net, also i have c/objective c background.. so i get some difficulty to handle somethings... I will play with it, i think i will get it done:)
 
3:24 PM
description states "less than a pound" yet if you scroll down to prod specs it is 2.04lbs
 
lol
and
what's lbs?
 
pounds
 
!!> what does lbs stand for?
 
waat, js doesn't have negative lookbehinds?
 
so how can it be less then a pound if it is 2.04 pounds
 
3:26 PM
@ilis Best of luck man =] PHP isn't hard really, I learned to edit and develop phpbb addons really fast (which uses some obscure templating, which is not as obscure as WordPress')
 
The pound or pound-mass (abbreviations: lb, lbm, lbm, ℔ ) is a unit of mass used in the imperial, United States customary and other systems of measurement. A number of different definitions have been used, the most common today being the international avoirdupois pound which is legally defined as exactly The unit is descended from the Roman libra (hence the abbreviation "lb"); the name pound is a Germanic adaptation of the Latin phrase libra pondo, 'a pound weight'. Usage of the unqualified term pound reflects the historical conflation of mass and weight resulting from the near uni...
 
@Zirak yeah, I know that, dunno what that means though
 
anyone know a place for good javascript tutorials? I already know basic javascript and am real good with jQuery, but I want to learn more about the structure and developing larger scale apps..
as in... I kind of want to get back to the basics and learn best coding practices
 
It's a group that has to match, but isn't included in the match. So (?<=\() means "Make sure ( is there, but it shouldn't appear in the output"
 
@FlorianMargaine for you - 1KG is 0.454545455LBS
 
3:27 PM
@FabrícioMatté thanks for your good wishes. where are you from btw? i'm from turkey
 
@rlemon k
 
@ilis Brazil =] Little far away
 
@Zirak oh, exactly what I want so
 
@FlorianMargaine I also speak metric :P
 
but it works for the end, not for the beginning
 
3:28 PM
But js' engine doesn't have it. Woop.
 
which means it's not supported by js engine?
 
kinda little:) @FabrícioMatté
 
Perl has it :3
 
so I can only strip off the first character, like str = str.slice(1)?
 
Or take off the g flag and consider the capturing groups
 
3:29 PM
hmm
 
Finished most of my new addon's jquery now, guess it's time to write some of the PHP and mysql now ._.
 
@FlorianMargaine what you trying to do boss?
 
8 mins ago, by Florian Margaine
var str = "some (yawn&red) string";
str.match( /\(([^\)]+)/g );
["(yawn&red"]
 
you want the stuff in but not th e()
 
@Zirak let me remember what capturing groups are, I know they're related to parentheses
@rlemon yeah
 
3:31 PM
This is a good playground with nice docs: gskinner.com/RegExr
 
if I take off the g, I get ["(yawn&red", "yawn&red"]
which is kinda ok, but not perfect
 
@FlorianMargaine str.match(/(([^)]+)/g)[0].substring(1);
=]
 
@FabrícioMatté str.match(/(([^)]+)/)[1] is shorter :)
 
Yeah, 0 is the entire match; after that, 1 ... n is the 1st ... nth capturing group.
 
well that too
:D
 
3:33 PM
@Zirak oh, I get it
hmmm
 
I've yearned for a matchAll for a while now; a non-retarded g.
 
my editor decided to change its font on its own apparently
and i have no idea what was the original
 
!!> "some (yawn&red) string".match( /((.*))/g )[0].slice(1,-1);
 
@rlemon Maximum execution time exceeded
 
@FabrícioMatté which editor?
 
3:35 PM
eval is fucked up, I'm fixing it
 
huh? this makes no sense.
 
going to dump dreamweaver cs6 and start writing code in JSFiddle, much more effective
 
@FabrícioMatté no. dont do that...
 
!!> var str = "some (yawn&red) string"; str.match( /((.*))/g )[0].slice(1,-1)
 
well i don't need the autocomplete
 
3:36 PM
@rlemon Maximum execution time exceeded
 
the hinting is far too annoying
 
but you lie!
 
@rlemon The code execution is fucked up right now. I'm fixing that
 
and it doesn't even match opening with closing brackets .___.
 
@FabrícioMatté notepad++
 
3:36 PM
var str = "some (yawn&red) string"; str.match( /\((.*)\)/g )[0].slice(1,-1)
"yawn&red"
 
yeah i have it too
and sublime text 2
and another bunch of editors
lol
 
@FabrícioMatté sublime and notepad++ are both great light weight notepads
 
you should get DreamWeaver4 it is wicked awesome.
 
i have dreamweaver cs 4
 
3:38 PM
@Nile I was trolling... that is sad.
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
code like this should be burned in fire. along with the IDE that made it... and the person who decided to put it on their site.
 
@rlemon yes, i know. i don't use it.
 
I'll mess up all configs in CS6 to check if I can get anything fixed (better font), but is there any way to make it match opening/closing ()[]{}? Because really, all other editors and even jsfiddle does that
It didn't change much from cs5 to cs6 (except more annoying autocomplete and jQuery autocomplete)
 
anyways, the reason i ask is because "Chocolat" (a great notepad for osx) has a trial and once your trial is over, you can use it for as long as you want but you're stuck with "comic sans" as your default font and no way to change it
 
probably not much different from cs4
Note to self: never choose Comic Sans MS bold as your editor's font
ohh a handwritten one is even better
 
@FabrícioMatté and @all, good evenings. i will go home for the moment
 
3:41 PM
Good evening man =]
 
@Nile good.
 
 
@Nile eyes
burning
 
@Nile lol find a new editor.
 
i'm facing problem to iterate over array of objects. if length of array is 53, it executes once, shows properties of first object, then throws exception while using array.foreach or $.each
 
3:43 PM
@rlemon lol i don't use it. i use sublime.
 
@Nile great way to force people to buy :D
 
@jjpd well... after reviewing your code... I can see the problem! But I cannot tell you the solution until you say please.
 
mixing OR and &&... :'(
 
@FlorianMargaine i know haha
 
@Nile ahhh wtf comic sans!!! for code editing?!
 
3:46 PM
rofl
 
I use: Geany (Ubuntu), Notepad++ (Windows), VIM (any linux), VI (older linux), VEDIT (QNX), and I Suppose I can now say Qt Creator and VS2010 for IDE's
 
@Neal when trial is expired, they don't block, they just put this font as default, not changeable
I used: eclipse, netbeans, notepad++, vs2010. I use: vim.
 
C#.NET desktop development is a PITA without VS
 
@FlorianMargaine wtf...
I use NetBeans :-)
 
I mainly use Qt for 'organizational' features... IF I do one day figure out all the features of VIM and plugins or w/e I might stop using it.
 
3:48 PM
@rlemon yep, but I don't use it anymore
 
@rlemon Yea Qt Creator is pretty awesome. ive used that too.
 
@rlemon google "command-t" for vim
 
@FlorianMargaine i'll check it out later :P hehe and I was just told by the boss I have a new Windows Desktop project... and shudders I have to fix some code written for winXP Embedded Touch
 
poor you :|
didn't you work on embedded systems using QNX?
 
I still do.
not neutrino though, old school QNX... QNX4
 
3:50 PM
I'm using underscore in a project.. is it a bad idea to add my utility functions to the _ namespace?
 
and @rlemon vacation's great :D gaming a lot, coding some, having some fun with gf... just great :-)
 
Can anybody think of JS methods that return stuff other than -1 or null when you're trying to match a bunch of things as in: indexOf or match?
 
4:07 PM
@ErikReppen getElesBy return an empty nodelist if no nodes are found.
 
match returns null if no result matches the regex
(to remain in non-DOM world)
oh
 
"string".charAt(99); // returns ""
"string".charCodeAt(99); // return NaN
 
other than -1 or null
sorry
 
idk what you mean by "match"
 
void returns undefined
 
4:10 PM
are you specifically talking about traversing a string
 
@rlemon if there is no match
if the regex doesn't match anything in the string
 
no I know what he means by the method "match"
> when you're trying to match a bunch of things as in: indexOf or match?
 
the first occurrence of the word in this statement.
 
Yeah, I'm not being clear. I guess what's bugging me is inconsistency in 'not found' type situations. It seems like there's one school of returning consistent types and another that thinks fails should be null.
charAt really bugs me though. There's no string at 'wombat'[20] but 'wombat'.charAt(20) tells me there is.
 
4:13 PM
think about it logically. if there is no match you get null (possibly an empty array here would be better?) however if there is no occurrence of the char or object for indexOf the resulting index would be -1 (not existent)
I think the methods should always return the same type.
so indexOf is correct... charAt is correct... charCodeAt is also correct (NaN is the exception here)
match is funny in the sense that it does not return an empty array like getElsBy's
 
See, I like null. You always know stuff wasn't found when you get null. -1 can mean other stuff in the context of array methods. There is nothing at 'wombat'.charAt(20), not ''. I'd be happier with 'wombat'.[20] returning undefined and charAt letting you know it found nothing there via null as an inconsistency.
NaN should be exclusively about your args not containing anything that can evaluate as a number, IMO.
 
undefined would work. however I still think -1 is the most correct way to do this. (for methods that you expect a zero based index to be returned from)
 
But a lot of methods also use negative indeces to count back from 0 wrapping to the last array element.
Undefined I think, should only be when you try to reference or access a property that's not there. Functions without explicit return values should be the only thing that hand you undefined IMO.
I dunno, I mean RTFM of course, but why not make it clear that the operation found nothing in a consistent way across the board? False seems to be used exclusively as a state flag in most core methods 'is' or 'hasOwnProperty' type methods that I'm aware of. That's a nice level of consistency to have for other things.
 
@rlemon NaN is a number it's not exception :P
 
4:32 PM
It's an indication of some kind of fail. I think it should only indicate that no number could be derived from the value you attempted to evaluate as a number. As a return for charCodeAt, it's awful, IMO.
 
undefined converts to NaN
note that having undefined AND null in the language is stupid
they are exactly the same and thus used interchangeably and inconsistently
 
4:45 PM
Semantically, I like undefined as something that explicitly indicates an attempt and failure to access something that wasn't there vs. null acting more as a 'not found' message. You didn't define that var so calling it tells you it's undefined. Your method tried to find something at a position in an array that doesn't exist and it returns null. The method didn't fail. The array was defined. But there was nothing useful to be done with your request.
 
if you have not declared a variable you will get a referenceerror
 
Sorry, I should constrain that to properties I guess.
 
any other language is fine with just null or nil
maybe there is some douchey semantics but they are not worth it at all
 
Probably not, but I think we're stuck with 'em. Might as well try to get consistent implementation. If null is always a method return, and undefined is property access or attempts at accessing a return value from functions that don't define any, it can at least help you deduce how something went wrong when you see one or the other getting assigned to something.
 
5:11 PM
Hey guys, someone use mercurial out there ?
 
@RyanKinal
iirc
yesterday, by Ryan Kinal
coworker: "WTF, why is this experimental crap in SourceSafe"
me: "Yeah, wouldn't it have been awesome if that was done in a branch repository?"
coworker: *:sarcastic:* "Ooh, I'm Ryan and I'm always saying stuff about Mercurial."
 
Lolll !
Hey @rlemon how do you post image directly in the chat ?
I see you do it a couple of time !
 
post the link only
 
See this one !
 
some sites (like xkcd) onebox
now link to an "article"
 
5:19 PM
WTF ???
284
Q: Divide a number by 3 without using *, /, +, -, % operators

AashishThis question has been asked in an Oracle interview. How to divide a number by 3 without using *, /, +, -, %, operators? The number may be signed or unsigned.

 
don't see how you done that
 
Must... Stop... Reading.... XKCD.....
 
I am currently using BBedit for editing JavaScript. Is there any other; better or just what you use?
 
5:35 PM
@JasonStackhouse sublime is angelic. chocolat is pretty good if you don't run out of the trial.
i also like coda and textmate
 
bb edit?
 
I wish Scite had multi-doc search and includes. All I really want is tabbing as a selected block, color-coding, that stuff, and something that almost never, ever freaking crashes or takes more than a fraction of a second to load text files that are under a megabyte.
 
hey BB!
 
@Nile Thanks for the tip!
 
@JasonStackhouse np, I came from windows so I loved notepad++. whenever i program on my mac, sublime is definitely the way to go.
 
5:42 PM
or use vim
available everywhere.
and totally rocks your mother
 
@FlorianMargaine i tried but I cant use it... it confuses me so much, do I have to read the manual? >.<
 
you have to read some tutorial yeah
let me find something
 
@Nile Goes to home page of Sublime Nerdgasm
 
Looks really nice
 
5:43 PM
Sublime for the win ! (Except that some plugin crash all the time ! lolll)
 
@FlorianMargaine on mac its "macvim" right?
 
yep
there's vim too
 
@FlorianMargaine for mac?
 
yeah
it's installed by default
 
@FlorianMargaine oh, where?
 
5:44 PM
in the terminal
try "vimtutor"
 
@FlorianMargaine ah I just typed "vim" in the terminal.... do people actually use this?
 
I do when I'm on mac
but I'm most of the times on windows, where I have an ubuntu vm I access using putty :]
 
you use it in the terminal? does it syntax highlight?
 
Macs pwns when it comes to editing ;)
 
let me show you something
my screen right now
a vim instance at the top
 
5:46 PM
@FlorianMargaine windows though? im definitely going to try it on my vista.
 
two split windows :)
 
@FlorianMargaine Looks nice :)
 
it's a linux vm
 
@FlorianMargaine psh np++ can split windows too
 
I'm accessing it through ssh using putty
 
5:47 PM
i actually installed wine just so I could get np++ on my mac, though its not to smooth so i dont use it
 
@Nile not as fast as vim :)
you have to use the mouse...
 
 
I know, but you have to use the mouse
 
np++ on mac :)
 
to have a split screen in vim: :vsp
open vim
and type :vsp, you'll see what I mean
 
5:50 PM
@FlorianMargaine okay, let me read that tutorial. should I start off the tutorial by using it on my windows or mac? (which will give me the better experience)
 
linux
 
both are the same
vim is universal :)
be careful about the version you use though
 
@rlemon not installing linux... to command line-y for me
 
on mac it's a tiny version in the terminal by default
 
@Nile but you want to use VIM???
 
5:51 PM
first
 
@rlemon yeah?
 
run vimtutor in your terminal
it should get you started :)
 
alright, thanks.
 
@Nile if you don't like CLI then maybe gVim is better suited for you
 
5:53 PM
@rlemon whats it?
 
@rlemon yes, thank you... lol
 
hehe sorry
gVim === GUI (or graphical) VIM
 
@rlemon ok
 
Vim via Terminal
 
5:56 PM
@rlemon gVim == macvim?
 
you can launch vim via the GUI or in a terminal.
however you unlock all the power in the terminal
 
is gVim like macvim?
 
otherwise I fail to see the benefit to using VIM
@Nile gVIM is any graphical VIM
 
gvim is cross platform while macvim most likely isn't
 
that's what I mean though. is macvim a graphical vim?
 
5:58 PM
i think so
 
okay
 
i'm not 100% on this. I always launch it in a terminal
 
@rlemon so whenever you go to edit some php or javascript, you quickly on vim in terminal?
 
well, tbh I use a different editor all together... when I am using VIM it is likely i'm SSH'ing into a machine or i'm on a GUIless machine
 
which editor
 
6:00 PM
so i'm always in a terminal :P
Linux === Geany (or VIM, Nano and Emacs are in the works... I hate Nano)
QNX === VI or VEDIT
BSD === VI or VIM
Windows === notepad++ / sublimetext2
Mac === Burger at McDonalds.
 
do you use hjkl to navigate? why not just the arrows :\
 
but I work less and less with BSD
 
John Resig, one more time, made something everyone talk about
 
Tim
Anybody have experience with the Facebook JavaScript API? Help would be appreciated as I'm on the verge of blowing my brains out here...
 
VI-without-M is crap
gvim is perfectly fine on windows
 
6:04 PM
@rlemon Mac === Burger at McDonalds.
ba-dum tcha
 
@Nile In Vim, your fingers are on the home-row as a default. hjkl pretty much define the home-row.
 
Oh my god
i am using firefox 3.6 :D
feels like a sir
this shit is outdated!
 
It takes me about half a second to move between hjkl and the arrow keys. And have you noticed anything about expert...anythings? Expert pianists, writers, wrestlers, artists, programmers? They don't waste motions. They work without wasting any energy unnecessarily.
 
vim and emacs motto is about not leaving the keyboard
because leaving the keyboard is wasting time
 
Having said that, I don't use Vim anymore, so now to move I usually use regular expressions :D
 
6:07 PM
@ThiefMaster idk, I just don't like it.
 
@FlorianMargaine o/
look i am here :D
 
@dievardump ;) Yup - and I won't touch either of them. nasty things they are.
 
nd am downloading chrome
 
cool
oh btw, the models are now nice on tartempion-blog
added an init method to avoid selecting the collection every time, it really cleans things up
 
i will read it if my laptop boots :D
 
6:08 PM
whats the difference between "a" and "i" in normal mode :?
 
dont be so sure
cause my laptop took a bad beating in the train :-/
 
@Nile a enters in insert mode after the cursor, i enters in insert mode at your cursor
 
ohh you gotta see the new boards we just got in at work... half the size with better performance.
 
How are boards performant? Friction-wise?
 
6:10 PM
yeah... that's leaving me kinda sceptic.
 
that is a regular sized sharpie
the thing is as small as my phone
 
aha
Those are some stylish jeans
 
thanks :P
@Zirak you can get em yourself :P guess.ca/Catalog/View/Men/Jeans/…
der very comfortable
 
eh, jeans sucks.
 
track pants kinda guy?
 
6:15 PM
I don't wear pants
3
 
makes sense
 
anyone care to chime in with a more comprehensive answer? stackoverflow.com/questions/11971546/…
 
Let the world enjoy the full extent of my natural beauty.
3
@FlorianMargaine pastie.org/4495032 There, a better alternative to g
Which won't work with ^
Fuck
Nevermind. Don't use it.
If javascript' reg-exs were half-decent and actually used lastIndex comprehensibly...
Actually, why are you using ^ with a global match anyway?
Oh, multiline. Yeah, that makes sense.
 
Back on internet :D :D :D :D
with my linux <3
 
@Zirak already ran it before I read that :<
browser is slowly crashing atm
 
6:22 PM
hehehe, how'd you run it?
 
just dropped it into a fiddle
like always
 
:o
 
i'm new to the multiline inputs in the dev console.
 
@rlemon they exist ?
 
yes
 
6:23 PM
And to copy-paste?
 
i copy and pasted it into the fiddle :P
 
-5
Q: i want to my code in c# check all statement that or together

user1562312i am writing a code and i want that program check all statements that or together; my code is: bool allIsOK = false; allIsOK = checker.txtChecker(txtcode) ; allIsOK = allIsOK || checker.txtChecker(txtdavar); allIsOK = allIsOK || checker.txtChecker(txtKomakHazine); allIsOK = allIsOK || chec...

 
Dudes, in any decent text-area, Shift+Enter inserts a newline.
Yeah, you can copy-paste into the dev console :P
 
@Zirak and if you understood me you would realize that multi line input for dev tools is (somewhat) newish... so I always forget I can enter anything that spans multiple lines. ergo I jump to jsFiddle (which is still force of habbit)
now write better code and stop crashing my damn browser!
 
meh, nevermind, how'd you run it? What'd you do?
Just adding the method on String.prototype caused it to crash?
 
6:25 PM
nope
added it then console.log("hello world".matchAll("or"));
 
Yeah, the parameter is a regex.
 
now brb need die
 
@rlemon WTF 138 $ IN A JEAN ? Y U DO THAT ?
 
he is actively fighting against not using his database as a .txt file
lol
 
6:47 PM
btw, still interested in code review on this one: gist.github.com/3351527
 
seems to wrok
 
That's the easy part. But it's incomplete, code-wise.
 
do parentheses next
 
@dievardump because they are nice jeans. also I used to manage a few Guess stores (in my non-cs days) so I don't find it that ridiculous
@Zirak ... or should I call you Ben.
 
You can also call me Honey Bun if you like
 
6:55 PM
/me finds out at least the first name.... getting closer... getting closer...
 

« first day (669 days earlier)      last day (4294 days later) »