« first day (3254 days earlier)      last day (1693 days later) » 

12:44 AM
hey i have an stack app which i intend to use it in production and i want to know how can i configure the backend api to work it with the front end easily ?
 
ABC
1:17 AM
Hello
-1
Q: How to fix echarts doesn't display data in Angular

ABCHow to get the value of x and y. here's the code. list.component.ts tempTrendChart() { let x: any = []; let y: any = []; this.global.getData(`/services/getData.php`) .pipe(take(1)) .subscribe((res: any) => { for (let i = 0; i < res.length; i++) { let date...

 
hey, good night
i started this bounty, go get it stackoverflow.com/questions/57862713/…
 
hello.
 
@AlexHunter what text editor is this ?
atom?
 
ABC
@OtávioBarreto
 
ABC
1:32 AM
How do I call the x.push if its inside the global.getData()
i already sent the question above
 
@OtávioBarreto Looks like visual studio code
you can get custom themes for it, but it has the same tab design
 
I have atom, but I would like a plugin to highlight and expand () {}
just like notepad++ does
 
Yup, its VS Code
same icons and tabs
mine just has a midnight theme on
I prefer VSCode over atom or smaller ones like notepad++.
 
cool
what color scheme do you like the most? I like monokai
 
Hmm, Ive never really picked a color scheme per say, Im very lazy when it comes to themes
I just really like blue so I downloaded that midnight theme
oof, almost forgot I need to finish the last touches on my console app before class, and its like 9pm
Im making a console visualizer like chrome's dev tools
 
1:38 AM
@TaylorSpark cool
 
actually, I have about an hour before I should go to bed, I think Ill convert it into a dat.gui app, I like its design better anyways
its too bad we cant put inputs or textboxes INSIDE of dat.gui though
thatd be cool.
 
yeah
@ABC how do you add list.component.ts on the html?
 
Hey is it possible to use strings inside of window["foo"](arg1, arg2); for an argument?
When i tried executing function by name with a string in the name and argument slot, it outputted "undefined"
but running just the name will output the function, but not execute it
I REALLY dont wanna resort to eval()
anyone got any ideas?
 
@TaylorSpark what your string is like? a var = "string" or a "string"
 
its a variable
function logVar() {
 oe.value += fc + " : " + window[text.input] + "\n";
 fc++;
}
like this function will log the variable, and output the variable's name and value to the console
but if I place a functions name in the input, and press log. It just outputs the entire function's code to the console
but doesnt execute it
because as I said before... I dont wanna resort to this:
   eval(fname)(arg1, arg2);
actually... I dont even know if eval supports strings as arguments either
 
1:56 AM
it's a global variable?
 
yes
text.input is dat.gui's output value for the input
 
ABC
@TaylorSpark is it possible that i can call the next data in for loop?
example
 
1 message moved to Trash can
@ABC 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
 
php? I think you may not exactly know what Im asking for XD
uh, basically i want to execute a function if I write FunctionName.Arguments
 
ABC
@OtávioBarreto
 
1:58 AM
and tap the function button, and it sends it to a window[functionName](arguments);
sadly that always returns undefined
 
1 message moved to Trash can
@ABC 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
 
ctrl +k thann past your code
 
caprica is mean.
Otavio/ABC, how do you guys think I should format my variables for my console?

Currently I use this logic: `oe.value += fc + " | Variable." + v + ": " + window[v] + "\n";`

Which outputs `# | Variable.name: Value`
 
yeah cool
 
do you think I should use something a bit different?
 
2:08 AM
no
 
at some point I want this console to be able to log vars, edit var's values, and execute functions
so far it can log, but Im not sure how to implement "editing" the value
probably some kind of "split("=")" function or something
 
thinking
 
oof... now im going into territory im not fond with...
regex and split -_-
I hate regex. its so annoyingly hard to understand sometimes
 
regexr.com something that can help you
 
Well If I really wanted I can write regex, also I actually already use that site XD.

I just hate it because people will write these very large reg exps and I physically have no understanding of what it does
damnit its already 10pm
 
2:15 AM
yeah regex is complex
 
ughhhh I hate highschool... Im forced to sleep instead of working on my projects because I have to wake up at 5 am each morning
meaning I have to go to bed early like I did when I was a kid
 
Hmm... there may be a way to test for numbers using regex in my value.

