[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/wdg/ - Web Development General

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 315
Thread images: 24

File: 1499367353362.png (731KB, 824x553px) Image search: [Google]
1499367353362.png
731KB, 824x553px
>Discord / IRC
https://discord.gg/wdg
#/g/wdg @ irc.rizon.net
Web client: https://www.rizon.net/chat

>Getting started
Get a good understanding of HTML, CSS and JavaScript.
Everything you learn will have these as their base.
The Mozilla Developer Network offers a good intro (no matter your browser choice)
https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web

>Online courses
https://www.codecademy.com/
https://coderbyte.com/
https://www.freecodecamp.com/
https://www.bento.io/

>Further reading/viewing
https://www.youtube.com/watch?v=sBzRwzY7G-k [Embed] [Embed] [Embed]
https://github.com/kamranahmedse/developer-roadmap
https://github.com/getify/You-Dont-Know-JS
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md

>Code challenges
https://www.codewars.com/
https://www.hackerrank.com/
https://codefights.com/

>Useful resources
https://developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
https://libraries.io/ - Discover and keep track of open source libraries, modules and frameworks
https://stackoverflow.com/ - Developers asking questions and helping each other
http://www.programmableweb.com/ - List of public APIs
https://caniuse.com/ - Check browser support for front-end web technologies

>Useful Youtube channels
https://www.youtube.com/derekbanas
https://www.youtube.com/learncodeacademy - codecademy
https://www.youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q - funfunfunction
https://www.youtube.com/user/TechGuyWeb - Traversy Media
https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ - freeCodeCamp
https://www.youtube.com/user/shiffman - coding train

>cheap VPS hosting in most western locations
https://www.digitalocean.com/
https://www.vultr.com/
https://www.linode.com/
https://www.scaleway.com/
https://www.heroku.com/

an in-depth comparison of hosts
https://www.webstack.de/blog/e/cloud-hosting-provider-comparison-2017/
>>
dead thread general
>>
How would i improve my websites security from attacks?
Like ddos attacks, sql injection etc etc
It's a fourm btw
Anything i need to look out for?
>>
trying to combine D3.js (make an SVG chart) and fucking putting it inside a PDF using jsPDF.

WHY IS IT SO DIFFICULT TO GET THE SVG IN THE PDF FUCKING CLOSE TO ZERO DOCUMENTATION

someone please tell me they used jsPDF before and can use the doc.addSVG method properly?
>>
File: 1491314872223.jpg (41KB, 640x853px) Image search: [Google]
1491314872223.jpg
41KB, 640x853px
what's a good way to learn learn rust and angular?

something where i could try lotsa stuff out without writing the backend myself

something whose back-end is nodejs maybe, cuz i've head it's 'in' these days

from major frontend js libraries i only know jqueery

from frontend i've done stuff in django/djangorust and very little in php
>>
Guys can someone point me to a good complete C# tutorial?

I have an internship coming up at a major company and I need to land this one.

Mosh Hamedani has some neat tutorials on udemy, but everything above beginner is paid, can someone provide me a torrent or something to a intermediate/advanced part of his course, because I'm really really really short on money, like I barely have for food at this moment.
>>
How do you start making money through freelance web development?

Upwork is filled with Indians and eastern Europeans working for microscopic rates.
>>
>>61271961
Just invest in etherum you faggot.
>>
File: 1499338784530.jpg (177KB, 960x955px) Image search: [Google]
1499338784530.jpg
177KB, 960x955px
>>61271547
>from frontend i've done
*backend
i meant
>>
File: 9f7.jpg (36KB, 473x582px) Image search: [Google]
9f7.jpg
36KB, 473x582px
>>61271971
Answer me honestly or suffer the consequences
>>
any freelance developers here? how did you make it?
>>
I wanna make a web app SaaS thing.
Is the go-to method still just plain old HTML CSS and JavaScript with some gay libraries thrown in?
>>
best framework for PHP? Is it Laravel?
>>
>>61273754
>plain old HTML CSS and JavaScript with some gay libraries thrown in
that describes every interactive website in existence
>>
File: 1498682012001.jpg (128KB, 900x675px) Image search: [Google]
1498682012001.jpg
128KB, 900x675px
>>61272023
My advice is to leverage what you got. Work for friends, senpai., locally.
I found some work for family members, will try Upwork soon.
>>
What are some basic projects to embark upon in Javascript to improve my understanding of it?
>>
is it possible to learn and work with angular without fantasizing about hanging yourself?
>>
>>61273988
Learn about ES6 and a bit of typescript 2 first.
>>
I just rechecked the express framework.
Since when creating a webapp with a micro-framework like Express is faster than with a big framework like Django?
>>
>>61273804
Symfony Flex aka Symfony 4 in 2018.
>>
Electron or NW.js if I would like to make a desktop version of my browser app?
>>
anyone here has done some web analytics? i want to measure statistics in a friend's blog but i don't really know what to measure. i found lots of guides on installing the tools but nothing with concrete examples, with ideas on what parameters or events to measure specifically
>>
>>61274980
Measure what you need, that's all dude!
>>
>>61272698
1) Create websites.
2) Sell products, ad areas, ...
3) Continue.
>>
>>61271428
0) Static website.
1) No JS.
2) No user accounts.
>>
>>61262574
Okay, so I've tested both options on roughly 10000 <di>s. Each div has a different ID which I dynamically assigned to them, some style values, event listeners etc.

The first approach is this:
I append each <div> with a loop to a wrapper, then later on in the update stage I loop trough all the <div>s via their IDs and reset their variables.

Second approach:
With a loop I create a long string with each said <div> included, and then add this string to the wrapper's innerHTML. Later in the update stage I recreate this string again and then alter the wrapper's innerHTML once more.

My result is that the first method runs with roughly ~500ms, while the latter goes around ~250-280ms. However if I don't change that many attributes in the first approach (like the position, size can stay, and just change the innerHTML of each <div>), it runs around ~70ms. So as I see if I just want to change everything with brute force, then string manipulation is better than altering a shit ton of <div>s, while if I narrow down what exactly I want to alter, and only alter that it is even faster.

Thank you for the help from yesterday!
>>
I have <div class="section-a"> and <div class="section-b">, how can I set section-b div to start always after the end of section-a div?
>>
>>61276615
What? You want them both side by side in the same line?
>>
File: untitled.png (11KB, 1285x542px) Image search: [Google]
untitled.png
11KB, 1285x542px
>>61276754
No, i want the second div to be immediately below the first, the problem is that my first div have a kinda dynamic size, I have set the height to 390vh and loads fine on my desktop but when i load the page on a smaller screen it bugs the layout completely.

tl;dr i want the second div to start below the first one.
>>
>>61276956
Put the code on jsfiddle or codepen and I'll help you debug it.
>>
Does Lets Encrypt support generating domains you don't own? I want to make a website similar to tumblr where users can use a cname to point their domain to my nameservers.
>>
>>61277447
meant generating SSLs for domains you don't own.
>>
File: 960.jpg (79KB, 960x540px) Image search: [Google]
960.jpg
79KB, 960x540px
Predominantly backend developer.

Should I learn (deprecated) angular 1 in order to assist fellow devs on frontend?

Bare in mind backend is often completed fairly quickly and I dont wanna be sitting around doing fuck all.

But then again, I wont be learning a useful transferable skill by going into a deprecated framework.
>>
>>61278061
just focus on javascript, you should still be able to assist them. I wouldn't devote any serious time on angular 1. just look shit up as you need it.
>>
>>61278061
Since both points you brought up involving wasting time, I would say just listen to your subconscious. It's probably trying to tell you that your work environment is not conducive to progressing your career.

2 options I would consider
1) Become a contractor and turn the people you currently work for into your first client. Move onto better projects that won't leave you asking how to fill out your day.
2) Throw ethics out the window and develop personal projects while on the clock.

Really depends how much your are getting paid to be there. If you decide to cuck out and help other people do their jobs then at least get paid more. Like a lot more, because devs that only know front end are annoying to work with in my experience.
>>
>>61278061
Dont waste time learning deprecated JS frameworks you dumb fuck. Learn Haskell instead.

