[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: 325
Thread images: 25

File: 1490356437731.png (874KB, 824x553px) Image search: [Google]
1490356437731.png
874KB, 824x553px
Previous thread
>>59554469

>Discord
https://discord.gg/wdg

>IRC Channel
#/g/wdg @ irc.rizon.net
Web client: https://www.rizon.net/chat

>Learning material
https://www.codecademy.com/
https://www.bento.io/
https://programming-motherfucker.com/
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md
https://www.theodinproject.com/
https://www.freecodecamp.com/
http://www.w3schools.com/
https://developer.mozilla.org/
http://www.codewars.com/

>Useful Youtube channels
derekbanas
thenewboston
learncodeacademy
funfunfunction
computerphile
codingrainbow

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

>Backend development
https://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks
[Gist] backendDevelopmentBookmarks.md

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

>NEET guide to web dev employment
https://pastebin.com/4YeJAUbT/ (embed)

>How to get started
http://pastebin.com/pDT82mQS (embed)
http://pastebin.com/AL6j7GEE (embed)

>cheap vps hosting in most western locations
https://lowendbox.com
https://www.digitalocean.com/
https://www.linode.com/
https://www.heroku.com/
https://www.leaseweb.com
>>
First for PHP
>>
What's the best memorystore to use for session management with node.js? Redis? I've previously just used noSQL databases as my "store" before and have yet to have any performance problems with them. Is redis just a meme?
>>
>>59608000
trips for truth
>>
How well did I implement prepared statements? Am I protected from SQL injections now?

<?php
function getLogin() {
if (isset($_POST['loginSubmit'])) {
$u = mysqli_real_escape_string($conn, $_POST['username']);
$p = mysqli_real_escape_string($conn, $_POST['password']);

$statement = $conn->prepare("SELECT * FROM users WHERE username=? AND password=?");
$statement->bind_param("ss", $username, $password);
$username = $u;
$password = $p;
$statement -> execute();

$r = $statement->get_result();
$rowNum = $result->num_rows;
if ($rowNum > 0) {
if ($row = $r -> fetch_assoc()) {
//login complete
$_SESSION['username'] = $r['username'];
$_SESSION['id'] = $r['id'];
exit();
}
}
else
{
//login failed
exit();
}

}
}
?>
>>
>>59608010
Redis is fast as fuck and very useful for caching.
>>
>>59608029
$result should be $r
>>
>>59608033
at what point do you see a performance gain? I've got two sites that average 10k+ users a day and all they are is dedicated boxes, never have any performance problems. I was just looking at redis in case they get any larger.
>>
>be me
>looking to hire web dev
>contact web dev
>tell him i want to buy the script which hes already sold to 3 other people
>http://giveawayhopper.com/
>http://marvelousga.com/
>https://simplo.gg
>tells me no he cant because it's unethical

seriously, what the fuck is up with web devs who actually give a shit about ethics, so what if a potential client wants you to clone a website, why do they give a shit so much? this fucking bothers me man...just take my fucking money and do what i want you to do

now have to go search for a poo in the loo web dev to do it

ps. how difficult is it to build a site similar to those i posted?

if any devs here can clone that script i'll gladly pay $100-$150 (that's how much the original creator vasco charged, hes not selling it any more)
>>
Use prepared statements and parameterized queries. These are SQL statements that are sent to and parsed by the database server separately from any parameters. This way it is impossible for an attacker to inject malicious SQL.

You basically have two options to achieve this:

Using PDO (for any supported database driver):
$stmt = $pdo->prepare('SELECT * FROM employees WHERE name = :name');

$stmt->execute(array('name' => $name));

foreach ($stmt as $row) {
// do something with $row
}

Using MySQLi (for MySQL):
$stmt = $dbConnection->prepare('SELECT * FROM employees WHERE name = ?');
$stmt->bind_param('s', $name);

$stmt->execute();

$result = $stmt->get_result();
while ($row = $result->fetch_assoc()) {
// do something with $row
}


If you're connecting to a database other than MySQL, there is a driver-specific second option that you can refer to (e.g. pg_prepare() and pg_execute() for PostgreSQL). PDO is the universal option.

>>59608029
>>
>>59608081
trivial

the only part that will take any time is making it look visually distinct.
>>
>>59608111
>trivial

some people on reddit are quoting me $1000~ for something like this, fuck sakes

no wonder why people hire poo in the loo freelancers for this type of shit
>>
>>59608170
the poo in loo will probably take your money and not deliver a working product,

you aren't paying for the difficulty for the engineer, you're paying for their hourly rate.

although people on reddit are probably bottom of the barrel retards
>>
>>59608079
Depends on the site and how cacheable it is. Database is where most of the performance goes so any roundtrip to the DB avoided is a win, and if you can return cached responses without even connecting to the DB you're off to a good start.

10k over the span of a day isn't really in the area of needing a lot of caching although it can help with spikes.

If you have anonymous users it's probably easier to just enable nginx caching and set it to 5s or something.
>>
>>59608225
they are logged in users, not anonymous.
>>
>>59608266
Just cache what you can that's the same for everyone.
>>
I am making a simple 10 or so page website, and for every page I am copy and pasting the header and the footer, and if I need to change either, I obviously need to go through every page and make the same change.

What is the sensible way of fixing this, I know it isn't right.
>>
So xampp has PHP Version 5.6.28. Does that mean I don't have to do download a driver for PDO? Or do I still need to download a database-specific PDO driver?
>>
>>59608465
what framework are you using? If you're doing MVC, there's a very easy way to do that. Just use a shared view or something like that.
>>
>>59608465
What language are you using?
>>
>>59608762
>>59608624

Oh sorry, It is just a HTML, CSS, JS site.
>>
>>59608827
basic concept is like this
[header]
[display]
[footer]


You just swap out what's in display when the page is changed.
>>
>>59608465

The specifics will depend on what language you're using, but what you basically want to do is create a 'header' file for all your common header stuff (logo, nav, shopping cart, whatever) and a 'footer' file if you need one, and simply call those files at the top and bottom of each of your templates.

There are more automated ways to do this if you use a framework, but it sounds like a simple site so start simple and embrace includes.
>>
>>59608827

Oh, that's tricker. Includes are easy with server-side scripting. Have a read of this: http://stackoverflow.com/questions/418503/common-header-footer-with-static-html
>>
>>59608886
I think what he's asking is for a templating engine for HTML.
Like in PHP where you can create one header file and one footer file, then include it on the pages where needed..
<?php  require('header.php'); ?>

--regular HTML/PHP Code for each page.

<?php require('footer.php'); ?>
>>
>>59609034

A JS templating engine would do the trick for a static site, I think.
>>
>>59609086
>>59609034
>>59608999

Sounds like a JS templating engine is the way to go, no need to add another language that I am not familiar with into the mix.

Cheers for the stack link
>>
>>59609034
>>59609086
OhHereWeGo.jpg
>>
>>59609165

