« first day (1972 days earlier)      last day (2980 days later) » 

9:01 PM
A train service in Denmark. url is something like xmlopen.rejseplanen.dk/bin/rest.exe/departureBoard?id=860007 etc
 
@rlemon How about (in the spirit of a Caprica backend), have Caprica report every time a command is used to a server, and write a simple client-side app that polls/websockets the server and displays the latest commands in reverse chronological order
 
whole example url actually:
http://xmlopen.rejseplanen.dk/bin/rest.exe/departureBoard?id=8600073&date=10.03.16&time=22:00&useBus=0&format=json
 
That should be relatively simple.
@Schoening If you get an access control header error, it means that the server didn't send the headers.
Whether the server was supposed to send the headers or not, that I don't know
As for workaround, there's JSONP, but it's a dirty hack.
 
They say everyone is allowed access so I think it is an error. I will pm them and ask about this.
Oh. I'll read up on that then just to know about it. ty
 
On second thought, JSONP needs to be supported by the server too.
JSONP is basically you call a URL like this: http://example.com/ask/for/data?param1=value1&callback=myCallback
And then the server will respond with this string: myCallback({"data": "here"});
So all you need to do is to create a <script> element, set its src to http://example.com/ask/for/data?param1=value1&callback=myCallback and define a global function myCallback() to handle the data
 
9:06 PM
yea the server isn't sending headers and there is no indication it would
it expects you to consume the api on a server
 
Yeah.. they say their api is broken at the moment so I should just do get requests.
Thanks for the help. I tell them about the header files not being configured for that.
 
liftoff!!
@MadaraUchiha do run eval on that string?
 
@SuperUberDuper No, but if I create a <script> element, and the document found in the src of that script element is: myCallback(something);, then that script will be executed.
 
that sounds way scary
 
jsonp is an accepted method to go around cors if you absolutely have too
it's a hack.
but very well used in a lot of places
 
9:12 PM
@rlemon It's legacy
From the era of IE8 and below who couldn't submit a cross-domain request in any other way.
Even if the server supported it.
 
still a hack used today
by people who don't gaf about ie8
 
is that what you pass in to google maps, jsonp callback, after it inits?
well done @BenjaminGruenbaum
 
@rlemon You said "it expects you to consume the api on a server".
Did you google them? Did you guess? Or did you do some sort of wizardry?
 
if they don't offer the header then I have to expect they don't want clients to consume it
I also couldn't find any hint of jsonp being supported
 
Hi guys
 
9:22 PM
but the site was hard to read behind google translate
 
:D
Alright, just wanted to know. Ty
 
yea, pure speculation
 
is there a jquery plugin that can search for a words in text, with next and previous buttons
 
yes, it's called RegExp
 
if you want a workaround you can always proxy the request through your own server and you don't have to deal with CORS there @Schoening
 
9:23 PM
i would like complete solution
 
@MuhamedDidovic Feel free to make one, or use google to search
 
it is like highligher with buttons
 
@MuhamedDidovic I would like a turkey sandwich on rye
 
so no ideas?
 
I already told you; RegExp
 
9:24 PM
> Do my work for me
 
:o! Whaaaa... So I just do a get request from my server and that is a-ok? Or does it work differently, coz a buzzword I can google so I don't ask so many questions? @rlemon
 
@Schoening nope, you got it. request it on your server and spit it out from there
unless they do funky stuff to explicitly block that, you are good to go
if your server was node and you had the request module it would be like..
request(url, data => {
  res.json(data);
});
or something
that code assumes so much :P
 
Sweet! Even tho I don't get why that is ok to do and not cross origin problematic. But I can google that I bet!
 
yup
it is mostly a security thing
phishing is easier if you can manipulate data from other origins
 
9:27 PM
sterling beat you
 
still awesome
he's so happy
 
@rlemon Thank you very much for all the help. I give it a shot
 
@Schoening good luck
 
ty
 
9:29 PM
@Shane you wan to see who removed it or see the blame as is was before it was removed?
 
0
A: Store count of integers in order using javascript

