« first day (1724 days earlier)      last day (3228 days later) » 

9:00 PM
I want to know if it is affected by timezone
 
1436216425112
EST
 
GMT +0
1436216425771
 
user3119231
lol did exactly what you've said. check yourself how good it does work :D
 
What do you have?
 
Mine is PST 1436216458405, seems like it's the same across the board
 
Okay, and what do other people get for the following snippet, which returns midnight of "today"? (function(){var today=new Date();return new Date(today.getFullYear(),today.getMonth(),today.getDate()).getTime()}())
 
@FlorianMargaine i mean, does it tell the user why it fails the validation (like that you have to enter numeric values only, instead of just showing red display)
 
I get 1436166000000
 
Having a weird problem with AngularJS
 
@Jackson should be same for everyone
 
9:10 PM
Which is:
Error: ng:areq Bad Argument
Argument 'MainCtrl' is not a function, got undefined
But I don't see where. ng-app is "linked" and app.js has angular.module('linked'
 
MainCtrl is not being created. For one thing on line 107 there is no ending semicolon terminating the statement.
 
user3119231
        var cX = childs[i].offsetLeft-e.clientX;
        var cY = childs[i].offsetTop-e.clientY;
 
@DemCodeLines I think it is line 82: angular.module('linked', ['ui.router'])
Which might be redefining the module "linked"
 
Is there a shortcut to this? d > 0 ? d : 0
 
@MohammadKashif 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.
@MohammadKashif 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.
1 message moved to Trash can
@MohammadKashif Please don't post unformatted code - hit Ctrl+K before sending, and see the faq.
 
9:15 PM
@afonsomatos no
 
@Jackson You're right. Looks like I copied-pasted a duplicate and forgot to remove the original one.
 
complimentary cat picture
 
When using angular ui-router I understand that controllers are not instanced every time you navigate to a page that has been visited before. How can I execute something on page display for a controller that is already loaded previously?
 
@KarelG never tested, but should be, yes
 
@Maurize bro!!! you fixed the fucking blip!!!
how did you do that?
 
9:16 PM
@CodeWarrior Your question is "How do I execute code when the user loads a url"?
 
user3119231
@Neoares I did? For sure?
 
I guess...
 
1 message moved to Trash can
@MohammadKashif Please don't post unformatted code - hit Ctrl+K before sending, and see the faq.
 
user3119231
Where did you look? :D
 
the problem is that it's over groenlandia, not america
 
9:17 PM
@CodeWarrior i think u have the $cache service to avoid getting stuff that's already been loaded
 
or the arctic pole
 
@Cereal Essentially, yes. If I have navigated to a URL, and that page has loaded its controller, then I navigate back to it later I want to run something on load.
 
user3119231
@Neoares yeah, exactly. I need to get the position to north america. But it doesn't move with mouse :)
 
$('#bar').click(function () {
    $('#foo').slideToggle('slow');
});
I need Toggle On Hover In Desktop And On Click In Mobile
 
@Maurize are you moving the blip at the same time as the map?
 
9:18 PM
@CodeWarrior So you only want to run it when the page is loaded > once
 
user3119231
@Neoares I'm calculating blip position in the same event as mouse moves. you can inspect source code on my website if you want :) maybe there is a thing you want to improve :)
 
@Cereal Well I want it run every time the page displays. Currently it is running on controller initialization.
Was hoping for an ng-inView='RunThisMethod()'
 
I don't actually know anything about angular, I just thought you question was vague
 
Ahh, sorry.
 
Can you not just import a script from html and run it that way?
 
9:22 PM
Now I'm getting a posts is not defined on line 115
 
I would assume posts isn't defined
 
You can, but Angular is not really meant to run that way. Using ui-router all pages and scripts are loaded and then swapped out in the view on navigation without reloading the page ala Single Page App style.
 
@Cereal well...yeah
 
Ooooohh, Je comprend
 
@DemCodeLines on line 111 aren't u missing a "$"?
 
9:24 PM
Never mind, I figured it out.
 
or do u have an extra "$" on line 112
 
I had an extra $
 
