« first day (3280 days earlier)      last day (1890 days later) » 

01:56
Made an extremely simple ejs static site generator if anyone wants to use :)
first attempt at a CLI app
02:57
đź‘Ť
03:45
I keep getting "string literal contains an unescaped line break" on: url: "js/chat-system.js", using jQuery ajax. It's really not making any sense to me, especially because the code is working perfectly fine on local wamp test server
Never mind, the issue was inside the js script it was trying to fetch.. my bad
 
3 hours later…
06:26
hey
Can you unregister a custom element at runtime? Not seeing anything related to that on the docs developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/…
I have a case in an Angular app where I need to update a custom element's src attribute at runtime. In order to _cache break when the view is reloaded given the new src URL
so I'm pretty much doing this to update an existing custom element's attributes. But as can't as it's already registered. The error itself is coming from `polyfill.js` calling define to define it as a custom element..after I run the native JS code below


    const script = document.createElement('script');
    script.src = component.resources.js;
    script.id = component.id;
    script.type = 'module';
    script.onerror = () => {
      this.onResourceLoadError(component.resources.js, component.id);
07:10
@All hi
08:10
hi
 
2 hours later…
10:24
I have a query related to .include function in es
Obj1 = [1,2,3,4]
Obj2 = [{id:1, otherProp:"something"},{id:2, otherProp:"something2"},{id:3, otherProp:"something3"}]

if (!Obj1.every(element => Obj2.includes(element))) {
            return next("Incorrect Idpassed");
        }
variable names starting in upper case? :P
here earlier Obj2 was a single array object having only id's so i was successfully able to get the desired result.
Now the issue is Obj2 is again having two properties, but i need to check on "0" index property

if (!Obj1.every(element => Obj2.includes(element[0]))) {
return next("Incorrect Id passed");
}
you need to use .map beforehand
actually i reversed the objects
if (!Obj2.every(element => Obj1.includes(element[0]))) {
return next("Incorrect Id passed");
}
element is an object. You can use element.id
10:30
as the 0 index property is in obj2, and its working.
Any risk or issue with this approach
yes. Just write the key name
I am surprised that it works
actually my array dont have a property name and it comes like this
0 = Array[1]
      length = 1
      0 = "myId"
     1 = "something"
sorry for posting like this as im not able to post the image
and the reason why im getting it like that is, i used map function to get only required properties from the array
const obj2 = mainArray.map(({myId, something}) => [myId, something]);
so if i do what i did above, it wil be without property names.
well, that detail does not have to be included, no?
if you only need ids, best to exclude that something
or split it up in two arrays.
or just map to id
that array is just not convenient to work with imo
11:00
@KarelG actually the now i need obj2 as an array which will have id as well as something, both the values.
11:13
why don't you keep it as an object array then?
like this one
> Obj2 = [{id:1, otherProp:"something"},{id:2, otherProp:"something2"},{id:3, otherProp:"something3"}]
oh, the chat isnt dead today, thats good I guess
eh. it is a desert nowadays. You only need some luck to have some activity
this chat used to be quite popular
there were a lot of room owners, and there were some rather opinionated arguments which caused flags to drop and a lot of people's feelings to get hurt
so they decided it was best to strip most people's room owner status, and most people I guess kinda just stopped coming after that
well, its still popular, its just not very loud
sometimes rooms like C# will turn into full on loud conversations
this place is kindof... quiet
yep, which is sort of surprising when you think about it
javascript is kind of a big deal these days
11:28
for the amount of webdevelopment out there.
I wonder if JS will ever... ya know.. get old
Im sure in a couple decades something new will pop up and change everything
it always does
oh it's already showing its age
Well I mean, like will it ever die
but that's fine. There are languages like typescript which let you build on top of it
@TaylorSpark nah, do you know of a language that has died? like really and truly?
I would love to make a language interpreter one of these days
but I feel like itd be a pain in the arse
maybe later in my life
when Im working in a big company
@Neil ...
Lua
LuaU, LuaC, Lua
They are only formatting languages used in a few programs now, like roblox and cheat engine
I guess in CE its pretty important, you can overwrite data arrays and memory with it.. but barely anyone uses it for anything else.
if I had to think of another dead language... HMMMMMM
BASIC
Not sure..
@TaylorSpark plenty of games use Lua
you had better believe that basic is still used..
nobody wants to attempt to convert basic to another language
11:33
Ive never heard of any other games besides roblox using it, also roblox interprets lua, its not actually built off it
Hi $(window).bind("beforeunload", async function (e) {
return "You have some unsaved changes";

});
this function is not work when i add async
I won't pretend that new programs are being made using Lua or Basic, but old programs still very much use them
@RaheelAslam jquery does not expect a promise-based function
Raheel, thats jquery, go to the Jquery forums and contact the devs
oh has this been a problem for a while?
@TaylorSpark ...
11:34
but any way to do in javascript ?
Whats wrong?
is there a reason to use async for that ?
maybe you are using await within it?
$(window).bind("beforeunload", async function (e) {
              return "You have some unsaved changes";
              let check = await listenDom();
          });
i want to check dom is change or not using await method
11:35
whats inside your listenDom function
jQuery has a promise-like functionality, but is different to the async await you know.
async function listenDom() {

    let isFormChange = false;
    let changeFormApiUrl = `${baseApiUrl}form/checkFormChanged`;
    let schema = await getSchema();
    let formSettingObject = await getFormSettingObject();
    let formSettingObj = Object.assign({}, formSettingObject);
    delete formSettingObj.id;
    formSettingObj.form_id = $(".saveFormBtn").attr('data-user-task-id');
    schema.forEach((data) => {
        delete data.id;
    });
    formSettingObj.form_data = schema;

    let schemaData = JSON.stringify(formSettingObj);
do you want to do something when the DOM changes?
yes i am comparing json
from server side
fyi there is MutationObserver to observe DOM changes.
11:37
Im assuming hes trying to make one of those "Have you saved yet" message boxes that appear in some sites if you try to leave without saving changes
you could make a simple unload event listener with a confirm box that would execute a function to save your data. then use setTimeout or something to slow down the site for a couple seconds
Hello everyone
what you can do is
Im hoping someone can merely set me sailing thr right direction, then I got it from there
@KarelG i have tried this but main concern to check data from API.
@rlemon and @taco had helped me with just enuff clues to be able to code an image capture functionality but now Im stuck in Analysis Paralyisis
11:39
$(window).bind("beforeunload", _ => task().then(...));

async function task() {
  let check = await listenDom();
  // return something and use then in the above to display your msg
}
but since you are already using javascript at that level, I suggest to use window.addEventListener('beforeunload', ... ect
@stuart what are you trying to save an image of? If your needing to save a canvas, I already made a project for that which supports 3 different formats if you want to check it out
as far capturing HTML elements other than Canvas, well, Ive never seen a reason to myself
@TaylorSpark Thanks for commenting
I can't solve the issue with firebase yet. Spent more than 24 hours on it. Opened an issue in Github github.com/firebase/firebase-tools/issues/1705
Amateur name selector
Sry about that
Allow me to explain
11:42
codepen.io/SkylerSpark/pen/ZEzMMWK - CETGui Canvas Exporting Tool Gui
small little API I made while I was bored
hey..does anyone use Code Review on Stack Exhange?
Sometimes
Im currently drawing to a canvas and saving as a .jpg, Im just not sure on the next step
I've written some long winded NgRx code and I'd like to get some feedback if its good or not
Rarely though
11:43
anyone feel generous enough to critique my code here? Can link a quick gist
IM replicating similar functionality to what can be seen here
begins at 5:40
@KarelG let me try this
Ok, Stuart, if your wanting to save a canvas
first select with with document.getElementById();
My next problem is how do I iterate to the next pic?
then, youll want to use the .toDataURL(); Function to convert the canvas to an image
11:44
Plz see video
Next Picture?
you mean like capturing MANY images?
like a video?
See video
ok
well moving to math class, wait a coupel seconds
Ive tried Googling ctx.drawImage() in loop
but I think Im barking up the wrong tree and just wanted to get sent the right direction, Then I got it from there
Just need a clue or 2 for the next step
window.addEventListener('beforeunload', async (event) => {
let check = await listenDom();

alert(check);
// Cancel the event as stated by the standard.
event.preventDefault();
// Chrome requires returnValue to be set.
event.returnValue = '';
});
@KarelG this function is not working but only jquery is working.
11:47
This is where Ive made it to so far
Oh, sorry stuart, Im not allowed to watch videos at my school :3
@RaheelAslam you need to clarify that a bit more
Only a test page
Not even YouTube?
I think I get what you mean though, you want to be able to move frame by frame between images
which for window onload?
11:48
nope
can u see the link to my site?
"this function is not working but only jquery is working" is confusing for me.
If you want to move frame by frame, you can use a video element for that, as rendering many jpegs is bad
JPEGs are high quality images
Not what I want
Youd have to see example
Sorry, I just cant understand it from my end
11:49
youd have to see example
cant really explain any other way
Akin to explaining how to balance a bicycle.
:47524904 I means
window.addEventListener('beforeunload',  (event)  is not working but $(window).bind("beforeunload", function (e) is working
@KarelG is not show popup
window.addEventListener('beforeunload'
whelp. IF you change it, you need to reflect it in that other place. But keep it as it is because a correct working code is important :P
@TaylorSpark Basically I want to use ctx.drawImage() to take a pic from webcam of one side of a bike, save it, be able to walk around other side, take pic and save it. Walk around front and take that pic and save it, then walk around back of the bike, take a pic and save IT, All using the webcam and ctx.drawImage()
BOOM
Thats It
Yet Im not quite sure how to address that and google.com/… doesnt seem exactly right
anybody have experience in deploying angular universal app to firebase?
I'm getting some error. I mean, relative routing is working. For example I can visit site.com and from it, I can navigate to any page. But absolute url isn't working, that is when I visit site.com/home or site.com/contact, it doesn't work.
This is the site https://v2.self.demo.sagarvd.me this link works but v2.self.demo.sagarvd.me/home doesn't. Also if you visit v2.self.demo.sagarvd.me then it'll automatically redirect you to /home
:47524459 i tried doing this
let obj2 = myArray.map(({id: myArrayId}) => myArrayId);
but it returns undefined.
11:59
._.
You can navigate to any path via navbar or other links. However entering a path directly in browser doesn't work. Also reloading the page throws error
you just need to do .map(obj => obj.id)
The error is
> Error: could not handle the request
And getting this in firebase functions log
> TypeError: handler is not a function
at cloudFunction (/srv/node_modules/firebase-functions/lib/providers/https.js:49:9)
at /worker/worker.js:783:7
at /worker/worker.js:766:11
at ZoneDelegate.invokeTask (/srv/dist/server.js:574:31)
at Zone.runTask (/srv/dist/server.js:346:47)
at ZoneTask.invokeTask (/srv/dist/server.js:649:34)
at ZoneTask.invoke (/srv/dist/server.js:638:48)
at data.args.(anonymous function) (/srv/dist/server.js:1618:25)
at _combinedTickCallback (internal/process/next_tick.js:132:7)
I followed the official docs to add universal and this article to deploy it to firebase
I don't have any problem in deploying aot build but universal doesn't work
Please be aware that there are no firebase developers here. Not sure if there are ppl that worked with it. But yours github issue is only 6 hours old... Give the dev (team) some time to have time to read it and answer it
I'm not sure it's an issue with firebase. It may or may not be. I saw it worked for lots of people. Firebase itself is not a thing. It's just a platform to host
It's an issue with Angular Universal
12:10
@stuart Thats something you can do easily with a basic camera program, why are you trying to put this into canvas? I think your maybe overcomplicating the process a bit.
If your just walking around an IRL bike and taking pictures, it may not be something for webdevelopment
the only reason I can see you needing this for webdev is if your making a page that "Explores" motorcycles, and shows a couple different images of them
@All anyone having some info about SendGrid module in nodejs to send emails.
im able to send one mail at a time, but i need to send suppose 10 mails depending on some condition.
i can loop it and do, but is there any api which will directly handle the complete array object of the mails to be send.
OMG Taylor... Really??
Must have not seen video
Furthermore have you seen the core of my site?
13:26
hello
Just have a simple image overlay over the canvas for the outline of the bike
There a way to refresh the javascript in IOS, force closing the app and restarting it didn't do it. Adding a ? to it seems over complicated
@juanvan Reload the page, or just call the functions you need.
What do you mean the JS in IOS? Are you using React Native?
13:51
Native
Reloading doesn't reload the JS file, the name doesn't change so it see it as cached
Also, why do you need to "refresh the javascript"?
How else do you test the changes in the Javascript?
With the hot reloading that's built in...
Is that just reload?
@juanvan most browsers offer developer tool options where you can disable caching of javascript
disable caching and simply reload the page to force a download of javascript
That looks like what I needed
I'll pass it onto the windows xp guy see if it makes him happy
hint: he's on windows xp, nothing in the past 20yrs has made him happy...
Lmao, how many tools don't work on his PC?
Lots; he has a 10 machine, I installed last year, and he started using it this year
just for testing, and email
14:33
Just curious if anyone knows of this error:
I was making a JS function to set the background of an element
<option value="linear-gradient(to right, #87e0fd 0%,#53cbf1 49%,#05abe0 100%);" id="grad1">Blue Gradient</option>
function start() {
 fillbar.style.background = styleva.value;
}
when I logged styleva (my style variable) in console, it returned the linear gradient
but its not setting the elements background
but setting fillbar.style.animation or fillbar.style.background = "Red" it works fine
do linear gradients not work when placed directly into the background?
@All hi
var new = myObj.filter((objDistinct) => objDistinct.language == "en")
Why are you trying to ping all sam
dont ping people for no reason
im doing something as above, but what all i want is, that i want to modify a property in objDistinct like objDistinct.myProp = "i have changed this."
how can i do in my above arrow function.
can it be done in one line or will need to have a multiline arrow function
@Stuart You haven't provided any actual code yet
He provided something earlier
based on async and JS
14:39
TY Taylor
No, he's provided random links to random sites
Nevermind I found my issue
I was setting my Linear gradient as "linear-gradient();" and sending it into my function
but the function automatically adds a ; to the end
causing it to not render
its all good now
I am trying to integrate
in my application...
when I downloaded the plugin
I see there is a file with an extension called .css.map.
where this .css.map file supposed to be placed
inside CSS folder?
or fonts foler?
there is no readme document in the plugin
let htmlObj: (myArray.isValid) ? objCountryResponse.filter((objCountry) => {
                                if (objCountry.language == tempo[0].language) {
                                    objCountry.innerStateValue.replace("yourEmail", "[email protected]")
                                }
                            }) : objCountryResponse.filter((objCountry) => {
                                 if (objCountry.language == tempo[0].language) {
                                   objCountry.innerStateValue.replace("yourEmail", "[email protected]")
14:45
why the flag on this specific comment ?
can i optimize or reduce the arrow functions line of code, of returnning the object with some modification?
calm down, man
y'all can flag mine, it's justfiied
3 messages moved to Trash
yeet
don't flag the trash bins you plebs
14:57
That's funny, but at the same time eh, if you said it in chat, it's flaggable, even if you move it to a room called 'trash' to try and hide it
Meh, Ben's message was dubious at worst...
Quick question for you JS experts, can you refactor HTML/CSS/JS?
@Cerbrus FWIW I'm just talking in general, not about specific messages
You can refactor anything
I tried refactoring my life once, now it doesn't run so well
2
15:01
I'm not talking manually
@TylerH I'm well aware, it was just a deterrant
@TylerH Ah, 'kay
I'm aware that C# has a refactoring tool?
deterrent?
Can that be applied for JS
15:01
@AaronHall Yea... I come in here, see that mess...
Then I was looking through the logs to see what triggered it.
@yosh That is less a language tool and more an IDE/Editor tool.
C# has a few IDEs/Editors (with extensions) that have automatic refactoring capabilities, but they're irrespective of the language itself. So you'll just want to look into external tools like that for anything else.
@BenFortune correct
Thank you
Refactoring is taking the specification for repetitive declarations or functionality and putting it in a single place. It can improve maintainability of code, but it doesn't necessarily make the operations more efficient.
I've had it a few times where after I've refactored it's slower, but order of magnitudes better in terms of features/extendability
15:19
How might one refactor their life? a single specification -> A single calendar? A single communication point? A single way of dealing with people? (that one might not work so well)
They installed Honey in their browser.
Bam, insta refactor.
everyone is a green and blue piece of paper
by that I mean... everyones profile pictures are missing -.-
15:50
sounds like a you problem
user7437554
16:08
what is the highest 'element' in a browser? 'window'?
depends on your definition of "element"
16:42
1 message moved to Trash
Window is an object. Typically the highest “element” is the html tag
17:05
document.documentElement is the <html> tag
 
2 hours later…
18:47
Hey folks, what would be a good name for this function.
const refl = (x, y) => deepEq(x, y) ? x : y;
If x and y are extensionally equal then we return x so that the result is intentionally equal to x. Otherwise, we return y.
How is that different than always returning y?
bsides that they're not necessarily the same, even if they may be deep equal?
Because of intentional equality. Later on, we can write x === result where result is the result of the refl(x, y). In doing so, we don't have to compute whether they are equal again.
Yes, they need not necessarily be the same. For example, deepEq(new Set([1, 2, 3]), new Set([1, 3, 2])) would be equal.
19:15
I have a question for you guys
is there any possible way to extract video data from a NodeJS process? More specifically I am trying to extract frame data from videos. I am looking for a single dimensional array of RGB data for every frame. I was using OpenCV4NodeJS but that is extreme overkill. Any ideas?
user7437719
Im not too sure about that. NodeJS is preliminary buggy.
I am having no luck
user7437719
Have you made a question on SO rather than just asking here?
No but I have seen other people ask similar questions that don't have great answers
user7437719
19:44
Does anybody have help for Jimmy Leahy?
user7437719
20:03
Ask on SO; see if someone gives good reply
20:14
OpenCV seems to be the way to go though
I implemented the solution originally with opencv4nodejs but there are a few problems. One is that it is a massive library for such a seemingly simple task. The second is that it fails to build when electron-rebuild is run (I am using this in an electron project)
Tried everything suggested any no success
user7437719
20:43
One is not as much of an issue as two
posted on October 09, 2019 by Bethany Nicolle Griggs

Notable changes deps: upgrade openssl sources to 1.0.2s (Sam Roberts) #28230 Commits [cc9d005628] - crypto: update root certificates (Sam Roberts) #28808 [347fcd35e3] - crypto: update root certificates (Sam Roberts) #27374 [b2a6b3254d] - crypto: update root certificates (Sam Roberts) #25113 [5682e50325] - deps: add -no_rand_screen to openssl s_client (Shigeki Ohtsu) nodejs/io.js#1836 [9663ae

21:22
Yeah I have been pulling my hair out
Jay
Jay
21:51
jQuery questions okay in here?
I have a asp:Repeater with dynamic rows and I'm trying to put a checkbox in each row, with a checkbox in the header to select all

« first day (3280 days earlier)      last day (1890 days later) »