« first day (1597 days earlier)      last day (3345 days later) » 

12:01 AM
... yelling at the weights?
 
> GET UP THERE YOU BASTARD!
 
12:40 AM
@Loktar does it derender when elements get out of viewport?
 
@Loktar I'm pretty sure it's important to throttle scroll events
 
@copy yeah I need to still
@FlorianMargaineq no doesnt derender
for the project at work we need to lazy load a few things
not images but large components
Cool to make it declarative like that imo
 
 
1 hour later…
> I also have to figure out how to automatically download webpages, but it's probably not hard.
lol
 
2:47 AM
Hey guys, if you ever need a bootstrap grid, without all the fluff that comes with bootstrap, I've put together a single .scss file that's ready to drop into any project here
I've also extended the column breaks to include a real col-xs point so you can target that annoying gap between 480 and 768 (or however you choose to configure the variables)
Still very much a work in progress
 
m59
Noob moment, why does this work?
(function(){)
var app = angular.module('store',[]);
app.controller('StoreController',function() {
    this.product = gem;

});
var gem = { // etc
Oh nm
I see it now.
 
Variable hoisting
 
m59
Just had to see it in a different window I guess.
Still kinda ugly imo.
 
No, asynchronism
 
3:09 AM
> the ultimate goal of a Snowflake programmer is to produce a program that will eventually (given enough time and luck) optimise itself down to a single command, that has the same effect that the original program did.
mind blown
 
 
2 hours later…
ASR
5:08 AM
Hi all when I write border-bottom: #fff solid 2px; for the active navigation item, when I mouse over on item the navigation menu is collapsed.
 
5:21 AM
@ASR I think I will cut my hair really short
 
@darkyen00 Hahahaha
 
m59
5:42 AM
my code snippets in posts lose the edit button... anyone else have that?
how do I get the code back into the editor?
 
m59
5:58 AM
@squiroid do you ever come here?
I think you'd like this chat.
 
No
I never chat on this group :-)
 
m59
Good devs here.
 
@m59 can you suggest me some website or tutorial for advance practice of angular js :-)
Great thanks for adding me here :-)
 
m59
Anyone is welcome (unless you're a jerk lol)
 
haha :-D
 
m59
6:07 AM
Well, this is a good one: teropa.info/blog/2014/10/24/…
 
Thanks @m59:-)
 
ASR
@BadgerCat :) why?
 
@ASR I think it's time for a change, I guess
I'm still not so sure
 
ASR
@BadgerCat you have free time do it ?
:)
 
Yeah
But now I'm programming, I still have time to think about it.
 
m59
6:13 AM
@squiroid I guess I learned most of what I know by doing it and trying to teach others on SO (like you're doing also). You can read through other Angular SO posts for perspective. I'll link two that I really like
This is great in general, so ignore the Angular 2.0 aspect if you don't care. It's really about writing good Angular code
20
Q: What can I start doing today to prepare for Angular 2.0?

JMKI'm pretty excited about Angular 2.0, but also recognize that a lot of the stuff I learned for Angular 1.x will be rendered obsolete. Waiting another year to start learning 2.0, when 1.x will be unsupported shortly after it's release leaves me uneasy, so what can I do today to ease the learning ...

and this is an example in another answer where I apply that principle.
74
A: how to split the ng-repeat data with three columns using bootstrap

m59The most reliable and technically correct approach is to transform the data in the controller. Here's a simple chunk function and usage. function chunk(arr, size) { var newArr = []; for (var i=0; i<arr.length; i+=size) { newArr.push(arr.slice(i, i+size)); } return newArr; } $scope.c...

Browserify and npm are awesome.
 
@copy are you up?
 
ASR
@BadgerCat what coding you will do?
 
Oh, some minor thing for my job. Just adding social media logins for an app.
 
ASR
@BadgerCat good. still you are working, you are bachelor? :)
 
I'm doing my masters
 
6:26 AM
@m59 thanks a ton for help :-)
 
ASR
@BadgerCat great rly, do you know java?
 
@ASR it's been a long time, so maybe not anymore
 