@FernandoSilva Well the application is a single page app. I am not sure how the $cache would help me. I intend to keep the controller loaded. The whole idea with SPAs is seamless responsive navigation and loading. Having to throw away loaded data and retrieve it again is not the way I wanted to go.
 
I need Toggle On Hover In Desktop And On Click In Mobile
 
@CodeWarrior so since it's a single page app and you have things cached, wouldn't testing some of that cached data as being "filled" help you determine it has already been run?
@CodeWarrior and by cached you could read obtained, since you don't refresh the page at any point
 
9:27 PM
@CodeWarrior I'm assuming you've read this, but if not angular-ui.github.io/ui-router
 
It let's you > It lets you
 
@MuhammadUmer I won't use it, but nice :)
 
thanks
 
@FernandoSilva I have read that. If there were an option on the state configuration where after specifying controller you give it a method on that controller to execute every time the page is navigated to, that would be great. As it is, I navigate to the page once and the controller is instanced and initialized. I navigate away and come back and the controller remains in the same state that it was.
 
9:31 PM
is the code somewhere?
 
user3119231
@Neoares so I was thinking "Hey, just do +100px (blip width)", js answers: no.
 
On github
go to extension page
the link s there
 
@FernandoSilva Sorry, I thought that github.io link was from you, but actually it was from Cereal.
 
@Maurize You should read something about MVC
That'll make your life a million times easier
 
depends WHAT you read about MVC..
 
9:33 PM
Go on
 
some people hate MVC it comes with baggage of one ton that is only meant to sync up view with controller
 
@MuhammadUmer code is not terrible
 
user3119231
@Meredith thanks, but I only need this blips at their position to click on them and get some info. I will recieve gps syncro data from several android phones and simply want to display them.
 
hahah it's actually a draft, i was near giving up like 5 times
 
Ok
 
9:35 PM
@FlorianMargaine The problems i ran into one after another were: CORS, Xframe header, js based Redirect, and Mixed Content.
that's the kind of code gets written when you are just testing the possiblities. but once it starts working, im like well it works so whatever.
 
@CodeWarrior could you manipulate the browser history to determine if you're comming back? developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/…
 
@FernandoSilva Actually, I might be able to pass in a function with a function call in the controller in a resolve object.
 
Check this out too, Jquery based responsive layout. jsfiddle.net/0zdp20Ln
 
media queries are supported back to IE 9
 
try resizing viewing part
i know
but sometimes i just want to load data dynamically and not hand code it
 
9:40 PM
'hand-code'?
 
write media queries, this way it's easy to do somethings (ie prototype).
i can just write boxLayout('.box', 3);
3 columns
 
well suit yourself, but media queries are less work
 
i dont plan to use it for layout, but small data
 
you look at padding and all, that's nice
 
yea they give more control
jquery width() does that automatically
but for some reason
it's was going out of whack
itd go like this 380, 379, 369,378
 
9:46 PM
@MuhammadUmer well, you weren't doing things the right way
:-)
@MuhammadUmer you're supposed to communicate with the background process, let it do the http requests (since it has no CORS limitation), and let the background communicate back to the content script
I did an extension using popup, background, content script, and native application messaging, so I know how it is :P the API to do these communications is relatively easy to use.
 
10:01 PM
I got React to build static pages that are then 'mounted' by the client. Pretty cool. React is nice and powerful.
 
what do you mean by 'mounted'?
 
> There's way too much javascript here. While the development stack (babel, react, npm, etc) is modern and feels great, it ends up shoving a lot of JS at the browser to make it all work.
cc @ssube ^
 
@GarrettKadillak React will use the pre-generated markup, but will register events and is recy to modify the DOM and react to changes.
@FlorianMargaine yea.. I've been noticing that with my latest projects. They involve a big download and a lot of script
The react one I'm talking about at least renders fast because the html and css are static (At first).
 
@Luggage yes, I'm familiar with React. Where does the mounting part come into play
 
10:04 PM
but i have another SPA that's slow. It doesn't matter as much since it's internal and can be cached
@GarrettKadillak That's just the term when react is seeing html and attaching itself as opposed to generating the html itself
 
it IS generated by react, but on the server.
 
ok makes sense
I've heard nothing but positive things about react
 
