[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: 318
Thread images: 39

File: 3.png (868KB, 822x552px) Image search: [Google]
3.png
868KB, 822x552px
"Whoever took over making these threads is doing a bad job" Edition.

>Previous Thread
>>62111074

>Official Discord
https://discord.gg/wdg

>Getting started
Get a good understanding of HTML, CSS and JavaScript.
MDN web docs offer a good intro (independent of your browser choice)
https://developer.mozilla.org/en-US/docs/Learn

>Free online courses
https://www.codecademy.com/
https://www.freecodecamp.com/
https://www.bento.io/

>Roadmap
https://github.com/kamranahmedse/developer-roadmap

>Resources
https://developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
https://stackoverflow.com/ - Developers asking questions and helping each other
https://caniuse.com/ - Check browser support for front-end web technologies

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

>in-depth comparison of VPS hosts
https://www.webstack.de/blog/e/cloud-hosting-provider-comparison-2017/
>>
How do I tell someone using mysql_connect that pdo is superior and not deprecated without sounding like a total elitist asshole?
>>
I certainly hope that all of you have upgraded your old node.js projects to ayo.js.
>>
>>62157737
How does it feel being confined to a general because /g/ doesn't think you are real programmers?
>>
>>62157837
is msqli ok?

>>62158479
HOLLUP
>>
>>62158528
>javascript
>can't into strong typing
kys
>>
>>62157837
mimic those who are telling you that php is shit and don't sound like total elitist assholes

>>62158528
go back to your fizzing and buzzing
>>
>>62157737
Best way to make easy money with webdev?
>>
>>62159582
youd be better off mining coins or whatever the meme is
>>
>>62159013
I told him,

"yeah we can use php but we should use pdo with prepare statements for safety"

TFW PRO AS FUCK, CUHHHH
>>
>>62159582
Get a job
work that job
collect a upper middle class income for easy work devoid of intellectual challenge 95% of the time?

sounds like easy money to me
>>
>>62158528
I make $130k a year doing front end dev.

This is in ATL too so it's not like I'm in an expensive area.
>>
Best server side validation package for express/node?
>>
>>62160899
Some people like express-validator but I don't really think form validation needs to be middleware.

I like "forms" aka caolan/forms, it's straightforward and sanely configurable
>>
>>62160437
what framework and what do you work on mostly?
>>
>>62160899
express-validator is the best I've found.
>>
How do you properly store Database credentials for creating a new PDO in php? Right now this is what i have, but it seems remarkably dumb to store them as plain text on the server.
class KurassuNeemu
{
private $host = 'mai.hosu.to';
private $user = 'yuuzaa';
private $password = 'Pas5uwa4D0';
private $dbase = 'deeta-beesu';

public function establish_connection()
{
try
{
return new PDO ( 'mysql:host=' . $host . ';dbname=' . $dbase, $user, $password );
} catch ( PDOException $e ) { }
}
}
>>
>>62162290
Traditionally you have a config file that holds environment-specific configuration stuff, and it looks something like this:

export DB_HOST=hostname
export DB_USER=username
export DB_PASS=password
export DB_NAME=database


This is exporting environment variables that your application can look for. This does not go into source control, it is generated on the server, somewhere nowhere near publicly served directories, and exists only there.

For a more systemic solution, there are packages like vault, and chef and puppet have arguably naive solutions for secret storage.
>>
halp

I have a website built w/ node/express as backend.

It's gonna be a private site, w/ apps and personal stuff (blog perhaps).

I plan on using Digital Ocean for hosting.

What's the best way to set this up in a reasonable way? What are the tools and prerequisites I need?
>>
>>62162593
Can you repeat the question?
>>
Is Laravel good choice that will be around for a long time? Wanna learn some php framework and be good at it.
>>
>>62162980
definitely yes.
>>
>>62162633
Best way/practices to setup website with node?
>>
>>62157737
Thank you I will look into it when I have time.

In the mean time I only use free templates, rip other peoples code and modify it, so far only static pages but I am interested in dynamic ones.

I guess I should look in SQL and php as well
>>
>>62163019

The simples way would be a premade "node droplet" on digital ocean, if they still have those?

>>62163064

For SQL you should learn the basic syntax and then look into the book "SQL anti patterns", it's great to learn how to avoid some (very common) pitfalls.
>>
>threads are only good, if they include a link to my shitcord
>don't forget to claim your username and introduce yourself to everyone :)))
The self-importance of some people.
>>
How do I put default values in constructors?
// es6
class Carousel {
constructor(options) {
this.name = options.name;
this.email = options.email
}
}

// es5
function Carousel(options) {
this.name = options.name;
this.email = options.email;
}


So I just have to initialize it like this:
let C5 = new Carousel1();


Instead of
let C5 = new Carousel1({
name: "name1",
email: "email1"
})
>>
File: 9892522.png (12KB, 250x250px) Image search: [Google]
9892522.png
12KB, 250x250px
FreeCodeCamp - a good learning resource or a cult raising unsuspecting beginners on jQuery and other frameworks?
>>
>>62164382
fcc and cc are great for beginners
but much like growing up irl, you have to eventually stop sucking on your mom's tits and make your own food
>>
>>62164382
This is the best for beginners
https://www.edx.org/micromasters/software-development

The third course, where you start doing Java, specifically teaches you how to understand gargantuan code bases and libraries which is what every single developer these days is doing and not building shit from scratch.

After a few of those courses just get some React book or Vue.js book and bang some shit out
>>
File: tumblr_nsn1etLtlT1ucq97xo1_500.jpg (52KB, 500x599px) Image search: [Google]
tumblr_nsn1etLtlT1ucq97xo1_500.jpg
52KB, 500x599px
>>62164411
>$832.50
I'm not used to such high prices for online courses. We have a respected distance learning institution here in the UK called the Open University. Is edx truly reputable or is it bullshit like udemy? I wouldn't sink so much money into an online course after the wankery I found with udemy.
>>
>>62164411
>recommending video content outside of pluralsight or udacity
get
out
now
>>
>>62164468
It's free, you only pay for "certified" track
>>
File: 1503600644052.png (12KB, 300x300px) Image search: [Google]
1503600644052.png
12KB, 300x300px
>paying for online tutorials
>>
Redpill me on tilda publishing
>>
>>62164087

class teste
{
constructor() {
if(arguments.length > 0) {
this.nome = arguments[0]['nome'];
this.sobrenome = arguments[0]['sobrenome'];
} else {
this.nome = 'Adriano';
this.sobrenome = 'Nascimento';
}
}
}

var a = new teste();
var b = new teste({nome:'José', sobrenome:'da Silva'});

console.log(a);
console.log(b);

>>
>>62157837
"The original mysql extension is not available anymore starting from PHP 7. It has plenty of bugs and security issues"
>>62158528
Once, I clicked the Catalog link.
>>
>>62164633
>>62164633
what if I only supplied 1 argument and the rest is default?

ex:
var c = new teste({nome:'José'});


How do I detect the index of the supplied arg? Or are there any other way?

I'm thinking of:
constructor()  {
let args = Array.prototype.slice.call(arguments);
args.forEach(function(i, index, array) {
if (i === null) {
i[index]

}
});

if(arguments.length > 0) {
this.nome = arguments[0]['nome'];
this.sobrenome = arguments[0]['sobrenome'];
} else {
this.nome = 'Adriano';
this.sobrenome = 'Nascimento';
}

But im not sure if its the right algorithm
>>
>>62164087
Typescript.
>>
File: 1491923251753.jpg (36KB, 700x375px) Image search: [Google]
1491923251753.jpg
36KB, 700x375px
>>62164840
https://jsfiddle.net/rry4qjjz/
Stupid reply box is not letting me paste the code
>>
>>62165196
>https://jsfiddle.net/rry4qjjz/
thanks anon
>>
>>62160437
This.

Not 130k, but more than double the average household income.
>>
Is bulma.io decent? How well does it work on mobile? I'm getting sick of Bootstrap
>>
>>62165889
Using it right now. You'll have to get used to the convention, but otherwise it's solid. No js = no opinions on how to run shit.
It's flexbox based (as is BS4), so solid as fuck in responsive design.
>>
Is git normally super slow over sshfs? I don't want to waste time setting up a local environment for WordPress dev so I'm doing things over sshfs, but git add takes a minute versus a second a or two which is a little annoying
>>
How do people debug their program while doing webdev? I feel like I'm completely in the dark while writing javascript backend / frontend since I won't get any warnings at all from my IDE. For example I spent one hour trying to solve a problem on the react frontend and it turned out that I had simply written this.email instead of this.state.email.
>>
>>62166270
warnings from your IDE isn't debugging lmao
debugging in webdev is the same as in other fields
actually learn what debugging is friend
>>
Is there an uptodate resource on web technologies that covers everything ? (HTTP (1&2, Pipelining, Websockets...), HTTPS and Certificates, SHA, Security, Logging and Credentials...) (also Databases, Migrations...)

I feel like I'm lacking
>>
>>62166692
RTFM
>>
>>62166704
man HTTP
>>
>>62164408
>but much like growing up irl, you have to eventually stop sucking on your mom's tits and make your own food

This is such a horrifying statement. I don't want to grow up ;_;
>>
File: ss-2017-07-01-00-57-39.png (124KB, 1659x823px) Image search: [Google]
ss-2017-07-01-00-57-39.png
124KB, 1659x823px
>>62165889
no

>>62166270
>For example I spent one hour trying to solve a problem on the react frontend and it turned out that I had simply written this.email instead of this.state.email.
use TypeScript for the love of god. the language server catches such mistakes in realtime
>>
Does anyone have a link to ngbook for angular 4? Also does anyone know how exactly a plugin like fullpage.is works? I need something similar but for angular
>>
File: branson delegate.jpg (52KB, 970x546px) Image search: [Google]
branson delegate.jpg
52KB, 970x546px
I will repost my offer once here. It has no value for experienced programmers, but you know, there are people who pay for code camps to learn. And my offer has more value than these paid codecamps.

Gentlemen. I'm looking for junior devs, pajeets, neets and anyone who is willing to become my slave. I have an offer that can be interesting for you.

I have a side-project with some commercial potential, but I don't have enough time to develop it myself. So, I'm looking for people of any skill level who want to practice and do job for me. I will give you tasks, and you will be free to implement them in any way you want — microservice hell is what we will create.

What is your benefit?
- You will get real tasks. If you are learning to code, real-world task may be good for you to understand what expects you in the industry;
- You will get some experience of working with a real client. You will see how real-world interaction may look like;
- My feedback and code review may help you improve your skills;
- You'll be able to add "I know how to develop microservices" line into your CV;
- When the project becomes profitable, you risk getting a low-paid laid-back job, you will have the opportunity to feel the pain of microservice integration and so on.

What is my benefit?
- Free coders;
- Opportunity to find people for future mutually-beneficial exploitation.

Interested? Contact me via [email protected]
>>
>>62161515
These day I'm using Vue but React is the 800 lb gorilla.
>>
>>62167753
Very nice. You have the classic Disney-esque greedy capitalist character down to a tee. Much narcissist, very wow :^)
>>
Is it fine in terms of accessibility to use placeholder for important information in an input element tag? Can blind people have the placeholder text read out to them or do their appliances skip over it?
>>
>>62167753
fuck off
>>
Should I remove tutorial projects from my git?
>>
MDN says event.keyCode is deprecated. Also event.which and event.charCode. So what the hell should I use to register the enter key being pressed?
>>
>>62160437
Money does not make you a real programmer
>>
>>62168670
This is where you're wrong.

Web dev is programming whether or not you want it to be.

I have done both for probably, and hopefully, longer than you've been alive. Definitely programming and definitely harder in some areas than conventional native programming.
>>
>>62157837
if someone is using mysql_connect let em know its deprecated and existing ways exist to breach databases using that. Then charge em a lot of money just to replace things with PDO's because they assume it will cost a lot of money. Unless its your coworker, in which case youre fucked m80
>>
>>62159582
>know basic php, mysql, css, html
>use wordpress and make minor adjustments to prepared themes
>1.5k a site
rinse and repeat senpai
>>
>>62168257
But the classic capitalist would first lure you, promising high salary, and only then will dump or enslave you. I am honestly offering slavery from the start. I am a good man, not a fat cat.
>>
>>62162420
not original anon but how can you encrypt said config file (.ini i assume)? I can unencrypt inside a php script but im a pleb and can't find the linux command to encrypt said config file
>>
just installed mongoDB via the shell on a ubuntu VPS.
if I status it it logs as running on the console but if I ls I just get the whatevs.txt that was on the server when I first SSH-d in and the file contatining my code.....
where is mongoDB?? is it hidden? how do I run the .mongo to execute shell commands??
>>
>>62167753
we aren't going to do your gay project for you pajeet
>>
>>62157837
>>62162290
what's the best way to get number of rows with PDO?
I know that shit with count(*) but I just hate that I have to write the same shit twice when I'm using SELECT like this
$query=$conn->query("SELECT * FROM {$table} {$where}");
$row=$conn->query("SELECT count(*) FROM {$table} {$where}");

Am I doing it wrong?
>>
>>62169234
>>62169234
the `mongo` command will put you into a mongo shell. your data should be stored at /data/db unless you or your method of installation changed that.
>>
File: filter.jpg (49KB, 765x592px) Image search: [Google]
filter.jpg
49KB, 765x592px
https://jsfiddle.net/pg6t60b1/

Decided to write my own code to filter a few portfolio elements on a page (pic related).

How can I make this code a bit more efficient and dynamic? I'm basically making a template and I want the user to be able to change the categories without having to edit the JS.

btw I used jQuery because JS is not my strongest point, I mostly do backend work.
>>
>>62169491

figured it out by just typing stuff :) Thanks! it works!
>>
>>62169673

