/wdg/ - Web Development General

> Discord
discord.gg/wdg
OR
discord.gg/0qLTzz5potDFXfdT
(they're the same)

>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/
>Crockford on Javascript
youtube.com/playlist?list=PL7664379246A246CB

>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] 2016/2017 MUST-KNOW WEB DEVELOPMENT TECH - Watch this if you want to be a web developer
youtube.com/watch?v=sBzRwzY7G-k
> [YouTube] Javascript is Easy - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.
youtube.com/watch?v=zf_cb_Nw5zY

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

Other urls found in this thread:

alissa.ninja/paint
laravel.io/forum/02-13-2014-how-to-install-laravel-on-a-hostgator-shared-server
docs.djangoproject.com/en/1.10/
fooplugins.github.io/FooTable/docs/examples/basic/row-toggle.html
alissa.ninja/MapMaker/MapMaker.html
twitter.com/AnonBabble

collaborative mosaic website

alissa.ninja/paint

>Unemployed General

just give up op, the next one will be yours

When I set up a domain, a VPS and nodejs + nginx, how do I actually make a good looking website? CSS, php and HTML? I don't want autistic flash shit, just a good design.

bootstrap

Yes.

nodejs and PHP have nothing to do with the design of your page. Find a free HTML template in the meantime.

Honestly feels like a lot of trolls have been posting in these threads asking dumbass questions lately.

Thought you meant bootstrapping as the process in an OS as a troll answer, but shit looks actually nice. Thanks!

I asked this in the old thread but I Dell asleep and thread died so I didn't get the chance to read any answers: is ASP.NET worth learning or is it a waste of my time?

I'm about to launch my website (and am super terrified to do so).

www.imagehex.com

Are there any obvious issues you can see? Is this in a state where I can try to get some beta users?

I made this post on the Laravel forum but they are kinda useless.

Link to my post:
laravel.io/forum/02-13-2014-how-to-install-laravel-on-a-hostgator-shared-server

I'm having a problem. I get through everything all well and good but when i get to the part where i have to change the PATHS.php file in the bootstraps DIR I cant because it seems that it was taken out of laravel.

this is the error Im getting when i try and run index.php on the server.

Warning: require_once(/home2/edwingm/public_html/../laravel/bootstrap/start.php): failed to open stream: No such file or directory in /home2/edwingm/public_html/index.php on line 36

Fatal error: require_once(): Failed opening required '/home2/edwingm/public_html/../laravel/bootstrap/start.php' (include_path='.:/opt/php55/lib/php') in /home2/edwingm/public_html/index.php on line 36

Does anyone ITT actually make income independently?

My problem was that i as trying to install laravel on host gator shared hosting. I get things working but some changes in different visions makes the guide outdated.

The paths.php file in the bootstraps DIR is missing and I don't have a Starts.php

interested in this too. I just can't grasp the idea that you can develop webapps (for you or someone else) and make enough money to have a decent living... I mean, how much do you have to charge for that?

$800 every 2 weeks administrating Wordpress sites for the family business

Idk man, have you tried watching the video in OP? I can't remember if he even mentioned ASP.NET but check it out anyway.

I've been looking for jobs for a while now and I rarely see open positions for it.

That's probably the most fucky thing about using frameworks. When things change shit tends to break.

dang I know. I feel like every Update something is changed or the file structure is totally different and i have to relearn it.

>I'm about to launch my website (and am super terrified to do so).
>I'm about to launch my website
>about to

You know you already did that, right? It's launched from the moment it's searchable. Your first launch?

>www.imagehex.com

how tf did you get sitelinks ? I want to know .
>weebmaster

I launched my first site 6 months ago. I get about 4 users per day. 86% bounce rate. Why even dev ;_;

at least you get some users... I get almost none for a site that took me 2 months to make (as a learning project, though, but still...)
fucking waste of time