I'm just learning React, myself.
but initial performance was not great, so I'm happy react could do this.
 
@FlorianMargaine Our bundle is 4.5MB
yeeeeep
 
10:06 PM
wow
 
much JS
 
very script
 
very ticking off
MissingSchemaError: Schema hasn't been registered for model "Post".
Use mongoose.model(name, schema)
 
!!doge js,script,4.5MB,butts
 
          wow
so js
              very script
                             such 4.5MB
many butts
 
10:07 PM
var Post = mongoose.model('Post');
 
@SomeKittens is that minimized?
 
@Luggage No, and it also includes sourcemaps
 
then that's not as bad.
 
@SomeKittens ouch
 
I mean, for a public site, it'd be way too big
but in-house apps.. that's acceptable. tell your employees to wait for it to load for a few seconds everytime the assets change.
basically auto-update
 
10:09 PM
@SomeKittens I hope your mobile site doesn't use the same bundle
 
@FlorianMargaine It's a tool for devs, we don't particularly care about mobile
 
@FlorianMargaine You do need to add permission for even background pages, and once you do have permission then it also works for content script pages.

that only took care of CORS part.

Mixed Content
 
I'm at 2.2mb minimized. 3.5+ unminimized.
 
Also in private beta
 
Mixed Content got solved mostly due to luck
 
10:10 PM
paste this into Chrome latest: chrome-devtools://devtools/bundled/devtools.html?remoteFrontendUrl=chrome-devto‌​ols://devtools/remote/serve_rev/@198240/inspector.html&loadTimelineFromURL=http:/‌​/temp.paulirish.com/timeline-new-reddit-load-long-wait-for-images.json
 
@FlorianMargaine even for mobile, if it's an internal app and it set to cache properly
 
(from the Paul Irish reddit thread)
 
my JS has a hash in the name and it set to cache. Only a tiny tiny bare html file is d/led most of the time
 
iframe has sandbox attribute that allow mixed content
 
most visits you already have the 3mb d/l
That's why I think of it as an auto-update, not a slow load.
 
user1596138
10:13 PM
Hey go ahead and bitch me out for vamping this instead of googling lol
 
user1596138
How do things like Fiddler actually work? How would one create a local proxy that intercepts all data like that using Node?
 
Fiddler is either a proxy or a network interface, I forget which
 
I started doing that in lisp: github.com/ralt/aeon
@Luggage proxy
 
right, it's wireshark that's the interface.
So look up a socks proxy. that's all it is.
 
user1596138
@Luggage Wireshark is a different thing?
 
user1596138
10:14 PM
But yeah
 
also, fiddler installs it's own ssl trusted cert if you have it reading ssl trffice
 
user1596138
Like that
 
user1596138
@Luggage Yeah
 
user1596138
I want to do the same thing it does
 
wireshark is for all network packets, fiddler is http specific
 
10:15 PM
@Jhawins basically, use net to open a server
 
that's why fiddle gets away with setting up an http proxy and doesn't need to pretend to be a network card
 
listen for incoming TCP traffic, get the http requests
@Luggage yup
 
user1596138
Ah
 
You have ot tell browsers to use your proxy somehow. I don't knwo that part
 
@Jhawins then in your browser, use your server as a proxy
 
user1596138
10:16 PM
@FlorianMargaine How do you do it without setting it as a proxy in your browser
 
@Luggage 127.0.0.1 and port you choose when running net.listen()
@Jhawins you can't
 
user1596138
@FlorianMargaine Fiddler does.
 
user1596138
Charles does.
 
user1596138
Wireshark does.
 
user1596138
It captures all your network traffic... Not just from the browser
 
10:17 PM
you can tell windows abotu the proxy then IE and chrome use it automatically for all traffic. I don't know the linux equivalent if there is one
 
user1596138
Ah so these programs are changing the configs when they're opened and reverting them when they're closed?
 
or just proxying all the time..
 
user1596138
Doesn;t seem feasible to me :/ if Fiddler crashed your browser would be poking a dead proxy?
 
sounds like it, yes
 
unless the proxy is a separate simpler process
 
user1596138
10:18 PM
It's ALL traffic..
 
user1596138
It will grab curl requests?
 