Joe EsseyThe following code will build a hash with the key as the character and the count as the value. You should be able to use this strategy to build the type of object you need, and this will keep the order of the objects the same as the string input. arr = '11222233344444445666'.split('') hash = {...

Is that coffee?
Do we downvote coffee if it isn't tagged?
 
Looks like ruby lol
 
not coffee
 
Also yes
 
Lol. Kk
 
9:34 PM
Lol. Kk
 
Did that extension ever get fixed?
 
Has anyone used electron? The way I see it is that I basically have to still have a server back end, like express, but when the server is ready, I just launch a new electron browser window that points to the server? Should be that simple...
 
@ndugger yes
> The lesson here is that patience and hard work are stupid, and giant rockets are where it's at
cc @KendallFrey
 
9:54 PM
@BenjaminGruenbaum internetular high five
Congrats!
 
@rlemon That sounds like a Lemon move right there.
 
!!afk giant rockets
 
Has anyone used an embedded database with Node before? I'm leaning towards NeDB in conjunction with an electron app; any thoughts?
 
@ndugger I've used loki before
 
@BenjaminGruenbaum Noice! You deserve it!
 
10:03 PM
I've heard couchbase and leveldb are nice too
loki is insanely quick though, and synchronizes quite nicely with files
 
Hello Everyone
 
Anyone using CV-PLS on chrome?
@PeeHaa @MadaraUchiha I see you both worked on it?
 
whats the difference if I do this:
var i = moment()
or
var i = new moment()
I get the same result
 
@SuperUberDuper No difference, they return an instance in the constructor if it's not instanced
 
10:18 PM
so the constructor, it has some test to see if its using new @BenFortune
 
function foo() {
    if(!this instanceof Foo) {
        return new foo();
    }
}
Though with ES6 we get new.target
 
I've never used instanceof
 
where is foo defined in relation to function Foo()?
 
GitHub finally pulling their finger out
@SuperUberDuper typo, should be this instanceof foo
 
10:27 PM
ok thx 4 that
I get it.
I've always used new in to use all my classes
maybe moment are trying to save us typing or something
 
Save you from fucking it up is more likely
 
new.target seems silly. What's wrong with asking what this is inside of a constructor?
 
because this is silly?
good youtube channels?
 
I have one. gimme a sec
 
@rlemon electroboom
 
10:40 PM
already subbed
 
there's one more that I watch occasionally
 
london is best place in world to be developer
but not to live
 
Canada is the best for both
youtube.com/watch?v=Ow0lbyPkpnU is just way to adorbs
 
wtf is this
omg
 
10:46 PM
man in beard playing his baby to sleep on the piano
melts everyone
 
holy shit that's cute
gonna watch tigers fight to regain man points
 
lol
this video makes me want a baby, and a bearded man to play him lullaby's..
 
goodnight
 
Hey man, I can learn some lullabys on ukulele
I'm actually spending time with my guitar today. I've gotta learn a hell of a lot more to catch up to my ukulele knowledge
 
10:51 PM
melted m&ms don't look like that
but it does look like a brownie
 
@BenFortune nah, Symbol.species is where shit's at.
Also this.constructor usually works
 
11:16 PM
@copy internet?
 
crl
really hope the dude bit it
 
@BadgerCat Non-porn downloads paused
 
good, now I can watch makeup tutorials
 
crl
how much distance are you from each other physically :)?
 
Less than 2 meters
 
crl
11:18 PM
hehe, that's what I was suspecting
 
But there's a wall between
Walking distance is like 5 meters
 
crl
:)
 
what is the hit chance for small projectiles?
 
crl
3 * 1/Avogadro constant
 
11:32 PM
 
crl
so when you do b.bundle().pipe(fs.createWriteStream(__dirname + '/bundle.js')); this is still asynchronous? (such a noob)
I guess .pipe is somewhat like a callback
well, anway that's not too practical to write some quick test code after that pipe finishes, did an ugly setTimeout
 
well pipe takes a stream
er, pipe consumes a stream
or w/e
I'm bad with terminology
 
crl
11:47 PM
read from/write into, maybe also
 
const blah = whatever.pipe(..);
blah.on('finish', function () { ... });
try this
er, might be .on('end'
 
crl
tried 2 ways vpaste.net/ev1Be, not firing it
 
.pipe returns the stream
like my example
 
crl
the 2nd one even makes a bad bundle
oh
I'm stupid at that hour
no end event
 
codepen.io/anon/pen/eZzWqb anyone have ideas on what's not working?
 
crl
11:55 PM
'close', thanks lem
 
readables have end, writables have finish
both have close
use whatever you want
 
crl
ok
 

« first day (1972 days earlier)      last day (2980 days later) »