<wdg/> - Web Development General

Prev thread:
>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 (independent of your browser choice)
freecodecamp.com
codecademy.com
hackr.io

>Further resources
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
github.com/kamranahmedse/developer-roadmap - Frontend+Backend learner-path suggestions
youtu.be/Zftx68K-1D4 - Web Development in 2018

jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS

Attached: 1456449140972.png (822x552, 868K)

Other urls found in this thread:

bootswatch.com/default/
w3schools.com/js/tryit.asp?filename=tryjs_loop_for
w3schools.com/php/showphp.asp?filename=demo_loop_for
jqueryui.com/autocomplete/
stackoverflow.com/questions/43629456/count-html-radio-buttons-value-with-php
micronaut.io/
vertx.io/
sparkjava.com/
dropwizard.io
projects.spring.io/spring-boot/
betbrain.com/next-matches/
bbfeapi.betbrain.com/httphs?method=get
bbfeapi.betbrain.com/websocket/info?t=134127162449
bbfeapi.betbrain.com/bootstrap?requestId=1&wsTrack=4fdf0edfd0474e9c41fd72c11df79&entities=BettingType&entities=Currency&entities=EventPart&entities=Location&entities=Provider&entities=Sport®isteringForUpdates=true&domain=www.betbrain.com&method=get
jsfiddle.net/XwN2L/
twitter.com/SFWRedditGifs

yassss java

hmmm

Attached: hmmm.png (1371x722, 414K)

dont go cutesy with the title you negroid

Attached: sage.png (1440x202, 20K)

What kind of retarded fag browser is that?

t. idiot webdev
if your OP was formatted right then i wouldnt have seen the thread and you wouldnt be exposed to ridicule

luv u bby

Java is shit.
t. former Java dev

Attached: 1526516994940.png (1019x746, 1.03M)

>wahh my safe space

My OP is copied and pasted, you autistic basedboy.

the autist also filtered /dpt/. I have no idea why he is wasting his time on Jow Forums desu.

He's probably the one starting all the spam threads. He's filtered any thread with regulars who actually talk about tech.

because ive been on this site since before cancer generals were a thing

Attached: 1521214693699.jpg (700x695, 115K)

I didn't realize that was a filter.

I have too and generals are great. I'll keep changing up the title just for you.

>I'll keep changing up the title just for you.
cool thanks f a m

>trying to figure out this memory leak in angularjs
>it happens from a $compile call
>mfw have no idea why

Attached: 1505804041084.jpg (640x348, 58K)

how's the web dev industry nowadays? too oversaturated for newcomers?
what about squarespace/wordpress etc and outsourcing of web developments?

You can get .name domains as well as .me.

Anyone got an html page template that contains all bootstrap default elements visible so I can more easily adjust my theme?

Something like pic related.

Attached: ht-tk-default-theme.png (1920x1080, 644K)

Opinions on Hugo? Has anyone tried it?

bootswatch.com/default/

Use it regularly, it's comfy but its docs are pure shit in comparison to like gatsby.

Is there something within the in html to have a pick of 5 items? As an example I would like to make a poll of the top 5 Mel Gibson Movies, how would I go about doing that?

Learn programing and a language, not specifically just "web dev" and you are fine no matter what happens.

If web dies for some reason and you know python? Cool just change your direction and you are using the exact same language for other things.

Same with javascript, you can become an electron dev or mobile dev whatever, as long as you pick something flexible you're golden.

But php + wordpress..yikes, competing with the lowest of the low AND no real options for the future.

web dev wont die in our lifetime

Is there a good startup for Angular 5?

Angular.js had AngularSeed on github. Aside from Angular Cli is there anything like that? I liked how Seed you never actually reloaded the page because the URL used /#/

You gave good advice except the part where you discouraged learning PHP and WordPress. If you’re new or just want to freelance, it’s a good route.

I'm not sure what you're doing, but that's a pretty autistic way of doing it.

The bottom % will constantly be getting removed as time goes on, it's only natural.
Being a wordpress developer is limiting yourself to that bottom %.

Not a good plan!

One day I hope Hexo replaces Wordpress all together.