Nice.

Improvements:

1) You don't need to use "each" for an array of jQuery elements.
2) You don't need a separate function per button. Make a generic function and use data tags or something.
3) Minor nitpick but if you bind a listener to the parent, then you can dynamically add more buttons later (if you bind to button, newly created buttons will not inherit events).

Examples:

https://jsfiddle.net/y2a1oyrf/3/

Also, hating on jQuery is a meme. It's good for prototyping/ projects where you are doing significant dom manipulation and don't have nazi performance restrictions.
>>
>>62170038
Damn this is so clean. Way more efficient than the spaghetti I wrote lol. Thank you anon.
>>
>>62164087
>>62164633
>>62164840
class DefaultClass {
constructor({ name = 'Default Name', email = 'Default E-mail' }) {
this.name = name;
this.email = email;
}
}

new DefaultClass({});
new DefaultClass({name: 'some other name'});
new DefaultClass(); // error


class DefaultClass {
constructor(opts) {
const { name = 'Default Name', email = 'Default E-mail' } = opts || {};
this.name = name;
this.email = email;
}
}

new DefaultClass();


// https://babeljs.io/docs/plugins/transform-class-properties/
class DefaultClass {
name = 'Default Name';
email = 'Default E-mail';
constructor(opts) {
Object.entries(opts)
.filter(([k,_]) => ['name', 'email'].includes(k))
.forEach(([k, v]) => this[k] = v);
}
}
>>
>>62170704
whoops
// https://babeljs.io/docs/plugins/transform-class-properties/
class DefaultClass {
name = 'Default Name';
email = 'Default E-mail';
constructor(opts) {
Object.entries(opts || {})
.filter(([k,_]) => ['name', 'email'].includes(k))
.forEach(([k, v]) => this[k] = v);
}
}
>>
>>62167006
http://libgen.io/ads.php?md5=20C68E019F43BFF9472363E6FB5A1D92
>>
Help me convert this to an async await function

