/wdg/ - Web Development General

Last Thread
> Discord
discord.gg/0qLTzz5potDFXfdT

>IRC Channel
#Sup Forumswdg @ irc.rizon.net
Web client: rizon.net/chat

>Learning material
codecademy.com/
bento.io/
programming-motherfucker.com/
github.com/vhf/free-programming-books/blob/master/free-programming-books.md
theodinproject.com/
freecodecamp.com/
w3schools.com/
developer.mozilla.org/
codewars.com/
youtube.com/watch?v=JxAXlJEmNMg&feature=youtu.be&list=PL7664379246A246CB lecture series.

>Frontend development
github.com/dypsilon/frontend-dev-bookmarks

>Backend development
en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks
backendDevelopmentBookmarks.md

>Useful tools
pastebin.com/q5nB1Npt/
libraries.io/ - Discover new open source libraries, modules and frameworks and keep track of ones you depend upon.
developer.mozilla.org/en-US/docs/Web - Guides for HTML, CSS, JS, Web APIs & more.
programmableweb.com/ - List of public APIs

>NEET guide to web dev employment
pastebin.com/4YeJAUbT/
>How to get started
youtube.com/watch?v=pB0WvcxTbCA - "WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice"
youtube.com/watch?v=zf_cb_Nw5zY - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.


>cheap vps hosting in most western locations
lowendbox.com
digitalocean.com/
linode.com/
heroku.com/
leaseweb.com
openshift.com/
scaleway.com/

Other urls found in this thread:

madisoncollege.edu/files/program-sheets/it-web-software-developer.pdf
matc.edu/student/offerings/2016-2017/diplomas/web_mobile_application_designer.cfm
wctc.edu/programs-and-courses/applied-technologies/web-digital-media-design/index.php
codepen.io/user/pen/yJvVYK
developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
codepen.io/kindofone/pen/DkhAz
up-for-grabs.net/
community.letsencrypt.org/t/6920
quora.com/As-a-software-engineer-how-do-I-shift-my-career-to-devops
youmightnotneedjquery.com/
jsfiddle.net/qanLp4y6/
devwalks.com/lets-build-instagram-with-rails-part-4-presenting-pretty-profiles/
twitter.com/NSFWRedditImage

Hello! Any pythonfags here? How do I validate multiple form on the same page using flask's request?

Kinda like Pic related

Thanks

I'm working on photo sharing app with an Angular front end, and I'm trying to reimplement routing functionality with ui-router instead of ngRoute.

The problem I'm running into is that I would like to give users the option to display all of someone's photos in a single view, and each photo has its own state generated by a url parameter, so the number of nested views would be variable depending on the selected user (see below).

$stateProvider
.state('photos', {
parent: 'index',
url: '/photos/:userId',
templateUrl: 'components/user-photos/user-photosTemplate.html',
controller: 'UserPhotosController',
})
.state('photos.detail', {
url: '/:photoId',
templateUrl: 'components/user-photos/user-photosDetailTemplate.html'
});


Linking between states with a tab-based view is no problem, but I can't seem to find a way to display a variable number of child states in a single view that doesn't involve maintaining a reference to $stateProvider and inserting it into a run block that modifies the state every time the view changes, which feels overcomplicated and redundant.

I'm pretty sure I'm overthinking the problem and I'm not that familiar with the ui-router package yet, so does anyone know of a better way to accomplish what I'm trying to do? This seems like it would be a fairly common use case

Is Elixir still just a meme language?

reposting...
I made this shitty JS thing to delete my previous responses to a thread in facebook, and then post "asdf", all from the JS console:

/* this works: select the first response and delete it */
document.querySelectorAll('[data-testid=ufi_comment_close_button]')[0].click()
document.querySelectorAll('[data-testid=ufi_comment_menu_delete]')[1].click()
setTimeout(function(){ document.querySelectorAll('[data-testid=ufi_hide_dialog_delete_button]')[0].click() },400);
/* this doesn't: post "asdf"*/
var textbox = document.querySelectorAll('[data-testid=ufi_comment_composer]')
textbox[0].children[0].children[0].children[0].children[0].children[0].textContent = "asdf"


does anyone knows how to post replies in facebook from the dev console?

>all this complicated shit to just show share some pictures

angular in a nutshell

$("#textInputWhereYouTypeWords").val("Some crap I want to say.");
$("#buttonThatTriggersPost").trigger("click");

