/wdg/ - Web Development General

Previous thread: >Beginner Roadmap and Overview
github.com/kamranahmedse/developer-roadmap (don't be overwhelmed, ignore the later parts and go step-by-step)
youtube.com/watch?v=UnTQVlqmDQ0

>Free beginner resources to get started
Get a good understanding of HTML, CSS and JavaScript.
developer.mozilla.org/en-US/docs/Learn - a good introduction to HTML/CSS/JS and Node.js or Django
freecodecamp.org - curriculum including HTML/CSS/JS, React, Node.js, Express, and MongoDB
javascript.info - curriculum providing a strong basis in JavaScript

>Further learning resources and documentation
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
hackr.io - crowdsourced collection of tutorials (ignore sponsored stuff, look at upvotes)
learnxinyminutes.com - quick reference sheets for the syntax of many different languages
pastebin.com/gfBPg24A - Collection of PHP links.

>Need help with some HTML, CSS or JS?
jsfiddle.net - create an example here and post the link
codesandbox.io - or here if you're using React/Angular/Vue

Attached: w.jpg (1280x720, 133K)

Other urls found in this thread:

tailwindcss.com/
pastebin.com/r04zpNJM
lmgtfy.com/?q=nodejs restful api mysql
stackoverflow.com/questions/49836644/how-to-import-a-typedef-from-one-file-to-another-in-jsdoc-using-node-js
stackoverflow.com/questions/14942081/detect-if-a-browser-in-a-mobile-device-ios-android-phone-tablet-is-used
sqlfiddle.com/#!9/53fb5d/3
developer.mozilla.org/en-US/docs/Web/HTTP
twitter.com/SFWRedditVideos

What't the correct why to set up a media query to target devices that are able to hover using a mouse or touchpad?

I have tried @media (hover: hover) and (pointer: fine) and it works for the most part but my 'hover only' styles are being applied on Firefox mobile.

nerds

bump

>codesandbox finally in the links
Based.

Is there something like pic related for web development? Or would I still gain benefit form doing it in Javascript or something.

The reason I'm asking is because one course I downloaded, has a handful of her own stuff to do like most courses but other than that, I'd be lost. I tend to learn things by going through work as I learn it.

Could I just take something like the list in the image and just make it through Javascript and it would still help?

Attached: 1497930682089.png (1920x1080, 244K)

What's the best way to host my toy PHP site? Put Linux on a VPS and do all the admin shit myself?

Anyone can recommend materials on Data Modeling/Design?

Noice

Attached: 1446060304558.gif (480x360, 1.21M)

Anyone here knows Angular and is familiar with the concept of atomic CSS? Atomic CSS style structures basically focus on utility classes that do one thing, here's an example of an atomic CSS library: tailwindcss.com/

We have something similar at my job, but we're swapping to Angular in a few months and I need to move over our component library to that Framework, but since people that don't really know JS/Angular/CSS will be using it, I need to bring over our atomic utilities as well.

How would it be the best way to do this? Should I make directives out of said utility classes or just provide them statically?

I don't think you understand. The redirect itself needs to be a POST. I know a HTML form can POST and redirect when you click submit, but I can't find anything on setting a file input from a javascript blob.

>I have a job exam tomorrow and they want me to turn into a website a .psd file but I don't even have photoshop installed on my computer
Any suggestion on how I can practice this quick before tomorrow?

Attached: 1563163650833.jpg (498x594, 35K)

irfanview opens PSDs doesn't it? What about a site like pxlr?

Most of those challenges can be done in either browser, node, or both. Just roll a number and go with it.

>2019
>.psd
Tell them to send you a Sketch file, which can also be opened in Figma (100% free). If you really need to use .psd check Avocode out, it has 14 days free trial.

pls respond, I'd like to avoid having to simly resort to width.

I think you might have to use JS for feature detection.

just finished learning the basics of HTML/CSS/JS, what next? keep studying the more advanced aspects of JS, expand my knowledge of CSS , or learn a new framework like react?

>keep studying the more advanced aspects of JS, expand my knowledge of CSS

Both of this. Don't try to tackle too much shit at once. Also if you like front end learn about design and try to embrace the 'artsy' side.

ive already made the database and the account has the right permissions, so whats causing the error?

fucking auto post

pastebin.com/r04zpNJM

ive already made the database and the account has the right permissions, so whats causing the error?

I couldnt paste it here, 4channel blocks it

missing comma

after password? even with the missing comma it still doesnt run, spits back that the database dne

Error: ER_BAD_DB_ERROR: Unknown database 'w3scooltestdb'


but mysql workbench shows it as existing

>w3scooltestdb
So, is it mispelled with "scool" instead of "school" even where you claim it exists?

based.

Whats the safest way to store the mysql password for node.js? Even though its a read only account, it seems dangerous to have it in my node.js file

What's even the point of having client-side javascript front-ends/applications using shit like React/Angular/Vue when writing logic on a back-end then shitting out an HTML UI is infinitely faster, less buggy, and more secure

Now that websockets are a thing, you don't even need javascript to do real-time interactivity/page updates

Attached: 600661318470467584.png (128x128, 29K)

How are you going to update the front end?

Alright, another day, another component learned.

So now I know node.js, mysql, html, css, and javascript. Not to an amazing degree but enough for what I need.
Getting node working with mysql was actually a piece of cake, I mean it's not like I was expecting much.

Now, what do I do to make the node query custom, and interact that with the front end? I think it was react/ vue that was reccomended but idk.

lmgtfy.com/?q=nodejs restful api mysql

is django a meme?

Attached: weegeesucc.png (527x562, 265K)

>her
lmao

try knex

Why do .NET positions pay so much? Is it hard to get hired or something?

s-shut up

bump

should i use Mr/Ms when emailing about job interviews or their first name

people use vue/angular is because apparently sending someone 1 HTML page is to slow

Also if you want to put a complex element on the page that mirrors existing elements on the page, such as a reply to a post, its a pain to keep the element in the HTML and the DHTML in sync. For example if you change the class of the replies to posts your server side code is rendering you have to remember to change it in js to

I'm so tired of developing for a job.

How do I move up the ranks to like CTO or something from senior-level dev.

>Now that websockets are a thing, you don't even need javascript to do real-time interactivity/page updates
that's a clear yikes from me friendo

openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.04.1)
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing)


