« first day (1313 days earlier)      last day (3646 days later) » 

12:00 AM
Ahoy hoy
\o
 
@brandonma 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.
 
0
Q: How can I promisify the MongoDB native Javascript driver using bluebird?

dimadimaI'd like to use the MongoDB native JS driver with bluebird promises. How can I use Promise.promisifyAll() on this library?

 
12:18 AM
@rlemon Time?
 
1
Q: Angular promises in $q.all are not being rejected

Brian MenesesBackground I have a hierarchy of entities that looks like (Manufacturer -> Vehicle Type -> Vehicle Model -> Vehicle Submodel). Each manufacturer has multiple vehicle types, each vehicle type has multiple models, and each model has multiple submodels. I need to retrieve a list of vehicle models ...

 
12:30 AM
@bloodyKnuckles 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.
 
@CapricaSix scanned! :)
 
@bloodyKnuckles morning
@monners how's life?
 
Can't complain
 
good, good.
 
CampJS in two days! #nerdcamp
 
12:36 AM
NERRRRD
 
I've gotta stop assuming my non-developer friends know what JS means
 
good evening
 
@monners Space
 
The wall of 3D-printed robotic penises that visualizes the stock market is definitely the best thing at the ITP show http://t.co/i0emn5n4BX
 
@rlemon Pffft, how relative of you
 
12:37 AM
only to the apple of my eye
 
@EF. 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.
 
@SomeKittensUx2666 What a wank.
 
Scribblenauts is one fucked up game. I'm supposed to get someone to eat a sewing machine?
 
lol
scribblenauts is insane man
the amount of stuff is so crazy
 
The hungry bum seemed to enjoy the sewing machine
 
1:01 AM
1
Q: Understanding of promises in JavaScript

spirytusI code JavaScript quite a bit and although I think I do understand workings of promises I'm not sure if I fully understand advantages that promises bring to JS world. Consider code below, simply asynchronous calls with callbacks containing furhter calls and so on. (function doWorkOldSchool() { ...

 
1:26 AM
Hey guys!

So I have an array and a corresponding variable:
`var ans1 = ["4", "four"]`
`var typedanswer1 = document.getElementById('textField1').value.toString().toLowerCase();`

And I have an if statement inside a function that looks like:
`if(typedanswer1 == ans1[0] || typedanswer1 == ans1[1]){ wrong1="false"; }`

It's a working code, I just want to know if there's a way to shorten the if statement so it includes all the elements in the array.
 
if (ans1.indexOf(typedanswer1) !== -1)
!!mdn Array.indexOf
 
@FabrícioMatté Thanks so much! :)
 
no prob
 
BadgerGirl and RUJordan show up at the same time. Hmmm....
 
1:34 AM
Hmmm....
 
HUE HUE HUE HUE HUE HUE HUE HUE HUE
 
i saw those both on reddit before you posted them you reposting bastards
 
1:55 AM
@rlemon was that in r/fishing?
 
on my main page
 
r/programming ~= r/webdev
 
@phenomnomnominal @rlemon was that in r/fisting? (source)
 
that word is not what first glance suggests
 
0
Q: Basic Javascript promise implementation attempt

spirytusTo gain better understanding of how promises work in Javascript I decided to give it a try and code basic implementation myself. Basically I want to implement Promises Object (I call it Aaa in my code) that takes function as an argument. This function can call resolve to resolve the promise, or...

 
2:01 AM
@Zirak
 
2:24 AM
 
 
1 hour later…
3:26 AM
Check this out:
On the CLI, navigate to a project with static html templates and run:

`sudo apachectl start`
`python -m SimpleHTTPServer 8000`

Instant web server that can be accessed by mobile devices!
 
3:47 AM
I use node-http-server
 
Same.
 
@monners As opposed to all those web servers that can't be accessed by mobile devices?
 
Yeah, that's called a stupid mobile/main site with no switcher.
 
I hate you all.
 
Aww, how nice.
 
3:56 AM
morning
do u know what does scriptaculous.js?load=effects means
 
it means you're stuck in 2005
 
@Loktar yeah unfortuately
 
:P it probably loads the extra effects idk. haven't used scriptaculous in forever
> The scriptaculous.js loader script will automatically load in the other libraries.