roleAuthorization: function(type){ 
return function(req, res, next){
var user = req.user;
User.findById(user._id, function(err, foundUser){
if(err){
res.status(422).json({error: 'No user found.'});
return next(err);
}
if(type === foundUser.userType){
return next();
}
res.status(401).json({error: 'You are not authorized to view this content'});
return next('Unauthorized');
});
}
}
>>
>>62160437
couple of super simple questions (for anyone viewing really)

do you look for clients/small businesses with old shitty sites or do you offer them to make them a new one? I can imagine both

how does your clients manage their sites, wordpress?

also I can build responsive sites fairly easy, how would I go about speeding up the process of learning backend or to build a dynamic website (eCommerce, blogs, etc)

thanks in advance
>>
what should i use for scraping and submitting forms, php or node.js?
>>
>>62172508
Rewrite User.findById to return a promise, or trying to use async / await isn't gonna really improve anything.

async function userById(id) {
return await new Promise((resolve, reject) => {
User.findById(id, (err, user) => {
if (err) return reject(err);
resolve(user);
});
});
}

function roleAuthorization(type) {
return (req, res, next) => userById(req.user._id)
.then(user => (type === user.userType ?
next() :
res.status(401).json({
error: 'You are not authorized to view this content',
}) && next('Unauthorized'))
.catch(err => (res.status(422)
.json({error: 'No user found.'}) &&
next(err))
)
}


That's pretty bad but you get the idea.
>>
>>62172825
Depends how you intend to scrape.

No API and the website generates content through JavaScript?
Selenium with PhantomJS (there's node.js and python modules)

No API and the website doesn't require JS?

Node.js with that jQuery equivalent on the server side. Use async/await to make your life easier.
Python with lxml and the requests library is a good choice too.
>>
>>62173206
alright, i'll go with selenium with phantomjs. thanks very much
>>
File: audreyhorne.jpg (178KB, 800x1069px) Image search: [Google]
audreyhorne.jpg
178KB, 800x1069px
How do I prevent storing my MySQL DB login info in plaintext in my relevant php files? I can prevent these files from being committed, but they comprise the bulk of my project.

Should I make a single seperate PHP file that just handles login validation and direct the others there, or is there a better way?
>>
>>62173184
Probably clear from that example that I'm not a big fan of the async / await approach, but here's a more aggressive version:

async function userById(id) {
return await new Promise((resolve, reject) => {
User.findById(id, (err, user) => {
if (err) return reject(err);
resolve(user);
});
});
}

async function roleAuthorization(type) {
return (req, res, next) => {
try {
const user = await userById(req.user._id);
return type === user.userType ?
next() :
res.status(401).json({
error: 'You are not authorized to view this content',
}) && next('Unauthorized'));
} catch(err) {
return res.status(422)
.json({error: 'No user found.'}) &&
next(err);
}
};
}


Using async / await basically trades out your error handling mechanics for try / catch blocks, which I personally dislike vs promise catch. In this case, if you want to use async / await over promises, I'd recommend returning null instead of doing error stuff:

async function userById(id) {
return await new Promise((resolve, reject) => {
User.findById(id, (err, user) => {
if (err) return resolve(null);
resolve(user);
});
});
}

async function roleAuthorization(type) {
return (req, res, next) => {
const user = await userById(req.user._id);

if (!user) {
return res.status(422)
.json({error: 'No user found.'}) &&
next(err);
}

return type === user.userType ?
next() :
res.status(401).json({
error: 'You are not authorized to view this content',
}) && next('Unauthorized'));
};
}
>>
File: ?????.gif (798KB, 450x253px) Image search: [Google]
?????.gif
798KB, 450x253px
>>62173296
>they comprise the bulk of my project.
>>
>>62173296
What is the actual audience for your project? Are you just uploading your own personalised work to Github as a means to show that you know PHP and SQL to others or is it something that other people can actually use?

If it is the latter then you should see up an installation page that allows the user to set up their own database details.
>>
>>62173365
That's a good question actually. I'm mainly just using git for version control, I don't care about people seeing the source, so I'll probably just set the repo to private and continue on the same way.
>>
>>62173206
>>62173246
Alternatively consider selenium with chrome headless, as working with the outdated junk in nodejs can be a big pain in the ass.
>>
What is the best way to get a screenshot of a webpage? I'd seen a lot of shitty third party services, and I'd tried to do it using phantomJS but I couldn't get that to work.
>>
>>62173184
>>62173333

```
import User from './...'
import {
USER_NOT_FOUND_ERR
USER_UNAUTHORIZED_ERR,
USER_UNAUTHORIZED_MSG
} from './...'

const userById = id =>
new Promise((resolve, reject) => {
User.findById(id, (err, user) => {
if (err) {
reject(err);
}
resolve(user);
});
});

const roleAuthorization = type => async (req, res, next) => {
try {
const user = await userById(req.user_id);
if (type === user.userType) {
next();
} else {
res.status(401).json(USER_UNAUTHORIZED_ERR);
next(USER_UNAUTHORIZED_MSG);
}
} catch (err) {
res.status(422).json(USER_NOT_FOUND_ERR);
next(err);
}
};
```
>>
>>62172105
libgen.io autocloses now I can only use libgen.pw or bookzz/bookfi
>>
>>62172744
Not that guy, but in my experience working on old shitty sites is hardly worth the effort. The last 2 I did the previous dev just frankensteined code directly from stack overflow with zero rhyme or reason.
Small businesses will almost never know what they actually need development wise. They just want features that work. As long as the general idea of what they want front-end wise is maintained they won't know the difference.
I personally just offer to look at it for free and then determine which route I want to go and how much it will cost upfront.

For back-end just pick a stack you wanna try first. I personally found LAMP stack to be very simple and XAMPP is a really easy way to jump right in without having to do any setup yourself.

Making a simple inventory management website that allows you to add/edit products is a good way to start with something practical that small businesses normally need. Add more features as you see fit to further your skills or move on to another stack.
>>
>>62173556
>I couldn't get that to work
You must be retarded, then.

The best way currently is probably something like rendertron or puppetron.
>>
>>62173690
Eh, I guess. I'm not really a fan of the const name = () => function signature just because I then have to define my functions in a specific order as opposed to an order I deem to be best. There are situations in which I like to put my functions after a return statement, for example.
>>
File: Untitled.jpg (80KB, 619x743px) Image search: [Google]
Untitled.jpg
80KB, 619x743px
am I gonna make it
>>
>>62173975
>literally no padding
>>>/dpt/
where the other blind anons are
>>
>>62172744
Not him/her, but;

