« first day (2244 days earlier)      last day (2710 days later) » 

7:00 AM
MVC in vanilla? i.e. w/o angular or react or some framework?
 
@Julix Yes
 
@FlyingGambit just took a peak, makes total sense. just using a bunch of class like objects and their methods... - sure. -- but why?
 
@Julix Just having a strong urge to learn it
 
@FlyingGambit do you already know Angular or React or vuejs.org ?
 
It's always useful to know what problems the frameworks solve for you
 
7:18 AM
^
Even if you don't have time to learn something, learn what it can do for you.
 
How to create a vr app using javascript?
where to start from
 
google
 
user3119231
good morning knights of Monty Python and the Holy Grail
 
ni
 
Bring me a shrubbery!
 
user3119231
7:31 AM
@FilipDupanović this is for personal project, I already have a job as se. btw your flex box method (jsfiddle.net/qggm5mj7) isn't working in firefox
 
Hardware people
how do I get an LED leg size pin out of
a hole almost the same size :/
 
use another LED leg size pin
 
widen the hole
 
user3119231
you can also take a driller with the same size and drill the hole free - is probably the cleanest and best solution
 
@ivarni not an option
Girlfriend has one of those ^
If i widen the hole it'll destroy the headset
 
user3119231
7:33 AM
powerdrill it
 
The pin looks something like this
 
A $799 headset?
 
is there no tool
for that specific task?
 
user3119231
wait one moment. the more important question is: you have a girlfriend?
 
use lightsaber... :P
 
7:35 AM
@Maurize lol
why is that strange?
I'm shrek remember?
 
I've seen cheaper laptops :o
 
user3119231
Ah fiona, I got it
 
xD
But seriously
I don't want her (and indirectly me) to spend $400 just to get the thing fixed
 
user3119231
Be careful and you're fine and probably her hero
 
7:36 AM
@ivarni nowadays: many choices of cheaper laptops... some okay ones. some great used ones :D
 
@Maurize I thought of using something like that
 
@Maurize are they drill bits? lol
 
but the pin looks like this
see the size of that thing ?
The hole is also visible
I was hoping LED geeks might have some trickery
 
user3119231
@littlepootis 1mm. Should totally work for him
 
The hole is already 1 mm
The craziest Idea I had was to vacuum it out
 
user3119231
7:40 AM
 
But I think it'll desroy the driver
 
use a tiny vacuum
 
@littlepootis that will be worse
So far the funnniest Idea I've had is to use a really really really
thin wire case
like
take the wire out of it
and then try to jank the pin into this
prolly by heating the wire case a little bit
Dear lord this cable is crazy heiraudio.com/headsetacce/28.htm
 
ola, that reminds me of that hearing wearers for hearing aids :P
 
r u sure it'll be 400 bucks to get it fixed?
and if so isn't that still cheaper than ruining it yourself and spending 800 again?
 
user3119231
7:47 AM
I can fix it for 100 bucks
 
> how do I get an LED leg size pin out of
a hole almost the same size
 
what do people use these things for?
 
@Julix we asked them
 
There are tools for that. But it depends of how the led is placed. It's sometimes folded
 
its not folded
its just the pin
 
7:48 AM
listening to music?
 
heiraudio.com/headsetacce/28.htm @KarelG thats the pin
its a non conventional jack
its just that i don't have any grip on the pin
 
@Maurize what if you break it trying?
 
user3119231
Is like asking: What if you fail landing on moon
 
@Julix Yeah
but it makes no sense
to spends $400 just to yank a pin out of something
where the only problem is no-grip
 
@Julix he'll start a fundraiser
 
user3119231
7:49 AM
^
 
Just saying, making an offer to fix something for a price doesn't mean much if you don't have some kind of guarantee that if you break it you'll still deliver.
 
I mean you won't send your iPhone to Apple if there is a piece of paper stuck in the Earphone Jack ?
 
that's what the 400 is for, maybe, in case they can't repair it :D
 
@Abhishrek flush cutter ?
 
how did the pin get in there exactly? if it's a fault on the product shouldn't it be covered by warranty of some sort?
 
7:51 AM
Dunno that story. Probably dropped or something
 
user3119231
@Abhishrek Woman.
 
and she contacted them to get the ~400 quote
 
hi all, anyone for angular2 advices here?
 
its just a little too wide
 
@Abhishrek maybe, if its their fault that I stuck it in there (i.e. bad design leading to the need to constantly clean the jack) - or something like that :D
@Julo0sS I just started Angular2 - how big is the question?
 