This. Wordpress already has tons of way faster and more server efficient alternatives. Like Hexo for Node.

Well then how would I make it to where someone would only be able to pick 5 options? That's the one what I can't figure out.

I haven't used php in years, but assuming you're using the .txt file as something like a json alternative, you'd just use the simple i++ trick. It's for printing out everything in an array or whatever. You can replace cars.length in that with a solid number like 5 or whatever number you want. That's Javascript though.

~ for (i = 0; i < cars.length; i++) {
text += cars[i] + "
";
}
document.getElementById("demo").innerHTML = text; ~

w3schools.com/js/tryit.asp?filename=tryjs_loop_for

Shit. How do I codepost here? I thought it was ~

square brackets code /code tags

Here's the PHP example. Obviously it doesn't have to be i++, it can be whatever++ you want. It's a very intro level trick for loop trick.

w3schools.com/php/showphp.asp?filename=demo_loop_for

Test

im writing a react app to make a yugioh card thing.
Tell me features you would like to see

Attached: 396e79d97618019b23905e5bb33dd49b.png (1280x986, 448K)

Judging by the scrollbar, I take it there's a ton of cards?

A search bar would be important in that case. Jquery UI has a nice already made string search/autocomplete for what you've got IIRC

JS noobie here. Whats the comfiest way to integrate Asynchronous module loading with ES6 syntax?

I gave up trying to integrate require.js with npm packages so ill have to stick with synchronous imports. I'm hoping there is a better way.

Attached: big quint wtf is this fire.png (824x496, 460K)

jqueryui.com/autocomplete/

Here it is. I'm not sure how react and Jquery stacks however, the only react-like build I've used is Angular and it's variants. It works great with Jquery though.

That autocomplete feature is nice though if you do incorporate it. I use it for in a chatbox to autocomplete names from the user list and emotes from the emotes list just recently in something I did.

What I meant was that all of the options listed in melgibsonmovies.txt would show up, however one can pick up to 5 of those options.

Oh. I'd do something along the lines of making it count selected selected buttons, then in php before submission do an if statement to say if they select more than 5 to return an error "Please only select 5" or something

If you want to get more advanced you can do a javascript select counter too that gives the buttons class disabled once 5 is selected too.


I think this guy asked a question how to count selected buttons on SOF

stackoverflow.com/questions/43629456/count-html-radio-buttons-value-with-php

Was making chicken. Anyways, after looking at his post and ignoring the answer, he says you can count radio buttons checked with his code he's using
$count_cbox = count($_POST['q'])

Just do that but use an if statement while processing, so if it's > 5 then it returns them to the page. Or refuses to accept and sends a warning. I forgot how PHP does it.

Ignore What you're doing is a fairly basic way of doing it but it will work. At least as far as building the html form goes.

If what you're trying to do is validate that the user has selected five and only five elements from the form on client side, then JS is the way to go. You can just echo the JS from PHP obviously.

You can validate that in PHP on form submission but then you have to send back a new page with an error message etc. A round trip just to tell the user that they didn't select the right things is silly which is why PHP is better as a back-end language and we prefer to use JS for hybrid apps now. You can AJAX the form submission and return an error message but it's even easier to do such simple validation as 'are five items selected?' in JS.
So...you can get the count of checked form inputs in JS with something like:

document.forms['movieList'].getElementsByTagName('input').filter(checkbox=>checkbox.checked).length === 5

The only problem I had with javascript is that anyone can inspect element and change up that code to what they want, although I could also use PHP to validate that the number of selections is 5 and anything other can just simply not accept the request. I'll give it a try still.

Reminder that you can't be taken seriously as a web developer unless you have a Macbook Pro.

thanks for that, just was worried looking at the job market in my country, don't see alot of junior web devs.

Getting small-but-noticeable page lag across all browsers when I insert a new element with several thousand s in it. I'm doing the replacement at once via

document.getElementById("list").innerHTML = bigassList

which is the fastest method I'm aware of, though it still feels a little jumpy. Anyone have a workaround?

>The only problem I had with javascript is that anyone can inspect element and change up that code to what they want
Yes but if you also validate server side then they're just shooting themselves in the foot.