>how does your clients manage their sites, wordpress?

I (mostly) use Wordpress with a custom admin interface. I add/remove admin menu items in functions.php and hook it all up using ACF (plugin). There are even admin themes so it doesn't look like Wordpress.

>also I can build responsive sites fairly easy, how would I go about speeding up the process of learning backend or to build a dynamic website (eCommerce, blogs, etc)

For blogs I use Wordpress.
For eCommerce I use either Wordpress + Woocommerce (for higher budgets) or Shopify. Shopify has its own templating hooks just like Wordpress.
>>
File: consider.jpg (29KB, 600x600px) Image search: [Google]
consider.jpg
29KB, 600x600px
>material design
>>
>learning HTML/CSS

How do I make 4 images appear one after the other in a horizontal line, and also center that line?
>>
>>62173975
YOU CAN DO IT
>>
File: tonari1-1.jpg (40KB, 600x338px) Image search: [Google]
tonari1-1.jpg
40KB, 600x338px
>>62174360
>

>>62174451
center horizontally?
anyways learn flexbox babe
>>
>>62174451
Images are inline elements, so you can just give their container
text-align: center;
. The image will wrap to the next line if they don't all fit on a single one.

If you want the images to resize dynamically, based on how wide the window is, then flexbox is your best bet, as >>62174611 said.
>>
>>62174611
>>62174850

Here's what I have

index.html
<code>

<div class="image-cropper">
<img src="./image002.jpg">
</div>

<div class="image-cropper">
<img src="./image004.jpg">
</div>

<div class="image-cropper">
<img src="./image006.jpg">
</div>

<div class="image-cropper">
<img src="./image008.jpg">
</div>

</code>

style.css
<code>

body {
text-align: center;

}

.image-cropper {
text-align: center;
width: 100px;
height: 100px;
position: relative;
overflow: hidden;
border-radius: 50%;
}

</code>

The images align vertically along the left. I'd like to get them to align horizontally.

ps. thanks for flexbox
>>
First interview for an entry level php dev gig in about a week.

What should I do to prepare? What kind of stuff am I expected to know? I took a php course years ago I don't really remember it desu.

HELP! I JUST WANT TO MAKE IT
>>
>>62174942
https://codepen.io/anon/pen/dzwWJr
>>
>>62175016
That's what it looks like, but I need spurdo to align horizontally rather than vertically.

Then have them centered.
>>
>>62174942
Ah, ok, by container, I meant a container around all four of the images; and I was assuming the images didn't have their own containers around them.

Make a container around the whole group of them, give it
text-align: center;
, and then give the image-cropper class
display: inline-block;
.

The inline-block thing makes the divs act basically like images do; as far as obeying the parent's text-align and lining up horizontally.
>>
>>62170038
Nice one, Thanks anon
>>
File: 1500831463245.gif (4MB, 421x399px) Image search: [Google]
1500831463245.gif
4MB, 421x399px
>>62175067
There we go. Thanks anon! I realize what I was doing wrong there.
>>
>>62175048
https://codepen.io/anon/pen/dzwWJr
like so?
>>
>>62175206

nah like this

https://codepen.io/anon/pen/dzwWJr
>>
>just found out about interpolated strings in JS after using it for 5+ months

Holy shit, that's so useful, why did nobody tell me about it? Are there other time-saving tricks I should know about?
>>
>>62173411

You can also store the credentials in environment variables and use PHP functions to get the credentials in the configuration file. Of course, this means your credentials are now in memory (your machine) and that comes with other risks, but if you commit your code the part with the credentials will read like getenv('MY_PROJECT_DB_PASS')
>>
IE 11 has 13% market share, do you guys still care about it?
>>
>>62175444
IE or (((edge)))
>>
>>62175444
I don't have a choice, I have to support all versions down to IE 9 at least. Yes, it's as shitty as you would expect. Bending over backwards to cater to Microsoft's abomination is not fun.
>>
File: 1488471157012.png (2MB, 6144x3584px) Image search: [Google]
1488471157012.png
2MB, 6144x3584px
How's ASP.NET Core? New to web dev, and ASP.NET, and .NET Core, but just playing through the tutorials and it seems reeeeeaaaaally easy to use. Is it worth learning? I'm already familiar with C# and .NET, so it'd be nice if it's a decent platform.

Picture unrelated.
>>
>>62167988
It's such a shame we only get to pick between Facebook or Google. Two companies I'd like to go away
>>
File: image.jpg (859KB, 1230x2048px) Image search: [Google]
image.jpg
859KB, 1230x2048px
I have a stupid question.

I built a web scraper for work using Python to pull data off of a shity SAP front end. Used the selenium library to comb through the website and write data to a table in our database.

One of the biggest issues I had to work around when building the thing was the ID of a bunch of HTML elements in the webpage kept incrementing as you navigate around. For example, _button1 becomes _button5 after you click a link and return. A ton of the buttons, row headers, and other pieces of the site did this.

Can anyone tell me why this happens?

Why the fuck does this happen? Genuinely curious
>>
>>62176222
if they went away a majority of our tools would be very expensive
>>
Django or Rails.

Which should I learn?
>>
>>62176459
use xpath
>>
if i design a simple portfolio site, is 40 bucks enough for any of you to build it for me? you can modify and existing template i don't care
>>
>>62176649
I did exactly that and got the thing working. My question was more about why would somebody design a website to have this behavior. Just doesn't make any sense to me to have unique identifiers change every time a navigation event happens.
>>
File: progChallenges.png (2MB, 3840x2160px) Image search: [Google]
progChallenges.png
2MB, 3840x2160px
>>62157737
Does /wdg/ have their own version of this?
>>
>>62176684

$40 is about my hourly rate.

If it's only a layout you need, why not go to themeforest and pick something nice that's close to what you want?

https://themeforest.net/category/wordpress/creative
>>
>>62176758
yeah
>make crud app
>mix and match languages and frameworks for hundreds of options
>>
>>62176684
i would. email me your design at [email protected] (thats a temp email)
>>
>>62176684
>>62176826
Ignore that fucker, I'll do it for $39.99
>>
File: 1452898914295.jpg (113KB, 1442x1079px) Image search: [Google]
1452898914295.jpg
113KB, 1442x1079px
What's wrong with tables? (not layout)
>>
>>62177371
Nothing..
>>
>>62173975
Yes. That looks good. Add some CSS to that using flexbox (display: flex;).
>>
>>62174451
flexbox flexbox flexbox

.mydiv {
display: flex;
align-items: center;
flex-direction: row;
}
>>
>>62177371
Tables are pretty good for displaying tabular data.
>>
how many more years before front-end devs and web "designers" are completely replaced by wordpress templates
>>
>>62177638
Seeing as wordpress market share has been steadily falling for like five years I wouldn't hold my breath.
>>
>>62177638
do people even use wordpress anymore?
>>
Is the Flexbox meme still good or old and busted due to this?
https://www.youtube.com/watch?v=7kVeCqQCxlk
>>
>>62178396
Flexbox and grid have two very different use cases, they're not in direct competition or anything.
>>
>>62176712
It's probably some bs framework.

Lots of frameworks will hijack IDs or classes during rendering.

I wouldn't rely on unique identifiers using selenium or anything of the sort nowadays because of this.

/shrug
>>
>>62176758

I think this is a bad chart.

24: Texteditor with autosave+date is "hard"
25: Imageboard is "easy"
86: Designing an esolang is "hard" (you can make a DSL in no time)
121: Rougelike Engine is "hard"
124: Oil Panic is "easy" (you need severe GUI mastery for this)
>>
Having some difficulty structuring website.