By default, scriptaculous.js loads all of the other javascript files necessary for effects, drag-and-drop, sliders, and all of the other script.aculo.us features. If you don’t need all of the features, you can limit the additional scripts that get loaded by specifying them in a comma-separated list, e.g.:
<script src="scriptaculous.js?load=effects,dragdrop" type="text/javascript"></script>
 
so, the summary is if we want to load a special part of feature we use this format right
 
4:01 AM
well, it looks like that just limits it
so if you dont need everything use that loader
and just tell it what you need
 
4:37 AM
can some one please help me with this stackoverflow.com/questions/23759302/…
 
@dhee did you see the answer on there?
Its a pretty good suggestion
> A more simple solution is probably to strip the links which you created (so the user gets exactly what they typed when they click "Edit" again).
anyone want to see the kickass pen I'm working on?
well.. I'm biased.. so I think its kickass
still a bunch of work to do on it like adding options, and draw mode that doesn't stop
 
HAMMERTIME!
 
lol.
click and draw on the canvas to see what happens :P
 
5:31 AM
So... Tired...
 
fancy
runs great in chrome, but cool to see MS pushing that sort of thing now
 
5:55 AM
I have a angular scope problem
does anybody familiar with it ?
 
@phenomnomnominal lol. Little late to the party MS
 
@SomeKittensUx2666 Aww, why? :/
@Zirak Hehehe
 
@SomeGuy YOU'RE AN AWFUL PERSON!
 
@SomeGuy i need a quick help please
Struck with a small thing i guess in angular + jquery
 
@monners I know :(
 
6:02 AM
can you give me a tip
 
@rlemon Hahaha I like this variation better. The other one being, "How many babies does it take to paint a wall? Depends on how hard you throw them"
@samitha Never used Angular, sorry.
 
@SomeGuy How circular of you
 
@SomeGuy dunno. some algorithm.
 
any angular guys ?
 
6:11 AM
0
Q: Angular success data access gobally

samithaHow do i access success data globally.I have declared barChartData globally and set success data value to barChartData.But i can't get it in dataSource: barChartData, var app = angular.module("anglesExample", []); var barChartData; app.controller('CitiesCtrl', ['$scope', '$http', function ($...

 
@SomeKittensUx2666 And the asshole award goes to...
 
:bows:
@samitha Read this: sscce.org
!!afk the night calls
 
@RyanKinal, @phenomnomnominal: Angus & Julia Young.
 
@Zirak The names of your next victims?
 
Big Jet Plane is great, started listening to A Book Like This, so far so good.
 
6:17 AM
@AlbertCortada 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.
 
6:28 AM
@Siddharth 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.
 
Hi.
 
@Zirak My sister is good friends with Angus
Presuming you meant to say Angus and Julia Stone
 
Probably did
 
morning morning
 
@sunnycmf 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.
 
6:44 AM
Recently, some exoplanet astronomers have managed to use careful analysis of reflected light to discover Earth during the day.
3
 
Second Rikudo, Some wasteland, crushing any resistance.
56.1k 19 76 127
Thank you everyone for the support =)
 
0
Q: Making my javaScript popup to appear only once

Nathan LeeI am creating a JavaScript popup. The code is as below. The HTML: <div id="ac-wrapper" style='display:none' onClick="hideNow(event)"> <div id="popup"> <center> <h2>Popup Content Here</h2> <input type="submit" name="submit" value="Submit" onClick="PopUp(...

 
7:05 AM
soon!
 
Nice!
You're going to get superpowers real soon
 
@CaBieberach 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.
 
@NathanLee have submitted an answer
 
yay
just answered an interesting question
been a while
0
A: createElement + createTextNode oneliner?

Florian MargaineSo, you're looking for performance? One-liners don't help with that. Using document fragments and cloning nodes does help, however. It requires a bit more code. var table = document.getElementById('t'); var tr = table.children[0]; var th = document.createElement('th'); var clone; var df = docum...

 
Yes .. Saw that just now .. +1 for your answer .. Thanks - @DrogoNevets
 
7:22 AM
@NathanLee i could be bitter in regards to critiwuing his answer, but i wont ;) :P
cheers for the +1
 
user image
5
 
Do you think should be burninated?
 
the tag, or the event full stop
 
HAMMERTIME!
 
@CapricaSix oh shush you.
 
7:28 AM
@phenomnomnominal The tag.
 
@phenomnomnominal who ever taught her that really shouldve made it !!stop
 
HAMMERTIME!
 
@DrogoNevets - Yes, but he was first to answer and I got what I wanted from him. So +1 for your efforts as well as good answer .. Cheers :)
 
