/wdg/ - Web Development General

Previous thread: >Beginner Roadmap and Overview
github.com/kamranahmedse/developer-roadmap
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 from across the web for learning languages and libraries (ignore sponsored stuff, look at upvotes)
learnxinyminutes.com - quick reference sheets for the syntax of many different languages (generally not sufficient on their own for learning something, but very helpful)
pastebin.com/gfBPg24A - Everything PHP

>Asking questions
jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS
3v4l.org/ - Use this and post a link, if you need help with PHP/HackLang

Attached: w.jpg (824x553, 170K)

Other urls found in this thread:

rbt.asia/g/thread/64339306/#q64346238
webstack.de/blog/e/cloud-hosting-provider-comparison-2017/
brokeassstuart.com/2019/01/27/ted-cruz-talks-to-maga-teen-about-living-with-punchable-face-syndrome/
p.Jow
cssgridgarden.com/
flexboxfroggy.com/
twitter.com/NSFWRedditVideo

working in Laravel
my users make their posts with images
images are uploaded to a temp dir while they fill out the rest of the fields for their post
if they decide they dont want to make the post and leave the page or whatever those images stay in temp dir.

what would be the best way to detect which files were abandoned and to delete them?

What's the best free "hosting" site to use? I use new google sites but it's only limited to html embeds...

I use it for my general

use github with gatsby.js

I just use a 15 dollar a year ramnode vps. It runs like ass, but it runs.

I'll repeat my suggestion from the other thread in case you don't see my reply. The onbeforeunload event should fire both when closing the tab and redirecting somewhere else.

Shouldn't you be wrapping those arguments in your arrow functions inside parentheses?

thank you user

Which is the best/most used icon set my dudes?

Attached: DxKPWyLW0AA5q4.jpg (923x771, 52K)

Xth for Elixir

icon sets are gay
why use whole set when you need few
just download png/svg of what you need from internet

is it possible that tdd is actually impossible except for routine tasks?

Attached: link.png (1366x665, 126K)

brainlets!

I have some input fields on my blog, once the user has given the requested data. I prompt the user to login they can either use native login else there is FB login. The native login is working fine but when I use the FB login, I am not able to retrieve whatever data was entered earlier. I am using Laravel. I tried to store the data in local storage and retrieve it but some of my input fields has multiple data possibilities like tags so when I retrieve from local storage. I am not able to view those data stored as array.

Any solution to retrieve the data to my controller that was entered before pressing the FB login button? Thanks in advance.

What's the 'proper' way to call an API for some data?
I'm trying to do it through Ajax/jQuery but getting a CORS error. Generally, should you not call an API through a script? How should you do it?

are you talking about registering the user for the first time or actual login?

Why don't you google the error?

