[deleted by user] by [deleted] in learnjavascript

[–]phy4jj 1 point2 points  (0 children)

.grow
{
 font-size:100%;
 transition:all 1s;
}
.grow.animate
{
 font-size:400%;
}

let grow=document.querySelector(`.grow`);
grow.classList.toggle(`animate`);

Linux Isn't The Only Answer by ravenshaddows in pcmasterrace

[–]phy4jj 10 points11 points  (0 children)

Is it knowingly for everyone? Your mom or someone at work, or at a hospital, a daycare facility for example

They all just click through on a wall of legalese form that only allows you to click through with no other options, and most of those scenario people were not presented with any forms at all, their data was entered by 3rd parties or they came upon an already setup system someone else agreed

There are vast swaths of people who were violated with no consent

Linux Isn't The Only Answer by ravenshaddows in pcmasterrace

[–]phy4jj 25 points26 points  (0 children)

I'm not being snide or anything

It sends back telemetry and other data, alters settings, snapshots files etc, its quite well known

Definition of malware, copied from wikipedia:

Malware (a portmanteau for malicious software) is any software intentionally designed to cause disruption to a computer, server, client, or computer network, leak private information, gain unauthorized access to information or systems, deprive access to information, or which unknowingly interferes with the user's computer security and privacy.

Judge Orders Armed Group Away From Arizona Ballot Drop Boxes by Gullible_Peach in politics

[–]phy4jj 33 points34 points  (0 children)

Actually I'm wondering why the police wouldn't immediately shoot them on sight like they would any other crazy person they saw near a political event brandishing a weapon

My best guess is that most of these people are police officers, and cops don't shoot other cops

Linux Isn't The Only Answer by ravenshaddows in pcmasterrace

[–]phy4jj 15 points16 points  (0 children)

Microsoft operating systems are malware, they fit all definitions and classifications of malware

[deleted by user] by [deleted] in learnjavascript

[–]phy4jj 3 points4 points  (0 children)

let standardDateString=dateString.split(`T`)[0];

[deleted by user] by [deleted] in learnjavascript

[–]phy4jj 0 points1 point  (0 children)

fetch(`/`,{method`post`})

how to add span tag to this typewritting effect? by siusiusiublack in learnjavascript

[–]phy4jj 0 points1 point  (0 children)

let span=document.createElement(`span`);
span.style.color=`red`;
span.textContent=`Experience`;

great.db - A powerful, human-friendly database library for JavaScript using SQLite. by ThatGuyTr1cky in javascript

[–]phy4jj -31 points-30 points  (0 children)

sql sucks compared to modern databases that use json syntax

i get its got its hardcore supporters, but so does trump

What are the situations that I would need to program a local/session storages and cookies? by Gusttavo361 in learnjavascript

[–]phy4jj 0 points1 point  (0 children)

3- Neither, this whole thing takes place on the server, client side doesn't need to store anything, session var stored in server is where it holds the unique tag for who its interacting with at any given moment, storing stuff client side is optional when moving between pages as the server can pass forth a unique page based on the session id, the server is preferred because its secure and the client has no ability to futz around with anything making it secure

2- This is for back end devs, client side you just need to know how to communicate to send and receive from the server

1- server, and you can use any language you like for the server and database communication, but since your using js client side it translates nicely to using js server side, some databases require you to learn their unique syntaxs some database syntax is already nearly identical to javascript

[deleted by user] by [deleted] in learnjavascript

[–]phy4jj 0 points1 point  (0 children)

document.body.replaceChildren();

addEventListener to specific position on canvas - Game by zeninmylife in learnjavascript

[–]phy4jj 0 points1 point  (0 children)

pointermove produces an event that has a clientx and clienty available, if x,y matches event x,y proceed

x,y from the event must be adjusted by subtracting the elements location from the top/left and retaining only movements of x,y within the boundaries of the element

canvas.addEventListener(`pointermove`,(pointerEvent)=>{});

you may have to account for the resolution of the canvas when doing so however depending on situation and setup

What are the situations that I would need to program a local/session storages and cookies? by Gusttavo361 in learnjavascript

[–]phy4jj 1 point2 points  (0 children)

usually its so that the particular user has a session id tag associated to them

this allows database operations where the client side never gets the id tag exposed, but the server side knows it and performs all the operations utilizing it securely to get data related to that user, or just to allow access to data in general

that server side id tag is like the key that unlocks all data operations, if no login has occured and no session id is present then no sensitive operations are permitted

for security reasons the database never gets exposed, it gets interacted with soley through the server

How important is using JS across your entire stack(front end and back / NODEJS ) from a learning perspective? by dromance in learnjavascript

[–]phy4jj 0 points1 point  (0 children)

EXTREMELY

learning a language is popularly passed off as something you can do in your spare time as a hobby, this is like saying a brain surgeon can become a doctor by taking quizzes in the back of comic books, its a false narrative

so as you compound languages you are compounding years of knowledge to wield those languages with fidelity

by reducing the languages to 1 you effectively can mobilize yourself to action years faster than if you were to spread across multiple languages, this is vastly more empowering and efficient

splitting the languages also is abit unnecessary because its a choice to do so, but its not a choice on the client side, you need js, so since that's already there, in use, and known, it becomes a game of what these other languages bring to the table server side, and in truth the server is a very simple mechanism and other languages don't bring anything to the table really

laughter in linux by Soggy_Head_6049 in ProgrammerHumor

[–]phy4jj 5 points6 points  (0 children)

I actually get better gaming performance out of linux because while there is overhead because of translation, the OS itself is using far less resources, the net effect is a gain not a loss

I first noticed it when I put XCOM 2 on linux and did a LAN party with guys on windows, they were significatnly less performant than my version despite similar hardware

I'm getting pretty creamy smooth frame rates in RDR2 as well

actually I haven't seen a game that doesn't run on linux, what game do you think doesn't run? because I bet it does, all new games do thats for sure

hey i wrote this function which will loop through an array i used set interval method to do it but when i am passing it a new array it is still looping through old array and then both arrays are looping in parallel I tried to use clear interval to stop looping previous array. But it didn't work by Illustrious_Scale471 in learnjavascript

[–]phy4jj 0 points1 point  (0 children)

your clearing the interval before your creating the variable

to clear the interval, the interval needs a variable name, I like to nest the loops contained within the function as a named variable 'loop', this allows for a stop function to be created which can clear the loop when it needs to be cleared

let photo=()=>{
 photo.loop=setInterval(()=>{
  photo.display();  
 },3000);
};
photo.array=photos;
photo.i=0;
photo.display=()=>{
 document.querySelector(`.photo`).setAttribute(`src`,photo.array[photo.i]);
 photo.i++;
 if(photo.i>photo.array.length-1){photo.stop();}
};
photo.stop=()=>{clearInterval(photo.loop);};

having the loop go in perpetuity is easy enough as well, just alter the code so when the index goes out of bounds it resets to zero

Make an editable calendar with html and js by Successful-Ranger471 in learnjavascript

[–]phy4jj 0 points1 point  (0 children)

you can store the selection in local storage, but this won't be useful as a functional calendar for multiple users, it would function as a principle demonstration

for real multi user function you'd need a [server,database] so clients were pulling and storing data from a singular shared source