[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: 314
Thread images: 33

File: 1456449140972.png (868KB, 822x552px) Image search: [Google]
1456449140972.png
868KB, 822x552px
/wdg/ - Web Development General

Previous Thread: >>57677221

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

>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.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks
[Gist] backendDevelopmentBookmarks.md

>Useful tools
https://pastebin.com/q5nB1Npt/
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/

>How to get started
http://pastebin.com/pDT82mQS

>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
>>
Anyone know the CS:GO crate thing where it ticks through the skins then settles on one?

How would you do that with JS?

I can think like, you have all the images with set dimensions, then when it scroll % width = 0 play the tick sound, but how do you know what image is under the ticker?
>>
>>57720778
Use data-id attributes on the img tag to store the unique ID of the item.
>>
>>57720797
Yeah, but how do I actually know that the ticker is over an image to grab that data-att?
>>
>>57720797
data-selected="true"? Store the current ID in a variable somewhere? There's a hundred ways to do it.
>>
nvm, figured it out.

Generate the winning item before, put it in a random position after a minimum amount. Populate positions around it with other random items. Scroll to it to make it look like it's real.
>>
File: CyLgT1xUQAASLRc.jpg (151KB, 1089x1200px) Image search: [Google]
CyLgT1xUQAASLRc.jpg
151KB, 1089x1200px
fuck python
>>
>>57720968
Fuck you.
>>
File: id Software Lakehouse.jpg (288KB, 1280x861px) Image search: [Google]
id Software Lakehouse.jpg
288KB, 1280x861px
I've made a shitty website.

On the main index i have a .gif. If i leave the main index for another page and then hit the browsers "previous page" button, the gif is no longer playing.

How do i fix this?
>>
How can i get
"lat" : 37.4223664,
"lng" : -122.084406

from this json with php?
http://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA
>>
>>57721913
Idk m8. I'm not a web dev. I just come here to shitpost.
>>
>>57721913
does the gif loop infinitely when you first view it? (gifs can be made to play once)

sounds like a browser bug
>>
File: file.png (32KB, 454x668px) Image search: [Google]
file.png
32KB, 454x668px
new as fuck to webdev

im going through some of the material in OP, but have some questions

I have a web host that offers PHP and MySQL. what does that mean? Can I just upload my entire db onto their servers? Can I access the db remotely through MySQL Workbench or MySQL Command Line Client? (I don't want to manage my db through cpanel and phpmyadmin) Or do I need a local machine that holds the db and act as a server?

If you have answers or know resources you can direct me to, would be much appreciated
>>
I've been away for a while, what's the current memeJS framework?
>>
>>57722687
I set that JSON to variable "n".

var latLng = n.results[0].geometry.location;
>>
>>57723134
i tried to do this to output all:
$url="http://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA";
$json = file_get_contents($url);
$obj = json_decode($json);
echo $obj;


but in error_log i get
[Mon Nov 28 00:08:46.615543 2016] [:error] [pid 1191] [client ::1:40358] PHP Warning:  file_get_contents(http://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /srv/http/index.php on line 4
>>
>>57722996
>I have a web host that offers PHP and MySQL. what does that mean?
Means the server has php and mysql installed and available for you to use if you want.

>Can I just upload my entire db onto their servers?
Yes.

>Can I access the db remotely through MySQL Workbench or MySQL Command Line Client? (I don't want to manage my db through cpanel and phpmyadmin)
For shared hosting, the easiest thing is probably to just develop on your local machine however you like and then do a sqldump and send it to your server (ftp or cpanel's annoying file upload thing) and import it with phpmyadmin.

Generally you only want localhost to be able to directly access to the db for security reasons. If your hosting provider allows you ssh access (They usually don't for shared hosting) you can just ssh into the machine and do whatever you want with it.

>Or do I need a local machine that holds the db and act as a server?
No, that's the whole point of using hosting. You're essentially renting a (virtual) machine in a datacenter somewhere that stays running all the time for your users to access. You could run a website from a local machine, but that's generally a pain in the ass to do for various reasons.
>>
>>57722868
You're right.

It happens in firefox, but not in chromium.
>>
>>57723289
Are you opposed to using jQuery?
>>
>>57722996
You should check out Google App Engine, it has a free trail. It has very strict control of db access. If your IP address is static, you simply open it up to that IP and you can access the db with whatever program you want.

At first GAE seemed a little daunting, but once you go through the short tutorial, you'll be up and running in no time and find that it's much simpler than traditional hosts.

https://cloud.google.com/appengine/docs/php/getting-started/hosting-a-static-website
>>
File: vH67pnS.png (439KB, 1027x661px) Image search: [Google]
vH67pnS.png
439KB, 1027x661px
Does anyone have any experience with flowplayer?
>>
File: file.png (63KB, 1071x417px) Image search: [Google]
file.png
63KB, 1071x417px
>>57723345
thanks for the reply.
>develop [MySQL] on your local machine however you like and then do a sqldump and send it to your server
My db is >10GB, may change often, from interacting with clients as well as from my input, frequently exchanging the whole db sounds unrealistic. Surely there must be a better way?
>>57723662
this seems great, if maybe a bit overboard. why do you suggest GAE instead of any of these other cloud data packages?
>>
I have very little experience in web development but a shitton in desktop and mobile (iOS) shit. I am also skilled in visual design. I want to pivot from my current job as a technical-heavy mobile developer to a more design-heavy developer. My current job is killing me and it seems like pursuing front-end is my best option for that. I'm on no deadline so investing time in learning the necessary skills is an accepted necessity. Will I be committing suicide by doing this? Literally any comment/feedback/criticism/ridicule/insults are welcome.
>>
>>57723872
Also you may ridicule me if I have erroneously assumed that front end will sate my desire for a design job.
>>
>>57723872
Go for it. It's a tired cliché, but hard work is the only way if you want real change
>>
>>57723688
https://dfcb.github.io/BigVideo.js/
>>
>>57723811
App Engine is pay for what you need/use model. So if you have a very low traffic website, it will cost you almost nothing. If you have a lot of traffic, it scales up indefinitely.

You don't actually use all those services from your pic, they are just available in case you want to use them. I just use App Engine, Cloud SQL and Cloud Storage, but you may only need the first two. I don't know how much your current host is charging, but GAE almost never, and I mean never, goes down and is always incredibly fast. If you only use it for small websites, you might end up paying $5-10/month at most. Very secure and easy to secure as well.
>>
Why are so many laptop configurators so fucking shit? I'm buying a Dell XPS 15 but the options are incredibly stupid and you have to start from a handful of shitty presets with seemingly little relation between the specs.

Looks like I'm just going to try to get everything else I want and then just buy 3rd party RAM to get 16 GB. Ridiculous.
>>
>>57723483
How should i do that in jquery?
I dont rly use it that much
>>
>>57724180
Does it make sense to buy a 1080p laptop in 2016? The XPS is my pick, too, but it's been pissing me off because what I really want is QHD with the larger screen size but the 15 only lets you pick 1080p or 4K. 4K lowers the battery life drastically whereas the QHD on the 13 is still great.

So yeah, bad configurations.
>>
>>57724746
High DPI is a meme. None of the Desktop Environments scale properly. You just end up using a smaller screen resolution to fit the screen size.
>>
Which should I learn first: JavaScript, Python or PHP?
>>
What does /wdg/ think of wordpress? Thinking of doing freelance wordpress sites.
>>
>>57724836
Really? I fiddled around with a XPS 15 4k in Best Buy yesterday and it seemed pretty impressive. I use Windows 10 for my work (.NET). My desktop is only 1080p, so I don't have any real experience with higher resolutions on a personal, long-term basis.
>>
>>57724847
PHP, then JavaScript. Python in notoriously easy so you'll pick it up with no problem.
>>
>>57724847
all 3
>>
>>57724861
wordpress is pretty much mandatory for freelance web dev
>>
>>57724895
Maybe it's better in Windows 10, I don't know, but in Windows 8 my high DPI laptop had tons of problems with various programs. Lots of scaling issues.

When it comes to Linux, GNOME3 can only scale by integers. I think KDE's scaling is probably better, but I haven't tested it.
>>
How can i call one function from another in same php file?
function 1
public function fun1(){
echo "fun1";
}
public function fun2(){
fun1();
}

is it something like this?
>>
>>57723289

have you tried to [CODE]json_decode($json, true)[/CODE] ?
>>
>>57723811
>My db is >10GB, may change often, from interacting with clients as well as from my input, frequently exchanging the whole db sounds unrealistic. Surely there must be a better way?

I'm a bit confused on the use case here. You already have a 10GB database, but nowhere to put it? Are you trying to port some kind of local MS Access thing to a web app or something?
>>
File: file.png (102KB, 1375x693px) Image search: [Google]
file.png
102KB, 1375x693px
>>57725547
>Are you trying to port some kind of local MS Access thing to a web app or something?
basically. I had been using the db on a local machine but now I need to physically move around where the only thing I can count on is internet access. So all I really need for now is a remote-access-enabled SQL db (which, as it turns out, isn't as simple as it sounds, at least in MSSQL).

But I was planning on getting into web dev anyways, so I thought a nice first step would be to set up a back-end on which my database can sit. Eventually, I'm going to build web apps that uses the db, so it's all gravy.

My background is in db management/data mining though, so maybe my whole thought process of sitting a db on a web host is wonky.
>>
>>57724847
Personally, I learned Python first for things unrelated to web development, but any of them would be a good choice. You can use JS on the frontend and backend. Python is particularly easy to read and write. PHP used to be incredibly popular (and still is, although it's declining) so depending on your location, jobs are particularly plentiful.
>>
>>57725765
>>57725765
>basically. I had been using the db on a local machine but now I need to physically move around where the only thing I can count on is internet access. So all I really need for now is a remote-access-enabled SQL db (which, as it turns out, isn't as simple as it sounds, at least in MSSQL).

Okay, that makes a lot more sense.

>But I was planning on getting into web dev anyways, so I thought a nice first step would be to set up a back-end on which my database can sit. Eventually, I'm going to build web apps that uses the db, so it's all gravy.

Weeeelll...What you're trying to do is actually somewhat involved and complicated. You should probably start off by learning some PHP (Or pretty much any other programming language if you prefer). If you just put a naked database on the internet somewhere, you're just asking people to fuck with it, so you really need a web app with some form of authentication sitting in front of it. You should also know how to implement basic security precautions to prevent things like SQL injections.

>My background is in db management/data mining though, so maybe my whole thought process of sitting a db on a web host is wonky.

The database lives on the server where it can only be accessed by the web application software. A user sends an *http request* to the app, and the app *responds* to that request according to programmed logic by reading or writing data to the db and sending the result to the user.
>>
>>57726509
Because everything's inside the outermost anchor element?
>>
Can someone recommend a Windows web host?
I've used Linode for all of my hosting, but they're Linux only.
>>
>>57726732
>Windows web host
lad
>>
>>57726786
I need Windows because I'm deploying applications written in .NET and running on MS SQL Server.
I looked at Azure, but it would be $60/month.
>>
im sure you guys will be pleased to know that I am making progress on my paint clone made w/ paper.js

got color and width options working. now just gotta add some different shapes/tools.

any other ideas for stuff I could add?
>>
>>57726811
that's what you get when you work with Windows.
>>
>>57722687
>>57723289
Fuck, I'm so retarded. I thought you wanted to read the results from the browser so I spent the last few hours figuring out how to pull in the data in using jQuery and making it POST the lat and lng so you could pick them up in PHP. I'm way better at PHP, but now I'm to tired to start over. Good luck. The fuckery with the data is that it's first stored in an array at position zero and the rest can be accessed in the typical multidimensional array fashion. So in PHP, something like [geometry][location][lat] and so on.

<!DOCTYPE html>
<html>
<head><script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script></head>
<script>
$.getJSON( "https://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA", function( data ) {
$.post( "http://[your website]/", { lat: data.results[0].geometry.location.lat, lng: data.results[0].geometry.location.lng } );
});
</script>
</body></html>
>>
>>57727296
Don't come here very much, forgot how to post code

<!DOCTYPE html>
<html><head></head><body>
<script>
$.getJSON( "https://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA", function( data ) {
$.post( "http://[your website]/", { lat: data.results[0].geometry.location.lat, lng: data.results[0].geometry.location.lng } );
});
</script>
</body></html>
>>
>>57727353
Really wish this site had a edit or delete feature. Messed up the last post, forgot the jquery script.

<!DOCTYPE html>
<html>
<head><script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script></head>
<script>
$.getJSON( "https://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA", function( data ) {
$.post( "http://[your website]/", {
lat: data.results[0].geometry.location.lat,
lng: data.results[0].geometry.location.lng
} );
});
</script>
</body></html>
>>
Which is better specifically for HTML5 and CSS: freecodecamp or w3schools? Specifically, I want more projects to develop so I can not only learn the basics but apply them as well.
>>
>>57727657
w3schools is outdated garbage. Go with FCC.
>>
I'm afraid to go to sleep /wdg/, because I know that when I wake up I'm going to find an email from the one job prospect I have left telling me they've decided to go with someone else.

I don't know what i'm going to do
>>
Which text editor is best: atom.io, brackets.io, or sublime text?
>>
>>57725027
I've heard it's far better in Windows 10, but I don't feel a need to go higher than 1080p on a laptop. I wouldn't say it's meme tier, but I think that it's not that useful unless you're either a content creator of some sort (mostly photography at this point) or you have a lot of >1080p content (unlikely, and most services won't have it for years to come). The battery life is more valuable, for sure.

That said, the other "amusing" thing with the XPS 15 is that you have to pay out the ass to get a 1080p version with their bigger battery (I think it's like $1,600 base). It's laughable how much better the XPS 13 configuration options are.
>>
>>57727715
then just get some side jobs. don't pressure yourself doing 9 to 5.

>>57727817
I've used brackets and its better than sublime IMO. its just a matter of preference. you should try to use those three to see what you want.
>>
>>57727817
I mostly use atom, but when I need to format huge files i have to do it in sublime.

sublime really performs well, but atom can be customized to the however you want it.
>>
>>57727845
I can't get any job

>>57727817
atom is really good and sexy as hell but it's fucking slow. it needs at least 8 gigs of ram to run but i've managed to fuck it up on 16 with a bad regular expression search

sublime is faster and can be themed to look good, but it's not as customizable
>>
>>57727817
Atom. If you don't have a decent amount of RAM, Sublime. If you only do front-end and like it, Brackets is pretty good, but it just doesn't measure up as well.
>>
>>57728276

8GB?

I have a HP Z800 with dual 6-core Xeons and 128GB RAM, and Atom is still ridiculously fucking slow.
>>
>>57728313
atom runs just fine on my 16-gig MBP
>>
>>57727715
Don't give up lad. You're not a quitter. Don't be a fucking quitter.
>>
Half uni/NEET fag here, took a year out of CS degree to learn webdev cause I'm a lot happier doing it to the point where i'd rather start working now and sack the degree

Using ruby/rails, and know plenty of all the basics (JS, HTML etc.), anyone know any projects on github I can contribute to so my portfolio can look better besides the basic tutorial apps ive made, this would be the first contributes ive done
>>
>>57728313
>>57728322
ctrl c XDDDDDDDD
>>
>>57727395
>really wish this site had an edit or delete feature
There is delete you fucking newfag
>>
>>57727395
>jquery 1.11
dude if youre gonna jCurry at least use version 3.0
>>
>>57728490
Free Code Camp has this thing with non profits that need help
>>
File: image(2).jpg (81KB, 540x537px) Image search: [Google]
image(2).jpg
81KB, 540x537px
> ay lads, quality or quantity?

i've got plenty of projects on github that are unfinished useless pieces of shit and few that are at least mediocre.

Is it better to have many github projects that includes those unfinished and unworthy creations or should I focus on having only few projects that are clean code and expentantly functional?
>>
>>57731433

finish those shits. at least they know you can DELIVER. then you can refactor and clean up later. because efficiency takes time. you'll be experienced enough to do clean code even before you clean up your code.
>>
>>57731433
create large projects, then you're forced to keep the code good enough because you won't be able to remember everything that's going on at some point and when you need to read the bits you forgot you can immediately understand it.

for larger projects you need to know various design and architectural patterns which are usually used by most larger development companies. but if your aim is just some wordpress faggotry then you wont need it
>>
>>57731726

why the hatin' on wordpress? You can do clean code especially in plugin, widget and theme development.
>>
I am a bit of a beginner here and only really comfortable with HTML and CSS.

I want to have a gallery page on the site I am making that takes pictures from Instagram, is there a good way of doing this that is also good for seo (so I can add an alt tag to pics)

Also things like auto pagination would be nice.
>>
>>57732072
>seo
pajeet out!
>>
>>57732087

What? I am doing this for my business.
>>
File: 1471529729028.png (2MB, 1920x1080px) Image search: [Google]
1471529729028.png
2MB, 1920x1080px
Any of you guys starting to use more Python in Web Dev? I feel like within 5 years PHP would be replaced by Python
>>
>>57732072
>muh google search engine optimization
ask yourself why you really think this is important
Is it so you can make money from ad clicks? If so get out. If not, why do you need seo
>>
>>57732132
>business
>taking pics from ig
that doesn't sound legal my pajeet friend
>>
>>57732132
>can't do basic shit
>still want to make pennies online
>by stealing other people's content
>so asks to be spoonfed
this has curry indian written all over it
>>
>>57732136
PHP is still the main player in web dev, 80% of the world website is created by PHP and I wouldn't be worry about much about python. It's just a fade and would probably end in a few months
>>
>>57732146
>>57732153

Its from OUR instagram. We keep the instagram updated, and it automatically updates the websites gallery with whats current.
>>
>>57732174
why not just uh you know actually use instagram for this?

>guys how do I make a website to show me my recent youtube videas
>>
>>57732204

Because we work in the vintage car/motorbike industry and a lot of our customers are not on instagram, at best they find us on google or go on our website by referral.

I was thinking that this way we only need to update one account, but both get updated.
>>
>>57732072

>>57732153
>>57732146

if the Instagram pictures are from your account, yeah you can do that. IDK just google instagram developers API, I guess.
>>
>>57732238

Good for you. At least it can signal search engines that you always have content. why not leverage also Facebook and Twitter for your website's content. Both the website and the social media accounts will be always active. Win-win.
>>
>>57732492

This is what I am hoping to do, my main issue is that we don't have the budget to get someone to make a site so I am just learning and doing it myself, its not too hard to do the basic stuff, and I suppose if I make it I can maintain it rather than relying on someone else.
>>
How hard is it to find web dev jobs? Most companies outsource these jobs right? Will my dream of being web dev for Brazzers come true?
>>
File: firefox_2016-11-28_08-20-37.png (13KB, 406x382px) Image search: [Google]
firefox_2016-11-28_08-20-37.png
13KB, 406x382px
>>57720734
I might not have to live out of my car after all.
I might actually make it guys ;_;
>>
Why isn't neocities in the OP?

https://neocities.org/

It's comfy af for hosting simple HTML/CSS/JS content (for free) and you can use the API to regularly generate content

https://neocities.org/api

Although I think that might be against the rules.
>>
Tried writing a new feature at work today, but somehow chrome started complaining that "the page has stopped responding" shit every now and then. I have no idea why it even complains about that. The page does appear responsive and all and there's no errors in console. Any idea what I should be looking out for?
>>
>>57732721
what is it about?
Is 56 users really enough to make money?
>>
>>57733185
60 users. Lets say average 5 minutes on site. 720 users an hour. Lets say 5 ad impression per user. 2592000 ad impressions per month. CPM of $1 is $31k a year before tax.
>>
File: 1476450115773.jpg (50KB, 500x698px) Image search: [Google]
1476450115773.jpg
50KB, 500x698px
>>57733219

This ain't no way to live. Why don't you use your skills and do freelance?
>>
>>57733243
I'm an autistic neet who is scared of social interaction.
>>
>>57733219
What if they use adblock?
>>
>>57733283
Yet here you are interacting with people.
>>
>>57732765
Is that like a spinoff from geocities? First I've heard of it.
>>
File: firefox_2016-11-28_10-52-15.png (15KB, 404x324px) Image search: [Google]
firefox_2016-11-28_10-52-15.png
15KB, 404x324px
>>57732721
I'm gonna be rich. (sorry for blog posting)
>>
how do i get a form to run a query on the submit button click without going to the action .php page? i want to stay on the same page.
>>
>>57735256
ajax
>>
File: cuc.jpg (61KB, 638x473px) Image search: [Google]
cuc.jpg
61KB, 638x473px
LAMP or MEAN?
>>
>>57735596
LAMP
>>
>>57735596
MEME
>>
>>57735596
golang :^)
>>
Hey /wdg/, newfag backend dev here, been learning Nodejs for two months or so and wondering if I should switch to php soon.

The reason behind my thoughts is the fact that by using all these Node packages I don't feel as though I'm actually improving my programming skills. For example... am doing a tutorial for making a login app, shit's bloated with packages that do all the work for you without having to actually code any of the logic.

Pretty much every tutorial so far that I've come across is exactly that, an over-reliance on packages.

TLDR, should I switch from node to php in order to get better at backend coding?
>>
>>57735727
Please learn a real language
>>
>>57735738
such as?
>>
>>57735583

No need. Just leave the action blank and use an isset to see if the form was submitted via the button. If so, run the php code and at the end echo a success message.
>>
>>57735727
The only way to learn how to do things on your own is to actually do them on your own. You can over-rely on 3rd party tools in any language. Instead of just blindly npm installing the packages for the login app, dig into the node_modules folder and actually read through the code yourself and then try to re-implement the functionality.

You can certainly switch to PHP if you want (read: if you hate yourself) but if you just end up using Composer or whatever you still aren't going to learn anything.
>>
PHP is fine and not going away. Don't meme yourself
>>
is it possible to have a browser download a file and set a custom path? i allow a user to download a csv file in my web app however it will go to whatever the user has set their browser download path to, can i "override" that?
>>
>>57736309
Of course you can't. That would be a ridiculous security risk.
>>
>>57736453

can i have the download button open up a "save as" prompt so the user can decide where to save it?
>>
>>57736973
That is generally the default behavior.
>>
Is .less short for, "Less retarded"?
>>
>>57737354

i think so, cuz i prefer less over sass.

sass' design/theme is pretty girly anyway.
>>
Hey, I'm gonna pick up either Eloquent Javascript or Javascript: The Good Parts. Any suggestions on which one I should get? I'm just learning js for front end. I already know 2 other programming languages if that makes a difference.
>>
I am making a little weather app that gets the user's location from IP info. It displays their location (eg. "miami, florida") and this location text is in an input element. What I want to do is to display only the location text normally, then when mouseover and typing, show the full input box with "search" button next to it. Can anyone think of any examples of this anywhere I can reference?
>>
>>57737464

if i were you i would learn back end web programming first and then use a js front end framework to play with the data. "I'm learning js for front end" just sounds weird to me.
>>
what are some good tutorials on building web app APIs from scratch? python/node/php preferred.
>>
>>57735596

a man doesn't need to provide access to his wallet as proof that he likes you or loves you.
>>
>>57720968
You're joking, right? Python is legit awesome for manipulating iterables and key-value objects with little to no effort.
>>
>>57737464
I've heard Eloquent recommended many times although personally I learn better through tutorials and projects than books. Not sure what >>57738234 is talking about, most people that aren't already coming from a programming background learn frontend first. It's not weird at all.

>>57738266
Grinberg's Flask mega-tutorial was recommended in the last thread I think.

>>57738342
*tips fedora*
>>
>>57739207

Front end is so much easier and isnt the "brains" of a web app. To read Javascript: The Good Parts for front end is a little much. JS frameworks make front end simpler anyway after you have your data and know how to use it. I think it's a good book but only if you plan on doing more than just front end.....not really a beginners book...
>>
Recommended PHP frameworks to do DB operations that are LIGHTWEIGHT?

Yii / cake / ignite Have shiton of shit that i dont want thay bloat everything up.

Stop using PHP is not an answer. I want to make a fucking website, not a javascript clusterfuck one page app mumbo jumbo. Im just too lazy to do the interaction with the DB myself.
>>
>>57739590

I like using SQLite via the command line for set up and checking stuff out (muh schemas) in my DB. Then I like to use vanilla PHP/PDO. If there's a framework that uses PDO maybe try that then. Just make sure you're thinking about security....
>>
>>57739590
>I want to make a fucking website, not a javascript clusterfuck one page app mumbo jumbo.

I agree with the sentiment, but there are other backend langauges.

In any case i'm not a php guy so I dunno.

I use node.js for backend :^)
>>
File: css.png (3KB, 889x513px) Image search: [Google]
css.png
3KB, 889x513px
I have a coloured div element (red in pic) that I'm trying to turn into a grid of smaller divs (pink). I don't want any visible gaps between the pink divs. I've set the display to inline-block and there are no gaps between elements on the same row, but there is an annoying little gap between rows that I can't get rid of

pic related
>>
>>57739918
#nowhitespace
>>
>>57739918

does this help?

http://stackoverflow.com/questions/19038799/why-is-there-an-unexplainable-gap-between-these-inline-block-div-elements

also pull up a js fiddle and do your mock ups in there, that way you can post the link here for us to see and edit your code.
>>
What's a good API for domain availability?

I see Namecheap and Dynadot, anything else?
'
>>
File: 1421165704604.png (137KB, 1631x1571px) Image search: [Google]
1421165704604.png
137KB, 1631x1571px
>tfw causing 100% CPU load when my site detects an adblocker
NPR One does this

People will wonder what's wrong, notice it does not happen with a clean browser
>>
>>57740151

you mean they'll never come back to your site again?
>>
>>57740315
Adblocking clients are just deadweight anyway
>>
alright does anyone know why when i schema my tables in sqlite i get it all in one damn line? so annoying. Just one table does this actually. What went wrong?
>>
>>57739961
>>57739969
It's not whitespace. Here's code for a slightly different example that has the same problem:



<div class="wrapper"><div class="box"></div></div
><div class="wrapper"><div class="box"></div></div
><div class="wrapper"><div class="box"></div></div>


</body>


<style>


html, body{
height:100%;
width:100%;
}



.box{
height: 33%;
margin: auto;
background: #f00;
width:33.33%;

}

.wrapper{
height: 60%;
width: 60%;
max-width: 50%;
max-height: 50%;
display:inline-block;
background: #f88;
}

</style>
>>
Does anybody have experience with social share buttons?

I'm desperately googling and trying to figure out how to code them myself and make them work with my blog. I'dl rather not use plugins because I want a full control of their position and looks.

I can't figure out how, when a user shares an article to facebook, to include a whole facebook card with my article title, image and excerpt, instead of just a link to a page.

Actually, even plugins don't do it properly. I basically want ta functionality like on this page:

http://screenrant.com/wes-anderson-adrien-brody-h-m-film/

>click on facebook share button and you'll see.
>>
>>57740499

this is the best i could do. Nested divs can get messy....depending on what your end goal is, there might be a better way to tackle this.

https://jsfiddle.net/ygvz0Ls6/1/
>>
File: help.png (2KB, 248x227px) Image search: [Google]
help.png
2KB, 248x227px
Can anyone help me find what I am looking for, I am looking for a program or website where I can put in a number of images (normally 1-4), and it will re-arrange them and re-size them into one image.

Its hard to describe what I want so I made an image in paint, assume here I gave 3 equally sized images and said I wanted 1a to be bigger.
>>
>>57741389

photoshop, broski
>>
>>57741423

But I need to do it for about 50 images, That will take decades.

And I only have GIMP
>>
website is getting stuck at the design phase again.

Everything is done except the CSS. Been working on it for over a month now.
>>
>>57741265
Thanks, anon. float:left seems to fix it.
>>
>>57741251
yeah, did you try googling yet?

facebook uses meta tags to tell what goes on the card.
>>
>>57741595
I've been fucking redesigning my website for like half a year (have been working on and off, though). Yesterday I was satisfied with how it looks and today I hate it again.

Kill me.
>>
>>57741668
how about you draw it and model the menus and transitions before coding it
>>
>>57741704
You think I haven't done that??? The thing is that at one point I stop liking it.
>>
>>57741745
then show people mockups and see if they like it

have test users use it and get feedback

no one cares if the dev likes it
>>
>>57739590

>one page app

this is what php cucks think javascript apps are
>>
>>57741858

huhuhhu jquary unt mongo are haaaard
>>
>>57741823
Yeah, I'm finishing the current one no matter what and giving it to testers. It seems that people actually liked it, but some things are bothering me in terms of usability. But ultimately, I think I'm way too much in my head like usual, I still find myself tweaking unimportant details constantly and I can't help it. Currently I'm pissed off with my font choices and want to jump out of the window. And yesterday I fucking loved them. Fuck.
>>
>>57741878

i too like to have my users reload a page everytime something changes
>>
>>57741668
CSS is boring.

I need to marry a web designer.
>>
what do you guys think is the best blog/news portal in terms of ux and design? what's the latest meme in the industry? One of the latest I saw was infinite scrolling with AJAX loaded articles, which started on Quartz years ago and now everyone jumped on that boat.
>>
>>57741911
> I'm finishing the current one no matter what and giving it to testers

that's exactly the detachment you need. Work towards your own and above the standards of other. Fix bugs before they come up. make features that are needed according to user interaction. Zen
>>
Be me sitting on a bench Eating chipotle and enjoying my yuengling beer when an Indian man walks up to me and asks if he could smoke.
I say of course my friend and we smoke and talk about what we do. He an investment banker I a lowly neet webdev.
He invites me in for drinks and we drink and smoke all day talking about stocks and websites.
He introduces me to his dad who has business in my current line of work that I could bring to my boss make a shit load of money.
Offers me work doing SEO/advertising for two websites.
Cops pulls us aside as we smoke and talk about life. Lets us go because America.


Why do we hate these wonderful people again?
>>
currently learning React

I hope it's worth it
>>
>>57741251
then try to see the code for social share button plugins. they are all the same. or http://pastebin.com/ky8L0S1M
>>
Anyone here worked with deepstream before?
>>
>>57743426
I don't know.
I also don't know why you didn't greentext.
>>
So, I've already gone through all of the material in the OP post having anything to do with HTML and CSS. What I need, specifically, is like, example projects to do that it'll ask me to make. Basically, homework, minus college. Do I need to find a textbook? Problem with those is, it won't be able to tell me what's wrong with my code, at best it'd have pictures of what the result should look like. Unless if it has solutions in the back listing the code?

I need help, lads.
>>
>>57743970
To many shots of whiskey I guess.

Today was a strange day
>>
>>57744067
Codecademy + FreeCodeCamp in the OP. Most web development textbooks are outdated before the ink is dry. Usually they're a waste of money.
>>
Too many ideas. Too little time.

I need like a 5 year loan.
>>
>>57744421
I already completed all of the HTML/CSS material in both of those, though. What else is there besides a college course I can't make the time commitment to?
>>
>>57744586
Then what the fuck are you waiting for, start your own projects!
>>
>>57744067
Project Odin.
>>
What are some job placement websites?

Websites like LaunchCode.
>>
>>57744586

This. >>57744605

Learning by doing is a great way to work out the kinks and weird shit in CSS. Take the time to set up a simple VM and work out doing dev work on personal sites and what not from the comfort of your own computer.

Honestly though, if you spent a lot of time on HTML/CSS, it's time to start learning Javascript to round out the rest of the front-end. Make a countdown-clock for your birthday or a whack-a-mole clone, anything. See a simple-ish website you like? Try looking at the source and fucking around in the browser to see what makes it stick together. A lot of learning comes from fucking up and fixing it while understanding why it happens, so don't freak out when all the child elements inside a modal end up in one position after a while because of some shitty coding on your part.
>>
>>57727159
Let user input an RGB or hex code to choose their color
>>
>>57726811
https://lowendbox.com/tag/windows/
>>
Not new to programming here, but noob to web stuff -- I have a python script that generates output I'd like to display on a website -- clicking a button would run the script again for instance -- how do I get from point a to point b and make this happen?
>>
Can someone tell me why my text isn't centering and changing size? Just HTML/CSS.

https://jsfiddle.net/c8xd41pt/
>>
I'm designing an enterprise cloud storage platform for my employer. Question is should I branch out and use React rather than Angular? I've been tempted for a while. I'm in charge of my team so can decide. My team are good so I'm not worried about learning curves.
>>
>>57745830
Never mind, found the extra bracket. Thanx
>>
>>57745830

looks like some of the CSS wasn't working because you left your styles in the HTML.

I made some updates. See here: https://jsfiddle.net/c8xd41pt/1/

now text is aligned and the font size is right.

as for the font, mononoki or whatever isn't recognized. never heard of that font but it's something you would have to import. just google how to do that.
>>
>>57745910

i just wrote >>57745935 but you're right it was the extra bracket. but you shouldn't keep CSS inside of your HTML, especially in JSFiddle when there's a box for CSS.
>>
>>57744765

I think launchcode is pretty unique in what they are doing.

but what you can always do is post your resume on monster or whatever (not sure what sites are hot right now), and recruiters will find you if you have keywords like "javascript" or whatever in your profile/resume.
>>
>>57735596
nginx
>>
After I indented my p elements, my title text isn't centered anymore. What gives?

https://jsfiddle.net/c8xd41pt/3/
>>
What is the best recommended meme that i can use to quickly make a static corporate website without cms? I have an offer to design and host the whole thing and i'm thinking of just hosting it in a low end vps with 256mb ram and nginx, wordpress is too heavy for it
>>
>>57746359

you set an indent for all p tags and your title is a p tag. use an h1 for your title
>>
>>57746547

use react and bootstrap and get paid for doing nothing
>>
>>57746580
Wow, all of the errors I'm making are so... obvious. It's almost like I'm brand-new to coding.

[spoiler]I *am* brand new.[/spoiler]
>>
>>57746605
>literally nobody gives a shit

Just learn and take it slow m8
>>
>>57746701
I think I wanna make a page that's a cheatsheet for HTML and CSS syntax written in my own words so I understand it, likely linking to individual w3schools pages where necessary. Any particular advice you'd give me?
>>
File: sqlwhy.png (25KB, 1061x192px) Image search: [Google]
sqlwhy.png
25KB, 1061x192px
Can anybody help me with this code? I have been given some code (line 127) which is vulnerable to SQL injection and I want to know why my solution (lines 129-135) isn't working

any help appreciated, yes it is my homework and I don't know a thing about php because I'm an EE who took a comp module thinking it'd be fun
>>
>>57747004
Use prepared statements and html_special_characters for 127.
>>
>>57739590
then fucking make one. why dafuq are you crying for? make one yourself.
>>
>>57747004

>pquery
are you using barebones php or a framework ?
>>
File: pquery.png (8KB, 467x109px) Image search: [Google]
pquery.png
8KB, 467x109px
>>57747091
Yeah passing the input in an array protects against that, you can't do any SQL injection against this code but it's stopping the wildcard from working so it doesn't actually search properly

>>57747206
what's difference between the way I did it and prepared statements?

>>57747264
fat free, but I wrote pquery, isn't anything special (pic related)
>>
How do I deal with the crushing anxiety of explaining web-dev stuff to normies.
>>
>>57747462

write a tumblr post about it then come out as trans
>>
File: heh.png (195KB, 1664x976px) Image search: [Google]
heh.png
195KB, 1664x976px
Working a personal site to have links for some of my past work. Currently on terminal commands that would execute the php code in the back (not really, it would just output the expect php results)...thoughts?
>>
>>57747535
oops that subject
>>
>>57747535

>unironically using php

Just learn node.js and remove php from your mind. Its a dying language that was shit from the begging.
>>
>>57747552
entirely agree with you. From personal experience of applying to jobs there is still a larger demand in stacks that have PHP though.
>>
>>57747608
this, a normie friend literally asked me yesterday what php was and why her friend was getting paid shitloads for it
>>
>>57747004
>why my solution isn't working

What's the error you're getting? Is it a database error? What database are you using?

If you're using postgres and you're getting a db error, it's probably because postgres doesn't like either double or single quotes in your wheres (I forget which it likes off hand).

Also, $search2 doesn't appear to have any quotes at all.
>>
File: example.png (123KB, 852x783px) Image search: [Google]
example.png
123KB, 852x783px
question: on click of a window it will change their z-index so it performs like focusing a window when overlapping another. Problem is, my margins that I use to centre the code window are blocking this click so if the side overlaps the other window it won't click on the window behind because this margin is blocking it.

Ideas?
>>
>>57747680
It isn't throwing any errors but it isn't searching correctly, because the wildcards aren't working properly for some reason. I've tested it against sql injection and it works perfectly, but it doesn't actually search properly.
>>
>>57747757
Capture logs from your database to see what queries are actually being sent by line 127 and by what you've written. I'm willing to bet there's a typo.

Is the no result thing after putting single quotes on $search2, or are there single quotes implied somewhere? I'm not that familiar with PHP. Looking more carefully, are you sure that's how you should be building $search1 as well? It doesn't look like those single quotes need the escape on the double quotes, but I'm not certain... or maybe single quotes can't be used for strings and those need to be changed to double quotes.
>>
>>57747416
oh okay. I thought you're using PDO so I pointed out the pquery thing.

>>57747462
Dumb it down further. Make it to a point that is relatable. Make comparisons. Use their terms/languages.

>So CSS to HTML is like makeup to anyone. they'll become pretty whoever the fuck they are.
>>
>>57747841
>>57747860
Fixed it now, just got rid of the double quotes on $search2. Dunno why I needed them I just put them there because I assumed I needed them because they were in the default code. I fucking hate this language
At least in the meantime I've found an XSS vuln on the search results so two birds one stone I guess
>>
Should a freelancer have a ton of webspace and domains himself?
Does a freelancer create and manage webhosting accounts for his clients and then give out the admin password later, or who should deal with that?
>>
>>57748319
from my own past 2 years experience I would tell them to sign up for GoDaddy and setup their hosting/domain. This has been for small business's mostly.
>>
>>57747703
fixed this.
>>
>>57745239
Theres tons of ways, either use a python framework, or you can invoke the script from PHP and get its output. My suggestion is try to do both so you learn more. And the biggest thing that people in this thread need to get is that you dont cheat, meaning have other people solve it for you, or a library solve it for you. The biggest way to become better at this crap is trying to figure it out yourself, cause when trying to learn one thing, during the way to get there you will learn so many other powerful ideas and tools.
>>
I made a home page for myself with links to websites, but the links just add what is in the <a href=""> to the end of the directory path of the homepage that is already in the address bar, how can I make it just go to the website?

Homepage is file:///C:/homepage/homepage.html and when I click the link it goes to file:///C:/homepage/www.4chan.org which obviously doesn't work.
>>
>>57748439
you have to preface the string with which protocol the link will use. For example:

bad:
<a href="www.fuck.com">LINK</a>

good:
<a href="https://www.fuck.com">LINK</a>

Obviously if it's not using HTTPS then do HTTP
>>
>>57748439
>Homepage is file:///C:/homepage/homepage.html and when I click the link it goes to file:///C:/homepage/www.4chan.org which obviously doesn't work.

you must be new here. add http:// in www.4chan.org
>>
>>57746923
Don't use w3schools
>>
Ideas for web apps?

Want to make some practical stuff. An example would be an Instagram picture downloader.
>>
how do i post htm/css instead of regular text to show my code?
>>
>>57749481
in 4chan , /g/ i mean
>>
>>57749481
what do you mean?
like this?
>>
>>57749543
yea
>>
>>57749564
read the sticky >>51971506
To use the Code tag, book-end your body of code with: [ code ] and [ /code ] (without spaces)
>>
i need some help doing a svg preloading animation thing guys.

right now i have a site that has a preload thing which has
html
<div id="preload_area">
<div id="loader" >

</div>
</div>


that has css
#preloader {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #0e0200;
z-index: 9999999;
height: 100%;
width: 100%;
}

.no-js #preloader,
.oldie #preloader {
display: none;
}

#loader {
position: absolute;
top: 50%;
left: 50%;
width: 50px;
height: 50px;
margin-left: -25px;
margin-top: -25px;
background-color: #EC6552;
-webkit-animation: sk-rotateplane 1.2s infinite ease-in-out;
animation: sk-rotateplane 1.2s infinite ease-in-out;
}

and some other webkit animation keyframes stuff that i ignored

with javascript
$(window).load(function() {

// will first fade out the loading animation
$("#loader").fadeOut("slow", function(){

// will fade out the whole DIV that covers the website.
$("#preloader").delay(300).fadeOut("slow");

});

})


so the loading div is like a sqaure that flips and rotate and stuff until document loads.

so now i want to replace that square with like an svg animation i have that has code
so inside the loader div i did
<div id="preload_area">
<div id="loader" >
<object>
<embed src="logo.svg" width="40%" height="40%">

</object>

</div>
</div>

and erased the stuff inside the #loader{} and webkit animation keyframes after that in the css file.

and i put the .svg in the same heirachy as the html file and inside logo.svg i have <style> that animates the logo but its not working... any help?
when i run it i see nothing
>>
I read that it's favorable to give HTML elements as few classes as possible for styling them.

I defined classes that apply some static amount margin at the bottom, that I apply quite frequently to elements.
If I use Sass, would it preferable if I wrote a placeholder class that adds some margin, and extended the element I want to apply the margin to with said placeholder instead?
>>
>>57720734
i got a vps and a domain at namecheap. how do i link the ip to the domainname.
>>
>>57749965
Create an A-record that points to the IP-adress.
>>
>>57748403
Thank you anon, gives me plenty to go on now. Thanks!
>>
>>57728490

>I'm a lot happier doing it to the point where i'd rather start working now and sack the degree

Don't do this.

You can start working while studying just fine. And even if it might feel senseless or "neverending", if you have any chance to get that degree try to get it. You will thank me in a few years.

> anyone know any projects on github I can contribute to so my portfolio can look better

If you made 1 or 2 bigger projects you should go into the wild. I'm not talking about a "Hello World" App with scaffolding here, rather something that has some tricky parts like the projects in "Rails4 in Action" or "Agile Development with Rails5". But if you understood the basics, go get grab a customer. It will be more challenging, more rewarding and maybe you'll even get some bucks out of it. Don't make the mistake to think "you are not ready yet", you have to apply things to get any good.
>>
>>57750644

Oh and one more thing:

It can't be stressed enough that you don't need a cool portfolio to get a customer. Made a website for yourself (good for your portfolio AND to find new customers!!!)? Made a site for your sister? For the Karate club where you trained when you where 12? All those are your first customers!

It's super important to get live, to really deploy something. After own or two real sites you have a portfolio that is good enough for your first "real" customers.
>>
File: 2015-08-20-08.00.38-trimmed.jpg (69KB, 913x663px) Image search: [Google]
2015-08-20-08.00.38-trimmed.jpg
69KB, 913x663px
is w3schools the best place to learn PHP?
>>
>>57750914
also a good place for node.js
freepajeetcamp transfers me to cloud9 who wants an international credit card and i only have a local debit card
>>
>>57750914
see
>>57748819

>>57751214
you shouldn't actually need a credit card at all to use the free tier of cloud9. Also, you can always just use your own machine with whatever IDE you want. Personally, I found cloud9 to be kind of clunky.
>>
How get,decode and output json from google geolocate api?
I have api key, i tried with php and i get always error in logs
failed to open stream: php_network_getaddresses: getaddrinfo failed


Tried with js
var url="https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA";
function Get(url){
var Httpreq = new XMLHttpRequest(); // a new request
Httpreq.open("GET",url,false);
Httpreq.send(null);
return Httpreq.responseText;
}
var json_obj = JSON.parse(Get(url));
console.log("Json: "+json_obj);
>>
What do I need to read into to figure out how to activate a webcam to record video?

Can HTML5 do this?
>>
>>57749018
Why would anyone give you their ideas?
>>
>>57752075
Yes
https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API
>>
Riddle me this oh great wizards, I'm trying to split a string in PHP as follows (feel free to make fun of my code):

$posts = preg_grep("/^([^.])/", scandir("../posts/"));
foreach ($posts as $p){
$p = basename(str_replace("_", " ", $p), ".md");
preg_match_all("/(\d)|(\w)/", $p, $p_arr);
$p_date = date("m-d-Y", strtotime(implode($p_arr[1])));
$p_title = implode($p_arr[2]);
}


But I'm having trouble with the regex used for the title part, as it removes spaces and special characters too, I'm still too stupid to figure out how regex works.

>inb4 >using php
>>
>>57750914

learn SQL first like an absolute madman, then learn PHP from just about anywhere. Much easier that way in my onion
>>
Guys, are articles like these a good UX or not?

http://www.nytimes.com/2016/11/29/magazine/the-end-of-the-anglo-american-order.html?rref=collection%2Fsectioncollection%2Fmagazine&action=click&contentCollection=magazine&region=rank&module=package&version=highlights&contentPlacement=1&pgtype=sectionfront&_r=0

>tl;dw - 100vh headers and clean, pure-text, articles beneath, without any distraction like related posts etc.

I'm on a verge of making another redesign (I mean, it's not like it will take much time to tweak some shit, but I'd just like to know is this a meme or not).

I always think the bounce rate on these has to be terrible, what is somebody gets bored and doesn't scroll to an end, but there is not anything else which would gain his attention? The user will just leave the website, right?
>>
>>57754126
what IF* somebody gets bored
>>
>>57748486
>>57748474
Thanks, but how do I get it to link if there is no protocol in the link to begin with? rightstufanime.com is the one I'm trying to get to work, putting https doesn't work at all and putting http sends me to some scam site.
>>
>>57752385
Can you give an example of what you want the regex to do?
>>
>>57754126
>all that wasted space
>looks dull as fuck on mobile
ugh NYT needs to fire their designer ASAP
>>
>>57754283
Now I see it's not even fully responsive, heh.

What do you think should articles and news in general look like? I heard people say they don't want any distraction while reading, though, and I guess NYT achieved that.

UI and UX are HELL.
>>
>>57754264

say I have a file "2016-20-11-13-43_Some_shit_whatever.md", as you can tell from the code, the first thing it does is remove the file extension, then it should split the name of the file into numbers and letters, removing the saparator (underscore), which are contained in an array, then I convert the numeric portion of the array into a date and the letters into a string which represents the title of the file.

The problem with the current regex that I'm using is that it also removes the spaces and special characters from the title. So instead of returning Some_shit_whatever it returns Someshitwhatever. That's basically it.
>>
>>57754343
>>57754283
>>57754126
famalams, do you know that new york times won 2 webby awards in a row for the best news site design?
>>
>>57754343
It's responsive.

Honestly it's tough, because news sites in general are in a constant stage of change. The Intercept is just much more pleasant to read. Images take up less space and are much more effective. The Wired's articles are what NYTs articles should be inspired by as well.

Really though, accessibility will always be king (next to content, obviously). If readers are having a hard time accessing your site and the content on it, then it doesn't matter what you do, shit's fucked. Which is the main problem with NYT, a full page of an image and some title text, but how do I access other articles from here? How do I go from this page to news about sports? If it's more than 1 action - it's fucking up UX. Can a blind person easily digest all this information? Can they even navigate it? Or does keyboard-only controls fuck up navigation?

UI/UX isn't just about looks, it will never be.
>>
File: xd.jpg (133KB, 969x661px) Image search: [Google]
xd.jpg
133KB, 969x661px
The downside of having a successful website
>>
>>57754450
Have you seen the webby site? LMAOOOO
Also do you know they charge to submit your site for entry? Also you have to go through a retarded refund process if you withdraw before they pick winners?
WHAT A J O K E.
>>
>>57754558
Thanks for the opinion. I agree with you, that's why I mentioned in the previous post that the bounce rate must be terrible. I'm just looking at The Intercept, and yeah, it's nicer. I don't like that they had to hide those few links behind the hamburger icon, it's really bad for UX. The Intercept doesn't show related posts either, though, and I don't know if I should remove that from my site or not. I guess it is compensated by infinite scroll between the articles.
>>
>>57754446
I can do it in javascript, but looking at your code, aren't you replacing the underscores with spaces?

str_replace("_", " ", $p)
>>
>>57754847

That's good though, the underscore it's the separator between the date and the title. I would prefer a PHP solution, this is basically for learning purposes.
>>
File: goy_looking_for_job.png (137KB, 969x669px) Image search: [Google]
goy_looking_for_job.png
137KB, 969x669px
>>57724919
>>57725766
>>57732159
>>57736039
>>57741938
>>57747552
>>57747608
>>57747620
>>57752423

jesus christ i don't know who to listen to.

on one hand you have node.js growing and being shilled by google and shit
on the other you still have PHP that still kicks, have more jobs, and probably pays more
and then there is ASP.NET being pushed by microsoft

i don't know what to pick guys, i think i am going with PHP. pic related are software fields and current available jobs in brackets
>>
>>57750644
This, get a degree!
>>
Is there a list of material/projects I can develop in HTML/CSS? Already completed all of the content for both subjects on codecademy and freecodecamp. I need to actually implement the skills I've picked up to make something and really put it all together.
>>
>>57755230

Not sure what you expect, just start coding and making websites, there is not a lot you can do with HTML/CSS alone, just make something pretty, be creative.

If it helps, here's a couple of things you can do:
https://github.com/you-dont-need/You-Dont-Need-Javascript
>>
>>57755048

>on one hand you have node.js growing and being shilled by google and shit
Node is mainly popular because you can do fullstack dev all in the same language and because of the huge 3rd party library. JS is also legit comfy once you understand it's eccentricities.

>on the other you still have PHP that still kicks, have more jobs, and probably pays more
The language itself is fucking garbage, but as a career choice it's fine. PHP salaries actually tend to average out to be somewhere around $10k-$20k lower than other languages, but I suspect that has to do with all the minimum wage wordpress monkeys bringing down the average.

>and then there is ASP.NET being pushed by microsoft
Also fine, but Windows server will make you want to blow your brains out.

Just pick something and learn it. Once you git gud, most of it will translate over to a new language if you want to switch.
>>
>tfw just realized WP theme coding standards exist and now I can't make one plugin work
>I'd have to rewrite all pages.

I will commit sudoku.
>>
>>57755545
It isn't your fault. Wordpress documentation is terrible at letting you know how to do what you want, and its only gotten worse recently
>>
File: 1stamender-logo.jpg (102KB, 800x800px) Image search: [Google]
1stamender-logo.jpg
102KB, 800x800px
>>57720734
I sole-handedly built this entire freedom-based news site and I adore it so much both fundamentally and coding wise.

http://www.1stamender.com
>>
>>57755739
What did you use for backend? I'm currently doing the same thing (check the conversation a few posts above).
>>
>>57755904
PHP and SQL I just did the raw programming and output HTML.
>>
>>57755924
How long did it take you to code all the backend? I'm using wordpress (because I'm doing the website for uni and backend is not the main topic, but the UI/UX, so saving my time), but even when most of the backend functions were premade, it took me dozens, if not hundreds of hours to code and design everything. I'm wondering what would happen if I did everything from scratch.

So I guess WP is good sometimes...
>>
>>57755987
>>57755924
Btw, it would be based to see the code on github if you have it. If not, np, but I'll have to find something similar for educational purposes.
>>
>>57755987
The thing is about CMS is that you have to spend quite a bit of time figuring and working each module out. Worst part about CMS is that the company you chose to do a CMS retains ownership of your code. So if it were up to them they can take down your site at any time without warrant legally. I like retaining ownership of my sites so I just develop my own stuff and use free various plugins in javascript/jquery that are available IE things like a complicated slideshow or somthing. For frameworks I just use bootstrap as most of the CSS mobile is already implemented saving me a ton of time. With that there are tons and tons of individual bootstrap designs brilliant people much better than I have concocted.

>>57756005
Unfortunately being that most of my site is done in a php code where a lot of it is revealing to a SQL database I really can't risk the possibility of SQL injection. But really the concepts are all there with w3schools tutorials for PHP.
>>
>>57756062

use PDO for secure PHP code
>>
>>57756062
That's okay, thanks for the reply! I might try doing my own backend too when I'll have time.
>>
>>57756062
>muh security through obscurity
>>
>>57756062
>Unfortunately being that most of my site is done in a php code where a lot of it is revealing to a SQL database I really can't risk the possibility of SQL injection.

FYI if showing the source code for your site makes you vulnerable to SQL injection...you're already vulnerable to SQL injection. There are bots that just crawl sites constantly looking for vulnerabilities. If you aren't sanitizing your forms, it's just a matter of time before you get hacked.
>>
>>57756175
You must also consider that if you can somehow pull the source code on a PHP file you then have the power to hack 90% of the internet.
>>
>>57756194
[citation needed]
>>
>>57756250
If you can pull raw code of a PHP site you basically can then look at the original source code referencing an SQL database and essentially get the keys to seeing an entire SQL database of that site. Any site that uses PHP or other server side scripts would be vulnerable. If you can somehow circumvent a server hypertext preprocessor you would be the scariest cracker alive with an ability to take on just about any web server with that knowledge.
>>
can anyone tell me why my table isn't updating

    try {
$insertStatement = $dbh->prepare("UPDATE 'Orders' SET 'Name' = :nameText, 'ActionTaken' = :statusDropDown, 'Action-date' = :statusDateText, 'shipped-weight' = :lbsText, 'part_letter_control-#' = :partControlNumText, 'c-height' = :heightText, 'c-width' = :widthText, 'c-depth' = :depthText WHERE 'ref-#' = :refNum;");

$insertStatement->bindValue(":refNum", $refNum);
$insertStatement->bindValue(":nameText", $nameText);
$insertStatement->bindValue(":statusDropDown", $statusDropDown);
$insertStatement->bindValue(":statusDateText", $statusDateText);
$insertStatement->bindValue(":lbsText", $lbsText);
$insertStatement->bindValue(":partControlNumText", $partControlNumText);
$insertStatement->bindValue(":heightText", $heightText);
$insertStatement->bindValue(":widthText", $widthText);
$insertStatement->bindValue(":depthText", $depthText);
$insertStatement->execute();

$updateMessage = "Table successfully updated.";
}
catch(Exception $e)
{
$updateMessage = "An error occured.";
}
>>
File: 1.jpg (52KB, 512x384px) Image search: [Google]
1.jpg
52KB, 512x384px
>>57756296
This is why everyone makes fun of PHP devs.
>>
>>57756175
This.

I get crawled and attacked constantly. Not just SQL injection attempts but before I realized how to disable remote root I was getting attacked there too. Also the fucking spambots. I had over 10k email messages from my contact form full of SQL injection attempts.
The funny thing is I didnt even use stored procedures, I just sanitized heavily. They didn't get in.
>>
>>57756446
What langage can remplace it ? Real question, I want to know
>>
>>57756302

nvm it's because i was surrounding my fields with single quotes and not brackets
>>
>>57756296
The only way to make use of that info is to have server access.

Like if I can break your query I can see all your dbs and drop them all.

No one cares about your column names unless they just want to vhange everyones first name to dickbutt.
>>
how would one invoke this i'm confused :(

// Copy length elements of the array from to the array to.
// Begin copying with element from_start in the from array
// and copy that element to to_start in the to array.
// It is hard to remember the order of the arguments.
function arraycopy(/* array */ from, /* index */ from_start,
/* array */ to, /* index */ to_start,
/* integer */ length)
{
// code goes here
}
>>
>>57756446
>>57756469
>>57756483

dudes if you spend the time and learn about good security practices with php/pdo you will be fine. If youre that scared use M$' ass.net or something
>>
>>57756483
The problem isn't that the language is shit (it is). It's that PHP devs have no idea what they're doing or how anything actually works. The learning curve is sufficiently shallow in the beginning for any slap-dick retard to make a basic dynamic website after like 2 hours of PHP tutorials on youtube. That's fine, but most of them never progress beyond that because their dogshit code is """"""good enough"""""".
>>
>>57756670

This is mostly true. If you took PHP projects students do at tech schools and community colleges, you could hack and destroy them easily if you know what you're doing. Point is: know what the fuck you are doing. Anytime you're dealing with the http protocol and

DATA
A
T
A

make sure you plan about security before hand
>>
Mysql won't start up on macOS. I'm not using this for production or anything, just development. My stack is exactly the same as our servers minus the OS so it works great (until today). Anyone know what went wrong?

161129 13:04:35 mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
2016-11-29 13:04:35 140736461616064 [Note] /usr/local/Cellar/mariadb/10.1.19/bin/mysqld (mysqld 10.1.19-MariaDB) starting as process 31310 ...
2016-11-29 13:04:35 140736461616064 [ERROR] mysqld: File '/usr/local/var/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
2016-11-29 13:04:35 140736461616064 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/usr/local/var/mysql/aria_log_control'
2016-11-29 13:04:35 140736461616064 [ERROR] Plugin 'Aria' init function returned error.
2016-11-29 13:04:35 140736461616064 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2016-11-29 13:04:35 140736461616064 [ERROR] InnoDB: ./ibdata1 can't be opened in read-write mode
2016-11-29 13:04:35 140736461616064 [ERROR] InnoDB: The system tablespace must be writable!
2016-11-29 13:04:35 140736461616064 [ERROR] Plugin 'InnoDB' init function returned error.
2016-11-29 13:04:35 140736461616064 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-11-29 13:04:35 140736461616064 [Note] Plugin 'FEEDBACK' is disabled.
2016-11-29 13:04:35 140736461616064 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2016-11-29 13:04:35 140736461616064 [ERROR] Unknown/unsupported storage engine: InnoDB
2016-11-29 13:04:35 140736461616064 [ERROR] Aborting
>>
>>57756773
Never mind I just told mysql to startup under my username instead of whatever they were using by default and it works again. No idea what changed to break it though
>>
New to HTML5 Canvases.

Has anyone made something similar to a large map where 'tiles' can be loaded dynamically when dragging the canvas around the map?
>>
File: Untitled-1.png (40KB, 774x516px) Image search: [Google]
Untitled-1.png
40KB, 774x516px
>>57757349
To clarify: something like this where content in each tile can be loaded dynamically and also destroyed.
>>
I sent my CV to some company, they invited me to interview.
I passed the interview and they sent me some test, just finished it and sent it to them.
Im scared anons, how long will i wait to find out if they want me in the team?
Anyone has experience with this?
>>
>>57757903
>Im scared anons, how long will i wait to find out if they want me in the team?
Who knows... Maybe a couple days, maybe a couple weeks? It depends on how many other people they're looking at and how busy they are. Be sure to follow up with a short thank you email in a day or two if you still haven't heard back.
>>
How do I use greasemonkey/tampermonkey to change a webpage HTLM?

I copy pasted the webpage source code into a new script with the changes that I wanted to make and also specified the namespace url and the match url.

But it's not working...
>>
>>57758895
You have to write a JS program to change it using the DOM API, you can't just copy-paste the HTML...
>>
>>57759093
I just want to replace some text in the webpage but when I googled about it there was only tips for replacing every single word that is equal.
(replace every 'dog' with 'cat')
How do I create a simple script that replaces a specific word?
>>
>>57759327

manipulat the DOM with JS by targeting the different elements by their CLASS and ID. Look for ID's first.
>>
>>57759356
ok so I got the ID from an element in a chart that I want to change the problem is that it's written as:

td.tab_text | 61.25x13.75
how can I use these coordinates in my js code?
more specifically, what should I put in my if statement?
>>
>>57745163

good idea thanks
>>
>>57760255
oh nevermind... I thought about everything in the wrong way
>>
File: file.png (342KB, 1054x740px) Image search: [Google]
file.png
342KB, 1054x740px
>>57757658
Kind of similar to what I did a few years ago. Had a draw part of the site where you users could draw on the maze walls, drawings would be saved to base64 encoded png files.
>>
 var tbl=document.getElementsByTagName("table")[0]; 

var trs=tbl.getElementsByTagName('tr');

var replaceTD=function(TRindex,TDindex,value){
trs[TRindex].getElementsByTagName('td')[TDindex].innerHTML=value;
};

replaceTD(4,3,'item 04');


So this is my greasemonkey script so far, why isn't it replacing the what's inside this TD with 'item 04' ?
>>
>>57761067
arrays start at index 0, so you may want to change the function call to 3, 2.

Also you may need to wait till the DOM has fully loaded. If the table is dynamically loaded you need to be listening for DOM additions.

You can place your code in something like:
document.addEventListener('DOMContentLoaded', function() {
//code

});
>>
To keep infinite scrolling articles without related posts (because they get fucked) or to remove infinite scroll and keep related posts... Hm, decisions...
>>
>>57761401
http://stackoverflow.com/questions/40879366/greasemonkey-tampermonkey-replacing-specific-td-elements-in-a-table

Here's the code, I know what you mean with indexes since I'm studying C and this is similar to arrays but I don't think that's the problem.
>>
>>57761560
Latter, I mean I'm sure you can keep infinite scroll up to a certain limit but after that require user input.
>>
This is probably a thoroughly stupid question, but what's the best way to provide a user-toggleable page-break button that works inside a table? As far as I can understand page-breaks are only respected for block-level elements, but a span inside a td should qualify?

XSL is here: http://pastebin.com/b1S3cESL
>>
why is everyone and their grandmother in this thread doing front end dev
>>
Is st louis bro here?

Im accepting relocation through launchcode to get experience before moving back.
Wheres a good place to live?
>>
>>57760563
you got a demo?
>>
File: file.png (147KB, 1632x944px) Image search: [Google]
file.png
147KB, 1632x944px
>>57764195
Eh not right now. I'd have to set up a database, web server and permissions again.

But essentially what it was is that players could draw on the maze walls, upload files as rewards and place them in various places throughout the maze.
>>
File: ziz55.gif (40KB, 250x167px) Image search: [Google]
ziz55.gif
40KB, 250x167px
who here /420code/?
>>
File: 1456052883920.gif (1MB, 720x720px) Image search: [Google]
1456052883920.gif
1MB, 720x720px
>>57765416
me but losing all motivation slowly.. cant even keep up with meme frameworks or new langs. maybe im not cut out for web dev..
>>
I'm using nodejs and mongodb for a Discord bot and I'm very new to both. What I'm trying to do here is fetch the 4 most recent entries that match the query. I have no own date field or ID, so I want to use _id to sort. If I understand correctly, {_id:1} would sort old to new and {_id:-1} new to old. However, if I do
 collection.find(query).sort({_id:-1}).limit(4).toArray(function (err, result) { ... 

I still only get the 4 oldest entries. What am I doing wrong here?
>>
12 inch or smaller notebook neader found something!
http://www.gearbest.com/laptops/pp_426240.html
>>
is this a good book for php 7?
i found it on thepiratebay. can't find the "hacking with php" version for php 7.
>>
Where do I learn just web Design?
I've been making sites for a few years at work but we only work in recreating sites from mockups.

I would like to design some sites on my own but I am artistically retarded.
>>
>>57766310
Solved. Had to use find(query[name]) instead of just find(query).
>>
>>57734267
m8 which site? let me bring some visitors there so you can have a comfy christmas!
>>
>>57766807
lel
>>57734267
gl with that anon. never give a clue about your site to 4channers. people are envious and many of them are mentally ill.
>>
>>57766841
or, you know, visit the site and link it to 5 friends so he has 6 more visitors
Thread posts: 314
Thread images: 33


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