What do you suggest if server side languages aren't an option?
>>
Person asking about including 1 header and footer file in every page here, I saw some mention of Jade, a preprocessor, would that be easier and more "Compatible"?
>>
>>59609369
You can make a simple sh/python/whatever "makefile" yourself to propagate your header and footer to your webpages when deploying. I ended up doing something like that a while ago iirc
>>
tfw prototypes too hard to understand :c
>>
>>59609211
Single page application, loading content using ajax
>>
>>59609488

And where will that content come from?
>>
>>59609517
From .html files
poo.html = <div>contents of poo</div>
loo.html = <div>contents of loo</div>

$('.poo-or-loo).load('poo.html');
>>
My website is less than half the size of 4chan's javascript even when you load a 1024x1024 PNG

the fuck is up with that
>>
>>59610140
You forgot to load the botnet in yours, my friend
>>
Newjobfag here

Just finished my first day as a web developer

After orientation they parked me in front of a TV and had me watch six hours of Magento tutorials

Yee haw
>>
File: Librechan.png (240KB, 1907x1519px) Image search: [Google]
Librechan.png
240KB, 1907x1519px
I'm still writing my image board and just completed the thread rendering.

What do you think of the desgin? I don't want to totally copy 4chan but that simple old-era desgin is just comfy. The color scheme still sucks, I know.
>>
>>59608081
What is it? Fake steam oauth? I'll do it for 5k
>>
>>59609550

Oh fuck, of course. Yeah, do this >>59609369
>>
>>59610211
My first day they had me build my computer and install their Windows stack with no documentation. I wrote their documentation on my first 3 days.

Magento though. There's a place by me that's been looking for Magento PHP devs for over 2 years. 60k too. I don't know SOAP though so I couldn't pass their test.
>>
>>59608029
Why are you using num_rows? Password verify works perfectly with glorious bcrypt.
>>
>>59607969
do all modern browsers support flexbox?
>>
>>59610877
>caniuse.com
search flexbox
>>
>>59609211
>>59608827

Just use a static site generator like hugo or jekyll
>>
Has anyone here actually done work remotely (not including Freelancer, Upwork, etc)? I'm trying to but I can't find shit. I've been applying for a year now and nothing, luckily I found something (shitty) locally that I can do for now.
>>
>yank out a modal
>snap some excel file on it for import to db
>use some retarded ajax hack to push the file inside a c# ajax form to a jsonresult action so i can display an error because fuck scripts even though im using a script to throw the damn thing in.
>shit works but when iterating i have to make up for every exception or the exception goes along iterating with what im iterating so it gets stuck on the first last good iteration thinking the next iteration is also throwing the first exception until the last iteration.


how do i git gud?
>>
>>59610140
>>59610140
They are using a lot of shit but mostly reCaptcha and prettify and making is heavier.

You know these evil scripts are all cached in your browser, right?
>>
For argument's sake lets say I'm a Pajeet and I want to register with Adsense. Now, Adsense pays out lower cash to people outside the US, how do I register myself on adsense as a US citizen with a US address while overseas? Is there a service that does this?
>>
>>59611933
Marry an american whale.

But honestly, don't even try, it's complicated to do it correctly and you could lose a lot if you get caught.
>>
Here's something useless for you:
http://codepen.io/anon/pen/evLPJM
Hint: hover over the text.
>>
>>59612297
Can you be my white American whale?
Seriously, I'd only need someone to open the letter and send me the code so I can verify that as my address.
>>
>>59611933
I would say befriend an honest USA webdev or wherever pays well, just give them your websites to put ads on and give them a good split. If they jew you then you just take the sites offline or take out their ads.
>>
>>59612573
Check out some type of PO box service. I'd imagine someone has set something like this up in fact I just google it.

http://www.virtualpostmail.com/
>>
>>59612616
You can bet google has all of those addresses logged and banned already. Google doesn't fuck around. None of the advertising servers fuck around, but Google's on another level.

Go look at any pajeet forum trying to do the same thing.
>>
>>59612638
I should ad(:^)) that google does this thing where they will let you grind out ad revenue right until a few dollars before cashout then ban you. That way you worked for free and you can't do shit because you broke tos anyways.
>>
How do I fix this bug:

I'm doing a bunch of async JS requests. When they are finished they concatenate their result to a HTML div. The problem is the requests take unpredictable amounts of time and the order gets fucked up often.
>>
>>59612890
You using promises or what? Just check if something has a value before posting, if not then loop again.
>>
>>59612613
>just give them your websites to put ads on and give them a good split
This wouldn't be necessary though. Last time I checked Google doesn't check if you're an American citizen or not, the only thing they confirm is your address by mailing you a unique code to be used for verification. Once you verify you've gotten the letter that address goes on file, then you can cashout through Western if you have the MTCN #.

>>59612616
As Anon >>59612638 said it's probably banned. I thought of this though.
>>
>>59612890
Callbacks, or promises.
>>
I need to interview web developers most of this month - i'm looking for people with Angular2 experience, which is a rare find in my city.

AngularJS seems to be a runner up, with general javascript/jquery coming up after that.

What is the best way to test these candidates ? I much prefer having them write a bit of code during the interview just to get a handle on how they work (its not so much of a test as a conversation, working together, 'open book' type thing).

Any ideas on something bite sized that can be worked on for people with experience in any of the above areas? (NG2, NG1, JS+JQ)

Just trying to cull the list.
>>
>>59613147
>>59613116

It does use callbacks

but they all add the string they get to the same string in the callback

I think it would just be easier to give them IDs and sort it. I never got javascript async and this doesn't need to be that fast
>>
>>59613191
literally just use promises, dude. Chain each promise using .then()
>>
>>59613156
Hire me senpai. You get the added bonus of having me work remotely so you won't see my ugly mug every day.
>>
>>59613156
Make them invert a binary tree on a blackboard.
Nah I don't know, I'm in no position to give advice to an interviewer but the only thing I care about js devs is that their code isn't tighty coupled to itself (like functions doing 10 different things and stuff like that).
>>
>>59613156
Have them create a simple RESTful web service with HTTP. You can even start them out with a simple HTML form with a route already assigned.

If they can't do this or at least conceptually draw it out for you, then you don't want them. They won't be fit for web dev, even if they are just going to be doing fronted Angular stuff.

Btw Angular is already on version 4:

>https://angularjs.blogspot.com/2017/03/angular-400-now-available.html

Google just wants you to call it AngularJS from now on.
>>
>>59613156
So are you HR scum or what?
>>
>>59611655
But how should you protect a site from dumb spam bots?

I can't ban every IP that spams cause that would fuck up VPN people. Recaptcha is the only effective captcha all others get bypassed by neuronal networks.
>>
question
how would you traverse through an array with a recursive function without mutation
in js
>>
File: file.png (41KB, 403x354px) Image search: [Google]
file.png
41KB, 403x354px
Never really worked with Node.js before but how does one do worker threads in this language?

I have an async function that scrapes a website but it takes too long for an AJAX reply so I'm having to let it get executed in the background with a job object reference.

This is so that the client can poll the server for the job status.
>>
>>59608010
Redis is perfect for any short-lived data, and it has a reputation for having a very nice codebase
>>
File: sa.png (564KB, 889x536px) Image search: [Google]
sa.png
564KB, 889x536px
Finally got my first real project!! Very excited!

