« first day (3457 days earlier)      last day (1483 days later) » 

12:00 AM
you need to just scrape the data with webdrivers and have a sophisticated system to parse the data
hence, selenium/puppeteer
I doubt many of these pages have captchas anyways, why would they require you to fill a captcha to give them money?
 
If i have a list of type map, how would i go about adding and deleting certain values from the field without actually increasing the index of the list?
 
user11867329
@Unbreachable you using GCP?
 
Nope
 
Paz
For some reason the 'await' keyword is not working on Build version of this next code:
pastebin.com/inJ3FYh1

any ideas? It's a small function. rsa.generateKeyPair returns a promise which later resolves.
Please I have no idea what's going on
 
Paz
12:24 AM
Why am I getting errors on Build and not on Dev? (building using webpack, npm and vue)
window.crypto.subtle is also not defined on build but it is on dev
build is acting weird
Is it possible they are using different versions of something?
 
@Paz we would have to see the generateKeyPair definition
it definitely looks like it's using a callback, not a promise
 
Hi guys, im creating a bunch of buttons with createElement("button") and adding click listeners where I want buttons to execute some function(this) and pass its id in it..The result I get is buttons passing window object instead of button object, thus I cant fetch id
 
Paz
@forresthopkinsa I have checked the source code, it resolved on the callback
 
do you understand the difference between a callback and a promise
 
Paz
But it is very weird, multiple things are out of order when on build
 
12:28 AM
any idea what im doing wrong ? If I just create HTML tags with onClick and pass this manually , it works like a charm
 
Paz
I am aware of what a callback and a promise is, and they are using a promise which resolves when the process is done, and then calling the callback
 
@SanchezPanza The this keyword in javascript gets dicey really fast. Are you using vanilla or react?
 
Paz
what is wrong with that
 
vanilla es6
 
@Paz I highly doubt that the function both calls the cb and returns a promise
It's almost definitely one or the other
 
Paz
12:32 AM
It returns a promise, I'm not sure how their callback works now
 
How do you know it returns a promise
 
Paz
but that's the syntax they are using, and that worked for me while building dev version
I looked up the docs and the source code
 
hmmm so this exact same code is working in dev but not in prod
 
Paz
yes it's super weird
I'm also getting an error with window.crypto.subtle which I did not get on dev
 
what's your build step look like
 
Paz
12:35 AM
I'm not sure what that is
And for the window.crypto.subtle thing, turns out chrome stricts it for localhost and secured contexts only..
On build I'm not running on localhost, I'm entering my local address
which I guess is not the same thing ?
 
user11867329
listen to this and relax for 3 minutes
 
Not bad
 
user11867329
12:56 AM
Dale Dan Tony
 
user11867329
at it again
 
user11867329
1:28 AM
Why
 
user11867329
Why is my wordpress admin bar not showing
 
user11867329
and shit
 
1:58 AM
What's wrong with it?
 
@Wayne 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.
 
user11867329
2:20 AM
It's just not showing
 
user11867329
Online says two things:
 
user11867329
Check wp_footer is declared
 
user11867329
and check the checkbox in profile
 
user11867329
both are there
 
user11867329
bar not showing
 
user11867329
2:21 AM
on any browser/device
 
user11867329
back in my days
 
user11867329
whe the machine didnt work, you kicked it
 
4:03 AM
 
4:15 AM
I don't get it
 
user11867329
Me either
 
user11867329
but there's something alive in box
 
user11867329
maybe cat?
 
user11867329
maybe oxycodone?
 
Schrödinger's cat ?
 
user11867329
4:17 AM
No, prolly benzos
 
Why would it be oxycodone? lol
 
user11867329
so much benzos that the box gets a contact high
 
user11867329
and shakes
 
user11867329
idfk, i want oxycodone.
 
Why? lol
It's a box that's all to it
 
user11867329
4:19 AM
kkk
 
user11867329
4:31 AM
@thingEvery
 
@thingEvery 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.
 
Can anyone help me setup Rapidoid? Hours of effort and research and I keep getting errors all over the place when I try to set it up, yet I can find no reference to these errors in any forums, GitHub Issues or GitHub Pull Requests, so I assume it's purely my lack of experience using Maven. I'm good at Bash, so the command line is not the problem. The majority of the errors I have been getting are:

[ERROR] No plugin found for prefix 'org.rapidoid' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/jack/
 
@JackGiffin 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.
 
 
2 hours later…
6:29 AM
Hi All
im trying to update a record using mongoose,
my scenario is, i want to return different status codes for below scenario
1. If ID does not exists in the DB (no document found)
2. ID exists but there is no update to the db, as the data is same
i tried using accounts.updateOne({id: myId}, upDateAccountObject).orFail();
but this is returning the same error as document not found in both the cases
 
 
1 hour later…
8:01 AM
then the document is not there?
and is there not a typo: upDateAccountObject
 
