« first day (3111 days earlier)      last day (1830 days later) » 
01:00 - 21:0021:00 - 00:00

1:39 AM
heh, I was going to ask you to help me decipher a chart in an API. Even though I've figured it out I'd still be curious to see what you think
what information seems to be required for payouts from how this reads?
 
 
3 hours later…
4:12 AM
@MadaraUchiha thank you very much, isn't that misleading to say the least? Why do we have an initialization field for the for loop if this field is not at all an initialization at all but works just like the body? And why it seems to work properly for the i counter?
Would you guys use Slack or Gitter for creating a community for an open source JavaScript project?
 
 
2 hours later…
user8444404
6:18 AM
I have below code :
 
user8444404
container.getImagePosition = function() {
				return {
					x: settings.x,
					y: settings.y,
					scale: settings.scale
				};
			};
 
user8444404
i called above code as here :
 
user8444404
container.getImagePosition();
 
user8444404
is that right way ?
 
user8444404
what wrong i done ?
 
6:41 AM
How can i check if a section or Block is in view port in angular 7 ??
 
@vickeycolors it isn't "wrong" per se
did you mean to add a function to every "container" or just this one in particular?
 
user8444404
@Neil i am adding to every container
 
user8444404
i need the value of x, y....
 
user8444404
how to get that ?
 
user8444404
may i get value just by calling
container.getImagePosition(); ?
 
6:47 AM
@vickeycolors It'll return settings.x and settings.y at the moment you declared the function
 
user8444404
@Neil sorry, but how to get x,y values.....
 
if you wanted it's literal x,y coordinates, you wouldn't call getImagePosition
 
user8444404
@Neil please check
 
user8444404
 
user8444404
6:50 AM
@Neil please upload images on those mask.....
 
Let me break it down.. if I do container.getXY = function() { return { x: 5, y: 10 } }, then calling container.getXY() will always return an object { x: 5, y: 10 }
what you're doing is making x and y the initial values of settings
but it's not going to change
I assume that's not what you want to do
 
user8444404
got it, can you please check codepen's code and help me to get x, y values......
 
I don't know what x, and y are here..
 
user8444404
settings.y = startY;
            settings.x = startX;
 
I see settings.x and settings.y get assigned to the width and height of the loaded image
 
user8444404
6:57 AM
above are x, y values
 
I meant in a more generic sense
lets tackle this from another angle.. what results are you getting from call to getImagePosition and what were you expecting?
 
user8444404
i am not getting any result from container.getImagePosition();
 
user8444404
i am expecting results like (200, 200)
 
user8444404
as total container is (612,612)
 
user8444404
can you please search for below lines in code
 
6:59 AM
and what are you getting instead?
 
user8444404
settings.y = startY;
            settings.x = startX;
 
@vickeycolors no, this is your program, not mine frankly. If you don't want to meet me half-way..
 
user8444404
i am not getting any output now @Neil
 
what does the call to getImagePosition do?
does it fail because it doesn't exist? does it return undefined? does it make the screen flash?
be more specific
 
user8444404
its failing because it doesn't exist....
 
7:03 AM
ok, you say that like I should have known from the start, but until now, you realize you've only told me that you're not getting any output
 
user8444404
thats right
 
it's being assigned in the same way as the other functions, like say "disable"
so also "disable" should be failing..
or any other function being assigned to container there
 
user8444404
image uploading is happening......
 
Okay, what is that supposed to prove? ......
 
user8444404
@Neil i think i need to debug more on this, thats okay, thanks a lot for your valuable time.....
 
7:08 AM
assumptions are your enemy, especially when you assume everything should be working.
if getImagePosition fails, then so should disable
 
user8444404
@Neil i completely agree, you are right.....
 
I'm not going to debug your program for you. That's something you should learn how to do. The sooner you learn, the sooner you can fix it ........
 
user8444404
sure, i will try @Neil , thanks again....
 
Hello guys,
Does anyone know how to execute code in a webpage like for example https://google.com/ from NodeJS?
Like, I would like to have an alert("Hello from NodeJS") on google.com, how would I do this?
 