I'm making a webpage for a small business.

Please share any suggestions or inspiration here.


Share your wisdom web dev masters...
>>
>>59608465
Make a header.vue file. Then make a footer.vue file.
Then use webpack+vue+vue-loader to inject those into the page. plus you also get a bonus of a full-spa app + routing and MVVM goodies
>>
>>59616459
Don't use Nosql
>>
>>59615832
Isn't this the exact use case for promises?
>>
>>59616823
The function I'm calling is a promise (async function).

The thing is that I don't care about waiting until it's done. That job.id will be sent back to the client through a HTTP response and the client should poll the server every x seconds for the job status.
>>
>>59616956
Your idea sounds fine, what exactly is the issue?

You could use websockets if you're doing lots of requests I guess.
>>
>>59616972
The issue is that I'm just calling the promise (the scrape function) with no await/.then() call. I'm doing this because I just want the scraping to run in the background.

My IDE is nagging me that the promise returned is ignored. Apparently it's a code smell.
>>
>>59617220
Maybe just .catch the error and log if there's an error?
>>
>>59616459
Don't use Angular and >>59616776
>>
>>59616776
Agreed. NoSQL is just a meme. It's used for all the wrong reasons, especially in web dev.
>>
i think i made a big mistake writing a pretty much static website in react for a small business
>>
is there a tried and tested php PDO library for sql queries?
kinda hard to filter shit results on google
>>
>>59617362
it's webscale you nigger

>>59617369
why did you use react?
>>
>>59617404
https://www.youtube.com/watch?v=b2F-DItXtZs

:^)
>>
>>59617404
I read that React/Redux were the cool new things that everyone should be using instead of jquery from now on so I tried them full on (React/Redux/Router v3/Saga), but recently I read that SEO is crap with React and only google indexes React sites and I have no idea how to set up SSR and whatever else is necessary to fix it. Everything would've been much easier with just static html and jquery for some dynamic components.
>>
>>59617384
https://secure.php.net/manual/en/class.pdo.php
>>
>>59617455
React is overkill for projects that don't have a lot of state-based components. I doubt a local company has a lot of that.
>>
>>59616459
BTW, if anyone can provide me with a good example of a business app.


Because right now I got a landing page, and that's pretty much it. I would like to see how these apps are commonly done. How they are using databases, etc.


Any link to a project (github or otherwise) is very highly appreciated.
>>
>>59617509
just use express with jade, and $database_of_choice for the storage if you're wanting to learn javascript.

What are you actually trying to do?
>>
>>59617521
>just use express with jade, and $database_of_choice for the storage if you're wanting to learn javascript.
>What are you actually trying to do?
Getting experience is the goal. I am making an application for a small business that sells machinery to kitchens across the world.

There aren't any firm requisites.
The page for the business has to be good, and it has to attract customers.

What I got is a landing page in static HTML and CSS - that's all.
I'm setting up the server side with express, so far just rendering .html. No need to utilize templates ?

So chiefly I'm looking for inspiration and ideas. I really want to make this webpage good. Any primers greatly appreciated -- first job here!
>>
>>59617590
jade is a templating language, let's say we have a bunch of different machinery objects that each need their own webpage with a description. you can have a jade template that formats the information about objects into a webpage.

this might be helpful. https://shapeshed.com/creating-a-basic-site-with-node-and-express/

Are you going to be gathering user data (logins, etc.) or will it be a primarily informational site? If the latter, the most important thing will be styling the information in a pleasant way and making everything load quickly and efficiently.
>>
I'm currently using mysqli, should I switch to PDO to support more databases?

mysqli is pretty comfy, prepared statements work well and fetching is fast enough.
>>
>>59617613
This is my first project, so I want it done and done well.
As of now, it's a landing page making a sale.
It's got leads and offers and a contact section that sends an email.

This is all as of now.
Please expand on user login...


So it's primarily informational. Should be simple, but portfolio worthy.
Looking to expand it from here.
>>
>>59617810
React was created to solve some specific problems that probably don't exist in your application

Source: https://facebook.github.io/react/blog/2013/06/05/why-react.html
>React really shines when your data changes over time.

>In a traditional JavaScript application, you need to look at what data changed and imperatively make changes to the DOM to keep it up-to-date. Even AngularJS, which provides a declarative interface via directives and data binding requires a linking function to manually update DOM nodes.

>React takes a different approach.

>When your component is first initialized, the render method is called, generating a lightweight representation of your view. From that representation, a string of markup is produced, and injected into the document. When your data changes, the render method is called again. In order to perform updates as efficiently as possible, we diff the return value from the previous call to render with the new one, and generate a minimal set of changes to be applied to the DOM.

If your state isn't constantly changing, react might not be the solution for your use case.

That is why I suggested a simple template for now. That way you can render the basic stuff easily and, as you add features, you can easily extend by creating new templates.

By logins I mean--is this an ecommerce site? Will people login and try to purchase things, will they put their data into a form and something will happen?
>>
>>59617810
BTW: A page where the current storage of machinery is displayed would be great.

So I could my client/friend with a provide a monthly update on what he got stored.


So a simple database solution?
Any suggestions welcome.
>>
>>59617810
The reason a templating engine might be a better option for now is that it's simpler and you can add react if you want to introduce some significant complexity later on.

This will reduce your headaches and will allow you to make changes quickly and slowly build up things.
>>
>>59617847
How will you get data to put into this? Will the data be entered manually or do they have some kind of database already?

If manually, you'll have to create an interface for your client to input data into the database. Then you will post that data to the backend and store it. Any database will work (ignore the memes), just learn one.

Will it be client facing, facing to the public, or internal only (requires a login or some kind of authentication?)
>>
>>59617807
MySQLi is good, so if you like it, you can stick with it. But PDO seems better in some cases.

>https://phpdelusions.net/pdo/mysqli_comparison
>>
Hey /WDG/. What's the fastest way to start earning $$$ in Web Dev?
>>
File: pug-window1.jpg (524KB, 2716x1810px) Image search: [Google]
pug-window1.jpg
524KB, 2716x1810px
Question: if I'm setting up 5 VMs on a machine with 32 cores and all the VMs are going to be used for is Mysql databases with multiple innodb tables that are all going to be hammered with requests at all times of the day, what should I put as the vCPU count on each machine for best performance?
>>
>>59618593
I woudl use containers instead of VMs in that case desu. Less overhead and you dont have to worry about vCPUs
>>
>>59618600
True, but I still want to know the answer for original question if possible.
>>
>>59618614
Well there's no right answer to it, I'd give them equal amount of vCPUs at first to set the baseline and then adjust accordingly
>>
How can I get into Domain registration?

They seem to do absolutely nothing and profit.
>>
>>59618524
If you're talented / lucky enough, bug bounties.

If you're creative, make your own website based on one of your ideas and generate revenue from it.

If you're neither, forget it.
>>
>>59618642
Good luck.

They have bots that buy thousands of domains per minute.