upDateAccountObject - this im constructing in my service layer like below an passing as an object

let upDateAccountObject = {name: "someName", transact: "someTransact"}
 
be careful with that. Many will think that it's a typo
also, you have to debug, check the database ect to find the culprit
 
anyone uses react.js here?
I have a question how to select a data in the state and then update it with a new one.
    this.setState(prevState => {
        const index = _.findIndex(prevState.data, { id: id })

    })
I tried this in vanilla, and it works.
                    let data = response.data
                    let index = _.findIndex(data, { id: id })
                    console.log(index)
                    data.splice(index, newData)
but I'm not sure how to implement it int eh state. sorry, i'm newbie in react.js
 
@KarelG ok
 
@JokerBench not sure what this is, but if you were using the react .setState function, then you have to pass an object, either directly or as a return if you are using a function
eg
this.setState({field: updatedVal});
or
this.setState((prev, props) => {
  const newVar = ... do something and assign value
  // ... other things ....
  return {field: newVar};
});
 
8:18 AM
but my field is an array
not a single object
let us say, there's an id of 3 in that 100 arrays, I want to replace it
 
ah
just replace the field to your new array
but ...
you don't need splice actually :P
myArray[<findYourIndexThatYouWantChange>] = newValue
that can be a problem if there is multiple similar values.
for that, I use map.
 
 
1 hour later…
9:30 AM
Q: how do you calculate the offset from the Frame Pointer? do you do an ADD operation and add the value of the offset to the FP?
 
uhm, I got the context (frame registers) but ... we're in JavaScript room. Should you not be in C++ lounge?
 
ah apologies, i will go to that lounge. thanks for telling me
 
 
4 hours later…
1:08 PM
Morn yall
How do I publish an NPM module that needs to be built on install? Is there a automated build script that I can run?
 
2:01 PM
noidea
 
Windows users, if my app saves preferences to the default location on windows, can other applications edit the file or is it sandboxed?
 
"default location" = ... ?
and yes, other app can adjust/see it
 
i assume appdata
?
 
> appData Per-user application data directory, which by default points to:

%APPDATA% on Windows
@KevinB so yes
@KarelG isn't that like a big security issue?
 
i mean
installing anything at all is a big security issue
 
2:13 PM
as an app dev is it not my job to prevent preference editing?
thats more the userrs and os's?
 
dunno
 
@JBis uhm ... not really. The only security you can find about that is that if another user is stupid to install a malware, only his AppData is infected, not yours.
preferences aren't required to be safeguarded a lot
 
ok interesting
i was going to save a server in the prefs file that can be changed. However, if a malicious server is selected it could be extremely problematic.
 
saving a server?
 
If malware changes the server...
 
2:28 PM
you can do a little checksum check on the file
 
server as in domain/ip of the server
 
it's not easy to workaround that unless someone really targets your application
 
@KarelG but the file will change if the user legitimately selects a different server
 
the checksum is there after the application has made an edit
if it is different, you can suspect that the file got altered by external means
 
can't the malware also change the checksum file?
 
2:33 PM
> it's not easy to workaround that unless someone really targets your application
 
How is that any more difficult than editing the original file?
 
let's say you have a file
IP: 123.24.35.65
server: 7896321
upon creation of change: a checksum is calculated. Store that in the registry
like it becomes 987654
now, you use the file
re-calculate it again -> check registry. If equal then ok
but assume that an external program does this
IP: 69.666.69.666
server: 7896321
then the checksum is different
unless the hacker really wants to attack your app
 
hello?
 
then he checks your code
 
@Panda from the other side?
 
2:36 PM
and sees "ah he uses this to calculate checksum and stores it there"
 
can I share my problem?
 
