« first day (2381 days earlier)      last day (2560 days later) » 
00:00 - 21:0021:00 - 00:00

12:34 AM
 
lol
 
Hey guys. Would you mind kicking OakBot again? xD
 
/unsummon
 
I need to see what his HTML looks like when he's kicked.
I'm logged in via the browser.
 
I can't kick someone who hasn't spoken
 
12:47 AM
Javascript is poop.
 
Ty xD
 
 
1 hour later…
1:51 AM
@Mosho TF2 is alright that's the only one out of those that I've played
 
 
1 hour later…
user1118051
3:12 AM
hey guys
 
user1118051
i have a question on react
 
user1118051
for this code class App extends React.Component where can i find Component base class in the react source code?
 
hi i'd like to know why my image url cannot be found on my server
I stored the images relative paths on my db
as varchar 250
 
 
3 hours later…
6:04 AM
Hey if anyone could help me out with this question I would appreciate it!
0
Q: JavaScript Close Menu On Click

natem1270I'm very new to JavaScript and having some trouble trying to get the desired result. I've built an off-canvas menu based on the w3 school's example. I want the user to be able to click the hamburger glyphicon to close the menu when it's open in addition to using the "x" button. If there is an ...

 
 
4 hours later…
10:34 AM
nvm
 
11:09 AM
0
Q: How to add image path in user profile using multer-gridfs-storage ,express, mongodb