user3119231
7:53 AM
or try it with a tiny needle
 
take a normal needle and sharpen the shit out of it
 
@Maurize niddle won't be able to grab
the pin broke off and is stuck inside the jack
 
attach a magnet?
 
@Julix OMG D:
 
user3119231
7:54 AM
@Julix the material isn't magentic enough I think
 
abi, ya know that I use my swiss knife for that :P
 
@Abhishrek pin broke off sounds like bad product... why did it break?
 
Why didn't I think of that
 
it has a small scissor
 
@Julix need to ask
 
7:55 AM
very thin. just close it (before cutting), and flip it
 
@Julix Well, I'm learning by now, and am a bit confused about the way angular handles the forms... Mixing model & template ways... I opened a room and posted some code, I'd like someone to check it and tell if it's consistent or if i'm just doing things wrong... The tutorial I actually follow is good but confusing .. (to me)
 
check for that "handyman" knife
 
I'll try these
if my wire idea fails
the wire shell might just do the trick
 
8:07 AM
Hey I'm thinking about making a couple book series objects - and a couple book objects from different series
//First I started with just a book:

function book(title, author, yearPublished, message){
	this.title = title || "unknown";
	this.author = author || "unknown";
	this.yearPublished = yearPublished || "unknown";
	this.message = message || "It's empty";
	this.readBook = function(){
		console.log(this.message);
	}
};
but then I realized that repeats author unnecessarily if the author would be the same across many books - so I'd like to create the new book object in such a way that it inherits stuff from the series it's a part of, as well as provide the relevant info in the constructor... something like "var boob = new book("JS noob to boob", 2025, jacksJSSeries);" --- here i'd e like passing the series somehow,...
but I don't think I've seen that before and wouldn't know how to make that work. like this it would just be another object in the object (if I accomodate for that in the book constructor), but I want the properties (author etc.) of the series to be available to the books too... inherited I guess. I feel like the word prototype belongs here, but it's been months since my first brief encounter with those things. Is that the right direction though? hmpf
 
user3119231
"JS noob to boob" - A javascript book series for bbws.
 
8:22 AM
"JavaScript: From Journeyman to Exhaustion. Tome 1 of NaN"
 
also
@Julix you can now use Classes ;)
which book is that?
 
err, I hope that that book stuff is for Node.js
 
Also
this.readBook = function(){
    console.log(this.message);
}
is an extremely outdated way of doing this
 
it also leads to spaghetti code
 
not just that
each instance of the class has its own version of function
 
8:28 AM
true
 
that is pretty cool though
if you are doing something cool with that
like something really cool
which doesn't exist
 
@Abhishrek thanks for the feedback - I feel like I should know that already, may have once known. frustrating that getting it once doesn't mean it will stick forever - unless you really get it (i.e. use it a bit)
so what do I do instead of that this mess?
 
Meet ES 6
 
@Abhishrek made one up that I thought would be funny enough to maintain attention throughout those long paragraphs of mine :D - I'm really tied, even though it's only just past midnight. -- final week of classes might be getting to me
 
class Book {
    constructor (title='Unknown', author='Unknown', yearPub='Unknown', message='Empty') {
      this.blah = blah;
    }
    readBook () {
        console.log(this.message);
    }
}
where this.blah is this.x = x; for each
 
8:33 AM
@Abhishrek did that briefly. but you said extremely outdated, so I'm guessing there's a better way to do it within ES5 too, right? - I do want to learn ES2015 (and did recently zoom through a quick online course, not that I remember all that much), but this course is intro to js, so I want to keep it close to what he's likely to teach
 
function Book (a,b,c,d) {
   this.a = a;
}
and then
Book.prototype.readBook = function readBook () {
    console.log(this.message);
}
 
would i use a capital B even before the class word existed (i.e. ES5)?
 
Yes
 
@Abhishrek cool. so when you said extremely do you mean "since ES6 is now widely supported" - or do you mean within ES5 I could have done better?
 
ES6 is supported everywhere and this.readBook = function () { } is bad.
 
8:36 AM
WTH
 
@KarelG ?
 
there is a chat feature that our work uses (slack). It has crashed, but refuses to go away
i used taskkill
 
search for a deamon
 
but that app window doesn't go away, and is on top of all app windows
there is no process leading to that -.-
 
@KarelG tried turning it off and on again? lol - so crazy how often that still works; i.e. restarting computer
 
8:38 AM
it opens on the same spot as that window. But when I move it, a second window appears
that is functioning. But the frozen window keeps being there
it even appears at restart :P
 
