« first day (4726 days earlier)      last day (66 days later) » 

3:25 AM
Why do programmers always get Christmas and Halloween mixed up? Because DEC 25 = OCT 31
 
 
16 hours later…
7:20 PM
How does one access overflowAI?
 
 
1 hour later…
8:29 PM
Why is it that we always fetch JSON objects in JS? We have to convert them into js objects afterwards anyway, so why not offer the to be fetched data in a JS Object format??
 
@popsmoke and how would you transmit those "js objects"? :)
 
i am not sure, i havent thought about that :))
 
there we go :p
 
couldnt they be fetched from a js file which resides on the server? or something like that?
 
what?
JSON is literally a JS object (or array or string or boolean or number) literal
you're trying to replace JSON with JSON.
 
8:34 PM
thats true, yet it has to be converted to a regular js object with the json() method if i want to use it in my html / jsx / whatever
i am looking for a way to omit the json() part
if that is even possible
 
this makes no sense and you cannot do that
2
the server might not even be running javascript, so any weird binary format that could be loaded directly into memory at the location of a local js variable would just add loads of complexity, not to mention the security risks
so JSON is already the best way to transmit data that will be loaded into a JS variable
 
thats correct
you right
hey @ThiefMaster
are you working with react by coincidence?
 
among other things yes
 
would you mind taking a look at the question which I've posted here in this chat yesterday?
damn i cant quote it
basically, it was me wondering about the useReducer hook
it obviously takes a reducer function as the first argument

now when I define this reducer function within the component, the basic example code I've posted above fails
but it works perfectly fine once I put the reducer function OUTSIDE of the component.

why is that so?
 
 
1 hour later…
10:10 PM
0
Q: What's an example of a good uninjection in Node.js? (mySQL)

Parking MasterI'm hosting a simple MariaDB/mySQL server on my Raspberry Pi. I would like to know whether or not this code is secure enough to reject an injection attempt made by login/signup, etc. function secureUnInject() { const str = String(arguments[0]); return encodeURI(str.split("\'").join("").substr...

Thanks if you check it out!
 

« first day (4726 days earlier)      last day (66 days later) »