So, in PHP, you validate that everything is in good order and return 400(ish) if not. Then in JS, you validate that the input is in the appropriate form to not get a 400 from the PHP. If someone hacks the JS, you don't care because they'll just give themselves a 400 for their trouble.

Obviously, you don't put anything sensitive in JS but it's validation can and should ensure that the request is legal by the definitions of the server-side API.

>Getting small-but-noticeable page lag across all browsers when I insert a new element with several thousand s
Then don't do that.

What is the preferred solution? Loading it piece-wise?

What is this?

already have my macbook and daily allocated onions memory!

Hey guys where do you find your ebooks, courses and shit at online? I'm talking for free. Is there any torrent site or blog that posts resources?

>tfw almost done with internship project

I'm using edX for courses, although I'm sure you'll get differing opinions on it. It's actually free -- you can pay for a "certificate" to show you passed a course, but otherwise, all resources are free and available to anyone. The courses are taught by representatives of either universities/colleges or, as it is with webdev/programming stuff, companies and organizations (frequently Microsoft, frequently W3C). Course quality can vary: W3C's intro to JavaScript course was kinda ass, whereas their HTML/CSS fundamentals course was pretty great.

>What is the preferred solution? Loading it piece-wise?
I don't know what you're doing with a list of several thousand options but it's surely not presenting them to a user all at once.

Pagination with search is the standard method.

I blocked one single specific user agent that bots constantly use from using the login form of my Wordpress website.

Since last year 40000 bots have been banned there.

If you go back about five WDG's, you'll find a post where user makes a site archiving torrent links to udemy courses.

I meant from logging into wp-admin. My site has zero links towards it. Yet it gets more visitors than the rest of the website.

There are bots that trawl the web looking for wp-admin logins, when they find one, they try dictionary attacks of common logins gleaned from password dumps.

The reason it gets more visitors is that there are more bots doing this on the entire web than your site has users, it's an easy thing to automate from any PC or server under your control. You are seeing literal botnets here.

>willing to do a couple of jobs for pajeet money
>go on upwork
>all this shit seems way to advanced
>mfw only framework I know is Django

Just keep learning while looking for work.

Retard time: I wrote some Java code that I want to be executed via a REST API, does the REST service also need to be written in Java or can I use something like Node.JS that then calls/executes the Java code?

Aren't there any MVC frameworks for Java?

x1337x.ws
gen.lib.rus.ec

it doesn't have to be in java but that would probably overcomplicate things a lot
there are a bunch of high quality frameworks for writing web services in java
micronaut.io/
vertx.io/
sparkjava.com/
dropwizard.io
projects.spring.io/spring-boot/

I don't know what i'm doing.

How do I make the numbers align with the slider button.

Attached: cumd.png (1265x325, 32K)

>client isn't letting me contract long lists and insists on every single row of 200+ row tables to be visible at all times

How do I get out of webdev hell

>spring boot

Attached: 1516804286543.jpg (238x183, 12K)

JavaScript unit testing tools work with vanilla JS right? Do they have their own DOM so I can check for successful DOM changes?

Post your code in a JSFiddle. I assume the slider is but nobody knows until you share the code.

Looking to set up a survey site like Swagbucks etc where companies pay me big money to have their surveys on the site which poor people fill out for .5 of a shekel. I figure it's the quickest way to acquire $$$$$ for myself.

Please inform me if there is something I am missing here /wdg/.

Depends which tools you use. I use Jest, which does check with a virtual DOM.

Is a cs degree worth it? or a waste of money?

I'm trying to write a web crawler using node.js by looking at the get/post requests that occur when loading this website.
betbrain.com/next-matches/

I see 3 different types of requests that seem significant. The first two that occur,
bbfeapi.betbrain.com/httphs?method=get
and
bbfeapi.betbrain.com/websocket/info?t=134127162449
work when requesting with axios, I get the response without any problem.

The other type however, only gives a response when loading it in the web broswer. bbfeapi.betbrain.com/bootstrap?requestId=1&wsTrack=4fdf0edfd0474e9c41fd72c11df79&entities=BettingType&entities=Currency&entities=EventPart&entities=Location&entities=Provider&entities=Sport®isteringForUpdates=true&domain=www.betbrain.com&method=get