@Abhishrek how about this:
 
gotcha fiddle with processes
 
Ok, capitalize Book
 
Book.prototype.readBook = function(){
	console.log(this.message);
}
 
I'm not sure if it'll give you the function name in callstack or not though
in chrome it will. so who cares :D
 
8:41 AM
when I iterate over the Book object with for in it's there, but with keys forEach it isn't
 
nvm found the culprit
second screen
it has it own process and kept track of slack.exe
 
@Julix its not a key :P
 
isn't readBook the key for the value function-object?
 
no
 
no
 
8:42 AM
you just call readBook on your instances like method calls
 
but it was the way I did it before, right?
 
yep
I forgot what its called ;_;
 
Book b = new Book(...);
Book.prototype.readBook = function(){ foo }

b.readBook(); // does foo
 
I see, so it's better not to have it as a key? because otherwise each object would create its own copy of it, but it doesn't need to because nothing new is in it --- who knew spending the day in chat was gonna teach me so much :)
 
adding args? just add it in function
 
8:43 AM
o/
 
@BenFortune \o
 
Book.prototype.readBook = function(arg1, arg2) { ... }

b.readBook(myArg1, myArg2);
you can add defaults
ect ect
 
@Julix basically each object has a prototype when you call readBook it checks for property in its prototype and then its parent and so on.
so..
 
and if it wasn't created with a constructor function it's prototype would just be the Object prototype?
 
Object.keys(Book.prototype) will have 'throwUp'
Yep
 
8:46 AM
alright. but what if I want something to inherit from multiple things (in this case series (author, series title) and book (book title, year) ?) -- is that a thing in ES5?
 
That makes no sense
and multiple inheritance is poison
 
can I += prototypes?
 
use Composition
 
@Abhishrek that sounds like a cool word. alright, I'll bite. (see you in a couple minutes, after some googling :D )
 
you can kinda just do p3 = Object.assign({}, p1, p2)
but it will override the function name on collision
and then satan wins the world
 
8:49 AM
alright first, all the things I saw were "Composition over inheritance" - lol -- rather than a more neutral comparison word like vs
 
<- I still find it confusing how virtuals work in Cpp
 
very powerful feature
 
"But that means that your objects will have a ton of functionality that they don’t use, so you end up with a Gorilla/Banana problem — you request a banana, but you end up with a gorilla holding the banana and the entire jungle with it."
 
user379888
Hey guys. How hard should it be to integrate Facebook analytics on a website?
 
user379888
Seems like its as easy as embedding Google analytics.
https://developers.facebook.com/docs/analytics/quickstart-android
 
user379888
8:55 AM
I need to do this for a company and bill them for my task.
 
@FahadUddin just check "web" link on that page
 
//this is multiple inheritance in JS, right?
function A(){}
function B(){}
B.prototype = new A;
b = new B;
 
Hi Guys, I found a strange bug in my Angular Application. Sometimes it takes a reload in some pages for the data to load. Even though the data is getting loaded in to the object, its not getting displayed until I do a manual reload. There are no errors appearing... Any idea what might be causing the issue?
 
@KarelG awesome link, thanks! :)
 
user379888
9:04 AM
@KarelG: The client also has mobile apps.
 
ah well... you asked "on a website"
but you've figured it out eventually
 
Hello world!
 
@ArslArsl Welcome to the JavaScript chat! Please review the room 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.
 
@ArslArsl tskill
 
Please help me on my React code. I have a controlled component with a form with 1 text input. I want to use refs to set focus on input field after submit. Should I keep my component 'controlled' and use refs? stackoverflow.com/questions/41009659/…
 
9:13 AM
@ArslArsl I wonder if I could write that from my console... probably. -- I'd have to target textarea with id="input" and then the button with id="sayit-it" to send.
Hello world, from Console.
no way! that was fun :D -- followed by realization of how late it is + procrastination guilt --- thanks for the conversations! bye for now :)
 
@ArslArsl You have an answer.
 
document.getElementById("input").value = "Hello world, from Console.";
document.getElementById("sayit-button").click();
 
user3119231
wat
 
9:30 AM
@Julix thank you.
 
@Julix syntax error
that click() is jQuery function btw
either use onclick or better addEventListener('click', function() {...}
 
Frog
 
9:47 AM
@KarelG i think she wanted to trigger click, which is valid
 
oh keh
 
Isn't it better to just call the logic bound to the click event than to simulate an actual click?
 
what if you need the target ? :)
sometimes event listeners are hooked on elements with specific class names
 
