« first day (1271 days earlier)      last day (3902 days later) » 

user2509223
14:00
@Neil what?
@wm1sr 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.
user2509223
lala-lala-lalla-laalala-laaa
@derylius If you feel like you're 16, then you've probably entered some sort of flux mental state
@BenjaminGruenbaum what do you mean by it fails for attributes?
Such things can be contributed to heat stroke
Hence, you should see a doctor
user2509223
14:02
@Neil ah yeah, but my doctor already knows that
@derylius Ah, in that case it's all good
user2509223
@Neil tought so
ive jsut been told im not allowed to fit a home made tracking device to my parents cars for scalability testing :(
@rlemon, I saw your website, pretty things there...
thanks
more on codepen
14:06
Yeah I saw your demos
you mix art and development...
Wow, it's quite here...
!!doge silence, nothing, quite
       wow
           such silence
                      very  nothing
so  quite
@RyanKinal you got me thinking of random number generators
just discovered that even diplomaed translators can make simple grammar mistakes.
@rlemon Yeah?
i'm working on generating random numbers based on randomly selected imgur images as seeds
14:16
Oh, nice
using a random as seed :p
can we use two model in same view in backbone.js
@rlemon but it's like if you use their random generator...
one for post one for fetcj
@Oleg
@Sport use one model, override model.url or backbone.sync with a custom function...
14:21
ok we can use two model or not
?
You can stuff as much stuff into a view as you want.
@briankip 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.
@RyanKinal kinda works. jsfiddle.net/rlemon/6qsmz
I'm getting A LOT in the .1 range
But I like the logic
sum *= Math.pow(2,13) + 1;
sum += d;
sum %= Math.pow(2,50);
needs some work
there are actual algos I can use for this. I started reading a paper on it. then decided to fake it like most things in life
14:26
lol
Fair enough
there is an awesome random number generator in js
0.336288498504 (index):58
0.3020119902626 (index):58
0.30806595322 (index):58
0.383970278647 (index):58
0.28064078944 (index):58
0.1880025162872 (index):58
0.188266101088 (index):58
0.282467631791 (index):58
0.145707859585 (index):58
0.98794258198
that uses seeded vals
so really i'm just generating the seed off the image
    var random = function (len) {
        var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
        return len ? chars.charAt(Math.floor(Math.random() * chars.length)) + random(len - 1) : '';
    };

    var getImage = function (cb) {
        var id = random(Math.floor(Math.random() * 2 + 4));
        var img = new Image();
        img.crossOrigin = 'Anonymous';
        img.onload = function () {
            if (this.width === 161 && this.height === 81) {
                return getImage(cb);
14:29
get random images from imgur ;)
whats nice is it uses Math.random after seeded
m59
m59
@SomeKittensUx2666 freakin' beautiful. That's a good free template :)
will be looking at that, thanks @Loktar
I use it on retroships.com and in my game engine
14:30
holy fuck that is some complicated code :/
so I can have deterministic results
my other idea was to grab colors at locations, average them, then slice off the last number in the avg. do that 16 times. BAM, random number
yeah its pretty solid though
except if you seed it with a solid image.. yea that wouldn't work
images need to generate the seeds
you could probably seed his with a solid image
just use the dataurl
or the first so many chars
14:33
yea likely.
you can seed mine now with a solid image
problem with picking color of image: there is some color that are most used in pictures and you don't have the same possibility to have one number or an other...
To the person who just emailed me. Did you mis-type "Robert" as "robot" or do you think I am the bot? or what?
@SteamFire true, two different pics could have colors in the same place
@RicardoAnjos 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.
the best constant would be the dataurl or any string data representation you can get of the image
14:34
You can run a cryptographic hash function over the random data to make the bits well distributed
I made a game in 2010 that seeded based off of music, that was neat imo
@copy it's an idea
@rlemon was curious about the code.. when I ran it, it didn't show me any result
@rlemon you're making seeded random right?
14:36
@SuhasDeshpande it logs to the console.
because the value is different everytime I run
yes seeded random
and that defeats the purpose of seeded random..
and the seed is a random image from imgur
so that is why you get random every time
ah everytime it loads a new image gotcha
14:37
var random = function (len) {
    var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
    return len ? chars.charAt(Math.floor(Math.random() * chars.length)) + random(len - 1) : '';
};
generates a random ID. if the image it returns is the exact dimensions of their 404 image I try again
not efficient, but I didn't feel like signing up for an API key just to piss around with this
how do you get the next random number?
or is that not done yet
May I ask what are you guys trying to accomplish with random number? Just curious
user2509223
what did I miss?
fun?
14:40
idk about these guys. I'm just pissing around with it
programming is fun
why the hell are you making something @rlemon
thats just madness.
Yeah, cut it out
You're a programmer for christ sake
hacking around imgur.com seems like a good use but
Unfortunately, it's pretty slow to get a random number with this technique...
good morning chaps
14:42
good morning
user2509223
@rlemon why not just get a random number and then base64 it?
because that isn't how I want to do it
:P
user2509223
it would be way faster
To the newbies in here: I write a lot of code with zero intent for using it. I just like to see if my half brained ideas will work so I do it. Remember to have fun while you code or you will be burnt out before you are 30
14:43
true
user2509223
i messed around with random numbers and encoding once, when i was implementing my SSL independent RSA
user2509223
I should still have it somewhere
That's why I only program in lolcat
who here works for openSSL?
@derylius because it's too mainstream
user2509223
14:44
@SteamFire good point
user2509223
@SteamFire lets write it in REBEL
Let's write a new language!
@derylius the point was, I got the idea to seed a random number off random imgur images. not doing it this way would defeat the purpose of even doing it.
posted on April 09, 2014

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} AND there's a favorite smbc comic of mine over at The Nib.

14:46
@Feeds I don't get it
user2509223
@rlemon not, if you use the same range as seed as they do
I'm about to reignore feeds
user image
2
Jackpot
it keeps posting this sat morning breakfast shit.
@derylius huh?
they don't give me random shit, I request random id's until one passes back an image
14:47
@Astery 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.
hello all!!!! quick morning question!! I need an idea on how to do a oncomplete at the end of the timeout
any advice is good advice
anyway, screw you all. I had fun writing it.
@stewbydoo try playing in traffic.
^ BAM. bad advice. your move
lol
alright
was not ready for that
is it possible to go to a certain page if the user does a browser refresh?
user2509223
im over
user2509223
14:48
gotta work some
like... my site has page 1 and page 2. if they are on page 2 and they happen to refresh i want the site to take them back to page 1
user2509223
@Bubbas yeah you just have to exploit their browser
@Bubbas how are they getting to page 2
don't quote me, but using the History API you might be able to do this
page2 are "documents" ... on page one they can either click "new doc" or click an existing one they previously saved to "open"
@jesse ping
user2509223
14:50
@Bubbas actually you can count get requests per user, and send a redirect response on Nth request
but the way i got shit setup, their current doc info will disappear if they refresh on page 2 and thus they will lose their. so i just want to take them back to page 1 for being a bad user
count get requests?
there are always x number of requests going
user2509223
@Bubbas server side
theres more than just the doc
well im just not connecting the dots sorry. what do you mean? how does that solve me prob
14:51
have fun
oh god
haha
user2509223
@Bubbas ignore me im talking in HTTP dialect
well i know what youre saying
@ascetica 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.
There are more possibilities
i think... maybe I don't know... Sorry
14:55
My js dev intern doesn't know how to view source code of a web page. I'm so screwed...
You'll just be doing a lot of teaching?
you always get to page 2 by clicking a link on page 1. so put something in that link so you know you are coming directly from page 1. then on page 2 load remove it right away. so if they refresh the page it is no longer there. then you can redirect them back to page1.
(Yeah, you're screwed)
@Oleg You copy and paste the page, no?
14:56
but you should be doing this on the server @Bubbas not on the client
I can control the JS on the client. I cannot control the server
yeah
user2509223
@SteamFire @Bubbas the only surely cross-browser solution is doing it server side
the only secure solution
user2509223
as well
I can write a shitty js solution in ten minutes that will work 10/10
14:57
Also, with session or something like that
but anyone who knows anything about js can disable it
well just for their session
right?
user2509223
@SteamFire sessions are not necessery
@sowjanya 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.
user clicks linkA -> it sends a request to the server for linkB, maybe with some flash data telling it you are allowed to view linkB. if they F5 without that flash data (or how ever you want to send said token) you can do a location() redirect on the server
user2509223
14:58
@Bubbas when they open the doc1 from page1 send page one, when they open doc1 from doc1 send them redirect to page1
if they are logged in in some way, and you do have a session, that becomes even easier
which i do
In HTTP networking, typically on the World Wide Web, referer spoofing (based on a canonised misspelling of "referrer") is the sending of incorrect referer information in an HTTP request in order to prevent a website from obtaining accurate data on the identity of the web page previously visited by the user. Overview Referer spoofing is typically done for data privacy reasons, in testing, or in order to request information which some web servers may only supply in response to requests with specific HTTP referers. To improve their privacy, individual browser users may replace accurate ref...
be aware, spoofing the refering location is also quite easy
user2509223
@rlemon but csrf tokens are harder
m59
m59
Does anyone know is Kris Kowal's q allows you to run the same function with either the reject or success of the promise?
It seemed like this is what the docs said to do:
whatever().then(null, function(res) {

});
user2509223
15:01
seriously why the hell all of you want to use promises?
m59
m59
but that just picks up failure (so...)
@derylius why u trollin?
Man them school shootings are scary
need to ban all guns
m59
m59
@Loktar u trollin also?
^ for those who don't believe it when I say crazies with knives can do as much damage
@m59 yeah, because during gun convo's I bring up the argument how evil people find ways to do evil regardless
m59
m59
yeah, I want teachers with guns.
15:03
lol
@ivelander 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.
@m59 I'm not against teachers who have taken the proper courses having guns
its funny there was a shooting yet again at Fort Hood, and the debate is to allow everyone on base to carry guns
and a mental health checkup every 6-8 months
which I think all educators should do anyway
yet when there is a shooting at a school the argument is to take guns from everyone.
user2509223
15:05
@m59 im not trollin im just curious
m59
m59
How the heck does one dude with a knife manage to stab 20 people?
m59
m59
@derylius because promises are FAR FAR better than callbacks. That's not even a debate.
@m59 not sure it happened in China in march as well
@rlemon lol
user2509223
@m59 big knife?
m59
m59
15:07
Note to self: teach kids about grabbing things from surroundings and beating the hell out of someone when necessary.
29 people killed in China
130 wounded
m59
m59
Everytime there's a knock at my door I'm not expecting, I at least grab my piano tuning hammer and hold it behind the door.
@m59 eh when there is a crowd its hard I imagine
imagine being in a crowded hallway and someone just starts running down it stabbing the fuck out of people
most peoples instinct is to run
people trip/fall
some people are just slow.
m59
m59
yeah, but it couldn't hurt to be more alert.
I walk home from work after waiting tables and always have a gameplan if someone tries to attack me.
Yeah because thats where you expect it
m59
m59
15:09
I'd expect it in schools lately.
sadly.
:? yeah it is shitty. Kids are dumb and crazy I blame video games
m59
m59
LOL
lol actually I blame parents
m59
m59
Dead society ^
I blame everyone :)
Damn I'm looking at ui-router and co and it's so scary...
m59
m59
15:10
co?
Yeah. Like "ui-router and friends".
so i have
$('select, input').bind('change', function() { //stuff }
...i cant only seem to get my stuff to happen once a refocus on my elements occurs. it isnt immedaitely firing once i start typing in an input like i want - you must type AND THEN click out. which i dont want obviously. is there a better event to use?
m59
m59
ui-router is tough to get started with. I've only used it with a little bit and had a lot of trouble, but it's worth learning
Can I avoid it?
user2509223
m59
m59
15:12
@Oleg the hassle? I dunno.
@Loktar My solution to all this mess: goodgraphics.us/johnnyhauser/sacrifice-me.pdf
The most scary part in all this is the fact that 90% of what's happening feels like magic.
I've cloned ng-boilerplate and it has stuff like:
m59
m59
Oh gosh. I HATE ng-boilerplate
dependencies = [
    'templates-app',
    'templates-common',
    'ui.state',
    'ui.route',
    ...
]
^ where do these things come from?
Why is it all referred my name?
m59
m59
yeah, it's a big mess.
Makes me dizzy.
15:14
does anybody know when the new TLDs are going to be implemented? are they already implemented? :I
@m59 alternatives?
@RalphWiggum some are arent they?
m59
m59
I'd make your own.
user2509223
need more coffee
some of the new ones are on sale anyway
15:15
not the exact page you need
@Loktar I'm not sure. I don't see any on my registars
@m59 But the problem is, I'm not too sure about best practices yet. I'd rather stick to some proven style.
but surf around the icann website
i'm sure they have postings for each as they become avail.
@RalphWiggum namecheap has them
m59
m59
15:15
@Oleg right now, I'm writing a bunch of my own tools for that reason. I agree, there's a lot I could learn here, but I believe it's worth it
user2509223
request_header = Coffee
a shitload of them look to be available if you scroll down @RalphWiggum
m59
m59
Either I do better than the alternatives, or I learn why the alternatives are good, how they work, and how to best use them. @Oleg
@m59 in your opinion, should I stick with ngbp or try something else, like angular-seed?
15:16
@jonc 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.
user2509223
oh yeah, lungo no sugar
.ninja <- REALLY?!?!?!?!?!
> FUTBOL
lol wat
FOOOOOT BOOOOL
0
Q: SQL query to delete all duplicate records but keep the most recently dated

Corbo152i have a table with duplicates, the primary key for the table is ID. obviously the ID has not duplicated but the name has. i need to write a single sql query to remove all dupicate records but it must keep the most recently dated. my table looks like this: ID Name Date 1 Hardik 07/30/2006 2 ...

m59
m59
15:17
@Oleg dunno man, I don't like any of that stuff. I just looked at angular-app and other examples and took stuff I liked from there.
user2509223
ninjas need their own sites
.rich
hahaha
iam.rich < will be first purchased
m59
m59
gotta go, holla
cya
.WANG
YES
I cannot wait to own HUGE.WANG
15:18
PINK.UNICORNS
dude its probably gone :(
thats what sucks they have these out to bid so long before
for big $$
so the really good ones are gone when the general public gets access
!!>$$
@Oleg "ReferenceError: $$ is not defined"
tld's are a joke now
user2509223
IANA should seriously rethink these names
15:19
they need to just open the fully custom ones and be done with it
its going to take a long time before the avg Joe gets .com off the brain anyway
why, why for the love of all that is good... why do we need a .VODKA TLD?
user2509223
wouldnt it me easier to open the whole TDLs to the public and forget the secondaries at all
.YOKOHAMA
what?
user2509223
i would love to own LOCALHOST
@rlemon omnomnom
15:21
squatters are done for
@MohammedAliKachbouri 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.
sweet, our company name fits in a TLD perfectly
why do some random places get TLDs
not even counties
cities
m59
m59
oh, by the way... is there a way to go into a folder that contains a node_modules folder and run node the-module and have node look for it like it does with require?
I might register this and squat it and force my company to buy it from me
15:21
I want a .kitchener
rlemon-runs.kitchener
@RalphWiggum they can sue you :P
and they will most likely win
@Loktar ssh, I'll get it under a false name, "Mr Longbottom"
Why do we even need .___ ?
I'm tempted to buy poop.coffee
lol
15:22
man.parts
user2509223
@rlemon nice
java.script
:( I wont be after today
quick estimate last night taxes will be like 17k
gonna ssuuuuuck
what surprises me is they went for .XXX but not .PORN
15:25
guys, is there a way to redefine js square brackets type? For example from Array to Float32Array ?
:(
doesn't Array = Float32Array this? or Array.prototype = F...prototype?
Hey, do you know any node.js library that implements Mongo pseudo joins?
how to force the content inside the div to flow rather than wrap?
15:29
someone buy dot.dot and put an ellipsis on it
user2509223
last two test and then going home
@eazimmerman clever
a little too clever
WHO ARE YOU?!
0
Q: Why doesn't Backbone Collection fetch return a promise

Kim GysenThe following example code works well: Auth_controller.prototype.isLogged = function(){ //Check if the user is authenticated var getAuthStatus = this.auth_model.fetch(); return getAuthStatus; }; Auth_controller.prototype.redirect = function(fragment, args, next){ var get...

user2509223
and a promise again
good night everybody
15:37
@rlemon ...
;)
Guess WHAT !!!!
I am back !!! ;)
Dammit :(
anyone aware of a button template
....for?
I want it for on and off tits page
this page*
15:43
Could someone explain what the same-origin policy is guarding against? Why prevent JavaScript from accessing stuff from other domains?
I will have my own text in it, e.g. Active, Closed
user2509223
and the last test
cross domain scripting yo
XSS
u can get around it with a PHP Proxy script using getfilecontents tho @ŠimeVidas
@JFit XSS is when a malicious script is injected into your site, but that is not related to my question I think
user2509223
or if you own the remote server side, then with adding allow-access-origin header
15:45
OH man
where is LEMON ?
I'm talking about any JS code being able to read resources from other domains. Why is that bad?
he would had helped me by now
user2509223
and x-allow-access or something like that for MS
user2509223
@ŠimeVidas we are talking about the same
allow-content-origin header or somethin
user2509223
15:46
yeah something like that
@derylius Huh?
@ŠimeVidas if you have an authentication on sitea, siteb can access a protected page on sitea without a same origin policy, or something like that
user2509223
@JFit that smile face is highly annoying
XSS is related
your face is annoying dery :P
@ŠimeVidas You login to Paypal. Then you visit a malicious website, and without the same-origin policy, the malicious website can potentially harm you by simply using Paypal's GET/POST requests to take all your money!
15:51
!!caniuse Opacity
@SomeGuy But what if my JS just wants to GET request a bunch of static resources, like style-sheets from a different domain? What's the security issue here?
There isn't, but how does the browser know if they're really static resources?
@ŠimeVidas the browser would need to detect if they are, which they can't without already making the request
@RalphWiggum even with making the request
15:54
Yeah, you really can't tell
@EdgarAlexander 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.
Hello there! :)
dont think of it as denying access to things, think more of it as a way of controlling what is accessable from other pages. @ŠimeVidas
@RalphWiggum The request would have Accept: "text/css". That's not enough?
I have a little doubt, does JavaScript use a hashtable when checking with typeof?
15:56
@ŠimeVidas Servers can serve whatever they want
That's "the server's problem" :)
The browsers are simply trying to safeguard their users from potential risk
@ŠimeVidas the server has the header "Allow-Access-Origin" to make sure it accepts cross domain requests, is all
OK, let's cut to the chase: A web-page has <link rel="stylesheet" href="http://other-domain.com/foo.css">. Why can't I access the CSSOM of that style-sheet with my JS?
@adv12 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.

« first day (1271 days earlier)      last day (3902 days later) »