« first day (1284 days earlier)      last day (3655 days later) » 

12:00 AM
@bjb568 it has variables, from which I can calculate stuff using flexbox's logics
 
Ok, I guess that would work.
 
@m59 I know one of their coders - he was interested in getting signups
 
m59
I make $10/hour or maybe a little more at Applebees. It would definitely be sweet to ditch that and do this stuff.
 
@bjb568 it's strange... the other guy's fiddle is working
but saying that your answer is correct will make my chances of marrying you get higher
 
12:16 AM
anyway
 
yeah, thx
new question already
kinda want to keep this rep number
0
Q: Directly set every point in path's alpha channel on canvas

t1wcLet's say I have a canvas with stuff on it, and I want to carve an ellipse in it's center, whose all of the pixels have an alpha of 0, to let everything behind the canvas to pass through, and given that previously the area now filled by the ellipse was something else, and said that, for performan...

 
use a second canvas
// render shit
displayContext.drawImage(overlay);
 
@rlemon you mean drawing what should show behind the first canvas in the first canvas, and having another canvas covering it with smth else?
 
@t1wc ^^
 
12:28 AM
not what I want
I need html elements
 
XY problem
 
uhh... where is that engaging?
 
what are you trying to actually do?
 
slideshower for my page
the slides are ellipse shaped
 
Why do you need a canvas for that?
 
12:29 AM
because according to your question you want to clip out a portion of a Canvas
 
but I want to use css transition
but other stuff around it will be drawn in canvas
 
What you are talking about is HTML, not canvas.
 
@rlemon wait....
clip... reminds me of smth again...
nope, ctx.clip() in the ellipse path doesn't work
 
@JonathanMoore Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
so you have one image(canvas) and you want the portion of it to be transparent to show the other canvas below?
 
12:33 AM
@rlemon that's what you suggested
I guess...
 
well what do you want?
 
I have one canvas for now
see the ellipse in the middle?
probably not if you have a small screen
but I fixed it on my local machine, just worry about the ellipse
 
okay
 
so, I want stuff to go behind the canvas holding the ellipse, but only be shown in the ellipse
 
m59
@SomeKittensUx2666 the tutor form kind of suggests I need to be a college student.
 
12:35 AM
okay, then what I suggested ;)
lol
or if you want HTML stuff under it to be shown, I suggest developer.mozilla.org/samples/canvas-tutorial/…
then only draw outside the shape
inside will be transparent
fill the background, then ..
  context.beginPath();
  context.arc(x, y, radius, 0, 2 * Math.PI, false);
  context.clip();
 
@rlemon I'd need to use double-winding path logics and in-memory canvases for what my actual code is
 
so?
you eventually draw back to a single canvas yes?
 
@rlemon I tried clipping, but it's not working
@rlemon yes
 
clip there
and don't set a bg color in css
 
@rlemon what's the prob with that?
don't worry, it's old code :P
from yesterday I guess
 
12:40 AM
because the css will fill the element and no amount of clipping on the canvas element will matter
 
oh, right
not my prob
anyway, .clip() for some reason isn't doing what it's supposed to
I'm not drawing stuff on the canvas, but I'm having stuff behind it
I know .clip() works if you're trying to draw images on canvas, but not sure about showing stuff behind it
btw, I don't see what createPattern() has to do with this
 
@rlemon could you check my current js file and do that with it?
you only have an image
 
lol no
 
I have... things you humans couldn't imagine
 
12:54 AM
a canvas element pretty much is an image
 
therefore I'll have to use an in-memory canvas
 
so?
like you said, you eventually draw to an end canvas
clip it there
 
I was supposed to see only 1 canvas, but anyway
 
ugh
I still don't see the issue
move where you draw the cutout shape to the part of the code you render all of the 'in memory' canvases to the display canvas.
cut it out after you draw all the other shit
 
the problem is using in-memory canvases themselves..
I've never used them
but I guess I'll learn
 
1:00 AM
think of them as images
 
wait... I can do ctx.drawImage(inMemCanvas, stuff, shit), right?
 
yup
its how I do rlemon.ca/cavedive
the screen is two canvases, and three more and rendered calculated in the background
 
ok...
I got stuff to work finally
but I'm sadly just drawing what's in the ellipse, not what's around it
wohooo
 
@rlemon mind posting it as an answer?
 
1:14 AM
i'm drunk.
:P
writing long answer isn't going to happen tonight
 
@rlemon just write I like unicorns
I like unicorns (look @ comment)
 
I have a question guys
I'm making a validation function in JS
 
0
A: Directly set every point in path's alpha channel on canvas