and if I split by "=" and then use an if statement to look for numbers.

I could possibly allow my console to edit the value of a variable, either by setting it to a string or number
just a simple /0-9/ regex should suffice
 
Rob
@TaylorSpark Yes
If it's returning undefined then you haven't defined the function on window
 
2:27 AM
or... you haven't returned anything?
 
Rob
Oh, yeah
 
well.

If I just run say.. log (log is my logging function) in the input, and I tap variable log, It will type out the entire function in the console
it works, sorta, except, I dont really want it to "write" the function. I want it to execute it using the window function
but window just renders it apparently
 
Rob
window isn't a function... it's just a global object
 
I was googling how to execute function using a string.

in one of the stackoverflow questions, the accepted answer said you could run the function using `window[functionName](arguments);"
 
Rob
You can, if the function is defined on the window object
 
2:32 AM
whats different from defining it, versus what im already doing
 
I'm not entirely sure what you're currently doing
 
Rob
Well.. I don't know what you're doing because I haven't seen the code
But if your code is var myFunc = ..., then it's not defined on the window object
 
39 mins ago, by Taylor Spark
function logVar() {
 oe.value += fc + " : " + window[text.input] + "\n";
 fc++;
}
for example
we have no way of knowing if that's on window or not
 
oh right, sorry the link was way up if you scrolled, here: https://codepen.io/SkylerSpark/pen/JjPZGLP

Its sorta a coding project for a class
 
Rob
If your code is myFunc = ... or function myFunc() { } then it is
(The second assumes you're not in a nested function)
 
2:34 AM
the logVar is only meant to log the value of variables, that works fine
 
Rob
I don't see anywhere in the code you're executing the function
oe.value += fc + " | Executing Function: " + text.input + "\n"; just prints whatever you input
 
Yeah, because i dont know what to write to execute it
see this, this is one of the questions that says you can "apparently" run functions using window stackoverflow.com/questions/359788/…
 
Rob
Forget about window. It's just an object
 
ok
is there a way to execute a function based off whats in a string then?
 
Rob
window['alert']('Hi')
Type that into your console
 
2:39 AM
that would just return undefined
do you mean type it in the javascript?
 
Rob
That's because the function returns undefined. But it'll execute the function and display a popup
No, I mean, hit f12 and execute that line in the console
 
it did
I see now.
I think I know what im doing wrong? maybe...
I was placing window into a string.
 
Rob
Also note that codepen doesn't seem to allow window.alert(), so you might want to test locally rather than on a testbed site
 
I was trying to render a function...
oh codepen does allow it
it seems to have fixed alot of those support problems recently
 
Rob
It does now, but just previously I tested it directly, and it didn't
 
2:41 AM
Ok yes I see what Im doing wrong now
oe.value += fc + " | Executing Function: " + text.input + "\n";
 window['log']()
that executes the fucntion
versus placing the window object into the string, did not
Yup, I plaaced my text.input variable into window, and tested the console. It can now execute functions.
interesting
now Im going to try and make a regex splitting solution in my logVar function to "try" to allow myself to edit variable's values.
Ill be back if I need anymore help, thanks
 
ABC
2:57 AM
how to call the x inside the
```this.global.get(`data/getData`).subscribe((res:any) => {
for(let i = 0; i < res.length; i++) {
x = res[i].temperature;
}
});
console.log(x)```
 
3:13 AM
well Im happy
after a lot of regex and split
I managed to make a system to edit variable values
function editVar() {
 var a1 = text.input; // Your String
 var a2 = a1.split('§', 2); // Split the variables name and value into array
 if (/^\d+.+$/.test(a1) == true) { // Detect if there is only Numbers or Decimals
  window[a2[0]] = Number(a2[1]); // Convert your string to a number.
  oe.value += fc + " | Variable." + text.input + ".value = " + Number(a2[1]) + "\n";
  fc++; // etc
 } else {
  window[a2[0]] = a2[1]; // Just sets value as a string.
  oe.value += fc + " | Variable." + text.input + ".value = " + a2[1] + "\n";
holy lord...
but it works
 
cc@ndugger
 
This is the first time I made something using regex or split that worked the first time...
 
ABC
3:27 AM
Hello
?
 
Hi
lol its 11:30, Man Im totally not waking up in the morning... RIP
 
Rob
@ABC Move the log into your for-loop. Otherwise, it doesn't make sense... you've got multiple results, which should x represent?
 
for loop?
Wdym multiple results?
as far as Ive seen, it does exactly what i need, I mean its not perfect
 
Rob
Pinged someone else
 
OOOOH
im SLOW
 
3:31 AM
also, it shouldn't be outside of the subscribe at all
regardless of what you do with it
 
4:05 AM
Hello any ideas how to use IBuffer object in js UWP?
 
4:22 AM
I'm asking for new Windows.Graphics.Printing3D.Printing3DMesh().getVertexPositions()
 
@AdilLiaqat 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.
 
4:50 AM
Hey people. Meta question here. How do you guys deal with questions where clearly the OP is asking how to do something they really shouldn't be doing in the first place, and with unexperienced users who actually do reply with code that works but is a horrible idea? Sample: stackoverflow.com/questions/57915180/…
(Not posting the link so you all start replying to that specific post now, just wondering how I could better handle such cases on SO)
 
Hello all, I have been front end developer for about 10 months now. I love working with Javascript, however there are times when I feel I only know the BASIC's. I know practice will improve my JavaScript skills. What according to you guys I should be focusing on to get really good at Javascript, THANKS
 
@Heera more than focusing on a language focus on fundamentals
Loops, conditions, method, Oops, cases, data structures (Most Important)
almost every programming languages works on these concepts
 
Rob
5:14 AM
@JacqueGoupil Nothing, really. There are situations where a weird/undesirable implementation is the only feasible solution. We still have answers recommending actively dangerous solutions (chmod 777 for example)
Best you can do is leave a comment warning the OP
Or... write your own answer and include a disclaimer warning against it, optionally providing a better solution/work around
For example, they might not be able to not use a span, as it'd break external dependencies which are searching for a span
 
Oh look! It's Rob :o
 
Rob
o/
 
How is the flying going? ^^
 
Rob
Haven't flown for a month or two now. Had to get my medical done and the doctor was uh... not the best
 
Yikes! That's a shame. Hope you can continue soon :)
 
Rob
5:20 AM
Took about a month for him to submit the results... and only after I subtly hinted to him that his certification requires him to submit it in 5 working days
And a link to the aviation authority saying so..
But even so, I'm taking a 2-3 month break to save up a bunch of money so I can get a whole bunch of lessons done at once before the solo
 
I got mine printed in the office of the doc immediately! Holy shit, that's not professional on his end at all :/
Ah ok, that's fair :)
 
Rob
Also, according to my pilot friend, when he did his 6 years ago - he seems to think he didn't need an eye/hearing/blood test done... which I was told to do
Let's hope he's wrong about that.. or things changed... otherwise I'm out about $500
 
I had to go to a seperate eye doc for a one hour check alone there. At the aviation doc I had blood taken, a hearing test and some balance stuff.
 
Rob
Yeah, but I'm just going for a class 2 (private pilot), not ever going for commercial
 
I only have a class 2 one too!
 
Rob
5:23 AM
Though he was going for commercial, so maybe he was able to just have a basic medical check since he needed his commercial done fairly soon after
 
Could be, yeah.
 
ABC
6:03 AM
Hello?
My question is, how do apply the push if you get your data in api.
example there's 20 data, but I set it into 5 data, how do I get the next Data?
I also use for
for (let i = 0; i < res.length; i++) {
          let date = new Date(res[i].dateandtime);
          let humidity = res[i].humidity;
          data.push({
            name: date.toString(),
            value: [
              format(date, 'MM/DD [\n]HH:mm'),
              Number(humidity)
            ]
          });
        };
 
6:34 AM
huh? unclear question
questions like these are Ben's favorite
 
@ABC The question is the same if I ask you to write a loop which prints out numbers n to n + 5, given n
if you know how to push the first 5, you also know how to push the rest in groupings of 5
 
wow
neil with his wisdom :D
 
Well, I am your boss afterall
 
Is there a sensible way to use encodeUriComponent without it converting umlauts?
 
why wouldn't you want to convert umlauts?
 
6:37 AM
Because my backend is a piece of junk? :)
 
not a problem until it's a problem :P
 
The original code didn't convert them for a reason it seems. They always come out as junk no matter the encoding I choose
 
@Neil -_-
 
6:52 AM
like a BOSS
 
text.replace(
  /[&+,/:;=?@ \t#<>"\n]/g,
  (c: string) =>
  `%${c
  .charCodeAt(0)
  .toString(0)
  .toUpperCase()
  .padStart(2, '0')}`
);
Looks like it falls apart after two calls; but hopefully fixes the issue :)
with a toString(0) call. Good job me.
 
7:11 AM
Is there a way to translate dynamic content? Like with google translate or something? Im not sure what Am I exactly looking for.
As with google translate*
 
@SilverSurfer I want something like X but not X, why?
use google translate API
 
I didnt know there was a google translate API
So do you recommend me that to translate the content?
 
7:29 AM
the way google translation is improvising on daily basis, I guess it's a best API to use
 
Ok ty
 
this link may help
 
7:52 AM
@AbhishekPandey w3schools links are meh for us, experienced regular because it is a bad source for some information
why did you not link the google translate api itself?
 
@AbhishekPandey thanks mate, method, Oops, and data structures is what I need to focus on. cheers
 
@geisterfurz007 good god what is that mess
 
8:08 AM
TS :P
 
8:27 AM
@BenFortune I'm sorry ._.
I just didn't know what else I should have done!
Ok, I know what I should've done
 
@KarelG Yeah, I know the fact, but I couldn't find the link quickly so I linked this, apologies :D
 
that is a poor excuse ya know?
 
8:47 AM
@KarelG hahaa I know, but that's true
 
9:10 AM
@OtávioBarreto visual studio code monokia flat theme
 
@AbhishekPandey yeah, but that is a poor excuse
 
9:24 AM
@Dwigh Bingo
 
are chokidar and watchman related?
because watchman's indian translation in chokidar
 
hey guys im not very good with english
 
@kwestionable 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.
 
That's kwestionable
 
9:31 AM
how will I show options in dropdown, for example current year is 2019, i want the options to be 2017-2018-2019-2020-2021
 
Thank you so much Ben. I didn't want to do it because I wasn't sure if I should :D
 
I don't know what to search lol not very good with constructing english sentences
 
You mean a standard select?

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select
 
use date picker
 
@MeetShah 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.
 
9:33 AM
Only select list
 
Why would you use a datepicker just for selecting a year?
 
That's what I thought
I only need drop down
 
Any ideas how you fill an 4x4 transformation matrix
I'm prob going to math exchange for that one
 
fill it with what?
 
with a vector transform
x,z,y to 4x4
 
9:47 AM
Is this for euler?
 
It - is going to be a great movie but my point was it's for UWP 3d printer
 
Talking about euler angles... You're not giving us enough information
 
There is a Windows.Graphics.Printing3D.Printing3DComponentWithMatrix that have matrix as transformation
 
You know this is the JS room, right?
 
I'm using JS to write UWP which is perfectly legal and viable
I can show you my code if you wish\
 
9:51 AM
Please do
1 message moved to Trash can
Yeah, that belongs in pastebin or a gist
 
Thanks :)
 
Np
Maybe the first line of the matrix is the transform then are the rotation and then translation or something
 
I mean you could create a matrix with all 0 points
 
Maybe but I have transformation to apply
 
11:01 AM
Hello friends.
It seems that our MySQL stops working abruptly at night time.
We are using Loopback2
I am checking the MySQL general logs
but it only shows the queries that were sent to MySQL
how can I know which was the last query that executed successfully?
 
I think your in the wrong subreddit buddy
For something like MySQL head here https://chat.stackoverflow.com/rooms/11391/sql

@zegulas
 
@zegulas if it shows you the queries that were sent up until the point of failure, then logically it would be the last one listed
 
@Neil , boss, my neighbor colleague i sneaking out of your office.
 
neighbor*
its alright
I mispell it a lot too lol
 
does this guy have a name?
 
11:10 AM
Bob
 
@TaylorSpark *misspell :)
 
hello
 
yeah, Kemkar
 
Well Kenkar's fired
 
11:10 AM
but Kenkar never worked for you.
it was Kemkar.
anyway, i'll inform him that boss.
 
good employee
 
Id probably get fired on the first week of Software development, Most likely because I stayed at home and slept in.

I stay up till like 1 am every day working on my personal projects
 
you get an extra coffee next month
 
^ GG
 
how to check for universal code that contains this range `0A80-0AFF`

I tried charCodeAt(0) but I dont want that

https://jrgraphix.net/r/Unicode/0A80-0AFF
 
11:12 AM
Regexp
 
Regex has a range for Unicode??
 
Yes
 
how ?
 
Same way you'd do any range
But with the Unicode points
 
11:13 AM
oh.
interesting. I feel like I could use this
I had a project that required a range of unicode values, but that was nearly a year ago
Well, one day Ill remember and make it
 
Solution?
 
11:27 AM
Hmm... why is the color ID of "darkgray" lighter in color than the color ID of "gray"
Alright, well my javascript console is complete. If anyone wants to review and see if I could make any efficient alterations, Id appreciate it.

https://codepen.io/SkylerSpark/pen/JjPZGLP

I may post it on code review
 
@TaylorSpark Asking the important questions
 
Well this was more of a "course project" and I wanted to go above and beyond with it, So I added things like edit var, exec functions
Plus, I always wanted a custom log, this was the perfect way to make it I guess.
Too bad dat.gui doesnt have large output boxes in their API. Id love to turn it into a dat.gui logging API
Aww man, nevermind, code review is blocked on my school's IP
Atleast codepen and SO work :/
 
@TaylorSpark if you really wanted it to be impressive, you'd keep it the same asthetically but make it so that when you copy the text, it doesn't grab the line numbers
 
0
Q: Waiting for a script to load in VueJS?

not a trollSo it seems Vue is not waiting for Stripe to load, natural behavior most probably. I tried coding a watcher to wait for it but it didn't block render until loaded, am I missing something? <template> <section> <div class="px-8 pt-6 pb-12"> testing </div> </section> </template> <...

Could I ask for some support on this please? thanks.
 
line numbers are good to see, not so much if you wanted to show the log to someone
but otherwise, you did a decent job
 
11:35 AM
Neil, thats VERY fancy. But Id have to rewrite the output. as far as I know, you cant style/edit specific characters in the textarea
 
yeah, would be a pain
you'd need to overlap two textareas perhaps
 
That would be easy to do with a CSS select block, But when I first started working on this, I was having trouble creating new lines
maybe
I just need to figure out how to add new elements to a div without it overwriting the one before or after it.
 
the real trouble comes in when the line wraps
 
but good idea
Eugh.. line wraps
 
you'd have to know how to handle the line numbers on the left in such cases
or prevent line wraps
meh, food for thought
do it when you've got the extra time
 
11:39 AM
hmm..
something like this would work.

NewElement = "<p id='line" + fc + "'>" + cmd.input + "</p> <br id='brk" + fc + "'>"

Maybe...
problem is adding the elements after each other
I tried the insert before thing
tried using selector boxes ( [0], [1], etc) but it didnt work
No Idea then. but itd be a fun extension. Ill probably look into it when I get home later
 
yeah, again, it's difficult precisely because you'd have to separate them
 
Well thats what my variable FC is for
its an incremental number used by all my elements to count up
I just need to learn how to create multiple elements, as the first version actually only created 1 element, and overwrited it every time I sent in a new command
OHhhh, this might work: https://stackoverflow.com/questions/32670902/create-multiple-elements/32671045

The accepted answer is a loop that uses an array for each element.
Hmmmm.
 
you could treat each line like its own (though it would look like it is the same textarea)
surround both elements in a div, so that if the line wraps, the line number beneath gets pushed down as well
 
oh I see what you mean.
hmmm
 
may be the only sane way of going about it
though that may not prevent a user from selecting the text of the line numbers just the same
 
11:50 AM
well will CSS you can block that
 
.noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome and Opera */
}
 
Actually I just got an idea. What if I took a VERY thin textarea, put it on the left side before the first
 
true
 
and added the line numbers in that readonly textarea
and prevented selectors
That could work, and it wouldnt be too hard to implement either
 
again, the problem is if the lines wrap
 
11:51 AM
got a math test
brb
 
good luck :)
 
i want to check if this --$rootScope\.showLoading; is repeated twice with some other code in between in vscode. i am trying to use regex in the search
/^[-\-$rootScope\.showLoading;][\s\S][-\-$rootScope\.showLoading;]/
that does not work..
 
@NishargShah I gave you everything you need to get a working solution. which part has you confused
 
Not now, I find regex that doing my work

/[\u0A80-\u0AFF]/.test('string')
 

« first day (3254 days earlier)      last day (1693 days later) »