Do I have the proper version of Java installed? I installed this like two months ago but haven't touched anything. I went through a tutorial that talks about some Oracle JDK. I legit don't know what I'm doing.

Environment variables

In an interview, can I lie to the person interviewing me how much I currently make? I’m making 60k now for my first job, but looking at jobs in Boston. I feel like they will low ball me as ‘you’re making 60 now’ when Boston salary is so high.

Sure, I always inflate by 25%, you'd be daft not to

Mr/Ms. But as someone who's interviewed lots, I wouldn't notice either way, the interviewer is typically scanning lots of Cvs prior to interview and won't obsess over insignificant detail like that.

learn c

Assuming somebodys gender is a very risky move in the world of web dev these days.

Attached: comment_Mnn6nsmr8MemplIJM1dhxAf0bVpMFZz9.jpg (680x680, 56K)

That was my plan. Thanks user.

Is there a way to a import/copy a JSDoc annotation in my .js?
I.e., get the annotation for bar to show up for foo, bar is imported from another file
// foo.js
import {bar} from './bar'
const foo = bar.bind(this);

No.

I know C# though. It's the sharp version of C.

Never used JSDoc, but this might help:
stackoverflow.com/questions/49836644/how-to-import-a-typedef-from-one-file-to-another-in-jsdoc-using-node-js

Who is the John Carmack of webdev?

I wish there was one. I want to be.

Dan Abramov.

stackoverflow.com/questions/14942081/detect-if-a-browser-in-a-mobile-device-ios-android-phone-tablet-is-used
@media (pointer:none), (pointer:coarse) {
}

try that

Anders Hejlsberg?

GIMP can open PSD files, but that depends on how complex the PSD is because freeware doesn't come with all the bells and whistles, not unlike paid ones

cheap vps works, teaches you basic setup of LAMP. Use Ubuntu for ease, I like Centos myself but more articles out there for Ubuntu.

Always ask for more so you have more room to negotiate. If they tell you to fuck up if you ask for too much, they ain't worth working for.

I'm doing the Odin project and I have a question. Why does this code work? why does storing a in temp make the input of (2) produce 1?

const fibonacci = function(num1) {
if(num1 < 0) return "oops";
let a = 0;
let b = 1;
for(i=1;i < num1;i++){
const temp = b;
b = a + b;
a = temp
}
return b
}

console.log(fibonacci(2))

you never store a in temp in that code

Does this code really work, though? It's not returning a fibonacci sequence.

Let's say I have one table with group chat name and it's participants, with a group chat unique id.

Let's say I have another table with the messages of the group chats.

Is is possible to select one latest message and all of the participants of a group if I send the user id to the server. I think I can do it with multiple queries, is it possible to do it with one. Grab chat unique id, grab one message, grab the participants from the group table again.

>why does storing a in temp make the input of (2) produce 1?

it doesn't it produces 1 because the for loop runs once, and a + b (0 + 1) is always going to be 1

How can I make a site like sadpanda that blocks newfags and requires certain cookies? I haven't seen a site quite like the requirements to view a site like panda.

look into some web programming languages and cookie parsers

beginner friendly ones are php and javascript