I just did a mini benchmark of the smaller (DigitalOcean - 1 CPU - 1 GB - 5.00$
CPU: 3115 events
MEM: 3539.57 MiB/sec
IO random read: 29.19 MiB/s
IO random write: 19.46 MiB/s

>Vultr - 1 CPU - 1 GB - 5.00$
CPU: 3371 events
MEM: 4086.63 MiB/s
IO random read: 36.50 MiB/s
IO random write: 24.34 MiB/s

>Scaleway - 2 CPU (x86) - 2 GB - 3.99€
CPU (1 thread): 4834 events
CPU (2 threads): 9634 events
MEM (1 thread): 2581.35 MiB/sec
MEM (2 thread): 3281.17 MiB/s
IO random read: 6.98 MiB/s
IO random write: 4.43 MiB/s

>Scaleway - 4 CPU (ARM) - 2 GB - 2.99€
CPU (1 thread): 2550 events
CPU (4 threads): 10176 events
MEM (1 thread): 986.18 MiB/sec
MEM (4 thread): 3040.03 MiB/s
IO random read: 6.16 MiB/s
IO random write: 4.26 MiB/s

Note that while Scaleway has the best CPU performance and more RAM, they are lacking in most other aspects and features (no backups, no monitoring, etc.). You are on your own with most things. They also only have EU west locations.
Vultr and especially DO come with more features.

rude

Are you from the last thread?
Try calling it from your backend.
>Generally, should you not call an API through a script?
If you try to call the API from your own site in the browser and your domain isn't whitelisted for CORS, then you will get that error.
Read about CORS on MDN if you have some time.

if you are calling an api from the public folder of your server, you don't need to mess around with cors, if you have 2 servers, one for the beck-end and one for the front-end development and you are making a call from port 3000 to port 5000 you need to set up cors for your server, google how to set it up for the language you use

>I just did a mini benchmark of the smaller
didn't you did this a few months back?

>beck-end

You actually remember that?
I did something similar about a year ago, but that was just for the CPU.
rbt.asia/g/thread/64339306/#q64346238
Since the hardware also changes over time, I thought I would check it again and also test RAM and IO while I am at it.

Back then I found this guys test very useful, but it's probably very outdated by this point now.
webstack.de/blog/e/cloud-hosting-provider-comparison-2017/

whats kissing feels like brehs?

Just google what CORS is
why do people even bother explaining things to people who can't google the error message? I'll never understand.

It can make your peepee go hard if done rigth

Yeah I like pages

How do you guys respond when someone makes you look like a crazy upon telling them what you charge?

they just want you to lower the price

Attached: uML8te2.jpg (1242x1613, 110K)

>How do you guys respond when someone makes you look like a crazy upon telling them what you charge?
this sounds like solid advice. This might be a shitty customer as well, sou you are probably dodging a bullet, so don't go lower..

If many people look at you like crazy, then you might be overcharging lol. Might want to research your competition.

I hate people like this. Both ends.

If it's a new game in the wrapper then I get it, that's fine, but if it's a used disc then it's worth way less.

Like you have people selling their nintendo switch for 10 dollars under brand new, but no one will buy it, so they take it to the pawn shop and sell it for half that.

Doesn't make any sense.

if your prices are competitive with the local market then the person likely has no fucking idea what they're buying is worth and likely won't make good clients

I don't respond. My expression remains blank.

How do I go about adding an "embedded carousel" in my website? I wanna add a link, have it get the embedded and use that for the carousel.
I'll take any suggestion, from wordpress plugins (elementor plugins, even) to raw html/css/js solutions, although I don't want this to be a "download the embedded and add image/text/link separately" kind of solution, I need this to be automatic cause this website is going for a brainlet client

The new Jow Forums is using React now

Attached: help.png (967x1048, 212K)

Does webdev work require a powerful laptop? I picked up a MacBook Air because I like the OS and the decent battery life.

The MacBook Pro seemed excessive and I’d rather not use Windows or Linux (as a desktop environment)

I webdev on a 2010 notebook running Ubuntu 16.04.
Never had any problems with it, really (although I do not do design. You need power to render videos and stuff like that)

You got best of both worllds, a well rounded and polished OS and UNIX compilant terminatl.

No, an air is fine. The only real concern is an SSD for fast booting programs (not THAT big of a problem), and 8GB ram for multitasking. But hey if you don't multitask that much you can absolutely get by with 4.
You only start running into problems if you're wanting to run full virtualized systems for whatever reason.

>material
that's actually revolting

What mysql do I need for it to work with phpmyadmin?

nah, you'll be fine with anything modern that has a bash terminal. i use an 11inch macbook air to do all my side projects on. it's an 8gb last gen one with the hdmi port so it's mad.

>worllds
>terminatl

tell them go fuck off for being cheap af. good work costs good money

I just realized my post doesn't explain shit.
Basically, it's about embedding news links. I want it to embed "like facebook" (big picture and the headline), and all of that in a carousel

oops, you made me feel bad user, are you happy?

Do not charge based on competition. This is not how the service industry has EVER worked (well, unless they're rigged, ahem, telecommunications industry). You charge based on the work YOU provide, on a budget that works for YOUR life. You cannot charge the same as web agency in the same city because they have 20 people there and have a revolving door of clients. You also cannot charge the same as the expert around the corner who charges a lot because they do very few clients a year and have another income stream supporting them.

You have to know these numbers. You just have to, there's no way you'll survive as a freelancer otherwise when you keep doubting yourself and looking to competition for answers.

depends on what you're building. if you're making javascript web apps/static sites, make a zeit account and you can host your shit there for free. i host my person junk on their and they offer domain registration as well. you can also deploy from the command line using now. the amount of shit you get for free insane

outside of that, i have used heroku extensively rails apps but their free plans are always a bit gimped because they put the virtual server to sleep if it isn't actively receiving requests.

i really like the material design icons. it meets my criteria of looking neat and not being font awesome

like embedding iframe content from other sites? Do you have an example of something you'd want to embed there?
Carousels are a pretty bad thing though, but if you are making it for someone and they like it for whatever reason, then who cares.

>i host my person junk on their

*personal junk on there. pic related is the free plan. i'm total zeit shill because it's by far the best service i've used

also! it's the weekend!

what exciting side projects/regular projects are you guys gonna be working on? i'm probably gonna start work on making a react/express imageboard clone and hopefully drive it with graphql. i really wanna play around with graphql

Attached: zeit plans.jpg (989x851, 73K)

For example
brokeassstuart.com/2019/01/27/ted-cruz-talks-to-maga-teen-about-living-with-punchable-face-syndrome/

would look like pic related (or at least I could change it?)
I'll send a pic of the placeholder on the design that was sent to me on the next post

Attached: random_news.png (499x338, 222K)

I would like to become a node and react dev and am starting from a pretty basic level. I have some light html and css experience and am taking some of the courses listed in .
There seems to be a very heavy focus on HTML and CSS starting out. Should I just power through these or are they not as important for doing what I want to do and able to be skipped/skimmed over?

did a small censoring but this is it

Attached: carousel.jpg (1920x693, 134K)

Im asking my interviewees to write a function the calculates prime numbers between 1 and n

You should be able to solve this /wdg/

function findPrimes(max) {

}

They are very important. Do not skip over stuff because you believe you know enough about it, not unless you've actually built multiple projects with those things at the very least.
Skipping stuff is how you end up getting real stuck in future problems because you're trying to find some "react solution" meanwhile the answer is found in basic JS, you know what I mean?

What size USB do i need to use Linux Mint and work comfortably? 4G ok?

>i'm total zeit shill because it's by far the best service i've used
I mainly use Netlify right now for my static stuff. How do these 2 compare in your opinion?
I know you can also host backend code on Zeit. What are some applications, where serverless functions would have an advantage over a 'normal' VPS?
Traffic seems expensive at 10cents per GB though for the paid plan.
oh you want to generate some preview of another pages content to show as the link, like some social media sites do?
Just typed something out, that I don't know how it's done, but if you look at the sites HTML source, you can see that it provides meta tags for Twitter to generate that kind of preview with.
view-source:brokeassstuart.com/2019/01/27/ted-cruz-talks-to-maga-teen-about-living-with-punchable-face-syndrome/
Maybe that's useful for you.
HTML, CSS and JS go hand-in-hand for frontend like React.
You can't just cheap out on one of them, but I think you can easily add JS to the mix early on, if HTML and CSS alone get too repetitive.
With all 3 together you have all you need to build anything you want, so that should be a lot more interesting.

Well HTML is pretty simple and you'll pick it up over time, but CSS is important to get right as writing good CSS is hard, but writing bad CSS is easy and leads to more problems, which leads to writing more CSS to fix them..Which leads to more problems, and you end up band-aid fixing everything over and over.

JS in general will be where you will spend a huge bulk of your time, so you're in no rush to jump right to it now anyway.

!important everywhere is what glossing over CSS gets you

for 1 to n
if number % 2 == 0
print number

Great advice, thanks guys.

duh prime numbers, my bad, coming next

const isPrime = (num) => {
if(num

yo yo yo yo
what is this shit?
when did this happen? why haven't I heard about it? who did this? why? when?

new mobile UI
check sticky

for i = 1; i < n; i++
for j = 2; j < n && isPrime ; j++
isPrime i % j != 0
if (isPrime)
print i

p.Jow Forums.org/g/thread/69618424

wtf is this shit

>print i
>javascript

don't call us we'll call you

looks like shit

why don't we just build a new chan, technology only, better features

why can't you read faggot

this wouldn't contemplate the number dividing by itself so here's my new take
for i = 1; i < n; i++
for j = 2; j < n && isPrime ; j++
if (i != j) {
isPrime i % j != 0
}
if (isPrime)
console.log(i)

lrning Java atm, that's pseudocode btw ... conle.log(i)

why can't I into colors ?

Attached: 1544810894084.jpg (410x396, 32K)

>did interview
>couldn't answer this
>didn't get the job
fucking cunts
knowing how to find prime numbers won't ever be useful

Rhetorical question cum for brains.

Rhetorical reply booty bothered faggot

sieve of Eratosthenes,study it,understand it,crush it every time user.

Attached: Blank+_f1977cf4b01dae1397149ac6e3350ace.jpg (984x827, 105K)

Here's my unreadable list-comprehension-based answer:
function findPrimes(max) {
let primes = [];
let num = 1;
while (++num found || num % prime === 0, false)) primes.push(num);
return primes;
}


Come on guys, at least compare to previously found primes.

mean, I missinterpreted the question, here's my actual take on it:

def primes(num) do
2..num
|> Enum.filter(&is_prime(&1))
end

def is_prime(num) do
Enum.count(2..num, fn i -> rem(num, i) == 0 end) == 1
end

I am, they're in the for loop

I meant compare to just the primes, skipping other numbers.

The way you use those native js functions is beyond my reach, all I know is very basic programming... in Java.

and here's a sieve implementation:
const range = (a, b) => Array(b-a).fill(0).map((e,i) => i+a);

function findPrimes(max) {
let all = range(2, max+1);
let index = 0, prime;
do {
prime = all[index++];
all = all.filter((num) => num === prime || num % prime !== 0);
} while (prime*prime < max);
return all;
}

Java == Javascript

I just tried running a react project on my thinkpad. My temps went up to 90

:^)

does X1 carbon have that problem?

Attached: 71EYC3NfqwL._SL1500_.jpg (1500x1000, 74K)

based retard

i'm doing it guys. Im really fucking doing it!

Attached: Screenshot_2019-02-01 Page Title.png (1207x756, 12K)

good job!

Anyone using Web Authentication API? What are your thoughts about it?

How can I understand CSS? What resource would I use? Is there a good book or online resource I could use to really get CSS? I've always relied on essentially tail and error with css. I have no instinctive feel of how various css rules create the right layout.

there was a good code academy course on css for free...

I think I know what you mean. It's hard to know what attribute does what initially.
You could check out the Basic CSS section on Freecodecamp and work through that for a step-by-step.
There is also tons of guides on MDN, but it might be a bit dry to read through, if you could instead apply it and visually see the result.
For just looking things up MDN is amazing though, so don't hesitate.

def findPrimes(max):
primes = []
if max >= 2:
primes.append(2)
for n in range(3, max+1, 2):
if isPrime(n):
primes.append(n)
return primes

def isPrime(x):
for i in range(3, int(x**(1/2))+1, 2):
if x % i == 0:
return False
return True

FreeCodeCamp, and
boxfroggy.com/
cssgridgarden.com/

Wow, that looks like a perfect way to learn css.

Thx, will check it out.

Sorry, I somehow butchered that URL. It's flexboxfroggy.com/

why doesn't this work:
var speed = 2500;
var interC = 0;
setInterval(fooBar(), speed);

if(interC > 20) {
speed -= 400;
}