>>61279089
>2) Throw ethics out the window and develop personal projects while on the clock.
Do this.
>>
>>61271428

>sql injection
prepared statements

>ddos attacks
ddos protection service ie cloudflare
>>
>>61276615
That should happen by default.
>>
>>61271428
sanitize all user input, and throw away any request that has shit that shouldnt be there or doesnt have things that should be there
>>
>>61271961
that's because there's zero money in it

you need a product
>>
>>61273754
webapp describes mainly the backend
>>
>>61273804
slim
>>
>>61274980
this will give you ideas
https://clickclickclick.click/
>>
File: tbh.jpg (2MB, 1920x1080px) Image search: [Google]
tbh.jpg
2MB, 1920x1080px
NEET here, can someone tell me what I'm fucking up on? (node)

This works, but it's ugly as all hell, and not very reusable.

https://jsfiddle.net/2cruacmt/2/

I tried rewriting it.

https://jsfiddle.net/dmvuv8g5/2/

I don't get why this one isn't working.

(All I'm doing is grabbing a bunch of rows from a local mysql db, containing keywords, and trying to put the count in an object.)
>>
File: 1jh.jpg (141KB, 500x500px) Image search: [Google]
1jh.jpg
141KB, 500x500px
Front end dev here.
I'm wanting to build a personal site for myself that I can use as a blog essentially, but I don't want to have to code everytime I want make a new post (like i would have to w/ jekyll or whatever).
And I don't want to use a bloated CMS, or anything where I have to use a stupid templating language, or PHP shit.

>Here's my idea:
Would it work (and be a good and viable idea) to basically create the blog/website using React or Vue, make a route that would be an "/admin" page that would essentially be my own little custom CMS for the site?

I would basically log into it, and to make a new blogpost/article/whatever, have a form that would have inputs [postTitle, date, tags], etc. and then a text input where I'd write the body of my post in Markdown. The form would then submit to a JSON database like Firebase or something (so i don't have to deal with a backend), and that data would create the new blog post/article on the website.

I dunno, would something like that work, or would it be a shitty way to do it?
>>
>have 3 different pages
>each has sections
>navbar is
>>page page page page-section page-section page-section
>page links lead to /page, section links lead to #page-section

you want to make a simple non-js gallery, is this a good idea?

>have a #page-section with the first picture
>and the left/right buttons
>the buttons lead to #pic1 #pic2 etc
>using the css:target trick, intending to show pics only when they're targeted, thus having a slideshow
>have the server arrange the pictures

good idea or not?
>>
>>61281091
>I don't want to have to code everytime I want make a new post (like i would have to w/ jekyll or whatever).
What does this mean? You're proposing a markdown-based solution, and Jekyll posts are literally written in markdown.
>>
>>61280868
fixed, please ignore.
>>
>>61281310
Well, so here's what I'm thinking.
Say I'm traveling somewhere, and I want to write a post about something cool I see, and show a picture or two blah blah. I wouldn't want to have to open up my text editor, code the post, compile/build, upload to server, etc. everytime I want to write or share something.

I'd rather just "login" to my site, write the post and/or add the image, whatever, and then hit "submit", and then be done with it.
>>
>>61271961
You need to find real clients.
>>
>>61281091
A CMS already does what you will be rebuilding from scratch. And it will be more feature-rich and secure than whatever you're going to come up with most likely. I would find a CMS that suits your needs. You don't need to use Wordpress if you don't want to. There are tons of options. It would just be a huge pain in the ass for you to build a CMS for your website
>>
>>61273804
What are you trying to build?
>>
>>61281386
Stop using "code" as a verb, especially when talking about fucking markdown, you sound retarded.

>I wouldn't want to have to open up my text editor, code the post, compile/build, upload to server, etc. everytime I want to write or share something.
I can't understand this line of thinking. You're basically saying you'd rather build a crazy overkill re-invention of the wheel instead of running a shell script. Are you a programmer or not?

If you need to do this, serve an html form with basic authentication at a different URL with a textarea and a submit button. It writes out the post file and compiles the jekyll site on the server. Far simpler and less inherently broken than what you're suggesting.
>>
>>61281433
Yeah that's kind of what I'm feeling too. I guess I'm just having a hard time finding a good free lightweight CMS that I don't have to deal with an odd templating language or PHP or anything.

Anyone know of a good one?
>>
>>61281508
>CMS
>Templating language
What have you had experience with in the past? You shouldn't need to worry about messing with templating yourself for most, if all, of what you're doing
>>
File: 1491062998911.gif (287KB, 600x600px) Image search: [Google]
1491062998911.gif
287KB, 600x600px
These threads are trash because it's just idiot scrubs coming in here asking for help with the most entry-level problems who should all obviously be banned for not knowing how to use SO or IRC or mailing lists.

What is your opinion on WASM? Is it a nonsensical direction for browsers to be moving in?

Are electron style apps a fundamentally bad thing because embedding chrome is so fucking heavy? Does it make more sense with larger apps than it does with smaller?

When will Grunt/Gulp finally die off?

Will the functional revolution finally prevail?

Is immutability a meme?

Do you try and write pure functions?

Is two-way data binding a thing of the past?
>>
>>61281691
>What is your opinion on WASM? Is it a nonsensical direction for browsers to be moving in?
It's unnecessary and a bad idea. Why would you need your web browser to do this kind of low-level processing?

>Are electron style apps a fundamentally bad thing because embedding chrome is so fucking heavy? Does it make more sense with larger apps than it does with smaller?
They're great for prototyping and portability, but tend to experience stability issues. That's not to say that coding the application without electron would be any more stable inherently, but it would almost certainly be lighter at the very least. Slack is a great example of this that I can think of

>When will Grunt/Gulp finally die off?
Probably in three years when something new comes around to either reinvent or replace JavaScript

>Will the functional revolution finally prevail?
lol no

>Is immutability a meme?
What? No

>Do you try and write pure functions?
In small applications that call for them, yes

>Is two-way data binding a thing of the past?
I don't think this is going to disappear for quite some time. It's still useful in a lot of applications
>>
>>61281691
WASM is a symptom of the more or less nonsensical direction things are going in which is that web experiences "must go faster"

Electron is my current obsession I am disrupting all the application programmers at my place of work with it.

Never G/G are used really extensively

