[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 -- "We're all gonna

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: 315
Thread images: 36

File: wdg in one pic.jpg (38KB, 759x422px) Image search: [Google]
wdg in one pic.jpg
38KB, 759x422px
>Old thread
>>60338961

>2017
https://www.youtube.com/watch?v=9hDKfBKuXjI [Embed]

>This season's Advent of Code:
https://adventofcode.com/2016/

>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
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 (embed)

>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
http://pastebin.com/AL6j7GEE

>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

Don't forget to check the i's ;^)
>>
Are relational databases best for polling applications or is a non-relational fine as well?
>>
2nd for dotnet core
>>
>>60395387
Why don't you have ramnode listed as a VPS provider. Performance for buck it blows the rest out of the water.
>>
how do i into remote jobs as a backend guy
>>
>>60395387
>using the smiley with a carat nose
>>
>>60395849
:→)
>>
>>60395873
>using the smiley with a right arrow nose
>>
File: NativeScript_logo.png (17KB, 300x300px) Image search: [Google]
NativeScript_logo.png
17KB, 300x300px
What do you guys think of NativeScript?

I want to use it but I feel like there's not many resources
>>
>>60395635
Have you looked into Upwork yet?
>>
>60394823

sounds super neat, will do friend. I was trying to push myself to do this back in August 2015 but never got around to it. Really need to buckle down. I work a 9-5 but I have no real life so I can easily redirect the 5-6 hours I spent up after work doing a few hours of coding.
>>
>>60396904
best of luck, but be warned, it won't be easy. Learning is the easy part, the hard part is dealing with all the frustration that comes when you're fucking up and can't find the reason. When you spend the whole day trying to fix your code and it turns out you were using [""] when the correct thing was {''}, or you import the header files but you import them in the wrong order so nothing works, you just get so pissed you wanna smash your computer and go jerk off to 2D anime trannies.

Really, for me the hardest is not the learning itself, but dealing with all the bullshit surrounding it. Getting your IDE properly set up, getting git to run (with the shell, not the lazy drag-and-drop), compatibilizing your software version with the one from the book you're studying from. Just don't let it wear you out. Remember, we're all gonna make it.
>>
Anyone here has used Microservices?
>>
>tfw first project with node

https://gyazo.com/3c2155ff964bd64e08116c69bce838c4
>>
Post your website, /wdg/.
>>
File: StackOgreflow.jpg (302KB, 1560x2048px) Image search: [Google]
StackOgreflow.jpg
302KB, 1560x2048px
I'm doing a flask app, and would like a lightweight document noSQL document DB to live on the server with the app until I build out some hardware for it.

What would you recommend?
>>
Are dynos from Heroku the same as Doker's containers? Can I run mutliservices on dynos and they'll work as well as in Doker?
>>
-Question-

How do you offer users the light version of your site? I looked it up and SO recommended using a JS timeout to trigger a user notification.

The problem being that if you have a server problem - the load event may never be fired. Any ideas /g/?
>>
>>60399061
I don't give a shit, fuck the user.
>>
Has anyone here ever made anything with Phaser.js? I'm thinking of making a cute little mobile game, maybe wrapping it in react native and putting it on google play for $0.99 or w/e. It seems like a meme but so far im impressed with how quickly I could slap together a prototype, and it seems like the strongest contender for JS vidya frameworks.
>>
How do you guys deploy web apps? I've developed a weak little app and I've been struggling to figure out how to get this thing uploaded. Websites are much easier, but the buzzwords and choices on AWS and IBM Bluemix are killing me.

It's just a shitty little MEAN application. Need to figure this out soon. Help? Any advice? Would be forever grateful, I gotta get this up soon.
>>
>>60399009
Containers and dynos are not the same type of thing. In fact, you can run docker containers in dynos.

Containerisation is an alternative to virtualization (like virtualbox), the difference being containers share a kernel with the host OS, and virtual machines do not. This makes virrtual machines much more slow to start up and more taxing on your computer, which is the cost of supposedly more security. There is much debate about the pros and cons.

Heroku is just a layer on top of aws EC2 instances to make it more developer friendly. Any server + db combo that runs on linux can be run on Heroku just like AWS' EC2 + RDS. Dynos are merely how Heroku measures how much stuff of theirs you are using so that they can charge you. Dynos are not used anywhere else and you do not really need to worry about dynos or how they work unless you are specifically looking at your app to optimize for cost when deploying on Heroku. However, it doesn't make sense to put int he effort to do that unless you are a business that is reachinc considerable scale. For learning and side projects, just deploying to heroku should never be to costly, unless you are intentionally writing an app to use as many resources as possible as it's primary function (why you would do this, I don't know).
>>
>>60399156

Yeah, phaser is pretty cool. i made a small paltformer with it, and a flappy bird clone with my roomate's face. The platformer is designed for a keyboard, but the I wrapped the flappy bird clone in Cordova and put it on the Play Store (apple denied me because flappy bird clone, this is to be expected).

So yeah, I would recommend it.
>>
>>60395486
Do what you feel anon. db choice doesn't matter except at large scale. How many users do you already have?
>>
>>60399533
The polls will be anonymous but there will be some sort of data analysis later on. They're more like surveys.
>>
>>60395486
Polling like voting or ajax?
>>
>>60399395
I do. I use digitalocean. They have an install guide for most stacks.
>>
Is anyone here into server-side rendering?

Some things I've noticed.

>Only vroomjs and only v8 is actually cross platform, anything by taritsyn seems to be exclusively Windows and can even break vroom
>it's plausible react.net, or packages associated to it, are deliberately broken and breaks too often to be normal, vroom won't work with it even if it works on its own as of writing
>Babel does run on v8 3.1, don't bother using requirejs just refer to it as "Babel", aka Babel.TransformFile. Only libraries that use the document variable don't run.
What's interesting here is the possibility people are deliberately breaking their own packages or making it only work with obscure settings. I strongly suspect its a webdev pro thing to write your own JavaScript Babel interoperability code because it's deceptively simple and so extremely powerful. I suspect everyone has a project that pools vroomjs and then runs Babel with it.

After my experience in this, I now completely believe the powers that be think web dev would be too easy and too powerful with server-side rendering. The "contributors" posting literally broken code who happen to have Microsoft connections says it all. Microsoft don't like how no one would use mvc and razor if reactjs can be used instead.

If this gets out, web dev becomes too easy.
>>
>>60400022
>msboogeyman
might i suggest tinfoil.js? or am i too much of a shill?
>>
Not sure if I should post here or in /sqt/ but here it goes.
Long story short I want to make a chrome extension that posts a random op or reply from /pol/ to a discord server me and a few buddies are part of.
I don't need any help with the discord api or creation of the chrome extension because they're very nicely documented. My problem comes from my complete lack of web dev knowledge and being bitch slapped so hard by Allow-Control-Allow-Origin that my head is still spinning. I just now saw that 4chan has an API but as stated earlier my complete lack of web dev skills prevents me from knowing how to use it. If anyone could point me in the right direction for starting to understand the API and how to pull individual posts from /pol/ at random from a chrome extension that would be super appreciated.
TL;DR
Anon is too fucking stupid to understand how to use the 4chan api and is groveling for help.
>>
>>60400256
You really think the company that created the whole "only Indians may be paid to code" wouldn't stifle web development? They're literally the kind of idiots that would have people excavate with teaspoons instead of trucks because more jobs.

No, it's actually a possibility that Microsoft, or more likely Facebook who have always had lefty leanings, is actually making this difficult on purpose so more people can be employed.

>lol that's insane there's no real need for it so it couldn't possibly exist
Just like hiring quotas don't exist and any white male complaining about unemployment simply has a victimisation complex.

Alinsky called. He said you're too radical to radicalise anymore.
>>
>>60399395
i tried out herouku yesterday, it's really simple to use and free, you can try that.