I'm using a Mac and i'm starting Instrumental Multimedia classes this semester on uni (I'm on arts and design) and since the class is basically HTML5/CSS/JS and i never was into web development i need a tip here:
What programs should i be using to write that stuff down on OS X? I was looking into Brackets and it seems pretty good, anyone suggests another alternative?

Post?

You have to shitpost it around.

At least you have something that's live on the net as opposed to rotting away in a Github repository like mine.

The new one I'm working on will go live though. I was planning on hosting it on a sub-directory on my personal site but fuck it, might as well buy a domain and hosting and go all out.

Sublime 3

to

thanks, gonna check it out

thanks. I decided from your comment to just go back to laravel 4.2 and give up with 5.2. now to build a website :D

Why is it so god damn ugly on mobile

Why is this broken?

UPDATE comments SET comment = '' WHERE comment_id=2065 LIMIT 1;


SQL breaks the URL in like a dozen places.

Launch in the sense of "market and try to get people on it"

I have no idea what you mean by sitelinks.

If you mean the thing that happens when you google it, I have no idea how we have those.

Sorry man.

I'm not a designer and my former designer had issues (apparently)?

Use params instead of raw strings.

...

It's raw SQL through the terminal.

I got it working. I had a function to auto-break input that was wrecking it when being echo'd.

>going through first PHP page
>see these variables

//RUN COMMENT COUNT//
$my_id = $row['id'];
$comc = "SELECT COUNT(comment_id) FROM comments WHERE original_id = $my_id";
$com_r = @mysqli_query ($dbc, $comc);

$c_row = @mysqli_fetch_array ($com_r, MYSQLI_NUM);
$am_com = $c_row[0];
//END COMMENT COUNT//


This whole document is a joke. I should open-source it for laff.

.Net developer here, I want to learn something new. What would be worthwhile? PHP? Python? Ruby on Rails? Nodejs?

Angular.

Also PHP because it's fun.

It depends on what you want to make and the kind of webapps that you like.

I'd recommend Python + Django.
It's pretty easy to learn while being fun throughout the learning process.

Also the guide makes learning the model template view pattern simple, if you don't know MVC already.
docs.djangoproject.com/en/1.10/

>2016 noided media
:^)

MVC is nice, C# is good language, core is finally opensource and multiplatform and very fast. Should also have good employability but this you can confirm yourself.

Laravel 5 doesn't support overriding basepath meaning you must do some hacky overwriting.

For .NET dev all of those are downgrades. But maybe python.

You can sell freelance web development

I was giggling like a retard the entire time I was making this.

anyone knows how ad placement works? there is just a script in the code and it supposedly positions itself. I tried it on a local page for testing and nothing shows does it have to be on the server to work?

Hey guys I'm a newfag web developer.

So far, I've made my site look perfect to how I want it to look, but now I'm having trouble with doing SQL shit.

I'm using Flask for my backend, so I figured I'd try to use SQLAlchemy, but it's alot harder to understand than I thought. I've tried to find a good tutorial on it but I can't find shit. Does anyone know any good resources for learning how to do database shit?

1. Learn set theory.
2. Learn relational set theory.
3. Learn ODBC

This ain't setting the title. Why ?

((a,b,c,d,e,f) => {
a = 'Everybody';
return (b,c,d,e,f) => {
b = 'is';
return (c,d,e,f) => {
c = 'a';
return (d,e,f) => {
d = 'full-stack';
return (e,f) => {
e = 'developer';
return (f) => {
f = 'now';
return () => {
console.log('hello');
console.log(this);
this.title = [a,b,c,d,e,f].join(' ');
}
}
}
}
}
}
})(1,2,3,4,5,6);
console.log('stuff');

>supresses errors
>doesn't escape the variables
And you complain about the variables

Posting from the newer thread since this one is still alive.

Does anyone know of a project I can use as an example to implement SignIn with Linkedin in ASP.NET? I saw one a few days ago, but the link was dead.

You're making it too complicated nigger.

You have tables A and B. Suppose you Joined them. You'd have something like a Venn Diagram. The area where they both intersect would be the Inner Join of the 2. The area A that does not intersect with B would be a left outer join, the other side of course would be the right outer join. That's probably all you really need to know.