rlemonyou can use context.globalCompositeOperation = 'destination-out' after you draw the frame to fill the clipped shape(s). example: http://jsfiddle.net/rlemon/6nEpc/

 
form serialization done
so I have every element of the form in an object
and then I'm using jquery each function to check each element if they have a value of 0
or null
so everything works fine, except one thing: the alert message to the user
in the object I have the elements like this: email_again: something
and the message would look like "The field email_again is required"
I'd like to make it Email again somehow, how could I do that?
I dont want to make if statement for each field
 
var parts = title.split('_');
var display = parts[0].toUpperCase() +' ' + parts[1]
 
looks more like a lemon than an ellipse
 
;)
err
that js won't work
 
there are elements like address, city, birth_date
 
function toTitleCase(input) {
  var words = input.split('_');
  var first = words.shift();
  var output = first.substr(0,1).toUpperCase() + first.substr(1, words[0].length - 1);
  return output + ' ' + words.join(' ');
}
toTitleCase('email_address');
> "Email address"
 
1:30 AM
thanks :)
testing
ah, doesnt work with a single word like address
 
function toTitleCase(input) {
  var words = input.split('_');
  var first = words.shift();
  var output = first.substr(0,1).toUpperCase() + first.substr(1, first.length - 1);
  return output + ' ' + words.join(' ');
}
I mistyped
first.substr(1, words[0].length - 1); should have been first.substr(1, first.length - 1);
 
wow, you are drunk and still so smart xD
 
;)
 
works well, thank you very much :)
 
np
 
1:33 AM
oh, one more short question
 
shoot
 
why doesnt ajaxSend work in IE?
searched for it but found nothing
 
ie version?
 
basic IE in win8
 
what version of jQuery?
 
1:34 AM
10
let me check it
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
I'm using this
 
okay, and how are you calling it
 
$( document ).ajaxSend(function() {
Loading("start");
});
$( document ).ajaxComplete(function() {
Loading("stop");
});
tried this: $.ajaxSetup({ cache: false });
had no effect
 
and what isn't working
 
in chrome and FF the loading box shows up when it is needed
but in IE, never
 
well what is putting up the loading box
 
1:37 AM
when I used the loading function in every ajax call (start before ajax, and stop when ajax complete)
it worked even in IE
 
throw a console.log or alert in there and see if it actually doesn't call Loading
 
click on any name left side
or just refresh the page
 
IE is disabled for me
sorry
 
oh okay, np
 
works in chrome ;)
I suggest trying not using shorthand functions
see if that helps
 
1:39 AM
what do you mean?
 
$(document).ajaxSend calls $.ajax internally
 
!!jquery ajax
 
on other hand, I have no effing clue what that function does
and i'm too drunk to taste this chicken
 
m59
@SomeKittensUx2666 sigh...I spent a ton of time on this application and now it's like "required, required, required" on all the college stuff.
Failz.
 
1:46 AM
changed but doesnt work :/
addressbook.uphero.com/addressbook here is the working version
I'm trying to re-code it with a better validation
 