Is it a bad idea to have multiple react apps on one server? ? ? ? ?

Like a routing that points to '/sales', which is then one app in one build folder,

and a routing that points to '/contact' which is also one app in one build folder.
>>
>>62179779
No.
>>
Hey guys, can you tell me how can I perform an onclick call to a function provided in addon firefox?

i.e. I am inserting a link into a webpage, and when that link is clicked I want it to call a function in my js file.
>>
>>62179858
Thank you!
>>
>http://www.adultswim.com/toonami/
I don't know much about web dev, but I would like to know what was used to make this website.
>>
>>62180242
webGL
here's the minified source code: http://toonami-prod.s3.amazonaws.com/assets/js/toonami.js
seems like it was made by an agency called activetheory, maybe you can try sending them an email asking for resources to learn exactly what they did on that website (they probably wont answer because muh proprietary software but maybe they take pity on you)
>>
My birthday is coming up and my parents have offered to get me some books. I have intermediate Javascript ability and basic PHP / SQL ability. There is this PHP 7 'cookbook' that looks quite interesting:

https://www.amazon.co.uk/PHP-Programming-Cookbook-Doug-Bierer/dp/1785883445

I've been at webdev now for the past three months and would like to learn as much as I can but not touch any additional libraries yet until I understand the basics. Any book recommendations /wdg/?
>>
File: boating_school.jpg (22KB, 512x384px) Image search: [Google]
boating_school.jpg
22KB, 512x384px
What are you learning about right now /wdg/?

I am experimenting with the Web Storage API.
>>
The most annoying aspect about helping newer developers is the sheer number of really stupid questions that make absolutely no sense, but to them it makes sense because they know nothing.
>>
>tfw you start being able to solve problems by yourself without asking anybody or referring to documentation
>>
>>62175647
not ready

>>62177638
you don't really understand web development well if you think this is a real possibility

>>62180242
doesn't load even when I disable ublock

>>62181283
good job
>>
>>62168860

> Web Dev is programming

HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA
>>
If users can edit their profiles in the main site, and administrators can edit profiles in the admin area, should I have two different controllers even if they're for the same action?
>>
>>62181664
Logically yeah, you would use two controllers. You could use the same Model though.
>>
>>62181554
you have to have hardware accel on
its not rocket science babe
>>
>>62181609
what is it den
>>
>>62181804
don't reply to /dpt/ shitters, ignore them and they'll return back to their fizzbuzzing
>>
is it bad to use tags like

<figure class="imghvr-fade">
<img src="#">
<figcaption>

</figcaption>
</figure>

etc in your site?
>>
File: howto.png (54KB, 1041x371px) Image search: [Google]
howto.png
54KB, 1041x371px
How to cut a whole png with icons to use it inline, i don't get it. i want to use the same in my webste. pic related

check footer to see it in action https://worldofharry.com
>>
>>62181609
<!DOCTYPE html>
<html>
<head>
<title>Le furst progrem</title>
</head>
<body>
<h1>im koding wit Karlie u guise</h1>
<p>ecks dee</p>
</body>
</html>
Look, I can kode mom!
>>
>>62182288
>he fucked up basic html5
omg how embarrassing to attempt to appear superior than others but miserably fail
>>
Is there a place like Dribbble/Behance, but for web devs where I can look up people and ask them if they're available for hiring? If less cancerous the better. Thank you in advance.
>>
>>62181609

I'd like to see you making a youtube clone.
Stupid /dpt/ fag.


>>62182138

-open graphic with simple image editor
-[optional: make the background "invisible" (--> alpha channel)]
-cut into pieces
-save pieces
-flexbox in footer
-each box has one image
>>
>>62182108
no
>>
>>62182288
Instant 70k yearly if you are a female.
>>
>>62182831
Bonus payment if she's exotic.
>>
>>62182138
You mean using double rows for small screens and single row for large screens?
You may want to use bootstrap.
Here's a quick example:
https://jsfiddle.net/yo3kwtgp/
>>
>>62157737
Javascript question. I have a few audio files that I want to activate and deactive on click. What's the cleanest way to do this? I also want the audio to loop while it's activated.

For example. There is a button "Bark" that loops "barking.wav" over and over until you click the button "Bark" again. There is also a button "Meow" that activates a meowing audio clip. Two audio clips can't play at the same time.

Javascript is my weak spot, any help would be greatly appreciated. I can't seem to find a stackoverflow that helps me.
>>
>>62175647
fuck .net Core
If you like to see your project having random error and making you do random migrations then have fun
>>
>>62183506

Add listener to each button
If clicked and is not active, deactivate all other sounds, play selected sound
If clicked and is active, deactivate current sound
>>
File: naom_5602742662569.jpg (117KB, 1370x587px) Image search: [Google]
naom_5602742662569.jpg
117KB, 1370x587px
I don't want to alarm any of you guys but I believe that I am a genius.

>have issue working with Local Storage where I want each stored item to have an incrementing key so that they don't overwrite and every item persists in the storage
>mess with the increment operator (++) and shit like it, but every time the page is refreshed the initial value starts from 0 again because that is how it is initially defined at the top of the .js file
>have a think, a big think, a very intense think about the problem
localStorage.setItem(localStorage.length + 1, JSON.stringify(projInput.value))

>mfw it works perfectly
>>
So I started creating my own data table library in pure vanilla JS because all existing ones absolutely suck.

God I swear I will make this the data table library I always wanted to have.
>>
>>62183740
How do I check if it's active?
>>
I have multiple input fields that I am currently filtering a ng-repeat by like so
...
<input class="form-control" type="text" ng-model="itemFilter.id" />
<input class="form-control" type="text" ng-model="itemFilter.attr1" />
<input class="form-control" type="text ng-model="itemFilter.attr2" />
...
<tr ng-repeat="item in $scope.items | filter:itemFilter | orderBy: '-id' track by $index"> <td>{{item.id}}</td>
</tr>
...
How can I filter on the tokens from each the inputs?

For example, if itemFilter.id = "1 2 3" the ng-repeat would include ids that contain 1,2, or 3
>>
>>62169028
thank
>>
Stupid question but I'm making a react app that takes info from a JSON file.


What should I do with the JSON file? Put it in a folder called data? Leave it in a React file? What should I do with the JSON file?
>>
>>62186224
If you're just playing around,yes, just place it in a folder so you can learn i/o.
>>
text-decoration doesn't work in Chrome oh my god

How do people turn off default styling for links in Chrome???
>>
>>62176758
the real "fuck you" is that Easy and Medium look the same to me

FUCK THE COLOURBLIND AMIRITE
>>
>>62186296
you better check yourself. it definitely works in chrome. text-decoration: none;
>>
>>62186636
Ahh, you see. I didn't clear the cache and so I freaked out when nothing changed. Silly me.
>>
Best resources to learn about database practices and SQL syntax?
>>
>>62186620
have you tried a browser plugin like daltonize?
>>
>>62186718
looks like it's available on chrome, and firefox just broke all of their plugins so nothing out there will work. i'll try to upload the image manually to daltonize though, thanks
>>
>>62185437
I don't know anon. There are some good JS people in these threads, I'm not one of them.
>>
>>62186296
it does

>>62185437
you need to store state of each button, for example in an array. set to true when clicked, set to false when clicked again.
>>
www.berkshirehathaway.com