ofc it's hard to defend yourself from that but this falls down to the user: he shouldn't have installed it
(and that's when AV comes in the play: they try to keep track changes made in registries. If another app makes a change on a given key, it just flags it)
 
cause I'm having trouble. it doesn't play the audio. when I try to refresh "ERROR Error: Uncaught (in promise): NotAllowedError: play() failed because the user didn't interact with the document first."
https://stackoverflow.com/questions/61013777/how-to-play-a-audio-in-angular
 
ah ok
 
one of the strategies in malware scans is to check if they target essential registry keys
 
2:40 PM
ok thanks for help
i'm writing my first medium article on zoom
 
@JBis fyi, if you want to add another layer: microsoft offers a library for symmetric encryption to protect sensitive data. It's kinda overkill in most applications (hence you see information stored in plain text) but you can use it.
.NET framework has ProtectedData class for that (uses DPAPI)
not sure if there is an Electron variant :P
@JBis fyi Zoom is not secure
 
Yes. I've been frustrated by their security practices for years.
 
there's a big red flag lately :P
loved the UNC path injection trick
 
yup and their macos install script was basically malware
 
hehe
 
2:45 PM
But their tech is interesting and there isn't much information on how they do what they do. So I wanted to document it.
 
and many people is using it because of COVID-19, a lot articles suggests this for business meetings
 
yes, and schools
i've learned people don't care about privacy or security until its too late
they care that they have been hacked, but don't care that they could be hacked
 
do you know the OSI layer?
 
and when the latter transforms into the former people ask "how did we not see this coming" even when they did
 
layer 1-7?
 
2:49 PM
Yes, for the most part.
 
well, each layer have their own security mechanisms
my security professor once said: even if all layers got tightly secured, there is still some vulnerability: the layer 8
those are beings called humans
 
the user
lol yep
 
so, what you can do is to have a good balance between security (just apply best practices), performance and usability. I just give a bit more weight to security but don't overdo it.
 
so i've spent the past two days (~3 hours) reverse engineering compiled js code so i figured i share with the world what i learned to save the next dev
 
I've had a person here securing a feature that was recording, calculating some regular download log data as like it's a personal medical info.
 
2:54 PM
lol, yeah def a balance
 
that is just id + ip + file downloaded + timestamp
and IP gets erased after 3 days (replaced by contact id)
loved his face expression when I told that
 
haha
 
 
2 hours later…
 
2 hours later…
6:15 PM
Madara still helping me months after leaving chat.stackoverflow.com/rooms/17/conversation/…
 
6:55 PM
@JBis What's the matter?
 
7:13 PM
@geisterfurz007 I'm back
 
Hey back, I'm Dad!
Sorry, we had a dadbot on our server for april fools :D
 
jk :D
So, have you used Redux or exclusively mobx?
With MobX, how would you shared state/stores between components?
And how would you design if multiple components need to listen and send to a websocket instance?
 
Whats up people
 
7:31 PM
Hello all, Is it possible to access webcam by multiple processes at the same time. I need to show camera feed on web page using JavaScript and access webcam at back-end for motion detection using python
 
@pravid 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.
 
@pravid yeah sure why not
 
How? 'Coz currently i get error in one application if camera is getting accessed by some other application
Appreciate if you can share any link to the solution/steps
 
whats da error?
 
Failed to allocate videosource at front-end
 
7:40 PM
js error?
 
yes
if I stop the python process, it shows proper camera feed at front end
 
@JBis Oh fuck, I forgot there was a conversation here as well, sorry! Umm just MobX because I still don't understand redux
 
@pravid what is the js error you get?
 
@JBis If you need a single instance, I'd just export one that can be imported from all places that need it (although I am not sure if that is good practice). Otherwise I guess you can either make a HOC that passes the instance you need to a component or pass them to the components if that is possible and easier
 
Failed to allocate videosource at front-end
 
7:52 PM
@pravid thats not a js error
are you using a framework?
@geisterfurz007 HOC?
 
Higher order component. Basically a component or function you pass another component into to wrap it in other stuff, add functionality or pass additional props
 
ugh, i dislike the pattern of passing down state to 50 components
 
@JBis It is js error, Full error message here 01:15:34.779 navigator.getUserMedia error:
MediaStreamError { name: "NotReadableError", message: "Failed to allocate videosource", constraint: "", stack: "" }
main.js:278:15
 
it defeats the purpose of using a state management lib
 
You wouldn't do that; give me a second
 
7:56 PM
@pravid I was wrong. On macos and linux you can, but on windows only one app can access
27
A: NotReadableError: Failed to allocate videosource

Octavian NaicuNotReadableError is the spec compliant error thrown by Firefox when webcam access is allowed but not possible. Most commonly this happens on Windows because the webcam is already in use by another app. Firefox will throw this error on both Windows and Mac even though only on Windows processes ge...

 
@JBis we can do it on linux or mac? Anything we need to add at JS level for this?
Thanks
 
@pravid nope
 
@JBis paste.ofcode.org/LWADH2rYDGm9spCW9kmiLZ Something along the lines of this (I am not 100% sure of the syntax but that is the general idea). Instead of passing the store manually down the tree, you can wrap the components that need it using something like withStore to sneakily pass in the store
So you can export a "lower level" component that needs the store and all of the rest in the hierarchy doesn't know it's there essentially
 
ah cool
what about multiple instances?
 
Probably depends on the usecase
import SomeStoreClass from 'stores/store';

export const ComponentOneStore = new SomeStoreClass();
export const ComponentTwoStore = new SomeStoreClass();
export const ComponentThreeStore = new SomeStoreClass();
Easy and lazy way :D
 
8:11 PM
lol
ok i gtg i'll b back with more questions soon thanks!
 
No problem! I hope I didn't cause more confusion :D
 
@theastronomist 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.
 

« first day (3457 days earlier)      last day (1483 days later) »