make cookies with UUIDs, or look into JWT tokens, which are pieces of json that you sign with a signature unique to your webapp, or find another way to make a unique cookie that cant easily be guessed or fabricated

look into request filters, and have a filter that intercepts requests, examines cookies, and lets the request continue or aborts with one of the 400 statuses depending on if a valid cookie is found

can you post a pic or copy paste the tables and their column names

user table
id | username | email | etc.

groupchat table
id | group_uuid | user (references id in user table) | group_name

groupchat messages
id | group_uuid (references group_uuid in group chat table) | message | etc.

something like this, I don't have it in a schema format because I had this setup for one to one user chats, but removed it because I had another for that one

I'm starting with the user id, getting the group chat table uuid, getting the latest message of the group chat to show in the sidebar, I need the participants of the group chat too because I want to show it in the sidebar,

I can end the first query and get the users with the group_uuid that was returned (using node), but I'm thinking about if it's possible to get the users from the group chat table in the first query

rolling

is this in sql, nosql, or something else

also can a user only be in one group chat?

it's mysql, and a user can be in every possible group chat assuming that the person who's adding him has him as an accepted contact

I'm leaning towards doing it with two queries even though I have some code that might help me solve it, but I need to dig through some stuff

test

Attached: 0e9.gif (499x499, 65K)

sqlfiddle.com/#!9/53fb5d/3

holy shit, thanks for the effort

Anyone play around with THREE.JS? My company is looking to start pushing us devs to learn it. Not really excited to learn it or use it really. Most of the tutorials I see online are making the same fucking rotating square.

another quick gif test

Attached: 1564110098647.gif (855x203, 84K)

>Most of the tutorials I see online are making the same fucking rotating square.
Well yeah, that's the basic tutorial for any graphics library. It gets more interesting when you upgrade to a cube, and then to more fun objects.

rollan

I am doing form validation for my contact form on my portfolio. should I use npm to help with that or is it easier to just do it with javascript?

Yes

yes to which

I have to write an email to apply for a job and what I'm writting just seems overly formal to me.
Are you expected to write shit like "Dear Ms. Faggot..."

Someone pls help.
So I set up apache with flask, mod_wsgi and the website worked fine on http. Now I got SSL certificate and edited conf accordingly. but new https gives the default apache page instead of my website. What's happening?

I got over 1k lines of js today in excel parsing functions... I hate parsing excel and bussinesses using it like DB instead actual db. And code is so ugly to look at so many ifs and conditions sometimes are huge... Why cant they use some standardised format? And i have to keep adding stuff to it because well it would just have been to nice if we didnt use roman numbers and normal numbers ooh look parts are in fucking italian... /rant
Why did i volunteer for this shit?

I'm trying to understand react and react native. For example let's say I make something that has a button appear after getting some API response, Would I have a copyButton component that is only rendered on response? I'm struggling to get how to code that up

Noob here:
I want to prefill a textarea on a 3rd party website, it basically should work like this:
1. User fills out a textarea on my own page, 2. User gets a link to a 3rd party website, 3. The 3rd party websites loads with the content of a textarea already filled with the content of the textarea on my page. How would I approach this?

No but sort of, It works, it has jobs, but not as many jobs as node, but it's easier to learn and more fun than node. It's like ROR if ROR wasn't a nightmare to debug and actually made sense

This approach is going to bite you company in the ass eventually, you should try to convince them to use a normal database.

Point of this parsing excel thing is to migrate to real db... but to do that you need to parse excel which is yuck, not hard ut super yuck

>Would I have a copyButton component that is only rendered on response?
Yup, set up a "fetchedData: false" in your app state and change it to "true" once the data was successfully fetched from server. Then conditionally render the button component if "fetchedData: true". React will update the DOM automatically to reflect the change in the state.

I don't think it's possible to modify a third party website content with your own data unless they have an API for this.

Pls can some one recommend me a book on HTTP, web servers in fact all that networking stuff I've been trying to send a POST request to google for a reverse image search in java for the past 5 days but it keeps failing

developer.mozilla.org/en-US/docs/Web/HTTP
This is a good start.

does google even allow reverse image search via an api?

Got it thanks mate

I CANT GET DOCKER TO WORK AAAARGH

I don't know, freestyle it, I have one version of a cover letter that starts with "I'm writing too you with a feeling of great anticipation" but I'm feeling like it's a bit too thick, it continues with "after comparing your companies goals with my ambitions" and ending with "I'm confident that we will find a common ground"

I created a Docker image of a Maven project. The build works, but when I try to run it I get an error that the main class cannot be found.

I'm relatively new to docker, but have no clue how to debug this. I tried googling ways of looking inside the image. I found that I can use
>docker run -it myimage sh
to look inside the image, but that doesn't work as I just get the same error.

How do I even start debugging a problem like this?

That's looks like some problem with your java files. Maybe docker image is wrong