7:23 AM
@demo it depends on what you mean
If it were a browser, you could download the web page, modify the javascript to do whatever you want
in node.js, you could download the page, parse it, change it, and then run it locally
You mean you wanted to host a page like google with modified javascript?
 
7:52 AM
@demo its impossible
 
@SayanjyotiDas Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
like @neil said, it's possible only if you can download the webpage and then show it with modified JavaScript with the alert
 
@SayanjyotiDas It could be he meant to host a "new" google with his own javascript in place
possible, but unethical :P
 
new google haha
if we could run JavaScript on google, that would really be heaven
 
tf does that even mean
 
8:05 AM
that means window.close in the first line
or possibly while(true) window.open("https://www.downloadfreeram.com");
 
> It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter.
 
r/whooosh
 
hello guy can anyone tell me how can I check if a HTML block in the viewport in angular 7??
 
R K
<div id=col2>
    <div id="searchform">
    <div id="col2">
    </div id="wrapper-baby" class="wrapper">
    </div>
    </div id="wrapper-fruits" class="wrapper">
    </div>
    </div id="wrapper-grocery" class="wrapper">
    </div>
</div>

.wrapper {
    display: grid;
    visibility: hidden;
    grid-template-columns: 214px 214px 214px 214px 214px 214px;
    grid-auto-rows: minmax(20px, auto);
    grid-gap: 15px;
    margin-top: 0;
    position: relative;
    left: 12px;
    width: 100%;
    bottom: 880px;
 
how to check inside success of jquery ajax call if we have received data before performing any operation with it?
 
8:19 AM
You can tell it's morning.
 
@RK this seems like a constrained height.. for dynamic data there will not be constrained height.
 
1 message moved to Trash can
@RK Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
R K
cmon mate .. gimme a second to fix it
i know the rules
I need to turn the visibility on for 1 grid (based on its relevant button click) and turn off for all others .. I've implemented following:
$(".CategoryAnchors").click(function (e) {
e.preventDefault();
var category = this.id;
var wrapperGrid = $("#wrapper-" + category);
var wrapperGridID = wrapperGrid[0].id;
$("#" + wrapperGridID).parent().siblings(".wrapper").css('visibility', 'hidden');
if (wrapperGrid.css('visibility','hidden')) {
wrapperGrid.css('visibility', 'visible');
}
});
It is working fine for turning on the relevant grid but isn't working for turning off all other grids on the page ..
not throwing any errors in the console.
@user7747472 thanks for the note but everything is working as expected here on my end on my logic so far ... so maybe what you are pointing out isn't yet applying here .. thanks for the note anyway
 
@RK nah, i was thinking u are replying to my question
 
R K
Oh Ok. well yes .. it happened to me as well once .. :)
 