@CapricaSix shut your face!
 
I thot it was called a "pie hole"…
 
7:30 AM
shes a bot, she doesnt eat pies
 
@Drogo Blasphemy!
 
oh man! its not even 09.00 yet
 
7:59 AM
@DGeTuX 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.
 
8:12 AM
@peterdoesco.de 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.
 
Guy just told me that if I upgrade my internet, a byte will become 4 bit instead of 8 bits on my computer so I should upgrade my internet to NGN. So if I download 40 Mbps I'll get 10MBps instead of 5MBps... sounds like they have a really magical service.
4
 
@BenjaminGruenbaum So if a mercedes drives at 80kmph, and a Susita drives at 80kmph, who's faster?
 
@phenomnomnominal That's awesome! And yeah...my brain auto completed Angus to Angus Young.
 
Sadly no English subtitles, but I'll try to find some.
 
i hate functional tests
 
8:19 AM
In the meanwhile, enjoy the translation by our lovely @BenjaminGruenbaum.
 
@SecondRikudo bezeq sales person.
He was trying to convince me I should upgrade to bezeqNGN as an ISP because it's faster because 40Mbps would translate to 10MBps instead of 5MBps
 
8:33 AM
Shitty atltime requires year be greater than 1900, but when atltime passes the value to _mktime64, it fails if year is less than 1970. Thanks, Obama!
 
@BenjaminGruenbaum Not sure if misinformed or just a liar.
 
oh you're insulting each other
what did I miss
@BenjaminGruenbaum what
 
@NenadVukicevic 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.
 
9:01 AM
yo
Greetings, Neanderthals...
 
Ug not like. Ug not speak.
 
'Morning everyone :) I have this weird doubt about these chats; Can I access them from anywhere else besides my browser?
 
Ugh me no understand
wat dis word
huh ooog ugh ooog
@MoshMage I think you can get RSS feeds.
 
An RSS feed of the star list on the right
 
@MoshMage You can also also access it on mobile browser
meow
 
9:17 AM
@MoshMage In theory Any program with an internet connection could read these chats
The browser simply shows it to you in a digestable format
 
Hm.. I was just wondering because thundirbid has this "google hangouts chat" thingy, I was wondering if I could manage to make it read this as well
though I don't think that'd be easy. So I'll just "remove my horse out of the rain" (portuguese saying.)
 
why do testers not do there fricking jobs!!
 
*their
 
sorry, im dyslexic, and stressed
 
9:28 AM
19 hours ago, by rlemon
@DrogoNevets their, they're, there.. those gramma nazi's can't hurt you anymore..
 
0
Q: Angular js - $routeProvider - how to get it to resolve on routeChangeStart

sbaaaangI'm reading the Angular official documentation for routeProvider and i read this: resolve - {Object.=} - An optional map of dependencies which should be injected into the controller. If any of these dependencies are promises, the router will wait for them all to be resolved or one to be...

 
@Feeds am I seeing whom I am seeing?
 
@SomeGuy thanks :D
 
9:50 AM
Hi, has anyone experience with swiper.js?
I have a strange bug in wich I cannot add 2 slides to the swiper. It only works to add one and its totally ILLOGIC... My code is like this:
var newSlide = mySwiper.createSlide('<p>asdasd</p>');
newSlide.append();

var newSlide2 = mySwiper.createSlide('<p>qwer</p>');
newSlide2.append();

Whats wrong??? It drives me crazy and I spend today 4 hours solving it, without luck though.. :(
 
@Mabbage 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.
 
Swiper no swipies
@AlexStanese Have you tried reversing the order to see what happens?
 
@Neil yes and it only takes into consideration the first append
@Neil on the second append the app blocks..
 
If the first one always works and the 2nd doesn't, then the library was likely not made to handle mulitple sliders (which is dumb)
To really understand why you'd have to see how it is made
But my guess is that it uses an id
 
@Neil I also tried with createSlide and with cloneSlide and the're working but the app stucks at the second append part..
@Neil phh.. but in the doncs there's nowhere specified the I can only add one slide :
http://www.idangero.us/sliders/swiper/api.php
 
10:02 AM
If the first one always works and the 2nd doesn't, then the library was likely not made to handle mulitple sliders (which is dumb)
 
@Neil and you say there is no way to add 2 additional slides to that swiper?
 
hello
:)
 