user3119231
@KarelG LMAO
 
9:55 AM
Pretending that the used did something just doesn't make sense IMHO. Also has a risk of triggering accidental side effects. I'm in favor os separating the "wiring" from the actual logic.
 
Hello why the ajax not loading the svg elements from one page to another?
@Maurize
 
@Maurize huh, that's creepy, looks identical to me on FF
 
oh lol, there's no Haskell room
and for some reason the school's computer auto capitalized Haskell
or it doesn't
wait wut
 
@towc Well, there is, but it's not for chatting, it's purely functional
3
 
application is working fine in chrome browser while same url inside webview is not working
any idea ?
 
10:00 AM
well played
 
@erum something like cordova?
 
gg @OliverSalzburg
 
Damn, now I started my day on a high. It's downhill from here :\
 
good haskell graphics extensions?
 
no actually i created native android app and inside webview i load url
@SvenvandeScheur but its nt working same as chrome browser in app
 
10:04 AM
or I should probably spend that time finally learning webgl
again
 
but its nt working same as chrome browser in app
 
@erum Did you add the Content-Security-Policy meta tag?
 
no i did not add .... may i need to add this ?
 
@Erum Have you enabled javascript? It's disabled by default IIRC
 
10:07 AM
Also, not every Android that has Chrome has a Chrome-based WebView
 
I do
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
 
So "not working" is a pretty poor error description
 
@BenFortune already added
 
It may be that Content-Securty-Policy blocs the request as it may not be whitelisted
 
What's not working? Have you done any debugging whatsoever?
 
10:08 AM
what do you guys recommend for handling polyfills with webpack?
the ProvidePlugin and import are the two popular ones it seems
import "whatwg-fetch"; over ProvidePlugin({ 'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch', })
 
Whenever possible, I just import whatever I need on runtime, no need to hassle with webpack configs for that
runtime means in code, get bundled anyway
 
yes did debugging but JS is not working @BenFortune @SvenvandeScheur
 
> not working
What's not working?!
 
@SvenvandeScheur so like this?
 
Warnings, errors?
 
10:10 AM
@bitten, works form e
Also makes it more easy to track the usage of specific functions
 
yeah fair enough
and with fetch, it doesn't give the window.fetch example, just import 'whatwg-fetch'
 
user3119231
@FilipDupanović let's share a screenshot
 
do you know if would i need to do if (!window.fetch) { .. }?
 
Is it necessary to use observer pattern to implement mvc using vanilla js ? as shown here alexatnet.com/articles/model-view-controller-mvc-javascript ?
 
@Maurize here's me on FF snag.gy/04r7ov.jpg
 
10:13 AM
any of you guys work in office ?
 
@KarelG honestly I just got to the onclick part and wasn't sure what function to attach, but then figured .click() would likely work, so I tested it first. stackexchange's chat is obviously already using jQuery, otherwise it wouldn't have worked.
 
user3119231
@FilipDupanović and this isn't correct. It should look similiar to this:
 
user3119231
 
oh, that's not what I went for with my example, I must have misinterpreted
I thought you wanted the lower two columns to stretch
 
user3119231
No I wanted the two columns to fill the remaining space to the top. At the moment I have them "behind" the profile picture. The best result would be the two columns directly under the profile picture -> white/blank space from left and right side of picture
 
10:18 AM
@BenFortune No way! I thought I was using jQuery to be honest :D - lol that's plain JS? Beautiful :) -- am a "he" though.
 
user3119231
@RAJMOHAN random ping and too less information
 
user3119231
@Mathematics yes.
 
@Maurize they fill in the space that remains after the cover snag.gy/cCf6mh.jpg
 
yeah, SE chat uses jqeury
 
user3119231
@FilipDupanović and profile picture? where is it? :D
 
10:19 AM
well, it's pretty slimmed down, I hope you can have fun with it; there's a nice game for sharpening your flexbox skills www.flexboxdefense.com
I didn't know what would be correct, to have an absolute image relative to the cover or to the container of the two columns :S
a spur of halting in a moment of indecisiveness :D
 
wtf is it with these snaggy links?
 
because snaggy is dope!
 
I disagree
 
user3119231
 
mhm, you'd want to have whitespace around the image?
 
user3119231
10:22 AM
this is the plan, for your understanding
 
user3119231
only left and right
 
user3119231
There is the problem of css
 
@SvenvandeScheur thanks
@OliverSalzburg me too, sharex is where it's at
8)
 
javascript code is not working @BenFortune
 