uphero? :D
(That's where my site is hosted)
 
yeah, thats a free domain :D
 
free, and worth about the same
 
xD
ftp is really slow
but good for testing
okay, I'm going to sleep :) thanks for the help guys, especially @rlemon, good night :)
 
yay! my slider's sliding feature is working
@KissKoppány you should test on a local machine XD
 
1:58 AM
Hi
Can anybody tell me what this statement actually means?
"Note that this origin is not guaranteed to be the current or future origin of that window, which might have been navigated to a different location since postMessage was called."
It's mentioned on this MDN page :- https://developer.mozilla.org/en-US/docs/Web/API/Window.postMessage
 
@BharatKhatri I think it just means that the url could have changed by the time the message is received.
 
@alpha Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
I just need help understanding some javascript lines of code:
$("[id*=gvCustomers] tr:last-child").clone(true);
$("[id*=gvCustomers] tr").not($("[id*=gvCustomers] tr:first-child")).remove();
 
@Raine Does it mean that even after the page url has changed, any pending message events from the previous url would still be fired?
 
@BharatKhatri I'd have to test to be sure, but my guess is yes. Pending messages will contain the original url from the moment they were sent.
@alpha Select all 'tr' elements that are the last child within their parent, and that are descendants of an element with an id attribute containing 'gvCustomers'... and clone it
 
2:08 AM
@Raine I was planning t o write a test too, but am not sure if it's easy to create a scenario where the page url changes while the message event doesn't get a chance to fire itself.
 
@alpha #2: Select all 'tr' elements that are descendants of elements with an id attribute containing 'gvCustomers, not including those that are the first child in their parent, and remove them.
@BharatKhatri Yeah, might be tricky. You can probably simulate it by setting a long timeout in the message handler, giving you time to change the url in the sender window before event.origin is read.
 
Raine, thank you. I am trying to figure out why I need to clone a row and then remove the rows. Basically the example uses ajax to bind data to a gridview. Somehow for rows over 100+, it's taking a very long time to load. I don't know if the bottle next is in the cloning or removing or the $.each ? aspsnippets.com/Green/Articles/…
 
2:24 AM
@alpha Yes, I can see how that code could create some performance issues. The [id*=gvCustomers] selector is pretty slow. Can you use can id selector directly? Or if there are multiples, use a class selector.
@alpha Also you have three selectors, so jQuery has to search the DOM three times. It might better to iterate over all rows and just remove the ones you need to in a loop rather than lean on multiple selectors.
@alpha You could also select all rows then cache the selector for other queries: e.g. var rows = $("[id*=gvCustomers] tr:last-child"); rows.eq(0).clone(); rows.filter(':first-child') etc
 
so if I know the id can I just use $(id) instead of [id*=gvCustomers]
IM sorry, sort of new to JS, im confused on what you mean by jquery has to search the DOM 3 times.
which 3 selectors are you referring to
 
@alpha $('#gvCustomers') is much faster than [id*=gvCustomers], it just only selects one element.
 
oh, sorry, I just saw what you wrote! I got it
lastly, would document fragment help?
 
@alpha not that I know of
 
okay so by cache the selectors, the speed may increase
 
2:30 AM
@alpha using ids and caching your selectors are the best things you can do for better jQuery selector performance
 
Raine, thank you very much!!!!!!!!!!!
 
@alpha You're welcome!
 
@Raine I'll try that out, thanks!
 
2:51 AM
@Raine I tested it, it sends the pending messages even after the page url has changed.
Did this in the sending frame :-
function init() {
otherWindow.postMessage("Hi otherWindow", "*");
window.location.href = "redirect_url";
}
 
@BharatKhatri Good to know! Works as expected.
 
3:04 AM
Somepeople™ just don't get reopen votes:
-10
Q: DropDownList (I need easier method than this)

user3531605protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { DropDownList1.Items.Add("1990"); DropDownList1.Items.Add("1991"); DropDownList1.Items.Add("1992"); DropDownList1.Items.Add("1993"); DropDownList1.Items.Add("1990"...

 
I'd better sleep sometime
5am
(⊙ω⊙)
 
doing an onlinetest: mouseOver is an eventHandler 1) true 2) false
 
@LachlanArthur Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@kwak 1
did I win something?
 
thanks, the correctness of it will be diluted in the rest
 
3:10 AM
no prob :P
it's not a vanilla event handler, but it still is one
so tecnically I'm right
 
var mouseOver = 42;
 
this one's a bit weird
 
Yeah… wat?
 
@m59 Write 'em.
 
m59
@SomeKittensUx2666 I just put a - in those fields. We'll see..
I mean, it looks like they have high school students tutoring people heh
 
3:16 AM
Good morning
o/
 
m59
\o
 
> Functions are objects. Therefore, functions have properties, but those properties exist only as long as the function is running. 1) true 2) false
I'd say true, but the term 'running' is weird
 
Da hell is "running"? Functions don't run. They aren't athletes.
Also, C.
 
oh right I'll correct both my answers, thanks
 
3:31 AM
@kwak D
@kwak also A and B
 
!!> "\"test'"
 
@kwak "\"test'"
 
@t1wc A, B, and D. The question is horrible.
 
not C?
 
@bjb568 D also to the function question
@bjb568 select multiple stuff
select all that apply
 
3:34 AM
@kwak It does need a call.
 
@kwak c is numerical string
@bjb568 wait... what are we talking about now?
 
ok, like a character number
 
Wait, there are two questions, which one are we talking about?
@t1wc I was talking about the first one.
 
1st question: D
2nd: A, B, D
@kwak false
 
@t1wc ah yes I corrected this one before to
 
3:35 AM
good
 
ok
 
you better also understand what you're inserting XD
we can explain you if you want
 
@t1wc A? That has a mismatched ' and ".
 
@bjb568 didn't see it... yeah, uncheck it
 
Ah, the shock to see a failed audit, only to realize that it's the system that's wrong…
 
3:46 AM
@kookara Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
4:05 AM
what's this quiz?
 
Good luck with your thing today @Zirak
 
Strip show
 
yeah, good luck with that :P
 
At 93, that's rough
 
4:12 AM
ikr?
 
@t1wc Error: text is not pixelated and crappy-looking enough.
 
@bjb568 sorry, I might aswell make it more pixelated
well, I guess you can see the main red thing anyway
it was an old joke of rlemon's on this chat
 
@OneKitten but... it's awesome!
 
@t1wc: so delicious, you'll want to cook it right away! Buy now!
lol who fucking upvoted spam
 
4:22 AM
@OneKitten yeah lol XD
it was -1 before
 
:P
 
I mean, he already has a rep of 1
you can't give him one of -1
or.. can you?
 