>this website
>>
>>62187028
looks fine to me. except from the text width not being limited here http://www.berkshirehathaway.com/message.html
>>
File: 1436254944164.png (45KB, 588x764px) Image search: [Google]
1436254944164.png
45KB, 588x764px
>>62187028
Buffet probably coded this himself using primitive transistors.
>>
>>62187028
>>62187081
>http://www.berkshirehathaway.com/disclaimer.html
>Reproduction or distribution of any materials obtained on this website or linking to this website without written permission is prohibited.

i hope you got permission for that link
>>
>>62183506
You might find this helpful
http://blog.chrislowis.co.uk/2013/06/05/playing-notes-web-audio-api.html
>>
>>62188646
>>62188646
>>62183740
>For example. There is a button "Bark"
https://howlerjs.com/
>>
>>62188676
>>62183506
I quoted wrong id
>>
>>62187028
> one of the richest people on earth
> website looks like a child made it in notepad

Pretty classy really.
>>
File: 1499707450455.png (334KB, 512x556px) Image search: [Google]
1499707450455.png
334KB, 512x556px
Give it to me straight, /g/oys. I'm thinking of ditching my 2.5 year "career" in I.T. as a Unix/vmware sysadmin and getting into webdev (front, back, full, whatever).

Is it worth it, in your experience?

Is there more money?

Are there more job opportunities?
>>
>>62189697
it only is worth it if you enjoy web dev more than sysadmin
>>
>>62187106
I didnt catch that.

>>62188438
Oh well. 7 proxies etc
>>
File: photo(2).jpg (1KB, 30x30px) Image search: [Google]
photo(2).jpg
1KB, 30x30px
been learning web dev since around March. Only know basic html, css and was learning basic JS but it's just so demoralizing. I guess because I moved to a big city (I'm from a small town in kentucky) and thought I could get a job in this stuff if I focused for 3 months. I guess you could (bootcamp graduates do it) but this whole journey of learning front-end web development is hard and I think I just need to relax and do it because I want to (because I do) and stop thinking about a job. Because every job application I send out for an internship never gets returned and I wantt to give up..
>>
>>62189812
I think I would. The little bit I've done already with HTML/CSS/JS/jQuery has been fun.

But I don't want to bother with something if the job market isn't there to support it.
>>
PHP laravel or Ruby on Rails?
>>
>>62190048
keep at it, goy. keep making things that you want to make, keep building your skills and portfolio. i'm toying around with making ticket booking / online shop systems as well as a 4chan clone, all in PHP. until i get these to a point where i can say i'm happy with them, i won't go around asking for jobs. so yes, forget about the concept of a "job". go full basement mode. abandon humanity. i'm entering this mode too as i feel it's the only way at this point. we can make it.
>>
What are yall niggas' opinion on CSS grid? I'm debating learning it.
>>
>>62169483
Perhaps a common table expression will solve your issue. Eg the With clause
>>
>>62190565
Neither
>>
>>62190806
Why not just understand how it works and do it yourself?
>>
>>62191013
I don't really want to bother unless I see a clear benefit, ie something it can do that nothing else can do
>>
>>62190806
It's cool as fuck, but I don't think it works on Safari yet.
>>
>>62191060
If you don't mind me asking, what does it do that makes it superior to Bootstrap/flexbox?
>>
File: nevergiveup.webm (1MB, 640x480px) Image search: [Google]
nevergiveup.webm
1MB, 640x480px
>>62190048

don't give up anon
>>
I started memeing at work.

>php doesnt deserve to be a templating language and is dead.
>jquery is dead because ES7 and angular

Everyone agreed.

PHP and jquery is our stack
>>
File: 1504228252630.png (293KB, 633x758px) Image search: [Google]
1504228252630.png
293KB, 633x758px
>>62157737
WHY IS WEB DEVELOPMENT SO GODDAMN VAGUE
>dude just build it yourself XD lmao
>dude just use Wix lmao
>dude Wordpress lmao
>dude the OTHER Wordpress lmao
>dude squarespace lmao

Every single option is a fucking money racket, why is writing a site and seeing the results previewed beside it not possible?
>>
>>62192144
the technology just isn't there yet
>>
How do you install PHP on Windows 7 and not kill yourself?

>install it
>Surprise, random .dll file missing, as usual
>Need to install Microsoft Visual C++ redist, all versions, for both 64 and 32-bit systems
>run php
>"DING!"
>"The application was unable to start correctly (0xc000007b)"
>>
>>62192144
Drupal?
>>
File: 1504229189336.png (262KB, 446x456px) Image search: [Google]
1504229189336.png
262KB, 446x456px
>>62192244
>web development on Windows
>>
>>62192144
None of those are web development.
>>
>>62160899
Gentoo
>>
>>62180367
You aren't going to learn programming form a book.
>>
>>62192284
I know... Every otherwise simple action feels like struggling with an obese mongoloid.
>>
File: 1504060933530.gif (141KB, 250x250px) Image search: [Google]
1504060933530.gif
141KB, 250x250px
>>62192144
>writing a site and seeing the results previewed beside it
literally Brackets.

>fucking money
Wordpress is free open source
>>
File: 1504229548536.jpg (47KB, 500x350px) Image search: [Google]
1504229548536.jpg
47KB, 500x350px
>>62192354
Install Gentoo
>>
>>62192244

get XAMPP
>>
>>62168326
You can look up the placholder attribute spec on w3c and see if it mentions how screenreaders treat it
>>
>>62192367
Already did, but I can't do it on my work machine.

In Windows every move you make is the wrong one. Holy shit, I'm mad.
>>
>>62192366
>Wordpress is free open source
but any of the worthwhile plugins and widgets to have actual function beyond a static page costs
>>
>>62192144
>WHY IS WEB DEVELOPMENT SO GODDAMN VAGUE
Because you're retarded.

>why is writing a site and seeing the results previewed beside it not possible?
I literally do this every day.
>>
>>62192379
Thanks, Anon. I'll try it right now.
>>
>>62174036
Are you making decent money with this? I've topped out on this skillset and now bored.
>>
>>62190748
Not necessary for a job. It also makes you weird as you lose social skills. But keep up the great blog posts
>>
>>62192534
How much would you say is needed to start applying? Noob af here.
>>
>>62192379
Anon, you saved a life today.

Not much of a life, but still thanks!
>>
>web dev
>80 billion dependencies
>frameworks built on top of frameworks built on top of frameworks built on top of magic
>have to combine 30 difference languages and hundreds of libraries just to make one website

Things have really changed since I was in high school shitting out geocities websites.
>>
>>62192646
>go into chemistry
>WOWWWWWW WTFFFFFFF WHAT ARE ALL THESE THINGS AND PROPERTIES AND WTFFFFFF WHY CANT I JUST MIX VINEGAR AND BAKING SODA LIKE THE GOOD OL DAYS
>>
>>62180242
>http://www.adultswim.com/toonami/
JQuery JQueryUI and TweenMax
>>
>>62193286
In Chemistry at least everything makes sense and has a purpose. 90% of the shit in web dev was haphazardly thrown together by idiots, is redundant with other shit but still required because m-muh dependencies, and you have to memorize every "xDD so unique!" API because web devs don't even know the word "standards".
>>
File: 1368926151215.jpg (31KB, 228x243px) Image search: [Google]
1368926151215.jpg
31KB, 228x243px
>>62192646
>be shit webdev
>have to use frameworks with babby methods that do everything for you
>complain about how hard it is
>>
>>62193639