ASR
@BadgerCat now what programming you will do?
 
Python mostly, sometimes Go or Ruby
 
ASR
@BadgerCat ok, what about java script?
 
6:30 AM
No, I'm just here for friends and boyfriend
 
ASR
@BadgerCat ok, :)
 
 
4 hours later…
10:20 AM
@BenjaminGruenbaum
 
@BadgerCat I read that.... differently.
 
	getUserByIdentifier(identifier){
		var promise = this.models.Verifier.findAsync({
			identifier: identifier
		}).then( (verifiers) => {
			if( verifiers.length > 0 ){
				var verifier = verifiers[0];
				var getUserAsync = Promise.promisify(verifier.getUser);
				return getUserAsync();
			}

			console.log("Returning an empty array");
			return Promise.resolve([])
		});
		return promise;
	}
 
@darkyen00 You don't need to add brackets around an arrow function argument if it's only one.
 
for some reason when i do a .then( getUserByIdentifier ) followed by .then( doSomethingWithUser )
i still recieve identifier in the doSomethingWithUser
can somebody educate me on what am i doing wrong ?
 
@darkyen00 What are you expecting to get?
 
10:28 AM
user or []
 
For starters, you don't have to return a promise from a .then handler
You can return a value
 
@SecondRikudo Well I know that
but it not working was why i ensured that am returning a promise everyway
 
this.models.Verifier = mongoose model?
 
orm2
 
there's probably findOneAsync()
 
10:33 AM
nope
 
Alright
 
there is getAsync
 
Have you tried debugging?
(i.e. with the debugger)
 
nope
though i logged every single step
 
How are you running this?
terminal? WebStorm?
 
10:34 AM
term
now its on debug
 
Are you using babel?
 
y6es
 
Babel has troubles with setting breakpoints
Add a debugger; statement in your .then()
That'll cause it to break there correctly.
 
thats what i usually do :D
 
hello
Guys how would you test a function expression that is in another function and is unreachable from your object?
example:
var myApp = function () {
    var initApp = function () {
        // some init stuff
    }
    return {
        // properties/methods
    };
}
how do I test initApp() with Jasmine without making an accessor method?
 
10:40 AM
@Vlad You can't.
You can't test a method not available to the world.
 
so I am guess I shoudl restrucure my code
ok gonna search for solution
 
@darkyen00 any luck?
 
nope
Probably something wrong with how i am .thening them
 
@darkyen00 Looks okay to me in this particular function
 
tokenManager.verify(identifier, otp)
	.then(status => userManager.getUserByIdentifier(identifier))
	.then(user => userManager.createGuestUserWithIdentifier(user))
	.then(user => accessTokenManager.createTokenForUser(user))
	.then(accessToken => res.smartJSON(200, accessToken));
i have completely disabled user check before create, oh and createGuestUser is not supposed to be called if user Exists but i am running it to test the very basic flow
 
10:44 AM
@darkyen00 ?
Don't call promisify at runtime, ever.
If you must call promsify at runtime and trust me - you don't. Call Promise.fromNode instead.
Also, use destructuring.
 
@BenjaminGruenbaum I will try to wrap the orm2 to support promises
 
Another question, I have a subobject that contains only Constants-functions. Should I make a test that checks if all necessary functions are defined?
I mean is it useful
 
@Vlad What are constants functions?
 