btw this is the guide I started with css-tricks.com/snippets/css/a-guide-to-flexbox, I don't know if there's something better today
@bitten URL pls o/
 
10:24 AM
@FilipDupanović getsharex.com
 
@BenFortune OliverZalgo
 
@bitten I have to download and install something... nooooooo
 
oh it's your cursor LOL
 
Been using sharex for a couple years now, it's great
 
10:24 AM
Web APIs is where it's at o7
 
just posting to my server
 
@BenFortune yeah i love it, i like how you can upload anywhere
 
eh sharex is being published on steam too (googled it)
 
and left click on the status icon prompts a cropping screenshot tool
(y)
 
@bitten ctrl+f1 for me
 
10:25 AM
ahh, never thought to map it
 
what is with all of you, I thought we all <3 the web here, <3 it mad like
 
I made a screenshot uploader on my phone too
 
@FilipDupanović it's very nice, open source too so
 
Listens for screenshots in a directory, uploads it and copies the url to my clipboard
 
@BenFortune ah that's so good, i'm always having to clear out my screenshot folder as it takes up the majority of space >.>
 
10:28 AM
@bitten Erm, I think we all agree that tinypic is the image hosting service to be
 
i´m generating a pdf and return it as base64 string from a class. But it seems the stream process is async. How can I create a callback method for this? jsfiddle.net/6smq3wby
 
oh, Chrome history became all sexy like all of a sudden
 
@FilipDupanović Neat
 
@OliverSalzburg ^.^
 
@BayLife Promises
 
user3119231
10:30 AM
I'm using greenshot. It's okay.
 
i thought about this. All tries to create one for this did not work. Do I have to modify the class or just do some shit when I call it?
 
Greenshot is sexy
@BayLife Both, I guess
 
shit
 
Like that kinda
Maybe with error handling
 
Or if you want to stick to the callback, jsfiddle.net/6smq3wby/1
 
user3119231
@AnkitaKashyap you know that you asked 3 mins ago?
 
Did you just posted your pw on SO?
 
ah great. Thank you both!
 
@AnkitaKashyap You should debug
 
10:35 AM
@SvenvandeScheur Use it to log into no-reply@myhost.com
@BenFortune Neat. Mine's still the old look
 
user3119231
Anyways, to prevent him from posting passwords in future, I made an edit.
 
@Mathematics offices, co-working spaces, couches at strangers, cottages, tents, trains, buses... if we move our tools to VR, I'll do it over a slackline
@Maurize like disa? jsfiddle.net/qggm5mj7/1
 
@Maurize: i debug not able to found the sol.. that hwy i am here
 
user3119231
@FilipDupanović profile picture not in title picture - like in my plan. :)
 
user3119231
Your fiddle can be realized with plain css
 
10:42 AM
so it has to be absolutely positioned about the cover and columns?
 
user3119231
@AnkitaKashyap just be patient
 
@Maurize :) Sure
 
user3119231
@FilipDupanović kinda. My question was the optimal way to get the result
 
user3119231
If you do a absolute position the profile picture will leave blank space to the bottom
 
let's see what the pixels give me
 
10:48 AM
@BenFortune backspace to go back.. love it
i have the same extension
such a stoopid change
 
hmm, this won't work if you scale the cover
 
@FilipDupanović I agree snag.gy is very cool
 
user3119231
@FilipDupanović is a hard task, huh?
 
user3119231
I have a new plan: create 3 columns for the row for the profile picture. left = 50% - pp.width / 2, middle = 200px, right = 50% - pp.width / 2
 
user3119231
then make the overflow of the middle div visible and create an image in there
 
10:52 AM
@Maurize ok, this positions the profile image nicely if the cover scales jsfiddle.net/qggm5mj7/5
 
user3119231
@FilipDupanović yes, the same result can be achieved if you set pp position: absolute. exactly the same. but thanks.
 
I did have to at the end to dock it to the bottom of the cover befor translating it
 
user3119231
modern web design. I'm on this and will tell you if I found a solution
 
guys. look at this thing.
32
Q: Add a language to a polyglot

ais523This is an answer-chaining challenge in which each answer builds on the previous answer. I recommend sorting the thread by "oldest" in order to be sure about the order in which the posts are made. The task The nth program to be submitted must run in n different languages; specifically, all the ...

2
 
@Maurize here, last bit, scale the cover relative to the window height jsfiddle.net/qggm5mj7/6
focus on the (.)(.)
 

« first day (2244 days earlier)      last day (2710 days later) »