Your reply is asinine and exposes your inexperience.
>>
>>62193816
Worse, probably one of those tards that spends most of his time reading Medium posts about how complex and confusing webdev is to learn and never actually learns anything.
>>
Hey /wdg/,

I want to move all of my domains away from my hosting platform (moving to Vultr).

Where should I move them? Do you guys use any kind of domain management service that you can recommend?

Thanks in advance :)
>>
>>62194102
I havent had any problems with porkbun
>>
>>62194127

Cheers bud, might give them a go
>>
>>62194102

namecheap is decent.
>>
>>62190048
According to some podcast I listened to it takes an average of about 5 or 6 interviews to get a job. Rejection seem to be the name of the game.

Ive interviewed 8 times before landing a two fucking month contract and now I'm unemployed again... I moved from small town Tennessee to Denver and can't get work here, so I'm about to move back.

It sucks anon. I believe we can both do it!
>>
>>62194501
what kind of companies have you been applying at in denver?
>>
>>62169483
Couldn't you just do
"SELECT *, count(x) FROM {$table} {$where}"
? I mean it's been a while since I've done PHP/SQL, but that'd return count and whatever you want (I know count will be in another column for every value in the array, but still, you'd have the count with only one SQL query.)
>>
>>62194501
Denver's hiring like crazy honestly. Have been receiving calls pretty regularly and I actually just started a job a few months ago. Would you like me to forward you some job postings I get?
>>
>>62190048
I'd say you'd get better responses if you focus on both front and back end. Honestly learning some basic Nodejs would help you out a lot. Just throw it on your resume once you learn how to make a basic Express API with Node and if you get a call back learn more.
>>
>>62194768
not OP but what languages are you seeing and where are you finding the postings?
>>
>>62194792
Anything JS-focused (Angular/React/Vue for frontend, Node backend) and devops-y (Docker, Rancher, Kubernetes, etc). I get calls for PHP and Rails every once in a while but I largely gave up on those.

I put up my info on Dice and Linkedin. I've gotten two jobs from Dice by applying and my latest job was a call by a recruiter who happened upon my resume on Linkedin.
>>
File: azn.jpg (99KB, 640x640px) Image search: [Google]
azn.jpg
99KB, 640x640px
>>62194669
I pretty much apply at everything. Job boards seem to be dead ends, I've heard back from a lot of help desk positions (my previous experience) but I'd rather web dev.

>>62194768
I would love that actually thank you very much anon! Email in my name. Thanks again man. I'm pretty close to moving back but I'll go all out and apply. You have no idea how much this is appreciated.