var myApp = function () {
    var initApp = function () {
            // some init stuff
        },
        MY_FIRST_CONST = "My first const",
        MY_SECOND_CONST = "My second const";
    return {
        Constants: {
            MY_FIRST_CONST: function () {
                return MY_FIRST_CONST;
            }
        },

        doSomeStuff: function () {
            if (MY_SECOND_CONST) {
                // do some stuff
            } else {
                // do something else
            }
for example my second const doesnt have an accessor method, becasue it is used only internally in myApp object
 
@BenjaminGruenbaum @SecondRikudo it was a pita with the orm itself :-/ i still dont get how i got identiier
but switching to sequlize and its native promises, was promisng !
 
 
2 hours later…
1:03 PM
@BenjaminGruenbaum :D
 
1:37 PM
Guys, I have another AJAX quesiton on SO :D please, take a look
0
Q: Get online users list from stackoverflow chatroom

PDKnightI have another question: how to get online users list from stackoverflow chatroom (via AJAX, if it's possible)? I know SO chats use AJAX to get informations etc., but I dind't find any AJAX request which gives me an array of online users in the room :( Firebug shows all AJAX requests when I jo...

 
will doing
req.user = user;
cal tostring on user ? on next ?
 
In what context is this?
 
@Qantas94Heavy You're asking me?
 
Sorry, that was meant for @darkyen00
 
okay
 
1:48 PM
@darkyen00 No?
Not unless req.user is used as a string
 
2:12 PM
Guys, its my first day with the javascript and the jquery,

Even after including the file links from google server, the test is showing the error..

ReferenceError: $ is not defined

any thoughts ?
 
go to jqeury site
wait
 
@harry You're calling $ before it is defined.
 
copy link "Download the compressed, production jQuery 1.11.2"
 
@PDKnight Please stop... he said he included the file links from google's server.
 
the reason why that bug appears, is: "You must include jqeury before scripts."
 
2:14 PM
@SecondRikudo
I've included the link
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
 
@harry, do you write your scripts after this including?
 
5
 
yes, I am just copying the code from codeacademy
 
show your code
 
@rlemon Hahahaha
 
@harry ...
3 mins ago, by PDKnight
the reason why that bug appears, is: "You must include jqeury before scripts."
 
damn that worked.. but its working in online and not in my local code..
howz that ?
 
show your code
screenshot etc
 
as I said.. now its working
I just repositioned the link to jquery files
@SecondRikudo if you could tell me, why that thing worked ?
 
2:35 PM
@harry Because jQuery defines a variable called $
And if you try to call $ before jQuery defined it, you get an error.
 
But its working there on that codeacademy
I just copied the code
 
@harry Codecademy likely does magic behind the scenes
(Which is why I'm not that fond of it)
 
oh got it
 
Codeacademy's final code:
 
so can you recommend a better one ?
 
2:41 PM
 
2:59 PM
@harry Take challenges you find online
And implement them locally
 
@harry idk, I think you should learn javascript first, so jquery will be very simple then
 
3:11 PM
Mh... I need some tips regarding jquery ui (or similar, I have the freedom to choose my library)... I have a list of items (an inventory of sorts) and a few select spots that can each hold exactly one element of the inventory. Now I want the user to be able to drag+drop items from the inventory onto those spots, while animating the previous item to revert back to its old position...
I think jquery ui is perfect for that, but I dont know how to do it properly - theres alot of small things that go wrong.
 
3:40 PM
posted on March 01, 2015

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) {} KERPOW

 
3:51 PM
Woohoo! I'm dynamically building an HTML table in Javascript. Exciting times for this non-JS programmer.
 
4:04 PM
hey! :)
How in the world do I get my website to load ajaxcontent on back/forward, and refresh by user interface?

http://jsfiddle.net/u3sn0t95/

As it is now, chrome will load without styling, if I i.e. go back from
someHtmlPageClickedAfterTheFollowing.php
to
someHtmlPage/somAjaxPage.php
and mozilla will just load
someHtmlPage.php..
I know I can do it more easaly with jQuery, but as it is, I try to learn javascript, and at the same time, I understand javascript way much better then jQuery.
I know jQuery is just a javascript libarary, making it much easier to code, and I am considering using
 
crl
4:16 PM
@sunto maybe check github.com/MoOx/pjax, discovered it recently
 
@crl
I am looking into the page now, As it is I believe I have pushstate working, just haven't added popstate.
Is popstate the part I am missing for being able to refresh, share, and navigate back and forawrd in my ajaxPage?
I do have httpRequest working, and I believe, pushstate also.
Pjax is unfailiar for me, and it seemed to be a lot of code there, maybe to much to get my head around..
 
crl
!!mdn pushState
 
What I will do, is watch more tutorials, my problem is alot of the tutorials I can find is for jQuery.
I have read on that page also, maybe it's just my coding skills that is not as good as it should be for doing this.
As I see it there, it is using go forward and go back.
So my thinking then is to use it something like this:
http://jsfiddle.net/6n1z8b6g/
 
4:34 PM
how do they show those graphs for commits/contributor for a project in github
 
ok to be a little bit clearer to where I am losing my understanding..
The state, of the popstate function, I am not quite understanding how to set, or define.
the developer mozilla side, doesn't give me a full example to understand, I just se a lot of code bits that I am not quite sure how to put together...
If anyone have a working example of ajax, using popstate and pushstate, with javascript, and not jQuery, I would be very happy to look into that :)
Anyway, thanks for pointing me to different sites, and for tolerating this noob-programmers, difficult questions!
 
5:33 PM
Any regs around?
 
whats regs?
 
A reg would know
 
@BenjaminGruenbaum What's up?
 
5:49 PM
Ello...
 
6:02 PM
@SomeGuy not much :D You?
 
@BenjaminGruenbaum ?
 
I don't know - weekend room is kind of depressing :D
BTW I was in two really interesting courses today - one on architecture of cloud OSs and one on distributed algorithms for supercomputers. This is exciting ^^
 
6:23 PM
lol kind of depressing is an understatement :P
@BenjaminGruenbaum speaking of courses my employer is going to pay for reactweek.com pretty excited for that
> distributed algorithms for supercomputers
sounds like a badass course
You guys see the Valve VR announcement?
Out holiday 2015
 
6:45 PM
How would u build a contact list like whatsapp ?
 
crl
@sunto I tried to do an example jsbin.com/fuzeyo
 
my solution
--- upload all contacts to server
--- save them as a different table called "contactList"
--- use the above list to make Many To Many associations b/w users
anything wrong with that ?
 
Guys, please, do you know how to create a link to the file on Dropbox? Something like this
Oh okay, jQ
 
7:25 PM
if I have multiple $(somefunction) calls, will they be called in order when the document finishes loading?
if not, how can I make sure a certain script has been executed before mine starts?
 
@darkyen00 yeah, the upload part privacy
 
@CSáµ  if whatsapp does it, why can't I ?
 
because you're better than that
 
so whats the better way ? if you can think of one
 
think of one
:)
 
7:29 PM
i can ofcurse send a gigantic Request to the server with just hte phone numbers
to sync contacts every time... but that just doesn't feels right.
 
it must be done once
at 1st run
 
what if you add contacts later ?
 
and everytime is started check for new numbers
^
 
NVM
the size of that request could be quite high
for instance in my contact list i have about 2500 emails/phone numbers
(thanks to facebook and google)
 
you wanted to upload in the 1st place, it's the same thing
 
7:31 PM
@CSáµ  its one time.
 
yeah, thanks
@darkyen00 same thing
 
now 2500 * avg_size will be a few kilobytes
hmm can be done
 
@darkyen00 Just show all local contacts and when a user tries to send a message to them, ask the server about that single contact
 
anyway, privacy matters
 
@copy can't do, the contacts has to do with pub_keys
and after first sync the app works without internet.
 
7:39 PM
Hrm
 
7:56 PM
@copy done.
i don't care about contacts at-all now.
:D you encrypt and send to server which re-encrypts and sends to receiver.
@CSáµ  @copy is that worse privacy :P ?
 
8:10 PM
Not worse per se, but it could give you a false sense of security, which is worse
 
earlier server was dumb it just used to relay messages if needed
(which was very rare)
encrypted comms used to happen p2p
 
I am not using node, I have a simple application,now If I want to use react-bootstrap I don't want to provide all the files in the lib, how do I select or optiimize??
 
m59
Is there something like nodemon that will run a command on file change?
without having to write a file, like gulp
 
@Anko 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.
 
 
Right yes, watchFile is a cross-platform wrapper.
 
@PDKnight are you trolling ?
 
You're right though, inotify is absolutely kickass
 
m59
I think inotify is what I need.
 
fs.watch and its File friend wrap it up for you nicely
Trust me, you don't want to ffi it
 
m59
8:27 PM
kinda looking for watch index.js run: tape test/*.js | tap-spec, cli
 
inotifywait is a nice shell wrapper
 
Then write watch, or install it npmjs.com/package/watch
 
m59
> watch <command> [directory] [--wait=<seconds>]
what's < > translate to when I actually write it?
 
Nothing
 
m59
Ohh
 
8:32 PM
Mouse battery dead, no batteries available FML
 
m59
Duh, the space in my command makes it mad.
What's the syntax to deal with that? watch (tape test/index.js)
 
Quotes
 
m59
and then there was peace
You rock, man. This is so much better =D
 
Enjoy. Also check out what Anko suggested.
 
m59
I could do the same thing with inotify, right?
 
8:37 PM
inotify is a kernel subsystem
So it's a bit like saying you'll implement http by using sockets
 
m59
fancy
 
Hello
 
@chillinpuma 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: Corona SDK ScrollView scrolled amount to trigger/fire event or element

bmlI have a "logic" type of question and I am using Corona SDK. I am using the ScrollView widget and was wondering if I could create a function or something to set a "y" amount that when scrolled to or past triggers/fires an event or element to fade in or out depending on the direction of scroll. ...

 
So, I'm liking Ionic so far :)
 
8:59 PM
Morning
@SomeGuy I keep getting Goodreads updates from you. I've had to unsubscribe. Stop reading so fast!
 
@monners Isn't he a bastard for reminding you what an unproductive reader you are?
 
@Zirak I'm reading, it's just nothing as profound as the titles Someguy chooses to read
Finished Hitchhiker's Guide, now I'm back on to my favourite zombie author
 
oh btw, I wasn't on any gadget over the weekend and have a dozen pings, also lazy, so don't expect replies any time soon
 
@Zirak You didn't get my message about the paternity results? TLDR; Congratulations!
 
@monners Thanks, mom! I always knew it was you!
 
9:08 PM
You know your Father and I would always love you, no matter what.
 
@monners speak for yourself.
 
@phenomnomnominal Not in front of the child!
 
...and dream of butterflies instead
 
9:27 PM
Does anyone know how to change window.location.hash on scroll?
 
m59
@Caspert do you know how to create a scroll event listener?
 
window.addEventListener('scroll', function () { window.location.hash = Date.now(); });
 
@phenomnomnominal Prolly best to debounce that bad boy too
 
9:49 PM
aye
 
10:20 PM
@Zirak it's ok, my pings for you were boring
 
0
Q: Corona SDK ScrollView scrolled amount to trigger/fire event or element

bmlI have a "logic" type of question and I am using Corona SDK. I am using the ScrollView widget and was wondering if I could create a function or something to set a "y" amount that when scrolled to or past triggers/fires an event or element to fade in or out depending on the direction of scroll. ...

 
@benlevywebdesign Your new account?
 
Anyone have any Ionic questions I might be able to answer? haha
 
@Zirak ^
 
10:29 PM
@chillinpuma search the questions
 
I do need to work on my reputation
 
you sure do
 
10:54 PM
How common are JS "wrapper languages" like CoffeeScript, LiveScript, TypeScript, etc?
I've never come across stats.
 
because it's hard to make statistics like this
just as it's hard to have statistics for programming language usage
 
Woot! I'm going to this year's CSSConf!
 
Out of curiosity, does anyone know of a social chatroom for programmers? like, in general?
 
11:07 PM
@Anko No idea about statistics, but I often see TypeScript and CoffeeScript in the wild. I've yet to see LiveScript.
 
@crl
Ah ok, but with hashes, is not quite something I want to use. But thanks anyway, I will look more into it :)
@crl
But from what I can see, it is common to use JSON for the popstate, I will watch more tutorial's on JSON, and advanced javascript ;) Thanks alot :)
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
 
11:30 PM
@Anko More social and less tied down by posting/messaging rules
 
sup
 

« first day (1597 days earlier)      last day (3345 days later) »