Also don't use ORMs. They are fucking stupid. Don't be a pussy just do raw queries.

Jesus, Colin. WaddaFugginMess.com

you need to call the outer function in 'document', i.e: ( ... ).call(document,1,2,3,4,5,6)

weird code though

I made my customer orgasm over bootstrap datepicker and 10 lines of css.
Go figure.

>Is this in a state where I can try to get some beta users?
All 3 of your users will be betas

>current year
>not blasting out 9001 clickbate sites
common, man

function userInfo($userId){

require 'includes/connection.php';

$query = $handle->prepare("SELECT * FROM users WHERE id = ?");
$query->execute(array($userId));
$result = $query->fetchAll();

foreach($result as $row){
$username = $row['username'];
$email = $row['email'];
}

return array('username' => $username, 'email' => $email);
}

echo userInfo(7)['username'];


Does anything here seem off to anyone? I originally wrote this as a class but realized I don't really need OOP functionality.

Do you guys write individual commit messages for each of your files on Git?

Every coding session I'll end up modifying up to 10 files, instead of writing individual commit messages after adding them I just use the date.

Should have stayed on OOP. It's stupid to include file just to create connection. Also write shortcut function to handle actual querying.

you know, i thought about this and you could just tell everyone that ur a self employed web dev but never tell them how much you make even if you get 0 clients lmao.

in any normal country its extremely impolite to ask someone how much money they make so you should be fine.

>It's stupid to include file just to create connection
The only other way to do this is to define the connection there. Instead of defining it multiple times I do it once then include it where it is needed. The connection isn't optional either, it's necessary.

>Also write shortcut function to handle actual querying
How? Never heard of that before.

Class YourDbStuff
{

private $handle;

function __construct()
{
$this->handle = //create your connection;
}

function fetch($sql, $params)
{
$query = $this->handle->prepare($sql);
$query->execute($params);
return $query->fetch();
}

function userInfo($userId)
{
return $this->fetch('SELECT blabla', [$userId]);
}
}

Keep one instance of this class around.

I don't get it.

No idea how we got those, sorry.

Fight me mate

Thanks for the help, this actually seems way better.

Having a bit of trouble getting the values though.

$db = new DB;
$db->userInfo(7);


I renamed the class DB and added the connection, trying to access it like above but I get this error

>Fatal error: Uncaught Error: Call to a member function prepare() on null in...

My code was incomplete example. Did you created connection?

Yeah I did, I don't think that's the issue. The query is returning null for some reason, as if it isn't getting the ID I'm trying to pass to it.

don't store html in your db if you can avoid it. it would be better to have a 'video' comment type and store just the video id in your db, then reconstruct the video embedding html from that id in your views.

So your 'comment' table would be something like:
CREATE TABLE comment (
id int unsigned not null auto_increment,
type enum('text', 'youtube'),
body varchar(255)
);