the Functional Programmer meme falls under the category of NNUTS (there's nothing new under the sun in computer science)

no its a methodology for how you mutate things

yup

its an antipattern
>>
>>61281769
>>61281787
Gulp and Grunt really are unworkable trash, though. It's a bad abstraction. Just give me webpack and the scripts section of package.json.
>>
I want to build a website like tumblr where users are given their own subdomain like bob420.mysite.com and they can point their domain at it with cname. That's easy and I've done that but I want SSL for each. Cloud flare offers free wildcard ssl for all sites so that would cover my domain and subdomain. But will that interfere with users creating a CNAME record on their DNS and me serving a let's encrypt cert for their domain?
>>
>>61282712
holy shit you cannot be this retarded
please tell me this is a joke
>>
File: IMG_1579.gif (1MB, 600x338px) Image search: [Google]
IMG_1579.gif
1MB, 600x338px
>>61282736
Explain
>>
>>61283497
I want mysite.com ssl enabled
I want user1234.mysite.com ssl enabled
I want myusersdomain.com ssl enabled
I don't want to pay for any certificates. What's so hard to understand about that?
>>
>>61270715
I'm really, really, really fed up with the fact that twitter, facebook, and instagram pretty much rule social media at the moment. They're garbage, their interfaces suck, and they've let "feature creep" overwhelm them. That, and too many normies.

I'm setting out to make a new type of social media. I've already mapped out what I want it to be like, the database schema, the site layout, everything, and am starting on the backend code now. Once it's in a working state, I'll push it to my github repo and link here. In the meantime, I'm gonna shitpost here at every stage of the development process.
>>
File: tan.png (31KB, 391x453px) Image search: [Google]
tan.png
31KB, 391x453px
>>61283536
https://certbot.eff.org/
>>
>>61283842
Honestly just have a profile with photos and basic info, some sort of chat function, and you're good. Take Facebook and strip it down into it's core concepts
>>
>>61283910
That's kind of what I want to do.

Profile with a field to describe yourself and your profile photo, and all your posts

posts are text-only, markdown works. Links to images or videos will display in a container on the page.

So, basically, an enhanced, no-bullshit twitter with markdown and no character limit.

I also want to stick to some core design philosophies here, such as keeping the whole thing dead-simple, and making the whole thing extremely portable - essentially writing the whole frontend and backend code for the site with "I'm gonna have to make an app to interact with this thing" in mind from the outset.
>>
>>61281508
just use wordpress...buy your own domain even, put it on aws, and run wordpress on it. boom

>>61283842

>I've already mapped out what I want it to be like

whats it gona be like?
>>
File: WebDevTrueForm.png (2MB, 3836x1638px) Image search: [Google]
WebDevTrueForm.png
2MB, 3836x1638px
>>
>>61283868
that covers the ssl for the users custom domain, but they limit you to 100 subdomains so I can't use it for my domain if I want to allow more than 100 users. cloudflare offers free wildcard ssl for all top level subdomains so I'm trying to figure out if I can combine the two. I want user123.mysite.com to have an ssl cert, and I want the users to be able to create a CNAME record that points to user123.mysite.com and have that also have an ssl cert.
>>
Noob here. I started JS a couple of months ago, so far so good. Now learning front-end memeframeworks. I'm liking react and the little I've seen about vue js, but for angular I'm already confused before even starting, because people speaks about angularJS, angular2, now I'm seeing tutorials about angular4. Wtf should I actually learn? I just want to do a simple project and say in my portfolio that I "know angular" to apply to junior webdev.
>>
>>61285345
Nobody cares, my man.
>>
>>61285345
Angular versioning became kind of a mess.

AngularJS is version 1. Angular 2 was a rewrite that changed a lot of things. I believe Angular 4 is almost entirely backward compatible with Angular 2. They just switched the way they do versioning, and skipped 3 because of some package or something.

So the legacy version is AngularJS, and is located at angularjs.org

And the new version is just called Angular (but it might be labeled as 2 or 4), and is located at angular.io

I think a decent amount of sites still use (old) AngularJS, because migrating any software is expensive, so there's still demand. But (new) Angular is probably what people will choose to start new projects. I'd say learn the new version, but if anyone here has a reason why not, then let me know.
>>
>>61285495
Thank you, now I got it. Angular (2-4) then.

>>61285475
About what?
>>
>>61285495
very informative thanks
>>
There are twice more vue.js jobs than react ones in my country.

Since when vue.js becomes so popular?

Damn! I just finished a massive react native lesson yesterday after 2 months of study and practice.

:(
>>
getJSON('url',
function(err, data) {
if (err != null) {
alert('Something went wrong: ' + err);
} else {
for (var i = 0; i < 100; i++) {
document.getElementById('tbody').innerHTML += "<tr><td>" + data.rows[i].ranking + "</td><td>"+ data.rows[i].name + "</td><td id=" + i + ">" + data.rows[i].classId + "</td><td>" + data.rows[i].rating + "</td></tr>";
}
getJSON('url',
function(err, data) {
if (err != null) {
alert('Something went wrong: ' + err);
} else {
for (var i = 0; i < 100; i++) {
var senpai = document.getElementById(i.toString()).innerHTML;
document.getElementById(i.toString()).innerHTML = data.classes[senpai - 1].name;
}
}
});
}
});


How to avoid nesting a call within a call within a call...
>>
>>61287745

I'd use a Promise library for this.
https://www.promisejs.org/patterns/#parallel
Try to declare your data manipulation functions elsewhere.
>>
>>61287745
secret tip: returning early is more readable than big else blocks

if (err) {
alert("...");
} else {
// do something with data
}


if (err) {
alert("...");
return;
}
// do something with data
>>
>Web Design with HTML, CSS, JavaScript and jQuery Set by Jon Duckett
>40€ with shipping

Should I?
>>
>have no job
>never any replies, no interviews for years
>get job
>people start calling on old resume
>look to upgrade job
>no hits, no replies, everyone ignores me
>finally land new job
>billions of emails from recruiters and constant calls

The recruiting field is full of old leads apparently.

Also the amount of recruiters calling about "IT" positions is fucking disturbing.
>>
Can someone tell me about web development? I am a C# programmer but never really bothered with the web stuff. I know some basic html css javascript, should I do the Mozilla thing in OP? That seems really basic, but I'm not sure what my next step should be
>>
>>61288834
Plenty of free resources to learn this kind of thing. If you are going to pay for something like that then do it in person so you get personalized training.

Actually I might start teaching people on the weekends now.
>>
>>61289473
What do you want to do with web dev? Like what are your immediate goals?
>>
>>61273965
there is this book it teaches throw projects, and you can code while you learn inside of the "book".
http://eloquentjavascript.net/
>>
>>61287745
Wow, that's trash. Why are you deliberately trying to obfuscate the damn thing from us as much as possible so we can't get any context?

const tbody = document.querySelector('.dontUseIds');

function rowHtml(row, className) {
return `
<tr>
<td>
${row.ranking}
</td>
<td>
${row.name}
</td>
<td>
${className}
</td>
<td>
${row.rating}
</td>
</tr>
`;
}

Promise.all(['url1', 'url2'].map(u => fetch(u)))
.then(responses => responses.map(r => r.json()))
.then(([data1, data2]) => data1.map((row, idx) => rowHtml(row, data2.classes[row.classId - 1].name)))
.then(rows => tbody.innerHTML = rows.join(''))
.catch(e => console.error(e));


Or something, this is just off the top of my head. You can figure it out from there.
>>
CSS is so garbage.

Bootstrap has a big issue too.

The fact you can't set a div height and have content vertically centered without hacking it together is retarded.

There is no reason I can't do something like
v-align: center
width: auto
padding-left: 50px

and have it figure the shit out.

Nah, instead I have to
margin-top: 50vh
width: auto;
padding-left: 25px;
padding-right: 25px;
transform: translateY(-50%)

fucking stupid, not to mention that breaks everything in bootstrap. I have rows just going wherever the fuck they want to go
>>
>>61289938
>what is flexbox
>>
>>61289979
on resize it wipes out 10% of the image on either side

.logo-container {
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.logo {
flex-shrink: 0;
min-width: 100%;
min-height: 100%;

}
>>
>>61290012
Just put up a fuckin example already ya mong https://jsfiddle.net/
>>
>>61287507

Vue is way easier (and smaller).
If you know React, you can learn Vue in no time.

BTW it's not bad to list React AND Vue in your c.v., is it?
>>
>>61284342
I answered that question to some extent here:
>>61284129

Basically, a twitter where you have no character limits, and you can use markdown in posts. Also not a fucked as twitter/facebook, basically keeping it as simple as possible. And making it very easy to make a client app.
>>
How do I move a wordpress website from my local computer onto my VPS?

How do I handle the database? I already have apache2, but I have to install MySQL onto the VPS, right?

How do I securely move my database file onto the VPS? Do I have to change passwords or anything? My db stuff is just "root" and "" for the localhost on my desktop.
>>
trying to add csrf protection to a node js based website but on form send it gives me an invalid csrf token error, what am i doing wrong?

app.use(session({
name: 'session',
secret: 'noneofyourfuckinbusiness',
maxAge: 24 * 60 * 60 * 1000
}));

app.use(csrf());

app.use(function (req, res, next) {
res.cookie('XSRF-TOKEN', req.csrfToken());
res.locals.csrftoken = req.csrfToken();
next();
});
>>
>>61290271
Here's where I'm currently at.

Mix of everything under the sun trying to figure this out. Ignore the colors, it's to see where things are.

https://codepen.io/anon/pen/QgZJoQ
>>
>>61291265
also just on the logo atm. Right side should be fine.

Goal here is to have the green and white 75% of the screen on desktop with the red section as 25% and the stuff just stacked on mobile.

A landing page basically while I build the real thing.
>>
File: out-nosound.webm (2MB, 1920x1080px) Image search: [Google]
out-nosound.webm
2MB, 1920x1080px
Does anyone with experience using Jinja2 know why it's turning all whitespace into a single space? Whether it is a single tab or five line breaks, it all gets reduced to a single space and it's driving me insane. Pic related.
>>
>learn Backbone.js
>dies
>learn _.js
>does
>learn angular.js
>dies
>learn react.js
>dies
fuck this I'm done. no frameworks for me, just pure vanilla js.
>>
>>61276956
like the other anon said, it should happen by default. can you make a pic how it is currently?
>>
>>61289938
>CSS is too difficult!
>Waaaa
>>
>>61289938

.parent-wrap
{
display:table;
}
.child
{
display:table-cell;
vertical-align:middle;
}

>>
>>61291752
Not difficult, just shit. At least we have Sass. Doesn't solve all problems though, because special snowflake Safari still won't support that one element you'd like to use.
>>
>>61291795
Using anything related to tables is so last decade
>>
>>61291317
learn 2 html dude. it eats whitespace like that by default. you can preserve whitespace with <pre> tags or even css
>>
writing a server in haskell
>>
>>61292453
nice moves Ethan, proud of you
>>
>>61291317
html does not render new line characters like you think it does.
>>
so i'm trying to scrape a page and i'm getting

Bearer token was not present in the request\'s Authorization Header or Cookies

but looking at the request made in my browser, there are only standard headers (which i've already copied). and i've disabled cookies in my browser.

so what's causing this error when i call the url from outside my browser?
>>
What is WDGs opinion on Material Design?

https://material.io/guidelines/style/color.html#
>>
>>61271499
chill out
I use d3 and jspdf
why would you think any one on 4chan has both used those things AND put svgs in a pdf
stop being so millenial
>>
>>61287507
had to try this here
vue: 0 jobs
react: 57 jobs
>>
File: photo(2).jpg (1KB, 30x30px) Image search: [Google]
photo(2).jpg
1KB, 30x30px
What are some quick and easy things to pick up and learn to throw on the resume? SASS/LESS, GIT/GITHUB, WordPress?

Been learning HTML, CSS and JS and now I need to expand my resume with more than knowing those basics.. I know how to use Git/Github (just the basics for my own personal projects).

But that's it really.
>>
>>61270715

Is this a keylogger?

https://actionnetwork.org/widgets/v2/letter/tell-congress-we-need-the-wealthy-and-big-corporations-to-pay-their-fair-share?format=js&amp;referrer=&amp;source=Hatch201707_ATFAF&amp;style=full&amp;css=whitelabel
>>
>>61292408
>>61293159
Thanks for the help! I forgot how HTML treated whitespace.
>>
>>61287507
>>61293400

React: 127
Vue: 25


I find it hard to believe that React would be less jobs than Vue somewhere. Sounds like a place where I'd like to live.. B-)


>>61293652

Well, I wound't put up anything that you don't know. Depending on the company they will be "whoa!!!" or laugh about you when they read minor stuff.

That said, you can always get into stuff like YAML and JSON very fast. JQuery and Bootstrap are kinda mandatory, if you are specialized on JS maybe a JS testing framework (don't knwo if Jasmine is still a thing?) and some basics about stuff like webpack and babel?


>>61293961

The simple way would be to manually replace "carriage return+line feet" with <br>. But I guess there is some "encode_html" method in your framework..?
>>
>>61293652
If you put JS on your resume, be prepared for the "what frameworks are you good at?"/"do you know any frameworks?"/"Can you pick up a new JS framework and run with it?" questions in interviews.

CSS: learn the wonky CSS3 stuff you can do.

If you're good with HTML/CSS/JS, then even if you don't wanna do backend work, learn the server-side stuff. Learn the basics of how a database works, how to set one up and optimize it, and then learn to make web apps using PHP or Python or Ruby, and have them interacting with a database. This is useful to know because if you're gonna be a frontend guy, you're gonna be working with people who do nothing but backend stuff. You're gonna have to know what their code does so that you can build your site around it.
>>
>bitches about not posting a codepen
>post codepen
>no response

Fuck you too.
>>
>>61284129
Yes this sounds great. I have a few question

How will you facilitate conversations, if at all? Are you going to implement "comments" at the cost of users losing control over what appears on their own profile? Are you going to have "shares" at the cost of your platform being abused for cashcow ad pages and marketing campaigns? Are you going to do the twitter reply system?

And are you planning on having a friends system: if so, will there be "private" or friends only posts? I always disliked the idea of a private post; it just creates a really highschool-cliqueish atmosphere where people are fooled into thinking they don't have to maintain their dignity online
>>
>>61289938
>The fact you can't set a div height and have content vertically centered without hacking it together is retarded.

You can do that though... Although it's usually not a great idea because fixed heights produce fragile layouts under zoom or small screen sizes.
>>
How can I make a login system with just passwords using node? Like I want to create a sort of password or token without the need of a username. Can passportjs do this?
>>
>>61295190
percent isn't fixed.
>>
>>61291609
react and angular are far from dead

>>61294204
>I find it hard to believe that React would be less jobs than Vue somewhere.
2,463 for vue vs 3,134 for react on cn.indeed.com right now, so that's pretty close. mandarin is a bit harder to learn than js though
>>
What are you working on, /g/?

I'm making a chrome extension that acts as a keylogger on facebook. Grabs emails/passwords/etc.

I'm thinking about selling it on USB flash drives. A pack of 10 is like $30, and I'll sell it at $15-20. I'll market it to people as "find out if your significant other is cheating", or "facebook hacker" lol.

Should I have a contract that protects me in case they get caught? If so, what would that be?
>>
>>61295610
I am making a twitch chat parsing app that is running Chrome out of memory because the garbage collection on setInterval is..well..garbage.

Never thought I would have to optimize simple js.

Also building a video game review site, 2 apps, and a website for a clinic.
>>
>>61295610
You would need to sell it for a different purpose.

Like a tool to store YOUR facebook username and password with a disclaimer saying you must notify anyone using your computer of the app and that you need to disable it if you are not using it.

You'll go to jail anyways though.
>>
File: 82342349234.png (749KB, 818x1060px) Image search: [Google]
82342349234.png
749KB, 818x1060px
>>61270715
how do i get into backend dev? i want to learn basic stuff like retrieving and storing data from a form, create simple CMS for personal use, that type of thing.
>>
>>61295924
You learn a backend language like ruby, python, or php.

or

You learn JS and then learn node and express.

The easiest way to get into backend dev is PHP. Braindead easy. My first website was tfwnogf.com which is like a clone of fmylife.
>>
>>61294204
>JQuery and Bootstrap are kinda mandatory
lolwut? When I see these on a resume of anyone claiming more than couple of years of experience it makes me thing they were scraping the bottom of the barrel for resume fluff.
>>
>>61295887
>I am making a twitch chat parsing app that is running Chrome out of memory because the garbage collection on setInterval is..well..garbage.
Code? I really doubt that it's a problem with garbage collection.
>>
File: edc975f.jpg (167KB, 960x640px) Image search: [Google]
edc975f.jpg
167KB, 960x640px
any one tried the free edx mit courses? are they any good?
>>
Just starting out learning AngularJS and new to JavaScript in general. What's the difference between doing:

var app = angular.module('app', []);
app.controller('FooCtrl', ['$scope', function($scope) {
// foo
}]);
app.controller('BarCtrl', ['$scope', function($scope) {
// bar
}]);


versus:

angular.module('app', [])
.controller('FooCtrl', ['$scope', function($scope) {
// foo
}])
.controller('BarCtrl', ['$scope', function($scope) {
// bar
}]);


?

I see version two more often but version one feels clearer, though that might just be me not being used to JS idioms.
>>
>>61296014
not to mention that if you've been a web-dev for that long you should already have ditched those for a custom CSS grid system and JS hooks of your own
>>
>>61296185
(Before anyone tells me not to learn it - I'm just looking into it a bit to fiddle a bit with an existing application, which happens to use version one, while most stuff I've seen online uses version two)
>>
>>61296185
>What's the difference between doing
None. Or well the first one results in a variable named "app" being introduced to scope while the second one doesn't, but effectively there is no difference. This is a general pattern called "chaining" or "method chaining". Using it or not is a matter of preference, the most common style I've seen is to use chaining when it's available.
>>
>>61296232
>>61296185
2late. if you're just starting out stop immediately and move on to react/vue
>>
>>61296185
Well, in Angular 2 all controllers are declared on different files
>>
>>61271599
I also would like to know this.
>>
>>61296248
I'm not a webdev nor plan to become one, I'm happy and well paid doing muh HPC stuff in C and C++.

But I want to change a few things in a 3 year old application made a long-gone PhD student and I'm going through a few tutorials and I'm trying to figure out why the AngularJS in the app looks different from what's in most tutorials.
>>
>>61295298
1) save password to text file
2) read text file to see if password is correct
>>
>>61296706
kek'd
>>
>>61296706
Sony, is that you?
>>
>>61296065
It is, because anything happening in a setInterval isn't cleared until you clear the interval. So I have dozens of variables being stored every second for several hours.
>>
>>61291265
>>61291301
>>61295037
Kill yourself my man. This aint a fuckin support board.

https://codepen.io/anon/pen/qjJzyG
>>
>>61295298
>hash password
>lookup hash in database
>if the record exists, then they're authenticated
>if not, then they're rejected

btw this would be inherently less secure than username + password for authentication, because:
1. You only need to guess 1 piece of information

2. If you're storing any data for each user, what happens if two different people want to use the same password? Do you tell them "another user has that password already"? Because that would be bad.

3. You can't use salts (at least multiple different ones), but that doesn't really matter, because duplicate passwords is already an issue.

There are probably other issues that I can't think of off the top of my head.

Anyway, I don't know much about Passport JS, but I kind of doubt it would support that.
>>
>>61291265
Wait did you seriously just upload your paid work to 4chan? Why would you do this? Imagine the Tuson Center ie your client / employer reacting to you crowdsourcing support for your web dev from a site known for outrageous politics and tech-related mischief. Sounds like a good way to get canned

Also just use a table brah
>>
>>61295887
If you're using setInterval, make sure you're using variables declared once, outside of the function, not every single time it runs. And if they have the same value every time (e.g. getElementById("thing") ), then set them once, outside the function.
>>
>>61297310
Yes it is.

Also, that doesn't meet that mobile criteria.
>>
What would you use to build a rest API right now?

I've used Php with Symfony and Python with Django in the past but both feel too large for this.
>>
>>61297415
My variables weren't declared so I was declaring globals constantly.
>>
>>61297439
low-sized: Spark (don't confuse with Apache Spark)
low-/medium-sized: Dropwizard
medium-/large-sized: Spring Boot
>>
>>61297434
No it's not, and do the mobile shit yourself, jesus christ.
>>
>>61297396
>use a table
Gross. Use a grid.
>>
How do you submit your form data?

When i scan my app with audit software i get warning that my form is submited like plain text, what do i need to do
>>
>>61297990
make the text unplain
>>
>>61297997
before you submit it your server, encrypt it with javascript i mean
>>
>>61297990
Send it in .wav format

Actually, get a let's encrypt certificate and install that shit. (You do know what https:// urls are for, don't you?)
>>
>>61297626
This place is for everything web dev related.

You new? You must be new.
>>
>>61297997
this.

add emojis and shit
>>
>>61298122
>>51971506
>/g/ is NOT your personal tech support team
Are you? Scrubs like you ruin these threads and should all be banned.
>>
Hey /wdg/

I have a WordPress site that photo only posts are constantly uploaded to and I need a theme that has an infinite scroll page showing photos, share buttons that share the image (not a link) and a search bar that searches tags. Any suggestions?
>>
>>61298192
I've made over 50 of these threads since 2016.

Stop being a whiny little bitch boy. Are you even a real web dev?
>>
>>61296135
awnser this question you stupid fucking nigger monkeys I'm trying to learn better web design to make my operating systems website look nicer.
>>
>>61298358
I've made over 500 of these threads since 1999 and they're shit because of faggots like you and these chumps:

>>61298281
>>61297990
>>61297439
>>61271599
>>61273754
>>61273965
>>61274980 etc.

Yes I'm a real web dev (except I don't call myself a "web developer," I reserve that title for kids right out of bootcamp), I have over ten years experience and make $185k leading tech at a medium-sized web startup, and what I can tell you with all that experience is that there are at most five other real web devs who know what they're talking about and are regulars in these threads while everybody else is a bootcamp scrub that doesn't know where to go for proper support.

Why would real web devs want to come to 4chan thread that is basically IRC / stack with AIDs? Ban all these shitty copy / paste, w3schools, jquery tutorial script-kiddies and see if real web devs come back. If they don't, shutter the fuckin thing. All I ever really do in these threads is bitch about how they suck, because I wish they didn't suck. I wish they were an alternative place for discussion about technology between engineers that isn't infected with SJWs or brogrammers like the rest of the industry. That would actually have value, but it's not that, and it will never be that, because mods can't do their damn job. So instead we've got a bunch of desperate wannabees who don't know how to google spamming stupid questions and getting equally shitty answers if any. These threads are trash.
>>
>>61297222
That's not true, declare a var in a setInterval callback and it will be GC'd when the callback is popped off the stack. You need to be creating a refrence to it somewhere else for it to persist.
>>
>>61298589
web devs fighting over who's a better web dev is like two turds arguing over who's smellier.
>>
>>61298589
>Being this mad over some anon in adults shitposting forum
>>
>>61298723
I'm not arguing that I'm better, for all I know he's fuckin Mark Zuckerberg. Who's "better" is irrelevant to the issue.

>>61298752
If nobody bitches about it, these threads are just gonna get worse and worse.
>>
i'm not really a web dev but i've been experimenting with HTML5 canvases and i have one question:

do i really have to redraw EVERYTHING constantly? seems like that would fuck the performance up if i were to make something complex
>>
>>61299036
What the fuck do you think is happening with every rendering surface ever.

Even OpenGL renders the "canvas" however many times you need it.

If things are moving, you need to redraw them. How else would you do it?

(Obviously if nothing is moving and you only need a single frame, don't redraw it you fool.)
>>
>>61299055
so i really have to clear the whole thing and redraw it all?
>>
>>61299065
Are you moving stuff around? Are you animating things?

What are you doing? If you are creating some sort of scene and moving stuff, then yes, yes you do. Why wouldn't you have to? Please explain your thought process.
>>
>>61299081
well if the background is completely static for example and i just want to move like a square over it (like a background and sprite layer for example), i have to completely clear even the background and redraw it even if it's completely static?
>>
>>61299097
If it were that simple, you could only redraw the rectangle that changed from frame to frame. However, the second the background moves, you would have to redraw everything. The second you start doing more you will probably have to redraw everything.
>>
>>61299036
>>61299065
>>61299097
Canvas is a low-level drawing API, and this is fundamentally how all low-level drawing APIs function. Every frame you're writing out a buffer of one color in memory for every physical pixel and pushing it to the GPU.
>>
>>61299036
>>61299065
Computers are actually pretty fast dude, don't worry too much about it.
>>
well, i'm too lazy to quote you all but thanks for the answers
>>
>>61299065
You might want to try making an sdl game to really understand what's going on.
>>
>>61299733
I've messed with SDL before, and while I like C and kinda detest web development because it's nothing but FOTM stuff, I rather like the instant feedback I can get by just refreshing the browser
>>
I'm helping a friend build something with node but I don't want to start him off with mongo. What's the best way to use SQLite in node? I've only ever used mongo in node and I want to cut past any shit modules on npm before we get too deep into this
>>
are data URIs a meme?
>>
>>61298589
Kill yourself.
>>
how do i avoid making nested call backs to apis?
>>
>>61296014

>When I see these on a resume of anyone claiming more than couple of years of experience it makes me thing they were scraping the bottom of the barrel for resume fluff.

That's what I meant with: " Depending on the company they will be "whoa!!!" or laugh about you when they read minor stuff."

But anon is a newbie and wanted some quick references you can learn in a few days, didn't he say so?


>>61298589

I also don't like those "Hey, I want to learn web dev, where to start?" or "give me a good ideas what to do!" posts, because IT'S ALL WRITTEN IN THE OP, DAMNIT!!

But half of those guys you quoted had a question about best practices or on-topic questions.

>>61298723

Ahahaha, my sides...


>>61301029

Promises
>>
Anyone here actually made flexbox work on safari?
>>
tell me about webassembly. is it the future?
>>
>>61301516
Broser now execute JS. Browser in future will execute JavaScript AND WebAssembly. Any language can compile to WebAssembly. WebAssembly will execute faster than JS. Good for many things. Many tools will be built. Web change future.
>>
>>61301550
so it's a better investment for me to learn how to program in c++?
>>
>>61301591
Knowing C++ is good for a shitload of reasons. You can understand and edit shitloads of existing code. It gives you a better understanding of memory management and what you should be doing rather than LOL THE GC WILL HANDLE IT.

Here is what you do, you learn one lower level language (C or C++), one high level language OO language (C#, Java, Swift, Python, etc), you learn one functional language (Haskell) and you do a course on compilers. (Can be completed in a few weeks.)

Now you know every pretty much every programming concept you would need, and you can jump between programming language whenever you need to with the help of learnxinyminutes. You start asking questions like "what is the syntax for anonymous functions in x", "what is the equivalent of 'map' in y".

So yes, learn C++ you fool.
>>
>>61301334
I don't test many versions back but with vendor prefixes it's never given me any trouble. What's the issue?

>>61301591
>so it's a better investment for me to learn how to program in c++?
Probably not. WASM doesn't make sense for a lot of typical use cases, you bust it out when you need to do a lot of arithmetic fast (but which is non parallelizable in which webgl or webworkers is a better fit). It doesn't present any advantage for things like DOM manipulation.
>>
>>61301616
i already know the basics of c++; took a course on it.
>>
First time web dev here and I feel fucking lost
What's the best IDE to develop back end stuff?
I use Brackets but that's mostly for frontend, with no clear option to try PHP code, which I need right now to write, retrieve and delete data from a MySQL database.
I tried fucking around with XAMPP but I just can't figure out how to get it to work with Brackets
>>
>>61301779
Have you follow this instruction: https://github.com/adobe/brackets/wiki/How-to-Use-Brackets#live-preview

If so, which step causes your issue?
>>
>>61301881
The choose URL feature. I'm not entirely sure how to create that URL.
I
I tried changing the default Apache folder (in the ini file) to my project folder and using http://localhost:8080 (changed Apache port because something was using it) as the project URL but doesn't seem to work.
>>
>>61301897
I guess the properties.ini? Did you change apache_htdocs_directory and is the path correct? I frankly don't know if that's enough or if you also have to change the httpd.conf

If so, you have to change DocumentRoot and the following Directory. Or quite simply just copy your project into htdocs
>>
>>61302083
My project is already in htdocs in C:/
What else do I have to do?
>>
>>61302118
The standard directory is c:\xampp\htdocs
If you don't do anything but start xampp and apache and go 127.0.0.1 you will get a welcome page. If you put something in htdocs, e.g. a directory called "project" you can access it by going to

127.0.0.1/project
>>
>>61302160
Yeah, if I go to http://127.0.0.1:8080/project_name I can access the index.html file on my project folder located in htdocs.
However, if I put that exact address on Brackets it just keeps asking for another base URL for the project
>>
>>61301779
>What's the best IDE to develop back end stuff?
intellij idea
>>
>>61302216
Two ideas:

open the folder in bracket and try:

>add a slash at the end to make: http://127.0.0.1:8080/project_name/
> try http://127.0.0.1:8080/
>> If that just shows the welcome page you have to change your documentroot (see >>61302083)
>>
Is it worth it to write premium wordpress plugins/themes? Is the market even large enough?
>>
>>61301628
I placed the necessary prefixes (used autoprefixes.github for it) but, it still has an issue with flexbox. I'm using display:flex, flex:1, and flex-basis
>>
>>61301550
So does this mean online gamez in C++?
>>
What are /wdg/'s thoughts on using semantic tags in HTML? <header>, <nav>, <aside> and the rest? Is it a necessity in your view or not worth bothering with?
>>
>>61302216
>>61302308
Why are you trying to open files in your computer from the server's URL instead of the local path?

Just go to /whatever/your/docroot/is/
>>
>>61303025
The idea was that search engines and semantic browsers could use them to navigate your site more efficiently. Think a browser for blind people or people who disable CSS for readability or performance reasons (no smartphones back then).

But these days people generate their sites with client side JavaScript so it all became pointless. You need to see the website the way the developer intended so you can click and load pages the way they intended.

Still. I prefer to use a <nav> than to make a ul with class nav. I avoid divs as much as possible and try to keep the HTML as clean as possible. I like it when my page has coherence when there's no css at all. If you think you need an extra div for styling, try a ::before or an ::after instead.
>>
>>61303681
So the code does get interpreted by the server
>>
My page loads a number representing a class Id after the first http request goes through to the api I'm using
I then make a second http request to retrieve a name associated with the Id
So my page first loads a bunch of numbers then replaces them with class names.
I'm new to web dev. Looking for a way to fix this.

Here is the Javascript: https://pastebin.com/nDiZYBCJ
>>
>>61301779

>What's the best IDE to develop back end stuff?

Depends totally on the backend langauge.

Personally I use 60% Vim (emmet is a breeze) and 40% Geany and that's totally fine. For something like Java I'd use Netbeans or Eclipse though.
>>
>>61301779
Try Netbeans, seems fine to me. That being said my colleagues always say that one should invest time in vim/emacs
>>
Can you explain service workers /wdg/?
>>
>>61301779

you dont even need an IDE to develop back end stuff. I know people who have written games for Dreamcast in Pearl/C++ with notepad
>>
>>61301779

you don't even neeed a keyboard to develop back end stuff. I know people who have written software for IBM mainframes by manually punching holes in cards
>>
>>61301779

you dont even need electricity to compute things. I know people who have arranged huge stones in circles to calculate the correct date and time of the year
>>
>>61303025
i like them for their readability, and also makes for more structured CSS. for instance, i remove all styling and spacing off <ul> <ol> tags unless they're under an <article>, so wherever I place an <article> i know the content will be the page/post's text content.
>>
>>61304501
>>61304577

you dont even need a computer to post on /g/, i know people who send signals via morse code to outer space to let the aliens know what messages to send
>>
File: 8ad952_5307315.jpg (89KB, 960x720px) Image search: [Google]
8ad952_5307315.jpg
89KB, 960x720px
>>61270715
I've been a backend dev for a while now, I want to learn to do frontend too but it seems every framework out there is a clusterfuck that completely dies in a blink of an eye.
I know the basics for html and css, I have a lot of knowledge on java but I'm a bit behind with javascript.
What is a good framework that is stable, will last for many years and it will land me a good job?
>>
>>61304720
framework for what? you don't need any frameworks.
>>
>>61304720
Vue.js is simple and has sublime (not the shitty editor) API.
>>
>>61304720
just get good with javascript senpai. I don't know what your preference for CMS is, or even if you have your own, but try looking into a templating language as well, like Twig.
>>
>>61304795
should have clarified that, the company I work in uses Struts2 and freemarker, which are old as fuck by themselves, so it should be something for enterprise applications.
any book recommendations for javascript?,
the tutorials I can find are either too basic or too specific, or should I just go and learn on the fly?
>>
File: 1422069034241.jpg (7KB, 211x290px) Image search: [Google]
1422069034241.jpg
7KB, 211x290px
can I make asp.net websites run on linux so I don't have to go in debt for software licenses?
>>
>>61305261
Check out Mono
>>
>>61305261
theoretically yes, but it's not a very reliable solution. don't use microsoft technologies next time
>>
>>61305250
Get a grasp of functional programming. Master definitions like closures and promises.
Then, discipline yourself to use coffeescript or typescript, and you're golden
>>
>>61305261

don't use .net

youre killing the industry by using M$ shit
>>
>>61305335
this seem like the future of web dev memes, thanks.
>>
Newbie here, in simple terms, when do you use a backend and when you just make the frontend for deployment?
>>
File: 1362369111455.jpg (21KB, 372x260px) Image search: [Google]
1362369111455.jpg
21KB, 372x260px
Whose idea was it to make moment.js dates mutable?
I can't even
>>
>>61305666
backend for stuff you don't trust users to do. frontend for offloading unimportant work and visuals
>>
>>61305666
Backend is shit that happens on the server. For example, you go to log onto a website, backend makes sure your credentials are correct.

Front end would be the input fields where you enter that info, and whatever else you actually see.
>>
File: back-end.gif (971KB, 270x252px) Image search: [Google]
back-end.gif
971KB, 270x252px
Guys, I need your advice.

I'm learning back-end now and would love to do this as a full time job.

My local college teaches C# and .NET (ASP) but I hate M$ with passion.
Any chance I could jump ships to something more cross platform like Java and how difficult would that be?

Also, what are your thoughts on .NET core?
>>
>>61305877
C# and Java are incredibly similar so you should have no problem.
>>
>>61305928
Good to hear that
Thanks anon!
>>
>>61271428

To protect against DDos attacks you could look at signing up with Cloudflare. You could also set up a state-full firewall, I'm not sure if a firewall would be enough. For SQL injection prevention some clever programming that disallows certain strings from querying the DB should do the trick. There's also SYN floods which the firewall can be configured to protect against.
>>
PHP or Java for backend?
>>
>>61306206
>Java
JAVA.LANG.OUTOFMEMORYERROR
>>
Have web development job
Low pay work on local e commerce site
Want to make the big boy dollars and move to a big city like Chicago or Seattle
How do I into my dream
>>
>>61306251

>e-commerce

lel, lemme guess, you maintain shitty word press sites all day? fuck i used to do that. I'm in Seattle area already. Luckily I got a job building (now i just maintain it since i finished) a custom app for a distribution company. Want to get paid more though so i might look around for other jobs. But basically don't be an autist, thats my only advice.
>>
File: javacsharptopbrands.jpg (513KB, 1291x3600px) Image search: [Google]
javacsharptopbrands.jpg
513KB, 1291x3600px
>>61305877
>Any chance I could jump ships to something more cross platform like Java and how difficult would that be?
not very difficult

>Also, what are your thoughts on .NET core?
not viable. microsoft doesn't seem to know what they want to do with it exactly. maybe they'll figure it out soon

>>61306206
java easily
>>
>>61306272
>Don't be an autist
I can do that. But how do you apply for jobs out of state? How does that interview process work?

Not WordPress, it's a Magento 1.x site... Fairly popular appliance site. Spend my day rearranging chairs on the Titanic though, they're going to dump this whole platform for Shopify sooner or latee
>>
So this is the power of Angular...
>>
is jsp/asp worth it just to be able to do backend in java/c#? or should I just stick with php for my next project
>>
>>61306614
demand is steady rising for C#, jump on asp.net mvc and asp.net web api, signalr
>>
>>61306643

shoo poo in loo
>>
>>61306650
shoo karlie
>>
>>61306643
what if I don't want to spend a zillion dollars on licensing ms server or use lacking tech like mono?
>>
>>61306206
java if you like money
>>
>>61306672
theres always java for poor 3rd worlders
>>
How do you set a component to a dynamic route in Vue Router dynamically? Like if I define a dynamic route like "/a/b/:c", then how do i do something like this:

/a/b/foo -> "foo" component
/a/b/bar -> "bar" component

without having to explicitly define the /a/b/foo and /a/b/bar routes and their components?
>>
>>61306721
>virtually every successful company in the world
>poor 3rd worlders
kek
>>
>>61306614
asp.net is terrible, but i wouldnt say jsp is much better. although jsp, if you know what you are doing, is much better than asp or even php on high demanding scenarios (that is unless you are on php7)
>>
>>61306926
https://vuejs.org/v2/guide/components.html#Dynamic-Components
>>
>>61306465
That should foretell you all about Angular.
>>
>>61295108
There will simply be following. All posts public. No chat or private message system planned at this time, although one will be able to put a link to one's chat system of choice in one's profile.
>>
>>61307936
Wait, seriously? But everyone ask for it
>>
>>61306314
Thanks anon.
I'm starting to feel at ease, finally.
>>
>>61307961
They ask for it because managers like to pretend having knowledge on things so they pick technologies.
>>
>>61307980
So it's not worth wasting on it? Damn.
>>
who here works remote? how did you land it
>>
>>61307984
You're forced to learn it if you want a job because as I said managers like to pretend they know something about tech and impose tech on programmers that'd know better.
>>
>>61307984
If you have to deal with Angular1 remember that $timeout is the panacea to all issues.
>>
>>61308031
I work remotely. I was basically given the job from a friend of mine who worked at a startup. It's nice, except the pay isn't all that great ($22/hr), and I don't get benefits.
>>
Pretty new to webdev, hope you guys don't mind
I have a mysql database with a table I want to show on my website. I already have a .php file for opening the connection and storing the methods I need. I have a method for inserting data that actually works fine when called from a button press on my website.
Where I'm completely lost is working with this table. All the examples I find online involve a php file, but my table is in an html file.
Can I put php code inside my html file and have it work? should I recycle this php file and put the select * from query in it and calling it? how would I fill my table with that content?
I've been googling for a while but most answers are in php
>>
>>61308124

>only 22 an hour

i know that feel bro
>>
File: design.png (16KB, 1000x739px) Image search: [Google]
design.png
16KB, 1000x739px
>>61270715
what does /wdg/ think of my scrolling item container
>>
>>61306465
>haha guyz look I can break a website by using a different font than the site is intended to be rendered with

Stop being retarded. It's non angular's fault that you think you're cool for using a custom font.

>>61307936
>>61307961
It's not actually that bad, personally I prefer it to React, but that's just my preference. Basically every site of a decent size uses one of those, or maybe Vue, so just pick one of those and learn it.
>>
freeCodeCamp Data Visualization challenges when?
>>
I have six months professional experience
Can I apply to real companies now or will my lack of experience get me blacklisted from consideration in the future?
>>
>>61308875
lack of experience wont get you black listed, it will get you a shit pay though but if you don't start now it will be worse later
>>
Node.js retard here. After I install something with npm like npm install chart.js, how do I include the chart.js file in my html?

I assume I'm not supposed to do this: <source src="../node_modules/chart.js/dist/Chart.js>, as this would require me to expose at least some of my node modules folder to the web.

So am I supposed to just copy the file over manually after I have installed it? Seems weird to have to remember to do that for every package any time you clone a repo... Should I add a makefile?
>>
>>61309043
Use something like grunt or gulp to place it into your public resource folder. You can even concatenate all your dependencies into one bundled .js file if you really wanted to.
>>
>>61309043
use webpack
>>
>>61309174
>Use something like grunt or gulp to place it into your public resource folder.
Then what's even the point in npm installing it in the first place? I'll just curl it down from a cdn or something instead...
>>
>>61308365
I'm coming up on a year of working here, so I'm hoping I can move on to a position at a larger company that has a salary and benefits within the next few months. Hopefully I can get something better than $44k/year.
>>
>>61309235
>Then what's even the point in npm installing it in the first place?
Having all the files hosted from your end rather than being depended on multiple CDNs. It's a package manager. What did you expect it to do?
>>
>>61309322
I think you misunderstood what I meant when I said I could just get it from a CDN. I meant download it from a CDN (or github or anywhere else really) to the server, so that the server can then host the file.

My point was that of the handful of ways I can think of "installing" chart.js on my server, the one that is supposed to be specialized at the job (i.e. npm) is by far the least convenient. It's a one-liner in bash with curl or wget, and honestly even visiting the github in a browser would probably take me less time than to set up and configure webpack and grunt.

To be fair, npm install gave me a bunch of other things like docs... None of which I really asked for but whatever.

>What did you expect it to do?
Not be worse than built-in OS features at the one task it is supposed to be specialized to do.
>>
>>61309462
Have fun keeping up with new versions and dependencies of 50+ (if you have an application large enough to justify that many) packages with curl or wget, when npm can notify and even auto install newer versions for you.

Setting up webpack will be a lot less time consuming in the long run. Just do it.
>>
>>61309462
Not the guy you seem to be replying to, but traditionally NPM was a package manager for the BACK-end. So if your app needs express (routing) or passport (auth), you would run:
$npm install express --save
,
for example (tho I believe '--save' is no longer needed). If you then wanted those files exposed on the front end, you'd have a few options:
1. Use something like webpack, gulp, or grunt to copy the files over. This means you'll likely need to write the, for example, gulp script yourself.
2. Manually copy stuff over. Probably the least effective idea, since you'd definitely not wanna copy the entire NPM folder over each time (there's a lot you DON'T need on the front-end!)
3. Use something like Bower or Yarn that is more designed for managing front-end stuff.
4. Leave stuff on the back end.
>>
On what book/ where can I learn all I need to know about vanilla JavaScript and then how do I become a full stack developer?
>>
>>61309926
(cont'd)
If you DO elect to use options 3 or 4, you'll still need to expose it. This isn't abnormal: writing a server's all about telling it what you want and don't want. Assuming you have an express instance, you could do something like:

var express = require('express'),
app = express();
app.use(express.static(path.join(__dirname, 'bower_components')));

Then on your front end, you'd just do a script tag with the location of your bower module (i.e., './chartjs/index.js')
>>
>>61306465
>Hey guise look an issue with Angular!
>It's a CSS issue.
bruh
>>
>>61298589
You're a massive faggot and your troll game is weak son.
>>
>>61309982
Assuming you're not baiting, because I'm just a cynical asshole like that,
>book
Bad idea. Yes, you'll learn a bit, but you risk reading outdated stuff once you get past the very basics. In recent years, there have been a LOT of changes both with vanilla JS and full stack dev-ing. To that end, I'd suggest websites like FreeCodeCamp.com to start with. It starts off with HTML/CSS and is pretty slow to start, but it quickly ramps up speed. Even more important, you'll start doing projects with it pretty much from day 1. Yes, they're stupid projects, but the important thing is that you're MAKING stuff.
>>
>>61298589
You remind me of a dude from back when I used to be stupid/newfag enough to visit Yahoo! Answers. He spent his days telling everyone how he had like 500 years in the industry, and how he never used any libraries. He claimed that any "real" dev doesn't use the "crutch" of a library. His response to everyone - on a Q&A forum *specifically* for newbies - was that they were awful coders and they should just stop.
Seriously, do you have nothing better to do?
>>
>>61309926
>3. Use something like Bower or Yarn that is more designed for managing front-end stuff.
yarn is just a replacement for npm. it isn't more designed for managing front-end stuff
>>
>>61298589
Called it. 1999 was the giveaway.
>>
>>61298589

You must be garbage.
>>
Who here uses more than one machine for their projects? What do you do about transferring files? Looking for cloud storage recommendations.
>>
>>61310107
Ok thanks for the input
>>
Can I read filenames in a directory and then make links using these filenames?
>>
Can we all take a moment to appreciate Stack Overflow and how so many questions have already been answered and so many issues that anybody encounters today has already been encountered and solved by somebody on that beautiful site
>>
>>61311111
yes
>>
>>61311123
if I could upvote this twice I would xD
>>
>>61302479
You would typically not apply display: flex and flex: 1 to the same element. `flex:1` is *only* meaningful for children of elements with `display: flex` applied, which is a common confusion.
>>
>>61311052
Git and a host like github or bitbucket. Occasionally I forget to commit so if I want to work on a personal project at work I have to work somewhere other than where my uncommitted work is but it's pretty uncommon for that to happen. You can make WIP commits and amend them later if you're worried about keeping a clean history.
>>
>>61311052
Dropbox folders on each of my devices is the easiest solution. Basically it's just a folder that mirrors itself into the cloud, and then onto your other computers.

Main downside is that it's only 2GB (I think) for the free plan. Google Drive offers 15GB and may do a similar thing though, so I would look into that.

If you want to back up an existing file structure and mirror it between computers, then I'd look into SugarSync. They no longer have a free plan, and I'm not sure what their pricing looks like, but I've used it a bit a few years back, and from what I remember it was pretty good.
>>
>>61284351

what's the origin pic from
>>
I'm not giving 2 weeks notice.

This feels wrong, but it's necessary.

Will they hate me for this?
>>
>>61311111
Yes.

I was going to say more about how to do it, but then I noticed your quintuples and figured I would type this instead.
>>
I'm trying to learn JS, a few libraries and a couple of databases.

My project is to build a link shortening site for a charity, with a private login to create.

I'm a little confused where best to store the users and the links...it would seem a flat JSON would be fine for such a simple use, but writing/reading from this I can't work out how to do easily.

I'm very used to PHP and MySQL, so if there's a similar system (with a good SQL implementation) for JS, I'd love to know it.
>>
i need to map one dynamic route ("/:a/:b/:c" for example) to a series of components in vue-router. the component that gets rendered depends on the value of "c". i know i got an answer earlier, but it didn't really help me. is this even possible?
>>
>>61313633
>Will they hate me for this?
Probably not, but they'd be in the right to. If it's really necessary just explain that to your current employer and give as much notices as you possibly can. Offering to make yourself available if they need anything while transitioning your work to someone else will go a long way in making them feel better about it.
>>
>>61314083
>I'm a little confused where best to store the users and the links...it would seem a flat JSON would be fine for such a simple use, but writing/reading from this I can't work out how to do easily.
Can't parallelize "write to file" as your persistence layer, can't spin up multiple instances, processes, can't work with the data other than shoving it all into memory at once. It might work for a while but it's not going to scale for shit. Why not just use a database? Plenty of options for a simple use case like this, redis would be simple and fast, any RMDBs would do easily. Hell, go with CouchDB if you have some attachment to JSON for some reason.
>>
>>61314248
I will do that. I can only give a week.
I would not have been able to afford the relocation otherwise.

I will say if they have questions about the projects I led that they can email me anytime. Thanks.
>>
>>61270715
In express js, what's the difference between req.user and req.session.user?
>>
>>61314671
None, they're the same object. Session middleware worries about mapping sessions to requests, every part of the session needs to reside in req.session, passport just adds a `user` key pointing to `session.user` to every request to save you some typing.
>>
>>61314083
Are you using a node backend, or are you asking about storing stuff on the client?
>>
how would one go about having a list with checkboxes that the user selects and then after another button is pressed, a list of all the selected items is printed out?
>>
>>61315800
>link shortening site
>Are you using a node backend, or are you asking about storing stuff on the client?

uhh...

>>61316231
>how would one go about having a list with checkboxes that the user selects and then after another button is pressed, a list of all the selected items is printed out?

Something like

$('button-selector').on('click', function() {
var checked = $('checkbox-selector:checked'),
list = $('<ul>');

checked.each(function(e) {
list.append($('<li>').text($(e).attr('value'));
}

$('selector-for-place-you-want-to-display-list').append(list);
});


?
>>
https://pastebin.com/8PZLkvp1

I'm having issues with scope in javascript. I'm trying to print the var result in that final, long innerHTML print out. Need someone smart.
>>
Which non-free books on webdev stuff would you currently recommend reading/ are you reading yourself right now?
>>
where do i start if i want to learn how to make a site with login? i want to make the backend in Django but i want to learn the deeper mechanics and philosophies and not have magic obscure stuff for me.
>>
>>61317219
all the stuff that's inside the function you pass as second argument to getJSON gets executed asynchronously after the request has finished, so you can't really assign to 'result' there like that.
you need to learn about Promise API to understand how to structure that code properly and then optionally learn about async/await to make working with promises more pleasant
>>
>>61283842
I recently left them and went back to hosting my own site / blog / photos like the old days.
>>
>>61295610
digging into webrtc and service workers
Thread posts: 315
Thread images: 24


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.