« first day (816 days earlier)      last day (4124 days later) » 

12:02 AM
@phenomnomnominal it's beautiful, yes?
@rlemon animate() accepts a callback, doesn't it?
 
$('#foo,#bar').animate(options, callback); // callback fires for both. I want a single unified callback.
 
12:26 AM
uh oh I'm back
 
@canon - makes EVERYTHING better
 
Hello
 
@Charlie Hi
 
hows it going
would someone be able to take a look at my jsfiddle before I blow my eye lids off with an aerosol can?
 
12:54 AM
Don't judge a character by it's Unicode value...
@Charlie Sure
 
@Loktar what's the project status on Jest and how do I use it?
 
@rlemon, ah
 
@rlemon "Why does gigahertz? Because megabytez."
@Charlie How's the jsFiddle coming along?
 
could someone look at my Init function and tell me why my onkeyup part isn't working properly, it runs once but doesn't call again onkeyup...BileBot
 
I hurd ma name
 
1:08 AM
I'm not sure if it's just me but JsFiddle HTML, CSS, and JavaScript are not showing up for me. Using fiddle.jshell.net/[...] instead of jsfiddle.com/[...] seems to work for now, plus you can use the alpha version. fiddle.jshell.net
 
new RegExp bit is un-needed
 
probably but I was running it through JSlint to try and find issues because onkeyup wasn't working for me
 
callback = bile.props.callback || undefined; is also un-needed
might have something to do with .onkeyup vs .addEventListener
.onkeyup over writes any previous event handlers.
 
it was working before I changed it to an anon function
the only big change I can tell is passing down the variable through the functions params instead of using call
should it be bile.target.onkeyup=function(){/*stuff here*/}().call(bile.target)?
its been confusing to me trying to convert
though thats probably got less to do with onkeyup not being called
 
1:23 AM
$("button").click(function () {
    var $divs = $("#div1, #div2");
    $divs.animate({
        height: "100px",
        fontSize: "50px"
    }, {
        duration: 400,
        complete: function () {
            console.log("callback"); // called twice
            if (!$divs.is(":animated")) {
                console.log("complete"); // called once
            }
        }
    });
});
 
see thats more work than I hoped for.
 
0
Q: Find Common Denominator for 2 Fractions with JavaScript - Simplify & Improve

user1822824I wrote a JavaScript that takes 2 fractions and finds the common denominator for both. If the user inputs 2/6 and 1/2 --- the script outputs 2/6 + 3/6. I'm interested in feedback on possibly simplifying it or improving it. Thanks. JS Bin: http://jsbin.com/omelen/1/edit <!DOCTYPE html PUBLIC ...

 
@rlemon I'd have to agree
I took a glance at the queue documentation but nothing jumped out at me
 
  function handle_click() {
    $('html,body').animate({
      scrollTop: 0
    }, options.speed, handle_callback);
  }

  function handle_callback() {
    if (++i === 2) {
      options.callback();
    }
  }
 
still unattractive
I'm surprised there isn't something built-in
 
1:34 AM
i know.
maybe there is? I don't know enough about jQuery
 
same
 
I've been asking around and this is the best option I see
6
A: jQuery.when - Callback for when ALL Deferreds are no long 'unresolved' (either resolved or rejected)?