user1596138
You guys are probably totally right! Just I'm having trouble understanding what's going on
 
not sure, I thought you'd have to change your proxy settings
so maybe it changes the OS proxy settings?
 
fiddle does it for you.
 
10:19 PM
yea, OS settings
 
user1596138
I want to believe that there's another thing going on..
 
applications have to LOOK for those, but IE and chrome do so automatically
 
user1596138
That would be god awful though? What if the program doesn't manage to revert the settings and it dies?
 
i've never had a problem
 
user1596138
Is there a default local proxy that gets used and then it is just overriding it while it's running?
 
10:20 PM
fiddler has been rock solid for me in the past. I never had reason to question it.
if the UI ever did crash, ti didn't break my browser
 
0
Q: MissingSchemaError: Schema hasn't been registered for model "Post"

DemCodeLinesI have been following the tutorial on MEAN stack (https://thinkster.io/mean-stack-tutorial/) and have stumbled on a problem. When trying to do npm start, I am getting an error message, specifically the following: C:\Linked\linked>npm start > linked@0.0.0 start C:\Linked\linked > node ./bin/www ...

 
user1596138
@Luggage I'm not worrying about my browser trying to poke the proxy... I wanted to recreate this for something and so I need to understand what's going on in the background.
 
ah
 
user1596138
I'm saying that that just can't be how it works.. Cause it would create such a big problem.
 
user1596138
@rlemon ?
 
user1596138
10:22 PM
You know these things lol
 
user1596138
Oh
 
user1596138
It's lower level than the browsers, but yeah that's how it works.
 
user1596138
Basically..
 
user1596138
Thanks @Luggage
 
user1596138
!!afk home time]
 
10:24 PM
They could also hook into standard library on a high level
Malware does that
So that's not very likely
 
Did SO just crash?
No styling
 
it's the new minimalist theme
 
it works for me
 
Sexy
 
10:29 PM
@GarrettKadillak It doesn't look like that image?
 
nope
internet problem maybe?
 
looks fine to me, too
 
everything else is working for me, idk why SO is broken
 
sample size of 3, 66% working
 
Microsoft Edge is working fine. Chrome's broken :|
 
10:33 PM
Just hit inbox zero on GH, huzzah!
 
@FlorianMargaine That's pretty ghastly performance. I'll have to revisit that.
 
@SomeKittens whenever I see GH, a little part of my brain goes "GUITAR HERO!?" and then goes "oh."
 
man, I miss guitar hero
 
I miss The Game
:c
 
@SomeKittens they're making a new one and I bet it will suck
 
10:37 PM
guaranteed it will suck
 
@phenomnomnominal of course it will
also, all the friends I played with/against are far, far away
 
@CapricaSix lol, u badass
 
@SomeKittens I still play rocksmith a bunch though. It's almost replaced actual practice for me
 
Does it help at all?
 
10:39 PM
Yeah my dexterity has got a bit better from the arcade games
plus it's an excuse to learn songs that I probably wouldn't otherwise
 
why is their entire website a form? rocksmith.ubi.com/rocksmith/en-us/home
 
But really tho, help on that question would be appreciated.
I can't figure out what the heck is wrong
 
10:55 PM
Getting a weird 409 error. What the heck is that?!
 
conflict
 
with what?
It throws that on the bootstrap cdn
any way to fix it?
 
Actually, it really reminds me of bloodrizer.ru/games/kittens
 
11:43 PM
clicking <span class="glyphicon glyphicon-thumbs-up" ng-click="incrementUpvotes(post)"></span> decides to respond with 500 error.
 
@copy loved your haskell link yesterday btw
 
I like all of my links
 
11:55 PM
@GarrettKadillak Because it's built on webforms
A dinosaur of a framework that .NET used to use
 
I figured it was .NET @monners
 
.NET is the worst
 
/me owns a .net domain
/me cries
 
noooooooo
 
*wonders if any beginners today are learning .NET*
*wonders what they would be like o_O *
 
11:58 PM
.NET is quite nice
dunno what you guys are talking about
 
@KendallFrey Sure, as long as you're not using webforms
 
well obviously
or winforms
 

« first day (1724 days earlier)      last day (3228 days later) »