why are you calling .append() on the slide? What does append() do? Shouldn't a newSlide and newSlide2 be appended to the slider (I don't know how that script works, just seems strange to call append() on an object thats meant to represent a slide - what should be appended to what?)
Is there a separate slider object?
 
@NenadVukicevic actually append pasted the new created slide to the swiper
 
Oh, mySwiper is your slider ... still wierd, but I guess it should be called that way
 
10:09 AM
@NenadVukicevic .append() is an internal method: idangero.us/sliders/swiper/api.php#slidesapi
 
@NenadVukicevic that's how I understand fron the docs..
 
oh ok, then I don't know :)
looks to be right, from docs
 
@NenadVukicevic pff... I'm trying for several days to make it work... I'll never ever use this plugin again :(
 
@AlexStanese Just to be clear, if you try to create either one separately (without creating the other), they both work
In other words the problem is definitely tied to the fact that you're adding it twice?
 
10:19 AM
@Kiran 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.
 
@Neil if I only do:
var newSlide = mySwiper.createSlide('<p>asdasd</p>');
newSlide.append();
the slide is created and pasted to the slide perfectly!!
If I add these additional lines
var newSlide2 = mySwiper.createSlide('<p>qwer</p>');
newSlide2.append();
the slide is created (I saw it on inspect element) but the app cracks
 
I'm kind of tempted to write my own bot to interact with @CapricaSix
 
@Neil as if there's an error..
 
@AlexStanese why are you appending newSlide to....itself
???
(Sorry. it is late here. I might not be thinking right)
 
I think "append" is like "append me to body"
Or at least that's how I interpret it
 
10:21 AM
@KevinTomiyoshiYang it's appending to the swiper (slider)
yes
 
@AlexStanese Wait what? What sense does that make?
 
@tushAR 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.
 
Ah okay. Sorry, just kinda got back to this page
yeah, I would assume .append() is to the body
cuz it seems Alex wants to append a slide to a swiper, so I think he needs to append the slide to the swiper, not to the body
 
You sure append doesn't take parameters?
 
14 mins ago, by mikedidthis
@NenadVukicevic .append() is an internal method: http://www.idangero.us/sliders/swiper/api.php#slidesapi
 
10:23 AM
append takes parameters.
 
"internal method" is code for "don't use this!"
 
aaahhhh I see. confusing. why did they do this...
 
@Neil or I used the wrong words :D
 
@mikedidthis The documentation lists it like it were a callable method though
Very confusing plugin if it is internal
 
@AlexStanese we may need more context to figure out your problem.
 
10:25 AM
@Neil yeah that is what I thought. I originally thought the same as you, that .append() needed a parameter, but it doesn't seem to in relation to the plugin.
 
I never thought it's so hard to add a simple slide to that swiper -_-
 
It'd be like making a datepicker plugin and showing the function "open" on the documentation even though it's strictly internal and/or broken
 
@AlexStanese Is it possible there is a small code snippet of your problem?
 
@AlexStanese As usual, the devil is in the details
 
phh...
or haven't I implemented it the right way?
 
10:27 AM
@AlexStanese Try to just add it without assigning a variable.
 
big repo. Where's the file?
 
The example shows newSlide.append().clone().html('<p>New HTML</p>').prepend()
 
Hey, I have navigation with multiple dropdowns, all works perfectly except now I want to be able to click anywhere in the viewport(except the navigation itself) and the dropdowns will close. I have attached an event listener to the document but now when I click the toggle element the dropdown opens but then closes instantly because my document click listener closes it. Any ideas on how to fix this? Does the event object have some sort of data I can use to distinguish where it came from?
 
10:28 AM
Aside from being confusing, it seems append isn't as it seems
Try running it like in the example in the documentation
 
is my internet broken?
 
@KevinTomiyoshiYang I tried to add it without variable bit its not working
 
nope thats good
 
@AlexStanese try mySwiper.appendSlide(innerHTML, slideClassList, element)
according to docs
 
I tried:
mySwiper.appendSlide('Hello World')
mySwiper.appendSlide('Hello World')
and still the same happends
it adds the slides but the app brokes
 
10:35 AM
@AlexStanese It says that Reinit() is called when u do any changes to the swiper
 
@KevinTomiyoshiYang yes I called it after adding the slides
 
@AlexStanese try callining reinit() after you add the first one, and after you add the 2nd
 
@KevinTomiyoshiYang I tried that too
 
@AlexStanese do it for EACH add. Try that.
Oh....
@AlexStanese can you try commenting out the first slide, and see if it's a problem with the 2nd?
if the 2nd one adds when u comment out the 1st, you know for sure it is implementation issue, not something else.
 
@KevinTomiyoshiYang I tried that and it just adds the second slide
 
10:38 AM
okay
 
its something with the second append
I also noticed something very importantly
 
yeah so it's definitely the implementation issue
@AlexStanese try using .prepend() for the 1st one, then .append() for the 2nd
 
@KevinTomiyoshiYang I tried that too
if I put the second append in a SetTimeout with 1 delay it adds both of them and the app doesn't crack.. But it messes me other features in the app that were supposed to happen before the Set Timeout
because I have for example a function that shuffles images
and If I use the SetTimeout than the images from the second slide that is appended dont get shuffled
and others functions get messed too
 
sounds like a conflict. Are you using jQuery btw?
 
10:41 AM
Okay, that is your problem.
I think
 
phh... and is there a way to solve it? :(
 
jQuery tends to lag when you do certain things too fast.
I know first hand from writing a small app to do live drag and drop
I get conflicting data even though they are different div boxes.
@AlexStanese what do you mean "crack"?
 
everything blocks and the app dont respone anymore
as if I accidentally forget an ;
 
did you check console? for error log?
does it say anything?
 
yes
it gives me this
Uncaught TypeError: Cannot read property 'className' of undefined
 
10:45 AM
on what line?
 
and if I expand
C.updatePagination idangerous.swiper-2.6.0.min.js:16
C.createPagination idangerous.swiper-2.6.0.min.js:15
C.calcSlides idangerous.swiper-2.6.0.min.js:15
C.init idangerous.swiper-2.6.0.min.js:15
C.reInit idangerous.swiper-2.6.0.min.js:15
a.append idangerous.swiper-2.6.0.min.js:15
C.appendSlide idangerous.swiper-2.6.0.min.js:15
(anonymous function) index.js:746
x.event.dispatch jquery-2.0.2.min.js:5
y.handle jquery-2.0.2.min.js:5
x.event.trigger jquery-2.0.2.min.js:5
(anonymous function) jquery-2.0.2.min.js:5
 
which file does it say it comes from?
the Swiper js file?
 
idangerous.swiper-2.6.0.min.js:16
yes
 
are you having conflicts with jQuery using $ and swiper using $, too? (maybe not)
 
0
Q: How to deal with async properties in Ember when I need blocking calls?

andyWe were using a model with a hasMany with embedded children. This was fine so that whenever I called model.get('children') everything just worked. We've now changed that children property to async:true, and I can't seem to find proper documentation on how you should handle this. Let me give you...

 
10:47 AM
no
 
@AlexStanese Well, this is definitely a jQuery problem where it is too slow to pass in the className
 
@KevinTomiyoshiYang and isn't there any other way to pass it without using the set timeout? Maybe another logic?
 
Hey anyone using Brackets?
 
10:49 AM
@AlexStanese can you update your repo to what you have now?
 
and want to run ES6 code from brackets?
you can use this extension
 
@KevinTomiyoshiYang I noticed that SetTimeout workaround yesterday... I haven't changed anything, my repo is now as you see it on bitcuket..
 
@AlexStanese It seems the Demos use
mySwiper.appendSlide(
check on an list of demo source code you can refer to
@AlexStanese I think .append() is not meant to be called rapidly multiple times. To do that, it seems they use MySwiper.appendSlide() instead.
Well, hope that helps. I'm going to sleep. Good night guys!
 
@KevinTomiyoshiYang its not working with mySwiper.appendSlide(
too :(
 
10:56 AM
@KevinTomiyoshiYang it happends exactly as before
it adds me the slides but the app brakes
 
Well, if you look at the demos, they add slides by pressing the button
there needs to be a event-based action for it to work properly
by the way, why are you appending all of them in JS statically?
If you want to make a slider, no need to use .append()
 
@KevinTomiyoshiYang I saw but I need to add the slides automatically before starting the next lvl
@KevinTomiyoshiYang this is actiolly a phonegap app
and I need js statically
because the app doesn't need to connect to internet
 
cans oem one help me diagnose an MSIE8 error please?
 
What's with all these phonegap stuff lately...
 

« first day (1313 days earlier)      last day (3646 days later) »