Depends on what your goals are. It already offers benefits in terms of scalability over multiple cores, fault tolerance over a distributed server infrastructure, and ratio of performance to development time; but it's still not very well supported yet and its goto framework is very young.

If you're just trying to throw together a gay little portfolio website that'll get you a job somewhere, then yes, its still a meme.

On the other hand, if you have a nontrivial project in mind that would benefit from distributed hosting and a CPU intensive backend, and you have the time/ability/resources to write any new middleware you'll need, I'd argue it's a better option than Rails or Node.

>$("#textInputWhereYouTypeWords").val("Some crap I want to say.");
>$("#buttonThatTriggersPost").trigger("click");
you don't say

guess I'll have to explain: the textbox is not an box, so I have no clue how the thing works.

children children children children

>angular in a nutshell
$scope.on('undocumentedEventFire', function() {
return $scope.$showDigestCycleInProgressWarning();
}


Don't know how I'd live without it desu

Anyone?

I'm familiar with the fundamentals of react js. What problems does reflux solve?

Anyone care to help me? I'm considering 3 programs...

madisoncollege.edu/files/program-sheets/it-web-software-developer.pdf

matc.edu/student/offerings/2016-2017/diplomas/web_mobile_application_designer.cfm

or

wctc.edu/programs-and-courses/applied-technologies/web-digital-media-design/index.php

I have a long list in my page and it moves the body few pixels left and it doesn't match with the other pages how do I fix this? I can't put a margin because the list size changes dynamically and the body moves back again when it gets smaller

very helpful, thanks

does ANYONE know a program/browser plugin that let's you make comments in facebook threads automatically?

use flask-wtf you peasant

here's the shit way you're looking for

import requests


request.form['username'] == 'admin'

>inb4 404
bump

is css frameworks common?

Yes, as common as Pajeet.

It's a general, retard.

Int x = 4
If (5 > x)
System.out.print("Sup Forums is gay")


Test

so what?

Hello there

Hello user what are you doing?

Is there any chance I can start freelancing without any experience in it (though I have extensive PHP/MySQL ability) or is it hopeless and dominated by third worlders?

What to do if you're an alright web developer but suck at web designing?
I want to learn to make good-looking websites and themes, but how do I do that? I know how to code a website if a proper description is given - this isn't a problem.
But if I'm left on my own to do the designing part, the website turns out to be rather ugly.

What training should I acquire in this case? Should I get some graphic design training?

In freelancing your human skills are more important than technical.

Just use existing themes.

Not him but can you elaborate please?

I feel I can excel in this standpoint over pajeet, since along with being from US I'm also not a neckbeard. But I go on upwork and I see pajeet offering their PHP programming for very cheap, seems like there's no way to compete especially as a new account.

not him, but... it's quite obvious: you have to convince people.

Average freelance employer is somebody who doesn't know or care about technical side very much. So it's basically how well can you sell yourself not how good your skills are.

Any serious answers?

Newb question here. Is programming/IT/tech still a decent job to get into to be a richfag when jobs are being outsourced to Pajeet and tehre's cost cutting everywhere? As a retard, should I just get a lower paying but more secure trade apprenticeship, like wastewater, which I've also been looking into? I have absolutely no tech experience aside from torrenting, gaming, and building a couple PCs.

Outsourcing is mainly done by big companies for their cubicle workers. There will be plenty jobs in small companies. Still if you want to become richfag you either have good human skills or be really good.

>good human skills

>shitting myself for 15 minutes
>simply forgot to change mysql to mysqli
every time

Use frameworks and don't bother inventing shit for yourself. Keep it simple, these days everything is about flat and simple design anyway.

What's the intended way to use Docker containers?

Am I supposed to have a separate container for Python, one for Postgresql and so on, or put everything in one container/Dockerfile and develop my stuff using that?

Do you guys use orchestration programs in your work?

>Do you guys use orchestration programs in your work

>What's the intended way to use Docker containers?
One process per container.


Databases are usually not containerized.

>>Do you guys use orchestration programs in your work
I maintain a containerized jenkins server

I've only been learning webdev for a few hours, so forgive me if this is retarded - but is there a better way to create a smooth sliding effect on a background image using javascript?

var originalY, delta, currentY, goalY, id;

function updateBackground()
{
if (Math.abs(goalY - currentY) > 0.1)
{
headStyle.backgroundPosition = "0% " + currentY + "%";
currentY += (goalY - currentY) / 50;
}

else clearInterval(id)
}

function slideBackgroundImage(newPercent)
{
goalY = newPercent;
originalY = parseInt(computedHeadStyle.backgroundPosition.slice(3));
delta = newPercent - originalY;
currentY = originalY;

id = setInterval(updateBackground, 10);
};

yeah, by not using javascript at all
codepen.io/user/pen/yJvVYK

if you really want to use javascript then don't use timers but requestAnimationFrame instead, then it renders as smooth as possible.
developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame

I just applied for a PHP Role and after the phone interview was given a test which was apparently supposed to test my php knowledge.
>Receive test
>It's a fucking magento test


An admin configuration page with a date option, titled something along the lines of: 'Show products created after:'

A block which displays products created after the given date (this should be a block class of your module and not catalog/product_list)

An index page with custom routing (url) which displays the block

I have never worked with magento is this something I could whip out fairly easily or am I going to be plagued with XML bullshit.

>Databases are usually not containerized.
Any reason why?

hows my 1337 hacking skills fellow Sup Forumsays
yeah i know im pretty good, what are you guys up to?

OMG MODS

Is it possible to make a countdown clock for a custom homepage without any JavaScript? Just pure HTML5?

codepen.io/kindofone/pen/DkhAz

I'm a little confused, which tag will I put the html portion under?

Any bored hobbyist front-end devs want to come work on an idea I had? I can't stand front-end stuff.

Wanted to make a replacement for up-for-grabs.net/ that wasn't a lazy pile of garbage.

what do you mean?
the markup is in the html box, you can see the compiled output in the dropdown on the top right of the box

Thanks!

I should add that I'm a back end dev, I wasn't asking for someone to come do work for me for free, just need someone who actually likes to work on front end stuff to help out on a hobby project.

There are so many fucking hosting options out there. I don't know who to go with.

if you are looking for shared hosting go with one that supports letsencrypt and not with one who is trying to fight against it to cash in by selling you their own certificates

Is there a list of hosts that are using lets encrypt?

there is here community.letsencrypt.org/t/6920

or just get a vps and install letsencrypt yourself? that's what I did, much more versatile.

Imagine I have multiple inputs on my page

etc...

and I want to catch the value of the input I click on. Is this the correct approach?

function showValue(_this)
{
var value = $(_this).val();
console.log(value);
}

you don't need jquery to do that.
and avoid using onclick etc in your markup.
separate your markup and scripts.

let myInputs = document.getElementsByClassName('mytext');

for(let i = 0; i < myInputs.length;i++) {
let input = myInputs[i];
input.addEventListener('click', function() {
console.log(this.value);
})
}

Is there any way to pre-load csv data in with D3? My React framework's render function is synchronous and this plugin won't load my external CSV data when I try to call it. I was thinking of loading the data into a global and then calling all associated data methods from that global, but whenever I try to do that it returns an undefined, which I think means that I'm displaying that variable before it hits the backend.

I'm using React-Faux-DOM to render the plugin and any help would be appreciated.

How hard would it be to create simple pie, line and bar charts with d3? I don't know if I even need it instead of google charts but just wondering because I heard D3 is actually hard which surprised me.

just use highcharts

>so the number of nested views would be variable depending on the selected user (see below)
why?

I'm not sure why there would be more than 2 views: photos, and photo details. You'd look through a list or grid of photos, click one, and have the child view of details appear.

What do you think about career as DevOps engineer?

Since I used to be a sysadmin for 7 years and now a front-end developer I'm thinking about either going full-stack or investing my time into DevOps to become an engineer in that area.

This article also piqued my interest but it seems that DevOps engineer has a metric fuckton more responsibilities than a developer (front- or back-end) which can result in some stressful work environment.
quora.com/As-a-software-engineer-how-do-I-shift-my-career-to-devops

I really love Open Source and doing front-end all day exclusively is getting really fuckin boring.

What do you think Sup Forumsents, what career path should I pursue?

>jQuery
youmightnotneedjquery.com/

document.getElementById("textInputWhereYouTypeWords").value = "Some crap I want to say."
document.getElementById("buttonThatTriggersPost").click();


jQuery makes bad programmers.

is there any reason not to use jquery except "muh bandwidth"

Working front end with backbone for the last month.

Fuck backbone...

Will you be using docker in production? If not then i wouldn't bother with it. I've had nothing but trouble since i started using it. Now I have to run my frontend outside of docker so that it doesn't fuck with gulp

being dependent on a library is bad, you're much better of knowing how to do things without.
and unless you need legacy IE support almost all of jquerys helpers are already native.

Why I just can't get interested in this field? I'll have a hard time finding a job in anything else due to my current degree. Fuck.

I had the same with accountancy.

>feels good to have my own website and be a memeterpreneur

Struts 2 + Lombok = based

had a meeting with a potential client. dude was a no show. is this common?

DigitalOcean is nice

Except for having to deal with statistical programming in javascript and integrating your charts with the DOM and your stylesheets, it isn't any more difficult than doing it in R or Python. You may also need to worry about performance if your visualizations use a lot of CSS transitions.

If the charts are simple and you already have some experience with front end javascript, it wouldn't be that hard though. Just look at some of the tutorials on the website.

That was ultimately my design goal, I was just trying to implement it that way as a placeholder so I wouldn't have to worry the extra UI layer when testing the detail view.

I wound up creating the intermediate state anyway, but I'm still curious if there's a simple solution to "collapse" multiple states into a single view because I feel like I might need to do something like that in the future.


ref #{{i}}

The above code works fine, but not if I try to do it with transclusion. I feel like there has to be a way to compile all of the linked templates into one.

Was bored so I wrote a shitty texthost thing.

>> human skillz, handshake skillz, hygiene skillz

I'm a hobbyist frontend dev. Make a github repo and I might contribute.

seeing as there is no sqtddtot thread and I am too much of a puss to make a new thread I'll ask here

how do I program /for/ the chromebook? theres hardly anything that you can do on this piece of shit and I want to change that even if it takes years of my life. I need to know what lang is most compatible, if most things work better via browser or app, and how to upload these. searching around only comes up with programming on and not for this shitty ass glorified browser.

>inb4 using a literal botnet computer
my main pc went to shit and this was gifted to me for free.
>Sup Forums is not your tech support
Im not looking for a solution to a technical problem, I am looking for how to program for a specific machine with limited resources.

Hey Guys, Is there an easier way to set two or more form fields to be equal using jQuery (or vanilla JS)?

I have this so far: jsfiddle.net/qanLp4y6/

function setTwoEqual(val1, val2){

var val1 = $('#'+val1);
val1.change(function(){
$('#'+val2).val(val1.val());
});

}

setTwoEqual('applicant_name', 'applicant_name2');

Is there a market for a manager/liaison who communicates between clients and workers to keep things running smoothly for everyone involved? I have barely been on either side of that transaction so I'm not sure whether it would be useful.

You mean customer relations? desu, if you had any kind of knack for it you'd be doing it already, because it's basically sales.

Operations is liaising between different departments of the company internally, but you make peanuts until you land a management position.

Say you followed this guide devwalks.com/lets-build-instagram-with-rails-part-4-presenting-pretty-profiles/ but with tweaks to create user avatars in .erb instead of .haml, and you got them to work. How would you go about allowing users to edit their avatars from their own profile by hovering their mouse over their avatar (at which point an "Edit your avatar" text overlay would appear) and clicking it to open a file upload form? One example of a site with this feature is facebook.

bump

For reference, here's how avatars are defined in application_helper.rb:

def av(user)
if user.avatar.exists?
return image_tag user.avatar.url(:medium),
id: 'image-preview',
class: 'img-responsive profile-image'
else
image_tag 'default-avatar.png', id: 'image-preview',
class: 'img-responsive profile-image'
end
end

Avatars are displayed under show.html.erb using

And under edit.html.erb, here's the current form to update a user's avatar:



It looks like an ordinary "Choose File" button.

>codepen.io/user/pen/yJvVYK
is there a similar methdo to get the entire div to shift up like that with a onClick listener?

Chrome plugins and/or extensions

How do you make max-width equal to the size of the window?

>how do I program /for/ the chromebook? theres hardly anything that you can do on this piece of shit and I want to change that even if it takes years of my life. I need to know what lang is most compatible, if most things work better via browser or app, and how to upload these.

>>>>Chrome plugins and/or extensions

thanks, I now have all of the information I needed.

What is the best WYSIWYG editor and why is it TinyMCE?

I am trying to change json data with a button but the loop is crashing the page what to do? here's the code

for (var i=0; i

Shit nigga. That shit is scary as fuck. The loop should be inside the event function.

$("#button").click(function(){
for (var i=0; i

the page freezes for a while before updating the data is that supposed to be normal for 200 object loop? because it updates very smoothly without the loop

Yes, maybe you should find an alternative to using the DOM 200 times.

I tried doing it manually, changed the value of all 200 individually and it goes smoothly should I keep it like this?

What the fuck? Send us a picture of your website

I found the problem, I just had to put the update request outside the loop :^)