Axios with node.js return UnhandledPromiseRejectionWarning: Error: Request failed with status code 500

I'm genuinely interested how I can fix this.

'suggest' to the client that A/B testing would be productive here.

The correct use of A/B testing (outside actually correct use like finding out what customers can use best, nobody does that in jobs that we complain about) is to show the client's stupid idea alongside the Correct Way To Do Things and then let them see why people don't do that stupid shit.

>Is a cs degree worth it? or a waste of money?
90% of the people in this thread who are answering questions have CS degrees. 90% of the people asking them don't.
Make up your own mind.

I tried that one
They say "but [another part of the business] needs to be able to ctrl-F over the entire page"

Despite the fact that we have search boxes for doing that

You don't understand Axios or http responses. You've got a lot of reading to do.
My guess is that that query requires a session cookie or has some useragent detection, probably the former. Regardless, you're nowhere near ready to tackle this sort of issue.

I get that but I don't really know where to start. Most tutorials only go through basic stuff. You got any suggestions?

How do I access the cookie anyway? Do I have to specify it manually when I make the request? Is it not sent to me automatically? Yes I know... I'm new to this.

Reread the documentation for Axios. Redo tutorials with it, you're not implementing it correctly.

Cookies are received from the server and stored locally to be transmitted by the client.
What you want to do, is too advanced for you, you need to learn much more about web development before you could try to tack this problem.

hey Jow Forums what do I have to learn if I want to make wrappers for Web Apps. Like a Firefox wrapper for Spotify's Web Player, or one for cloud storage sites?

What do you even mean by wrapper?

I mean like a psuedo application. Something that has an icon and a launcher like a regular application and everything, but is just really Firefox running it.

So like Imagine an application with a Spotify Icon, but really it's just Spotify web Player opened in firefox, after teamove the Title bar, the tabs bar and all that

Please Jow Forums advice on running a background process on a php website.
Currently I have a Zend Framework 3 site, and on form submission I would like to parse some arguments to a Zend Console route directing output to a log.

Doesn't the spotify app already do that, except with chrome?

si

so electron

Yeah, but that really isn't the point. I just wanna learn how to do that.

I'll get on it, thanks user

So, Jow Forums, I'm at an interesting crossroads with my self-learning. I just landed a job that uses a software suite to develop business automation tools with custom scripting here and there for more targeted behavior. The thing is, this really isn't a developer position per se, although it does lie somewhere within the world of IT and coding. I can write CRUD web applications. I'm wondering if I should continue to write more while working this job for a while and applying to more dev-oriented roles, or if I should take the time to delve deeper into CS as a long-term investment. I have a copy of the Algorithm Design Manual. Should I pick up Java/C/C++ while I'm at it?

It's a way to get people to mine JSECoin for me 24 hours a day.

Anything I should improve about this build for web dev?

I bought a couple of things, but not raw power related, just a mech keyboard and mouse, SSD and probably getting a second monitor.

Attached: 2342334.jpg (743x483, 72K)

How do I have all the divs hidden on page load until the user selects an option?

HTML


All
Div 1
Div 2
Div 3
Div 4


Lorum Ipsum1
Lorum Ipsum2
Lorum Ipsum3
Lorum Ipsum4

jquery

jQuery(function(){
jQuery('#showall').onload(function(){
jQuery('.targetDiv').hide();
});
jQuery('.showSingle').click(function(){
jQuery('.targetDiv').hide();
jQuery('#div'+$(this).attr('target')).show();
});
});


jsfiddle.net/XwN2L/

No company is going to pay you money if your site doesn't have a user base.

> jQuery

When #showall loads, the .targetDivs aren't necessarily loaded yet. Trying to select them before they exist will result in nothing being selected, and therefore nothing being hidden. You should be hiding them when the whole document is ready.

Also, stop using jquery.

to be fair, if the project is purely for your self, an auto complete function is a fun thing to write.
There are some interesting user-exp choices you have to make

What's wrong with using jquery?