where the 'body' will be a youtube video id (if comment is of 'video' type, or the text itself, if of 'text' type.

F#

i don't use php these days, but that doesn't look right. your require should not be in the function body. neither should the query preparer. and you're looping through the result when you expect only one row at max? why not just return the first row? also you need to handle the case where the userId might not be found. regardless of whether it is OOP or not, there are a lot of fundamentals to fix here. sorry if that is harsh.

I have to use typescript at jobbu.

Encountered a typings issue today with feature being unavailable through typescript.

Is there any way to make typescript compiler not give a shit about some section of code, or should I perhaps modify the typings myself?

>neither should the query preparer
Where else should I put it?

>why not just return the first row?
Good point, will keep this in mind from now on.

>handle the case where the userId might not be found
Fixed this also, thanks for the input.

I built a small web app in PHP and SQL. Now I want to host it for use in a future portfolio. I don't know a goddamn thing about security. I need to prevent access to several "include" PHP files that contain database login info.

Can somebody please point me to a good tutorial or article?

Show your code.

>I need to prevent access to several "include" PHP files
Why? It's not like I can go there and see the login info. It's PHP.

It's more important to secure your server. Disable remote login as root is the most important as is taking away password login and just using SSH.

I left open remote root login and password login on my first droplet and it was hacked within a day and sending out ddos attacks for the chinese.

Class DB
{

private $handle;

function __construct()
{
try{
$handle = new PDO('mysql:host=localhost;dbname=quiz_db', 'root', '');
$handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOException $e) {
echo "A Fatal Error Has Occured: ", $e->getMessage();
die();
}
}

function fetch($sql, $params)
{
$query = $this->handle->prepare($sql);
$query->execute($params);
return $query->fetch();
}

function userInfo($userId)
{
return $this->fetch('SELECT * FROM users WHERE id = ?', [$userId]);
}
}

$db = new DB;
$db->userInfo(7);

About to start working on a new REST api. Currently all my other apis were build using nodejs but thinking about something else this time.

Anybody here already built an api with go? How does it compare to building one in node and what are the benefits/drawbacks?

$this->handle and $handle are different.

Hello Sup Forums i have a few problems..if you would be that good and answer me guys.

>I know html, css what next should i learn?
>If it's going to be Javascript which libary? or just pure js?
>How do i make my first money from this?
>Should i learn first js or php?
>Go full stack or only front end? (i like design more than server things)
>Also any tips for learning? I understand to code pretty good what is doing and i can change some things but...i just cannot write my own code..i dont know where should i start or how that code should looks like.

I have a bootstrap data table.
Is it possible to show 2 results per row?
Or having the result flow horizontally instead of vertically and just wrap when they reach horizontal limit.

I want to create a website to put on my list with skills. What language and libraries should i use? I already have a bit of experience with html and css from a few static pages i did in the past.

For the backend i figured python might be a good idea, since i wanted to learn it sooner or later anyway. What libraries should i use? Any suggestions for the database?

Thanks.

What are you attempting to accomplish? What data will the site serve up?

Check the row-toggle example of the FooTable plugin
fooplugins.github.io/FooTable/docs/examples/basic/row-toggle.html

What would qualify as advanced knowledge in HTML and CSS?

you're ability to bullshit / fluff up your current knowledge

apparently not

I've come across something I've never noticed with tables before, and I'm wondering what I'm missing.
First off: yes, yes, I shouldn't be using tables for layout, but I'm revamping an old legacy system, and it LOOKED like it was easier to use them instead of re-building the site from scratch.

At any rate, I'm using "vertical-align: text-top;" on the cells, but I can't seem to assign padding-top independently.
Here's my code:



Hello World!
Hello World!

Each cell acts like padding-top is 100px.
If I fiddle with the numbers, both cells always get padded with the higher number of pixels, and the lower number is ignored.

I'm almost certainly going to switch to divs, even though it means re-doing a lot more code than I wanted to, but I'd still like to know what's going on,

>alissa.ninja/paint
What did you use?

Me again.
I'm still confused, but I tried switching "vertical-align: text-top;" to "vertical-align: top;" and it works as expected.

Still me.
I guess it makes sense, never mind that I asked.

Jquery is the only library I used, and very little of it.Everything else was from scratch (javascript, mysql, php)

Wow I didn't expect that, it's nice, did you use some other site as inspiration?

The idea was to download earnings reports from various companies from the sec site and make nice looking charts showing earnings growth etc.

So mainly showing charts for now.

ms paint, basically. I used some similar principles in its design in a map maker for an unnamed game engine I'm working on:

alissa.ninja/MapMaker/MapMaker.html

Does NodeJS count as a framework or a language?

Framework

Looks nice, is there anywhere I can get more info on your projects? If you made a fp thread can you link it? Btw you probably know this but your projects page is not working.

Only that there are plenty of sites like this around. What gives your site competitive advantage?

I want to give people XP for sharing content to social media.

I want to stop people from being able to share a post, then delete it over and over again.

Any ideas?