Yes I know the email address is lame :(
>>
>>62194858
Hey, sent you an email. I'll forward you some postings after you respond. I moved to Denver as well about a year ago, so I've gotten a few connections since then.
>>
Is asp.net the least convoluted form of backend dev? Seems pretty straight forward.
>>
>>62157837
nigger just do this:
$query=$conn->query("SELECT * FROM {$table} {$where}");
$query->execute();
$query->rowCount(); //here you go
>>
Are Python web framework strong in the job market?, Or I'm better by learning say Laravel or Ruby on Rails?
>>
File: deusex2.jpg (126KB, 946x950px) Image search: [Google]
deusex2.jpg
126KB, 946x950px
Rate my Copy Pasta generator:

https://codepen.io/anon/pen/JyxXQe

Inspired by a previous /wdg/ thread.
>>
>>62194272
Thanks, yeah I was looking at this one too
>>
Is it ok for a an input tag not to be a direct child of form? Like, can I wrap input in something like
<div class="col-sm-6">
?
>>
File: mysql.png (86KB, 1366x550px) Image search: [Google]
mysql.png
86KB, 1366x550px
I'm quite pleb at webdev, Anyone can help me Selecting and Modifying MYSQL data? So, I need to select table and a specific post type "ywar_reviews"
SELECT *
FROM `wphj_posts`
WHERE `post_type` LIKE 'ywar_reviews'

and i want to change the "post_date" for every row which has post_type: 'ywar_reviews' which the following syntax:
2017-random-random 00:00:00

or something similar to this, check the image for better explanation

Is it possible somehow to do this? Probably it requires scripting knowledge in PHP to achieve this? (because of random dates)
>>
Is it difficult to implement a SEO solution in React?


If it is, I shall be taking my business to word-press. Though I do not like it, wp provides for streamlined seo solutions.

Please respond. Thank you
>>
File: 1495652970314.jpg (15KB, 421x421px) Image search: [Google]
1495652970314.jpg
15KB, 421x421px
>>62160437
My man. You're living my dream. I'm in palmetto commuting to Newnan and basically fuck this place. I can't wait to get my skills up and moved to based buckhead
>>
>>62197240
>Please respond.
Kill yourself.
>>
>>62197057
>LIKE
oh shit
>>
File: ygjrtjtjrtjr.png (658KB, 1582x767px) Image search: [Google]
ygjrtjtjrtjr.png
658KB, 1582x767px
Just finished a js+design rebuild. Thanks +1000 to the guy who suggested bootstrap.
>>
>>62197389
breddy good mang
can you post the html? i wanna know how you divided the main column and the related videos column
>>
>>62196946
Only one way to find out.
>>
>>62197057
>Probably it requires scripting knowledge in PHP to achieve this? (because of random dates)
easy option, if you can deal with days never higher than 28
FLOOR(1 + (RAND() * 12)) -- months
FLOOR(1 + (RAND() * 28)) -- days


slightly harder option: get timestamp of 2017-01-01 00:00:00 and add a random value of up to a year, then set time to 00:00:00
>>
>>62197419
Thanks. https://pastebin.com/qQansw1J
This assumes you use bootstrap, which is brilliant.
>>
>>62197433
Yes, I don't care about precise months dates, so that's why i chose 28.

How could i select "post_date" for every row which has post_type: 'ywar_reviews' and implement your solution? I have no idea how to make variables on mysql and select and then change stuff
>>
Can someone explain how callback functions actually work in JavaScript?

I've just been hacking it so far without actually understanding it but it's beginning to cause a problem
>>
>>62190565
>>62176576
>>62195464

>Django

Comfyness: (+)(+)
Features "out of the box": (+)(+)
Jobs and Deployment: (+)(+)


>Laravel
Comfyness: (+)(+)
Features "out of the box": (+)
Jobs/Deployment: (+)(+)(+)


>Rails
Comfyness: (+)(+)(+)
Features "out of the box": (+)(+)(+)
Jobs/Deployment: (+)
>>
>>62197727
What about them?
>>
>>62197627
>How could i select "post_date" for every row which has post_type: 'ywar_reviews' and implement your solution?
SELECT post_date -- instead of SELECT *

but you want to change stuff, so you'll need something like this:
UPDATE wphj_posts
SET post_date = DATE_ADD('2017-01-01 00:00:00', INTERVAL FLOOR(RAND() * 365) DAY)
WHERE post_type = 'ywar_rewievs';
>>
Are there programs for designing the look of a website? Writing CSS by hand seems like it'd be tedious.
>>
>>62197727
you basically tell the JS runtime "execute this (code, i/o, whatever) whenever you feel like doing so, and call (run, execute) this function (the callback function) when you're done"
>>
>>62197898
Include bootstrap (js + css file) and you're good to go. Look through the components: https://v4-alpha.getbootstrap.com/components/alerts/
and then look up how easy it makes designing the layout with the row/column classes.
>>
>>62197898
adjusting generated css is way more tedious than starting from scratch, that's why people usually never do that anymore. you can use stuff like sass or scss to make it less repetitive, or start with some already styled component set / framework and adjust that to whatver you need.
>>
>>62197953
I see, I guess that's why I wasn't finding much on Google. I just remembered that like 10 years ago when I was doing some kiddie web stuff there was all kinds of webpage designer software.
>>
>>62197744
what out of the box features does django has that laravel doesnt?
>>
File: mysql2.png (61KB, 685x624px) Image search: [Google]
mysql2.png
61KB, 685x624px
>>62197874
Selecting and updating works, it changed every date row and counted+1 the days then months, pic related

What i would like to do is to put @month and @day whatever random number for month from 1-12 and for days from 1-28 something like this (i have no idea about variables in mysql)

https://pastebin.com/XQ7sLJaJ (I'm getting connection error when pasting here)

I hope you get it what I mean
>>
Is everyone in webdev an arrogant, toxic autist who love to brutally criticize people for the smallest mistakes?
>>
>you can write content between any bullshit tag names, like <donkeyballs></donkeyballs>, and then make it mean something through Javascript
the magic of web development. wow
>>
>come up with a neat idea
>someone already made it and is now rolling in dosh
i mean like FUCK
>>
>>62198422
Computer work attracts autists

Most autists aren't assholes and are self-aware so they don't criticise consistently but many still exist and they are annoying people, yes
>>
>>62198305
>it changed every date row and counted+1 the days then months, pic related
it didn't. i.e. there's 3 rows with 2017-01-03. your dates already are random. did you order the result in that screenshot by post_date? try ordering by ID.

your code would set every date to the same value, even if it wasn't invalid syntax.
>>
>>62198525
I'm fucking retarded. Jesus christ. Thanks anon, it worked!
>>
Can you guys hand me a (You) giving a summary over why PHP is shit?
>>
>>62190852
>>62194744
thanks guys!
>>
>>62192244
use WAMP or XAMPP
but I recommend WAMP if you can get it to work
>>
>>62198525
>>62198594
Shit, now I see another problem, the posts now has dates like 2017-12-01.. Didn't thought about that. I guess its actually for months 1-8 random and for days 1-28 random.
>>
>>62198605
PHP is not shit
don't listen to hipsters
>>
Can someone tell me why should I use frameworks?
I've never used any of it and I'm doing just fine
>>
>>62198647
so you want random dates, but only up to a certain date? change the multiplier for the value generated by RAND() to how many days into the year you want as a max.

or do you want the dates spread over a full year, but no future dates? in that case, change the start value for DATE_ADD to something like 2016-09-01.
>>
File: text.jpg (85KB, 1898x640px) Image search: [Google]
text.jpg
85KB, 1898x640px
How do I vertically align text to the middle without using table layout?
I've tried a few methods but the only one that works is Flex, however, I need to support older browsers including IE9 and 10.
If not I'll just have to use tables.
>>
>>62198863
table
>>62198729
speed up development substantially
if you're doing fine without them then keep doing your thing
>>
>>62198863
That's easy, put all the text in a div and centre the div. Then align your text to the left, its easier to read and looks better.
>>
>>62198961
My bad I misread, try reading this http://vanseodesign.com/css/vertical-centering/
>>
>>62198605
It's design as a templating language is long deprecated. The only purpose of php is to interact with the db which is basic and can be done by many languages asynchronously.
>>
>>62198782
Awesome! Thanks again, anon.
>>
>>62198031

It's been a while since I looked at PHP frameworks, but AFAIK Laravel:
-can't generate migrations from models
-has no admin panel out of the box


But you should research yourself. I just gave my impression (mostly from memory/experience). I found Laravel neat, but somehow "smaller" than Django.


>>62198455

This is not how it works, man. Nobody can reinvent the wheel.
Even if someone already made it, just do it better. Have better features. Attack the market.
>>
>>62198422
no, that would be /dpt/

>>62198605
obligatory:
http://phpsadness.com
https://www.google.pl/search?q=google+fractal+of+bad+design (spam filter blocks direct link)

>>62198674
enterprise is the opposite of hipsters and they tend to stay away from php
>>
>>62199053
>>62198422
>no, that would be /dpt/
web dev can be kinda toxic at times, just the other way around. the "smallest mistake" can be stuff like asking a coworker "did you read and understand the manual page i've sent you a link to?" after asking you the same thing three times a day. if you can deal with that, you'll probably do fine in web dev. if you can't, backend and devops is usually a lot more technical and less emotional.
>>
>>62199224
>the "smallest mistake" can be stuff like asking a coworker "did you read and understand the manual page i've sent you a link to?" after asking you the same thing three times a day.
annoying coworkers exist in all fields, is something missing from this example or..?
>>
>>62199262
you are blamed for triggering the coworker vs. the coworker is blamed for being too lazy to click on a link.
>>
>>62199332
I can't imagine that actually happening in any workplace unless you lack any sort of self control and don't know how to handle an annoying coworker.
>>
>>62199356
>I can't imagine that actually happening
that exact thing has happened to me around two years ago. after the first "how do i do $task" i've sent back a line of (working) code. after the second time, i've sent back another line of code and a link to the postgres manual explaining $task. the third time i replied with something like "is there anything in that manal page that you don't understand?" and got "I'm not reading all that, just tell me how to do it" back. i responded with "i get paid to do my job, not yours", and it went downhill from there. boss was on coworkers side, telling me that telling others to rtfm is not the kind of teamwork he wants. needless to say, i switched jobs around 2 months later.
>>
>>62198422

I think the most "arrogant, toxic autist" are either in startups where the managers don't give a shit about people or at "elite" shops where everybody is oh so smart.

But there are many good places. Generally webdev has always attracted people who are kinda "different", i.e. artists, designer and people who don't want to sit in an java office 9-9 every day. Even the hipsters are often ok - if they don't take themselves too seriously, that is.


>>62199506

I think you are right for not explaining it three times in a row. But answering with "do you f*cking job and I'll do mine" is just not a good attitude, no matter if you are wrong or right.

HR guys always jerk off about "social skills", but in reality "social skills" boil down on being friendly. Even if someone makes a mistake you could have said: "look, I can give you 2 minutes to explain you the basics again, but I have a lot of stuff to do, so after that please research it yourself and ask me if you're stuck."
>>
File: edited.png (583KB, 1902x640px) Image search: [Google]
edited.png
583KB, 1902x640px
>>62198982
Ah thanks, got it to work.
>>
>>62164087
extend the default options with any options passed in. you can use Object.assign for that
>>
I want to learn the workings of localStorage by making a to-do list in Javascript but all the Stack Overflow threads are for fucking jQuery even though they don't say it's in jQuery but in fucking Javascript

AHHHHHH
>>
>>62157837
Who the fuck is going to think that someone telling him that some library is unsafe and deprecated is elitist asshole?
>>
>>62200320
This example works perfectly, at least in my browser
https://codereview.stackexchange.com/questions/165989/todo-using-localstorage-api-and-vanilla-js
>>
>>62169673
nice design. but you don't need that much js. inspect something on the dom elements. https://jsfiddle.net/p1af50mg/1/
>>
>>62200413
oops, but handling 'all' as 'items' too
>>
>>62200413
Not bad, but you realize that other anon already helped him, and he used less lines of code?
>>
How do I do a forEach or something similar on localStorage? I want to push each value to an array.
>>
>>62200912
JSON.stringify
JSON.parse
Thread posts: 318
Thread images: 39


[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.