9:01 AM
@KarelG here is the proper hades look
(can't send an animated picture but the effect is kinda like flames)
and now figuring out how to transition it to red when the fans have to spin up to cool it ~45 C or something
and the temps after a bit of tweaking are under 60s at sustained synthetic load with almost no noise 😃
 
Hello guys! I have just tried to install nyc package for test coverage and I am getting the following:
Cannot start the application. TypeError: Cannot read property 'prototype' of undefined
 
R K
@ShrekOverflow - if an element visibility is set to = 'hidden' - webpage still carries it data in the page filesize?
 
Don't ping me
and yes ._.
 
R K
Sure. Thanks .. Sorry.
 
Everything in html is sent to the browser
 
R K
9:15 AM
I see.
 
the hidden applies only on the client
 
R K
Got it. Thanks heaps mate.
 
unless yu have an absolutely ridiculous rendering engine
 
R K
haha .. OK.
 
like something from microsoft or java tech, I would expect even none to be delivered on the client
 
R K
9:15 AM
Cheers mate.
 
the common usage for hidden is to keep the thing in the layout
 
R K
Yep. Making sense.
 
so when you render stuff the layout expects something to be there, it's just not visible
with none you are explicitely opting out of it being in the render tree
for example script tags are set to display: none by default
 
R K
I see.
 
Hi Jandy
 
9:53 AM
I am getting this error when starting my application
 
R K
set folder permissions
allow your platform to write to that folder
@QuicoLlinaresLlorens
 
Just removed the project folder
It was not allowing me to do nothing
And reclone it
for the test coverage. How should I configure it to work as when I run the tests?
Because I get the following:
Error: No test files found: "test"
----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |        0 |        0 |        0 |        0 |                   |
----------|----------|----------|----------|----------|-------------------|
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! order-tool@1.0.0 test-with-coverage: `nyc mocha`
 
10:22 AM
Would you guys use Slack or Gitter for creating a community for an open source JavaScript project?
 
Sam
10:47 AM
Any React devs here? I'm looking for some online resources in how to structure my project (code structure rather than file structures) when building SPAs.. I've currently implemented a SPA but I feel the layout is all wrong.
 
Hello
I need suggestion how to achieve url guard on the server side
I am using Node.js / Express / MongoDB and Angular
Angular - guard.service.ts
what is alternative for Node.js / Express ?
 
Sam
Poor as in, I have hash routers in multiple files and I feel this is poor design
 
11:35 AM
Ok, thank you Sam
anyone has different experience ?
My example, I have two way authorization logic
Admin can: login, register new user, logout

User can: login, add new patient, logout

so , if admin manually entered for example localhost:4000/new-patient and he should be unauthorized to open that page, he should be informed that he is unauthorized
 
Sam
11:56 AM
I've created a minimal example of my code base which should help me describe the parts I'm unsure about codesandbox.io/s/r75mnr8zo4?fontsize=14
Specifically Components/Layout/GridContainer.js
 
hello... anybody good at highcharts here?
 
@AchyuthKodali Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
@Aurelius I've seen lots of people using Discord
 
Sam
Gitter has good GitHub integration @Aurelius
 
12:12 PM
8 mins ago, by Caprica Six
@AchyuthKodali Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
12:52 PM
How can I make loopback work with Istanbul?
I have created the following script:
    "test-with-coverage": "nyc lb-mocha --allow-console-logs \"dist/__tests__\"",
But it is just running the tests
and if I press CTRL+C it shows the following:
Batchvorgang abbrechen (J/N)? ----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |        0 |        0 |        0 |        0 |                   |
----------|----------|----------|----------|----------|-------------------|
 
1:34 PM
hey cold fire :D
I thought you might like the cold fire aesthetic here - chat.stackoverflow.com/transcript/message/46008272#46008272 😛
and yes its cold now with the AIO and the massive airflow
 
0
Q: Why do elements created under a `new Document` contain the wrong prototype?

Benjamin GruenbaumWhen creating a div it is an instance of HTMLDivElement: var d = document.createElement('div'); d instanceof HTMLDivElement; // true d instanceof Element; // true This also holds true when obtaining an external document and window: var frame = document.createElement('iframe'); document.body.a...

Interesting thing ^
 
@BenjaminGruenbaum long shot but don't you want new HTMLDocument ?
 
@ShrekOverflow why didn't I think of that :D!?
(it doesn't work <3 )
 
(ofcourse it doesn't work)
What I am trying to say is that Document may not just be an HTML Document no?
 
Then why does it create Elements?
 
1:41 PM
Elements apply to all XML SVG and HTML
straight from MDN
> The Document interface describes the common properties and methods for any kind of document. Depending on the document's type (e.g. HTML, XML, SVG, …), a larger API is available: HTML documents, served with the "text/html" content type, also implement the HTMLDocument interface, whereas XML and SVG documents implement the XMLDocument interface.
now may I have my answer accepted?
gah madara beat me to it how do you type so fast @MadaraUchiha
 
!!facepalm
 
I actually think you answer is fine @ShrekOverflow and @MadaraUchiha's is wrong
It's Constructor,Exposed=Window
 
1:56 PM
I undeleted it
 
@MadaraUchiha MDN being wiki-editable strikes again
 
@TylerH Removed the non-standard warning from MDN.
@BenjaminGruenbaum Fixed
This is the best answer I have ever seen. — Linkgoron 16 secs ago
:D
@Linkgoron ❤️
 
I just felt so out of touch while writing that answer :(
need to code more ... MUST CODE MORE
I mean I am sure I can make a mktg presentation around that topic
 
@MadaraUchiha Did you... did you mod-redact a revision of your own answer?
or does each revision get a grace period?
 
2:13 PM
grace period starts with a new edit
77
A: How does editing work?

Shog9 How do edits work? Users can edit the questions and answers submitted to the site. This gives the site a wiki feel, and allows the information to constantly evolve and remain up to date. Those users who are allowed to edit a post can do so by clicking the edit link associated with that post. ...

 
huh, how about that
seems abuseable
 
@TylerH No
@TylerH Yes
 
does class change of an object trigger change event handler?
 
user8729657
Why do people use SCSS over CSS?
 
user8729657
whats the diff?
 
2:17 PM
@RedLemon no, it triggers a mutation event
@OvieAdese mixins and nicer syntax arguably
 
thanks
 
("mutation events" are deprecated, what I meant is that you can attach a MutationObserver and pick up on the attribute change of the class)
 
user8729657
thanks @BenjaminGruenbaum
 
@OvieAdese it allows for more programmatic implementation of styles, e.g. less code writing is necessary. CSS is slowly adding such features natively, though, at least some of the more common ones
 
@OvieAdese It's nice to be able to specify a single color and have other colors refer to it in varying shades or multipliers for instance
 
2:22 PM
I use scss because of variables... and being able to easily break up a single sheet into multiple sheets... yeah that's all available natively, but i rather not risk using a feature that may not work in every browser my apps encounter.
 
so if tomorrow you decided to see what the site would look like using green instead of blue, you only change one color potentially
 
^
We have variables that store calculations of the primary and secondary colours, which in turn generates an entire pallete to use across site
 
user8729657
I'm going to start using scss then
 
user8729657
instead of css
 
The modern stack is typically to use CSS modules with scss - so if you're using react/angular/vue consider that
 
2:24 PM
but never use css-in-js, that's what the villains use
 
user8729657
lol
 
And knowing is half the battle.
 
@OvieAdese just note that you need to compile it into css at some point in the process. Browsers don't natively understand scss
 
scss doesn't even seem particularly complex honestly
frankly, I don't see why browsers can't just start supporting scss
 
user8729657
@TylerH, I'm going to follow this example webpack.js.org/loaders/style-loader
 
user8729657
2:27 PM
I think theres one for scss too
 
user8729657
actually I dont need a scss loader
 
user8729657
im confussed lol
 
Hello, is it posible to create a cipher for aes encryption having the hashed key and iv but not the secret ?
 
style-loader does not load scss
 
I use this rule for scss
  {
    test: /\.scss$/,
    use: [{
      loader: "style-loader"
    }, {
      loader: "css-loader"
    }, {
      loader: "sass-loader"
    }]
  },
 
user8729657
2:29 PM
thanks @Ikari!
 
probably doesn't need the css-loader, but never really cared to change it since I started using it
 
@Ikari Sure you do
 
@Neil probably because it's a library and they don't support libraries; they support languages
 
oh, lmao, good then :p
 
@Ikari css-loader is similar to file-loader (that is, it's a loader that accepts a file and the module it returns is the contents of that file as a string)
The main feature that differentiates it from file-loader is that it resolves @imports and url()s like require() calls.
 
2:39 PM
oh, makes sense
 
style-loader is a loader that accepts a CSS string, and returns JS code that creates a new <style> element, sets the text to that CSS string, and appends it to document.head.
sass-loader is self-explanatory :)
 
2:51 PM
any1 wanna give me an opinion of my site?
 
@snicks Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
3:24 PM
heyyyyyy friends!!
.... am I the only one here atm?
:(
I'll drop the question - I have a next js app - is there some way to find if there are unused components in the repo?
 
there are a bunch of 'unused file' plugins for webpack
grab one of those and hope all components have their own files
no-unused-vars might pick up a component that is defined but not used? never tried that.
but probably not
 
can I just grab a webpack plugin while using next js?
guess I'll ask uncle-G
 
next uses webpack. so I'd assume it's kosher.
 
user8729657
3:48 PM
@rlemon, Do you know of any IT companies hiring this summer, around the GTA?
 
no
 
user8729657
darn
 
@OvieAdese what does GTA stand for ?
 
user8729657
greater toronto area
 
ty
 
4:16 PM
GTA should have a game in GTA called GTA GTA
 
user8729657
4:37 PM
lol
 
4:55 PM
I need emergency github help
everything is fucked up
how do I completely revert to old version
 
emergency eh?
how much you offering?
😉
 
5:16 PM
posted on April 23, 2019 by Bethany Nicolle Griggs

Notable Changes assert: validate required arguments (Ruben Bridgewater) #26641 adjust loose assertions (Ruben Bridgewater) #25008 async_hooks: remove deprecated emitBefore and emitAfter (Matteo Collina) #26530 remove promise object from resource (Andreas Madsen) #23443 bootstrap: make Buffer and process non-enumerable (Ruben Bridgewater) #24874 buffer: use stricter range checks (Ruben Brid

 
@JBis you just reset
hard reset to a previous commit iirc
 
damn, there goes my revenue stream
 
5:48 PM
🚽
 
how can I pipe a get request that is downloading an archive to this?
 
have you tried stream.pipe(fn) ?
 
@rlemon what is fn?
 
(lol)
 
whatever you wanna pipe it into
 
6:04 PM
that's obvious then but I am not sure if decompress has this feature
 
well it would be pretty easy to test out
I would, but that would require a lot more work on my end
 
6:33 PM
@rlemon and it's therefore wrong :-P
 
user8729657
6:59 PM
My god why didn't anyone tell me about food banks, I'm about to go in and raid
2
 
8:40 PM
@KendallFrey Rocket question.
Any idea why they moved the turbine for the fuel pumps to a dedicated cycle instead of using a turbine similar to a jet engine in the main combustion chamber?
 
Probably because they'd melt
And I imagine it would capture too much energy
 
I would imagine there are ways around both of those. Preburners on closed cycle engines are pretty resistant.
And they flow fuel through the bell...why not the turbine?
 
It doesn't seem feasible to pump fuel through a thin turbine blade that's spinning at high velocity
 
only if it's spherical fuel in a vacuum
 
Yeah. That would be pretty tricky, huh?
You could use horizontal grooves in the bearing, two for each blade of the turbine stacked on top of each other.
 
8:55 PM
Oh look
12
Q: Why don't rockets drive the turbopump from the combustion chamber?

WitnaaayAs I understand it, liquid-fueled rockets typically burn some amount of their fuel in a separate low-pressure combustion chamber, and then use the combustion products produced to drive the turbopump. High-efficiency engines then pump this exhaust into the rocket's combustion chamber to ensure com...

 
You're ruining my spitball.
 
I've just found myself using this code in a Typescript function:
return (
  (buckets && _.find(buckets, { id: bucketId })) ||
  (async () => {
    try {
      const response = await $http.get<any>(`/buckets/${bucketId}`);
      return mapBucket(response.data);
    } catch (err) {
      return undefined;
    }
  })()
);
do you guys think the IIFE makes this unreadable?
 
What I'm trying to figure out is how a closed cycle turbopump isn't a perpetual motion machine
 
I guess Blue Origin does do that.
@KendallFrey ?
 
8:59 PM
i don't think the IIFE is the real problem
 
what do you think is the problem
 
How does the turbine manage to get more than enough energy to pump the fuel?
 
No idea how that would be a perpetual motion machine.
 
&& and ||
 
01:00 - 21:0021:00 - 00:00

« first day (3111 days earlier)      last day (1830 days later) »