« first day (3285 days earlier)      last day (1646 days later) » 

12:54 AM
please, can anybody with google-maps + js experience attend to my question: stackoverflow.com/questions/58288620/…
 
 
5 hours later…
ABC
6:05 AM
hekki
 
 
2 hours later…
8:15 AM
Why does creating and appending a card element using for loop which runs 10 times, creates 10 cards of different heights each reducing the previous by one?
 
I already ask this, but i am trying my luck to get an answer from this chat. I made these javascript function:
document.getElementById("btn-task-inprogress").addEventListener("click", function(){
var httpRequest = new XMLHttpRequest();
var id = document.getElementById("id").value;
var token = document.getElementsByTagName('input').item(name="_token").value;
var data = "_token="+token;
var urlRequest = "http://"+window.location.hostname+":"+window.location.port+'/task/edit/'+id+'/In Progress';

httpRequest.open("POST", urlRequest, true);
 
what did you ask @AnirudhLou
 
You haven't attached anything to your onload event, how are you checking?
 
28
A: How to use componentWillMount() in React Hooks?

MING WUAccording to reactjs.org, componentWillMount will not be supported in the future. https://reactjs.org/docs/react-component.html#unsafe_componentwillmount There is no need to use componentWillMount. If you want to do something before the component mounted, just do it in the constructor(). If yo...

 
url is something like http://127.0.0.1:8000/task/edit/3/In Progress to which point to my php function and this is my function
public function customEdit($id, $item){
dd("Hellooo");
}
 
8:22 AM
here they say componentWillMount is no longer supported
and that is not even useful
to me that sounds like one of the most useful methods
how are we supposed to do something on the client only before the component gets rendered?
 
Hi fellows
 
Hope you've spent a good weekend :)
 
@Aurelius why is it one of the most useful methods from React for you?
 
@KarelG I have explained.. How can you do something on the client only (where you can access window, document etc.) before anything is rendered on the screen? For example conditionally render a button if a cookie is present, let's say session, to determine if the user is logged in or not? Now by use useEffect we can't do anything before the component is rendered, thus in the earlier example this would result in rendering the button first and after a little making it disappear because we find
that the session cookie is not there
 
8:31 AM
well... that's why componentDidMount is added ...
 
@KarelG nope, that's to late already
didMount means already mounted and rendered
@BenFortune thanks, so we now have this componentDidServerRender to replace it?
 
@Aurelius uh, not yet
There's an RFC open
 
9:22 AM
Hi! Could anyone recommend some tutorials/give some advice on building a Chrome extension--Discord Token system? Basically, there is a Chrome extension, which should only work after a user (who's discord account should be connected to the extension after they purchase it) successfully logged in to discord.
 
Hi. Sorry as I'm spamming a few rooms with this question.
Mob programming. There is (afaik) any evidence to show it is "better" than pairing (what ever better means).
My team have started to mob but I'd like to add some measures so we can more scientifically conclude where it is good/not so good. I'm wondering if any one has any advice about measuring. Obviously I'd love to be able conclude after a month but I appreciate it is unlikely. However, if any one has any advice on how we could measure or what to measure, I'd love to hear.
 
9:50 AM
2
Q: npm install - how to avoid bowercopy dependency? And install dependencies using webpack

overexchangebowercopy is deprecated tool for newer projects Below task(from here) is the grunt task using bowercopy tool as dependency: var JS_VENDOR_PATH = 'public/js/vendor', CSS_VENDOR_PATH = 'public/css/vendor'; module.exports = function(grunt) { grunt.loadNpmTasks('grunt-bowercopy'); grunt.l...

Npm install gives error
 
 
2 hours later…
11:29 AM
hey do you guys know how I can set the location of a page inside my iframe?
like so that it renders the exact center of my page
 
12:08 PM
@TaylorSpark: so you want to horizontally & vertically center an element?
 
@duhaime You got the global object in React Native (dunno if someone answered already or not).
Quick question (not about jest for once): If you are using LaTeX, what editor would you suggest for a noob? :)
 
hi guys
want to ask about angular directive here
import { Directive, HostListener } from '@angular/core';

@Directive({
  selector: '[myegDateMaskExpiry]',
})
export class DateMaskExpiryDirective {
  @HostListener('input', ['$event'])
  onKeyDown(event: KeyboardEvent) {
    const input = event.target as HTMLInputElement;

    const trimmed = input.value
      .replace(/\s+/g, '')
      .slice(0, input.value.indexOf('/') === -1 ? 4 : 5);
    if (trimmed.length > 3) {
      return (input.value = `${trimmed.slice(0, 2)}/${trimmed.slice(
        trimmed.indexOf('/') === -1 ? 2 : 3
this is what I tried, but unfortunately i got error on backspace
 
12:23 PM
I need an advanced concept of js tutorial
 
@hafizihamid Please edit your message and hit Ctrl+K before sending.
 
@geisterfurz007 donee
this is what i error i get in gif
anyone got suggestion ?
 
Untangle that mess. It's incredible hard to read and possible easier to debug once you know what everything does. That bit of code got a bunch of magic numbers and the only variables are input and trimmed while you got a lot more that you could extract to properly named variables.
 
Golfing in prod 😃
 
guys
my stackblitz
 
12:33 PM
I still recall my boss at my old job telling us that we were no longer allowed to "test" our code, and that we didn't have that luxury
 
Yeah, we do that without our boss telling us that.
 
Luxury wouldn't have been the word I would have used.. "urgency".. "barebones necessity".. "lifeline"..
 
Found a new thing to play with at work. LaTeX.
 
this insane idea that you were just supposed to "get it right the first time"
glad I left that job. The management were clowns
 
Gotta make sure that I delay my bachelor thesis by using a tool I got absolutely zero experience with.
 
12:35 PM
LaTeX is fun
Learned about that from math SO
 
What editor would you suggest?
There are about 3 billion ones.
 
no idea, my experience is limited
 
excuses again ._.
 
oooooooooooooooo
thank!
 
12:54 PM
interesting plugin
and I am still using Texmaker
 
@Neil Kinky.
 
Don't judge!
 
judges
 
1:25 PM
@Cerbrus it is done with some sacrifice tho
 
 
1 hour later…
2:38 PM
hi can anyone tell me what I'm doing wrong?
var a = Disabilita(this);ValidateDate(this); return a
where the second function parameter is null
 
@Riccardo you didn't provide a second function parameter
 
user7437554
3:13 PM
function printProp (myValue) {document.body.innerHTML = myValue[1].title}
 
user7437554
Why would that return myValue[1] is not defined when I pass an array through the function?
 
user7437554
of course myValue isn't being replaced by the array I'm 'inputing', but why? Or how could I fix it?
 
probably an array with one item in it ?
I advise to use concise variable names. "myValue" is ambiguous
 
user7437554
I am passing a collection as myValue, and if I try just by hand it works fine @KarelG
 
can you show both cases in a way that we can run them?
 
user7437554
3:25 PM
yes I'd try to run it on the console of this website...
 
?
 
user7437554
let trialVar = document.getElementsByTagName('button');
undefined
trialVar[1]
<button id="upload-file" class="button">

trialVar[1].className
"button"
 
If all you're doing is outputting properties of dom nodes, that can be done on any website
 
user7437554
that's the code and output
 
user7437554
any help?
 
user7437554
3:27 PM
I'm passing trialVar in the function, and there is no output
 
user7437554
just want to understand why
 
I assume you modified it to look for something other than title?
considering that button has no title
 
user7437554
oh ****
 
user7437554
yes that's cause I've tried on diff urls. sorry and thanks @KevinB
 
3:54 PM
I thought that something like "${preset && preset}" would return "" if preset were undefined. How does one achieve such a behavior (namely getting back "" if preset is undefined, otherwise the value of preset). I am a bit of a noob in JS?
 
 || ""
 
now i've got this error
OnClientClick="return ValidateDate(this);"
then the function
 
"${(preset && preset) || ""}"?
thanks
that actually creates """"
cool. just remove the outer ones
thx
 
4:11 PM
Please put a shirt on
 
4:27 PM
hey
I have created a clock using javascript, I have added a toggle button to change tie format between 12 and 24 hour but I am getting an issue. When I am clicking on the button its not toggling the time on first click but afterwards it start to change but also 24 hour time doesn't change, it is blinking along with 12 hour format......

here is the codepen of the code I have done https://codepen.io/avirk/pen/Yzzwbdv
 
Yall ever had someone just upvote stuff on your account before? like alot?
um
someone like literally just upvoted all my questions -_-
Isnt that bannable??
 
yup
 
@TaylorSpark I don't think so
 
the dude opened a chat room with me
and said he was doing a project, and then just upvoted all my questions :P
like... waaa.
 
@TaylorSpark now that is something
 
4:32 PM
Ive had serial downvotes before.. but never serial upvotes XD
eh, anyways I was just curious
but if they ban him and remove the rep, could he get ME in trouble?
 
no
 
@TaylorSpark not bannable at all, in case they do you are safe
 
i've flagged, will likely be reversed soon.
but no, you won't get actioned for someone else upvoting your stuff if there's no connection
the rep will just be removed
 
4:35 PM
@KevinB why though lol
 
because there abusing the system.
 
@KevinB I am pretty sure a kid will do like that
 
yup
fortunately, claiming ignorance isn't usually grounds for getting away with things
at least, not here
 
so we can chill out not every day these kinds of thing we see
@KevinB wew
 
not really interested in digging through it atm
 
4:45 PM
@KevinB w**
lol seriously
@KevinB in case you get time any help would be appreciated
 
 
1 hour later…
6:11 PM
brain fart question. What is it called when you have {foo:foo} and reduce it to {foo} in an object literal?
 
a shortcut
"Shorthand property names" and "Shorthand method names"
so no real official name, other than literally what they are
 
fetchStats() {
    this._isFetching = true;
    // fetch stats after building url and replacing invalid characters
    return new Promise(async (resolve, reject) => {
      await API.fetchStats(this.rsn)
        .then(jres => {
          this.skills = jres.main.skills;
          this._isFetching = false;
          resolve('success');
        })
        .catch(err => {
          console.log(err);
          console.log('error retreiving stats');
          this._isFetching = false;
          reject('Failed to retreive stats');
 
6:33 PM
I've heard them called "shorthand" pretty consistently
so I'd say that's the closest thing to an official name for them
 
user7437554
would it be a proper use of javascript to change the class of a group of elements in a website?
 
@santimirandarp is done all the time.
 
user7437554
I see...I was wondering why not to do it with python or bash
 
Usually setting that elements display to none. Then changing with class whos display is set to display block.
 
user7437554
cause with js you unload a file, then edit it, every time
 
6:46 PM
Are you working on web?
 
user7437554
I am learning js since the past week so my knowledge is pretty weak
 
user7437554
XD
 
Js = browsers, web.
front end
 
You can't run python or bash in a webpage
 
js = DOM manipulation
 
user7437554
6:47 PM
you can in a file
 
user7437554
so you get the html file and run python
 
user7437554
or bash
 
When you visit a site in a web browser, the browser does not permit the site to execute python or bash code
 
user7437554
it's probably easier to do it with js, I am just trying to organize my head
 
user7437554
Yes but I mean when you are the person owning the file
 
6:49 PM
I think I'm misunderstanding your aim
JS is commonly used for things like: when a user clicks a button on a website, a number of elements' style classes are changed
If you're just trying to find-and-replace in your HTML file, you might as well just use regex
these are completely different scenarios
So can you give a little more context for what you're trying to do?
 
7:14 PM
Hi guys
 
user379888
7:38 PM
Hi all. I am learning Vue and collected some concepts to learn. Wondering if someone could tell me if I am missing anything?
--> Hooks
--> Interpolation
--> Rendering
--> Events
--> Directives
--> Mixins
--> Computed Properties
--> Binding
--> Components
 
I'll make it easier for you, just read through their guide
 
user379888
I am in a bit hurry. One is in a hurry when he/she needs to deliver something. Just pick the things you need. Then when free go read the docs.
 
If you're in a hurry then just jump in and start building an app
and when you're not understanding something then find it in the docs
Just read the Essentials category of the docs and you'll really be good to go
should take you like 45 minutes
 
user379888
Thanks
 
7:55 PM
Hello,

By pressing button/link on page third party AJAX is initiated.
How can I capture that, is there way to capture that AJAX object and do some custom callback after it's done?
 
in what context?
your own website?
 
user7437554
@forresthopkinsa I see. I was being vague..; your comments were helpful
 
8:13 PM
cool
 
cool
also please put on a shirt
 
pretty neat
you might get a chill
 
and also nobody wants to look at you shirtless on stackoverflow; this isn't chaturbate
or twitch, I guess
 
same thing
 
What's the male equivalent of thot? Unless thot is genderless
 
8:15 PM
&madara ndug is being a jerk to the new users again
 
I don't think asking someone to change their avatar for being shirtless is all that rude, my bro
Just let it happen
shhhhhhh
 
he feels more confident this way
 
"new"
 
eh yeah member for 3y
 
"again"
I'm literally the nicest person
 
8:17 PM
you should run for mod
 
I've heard there are some openings
 
I'd rather eat a bucket of apple seeds and slowly die of cyanide poisoning
 
so is that a yes or
 
Well, donald trump did it, so I guess anyone can
My entire campaign's platform will be about building a wall to keep out the help vamps
 
I am sorry, trying to work around.

Shopify store, third party plugin for submitting emails in form.
That form is generated by third party code and their JS file with AJAX action.
I can get that button by identification. That button is initiating AJAX to that third party (Klaviyo). I wondered can I know when that AJAX finished.
 
8:21 PM
that depends on how the request is being made.
so you'll have to dig into their code
Might be worth asking them for help first
It might already have a hook for that
 
They provided me with some simple identification <div id="klaviyos-1234"></div> which with help of their JS file generates that form. When form is buttoned AJAX is made. Just wanted to know is there any way to know that "browser" made AJAX call to certain URL (I think URL is fixed too).

But I will probably go with different way.

They provide three ways:
1. Close form
2. Submit form whith show (success) message
3. Redirect to URL

I think I will go with third one with stopping action before that AJAX is made and doing things I wanted in AJAX success callback.
@KevinB That is the problem over my head, there is no some sort of function with callback I could use to extend with my own custom code and I need to workaround with their rigid solutions after button is clicked.
 
Right. but you first need to know what you're trying to hook into
"ajax" could be occurring via various methods. Unless you want to blanket hook into every possible way they could be doing it, you need to figure out what they're doing.
I'd suggest against things like monkeypatching fetch or xhr in favor of hooking directly into their functions instead, but that'd require knowledge of their code.
 
8:39 PM
I know that when I click `$('#klaviyos-1234 form button')` it will initiate AJAX to `https://a.klaviyo.com/ajax/subscriptions/subscribe` (I assume this URL is fixed, have to be tested though). Wanted to see if there is way to check for AJAX calls on that button events and consequently to know when it stops with status code.
Probably I am going with this redirect to URL option but going to check monkey patch.
Thank you a lot.
 
there isn't
 
9:07 PM
Hey there fellows
Anybody which is doing self emplyment has a great tool for editing bill and cost estimation ?
 
9:20 PM
in VSC terminal on some installations there is a logger that shows an aqua color box loader that runs through messages but I'm trying to see if this is a npm. I dont think this is built into Node. Any ideas?
 
9:32 PM
0
Q: How do I re-assign the else if in javascript to function the same but typed as elif?

ChgearftI'm currently doing some JavaScript programming and don't like having to type else if everytime I need to use it. I would much rather just type elif. I have done tons of research and don't know how I could get something like this... look at code ... to work where I can still say elif, but it is r...

 
hey guys, so I wanted to run nodejs functions in a p5js sketch, does anybody know how to do that ? I have been searching the internet but didn't really come across anything
To be more specific, I have functions that require fs module to read the txt file, and I wanted to display that information on an html page through p5js, but can't quiet figure out how to do that
 
10:00 PM
after more research I am understanding that I need to run nodejs app on a client side, but am still not sure how to do that
 
node.js can't run in the browser
running node.js "on the client" is typically a non-starter, as that'd require having node.js installed. I suspect that's not really an option with whatever p5js sketch is.
 
ah I see, that's a shame
thank you Kevin
 
 
1 hour later…
11:19 PM
 

« first day (3285 days earlier)      last day (1646 days later) »