I was reading about some guy who wanted a shitty domain and not having it was hurting his business. He spent 45 grand on a stupid domain name. They wanted 75k but he got them down. They actually acted like their investment of 5 dollars was worth 75k and they said no to him several times.
>>
>>59618524
learn java then spring then angular or react

bam you're a full stack developer making 100k annually

inb4 pajeet
>>
>>59618641
Would it work if I set it to 32 viritual cores on all the machines (since innodb supports up to 64 cores)?
Or would this cause issues somehow? I'm not that knowledgeable with how vcpus work. Thanks for the answers so far.
>>
File: 1463451860986.jpg (82KB, 960x948px) Image search: [Google]
1463451860986.jpg
82KB, 960x948px
So, I'm trying to make a game on the browser using node, express and socket.io.

1. Have I already fucked up?
2. If not, in another step, I have a master server making new instances of the game for users as child node processes. Is that a bad idea? Will it cause too much load on a server once it goes public?

The more I work on it, the less I feel like I know what I'm doing.
>>
When streaming MP3 Audio, should I decompress it on the server side and then send it to the client, or send the compressed audio to the client and let him decompress it in real time? The way I see it:

Server-side decompression
--------
1.) Faster
2.) Uses more bandwidth

Client-side decompression
--------
1.) slower
2.) uses less bandwidth

What do you think?
>>
>>59618326
I will switch to PDO. It's less code and better looking prepared statements that are not full with question marks.
>>
Using certbot for SSL certs. What should the webroot be? Does it matter if it's /var/www/ when my application is in the home dir?
>>
>>59619985

yes please do. PDO was introduced in 5.4 I think....should have been using it long ago. Anyone telling you to still use mysqli_ is probably trying to Jew you
>>
File: 1490463619751.png (649KB, 1253x777px) Image search: [Google]
1490463619751.png
649KB, 1253x777px
OK fellas

My sister fucked up and bought a domain through okdaddy, what the fuck can we do? her personal information is now all over the place