@OneKitten totally upvoting that
brilliant trolling
 
in the meantime other 2 people have downvoted
upvote my comment tho XD. it won't harm anyone
 
lol, also upvoted
fun
 
4:26 AM
Also upvoted.
 
wow... he grew from 1 to 37 in less than 5 minutes
 
Better than 50% of the SO population, I kid you not!
 
Well, recipes are always good.
 
that's hilarious bjb568 XD
 
@CallMeKStar, In this moment, I am happy.
So do I remind you of someone you've never met; a lonely silhouette? [in love with @madjuggalo91]
46k tweets, 531 followers, following 271 users
^ this person just followed me.
 
4:30 AM
@SomeKittensUx2666 I just got myself a cicada3301 image as profile one and 100 followers came out of nowhere
easiest way to get followers I guess
@MateiCopot, CWPDO
when nothing goes right... go left!
276 tweets, 98 followers, following 346 users
 
Do you sell goat milk? — Benjamin Gruenbaum 23 secs ago
 
98... dangit
 
@SomeKittensUx2666 Run.
 
> in love with @madjuggalo9
 
Yeah, run. Fast.
 
4:33 AM
Nooo.
Answer got deleted...
 
Oh well, we'll have to wait until stack overflow india opens for more
 
I have a tab with it still on.
I will nurture this tab.
 
@LeNI Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
is this our zirak?
@zirak, Austin, TX
Some guy who streams a lot. My tweets are my own, not my employer's.
6.9k tweets, 1.7k followers, following 314 users
 
no
 
4:39 AM
oh
 
Do you know anyone who programs using a really small scream?
 
@OneKitten I used to
 
Define small.
 
define scream
 
!!define scream
 
4:40 AM
@OneKitten scream A loud, emphatic, exclamation of extreme emotion, usually horror, fear, excitement et cetera. Can be the exclamation of a word, but is usually a sustained, high-pitched vowel sound, particularly /æ/ or /i/.
 
!!define kitten
 
@monners [kitten](http://en.wiktionary.org/wiki?curid=undefined) A young cat. Diminutive: kitty.
2011 December 14, Steven Morris, “Devon woman jailed for 168 days for killing kitten in microwave”, Guardian:
Jailing her on Wednesday, magistrate Liz Clyne told Robins: "You have shown little remorse either for the death of the kitten or the trauma to your former friend Sarah Knutton." She was also banned from keeping animals for 10 years.
 
!!moarkittens
 
4:41 AM
!!urban define
 
@t1wc [define](http://en.wiktionary.org/wiki?curid=undefined) To determine with precision; to mark out with distinctness; to ascertain or exhibit clearly.
Sir Isaac Newton
Rings […] very distinct and well defined.

2013 July-August, Lee S. Langston, “The Adaptable Gas Turbine”:
Turbines have been around for a long time—windmills and water wheels are early examples. The name comes from the Latin turbo, meaning vortex, and thus the defining property of a turbine is that a fluid or gas turns the blades of a rotor, which is attached to a shaft that can perform useful work.
 
!!urban bogan
 
@t1wc [define](http://define.urbanup.com/248324) Verb. 1. To explain the meaning of a word or concept.
2. To impart greater clarity or resolution to.
@monners [bogan](http://bogan.urbanup.com/703191) A fascinating beast. The majority of the species are hideously repugnant and unintelligent, and yet they manage to breed in ever-increasing numbers and populate an area known as the outer west. It is quite common to find five or six offspring in each family group, often with a different father for each new baby.
Their habitat consists of a weatherboard or brick-veneer dwelling and is characterised by an (snip)
 
Okay, currently using <= 1024 * 768 resolution (not in 1999 or something)
 
80 x 25 ?
 
4:43 AM
@laquintahuésped unicorn x cheese
 
This is getting XY-y.
 
@t1wc: you must understand that unicorns don't wrap cheese around Xs. Please don't insult the unicorns.
 
@OneKitten So you're on a first-generation iPad?
 
@monners: no, to define "small", sorry
 
@OneKitten don't insult the cheese
 
4:46 AM
@OneKitten Small: The size of @SomeKittensUx2666's penis
 
@OneKitten Command doge cannot be used in /tell.
 
facepalm
 
!!doge penis, impressive, monners, massive, intimidating
 
    wow
                           many penis
much  impressive
                 very  monners
                      so  massive
such  intimidating
 
LOL
 
4:50 AM
@OneKitten Command tell cannot be used in /tell.
@OneKitten !!tell somekittens tell (source)
 
!!s/monners/somekittens/
 
@OneKitten wow
many penis
much impressive
very somekittens
so massive
such intimidating [\(source\)](http://chat.stackoverflow.com/transcript/message/15980991#15980991)
 

« first day (1284 days earlier)      last day (3655 days later) »