its mebelow is my file upload code /** Setting up storage using multer-gridfs-storage */ var storage = GridFsStorage({ gfs : gfs, filename: function (req, file, cb) { var datetimestamp = Date.now(); cb(null, file.fieldname + '-' + datetimestamp + '.' + file....

 
 
1 hour later…
12:36 PM
Can someone please help me with the following question: stackoverflow.com/questions/43564930/…
 
@Anoniem Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
> getElementsByClassName
Elements
that method returns a nodeList, not an Element.
use .querySelector
 
12:52 PM
Okay, I have changed and updated the code with .querySelector, but unfortunately it still doesn't work.
 
1:08 PM
De console gives me the following error: TypeError: document.querySelector(...) is null
De = The*
 
User error
 
2:01 PM
Hey guys
 
Hey guys, does anyone know Parse Server?
 
@konyv12 Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
I configured mailgun with Parse Server, I even get 200 status code back, but I don't get the email. What might be the problem?
 
Does anyone know how I can use a foreach loop to make function calls inside a Promise.all?
 
"inside"?
 
2:12 PM
return Promise.all([
//for loop to input function calls
]);
I'm not really sure how to exsplain what I mean
 
So you just want to make an array (of promises) and then pass that into Promise.all()
 
but I have a load of sources that I need to call into my requestArticles function and before I've simply wrote those into the promise all
my other function requestArticles returns a promise
 
Do you know how to make an array? That's all you are doing there. There is no [ for loop ] syntax. You .push(0 to an array in a for loop
 
is it possible to make an array using a map with [this.requestArticles("")] etc?
 
or use .map()
of course.
That's what map() DOES. :)
 
2:15 PM
Thanks ^_^
worked perfectly! completely over thought that
 
2:37 PM
Webassembly rocks
Have you guys tried writing stuff from scratch yet?
 
I recently bought a couple of butterflies to do just that
 
2:59 PM
> A 12-year-old boy attempting to drive across Australia solo has been pulled over at Broken Hill, 1,300 kilometres into his journey.
 
<3
 
Anybody familiar with redux here? I'm wondering why this simple example is not working... jsfiddle.net/g0L9c270/1
 
3:19 PM
When trying to do

$('body').append("<p>cmon...</p>");

It displays the wholestring with the p tags
on the page it becomes "<p>cmon...</p>" instead of "cmon..."
I even copy-pasted from the jQuery docs, and got the same problem
 
3:40 PM
I just tested this in my console in Chrome 57.0.2987.133 on Windows 10 Creators update, and I can confirm it does return false. Why was this Docs change rejected?
http://stackoverflow.com/documentation/proposed/changes/137560?draftId=122931
 
@john store.subscribe is a function
 
@Shmiddty thank you! My fault for not reading the docs.
 
Hello world.
I'm asking here because it looks like the most relevant room, but this is actually about JSON, not JS. Somebody on a SE chat told me about a program that I should have used to manage my JSON data so that, if it ever turned out that I am using a suboptimal architecture, I can just use it to move all my entries into a better order (or something like that). It was a three letter acronym (that starts with M IIRC) but I can't find out that conversation. Perchance anyone here knows what I am talking about?
 
Guys what is the main benefit of creating webpages using webpack?
like injecting all of the images, CSS, via JS?
using different loaders
 
3:56 PM
@ZahidSaeed Maintainability.
 
@MadaraUchiha How?
Can you please explain it a bit?
 
@ZahidSaeed Let's say you have jQuery on your page
 
okay
 
And let's also say you have 10 different jQuery plugins
And let's also say that you have your own script that should run with jQuery and the 10 plugins
 
hmm okay. So?
 
3:58 PM
You need to manually add those 12 (at least) script tags to your HTML page, you need to remember the order of the script tags, because if one plugin requires another and you include it before, things will break
 
yeah
 
With webpack, you can only access dependencies by importing or requireing them
So the ordering problem is solved.
 
Hi guys
 
Also, you can get a minified bundle, etc.
gtg
 
Ordering problem is solved?
But how?
What if plugin 2 depends on plugin 1?
and I import plugin 2 first then import plugin 1?
@MadaraUchiha Minified bundle is 1 thing, i get that
 
4:13 PM
I know you can find a rejection of a promise, but how do I find a resolve? or rather an okay inside of a promise all
I can't find any examples of being able to handle each individual resolve
0
Q: Handle promise resolves indvidually in promise.all()

li xThere is a lot of information on how to handle errors when using promise.all() using catch but what I'm trying to achieve is to handle every time the a promise inside of this promise.all() resolves. The reason I'm trying to do this is because I am attempting to setup a custom progress bar in cons...

 
4:32 PM
You can use Promise.race() to return every time one of the promises completes and build a progress bar off of that.
 
Anybody here wrote a hashset?
 
I ate a hashbrown. Does that count?
 
nope
@Luggage How does this look
```
export abstract class Transformer<InputType, OutputType>{
    abstract transform(data: InputType): OutputType;
}

export interface ITransformerCtr<InputType, OutputType>{
    new() : Transformer<InputType, OutputType>;
}

export class TransformerStream<InputType, OutputType> extends Transform{
    readonly private transformer: Transformer<InputType, OutputType>;
    constructor(TransformerCtr: ITransformerCtr<InputType, OutputType>){
        super();
        this.transformer = new TransformerCtr();
Its not a hashset :P, but I'm wondering does this look good? Ideally whoever uses this can provide a Transformer which this will wrap and convert into a nodejs stream
 
Transformer can be an interface.
and I don't see how TransformerStream._transform is a stream. looks like it just calls transform once
ohh that's from node streams.
 
extends Transform
 
4:40 PM
nevermind.
 
hmm true, I should covert Transformer to interface.
 
So, yea, it makes sense, but your class and ITransformerCtr could just me one interface defining a function.
 
Here is an example of using this
 
interface ITransform<InputType, OutputType> {
    (data: InputType) => OutputType
}
 
export class Encoder<InputType> implements Transformer<InputType, Buffer> {

        private readonly cache = {
            packed: msgpack.pack({})
        };

        transform(object: InputType): Buffer{
            const lastPacked = this.cache.packed;
            const packed: Buffer = msgpack.pack(object);
            const diff: Buffer = Buffer.from(fossil.create(lastPacked, packed));
            this.cache.packed = packed;
            return diff;
        }
    }
@Luggage the function won't work for cases like ^
where its deltaing (so kinda needs a model of the last one)
 
4:42 PM
ohh, i see. You want it to be able to construct the transformer because it could be stateful?
 
yep
 
makes sense.
 
` const diff: Buffer = Buffer.from(fossil.create(lastPacked, packed));`
is sad though^
I should just use UInt8Array
 
5:02 PM
@Shrek My 2c? That's a Javaism. You have functions and closures, use them
array.map and friends are higher level concepts which means you can do away with declaring classes for a function and a variable
 
@Zirak this is typescript so I thought JavaIsm might just be better
but how'd i use closures for this and still look goodish
 
@Shrek It's on top of a language with great concepts like functions and closures. I personally despise Javaisms, and if that's your thing well, you're wrong and I'm right but meh
 
I'm happy to learn :D
 
By in and a far the best question I've ever asked on this website
1
A: Handle promise resolves indvidually in promise.all()

li x(Answering my own question.) I handled it by adding a then handler where I'm getting the promise from requestArticles (where I'm pushing them into the promiseArr array). I had to be sure to pass the value that handler receives out of the handler so it propagates to Promise.all, see *** lines: ...

 
I'd be happier to just write a function @Zirak, it'd reduce the headache of the other person having to implement an Interface :D
 
5:09 PM
got it working with a little help from a guy :o
 
@lix look at bluebird api docs :D
 
@Shrek does the promise.all documentation have an example or explanation for this?
I've just checked again and It doesn't say anything about what I was looking to do
 
lix does Promise.map apply to your case?
 
@shrek can you pass a promise.map into a promise.all?
 
var data = [1,2,3,4];
Promise.map(data, function(item) {
    return processItem(item);
}).then(everythingDone);
 
5:14 PM
@Shrek Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
!!undo
 
@Shrek You do not have permission to use the command undo
 
your correct if the Promise.map can be used inside of the promise.all
 
!!undo
She didn't said anything to me :P
Guys I asked it before but can anybody please tell me how webpack solves the dependencies issues?
 
I'm trying to talk to an endpoint but I keep getting "Response for preflight has invalid HTTP status code 401" Where am I messing up if I've set the authorization header?
Related to this post a friend and I are working on : stackoverflow.com/questions/43573366/…
 
5:32 PM
@Luggage any idea what Zirak meant?
 
he means if you only pass a function, and not a contructor, you can still have state.
let internalState = 0;

new TransformerStream(input => {
    internalState++;
    return output;
});
 
> This is likely faster in coרe
 
@Luggage in that case what if I need more than 1 of them?
 
@Luggage Hey bro, can you answer my question? :)
 
5:37 PM
wrap it in another function?
it would work much better with composition, yes.
 
Shrek got me. He was just saying that you can pass a closure for a stateful transformer instead of a contrsuctor. You may have reason to still prefer a contructor and that's fine
 
something like
function F() {
      let b = 0;
      return Something(c => {
           b += c;
           return b;
      });
}
@Luggage ^ ?
 
and you pass to TransformerStream the result of F() or F?
 
No i guess in that case TransformerStream is Something
 
ohh, right. ok
 
5:43 PM
hmm that does look better
ugh, types are tempting
but very easy to fuck up :/
 
you can type that.
 
Ahm Ahm
 
ZahidSaeed your question about "how"?
 
Yes :)
 
Who cares how. You just use it. Now knowing how is why you use a tool.
You just require() or import your dependencies like a real language.
 
5:45 PM
of course I can type that
my implementation is crappy :P
 
The question is, Why would be using webpack to generate assets like images, CSS using webpack ?
 
is what I'm saying I over did it xD
 
@ZahidSaeed your css and iamges will be all over the place. some from node_modules, some in your own code. webpack gathers all resources you require and packs them into your output directory, ready to deploy
We had a whole conversation about how it copies (or processes) those files and why you shouldn't have your own files in the output folder.
 
some from node_modules? Like what?
yeah
 
like.. anything your require() that is in node_modules..
which is anythign you install from npm
 
5:47 PM
Madara said it solves dependencies issues
Like if script 2 requires script 1
 
it bundles dependecnies so you don' thave loos files, yes.
wait.. why are you asking this? haven't you been using webpack for weeks?
did you hit your head?
 
oh brother, I'm using it
 
have you RAN webpack once? you'd see what it does
 
It arises some questions in my mind
 
add a require(), and look at how the bundle webpack makes changes.
 
5:51 PM
add a single require
I wonder how far I can this function thing
I have a Server and Client. Which are protocol independent (so you provide your implementation say WebSocket, TCP, UDP goodluck.
@Luggage where does this end? lol
 
or twitter
 
Or twitter :P
however, I don't think you'd want to write a realtime thingy on twitter api.
 
@client_2342 Initiate case orange
 
@BenjaminGruenbaum I'm interested :P
 
In what?
 
5:55 PM
in you
 
2 days ago, by Benjamin Gruenbaum
TipRanks is hiring for a remote FE developer job in India. We pay competitive (for India). If you (really) know JS and want to work from home with @MadaraUchiha and me with interesting technology React/TypeScript/etc ping me!
Its me abhi
 
who are you
 
@Luggage Gah, now I feel I should have kept this project in JavaScript :|
it'd be much simpler and I'd not do stupid thing like what I did just to make the compiler happy :sad:.
 
nah, TS doesn't ask much of you
 
5:56 PM
Oh, I thought you meant the PR, you can ask for details on hangouts :)
 
I'll mail you
 
you still choose the JS structure you want, then type that. Don't bend over backwards for TS.
let it help you
 
yes, I get it now :D
I guess I got curropted to the Java Side :/
 
I don't regret going TS.
 
^ survivor bias
 
5:58 PM
I don't either, although I use it very little in practice.
I let it infer a lot of stuff for me, mostly
 
as you should
 
95% of the people who use TS end up dead, that's why you don't hear bad things about it
 
@towc 100% of people who use TS end up dead.
100% of people end up dead
 
well, that is a good point
 
so far
That's anecdotal.
 
6:00 PM
100% of people who touched a dog's penis in the 100 days war are dead
 
are you suggesting TS gives you immortality?
 
Haha
 
on the other hand, almost everyone who ends up using haskell is in heaven and has no reason to come back to tell us how good it is, which is why you don't hear much about that either
 
ISIS uses haskell
 
therefore you're part of ISIS
 
6:03 PM
I don't use haskell, I just make fun if it without ever learning about it.
 
btw, earth.google.com/web is still not working for me (in chrome, tried removing all extensions) :/
did anyone get similar issues?
getting a couple of warnings in the console
about polymer stuff
 
i get some warnings, but it works
 
I'm stuck at a loading screen
 
6:24 PM
it works with vpm
vpn
NOW it works ONLY without vpn.
 
yeah, I'm not on vpn
oh
that doesn't make a lot of sense :P
where's your vpn point to?
 
@towc cat chrome://version
 
56.0.2924.76 (Developer Build) Built on 8.7
should be latest
 
> Google Chrome 57.0.2987.133 (Official Build) (64-bit)
that aside, it works in safari for me </jk>
 
59.0.3067.0 (Official Build) dev (64-bit)
works for me
get on my level
 
6:40 PM
@littlepootis I have that too
 
Hey guys
I have a qq
Is the DOM a javascript object?
 
@littlepootis > Google Chrome 60.0.3078.0 (Official Build) canary (64-bit)
 
@ILikeToMoveItMoveIt ILikeToGoogleItGoogleIt
@Shrek nice
 
I did but i didnt find a good explanation of what a DOM is
:(
 
It's an API
 
6:43 PM
Wot
The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document
This is what gogle says
What do they mean by platform? What is that platform built with
What makes ot a language neutral interface?
 
Its design.
@ILikeToMoveItMoveIt It's not a platform. It's platform-neutral.
 
It's an API.
You can think of it as a bunch of objects and functions that let you do stuff.
 
But is it a javascript object though?
what is that object???
 
It's not an object.
It exposes many objects and functions.
 
6:48 PM
You said its a bunch of objects and methods
Ohh
 
@littlepootis and classes
and mishaps
 
Okay any example of an exposed object?
 
document
navigator
Element
HTMLElement
HTMLPargraphElement
 
6:51 PM
Got it got it
And methods?
 
document.getElementById
 
Owww. Got it got it
And classes?
 
JS doesn't really have classes.
It technically does, but it doesn't.
 
Hey wait a minute. Document.getelementbyid
Isnt that a jacascript method?
 
It's part of the DOM.
 
6:55 PM
Ohh
 
Also, I don't know if navigator is technically part of the DOM.
 
I didnt know there existed a navigator untill you mentioned it
Where do i get to know the basics of javascript and dom
I mean the real deep basics
 
> Queen Elizabeth “completely ruined her own party” yesterday when she announced to close friends and family that that “World War 3 must break out this year” in order for the Illuminati to usher humanity into the next phase of their sick and twisted masterplan.
 
Is she against javascript?
I have read that changing the dom elements is time consuming
Is that true?
Javascript is fast but the dom is not. I read
 
7:05 PM
Wow nice documentation
I have soem questions about nodejs. You know nodejs little pootis?
 
yes
I think so.
Cogito ergo sum
r/UnnecessaryQuotes
 
I thought nodejs is a library. But my friends say it is a server
 
It's a platform.
 
Is it similar to iis?
 
Not really.
It lets you write your own IIS.
 
7:18 PM
So that is express.js?
Creation of server is done by express.js?
In MEAN stack. M is database, A is frontend, N is platform? E is??
 
Express
 
I mean what is Nodejs for and Expressjs for?
 
NodeJS is simple plain javascript code that runs on the machine
 
@littlepootis @Shrek oh, I thought it autoupdated
I haven't dist-upgraded in a while because I'm exhausting root partition space again and I'm scared
down to the last 400MiB
 
So that means if i know javascript, i know nodejs right?
And what objects and methods of te machine does nodejs expose?
 
7:24 PM
fuuuuck it's going below 200MiB
@ILikeToMoveItMoveIt google "getting started with nodejs"
 
fuck fuck fuck 80MB
40
30
 
20 MB :P
 
20
 
10 :P
 
7:26 PM
back to 40
 
lol
:)
 
0
40
uuuh should this happen?
Setting up linux-image-3.16.0-4-amd64 (3.16.39-1+deb8u2) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-3.16.0-4-amd64
/etc/kernel/postinst.d/zz-update-grub:
Generating grub configuration file ...
Found background image: .background_cache.png
Found linux image: /boot/vmlinuz-3.16.0-4-amd64
Found initrd image: /boot/initrd.img-3.16.0-4-amd64
Adding boot menu entry for EFI firmware configuration
done
ok, so it's left me with 45MB
it's not good
I need to do something about it
@BenFortune did you once say it's a good idea to link certain directories from inside the root partition to somewhere else?
 
7:40 PM
any1 give some feedback on this class diagram key/structure thing, anything ud change? its just meant to be readable: snag.gy/0G7Csf.jpg
 
oh bloody hell, sudo apt-get clean got me 280MB
WHY DO BAD THINGS HAPPEN TO STUPID PEOPLE
 
8:28 PM
sudo apt autoremove
 
27MB, great
 
8:56 PM
Anyone know how to enforce something to be a string?
I've tried .toString() and String(str)
Neither seem to force the property added to my object to be a string
 
00:00 - 21:0021:00 - 00:00

« first day (2381 days earlier)      last day (2560 days later) »