well actually it didn't deploy the jar correctly for some reason but i wil look into it later today and i expect it to work
>>
anyone know how to get a folder path based on the current directory in nodejs?
>>
>>60400401
An API has different meanings depending on the context, but in this case it refers to a web server that can return data in JSON format. Once you have that JSON you can manipulate it and feed it to the discord api. You need to use http methods to talk to a web API, e.g GET, PUT, POST or DELETE. In this case, since the 4chan api is read only, the only ones you'll be allowed to make are GET requests. I recommend you download the Postman chrome extension, its a gui for making http requests, and its pretty essential for debugging web apis. I hope this helps.


btw I saw your post on stackoverflow too and it made me smile
>>
will /g/ help me with my homework
>>
File: 136961.jpg (100KB, 700x708px) Image search: [Google]
136961.jpg
100KB, 700x708px
to anyone here who only has 4gb RAM, are you satisfied with it?
i just need to code while having several tabs open in a browser with one of them being a youtube HD video. can i do this without the computer freezing or stuttering all the time?
>>
File: 1491331541402.png (23KB, 800x596px) Image search: [Google]
1491331541402.png
23KB, 800x596px
I want to have some weird repositories for Git and I don't know if it's possible.

I am making a framework, and I want two different groups of people to get the latest version of it, but from their branches they each can do some upgrades and changes, that I want to accept and change back to my main branch.
The problem is, I don't want each other to know that the other branch exists, and I want them to be at different locations/servers