AlnitakI think the easiest way to do this is to keep a secondary Deferred object around for each AJAX request, and ensure that that one is always resolved: var d1 = $.Deferred(); var d2 = $.Deferred(); var j1 = $.getJSON(...).complete(d1.resolve); var j2 = $.getJSON(...).complete(d2.resolve); $.when(...

or has at least been told too me
 
I tried an eventListener and it didn't seem to work : / I'm not sure what to google for to help fix this
 
google: "wtf is this shit and why doesn't it work <code>"
wait, thats SO
 
hah
 
1:37 AM
the old code was:

    bile.target = target;
    bile.target.onkeyup = bile.run;
    bile.run.call(bile.target);
 
@rlemon wooo its working in ff
 
LOL my gf just walked out of the room shaking her head laughing because she came in and I was doing the Astley dance to the song itself (rick rolled myself)
@benlevywebdesign well of course it is :P ha
now to add the side scroll. but the gf is bugging me to come watch Fringe with her.
but first quick update to the blog post and codepen. :P
 
@rlemon tell her its recorded and watch it with you in a sec
@rlemon on yours can you move the css out of the js and put it in the actual css
 
@rlemon here you go
$("button").click(function () {
    $("#div1, #div2").animate({
        height: "100px",
        fontSize: "50px"
    }, 400)
  .promise().done(function () {
      console.log("done");
  });
});
You were on the right track when you first started asking about this.
 
@benlevywebdesign you could yes, just assign the button a class or id.
 
1:52 AM
ok
 
@canon :( /self y u no look at ping before updating blog :(
 
@rlemon :(
 
out of curiosity
why is your selector "html, body"?
 
because html == FF, body == Chrome.
 
2:01 AM
ah
 
dunno if other browsers care.
but I do know that they do.
 
did you update the fork?
 
fork?
fiddle?
gist?
 
oh
not for me
 
check the two links above.
the gist should be updated, same with the codepen.io demo and jsfiddle demos
:( so much updating
anyways show time. bbl
 
2:03 AM
left / right thanks for the help already
 
'night
 
hey guys any idea why that onkeyup isn't working? I've been trying to get it working for about 2 hours now : / code
 
@Event_Horizon looking
 
it runs once, but if you type in the textarea it doesn't register thus not running the code and not replacing anything
 
2:10 AM
 
@Event_Horizon your problem is that you're executing your init function
inline
so there's no function assigned to init
 
I'm not following you
I haven't changed how I call init, only what it contains
 
ah, nm one sec
 
I have changed what bile.target.onkeyup equals
 
Does JS provide a unserialize function for serialized PHP data?
 
2:22 AM
yeah
when you say x.onkeyup = function() {}(bile.target);
that anonymous function is executed immediately
and onkeyup is assigned undefined
 
ok, so instead I should remove (bile.target) and figure out a way to pass it down via call(bile.target)?
 
well
this should be your textarea
since it's coming from the onkeyup event
unless you're in ie and somehow it's the window object
 
alright I fixed it thanks
 
just for testing
 
appreciate the help
 
2:27 AM
:)
 
damn people don't read my question >.>
 
who, what
 
turtles
 
what is the idea behind validating the email or username in a text field depending on what is inserted in the text field.. i mean i want to make a login form... where users can put their username or email and password
 
the idea is to stop people inputting junk into your database
if u ask for email and some one puts "sefsefsefesfesfesfesfs.com"
its obviously wrong - stop it to prevent wasting space on your server
 
2:41 AM
@Dave JSON.parse and JSON.stringify for json_encode($data)
!!/google json_encode
 
!!/mdn JSON.parse
 
i dont need that :P
 
im doing php serialize
 
2:42 AM
not that... i want to know how to validate....
i was trying like this, but it isnot working...
function validateEmail(inputField, helpText) {
	   var err=0,helpMsg="";
        if (!validateNonEmpty(inputField, helpText))
          return false;
        var regexm=/^[\w\.-_\+]+@[\w-]+(\.\w{2,3})+$/;
        var regexn=/^[\w{6,8} ]+$/;
		if(!regexm.test(inputField.value))
		err=1;
		if(!regexn.test(inputField.value))
		err=err+1;
		if(err==2)
		{
		helpMessage="Invalid Email Id or Username";
		}
		if (helpText != null && helpMessage!="")
 
best your gonna get
 
i might change to json tho
 
validating emails client side is horrid.
 
saves me iterating the rows of data
 
best to use HTML5 attribute type="email" and validate on the server
 
2:43 AM
ow...
 
regex email parsing (proper) is freaking HUGE to do it safe
 
I'll just leave this here :-)
 
can be done, but not without a godzilla regex
(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|”(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*”)@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
 
o no, i am providing the same input field for username or email.. how can it be done with type="email" ??
 
yea i dunno, I always hated those dual inputs.
<input type="email" pattern="[^ @]*@[^ @]*" value="">
you can potentially work in some nifty regex to allow both.
dunno too much about pattern attrib
 
2:49 AM
:( ... let me xplain u the situation... we have been given a project in our college... to make a travel deal with j2ee.. the problem is there are four- five logins... one for customer, one for admin (and the task of admin is to create the merchant, which he may not do with the emailid) .... one for the customer-care executive and one for salesman ... suggest me a solution so that i don't have to use dual inputs or something of your choice.........
 
aww a girl entered earlier and drama unfolded
knew i shouldn't of played Far Cry 3!
 
well...... @rlemon i will make a seperate login for all those.. i will firrst let the admin to login with his email and password and then allow the merchant login...
 
now persists doctype, style type, script type, wrap, and library
also drags all five of these combo-boxes to the top box
so you don't have to expand
uggh, I have to update that video
 
@rlemon you are back?
 
3:36 AM
@andrewjackson its still a work in progress :P
there are some demos for it
 
Found them. Thanks :D
 
youtube video updated
god, I hate recording my voice
 
Been using that as an example :P
That's what made me want to use it
 
but yeah idk, theres a few things about it I dont l ike
im def open to any feedback
 
3:37 AM
There's a weird problem with the particles on my laptop
 
what are they doing?
 
It's not a very fast laptop, but I have to resize the screen and cover part of the canvas to get it to view particles
 
weird..
lol thats really odd actually
 
If I resize and cover everything except fps and pixels, the pixels shoots way up to 100
There's also some memory leaks
But like I said, it's not a very good laptop
 
yeah but still
it shouldnt run like ass :?
 
3:40 AM
I get much better results on other laptops
 
thats my fault obviously
 
And it works fine in Firefox
 
Ill try and work on it this week. Theres things I def want to do to improve it
mainly get the damn code looking nice on github
when I do it in notepad++ it looks terrible on github
like.. parts are over indented, etc
 
"There's also some memory leaks. But like I said, it's not a very good laptop" lol
 
oh well I gotta get to bed
 
3:42 AM
This is just a huge guess...
But it seems like something to do with it's range for barriers to draw
 
Now that I'm almost done with it, opinions? BileBot
 
@andrewjackson ill have to look, its just affecting particles right?
 
@canon You'd be surprised with the different browser behaviors and results you can get across different hardware and drivers
@Loktar Actually, I've taken the explosion particles put the duration to -1, and it looks fines. So it just seems to be something with the fountain
 
@andrewjackson So, you're saying the memory leak is the fault of the browser implementation?
 
@canon I bet its something dumb im doing
 
3:47 AM
@canon or a combination of integrated graphics card + drivers that aren't completely compatible with Windows 7
 
weee
 
@Event_Horizon, looks good
Well that's a lie, it doesn't LOOK good, but it works well
 
lol, function over form for work tools imo
 
Haha, you make it sound like UX/UID doesn't exist?
 
@Event_Horizon I don't even know what I'm looking at.
also, the "wait for input to disappear" pattern is really counter-intuitive
is that based on an existing system?
 
3:56 AM
@canon, @Event_Horizon, I totally agree
 
the thing is its for taking notes at work, so while you type, you need to not be interrupted, but when you have to wait a moment it should replace it
 
@Event_Horizon, now that you have the 'blah' 'blah', you could regex for that
and at least increase the speed at which the events are processed
 
yeah I could increase the speed, just trying to make it so it doesn't replace while typing but after a small break
 
@Event_Horizon Was it you I showed the setTimeout for the keyup handler?
 
either you or rlemon showed me
 
4:01 AM
@Event_Horizon, but it shouldn't match the replace until it finds the last quote should it?
 
I gotta tell you
I'd be using keyboard shortcuts
instead of replacing tokens
 
the behavior you're using is unfortunately awkward atm
 
Keyboard shortcuts +1
 
4:03 AM
why do you say that?
also keyboard shortcuts seems a little limiting imo
as in number of commands you can save
 
why not keyboard shortcuts for inputting commands?
or even just a form
instead of the awkward !/sdf 'asdfhsa' 'asdf' thing?
two inputs, command & result
 
well, you can do compound key-bindings
 
I quite like the idea of just typing hi and "Hello, how are you" coming up or something
more than CTRL + H + I or something ya know?
It's the mechanism for setting them that is really bad
 
ie, (ctrl+k, ctrl+c) = comment
in visual studio
mechanism for setting them is a two column list
of input for key-binding / value
 
its practically the same command acceptance as SOChatbot !!/learn vk1 "blah blah"
 
4:08 AM
That's different
 
Yeah but SOChatBot is very limited
 
that's a command-line... thing
 
there aren't really any other options, and that doesn't happen that often
You have the flexibility to do it however you want, and there's probably a better way
 
bilebot sucks: "BileBot is not amused." doesn't seem to be called unless a command like !a follows it...
 
good catch, thanks
 
4:18 AM
also is it common practice to do var that = this;? Just curious.
 
no, I gotta clean the code up, thats part of whats not finished, along with redoing the demoShortcuts function
saving, loading, creating, deleting, replacing, and commands work (just fixed bilebot sucks not working)
 
4:32 AM
3 messages moved to recycle bin
 
i am uing php file say example.php in html of button can i use onClientClick to call javascript function or its property for .NET only
 
@freelancer A.) It's a Q/A site. Just ask your question. B.) DON'T ping random people
!!/tell freelancer mdn onclick
 
@SOChatBot its regarding onClick
i was asking for onClientClick
 
He's telling you that, no... "onClientClick" is an asp.net thing
and that you're looking for the javascript "onclick"
which he linked
 
4:36 AM
ok
thanks
 
GOOOOOOOOOOOOOD MORNING :D
 
5:17 AM
 
 
@Event_Horizon maybe something along these lines jsfiddle.net/antisanity/7Jcf9/show
 
alt+ctrl+T <- terminal in Ubuntu.
 
I don't really care what the shortcuts are. you can pick anything
or make them more complex
there comes a point, though, where you might as well just type "phone"
since it's 5 goddamned characters
 
5:35 AM
Anyone here good w CSS?
 
@Moshe i definitely am NOT
 
lol
I'm trying to make a div with a centered span with some text in it.
Then a floating span with links in it.
On the same line
 
He said he's not good with CSS
Accept that
 
I know, but I'm hoping someone here is. :p
 
illustrate what you want
 
5:40 AM
sec
 
In the accepted answer
's code, why do we need a 'new F()'? stackoverflow.com/a/11072551
 
6:02 AM
@Moshe text-align:center;
vertical-align:middle;
should do it
if NOT
cleafix the span
and if still not
well then just use some JS or webkit-calc
have fun bbye
oh btw position:absolute; wont help and neither will float:left; and right; cause when u do so the box model changes .
so wrapping the span with floats with a clearfix
should do it
 
6:14 AM
@AmaanCheval There are amaan
come to central india and you will find the gateman (the one who opens and closes gates on rail & road crossing) hitting cows to move them out of the track :P
even worse the rail engines has a special "CowPusher" , which gets used quite a LOT
in the worst case you will find elephant on the track (x
but yeah thats just india
 
if any of you use chrome and jsfiddle, please check out my extension chrome.google.com/webstore/detail/jsfiddleprefs/…
and give me some feedback
 
6:39 AM
Hello everyone !
Is it cool to ask jquery ?s in here
 
There is a different chat room for JQuery. but I guess it is fine here. :)
 
7:05 AM
hi all
please review my latest website work: valueabled.com
please see if you find any heavy javascript load times
 
7:15 AM
@Abhishek Whoa, they hit cows? :p
 
hmmm
 
@STEEL Works fine for me
 
thanks :) images are not that great now, will be uploading fine quality soon :)
its for TATA STEEL
 
Yeah, saw that
Congrats
 
<3
 
7:28 AM
Do you work for them, or are you freelancing?
 
i work at rediff
digital
our client is TATA
 
7:43 AM
Anyone here ever used the safari inspector to debug iOS safari?
 
7:56 AM
@phenomnomnominal Why?
I know someone who uses it to test my scripts :p
 
Doesn't want to load a script for me
just sits there with a loading spinner
 
Huh
Clear your cache or something, I guess
 
Tried that, I think it might be an issue with LiveReload
 
8:08 AM
i need a different word of apply()
as in "apply values for a template"
(mornings, btw)
 
@AmaanCheval you there... have you ever built a HTML template for an email document? Any idea why the images would resize :S
 
@tereško intl()
 
user652649
guys how in js/dom/dhtml are opened named windows stored? i mean <forms> are in document.forms.namedform and frames are in document.frames .. but windows where are them? i don't remember :-O
 
8:29 AM
Why would you ever access them by name instead of properly storing them in a variable when opening them?
And for forms/frames you should really use IDs....
 
hello
 
user652649
@ThiefMaster because of this stackoverflow.com/questions/14230436
 
@KirstyHarris I haven't, no. Is the problem only occurring in the email?
@GNi33 What's up?
 
@tereško, don't you normally render a template?
 
Anyone have experience with JS Win 8 Apps yet?
 
8:43 AM
@AmaanCheval not too much, drowning in tickets and demotivation. how are you?
 
Tickets === traffic rule violations?
I'm good
 
@AmaanCheval its ok, found a way around it :)
 
Tickets === Feature Requests, Bug-Reports, and so on
 
Aaaah
Since rlemon isn't here :p
Grrr
 
@tereško merge()?
Pretty sure I've seen that used in the context of applying values to a template
 

« first day (816 days earlier)      last day (4124 days later) »