I'm getting kind of anxious too
>>
>>59619700
Are you fucking retarded? I don't even know what you're asking. Are you talking about decompressing into a PCM stream server side? That would be pants on head retarded. Are you talking about gzip which you could probably disable for mp3 because it's not that effective as most compressible data has already been handled.
>>
>>59620272
Edit the information.
Get some kind of "guard" service. (Namecheap provides one for free, don't know about okdaddy)
Sell it.
>>
>>59618524
Bump for advice (I need to pay rentz)
>>
How much networking do you relatively need to know to be a successful full stack dev?
>>
Is it hard to make a mobile app out of a website? I suppose both the site and app can communicate with the same server and database, right?
>>
File: 1422069034241.jpg (7KB, 211x290px) Image search: [Google]
1422069034241.jpg
7KB, 211x290px
how do people know what js frameworks to use? there are like a million of them that do similar things.
>>
>>59620970
That's called being a web developer. There really aren't many that do the same thing.

What do you want to do?
>>
>>59620986
I'm just a student right now in my first web dev class. I seem to be able to do everything i need with just normal javascript+css easily. I've just been looking around and see there are all kinds of things that "extend" javascript like jquery, bootstrap, ember, angular, node, react, and the list goes on forever....

it seems like everyone uses different ones and says each others aren't good. its confusing the hell out of me
>>
>>59621046
For full frameworks, start with Angular. It's the easiest to get started and offers the most features.
>>
>>59621046
You should look into what they actually do. Just because something has 'js' in their name doesn't mean they do the same. Node.js is a tool used in backend. Angular, bootstrap, jquery are basically additional libraries. React is a bit different, it's sort of a unique language in javascript (but essentially a library). You really don't need more than HTML5/CSS3 + JS (ES6 preferably). When you get the hang of everything and say need to set up a server, you then use Node and so on.
>>
>>59621046
For full frameworks, start with React+Redux+React Router. It's the easiest to get started and offers the most features.
>>
File: 1490518782475.jpg (17KB, 268x284px) Image search: [Google]
1490518782475.jpg
17KB, 268x284px
>>59621106
>mfw reactfags
>>
File: disgusted.png (61KB, 167x157px) Image search: [Google]
disgusted.png
61KB, 167x157px
>>59621131
>mfw angularfags
>>
>>59621088
in regards to the additional libraries:
i've read over angular and it seems like it's basically a different way of doing the same things you would with normal js. bootstrap seems kind of like a roundabout way of using flexbox styles. why would you use something like these?
>>
>>59621255
it's mostly about getting shit done faster and in a certain way, sure you could do it urself with pure css and js but no one else would understand your specific way of doing things and that shit doesnt go in companies where you have 10 people working on the same thing.
>>
What are some projects I could do to get more experience?
>>
>>59621163
Why would I choose a newer technology that offers less help on stack overflow, fewer people know it, then I have to use at least 2 other libraries/FWs just to get it to do all I want it to do
>>
>>59621407
- Create alternatives to popular projects (Facebook, Sharepoint, etc) - even if they're not used. That will train you.
- Contribute seriously to existing open-source projects. That will give you credits.
>>
>>59621453
>Contribute seriously to existing open-source projects
Most of the major projects that would get you noticed are already packed with devs who point out and solve issues in the code already. Clutching at straws at best with that one imo.
>>
>>59621877
I agree, but no need to go for the biggest projects, IMO.
There are tons of good projects that could need another dev on them.

I just feel like it shows you can understand a new project that is not yours and work in a team. It also helps you practice with something that will be used (compared to my first idea of creating another facebook).
>>
im trying to get the responseText from a php file I have. It doesn't even get to that point where it reads the data. I have JSON.parse(this.responseText) but it doesnt get there according to the debugger. I also checked to make sure the readystate is 4 and the status is 200, which it is

what the fuck is going on
>>
>>59621877
I mean, whatever you do for experience should be for your own learning. Just make sure you aren't doing things that you think you'll be showing off in interviews. I went through the trouble of creating an entire portfolio to show in an interview and was interviewed by like 6 people. Not one cared to go look at it.
>>
>>59622021
Are you sure the PHP file returns what you want? Have you tested it in your browser, for example?

What's your code, with JSON.parse?
>>
So there are far more web dev jobs after graduating college than any other type of dev. If I'm trying to maximise my chances at getting a high paying job, what languages should I focus on learning and playing with? I'm taking C++ this semester and I'm already on what I'm going to do with it.
>>
>>59622086

yea i can see the JSON when i go to the php file

function loadLastRowData()
{
if (window.XMLHttpRequest)
{
xmlhttp = new XMLHttpRequest();
}
xmlhttp.onreadystatechange = function()
{
if (this.readystate == 4 && this.status == 200)
{
var data = JSON.parse(this.responseText);
if (data)
{
bindData(data);
}
else
{
errorMessage("Could not fetch record.");
}
}
}
xmlhttp.open("GET", "loadLastRowData.php", true);
xmlhttp.send();
}
>>
>>59622148
Does it reach your errorMessage() or not even?
>>
>>59622148

nope. When i step through and get to when readystate is 4, it drops out of the function. I even checked my JSON response and it's valid.
>>
>>59611173
Remote jobs are very competative since lots of people want to work from home. But they do exist.
>>
>>59622148
>>59622218
OK, got it:

It's readyState, not readystate.
>>
>>59620970
Learn jquery, then angular, then react.
>>
>>59622324

fekkk thanks anon i spent hours on this
>>
>>59622218
>>59622373
if you'd have actually stepped through you'd have noticed.
>>
>>59622373
No problem. Next time, you can put console.log() everywhere and you'll see where it stops
>>
r8

0xbeef.coffee
>>
File: Untitled.png (10KB, 381x242px) Image search: [Google]
Untitled.png
10KB, 381x242px
>>59622485
>>
>>59622485
all the post links lead to their html source, are you sure this is supposed to happen.
home leads to search.php, search leads to search.html.

/* Change the link color to #111 (black) on hover */
li a:hover {
background-color: #000;
}


why even bother with comments like that?

the script is awfully written, document load event, really?

2/10, it's a complete mess.
>>
>>59622485
http://0xbeef.coffee/posts/post3

Is it intended to give me blank html?
>>
>>59622708
anyone have that image macro of the
>female programmer
who had like 80% comments to code ratio
>>
So how common is this in web development?

I've been tasked with taking the material from the designers and putting it into HTML and CSS. So what I got was a PDF mockup that obviously wasn't made according to a grid or any guides, so all the components are a bit helter-skelter, so I pretty much have to guess all the dimensions as well as behaviour when the window is resized. I also got a very scant description of some of the interactive parts, but it was full of spelling mistakes. Also the woman struck me as rather inappropriately dressed at the final delivery meeting.

Either way the delivery was approved by the higher ups, so it's on my table now. But I'm wondering if I should make a stink about it, or whether this is the modus operandi for web designers and I should just shut up and get the job over with so I can focus on more pleasant tasks.
>>
>>59623058

no links should have redirected to there

that is requested by javascript and inserted into index.html basically
>>
>>59623357
>pdf
lmao just tell them to go fuck themselves.

psd with a grid or gtfo
>>
>>59623365
>>59623058

I see what the problem is
>>
>>59623357
go to the designer and tell her you want it redone. if she bitches tell her to go fuck herself or have your manager give it back to her.

why waste your time trying to put that garbage into the computer if you could end up with the wrong result anyway because it isn't well documented
>>
javascirpt is so fucking gay sometimes. I had a function called "searchName" but I guess that's already taken by the js engine or whatever. You cant use that name. Would have been nice if chromes debugger would have told me that. Fucking piece of shit. I'm so fucking pissed off right now
>>
>>59621131
>>59621163
Mfw people don't just use jquery + bootstrap.
>>
>>59623598
your JS engine seems to be awful if it makes its functions globally.
>>
>>59623428
It's a bit above my pay grade to deal with contractors, plus I'm a recent hire and haven't worked front-end in ages, so I can't authoritatively say what the best practice is in web design. I suspect management was trying to cut costs by hiring a third-rate agency, and making them lose face over it might not be the best career choice.
>>
>>59623357
You need to make sure that she gives you proper dimensions and responsiveness behavior guidlines. Otherwise it is your ass instead of hers when you "build it wrong" and managment doesn't like it.
>>
i'm a CE student and i've only fucked with C++, matlab, etc and i'm a noob to web

an hour ago i bought a meme domain for fun and now i guess i should actually make use of it

if i just want to make a lightweight blog/homepage for myself to learn HTML and CSS along the way, do i need to use a CMS like wordpress or anything?
>>
I've set up Nginx as a reverse proxy for my Django site served using uwsgi but accessing the domain through the standard port 80 just points to the example file in /var/www/html. I can serve it on 8080 just fine but it won't work with port 80. There's no port in use error, is it perhaps due to user permissions? Is www-data elevated higher than my user on the server?
>>
>>59623428
Wait?

So it got farmed out to a contractor?

You are probrably fucked then as more conversation with her/work would likely result in more billable hours and cost for your company.

Just build it agile syle as close as possible with frequent checking in with higherups.
>>
>>59623716
I would say for learning purposes, it's actually better to do it vanilla.
>>
>>59622148
this should do the trick
function f(){
f();
};
>>
>>59623763
so i don't need to fuck around with a CMS?

cool

cheers
>>
>>59623831
Not yet, no.
>>
>>59623716
CMS is used to not having to edit everything manually and adding components urself.
>>
File: 1490484243569.jpg (108KB, 433x419px) Image search: [Google]
1490484243569.jpg
108KB, 433x419px
>>59623616
>bootstrap
>>
File: 1368926151215.jpg (31KB, 228x243px) Image search: [Google]
1368926151215.jpg
31KB, 228x243px
>>59623680
then just be passive aggressive about it to your manager.

>hey boss since i'm new and all i was jist wondering
>are these web design documents usually formatted like this?
>>
thoughts on expression engine?
>>
>>59623755
>You are probrably fucked then as more conversation with her/work would likely result in more billable hours and cost for your company.

Yes, and I don't have any faith that they will actually solve the problem no matter how much money we throw at them, given that they evidently weren't even capable of turning on snap-to-grid in Adobe Illustrator. The only way to rescue it would be to hire a top tier bureau and redo everything from scratch, which is not going to happen.

>Just build it agile syle as close as possible with frequent checking in with higherups.

Yes, that's how the team I'm on works anyway. But I am somewhat bitter about having what I expected to be a cushy week of translating some specs to CSS would be me doing the job of two alleged designers in addition to my own job. I have code refactoring to do, which would be a much better use of my time.

And another thing that bothers me is that they always seem to hire the best designers to do fart app projects, whereas obscure industrial projects get constant corner cutting. The former projects being for entertaining normies while they're sitting on the can, and the latter projects being what holds up the backbone of modern industrial society.
>>
File: JUST.jpg (27KB, 600x424px) Image search: [Google]
JUST.jpg
27KB, 600x424px
>updated WebStorm
>it's slow as shit now with my Angular project

Anyone else have this problem?
>>
>>59624133
>WebStorm
just use visual studio my dude
>>
File: 1485889119752.gif (8KB, 645x773px) Image search: [Google]
1485889119752.gif
8KB, 645x773px
>he's not an asynchronous programmer
>>
>>59622600
>>59622708

The comments were literally copied and pasted from w3schools. And the other obvious ones were there so that I could just copy and paste to make a new post file.

I guess it's fucked up because I think I specified the directories in a way that worked on localhost but not on my web host
>>
>>59623716
JERK Y'ALL
>>
how to access array of objects in js?

var data = [{"name":"bill"}];

data[0].name doesnt work
>>
>>59624844
Yeah it does.
>>
>>59624176
>falling for the asynchronous memery
>>
>>59624876

fuck im getting undefined
>>
>>59624844
https://jsfiddle.net/g8offLtv/
??
>>
>>59617509

How comfortable are you with web dev? I assume you're familiar with HTML/CSS/JS? What server-side language do you intend to use?

There are a million different ways to build a website. Some of them don't totally suck.
>>
>>59624922

jsfiddle that shit my man, let's have a look
>>
>>59625067

its on the app im making. I'm getting a json response with that exact json and when i try to view after getting it its just blank. Idk. Fuck this shit. It would be nice if debuggers actually told you what the fuck is wrong
>>
>>59625093
post the json you receive and how you access it.
>>
>>59625093
Just console.log the data array and you'll see what you're doing wrong.
>>
>>59625113
>>59625118

ya im logging it and its a blank fucking array. Goddamn Jews. I dont wanna post the data because theres some personal data in it. It's exactly like this tho

[{"herp":"derp"}]

and its stored in a variable by doing this

var data = JSON.parse(this.responseText) and when i console log data its blank
>>
>>59625032
I think I'm at low-intermediate. Maybe intermediate.
I got the landing page with some jQuery.
The server-side is express.

The two purposes of this app are:
1. Building a nice page for my friend
2. GETTING experience + starting a portfolio
>>
>>59625152
put a breakpoint where you parse it and check responseText.
>>
>>59625152
Good, now what should you do next?
The logical step would be to log this.responseText and if that is empty look at the network log to see what the request is and go from there until you find it.

Now you know how to debug!
>>
I don't understand how to go from a dynamic to a static URL.

in other words, how to go from something like this

website.com/php/article.php?article_id=103

to

website.com/article-title
>>
>>59625364
either your framework supports it or your server rewrites it for you.
how you do it depends on what server you run.
>>
>>59625184
>>59625185

its just empty. Which is weird because if i go to the php file it shows the json there
>>
>>59625364

Look into using .htaccess to rewrite paths.
>>
>>59625364
URL rewriting, plenty of tutorials out there.
>>
>>59625395
so what does the network tab show, did it actually receive the data?
go higher up in your code where you actually receive the data and check there.

come on anon, this is basic shit.
>>
>>59625158

Can't tell you much about Express, I mostly use PHP.

Broadly speaking, you'll want to build routes to whatever pages you need in Express, then serve pages to those routes. This might be of use:

https://github.com/EthanRBrown/web-development-with-node-and-express
>>
>>59625385
>>59625400
>>59625410

Thank you for the quick responses.

I'm guessing these tutorials or .htaccess will also explain how a static URL will be able to search throughout my database and create the correct webpage?

Right now, I have it where I $_GET the article_id from the URL and then find the article from my database with the corresponding article id.

With a static URL, do I parse the URL to get a String variable and compare that variable to the articles in my database?
>>
>>59625418

WHAT THE FUCK it says its passing in [object%20HTMLInputElement] as the string when it should be just a fucking number

WHY THE FUCK IS IT DOING THAT FUCK THIS.
>>
>>59625463
Usually you have a "slug" field or similar in your database to match against if you're not using IDs in the URL.
>>
Why does anyone here bother with anything outside of jekyll for static sites idgi idigi idigid idigi
>>
>>59625463
>will also explain how a static URL will be able to search throughout my database and create the correct webpage?
no, you're confusing something.
your page will STILL use ?article_id=103, it'll just look like /article/103 for the user.
your scripts don't change.

client goes to /article/103, server recognizes the url and pretends it's something.php?article-id=103.
>>
>>59625479
magic glass ball not working, post code or accept you're doing it wrong.
>>
>>59625485
because it requires ruby.
no one wants to install ruby.
>>
>>59625537

nvm i got it
>>
>>59625613
tell us what you did wrong so we can point fingers and laugh at you.
>>
>>59625555
but it'z ez az he11
>>
I've had a weird one today. Using Wordpress REST API and Phonegap/Cordova to build a mobile app that receives data via AJAX calls.

The GET is quite large so I want to display download progress as a percentage for the user. The AJAX progress callback can't return appropriate values unless the Content-length header is set in the response, but the WP API doesn't return one by default.

So I declared the header in the ‘rest_pre_serve_request' hook (which provides the response data), calculating the size using strlen(json_encode($data)). This sets the header as expected, but the response is then truncated and the parser shits itself when checking the response. If I set the Content-length to a greater byte value than the response, it's still truncating the response! If I remove the header, the entire response arrives as expected.

I assume there's some nuance to handling headers that I've missed. I've tried mb_strlen() instead of strlen() but the calculated size and result are the same.

Any ideas?

(Yes, yes, there are better ways to do this, but I'm locked into the frameworks.)
>>
>>59608081
>script which hes already sold to 3 other people
>it's unethical
I have no idea why he would say that, since most developers do this all the time. In fact, ThemeForest and similar websites allow people to sell their code to several different customers, sometimes even tens of thousands. Whether you hire captain ethics or some starving third-worlder, I guarantee you'll be getting a slightly modified template that was purchased for $10.
>>
>>59625613
>>59625638

Or at least tell us in case it's some esoteric gotcha. We've all made dumb mistakes though so don't be shy if it was that. :)
>>
>>59625802

I'd be well up for rolling out shit for Envato if it wasn't for the requirement to provide support.
>>
>>59625826
The real killer there is that you only get about 35% of the selling price as your cut. So if you sell something on their site and you list it for $10, you will only get $3.50 as proceeds from the sale.
Your cut goes up the more scripts/themes you manage to sell though, but it's still a huge ripoff.
>>
>>59625942

Yeah, I think it tops out at 70/30 in your favour but that requires thousands of sales I think.

I'm more inclined to crank out a bunch of smaller plugins that do one task really well.
>>
File: uhu-beute-super-zeitlupe-hd.png (398KB, 560x315px) Image search: [Google]
uhu-beute-super-zeitlupe-hd.png
398KB, 560x315px
I want to write a JSON api for my PHP app so I can fuck arround with it. Anyone ever did that?

Right now I think of it as dynamic JSON creation with objects. Would that really be everything?
>>
>>59626289

If you just want to practice interacting with an API, try https://jsonplaceholder.typicode.com/

If you want to do your own, consider using a light REST API framework like Lumen
>>
Start a new web dev job Monday. I'm a linux user almost exclusively and they are a Mac shop, what should I except when switching to Mac for web development?
>>
>>59626422
expect*
>>
>>59626458
Expect wanting to get yourself a mac.
>>
File: img000010.png (29KB, 264x264px) Image search: [Google]
img000010.png
29KB, 264x264px
What's the best non-botnet language to make a simple website?
>>
>>59626422
Lumen looks pretty cool. I think I'm going to write my own api.php first so I've ever done that and than use lumen.
>>
>>59626611
HTML or txt
>>
>>59626611
HTML
>>
>>59626628
>>59626634
I mean, for the dynamic part
>>
>>59626611
cgi-bin
>>
>>59626611
x86 assembler. You don't need CGI, just listen on port 80.
>>
>>59626641
PHP
>>
>>59626652
This->anon
>>
>>59626641
asp.net
>>
>>59626641
COBOL web framework
>>
>>59626611
Javascript/PHP
>>
>>59626641
Compiled brainfuck via CGI.
>>
>>59626745
he said non-botnet. so no js allowed
>>
>>59624334
what
>>
tfw when your shit works on localhost but wont when you try it remotely.

just kill me
>>
>>59627212
Usually really easy to fix. Much more annoying when it just doesn't work locally and every logic checks out and it was just some fucking random ass typo that nothing caught.
>>
>>59607969
So what is the most perfect to develop websites?
- node
- dotnet-core
- django
- laravel
>>
>>59627362
Depends what the website is quite frankly. It doesn't make sense for example to put your static blog/portfolio on a jacked up mean stack with shit flying out the ass constantly.
>>
>>59627362
>dotnet
Lol no
>Django
Lol no, I love the framework but until channels is ready it's miles behind the rest. The models are super comfy though.
>node
I hear DOM manipluation is hard with node.
>laravel
What
>>
I'm working with an htm file in sublime and chrome to view it. Earlier images were loading in chrome when I would preview the htm file in chrome, but now they do not? They just show as a broken link.
Why?
>>
how can I create urls that redirect the page with certain selected options?
>>
>>59627470
probably a broken link lmao
>>
give me some niche markets boys
>>
File: 1490643984183.png (572KB, 814x1200px) Image search: [Google]
1490643984183.png
572KB, 814x1200px
is CSS a meme?
>>
>>59627549
ye
>>
>>59627511
It's the exact same document I was using previously. There are no links.
Even if I go back to the original copy I had before, it is still doing it. All images in this are doing it now.
>>
>>59627567
post some code

>>59627549
your existence is a meme
>>
>>59627582
It's doing it with A TEMPLATE that worked previously. I haven't altered the code in any way. There is no code-related reason for it to behave this way. It has to be something on Chrome's end.
>>
>>59627610
I changed nothing and now it mysteriously works. Wtf.
>>
>>59627610
Did you try a Ctrl+F5?
>>
>>59627651
Good thing you aren't working on any important systems 2bh
>>
>>59627651
Only to start doing it again. This is thoroughly confusing.
>>
>>59627660
Yes, no difference.
>>
>>59626458

I was in the same situation as you. I lasted about four months before I bought a MBP.

Get homebrew installed asap. It's basically the de facto package manager for OSX (non-official, but pretty reliable). From there you can install just about anything you need.

Sequel Pro is a great DB utility if you're going to be working with MySQL/MariaDB.
>>
>>59627763
Same result in firefox. Even if I redownload the template ( https://startbootstrap.com/template-overviews/small-business/ ) and try to view it, I am getting the same result. When previously it worked as shown on the preview site.
>>
Are file server and web server the same thing? If no, when would you need to separate the two?
>>
>>59627867
Check the browser console?
>>
>>59627777
Literally try in incognito. Sometimes the browsers fuck everything up cause muh cache.
>>
>>59627891
If you want to decrease the load of one then you can separate them.
For example if you want 4chan to load fast, but one server can't handle the images of all the boards.
>>
>>59628041
So a web server basically just serves the html, js and css and requests files like images or videos from a file server?
>>
>>59628072
Yeah. But normally everyone throws everything on the web server.

And if you wonder about the semantics. A web sever is any server connected to the web. And a files server is any server that hosts files. So technically the definitions overlap. But in daily use they do mean what you say yeah.
>>
>>59628152
I think most people think of ftp-only when they hear file server.
>>
>>59623731
Probably. I find that if your doing sock files with gunicorn and whatnot, it often works if you tell nginx to look for it in your user's home folder.

>>59627362
>Node
Good if your playing around with SPA's and cutting edge shit. Bad if you're a noob, since most of the frameworks are lacking and it's a bitch to set-up if you come from another stack. Everything's changing week after week.
>Laravel
Good to get started with. I haven't worked in it for a while though. I'm also going in for an interview for a Laravel job tomorrow, so I better bone up on that.
>Django
What >>59627464 said. I love it to death, but it's kinda behind the times and it's really adamant about doing things its' way. Models are fucking great though and the less I have to deal with DB's the better. Good for static sites/minor ajax. It's a bitch to get it going with anything else though.
>.NET Core
Loving every laugh.
>>
File: 1490535631285.jpg (40KB, 480x640px) Image search: [Google]
1490535631285.jpg
40KB, 480x640px
>>59607969
Why cant i stop learning meme frameworks just to build to-do apps
Are there any other projects I can do?

Whats the quickest thing I should make to add to my github so I can get a front end job ASAP?
>>
>>59627782
>>59627782
I don't see this happening desu. I spend 95% of my time inside of a terminal and I doubt Mac can do anything for me that would warrant spending more money on another terminal machine. The only thing that I sometimes wished I had on Linux is photoshop, not because I want to use it but because sometimes Gimp doesn't import PSDs correctly. That's it.
>>
How fluent should one be in PHP to start with Laraval?
>>
>>59628846
Quite fluent desu, if you really want to understand what's going on.
>>
Where do you font-end devs get inspiration from?
I mostly do back-end but I really like front-end too. I already use Dribbble.com from time to time.
>>
i was hoping trump would ban stacks forever.
>>
>>59628830
Have you not tried PS in wine or a VM?
>>
If I have a remote host that I access through an FTP connection, is their a way to get the server to log requests and send the logs to me so I can view people coming to my website in the terminal like a dank hacker
>>
>>59629709
Depends what kind of access your FTP account has. Do you have permissions for /var/log? Don't you have an SSH access?
>>
>>59629832

I can get SSL access

and I don't have access to /var/logs
>>
>>59629949
>I can get SSL access
Then you're in, you're hacker. fsociety right there.

(I don't know what you're trying to do or what kind of server do you have)
>>
im gonna completely drop php after I graduate and focus on full stack javascript like meteorjs/reactjs /blogpost
>>
>>59629989

I want to see what requests people are making to the server come up in my gnome terminal
>>
>>59630018
Are you root on the server?

If it's a one time thing, just connect to it via ssh and tail the access.log or download it from ftp.
>>
>>59630013
>shit to shit

shitty
>>
Single page apps are fucking hard. Anything to make them easier.

Angular?

Currently I'm doing everything in jquery, hiding divs when not in use and functional shit like currying with objects. It's a disaster and it's not fun.
>>
>>59629989
Getting to azure's terminal it's all hacker-like, font color is default green and there's even the word "Azure" in ASCII-Art.

Then you go back to the dashboard where you see all your apps and database and a world map.

So hacky.
>>
gonna build a web store for my portfolio. I'm using node.js, are there any specific modules/packages that you'd suggest? For payment processing, user detail storage, etc.
Thanks
>>
>>59630199
For that, definitely go with a framework like Angular, React or VueJS.
Don't spend time building everything from scratch when there are powerful solutions around.
>>
>>59629709
trying to impress a girl?
>>
>>59630199
React defo defo. Don't do that shit from 'scratch' unless your employer explicitly demands such.

>>59630264
Stripe prob.
>>
Why can't I seem to change the navbar color on this template?
https://startbootstrap.com/template-overviews/small-business/
I looked through the CSS file to find what matched the existing navbar's hex color, but it does not show any change.
>>
>>59630353
navbar-inverse is set which makes it #222
>>
>>59630353
What's your code? Do you correctly place your custom css after the template? Are you sure the new css is reloaded after the change, browsers tend to cache? Use your browser dev tools to be sure you're hitting the right element.
>>
What's this thing called when a website has sections like:

website.com

store.website.com

What's the difference from something like website.com/store?
>>
>>59630545
no difference, it used to make a difference
>>
>>59630441
I have no custom CSS, I am only trying to alter the color of the existing thing. It may be a problem with the cache, but I am not knowledgeable on this at all.

>>59630414
I saw this and tried to replace it also. I am not very certain what navbar-inverse means, besides "it makes it black instead of white".
>>
>>59630606
they have inverse set up so that they can easily create the opposite

just take out navbar inverse from the index
>>
>>59630635
Well, now it is white, but I still cannot seem to change it?
>>
is PHP still worthwhile to learn for back-end? I've heard that it's a dying language and that Node is a better investment. But maybe I don't know what I'm talking about since I've only done front-end.
>>
>>59607969
Web development is not technology.
>>
>>59630791
Then you open it up in whatever browser, right click over the nav bar, inspect, and see what css is setting the color now that inverse isn't active

>>59630883
Learning anything is worthwhile. It all depends on what you want to accomplish really. I wouldn't bother with php though but for some people they enjoy it so do whatever you feel.
>>
I know you all hate these effects but I'd really love to know how to make a scrolling effect similar to this one.

http://www.quantagroup.co.uk/
>>
>>59630977
It inherits the body color?
>>
>>59631001
It's not about hating all effects. I love effects. Google's open source website has gorgeous effects. But the difference is they don't scroll hijack like that site. That shit is 100% aggravating and disjointing.

If you're going to control scroll, at least use something like http://alvarotrigo.com/fullPage in which the scroll isn't so fucking stiff and ugly.
>>
>>59631043
If there's no color set, then try setting it now in your custom css. Target the navbar class.
>>
>>59630545
>store.website.com
This is a subdomain and it usally means the resource you're accessing ("store") is located outside the scope of website.com (meaning it could be on a different folder within the server, or even a different server). "Usually" doesn't mean always, as this is purely based on how you implement it. For example, store.website.com may just redirect to website.com/store, but gives better a e s t h e t i c s

If you didn't figure it out yet, www is also a subdomain.
>>
>>59631061
I added background-color: #982a2a; to .navbar, but there is no change?
>>
File: Capture.jpg (78KB, 1279x471px) Image search: [Google]
Capture.jpg
78KB, 1279x471px
>>59631151
Just tested, I did exactly that and it works.

Go through the process of your file. Is it loading your custom css properly? If you change something else in the custom css, does it work?
>>
>>59631234
>Go through the process of your file.

I do not know what this means.

But, I changed the overall font size to be larger, and it does not show anything changed. So something is wrong there.
>>
So I made a .htaccess file and for a while it was working just fine, but I think I may have deleted some characters or something, because I keep getting error 500 whenever I try to access any of these pages. Here's my .htaccess file.

RewriteEngine On

# Rewrite for setup.php
RewriteRule ^hello php/setup.php [NC, L]
# NC makes the rule non case sensitive
# L makes this the last rule that this specific condition will match

# Rewrite for user.php?u=xxxxx
# by default, the user URL looks like: website.com/user.php?u=Jack
# we will make it look like: website.com/user/jack
RewriteRule ^user/([0-9a-zA-Z]+) user.php?u=$1 [NC, L]

# Rewrite for articles
# by default, the article URL looks like: website.com/article.php?=102
# we will make it look like: website.com/article/article-title-goes-here
RewriteRule ^article/([0-9a-zA-Z_-]+) article.php?title=$1 [NC, L];
# website.com/article/article-title-goes-here
>>
>>59631386
I meant go through the process that your site goes through upon loading.

Sounds like your script link isn't actually linking your custom css. Post the line where it's supposed to load your css.
>>
How is the database or schema setup for a kind of website that has users that upload multiple documents or images, but only them can see them within their user profile?

I'm just learning back end and would like to make something like that. Also, is the more optimal way to store the images/documents in a file server and leave the database alone? Only pointing to said images using a path or something?
>>
>>59631431
yep, that fixed it.
>>
>>59631447
>Only pointing to said images using a path or something?

That's how it is usually done, store the path or filename in the database, not the image file. For text documents it's different and it depends on the type of document. If it's plaintext or even html, you can store it raw in your database using TEXT type equivalent.
>>
>>59631515
They will be PDFs.
>>
>>59631525
Like images then, store the actual pdf in the file server, and the filename or path in the database.
>>
Is anyone here familiar with discord.js? Working on a bot and I have a specific function in mind but I am not sure which class/property to use for normal @username mentions.

client.on('message', message => {
var args = message.content.split(/[ ]+/);

if(commandIs("pet", message)){
if(args[1] === users){
message.channel.sendMessage(message.author + ' *pets* ' + args[1]);
} else {
message.channel.sendMessage(message.author + ' You pet no one! (/).-) Usage: `~pet @username`');
}
}
});

It's telling me user isn't defined but the documentation lists it, as well as user.id but that doesn't work either. When I use message as the class, it returns the else so I know the function is working other than me not knowing what class to use for mentions.
>>
anybody ever used the website "sololearn"?

seems pretty legit. /nodev/ here
>>
>>59633016
I haven't. But I can tell you now that the only way to learn coding is by picking something to build. And then proceeding to build it.

Such courses are more useful to people who already know the basics and want to make sure they haven't missed anything.
>>
>>59608099
Woah!
That's actually really cool. I didn't know you could do this.

Thank you for providing the code samples. I probably never would have looked into this otherwise. But since it looks so easy in your code, I'll go ahead and take a few minutes to look over the doc pages for it.

Seems like a good idea, too. I've often wondered about the security implications of real_escape_string and if it could fail.

Prepared Statements sounds like a better science than simple string escaping.
>>
File: mysql to pdo.png (25KB, 1509x225px) Image search: [Google]
mysql to pdo.png
25KB, 1509x225px
I'm learning PDO since everyone keeps telling me to use it instead of MySQL. I'm trying to convert one of my scripts from MySQL to PDO. Does this look correct?

Don't know the PDO equivalent of mysqli_fetch_assoc.
>>
>>59633297

$stmt = $db->prepare("SELECT tag_id FROM tags WHERE tag_name=:tag");
$stmt->bindParam(':tag', $_GET['category']);
$stmt->execute();
$row = $stmt->fetch();

// you can also do an array to bind parameters
// $stmt->execute(array(':this'=>$thisVar,':that'=>$thatVar));

>>
>>59627782
Any package manager that mutates /usr is a clusterfuck waiting to happen. So I'd rather recommend the Nix package manager instead.
>>
File: pdo1.png (33KB, 870x687px) Image search: [Google]
pdo1.png
33KB, 870x687px
>>59633468
Thanks babe, I think I finally got pdo figured out.
>>
>>59633663
So does my code look safe? No more bobby tables for me?
>>
>>59609451
Don't worry about prototypes. You don't need them to write good js.
>>
>>59611341
I literally have no idea what you're talking about.

Are you at liberty to post a code sample?
Thread posts: 325
Thread images: 25


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