Is this possible? How would you do it?
>>
>>60403497
depends on what your coding setup is. I was using VisualStudio2015 (for C#, obviously), with 4gb RAM, and it was utter shit. Granted, my laptop was shit overall, it was the cheapest Acer I could find, which I bought before I started coding.

So I bought a Lenovo T430, 8gb Ram, i5 processor, everything runs smooth and fast. I also use PyCharm, and it works great, never had any problems.
>>
Any recommended books on wordpress development?
>>
>>60403497
i used to have 4gb and ran into limits sometimes
i upgraded to 8gb and it hasn't ran out yet
>>
>>60403514
If we're talking about github you can just create N branches and assign the people (groups if you have premium) as collaborators.

Then you just merge your branches manually.
git checkout master
git pull origin master
git merge he_was_right
git push origin master
>>
>>60403514
>The problem is, I don't want each other to know that the other branch exists
why? That seems retarded.


>and I want them to be at different locations/servers
That's entirely possible.
>>
when I'm browsing a site and the url ends in whatever.php, that's just bad/lazy coding on their part, right? There is a way to hide that, right?
>>
>>60404171
>why? That seems retarded.
it's not retarded
it's because I'm making work once, and selling it twice
>>
>>60403781
>>60404150
i only use vscode as i dont compile at all (php, node). i think i will try 4gb since i only need another cheap ass 2gb stick. if that wont work ill just buy an 8gb stick
>>
>>60404277
It's still retarded.

Don't put revision control in your releases. just make a script to package up a version.
>>
I have a phone call from a LinkedIn recruiter regarding a front end dev position in 10 minutes what do lads
>>
>>60405299
go to sleep
>>
>>60398179
Hard to say on your security situation. Is it a private app or a public facing app>

If private, Mongodb is fine. For multu user public apps, Mongodb will be a pain in the long run.
>>
>>60400968
Hiring quotas do exist as do promotion quotas.

I knew a very high up person in Oracle that was fired for promoting a more qualified white guy because it didnt meet the quota.
>>
>>60402895
Thank you based anon, that explains so much. Yeah I'll probably take down the question on stackoverflow now. Again thank you so so much.
>>
Now that Rails has all the Webpack/Yarn bullshit loaded into it, i'm a little confused at where everything is supposed to go. What do I put in javascript assets vs package?
>>
>>60407735
I bet you just can't wait till configurationless web development.
>>
>>60408260
I'm just frustrated because i'm too inexperienced to instinct my way to the right way of doing it, and all this shit is still new enough that I can't find a good article to explain it to me like i'm a dipshit.
>>
>>60408378
The more shit you use the more configuration you'll have need and the more shit you'll have to set up.

Find a simpler way to get whatever you need to get done.
>>
>>60408477
I'm just confused about where to include an outside JS library like Konva, and whether or not to add it to vendor and use the asset pipeline, or to add it through Yarn and work with the new webpack structure.
>>
anyone have experience using cookies for user setting permanence? Like they would never have to log in but whenever they go to the site from that device their profile color would be the same as what they set last time, etc. Anyone got a good article or something?
>>
>>60403497
I bought a used T420 for very cheap, I thought 4GB would be a problem (I has 8GB on my previous box), but it really isn't.
Memory is very rarely the bottleneck due to it being so cheap. Nowadays everything comes with 4GB minimum so people don't always realize just how much memory is that. Just run "hfree" yourself and check just how many times you go over 2GB... Probably very rarely, and above 3GB, I'm gonna say never.
If all you do is have a ton of tabs open one of them being an HD video, your computer would be fine on 2GB even.
>>
35.185.204.188 - - [15/May/2017:15:51:45 +0100] "GET / HTTP/1.0" 301 0 "-" "-"
139.162.114.70 - - [15/May/2017:16:02:35 +0100] "GET / HTTP/1.1" 301 5 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"
104.198.219.180 - - [15/May/2017:16:21:51 +0100] "GET / HTTP/1.0" 301 0 "-" "-"
184.105.139.68 - - [15/May/2017:16:24:12 +0100] "%\x00\x02ABCDEFGHIJKLMNOPQRSTUVWXYZ[\x5C]^_\x02\x00\x01\xFBJ" 400 182 "-" "-"

what did these IPs mean by this?

Is there an easy way to view unique visitors? My setup is django + nginx.
>>
>tfw solving a difficult problem
>tfw finally able to use modulo
>>
>>60409912

i remember the first time i had to use it too

it was a nice feel
>>
>>60405299

lel

they'll just ask you what your experience is and ask you what you know, to see your stuff, might not even go that far actually. Recruiters are boring to talk to its not a real interview
>>
Should I do Full OOP or Microservice architecture on my planned side or project?

I think that OOP is kinda hard to follow once the system is already quite big
>>
Hey guys, what's the best practice for making a search form in the header and navigating to a different page to show the results in Angular 4?
>>
what else should i learn if ive already perfected js/ajax and php? as in what can i do that i couldnt do with js/ajax and php...
>>
>>60409912
>difficult problem
lel anywhere where you have to separate between even and odd is a good occasion to use modulo
>>
how on earth are you meant to fit anything within the iphone 5's ridiculous width constraints?
>>
>>60412076
learn design cunt
>>
>>60403497
I do that and I have no problem honestly. I'll even have a podcast app running, sometimes I'll pop open a game, I'll have a text editor and an IDE open.
Zero problem honestly. Especially because I'm not using some sort of vast multi monitor setup where every opened program needs to be going full blast 24/7. If I were to get into video editing and more into graphic design/content creation I can see wanting to go 8/16gb.
>>
>>60412151
design doesn't help much when trying to show code snippets

thank you for the absolutely unwarranted expletive
>>
I have a web application that I developed using PHP and MySQL. One of my clients need it to also be available offline because a few of his offices have shitty internet connection.

Setting up a local server that syncs from time to time with my current online server seems to be the easiest option as those places hardly ever need data from other offices, but I dont know who is going to be responsible for those servers and can't trust them not to steal my code/product. What should I do?
>>
>>60412276
design has everything to do with showing code snippets wtf are you on
design dictates how the snippets present on various interfaces
your entire existence is unwarranted tho LMAO
>>
>>60412625
GNU/Linux with LUKS on all partitions is what i think would be the best, they wont be able to start the machine without the volume key though, so be sure to add an big UPS to the server.
>>
What CMS is best if I want full control over the look and feel of my website (I don't give a shit about themes), but I want someone else to be able to edit the content of the site without having to actually go into html files? I guess preferably a wysiwyg editor, but just the ability to edit text files or something simple like that would be ok.

Basically I'm going to handle the actual design of the site myself, but I need it to be easy enough for a non-programmer to edit content and possibly deploy the updated stuff to a host.

From what I've read, Wordpress, Joomla, and Drupal are the most popular options. I've also looked into Jekyll.

Does anyone have experience with any of these?
>>
I'm working on a wordpress site and I'm trying to create a very specific effect. I'd like the active section of the main navigation to have a box shadow surrounding it with absolutely no shadow on the bottom. I've been able to achieve this effect through giving the main content div a solid background and a higher z-index than the nav div but this clearly isn't the right solution because then the dropdown menus are hidden behind the main content. Is there some clever positioning I can do to make this sandwiching of divs work? Is there something obvious I'm missing here? Any input is greatly appreciated. Thanks.
>>
>>60413920
I'm not entirely sure I'm understanding exactly how your setup is laid out. Which div has the box shadow? And is the other div covering it on the bottom?

In any case, I think you have two options:
1. Use a separate div solely for the purpose of covering the box shadow. (Assuming that won't cover up some content in turn.)

or

2. Force the dropdown menus to be on top of the other divs. Put an invisible div at the level where you want the dropdown menus to appear. Give it a transform:translate(0,0) property. This makes it the new frame of reference for any descendants with a position:fixed property. I think if you make the dropdowns fixed, they should be in the same stacking position as the invisible div. (You can also just add that transform to a div at the desired stacking position.
>>
>>60412625

fuck that just have them remote in
>>
>>60413666
there are plenty, ghost and wordpress come to mind

Jekyll is amazing for dev bloggers, there are some products you can stitch together to give yourself the wysiwyg editor, but for clients I don't recommend at all.

Wordpress is popular for a very good reason, it gets a lot of bad rep due to being bloated and insecure but that can be avoided by not loading everything under the sun as a plugin for a simple site.
>>
>>60415125
Thanks for the info, I'll look into Ghost. But I'll probably end up going with Wordpress, since everyone seems to say it's the easiest for non-technical people, and it looks like a lot of hosts integrate with it pretty seamlessly, which are both plusses.
>>
why does this work in the console but not when used in a script?

var buttons = document.querySelectorAll('button');

buttons.forEach(function(button) {
button.addEventListener('click', function(event) {
console.log('button clicked');
})
})
>>
>>60415842
nevermind put the script tag before the elements had loaded

damn amateur
>>
any tutorial projects for angular 4? step by step preferably.
>>
best way to make a web-based phone app?

Ideally something with the same kind of UI design tools as android-studio.
>>
Any tools you'd suggest for making writing userscripts easier, but not full-blown jquery?


element selection, and receiving and parsing html are my main problems. As is adding buttons to sites like youtube.
>>
>>60410405
They are two completely different things not different solutions for same problem - you can use them together.
>>
>>60410828
Yeah sure you have perfected those. But learn new languages, libraries, frameworks,.
>>
>>60416342
Angular is dead, learn react or vue.
>>
>>60416608
Apple doesn't allow web based apps. You can look into Xamarin.
>>
>>60416649
Why not jquery?
>>
>>60417414
nativescript can target iOS. So I know that's not true.
>>
>>60417439
Because it's either enormous, or a black box.
Plus there's way more tailored functionality I'd need to write myself anyway, or never find in the huge API.
>>
Fuck I hate design.

Even with bootstrap this shit is hard to make look good.
>>
Okay guys another quick question, you may know me from >>60400401 and after a day of messing around I finally got what I wanted. (please don't laugh too hard)
function testing(){    
var httpGet = new XMLHttpRequest();

httpGet.open("GET", "https://cors-anywhere.herokuapp.com/https://a.4cdn.org/pol/catalog.json", true);

httpGet.send();

httpGet.onreadystatechange = function(){
if(httpGet.readyState == 4 && httpGet.status == 200){
var test = JSON.parse(httpGet.responseText);
var ranNum = Math.floor(Math.random() * (test.length));
test = test[ranNum].threads[0].com;
return(test);
}
}
}

console.log(testing());


Okay so it does get the info I need and I can get it as a string which is perfect, the only problem is that when I put the meat of the code into a function and then call said function it'll error out saying "undefined" so my question is, how do I make the
console.log()
or anything else that invokes the
testing()
function wait for it to be completed.
>>
I've been out of the webdev loop for a while.

If Im not looking to build a full web app, but instead want to build a mostly static website for a business (about 10-15 pages), what are my options in ways of a framework? I'd like to have a general template (a lot of the pages will look the same and share most css) but full control of how everything is displayed on a page by page basis through code

Last time I had to do this was years ago and I used Drupal. But I'd rather not touch php. Django seems like it could possibly be a good but also kind of heavy weight.

I know I could just write everything in straight HTML, CSS, and JS but that seems like a recipe for disaster.
>>
>>60418672
>I know I could just write everything in straight HTML, CSS, and JS but that seems like a recipe for disaster.

How?
>>
>>60418737
If I want the same header and footer on every page, I'd have to change 15 files if I make any changes to one.
>>
Dude why doesn't CSS allow overwriting?

Like

<section>
<div class="shit">
</div>
<div class="shit2">
</div>
</section>

section { width: 100%; text-align: left; }
shit1{ width: 50%; text-align: center; }
shit2 { width: 50%; text-align: center; }

durr broken, width 100%, elements not blocked, can't override shit. Fuck CSS
>>
>>60418457
You may want to set onreadystatechange before you call send().

https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/onreadystatechange

The 'return' statement in your function doesn't go anywhere. You need to call your print function (console.log()) from within your onreadystatechange function.

Alternately, you could pass a function into testing() and have that function called as part of the onreadystatechange function. Then your call would be testing(console.log). Or something similar; I don't usually work in JS.
>>
>>60419626
Thanks for the reply, I'll give these a try when I'm back at my PC.
>>
>>60418457
Here you go:
function testing() {
return new Promise(resolve => {
var httpGet = new XMLHttpRequest();

httpGet.open("GET", "https://cors-anywhere.herokuapp.com/https://a.4cdn.org/pol/catalog.json", true);

httpGet.onreadystatechange = function(){
if(httpGet.readyState == 4 && httpGet.status == 200){
var test = JSON.parse(httpGet.responseText);
var ranNum = Math.floor(Math.random() * (test.length));
test = test[ranNum].threads[0].com;
resolve(test);
}
}

httpGet.send();
});
}

testing().then(test => {
console.log(test);
});
>>
>>60419734
Thank you so much, this works perfectly for what I want.
>>
How do I test something untestable?

I'm making a huge tool for twitch streamers but 100% of it require several users and partnered streamers.

Do I just find someone to test it out live and hope it works?
>>
File: dankmemes.jpg (20KB, 306x306px) Image search: [Google]
dankmemes.jpg
20KB, 306x306px
>>60395387
>Want to learn and use node
>No tutorials on node without needing express
>>
>>60420106
I feel your pain; I've been working on a project in Node recently and a lot of code from StackOverflow and other sites tend to just use express code despite the question not explicitly asking for it.

I've had some success just reading the docs. It's probably a good idea to start by glancing through the http docs. The request, and response classes are probably the things that you mostly need to learn to get started, along with the basic setup for the server class.

https://nodejs.org/api/http.html
>>
File: yes.png (46KB, 1209x894px) Image search: [Google]
yes.png
46KB, 1209x894px
I'm a fucking wizard.

You guys talk shit on ph, but tell me this isn't pretty sexy.
>>
>>60420846
actually I forgot a lot of spacing, but hopefully you see how good looking that shit is. CLEAN
>>
>>60420106
All I can say is good fucking luck with that. Even with Express, a lot of guides don't really go into detail on how to really build something simple or how your project directory should look. Even the MVC/massive framework stuff like Meteor and Sails.js have this weird gap after the first steps.
>>
>>60420883
enjoy your t.paamayim nekudotayim, stupid goy
>>
I'm trying to use get_header as a conditional that should detect a 404.

However the targeted web site creates valid (albeit largely unpopulated) page with a valid 200 response for every string input in his header.

Any ideas how can I target this scenario to diferentiate between valid and non-valid pages?
>>
>>60420070
Break your app up into pure functions where possible and test those with unit tests.
Create mockup versions of any 3rd party services and use dependency injection to swap out the real services for them.
Use an end to end testing framework to automatically test the app in a browser environment.

>>60420106
Node's builtin http module is pretty simple. You can learn pretty much all there is to lean about it on the official docs, but it's kind of a pain to do anything with it though since it's so low level. If by "want to learn and use node" you're talking about something other than web stuff, it helps to search for "node clustering tutorial" instead of just "node tutorial".

>>60422458
>how your project directory should look
There's no such thing since you can put everything in one file or split it out however you want and it still works fine.
The way I usually do it though is:
app
index.js // main entry point for app
routes
index.js // routes for /
users.js // routes for /users
tests
models
index.js // use fs to import every other file in this dir and export from here so you can import { User, Foo, Bar } from "models/index"
User.js // user model
lib // put any lib-like code in here, arrange as necessary. As an example:
middleware // put your middleware in here
helpers // put your helper functions in here
config
config.js // .gitignore this.
config.example.js // sample version of config without any sensitive data


That said, there are tons of beginner tutorials on express, meteor, and sails if you know where to look. (although last I heard sails was falling off in popularity due to insistance on using old, unsupported versions of things and a fork/clone trails.js looked promising but was still in its infancy. No idea if that's still going on or what though.) Also imho meteor teaches you bad habits and you should probably stay away from it until you have a good understanding of what it does.
>>
>>60424439
solved
>>
>>60424972

PM me :)
>>
>>60425006
I checked for a specific html string on one of the valid pages using strpos() and used it as a conditional, it was actually pretty easy.
>>
I have an event listener on four buttons which when clicked will detach the button and show an answer. When the next button is clicked, that previous answer will be detached and the button will reappear. Sometimes this works flawlessly but a lot of the time the event listeners will disappear from the buttons. Is this meant to happen?

The script also won't output any console logs to chromium (other scripts work on other pages) but they work fine in firefox. At a loss as to why.

var buttons = document.querySelectorAll('button');
var containers = [];

buttons.forEach(function(button) {
containers.push(button.parentElement);
button.addEventListener('click', function(event) {
switch (true) {
case event.target == buttons[0] || event.target == buttons[0].firstChild:
showAnswer(buttons[0], 'No');
break;
case event.target == buttons[1] || event.target == buttons[1].firstChild:
showAnswer(buttons[1], 'Yes');
break;
case event.target == buttons[2] || event.target == buttons[2].firstChild:
showAnswer(buttons[2], 'No');
break;
case event.target == buttons[3] || event.target == buttons[3].firstChild:
showAnswer(buttons[3], 'No');
break;
}
})
})

function showAnswer(button, answer) {
var div = button.parentElement;
resetAnswers();
button.detach();
var p = document.createElement('p');
p.style.fontSize = '10pt';
p.style.paddingTop = '18px';
p.style.paddingBottom = '17px';
p.style.margin = '0';
p.append(answer);
div.appendChild(p);
}

function resetAnswers() {
containers.forEach(function(div, i) {
if (div.firstChild.nodeName == 'P') {
div.firstChild.detach();
div.appendChild(buttons[i]);
} else {}
})
}


Is there anything fundamentally wrong with this?
>>
>>60425210
that detach() should be a remove() by the way and to clarify, the event listener disappears after multiple clicks through the answers
>>
Okay so I literally just started trying to learn HTML and CSS within the past couple days, I still suck but I'm trying.

How do I center everything on a page when only using HTML5? I cannot use CSS. I've tried <center> and <td align="center"> and a couple other things I googled, but to no avail. What do I do?
>>
>>60425437
<center> should work e.g.

<body>
<article>
<center>
<div>
<h1>Hello</h1>
</div>
</center>
</article>
</body>
>>
>>60425486
I have definitely tried that and it did not work.

It's for someone else, they have a profile for their job and wanted me to center the text for them. It works in my text editor, but when I actually go to apply it within the website where the profile can be edited, nothing works. It's very frustrating.

Doubly frustrating - it timed out and I don't know the password for the account because they said they'd rather type it in than give it to me.
>>
React question:


How do you make a <select> like menu in React?
>>
>>60425486
So only one <center> is needed for an entire page? Or is it something required for every paragraph?
>>
>>60425779
You can center individual or multiple elements
>>
>>60425182
>strpos
Yeah use something that doesn't break the moment page changes even a little. Like regex.
>>
>>60425831
Thanks, good to know that. But the problem is that the <center> and <td> tag doesn't work at all. If I use a text editor like Sublime Text (welcome advice for another), I can visibly see the changes. But the website in which this person has a profile has a section for editing HTML, when I use those tags, it does not change anything. Is there another tag that centers text? Or would I have to adjust margins for each element?
>>
>>60425667
>>60425667
>>60425667
BUMP. Need to make a <select> menu taking props. Have no idea how to make it.
>>
Anyone use Celery with Python? What result backend do you use? Thinking of switching from AMQP before it becomes fully deprecated.
>>
File: EchoVote.png (91KB, 590x370px) Image search: [Google]
EchoVote.png
91KB, 590x370px
>>60420846
>>
>>60427860
I hadn't cleaned it up yet.

no bully
>>
Anyone familiar with amazon and cloudfront? I have an app that is hosted on amazon and a database on amazon. I wanted to force https so i created a cloudfront distribution to do that and that works but now my app cant connect to the database. i can connect with workbench so i know its not me, i can also build the app on my computer and it can connect to the database

is there a secret option that i missed or something?
>>
>>60427860
don't know much about php but it looks good. Not many chances of fucking up there, it's quite simple
>>
>>60420846
is this really php, it looks like perl
>>
>>60428424
I'm the guy that wrote the shit. It's because it's unnecessary.

I needed to just echo $vote and it would cut all of that out.

>>60428491
Yesh.
>>
File: 1494866236636.jpg (31KB, 352x350px) Image search: [Google]
1494866236636.jpg
31KB, 352x350px
What is that [+] you press to drop down more links/information.

Anyone know what it's called / link to w3?
>>
Struggling w/ React.


Anyone familiar with a good react tutorial?
>>
Anyone have any tips or know of any libraries that can be used to show thumbnails of a link? Kind of like how when you post a link to FB you can see the little previews.
>>
>>60428584
I don't know if it has a more official name, but I'd probably call something like that a collapsible/expandable section.

>>60428669
Facebook just grabs the image specified in a meta tag in the site's header. There are tags for the image, description, and title that will show on links for that site when posted to Facebook. The image one looks something like this:
<meta property="og:image" content="http://some.site/image.jpg" />

(The "og" is for Facebook's Open Graph protocol.)

You can do this yourself pretty easily by just parsing the url's html data and grabbing the image. Note that you will probably have to do this on the backend due to cross origin request being blocked. (Maybe just for the html parsing; you can probably rig something up with iframes to show the images.)
>>
I have a database in sqlite, and one of the attributes in the database is a list of countries. How do I get Django to spit out the individual countries in the list, one by one?
>>
>>60429070
Thanks for pointing me in the right direction I'm looking at the amazon source right now to try and find it. I'm trying to figure out how it's universal as in pretty much every single link will do this. I've seen it done on another website where you enter a link to a product and a preview shows up.
>>
>>60429176
Pretty sure Python can interact with sqlite via a library. You could yield the results and call next() on the generator object.
>>
>>60429176

you dont need django to do this man, use a fucking base language and actually learn what youre doing instead of having a babby frameworks spoon feed you

fuck man - you guys are hurting the industry
>>
>>60428584
Collapse menu. Bootstrap.
>>
>>60413666
Contentful if it's free plan meets your requirements.

I'm guessing you'll shit yourself when you see their paid plan pricing.
>>
anybody know of a cool book on API's? Not a beginner tutorial, I can churn out simple API's, but I want to see some cool projects out there, cool ideas.
>>
>>60431817
https://apisyouwonthate.com/
>>
What would be the best way to display hundreds of youtube videos on one page?
Even loading them and using lazy loading my computer about kills it's self.
hmm
>>
>>60432797
Are they all playing at the same time? If so, your browser and internet connection definitely aren't going to be able to handle that many.
>>
File: file.png (2MB, 1799x748px) Image search: [Google]
file.png
2MB, 1799x748px
>>60433102
Nah, I just want to embed them like this.
Kind of interesting to see what videos a board posts.
>>
>>60433191
I should have converted that to jpg. fug
>>
>>60433191
If they're not playing, then you should just grab the thumbnail and show that, like 4chan does when you hover over the [embed] button. And then when you click the image, actually embed the video in that spot.

I think YouTube has an API for getting the image based on the link.
>>
File: .jpg (35KB, 484x497px) Image search: [Google]
.jpg
35KB, 484x497px
>>60433375
Yeah, that's pretty much lazy loading. I guess I'll have to implement my own, the one I used was ass.
>>
File: 3Gt2MUh.png (1014KB, 1152x864px) Image search: [Google]
3Gt2MUh.png
1014KB, 1152x864px
>>60395387
What's the real benefit of learning and using SASS? I mean, nesting and defining variables is kind of neat but other than that I don't see needing it for a styling simple page.
>>
Why are divs inside of a bootstrap col-xx-xx automatically 100% width?

This is fucking up my div buttons. How do I fix it?
>>
>>60433482
there isn't much to learn, it's just basic CSS with variables and some minor tweaks/improvements. it's just handy changing a variable instead of having to go through your CSS or having to write massive selectors when not using nesting.
>>
>>60433503
divs are block elements, they are always 100% wide.
in that case they should be 100% of your parents col-xx-xx element.

if you mean something different post a codepen/jsfiddle or some example.
>>
>>60397201

very discouraging

interested int he field for job security, but feel like I'd be happier working in a wood shop building tangible things and honing my sculpture skills.

And who knows how much longer this field will even be "secure" at the rate of globalization and artificial intelligence.
>>
I switched it to inline and this happened.

That line is the border.
>>
>>60433578
my magic crystal ball tells me you're using some float shenanigans with shitty margins and paddings with pixel definitions.
>>
>>60433529
Does it affect performance at all?
>>
>>60433698
SCSS gets transpiled to normal CSS before you deploy it, so no.
>>
>>60433641
I'm using bootstrap and trying to style around it.

It fucks everything up.
>>
>>60433716
Neat! Thanks.
>>
>>60433722
okay
>>
>>60433722
>>60433578
>>60433503
https://stackoverflow.com/help/how-to-ask
>>
>>60399395
What is git
>>
File: asdfasfasdfadsf.png (32KB, 965x593px) Image search: [Google]
asdfasfasdfadsf.png
32KB, 965x593px
Look ok for developer design?
>>
File: .jpg (480KB, 1917x1005px) Image search: [Google]
.jpg
480KB, 1917x1005px
>>60433479
Probably going to stick with this.
Less headaches.
>>
are emojis safe to use these days or are there still compability issues?
I would prefer to use some unicode emojis instead of loading another icon font.
>>
>>60434696
Looks nice, but I'd increase the padding in the textbox a bit more.
And maybe make it a lighter gray than it currently is
>>
>>60434787
http://caniemoji.com/
>>
File: 1475852786304.jpg (37KB, 450x369px) Image search: [Google]
1475852786304.jpg
37KB, 450x369px
Is a web development associate degree worth it?
I kinda lack the discipline to study by myself.
>>
>>60435744
This might not be the field for you if you don't go after this on your own time.

Tons of people with CS paper that don't give a shit and know nothing beyond their job.
>>
File: codecamp.png (149KB, 1083x698px) Image search: [Google]
codecamp.png
149KB, 1083x698px
Hot fresh meme here guys.

I spent the last 2 hours on this instead of working or studying.
>>
>>60435744
Nah, if anything get just a general CS associates. That way you're more well rounded when it comes to programming. Webdev can be learned easily on your own, freecodecamp and youtube videos are great places to start.
>>
"result.forEach is not a function"

????????????
>>
>>60395387
I kinda know HTML, CSS, PHP, PostgreSQL, and I'm familiar with bootstrap. I haven't worked with javascript, but I know how to program in C++, C#, java etc. I say I kinda know because I have forgotten 90% of what I've learned, but I have the ability to look up what I need to know online.

Is this enough to market myself as a webdeveloper? Is it a mistake for me to look for free lance work? My only experience is school projects where I've touched on everything from front end to databases.
>>
>>60432158

Anything like this but more tutorially?
My current netcat and shell script combo can only get me so far.
>>
>>60437427
I've touched enterpris-y projects as a freelancer before. They go from simple cruds to on-premises cloud active directory logins.

I'd say that if you can do a crud, you already have a starting point where you can grow up on it, just make sure the projects aren't past your knowledge level.
>>
>>60437411
im guessing result is a dom collection and not an array. you'll have to iterate over it with a for loop.
>>
test
>>
File: wat.png (94KB, 647x737px) Image search: [Google]
wat.png
94KB, 647x737px
Ok, so I apparently can't post code because I get a connection error.
>>
>>60437427
Try going on upwork.com, see if you can take some of the relatively shittier, but smaller jobs. If you don't have the ability to the jobs, they were underpaying anyways, what did they really expect? Dump the account and move on. If you can do it, you get some work experience under your belt and you can delve into more interesting/well paying work.
>>
File: Tfw_fc708a_5656469.jpg (15KB, 540x395px) Image search: [Google]
Tfw_fc708a_5656469.jpg
15KB, 540x395px
>tfw active records
 public function convertGutterNameToId($gutterName){
$query = $this->db->get_where('subgutter', array('name' => $gutterName));
return $query->row()->id;
}
>>
File: wat.png (37KB, 1447x510px) Image search: [Google]
wat.png
37KB, 1447x510px
>>60437843
It's only recognizing the objects with the (3) to the left of it. It's not doing anything the other times.

Code related.

It won't go to the for loop unless I run type = top
>>
File: wat.png (78KB, 877x865px) Image search: [Google]
wat.png
78KB, 877x865px
The first one was type = top
All the other ones after that are type = random

Top works 100% of the time.
>>
>>60437908
>>60437873
>>60437843
nvm, the random array is returned with keys and the top array isn't.
>>
Hey /wdg/ I recently get proposed for a project that involves financial and auditable information, I do not have much experience but I worked with two other friends on a loans system made with angular, mysql, php... and the person in charge liked the system.
Now he want us to work in this project , but i don't know. I'm still a student yet however I can gain lots of money but I feel it is very big and I'm rather lost. Can /wdg/ give me some recommendation. I want to use Angular, Node/Express, Webpack, MongoDB, SASS, Babe, Total.js for the core functionality. I'm pretty new to this tecnology but the employer is willing to pay the education, I'm a smart guy and i have learned all by myself. But it's fucking stressful the nerves are consuming me. Hope you can give me some feedback.
>>
>>60400401
CORS is straight up the gayest shit in the history of the planet.
>>
>>60437873
You can do multiline strings and string concatenation easier like this

str = `
<div>
${someVar}
</div>
`;
>>
File: tool.png (33KB, 935x630px) Image search: [Google]
tool.png
33KB, 935x630px
Ok, launched a new tool after bitching about here for the past few days.

fundev.tv/gamevote

If you want to try voting, my vote link is:

http://fundev.tv/gamevote/vote.html?votelink=a64788122ff877ee8e8a3f05580a493d
>>
no bully over bootstrap homepage pls.
>>
Guys I just learned HTML today. When can I start my 120K job for google?
>>
>>60439571
Depends if you're a woman or not.
>>
>>60439571
When you cut off your dick and change your name to caitlynnn jennerberg
>>
>>60439588
>>60439595
I'm a female minority with diversity in my blood.
>>
What's the simplest thing I can do for frontend so I can forget about it and get back to backend stuff?
t. Solodev
>>
Any reason why this would work locally but not on my server?

$array = array_filter($finaljson, function ($key, $value) use ($ids) {
return in_array($value, array_keys($ids));
}, ARRAY_FILTER_USE_BOTH);

foreach ($array AS $item)
{
$seriouslythelastarray[] = $item;
}

if (count($seriouslythelastarray) > 10) {
$array = array_slice($seriouslythelastarray, 0, 10);
}
return json_encode($seriouslythelastarray, true);
>>
>>60440122
jquery or templates.
>>
>>60440136
was outdated version of php.

Updated and it works.

Thank god it didn't brick my droplet.
>>
>>60395387
>Associates in Comp Sci
>Know basic C/C++ and java syntax and implementation
>FCC's front end cert
>Plan on building stuff for my portfolio in the next couple months using variations of node, react, and PHP + SQL
>No dev job experience
>No internships
>Moving to Seattle at the end of the summer

With my background how long will it take for me to find work in a bigger city like Seattle? I've seen some people report 6 months to a year but I really hope it won't take me that long. Should I look into start ups if I want to find work faster?
>>
Been getting pretty decent at JS / jQuery. Still can't decide on what backend I should pick up, Python/Django or Node.js?
>>
>>60440553
php works so good with jquery.
>>
is play/spring good?
>>
File: fug.jpg (9KB, 211x246px) Image search: [Google]
fug.jpg
9KB, 211x246px
>>60436971
>>
>>60436971
try ritalin instead of adderall
>>
>>60440310
look into everything, mate. Once you have your CV and portfolio ready, spam it everywhere, startups and big companies. Also when you get to Seattle, start going to programmer meetups (find them on fb, meetup.com, anywhere) and network.
>>
Dudee php lmao
>>
>something doesn't work
>update php
>fixed it
>now something more important doesn't work

wtf

everything works locally.
>>
>>60441524
5.0 can't do a thing with arrays
5.6 can't contact amazon product search
7.0 seems to be able to do everything. Probably broke something else.

WEW
>>
my app is coming along alright, next I want to add persistent settings between site visits. I'm thinking cookies? this is going to be my first time using them, before doing any research I see it working 2 ways - 1. the user settings are stored in the cookie and the site checks the cookie for the settings on load, or 2. the cookie simply ID's the user and the server sends the settings once the cookie is read. Is either of these accurate? How should I be thinking about this? backend is node front end is react
>>
So, I'm Nooby McNoob when it comes to php.

And i just started form validation.
The pic related shows an issue that i am facing for half an hour now.

can anyone help me?
>>
>>60439595
>berg
every fucking time
>>
>>60420106
Learn and Understand Node.js
google it
>>
File: sasuke_deformed.jpg (36KB, 459x488px) Image search: [Google]
sasuke_deformed.jpg
36KB, 459x488px
Parent/child margin collapse occurs when a child's margin touches its parent's margin and collapses as a result.

I've read that specifying a border will stop this from happening. Padding definitely works.

However, my example in this jsfiddle pen doesn't stop collapsing if I specify a border-top on the parent to separate the child margin from the parent margin.

Is this just some weird quirk of jsfiddle?

https://jsfiddle.net/g5npzm3n/
>>
>>60442799
Remove the inline PHP for a minute. Does it still do the same thing?
>>
>>60442799
the file also has to be .php and you need to run it through a php server such as using the command php -S localhost:8000


But your issue has to do with extra space around action and using the same double quotation " mark twice in the same action field. You need to use something like

action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>"

notice the single quotes ' used inside double quotes "

additionally you probably want to be using htmlentities instead in this case
>>
Is there anyone in this general who currently works in web development from a self - taught background who wouldn't mind explaining how they ended up where they are today? Like what you learned and how you landed your first job?

I'm picking up webdev but I'm worried I'm not gonna be able to go anywhere with it.
>>
>>60443919
no.
the problem crops up when i put in the <? php ?> code in the action quotes.

>>60444004
>the file also has to be .php
yes, i changed that. [sucks being a noob]

>run it through a php server
i have wamp installed and it is running.

>notice the single quotes ' used inside double quotes "
now i do, thanks.

of course, it still doesn't work.

google ain't being too helpful either.
maybe someday i'll get a hold of a basic php form and get on with the next topic.

i'm gonna go to bed now.
thanks for the replies.
>>
i know this question is too broad and you will probably either ignore me or call me a faggot but can someone point me to a guide on how to give my web app a user area, and login/register features?
>>
>>60440630
play requires you to learn a bit of haskell. spring is not hard to use but impossible to understand. i looked into vaadin and spark too and they were fine, spark is probably the most simple and lightweight. im doing a project and will probably use spring though
>>
>>60444283
I taught myself webdev and currently work in a job as a full-stack dev which is a buzzword for a jack-off-all-trades. Once you have a solid programming background, webdev is piss easy.

Learn the basics, create something useless to practice, learn commonly used frameworks and libraries, then build a portfolio to showcase your skills.
>>
>>60444602
so what lang are you using? Use OAuth or a similar library, it comes with user class already built in
>>
>>60444602
def register(request):
registered = False

if request.method == 'POST':
user_form = UserForm(data=request.POST)
profile_form = UserProfileForm(data=request.POST)

if user_form.is_valid() and profile_form.is_valid():
user = user_form.save()

user.set_password(user.password)
user.save()

profile = profile_form.save(commit=False)
profile.user = user
if 'picture' in request.FILES:
profile.picture = request.FILES['picture']

profile.save()

registered = True
else:
print(user_form.errors, profile_form.errors)
else:
user_form = UserForm()
profile_form = UserProfileForm()

return render(request, 'rango/register.html', {'user_form': user_form, 'profile_form': profile_form, 'registered': registered})

class UserProfile(models.Model):
user = models.OneToOneField(User)

website = models.URLField(blank=True)
picture = models.ImageField(upload_to='profile_images', blank=True)

def __str__(self):
return self.user.username

faggot
>>
>>60445092
java. i'm currently trying spring security and i think it will work but i don't understand very well what i'm doing, that's why i asked so generally
>>
File: images.jpg (511KB, 2100x2756px) Image search: [Google]
images.jpg
511KB, 2100x2756px
>>60445261
this book is a general intro to OAuth, if I remember correctly it was language-universal. I think all auth models today follow the general oauth standard, so read this and then you'll be able to use oauth or code up your own library.
Free on libgen
>>
>>60444847
Regarding portfolio, would you just decide to make some sort of program or is there maybe somewhere where people have ideas they wanna see brought to life that you can contribute to?
>>
>>60445316
thanks for your interest
>>
>>60445447
your portfolio doesn't have to be original, it just has to show you can get the work done. When a company hires you as a junior, they don't hire you for your brilliant ideas and creative intuition, they hire you because you can code up shit than works.

That's why all portfolios will look the same: a reddit clone, a blog manager, an instant messaging app, etc. You could try cloning youtube, spotify, whatever, your employer just wants to see how well your shit runs, they don't want you to come up with the new app that will revolutionize the world.
>>
>>60445532
Okay, that's reassuring. I'm sure I can always come up with something relating to a game I enjoy or just try my hand at cloning something like you said.

How long had you been at it before you got your first job, and what do you think really sold it when interviewing/applying?
>>
Someone in my I work with got a domain for our company, but didn't put anything on there till the new site was made. This was 5 months ago, will this have negative effects on Seo because of inactivity on the domain?
>>
>have an affiliate website, brand new
>for some reason the affiliate says I send through dozens of visitors a day
>my new website doesn't even get so many visitors according to my google analytics
I dont get it. Are these all bots?

The links are nofollow and excluded in robots.txt so they shouldn't visit it. I even have honeypots to ban bots that click on all links. So i find this highly strange.
>>
>>60446003
No. Domain age is beneficial. Regardless if you use it.

But having a basic frontpage and a link towards your site would have been more beneficial.
>>
Is AJAX still the standard? or is there some other memey shit in now?
>>
>>60446044
is there anyway to get a free webpage?
but not like
>mymemepage.wordpress.com
or
>mymemepage.blogspot.com

but something like
>mymemepage.com,
but free and with complete freedom to design it as i wish?
>>
>>60446638
Github pages + a domain name. only for static files though.
>>
>>60446673
>only for static files tho

static means I can't have a database and fetch different types of data to display on a page, right? That would be dynamic, I guess?
>>
>>60446638
Some domain registrars like Gandi allow you to create your own website using their very simple website builder and host that.
>>
Why does my symfony project work fine if I run it from console, but doesn't work at all if I run it with php and nginx enabled?
I change literally nothing when switching.
>>
>>60446702
yeah, just html files.
>>
>>60446752
But in that case you have no freedom in design. Just some ugly templates.
>>
document.getElementById("hit").onclick = "hit()";

is this not how you assign an onclick through js? whenever i try to do it like this, the button completely breaks for some reason
also, is there a resource you can recommend me for js? i'd hate to have ask questions here every time i run into a problem i cant get google to solve
>>
>>60446462
standard for what?
>>
>>60446891
Communicating with the server after the page has loaded.
>>
>>60395387
>discord
Trashed.
>>
>>60446847
document.getElementById("hit").onclick = hit;


the problem is not google but you not using it correctly. there's a good answer in the first link when you enter "assign onclick javascript".

>>60446901
depends on the use case. you can use either ajax or websockets
>>
>>60446947
thanks anon
>the problem is not google but you not using it correctly.
yeah that's what i meant by "a problem i cant get to google to solve". of course google has the answer
>>
>>60446638
Specifically for a free domain name, look into freenom.com. They have free domains for certain TLDs like .tk, .ml, etc.

You can use github pages for free hosting, as another reply mentioned. There are a decent amount of places that will host things for free, but most don't allow you to use your own domain.
>>
>>60446755
Please respond
>>
>>60447036
you are a god among men.
thanks a lot.

i'd get you a beer or 2 if i knew who you were irl.
>>
>>60447460
>i'd get you a beer or 2 if i knew who you were irl.

you're just trying to score some sweet boipucci, aren't you?
>>
>>60398179
Mongodb, CouchDB.
>>
>>60447502
haha, not at all good sir. #nohomo
but if you swing for the other team then good luck. i wish for all the niceties to you. cheers!

i'm >>60442799 , a classic noob to web development, and thought there's no point in wasting money before knowing that I know what i'm doing.
so now you have me on my way, and we'll see if i do get a website up and running soon. otherwise, $0.00 gone to the bin, lol.

Finally, If I may request one last favor - is there a "website designing for dummies" kinda thing?
or are w3schools.com type tutorial websites my best bets?
>>
>>60447752
>website designing for dummies
Do you mean like learning HTML and CSS? Or like actual design principles/making your site look nice?
>>
File: 1493171264832.png (28KB, 562x508px) Image search: [Google]
1493171264832.png
28KB, 562x508px
I'm totally new to web dev so I've gone ahead and downloaded some site templates to try and understand how shit works
in the .css of one of the templates there's all these containers but some of them are different and have syntax errors
what's going on? is the template messed up or is this something i'm not getting?
>>
>>60448150
http://stackoverflow.com/questions/27882839/what-does-container-31-25-25-mean-in-css

I actually didn't know about this
>>
>>60447290
Please look into error log.
>>
I'm just learning about handling cookies and stuff, pretty cool shit. This is from a book:

>You must first perform a check to see if the cookie you want exists. Checking the request parameter parameter will allow you to do this. The request.COOKIES.has_key('<cookie_name>') function returns a boolean value indicating whether a cookie <cookie_name> exists on the client’s computer or not.

>If the cookie exists, you can then retrieve its value - again via the request parameter - with request.COOKIES[]. The COOKIES attribute is exposed as a dictionary, so pass the name of the
cookie you wish to retrieve as a string between the square brackets. Remember, cookies are all returned as strings, regardless of what they contain.

So this is why cookies are so dangerous, it's nice to finally understand the underlying mechanism. So are there any cool cookie exploits you guys know? Any cool info I could steal from my visitors' cookies? Looking for ideas/suggestions, just for fun's sake.
>>
>>60449599
also, does this mean I can set up a website which reads all the cookies my visitors have, even from other websites? So this is how those pesky ads follow you around, huh? You look for dragon dildos on amazon, and then every other site you visit is trying to sell you dragon dildos, right?
>>
>>60449859
cookies are per domain, you can't read cookies from other sites.
those ad trackers work by embedding some 3rd party domain and setting cookies there, like the facebook like buttons which get loaded from facebook directly to set their cookies on the facebook domain.
that's why you should always have "accept 3rd party cookies" disabled.
>>
>>60448272
Not that guy, but what is the point of this? Just a complicated hack with class names so that you can write "100%" as CSS class in your HTML?
>>
>>60449950
ah, cool, thanks for the clarification
>>
>>60450080
I have no clue. It's fucking retarded
>>
>Hey anon help me make a site
>Okay sure
>A few days of wordpressing away later
>Okay now I want it to have a different site show up depending on if you're a user or not with the ability to see different things
>Okay sure
>I did some reading and know nothing about this so set up a multisite network
>Okay sure
>Anon the multisite network isn't working look into it
>Okay sure
>While we're at it I want you to make this other site that has nothing to do with the site I asked you to do originally

Just fucking kill me. How do you people put up with this shit
>>
>>60451727
are you freelancing? You forgot to add the magic words...

>Okay sure. That'll be $100 extra
>>
>>60451796
I fucking wish. Its family. Never mind the fact that everything he wants could be done on a single site without the convoluted bullshit if he just made different pages and plugins but he insists on doing everything the wrong way and won't have it any different

./blog i'm gonna go have a fucking aneurysm
>>
>>60451836
If it's family it should be even easier to say that you won't do it. Or it's bullshit. Or think some excuse like it's impossible.
>>
>>60451836
if you are the programer you decide the implementation details. learn to say no and trust your expertise
>>
>>60451836
I'm making a site for a family member for free and will not do any extra work on it for free.

"Ok, so I made you a 2500 website for free, if you want more work then you're going to have to pay me x amount per hour, or pay someone else 2x an hour."
>>
File: 1490847850927.jpg (11KB, 225x225px) Image search: [Google]
1490847850927.jpg
11KB, 225x225px
How do I run and test a PHP file locally? I'm on Debian and I've installed the PHP package along with its dependencies but now I'm lost.
>>
>>60419282
it should be ".shit1" and ".shit2" you forgot the periods
>>
Any good javascript tools for adding buttons to existing sites?
I want to add a button to the youtube player with a userscript.


A popup interface like the facebook messager would work too.
>>
>seeking mod approval to post website on subreddit
>takes days

It's amazing how powerful reddit is. Before I posted there I was getting maybe 20 views a week. Afterwards? 4k unique hits a week.

My previous biggest site has been going for 3 years and only gets 2k unique hits a week.
>>
>>60455999
post website here you faggot, or at least tell us what it is.
>>
>>60456762
I can't link you without making a blog post about it.

Fundev.tv, the shitty bootstrap site.

Most people use the timer.

I just finished making a game voting app (after bitching about how hard it was here for 2 days straight) where each follower/subscriber can vote on games for their streamer to play. The streamer can select the top 10 voted games or 10 random games. The games are listed with the title as Amazon affiliate links...that part took several hours. I put the Amazon affiliate link maker on github because the Amazon documentation is wrong twice and there were no working examples anywhere for v4.

Once I get around to designing and making a few more tools I'm going to apply at Twitch. Dream job, man.
>>
Also got trip 9s twice in a row.
>>
>>60456999
>I'm going to apply at Twitch

best of luck, dude. Please keep us posted. Also, you've been programming for a while, right? How long?
>>
>>60455999
>>60456999
double trips, you are soooo gonna get that jo-

>>60457013
nevermind, you'll remain neet like the rest of us and never leave this place. Also, fuck you
>>
>>60399744
until you have ~1 billion records, it does not matter, pick what you already know. if not pick an "easy" one like mongodb
>>
>>60457062
Since 5th grade. I didn't get serious until about 4 months ago though. Thanks for the luck; Twitch has amazing devs so I definitely need it.

>>60457092
I will never leave this place.
>>
File: moonLandingArgument.png (16KB, 646x253px) Image search: [Google]
moonLandingArgument.png
16KB, 646x253px
who else asp.net here
>>
>>60418444
>What are style sheet design studios
not gonna make it. heres your (you) https://marvelapp.com/
>>
>>60447838
w3shools is good for learning basics of html and css.
but i've gone through them already, and now i was studying php.

>website designing for dummies
After so many hours of googling i've realized that what i'm actually looking for is a template.
So, I've been googling them for a few hours. I've liked a few, but not enough to stop looking further. i think i'l stumble upon something worth keeping in a few.

I also realize that maybe i should just start with Dreamweaver and Photoshop already.
>>
>>60395387
How am I supposed to learn web dev when there is like 200 frameworks to learn to even get started?

Holy fuck. Shit changes every week and I just can't even tell what people are talking about when I try to learn..
>>
>>60455738
I think you need a "user script" for this. Look up Greasemonkey.
>>
>>60459456
my reading comprehension is 0/10. Well... what tool are you trying to add with your button?
>>
As a programmer, the web dev agencies do not expect you to know about design, right? RIGHT?

I suck at design and do not give a shit about it.
>>
>>60446847
document.getElementById('hit').addEventListener('click', function() {
hit();
}


I think what you are thinking about is the onclick attribute for HTML which could similarly work like:

<div id='hit' onclick='hit()'>
<script>
function hit() {
//...
}
</script>


Though, I think the top is neater.

>>60459672

Design helps regardless, but I could see if you are backend it wouldn't matter too much (it would just be one of those things that are good to have in your back pocket). If you are front-end/fullstack you should have good design skills.
>>
File: 1493651081823.jpg (865KB, 4320x2560px) Image search: [Google]
1493651081823.jpg
865KB, 4320x2560px
Some people might remember I posted a Pictionary-style drawing/guessing game a while back that was pretty rough.
Well now it has it's own domain and everything and I've spent lots of time attempting to polish it (still doesn't work properly on iOS ay), you guys should check it out and let me know what you think. Got lots of changes planned.

https://www.drawasaurus.org/
>>
>>60453814
XAMPP
>>
daily reminder that web development is a meme
>>
>>60459672
In a lot of those places you are expected to do work on front too. If you are lucky it only means making existing html work with backend.
>>
Are there any shortcuts to get a little bit less retarded in design? Acquire a taste, idk. Everything I do looks like crap
>>
any cool python web hacking books you guys can recommend? Like ethical hacking, penetration testing, that kind of stuff
>>
>>60459465
A callback to a function I've written. But really that shouldn't matter.


I've already made a bookmarklet, and a keyboard shortcut to activate it.
What it does is send an AJAX request to my home server, which causes the url specified in the GET to play on my home theatre.
>>
File: ss-2017-05-18-14-29-41.png (24KB, 435x210px) Image search: [Google]
ss-2017-05-18-14-29-41.png
24KB, 435x210px
>>60461388
>>
can someone shill my gay site for me? i want to shill it but i don't want to be seen shilling it
>>
>>60460311
>https://www.drawasaurus.org/
oh hey, it's inkling or inklink or whatever.

I used to love that game.

Post this on reddit for so much traffic your servers crash. Maybe in /r/Internetisbeautiful or something
>>
>>60462821
That's...not how it works.

Post it.
>>
>>60419282
classes in CSS start with a .
eg
section {}
.shit1 {}
.shit2 {}
>>
>>60463188
I know..that wasnt a real example. No one would name classes shit1 and shit2
>>
>>60460311
small criticism, I played it for a bit and some of the things we had to draw were really dull... journal, ghost, boring shit like that. Are you the one coming up with categories or is it the users? Because you should put some work into that, make it more interesting.
>>
>>60463502
I would let users submit drawing ideas, then the admin just hoes through the list and hits accept on the good ones
>>
>>60463611
but do you build up one single database with all ideas, or are these generated per session or something like that? Because either way, you should make sure to add a few good ideas, users can be dumb and uncreative. Again, where's the fun in drawing 'journal'?
>>
>>60463874
A db with column id, draw, approved.

Approved default 0.
The idea goes into draw.

If approved 0 then that shows up to admin in his panel. If 1 then it gets loaded into whereever his vote array is.
>>
>>60463450
You would be surprised.
>>
File: chart.jpg (1MB, 3828x4478px) Image search: [Google]
chart.jpg
1MB, 3828x4478px
I made this: http://www.qtchart.com
It generates pic relateds. You can also save your chart as a page and link to it/edit it later, if you wish.
Example profile: http://www.qtchart.com/?user=ExampleChart
There are a few known cosmetic and usability issues. The biggest ones are probably the small text boxes for bullet list bullets, and the account administration buttons at the top being hidden on small screens.
>>
>>60440553
I feel like node is a safer bet for someone starting out, you get to keep practicing your javascript and there are a lot more jobs in it
>>
>>60458448
Start with the most basic stuff, just html, css, and javascript with no frameworks or anything. I tend to avoid libraries for the most part.

Once you get to larger scale projects, maybe consider using one framework like React or Angular or maybe Vue on the frontend. Mostly though you can and should get by loading as little extra javascript as you can.

Some tools are exclusively on the backend, like grunt or gulp for automating your build process or babel for translating new javascript features into more widely compatible ones. And there are languages that compile to javascript, like coffeescript and typescript.

All of this stuff is optional though, so you can add in one new thing at a time, as you feel it's needed. Remember, you can do anything without using any libraries at all.
>>
>>60463502
Yeah my bad, it's hard to come up with a huge amount of random words so ones that aren't great to draw end up making it in to fill space. I'll cut it back and focus on quality over quantity.
>>
>>60464835
Let users suggest them.

Also figure a method of monetization. This site could do pretty well.
>>
>>60465073
It has ads :)
>>
>>60464746
as a programming project, pretty cool. The only thing is it won't let you save/download unless you've filled in EVERY fucking field, which is annoying as hell. You should make it so that it allows you to leave emtpy fields, fuck it.

As an actual app, you know the use or effectivity of those things is very limited, right? Except for the physical aspect (and even then, it rarely works...), all the other matching items are bullshit. We don't really know what we are attracted to, so all those compatibility tests are shit.

The people at OKCupid have said that their matching algorithm is just a number that doesn't correlate at all to what happens when people meet.

Psychologists have determined that one of the strongest predictors for whether a marriage/couple will last more than 7 years is whether they have the same sleeping schedules (that is, they both like to go to sleep at around the same time). That's it, that's the most reliable indicator. Maybe you should include that on your list.
>>
>>60465073
>Also figure a method of monetizatio

every time you guess wrong you have to pay $1 or your mother will die in your sleep if you don't reply to this post :^)
>>
>>60465289
kek'd and fuck you
>>
File: 1493214407316.jpg (97KB, 768x1024px) Image search: [Google]
1493214407316.jpg
97KB, 768x1024px
>>60464746
Neato senpai

How may hits are you getting / what are you hosting it on?
>>
>>60427860

Holy fucking lol
>>
>>60465270
>The only thing is it won't let you save/download unless you've filled in EVERY fucking field, which is annoying as hell. You should make it so that it allows you to leave emtpy fields, fuck it.
I got this feedback when I showed it to a friend a while back, so I'll probably do this. It's an easy fix on the frontend, and it should be an easy fix on the image-generation backend.

>>60465545
>How may hits are you getting
I haven't gotten many hits since this I hadn't told anyone about it yet. A couple people managed to find it and make charts a week or two ago (somehow).

>what are you hosting it on?
Frontend is hosted on GitHub Pages, backend is hosted on PythonAnywhere. Didn't bother with Heroku since I didn't want to deal with the hassle of remote file storage for the generated charts (I cache them so they don't have to be re-generated if the information hasn't changed).

Will reply to any more questions or feedback once the new thread is up.
Thread posts: 315
Thread images: 36


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