[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: 214
Thread images: 19

File: 1490778753512.png (874KB, 824x553px) Image search: [Google]
1490778753512.png
874KB, 824x553px
>Previous
>>59769967

>Discord
https://discord.gg/wdg

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

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

>Useful Youtube channels
derekbanas
thenewboston
learncodeacademy
funfunfunction
computerphile
codingrainbow

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

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

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

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

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

>cheap vps hosting in most western locations
https://lowendbox.com
https://www.digitalocean.com/
https://www.linode.com/
https://www.heroku.com/
https://www.leaseweb.com
>>
xth for making your work easy to maintain because you aren't a cunt to your future self
>>
File: s.jpg (81KB, 1280x720px) Image search: [Google]
s.jpg
81KB, 1280x720px
What's the best webhosting service, and how do I insert my html once I buy it?
>>
The ads are jlist ads. How is that malware? Thats 4chans ad people.
>>
>>59801744
post moar downblouse and i'll tell u
>>
>>59801753
Hit me up senpai
>>
>>59801867
if it's HTML then the cheapest service, and the administration panel that they give you when you register for the service has a "Files" option that you click and you see an upload button, replace index.html to replace the homepage
You gave me a raging hardon btw thnx
>>
File: reports.png (49KB, 1920x525px) Image search: [Google]
reports.png
49KB, 1920x525px
Too many information in the table or exactly the right amount to not be bloated?
>>
Is django ded?
>>
>>59801709
Hey anonbro at >>59798141 , thanks for volunteering to help me even though you just published today.
>>
>>59801897
Thanks, You're a freak bruv
>>
>>59801981
4u
>>
>>59801897
You know a good hosting site too?
>>
>>59802036
siteground
>>
Hey, what's a good way character to use for string explosion?
>>
>>59801744
>>59802036
Just use Github pages for static sites. It's free, and you can link it with a custom domain without paying extra when it comes to that. Probably the fastest when it comes to deploying updates, too.
>>
>>59802547
Jekyll is also generally enjoyable tbqhwyf
>>
Why do I have to each through json with only one row?
>>
>>59801975
Is the anonbro still around?
I know you just launched something and I don't want to siphon your focus.
>>
Too lazy to create a whole web page by myself, where are some good bootstrap/html5 templates I can download?
>>
>>59804329
You still need an answer for this?
>>
>>59804265
https://github.com/anon2112/CollegeWork.git
>>
Which JS framework?
>>
C# DotNetCore 1.1.1 + VS2017 + REACTJS.Core

Is the true pure bliss of webdev.
>>
>>59804755
>C#

w r o n g
>>
>>59804265
I'm here dude. Do you know how to git yet? It's important that your changes make it to the repository so we don't have any merge conflicts.
>>
>>59804843
Yeah, you edit it on GitHub and commit right?

Everything on my repository is the most current build.
>>
>>59804882
You can, git is made for people to work on it locally and commit it to the repository. That way you can use your preferred ide etc. Like I have your repository pulled local and can test before sending it to the repository.
>>
Also I'm confused on the alien size thing. Can you do that one or explain it better?
>>
>>59804952
Sweet - GitHub is great it just took time to wrap my head around it with all the tutorials telling me to use a command line when all I needed was to drag and drop.
>>
>>59805005
Yes, sure.
You can see I have var SIZE set to 100.
Instead of using hard coding for the dimensions of the canvas I just have it set to multiples of SIZE. Something I was working on is how COLS is initialized to 7 and ROWS to 6 the canvas.height is SIZE * ROWS while canvas.width is set to SIZE * COLS.

Setting the dimensions of the canvas (intuitively named canvas in js as well as html) to 600 * 700.

I believe I switched the dimensions up however because my goal is 700 height and 600 width.
>>
>>59805044
If you're wondering about the dimensions of the alien image (line 21 & 22) it's meant to be 100 x 100, the dimensions of one square on the 2d array.
(The array is 6 * 7, making it 600 * 700 px, or COLS * SIZE by ROWS * SIZE.)
>>
>>59804465
Ng
>>
>>59805094
Ah fuck, just resized alien.png under the img folder to be the correct dimensions of 100x100.
>>
>>59804465
I'm putting the finishing touches on the first release of a React project. Highly recommended if your design is heavily modular (commenting systems, survey forms etc.) Don't know how easy it is to use it with a local back-end library/framework, though.
>>
I recently started a new project which consists of multiple services. One web service on www.foo.com, and an API service on api.foo.com
Is there a standard way to set this up for localhost such get I can still share cookies across these origins? Or will I have to also now install some kind of reverse proxy locally?
In addition what is the common pattern for developing services that require HTTPS locally? Self signed certs? Is there a way to trust a self signed cert across the entirety of my system?
This is the direction I'm heading in. If there's an easier way, especially sharing all of this configuration with other people on the project, I would be really appreciative to hear it.
I also thought about using a docker container, but I wasn't sure if I could link a local directory (like a symlink) into the docker container somehow.
>>
>>59805005
Also, the Alien is just meant to move left until it reaches the edge of the canvas then move right, ad infinitum.
The starting point has to be within the top three rows of the array.
>>
Dude, your game isn't even halfway working. I just cloned and shit is falling at mach 10 then disappearing with the html 5 logo.
>>
>>59805325
Just run a VM with your API service and set its port to 8080. It's just like a second server than.
>>
Dude, just ran what you have, what the fuck? There isn't even the base of a game here. There is literally nothing. How am I supposed to do anything here? I would have to rewrite everything from scratch. You understand where you're at with what you want that you're at least a week behind, right? What are you alternative? Let's do an alternative. I'm a fucking JS god with games that have over 400k lines of code and I can't get this shit done in a day. Come up with something.
>>
>>59805638
>>59805704
Nah sorry my dude it has no alternative. Just wanted to say thanks for even giving it a look that's more than I was expecting.

Thanks - I know it's not playable right now but it's just what I've got working right now.

I'm a first semester rookie and it's what my level is at.
>>
File: 1478510295129.jpg (1MB, 800x2798px) Image search: [Google]
1478510295129.jpg
1MB, 800x2798px
Give me the requirements and I'll start a repository.

There's the following image that I was thinking about making a game from. You just go and collect the queen then take her back.
>>
>>59805745
Pardon?
>>
>>59805732
You're going to make me from scratch this shit. Jesus christ, tell me everything it needs to do. Explain the game, not the coding. Tell me exactly what each thing does and how you are supposed to play. It looks like some ghetto space invaders.

If you want to pass, give me the exact requirements of the project.
>>
>>59805763
Here's a pastebin of literally the assignment in total https://pastebin.com/sCEtMugZ

>space game
>meteors to be avoided
>an alien to shoot that respawns when shot and adds to a score counter
>You're a spaceship with a laser

Basically what it boils down to.

>ghetto space invaders
You're not wrong.
>>
>>59805800
>due april 8th
>>
>>59805800
The due date is wrong it was set at the beginning of the semester and is not what it is now.
>>
>>59805665
Well unfortunately it's not that simple, because I need to share cookies across the web service and the API service. If they are on different ports then they are different origins and cannot share cookies.
>>
>>59805813
Why the fuck did you not come here earlier? These requirements...I would charge at a...lot
What is this for? How important is this? These requirements I would charge at a minimum 20 grand. Who the fuck is telling you to do this and why?
>>
>>59805880
A professor for the last assignment of a first semester class lmao
I know right? I was just as frustrated with even trying to understand everything I was supposed to add.
The professor goes from telling use how to make a 2d array to slapping this on us and gives us like a week-ish to work on it.
>>
>>59801709
So i've been using the Samsung Health App to track my exercise. I don't really have to do anything, it just automatically detects when I start and stop walking. I don't have to press any buttons or anything. I just leave my phone in my pocket, and it'll automatically kick itself on and off. I guess it just monitors my position 24/7 or something. Hooray total surveillance.

Anyway.

If they're going to collect all this data on me, then I want a copy. So I looked into it, and apparently you can export the data. http://developer.samsung.com/health# There's a link to a SDK, and there's a pdf detailing everything and the tool is in there too.

So I grabbed the data and used angular to parse, process, and display it.

So that's my blog entry for the day, what have you guys been up to?
>>
>>59806015
Being an idiotic 1st semester rookie trying to save his mark by coming to 4chan lmao
>>
>>59806025
What do you mean by "save his mark"? I'm not familiar with this phrase.
>>
>>59806025
Be nice. He's just sharing something cool that he is excited about.
>>
>>59805899
Write exactly what everything is supposed to do.
>>
>>59805325
Use docker, easy
>>
>>59806078
Any thoughts on symlinking a directory on the host into the container?

For example, I have some other team members who are more learned on their particular parts of the stack, and I want them to be able to change their code and see it reflected, but everything else should just work behind the scenes within the container (other services, databases, etc).

I have used docker before in the simplest use-case only. I have some very basic knowledge about it how it works under the hood using network namespaces, etc. I am not aware of all of the tools though (swarm, etc) so anything that could point me in the right direction of solving this problem would be appreciated.
>>
>>59806124
you can map host directories to containers using volumes. `docker run -v host/path:container/path myImage`

for multiple services use docker-compose. It automates all the command line stuff in favor of a config file.
>>
>>59806042
Aaaaaaaa no no no I meant me.

>>59806049
Okay.

Canvas -> height 700px, width 600px

Array -> height 7, width 6, each index being 100x100px.

(Every image in that img folder you saw is 100x100px because of this)

Player image is drawn at the bottom of the screen, and is moveable with keydown arrow keys.

Alien is drawn randomly either on index 0, 1, or 2 of the array's rows.

The alien moves left and right, detecting whether it has touched either side of the canvas and moving the other way.

The meteors are generated in around 20% of the top row of the array's indices.

The meteors then move down towards the player character by making a new row and popping the old one.

Then there needs to be collision detection between the player and the meteors, so that it's game over if you collide with any of them.

Then there's the laser that shoots upwards from where the player character is to the top of the canvas, resetting when it either hits the top of the canvas or hits the alien.

The alien disappears when collision is detected between it and the laser, and a point is added to a paragraph below the canvas.

And that's everything!
>>
>>59806158
>>59806049

It's literally ghetto space invaders you could not be more correct.
>>
>>59806156
Thanks much! I will take a look into volumes.
>>
>>59806124
if you want to test it, do `docker run --rm -v $(pwd):/src -w /src ubuntu echo test > test.txt`

will print "test" to a new file in the current directory via a container.
>>
I'm confused on how to structure a javascript library. Everyone seems to have a different way of doing things. Right now I just have my js files and concat them. This means I can call them like this
var thing = new myThing();

But I've been thinking maybe i should put everything into a single variable?
var thing = Library.myThing();

What's the best way to do this? I'm using node with grunt to concat the files but I don't want to have any node specific code in my files if possible, or is that a stupid thing to want?

I'm not really sure what I'm asking.
>>
>>59806249
Ideally you'd be using modules. Doing it the old way, make a global object attached to the window. Then use it with window.myLib
>>
I'm having issues with the piece of shit known as chrome. In firefox, my website renders perfectly. In pic related you'll see how the columns match the content size. This is achieved by a simple height: 100% on a mdl cell, inside of a mdl grid which I'm using for the layout.
When chrome views my website it acts like an autist and treats the 100% as the distance from my header to the bottom of the page making both columns look extremely ugly as they stretch forever down of plain light gray.
Is there a simply way to get chrome to work?
>>
>>59806249
Seems like you're working with 4-5 years old tech if you're using grunt. Might I suggest taking a look at rollup, or babel as opposed to Grunt?

As #309 says, you should be using modules.
>>
>>59806158
>>59806049
Going to catch much needed shuteye as I wake up early tomorrow for a commitment.

Again, thank you very much for the consideration and actually looking into a newbie's assignment.
>>
>>59806309
>>59806385
I didn't want to use modules because it directly ties the source code to node but I guess everyone uses it for development nowadays anyway.


I've been looking all today for alternatives and modern approaches which is why I posted here. I saw so many different ones though that I have no idea which to go with.
>>
>>59806453
> it directly ties the source code to node

Huh? No it doesn't. Ultimately your code is transpiled into an es5 compatible bundle. This is why you use something like babel or rollup.
>>
>>59804755
>C# DotNetCore 1.1.1 + VS2017 + REACTJS.Core

How is VS2017? I'm still on VS2015, afraid to make the jump cause first releases are always super buggy. Would like to hear your opinion...

Have you guys heard of Mastodon, the new twitter?

http://www.telegraph.co.uk/technology/2017/04/05/mastodon-new-social-network-vying-next-twitter/

They're open source, so if anybody's looking for small projects to help out with, check out their github:

https://github.com/tootsuite/mastodon
>>
>>59806506
Yeah I guess. If you view the actual source files though it will be "invalid" javascript though with the modules and exports.

I've seen a lot of webpack. Is there a difference between it and rollup? What's the Industry Standardâ„¢?
>>
>>59806570
> If you view the actual source files though it will be "invalid" javascript though with the modules and exports.

Uh, no. It won't. You have a fundamental misunderstanding about the purpose of transpilation it seems. :)

The modules, exports, requires, will be replaced with functions and function calls in the compiled source.
>>
>>59806601
The compiled source file is for browsers, not people. If someone wants to view a file that will be transpiled it will be invalid javascript.

Nobody wants to view a single massive javascript file when reading source on a module or function within it.
>>
>>59806567
>How is VS2017
I've been using community RC at work, have to update it still but so far i kinda love it a lot, the few bugs I've got were only related to extensions so far and the installer went smooth, unlike in vs2015.

I love the Run to Click debugger too, just set up a breakpoint and on each line on hover gives the option to jump to that point.
>>
>>59806630
You're right about that, but in the same way who digs through compiled binaries to inspect C program behavior? That's what the source is for.

You can use sourcemaps if you need to debug in the browser, but otherwise why does it matter?

I've never really heard a solid argument against this to be honest. It is probably why you will find transpilation used at virtually ever large organization, and every meaningful js project within the last 5 years.
>>
>>59806716
The reason everyone uses transpilation is because no one wants to write javascript code.
>>
>>59806738
No one wants to be held back to IE8-era javascript standards you mean? Yes you're right. Modern javascript is quite eloquent, so I think most professional JavaScript developers are happy to write this. You will find ES6 vastly outnumbers projects written in CoffeeScript, TypeScript, etc.
>>
>>59806738
It is to support older browsers and be able to use new features before they get support. Like es modules, they haven't actually been implemented (hung up on implementation decisions) but we can use them and transpile via Babel.
>>
Has anyone ever made a thorough write-up of developing imageboard software? They aren't particularly complex applications, but given they have been around for decades now you'd think there'd be more information out there about what needs to be taken into consideration when writing one. I'm sure the developers of 4chan have hit countless snags and gotchas over the years - it would be nice to know about them in advance so I don't make the same mistakes.
>>
>>59806876
File size cap, sanitize user input (text and file names), captcha, request throttling, DB authentication enabled with secure credentials are a few good things to think about.
>>
File: 1483451600214.png (57KB, 671x588px) Image search: [Google]
1483451600214.png
57KB, 671x588px
Guys, newfa/g/ here. Having some questions concerning Java Web and its shits.
- What is the absolute bestest Java Web Framework for my shitty monkey managing project that require zero-to-none appearance (CSS and similar shits)?
- Worst case: I decided that I'm too much of a brainlet to learn the shit and write everything in <% %> of jsp... What should be the problem with it?
>>
>>59806876
Apart from upload size limits and obviously turning special characters like ' into entities (othewise enjoy your sql) injection there are no special considerations to look out for
Any other shit will only become a problem when you are running a huge service like 4chins where you won't be able to use normal commerical hosts because the traffic, cpu time and hdd space required would be too large, so you would have to make your own server or rent one and put it on a server farm much like 4 chins is but that costs loads of moni which you don't have, not that you need to care about that since you will never get that big, in fact i can tell you with 99.9% certainty that nobody will use your service apart from you and porn crawl bots that will upload their ad pics
>>
>>59806876
There is nothing really that special about it. If you have experience building web applications then it should be pretty straightforward.

Not to say it's easy, or quick to build, but just to say that it's relatively simple and the problems have all already been solved.
>>
>>59806881
Thanks anon, this is a good start.

>>59806940
Thanks anon, but I only have a small userbase (~250 active users) and the subject matter is fairly niche so I'm not too concerned about making it scalable.

>>59807076
Thanks anon, I'm aware that the problems have all already been solved, but I don't particularly want to go trawling through source code to find the solutions. It's not the end of the world if that's the only way forward but it's still inconvenient which is why I am asking if anyone knows of a write up instead.
>>
>>59807160
>niche
cp isn't niché, it's widely spread, also don't forget to use tor to hide your server
>>
>>59806365
Google normalize.css it will probably help you!
>>
>>59806365
Ah yes, one of the reasons why i left the web dev and switched to app dev, god browser optimiziation was a fucking nightmare
And you are fucking baby mode too, just try to optimize a website for IE6 which i had to do... holy crap.
>>
I'd like to write a simple website to host on my nas which simply indexes files and makes the searchable in real time, e.g. like xdcc bot lists:
https://gin.sadaharu.eu/xdcc-single/Ginpachi-Sensei

Do templates for this exist? And if they don't, can you point me in the right direction for some resources? No PHP preferred.
>>
File: hospital.jpg (165KB, 802x600px) Image search: [Google]
hospital.jpg
165KB, 802x600px
QUESTION!

I'm developing on a lampstack on my localhost.

I finally finished up - now I need to upload my work.

I got a LAMP droplet on digital ocean ------- how do I transfer my page?

Can someone lay this out in clear steps?
I'm not interested in transferring anything not strictly necessary (the dashboard for instance) ------ I just want to upload my page!
>>
>>59808463
Download a FTP client, connect using your SSH credentials, go to /var/www/html and upload the page
>>
File: tr21.jpg (61KB, 640x431px) Image search: [Google]
tr21.jpg
61KB, 640x431px
What's the best place to register a domain?
>>
>>59808791
anything but namecheap or godaddy.
I'm with gandi which is quite okay.
>>
>>59808931
Whats so bad about namecheap?
>>
>>59809095
they started making up lies about letsencrypt being vastly insecure so people keep buying their certificates
>>
>>59809108
They do really good deals on domains though and believing anything a source that has financial interest in the topic is generally stupid.
>>
<MenuItem onTouchTap={() => this.handleClick('param')}>123.com</MenuItem>

how do I do this but pass whatever is written at '123.com' as the parameter to handleClick?
kinda like v-model from vuejs.
react
>>
>>59809604
Is this react? If it's any "on" event, all you'd need to do is call a function to handle the event.
The function would receive an event object to use.

If it's just a click I'd just make a custom function just for it, calling another function with your desired parameters
>>
What tool(s) do you use to see how pages are rendered and if they work properly in different browsers and their versions? Or do I have to install every single browser to do this? Sounds like a pain in the ass.
>>
>>59811680
for IEs I'm using their VM images, otherwise I only test chrome and firefox, the rest uses either webkit or something ignorable.
https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
>>
.custom-text {
position:relative;
display:inline-block;
color: transparent;
overflow:hidden;
white-space:pre;
}

.custom-text:before {
display:block;
z-index: 2;
position:absolute;
top:0;
height: 50%;
content: attr(data-content);
overflow:hidden;
pointer-events: none;
color: #000;
}

.custom-text:after {
display:block;
position:absolute;
z-index: 1;
top:0;
height: 100%;
content: attr(data-content);
overflow:hidden;
pointer-events: none;
color: lightseagreen;
}


I'm trying to use jquery .css method to change he height in ONLY the .custom-text:before but this
$(".custom-text:before").css("height","20%");
is not working. Is there something specific I have to do because I think that jquery can't identify the :before selector.
>>
>>59812281
jquery can't access pseudo elements, that's not how it works.
toggle a class instead.
>>
>>59806015
you could try to make the samsung app share its data with google fit and use their api to process it
>>
>>59806893
Best java web framework would be spring, use spring boot to get your stuff autoconfigured, spring data to get your dao stuff autogenerated, spring mvc to handle requests
Either display ront end stuff using a templating engine like thymeleaf which is jsp ++ or just put html and js in the approprite folder to get it served by tomcat
Follow their getting started guides

You don't want to write application logic in the view part (jsp) of your stuff because that'd defeat the purpose of trying to set a mvc project. you want to be able to use different view means without having to rewrite all your stuff.
>>
in react
what is the difference between
createMenu = () => (
people.map(this.createEntry)
)

and the same but
=> {
}

curly braces
>>
>>59812281
Is there a way for me to achieve the same CSS style effect without the use of pseudo elements?
>>
File: 1488740857257.jpg (85KB, 437x437px) Image search: [Google]
1488740857257.jpg
85KB, 437x437px
Hey guys, let me hear your opinions on this.

I'm at a point where I need to focus on one platform if I seriously want to get a job and stop doing shitty freelances.
My dilemma is between Python(django), PHP(Laravel), and Javascript (node, meteor, react, angular etc).

I have worked in all of these platforms however I'm am not proficient enough in any one of them.

I am most comfortable working in django, but every ad I see these days searches for laravel devs. And I know javascript will be huge in the future.
What do you think I should focus on for biggest employability?
>>
>>59813637
c#
>>
>>59813668
I don't think I can become proficient in C# at this point. I have never worked with it and should probably focus on platforms where I can reach seniority in relatively short time.
>>
need to make a web interface for an app but im terrible at css and design in general
any frameworks that lets code monkeys design decently looking websites with minimal effort?
>>
>>59813764
bootstrap, foundation
>>
>>59813637
php might be shit but i think lots of companies still use it extensively, so focus on laravel for max employability
you can learn more javascript once you have a job
>>
OK fellas I got a question for you. Need to know if I'm ready for a job.

I know html, css, bootstrap, foundation, most of that Adobe shit, WordPress at pretty decent levels.
&
JS, JQuery, php, MySQL at basic concept levels.

I feel like I don't know shit about any of it really. To be honest I don't really know how to think in terms of problem solving. I just don't know how to attack projects. I would like a job (of course) but I dunno if I'm ready. My portfolio could definitely use some work and I think I might be to the point where I could land an entry level job but I'm not sure.

How do I know I'm ready or not? For a design or a dev job I don't care anymore? I know I have a lot more to learn, but I feel like I should be getting paid to learn further.

How do I know if I'm ready? Also I only have an associates... Because I fucked up in life.
>>
>>59814085
>My portfolio could definitely use some work
Then do so and land yourself an entry level job. You answered your own query.
>>
I just spent 30 mins trying to fix why there was white space on the right side of my site.

Fucking around with padding and Bootstrap guttering and all that shit.

Finally realized thats what it looks like on Ubuntu Firefox when the page can scroll. Christ I'm dumb.
>>
>>59814085
>My portfolio could definitely use some work
Link your portfolio so we can give some tips
>>
>>59814544
If you aren't having these sorts of moment daily, you just aren't developing.
>>
>>59814658
Sorry anon as much as I know that it's important to see other people's work and compare, etc... I can't link it. The url is my name, registered in my name, and it's got my resume, picture, and all that jazz all over it. Can't do it.

>>59814113
Yeah I guess I was sort of thinking out loud. But I didn't want to know grasps on the basics was enough or if I should keep studyingnor not.
>>
>>59801709
Where can I get website templates like the one this was made with? https://www.rubycoin.org/
>>
>>59815478

I get that, but its hard to help, Is it possible to make a temp version with none of your details.

I would add, /wdg/ isnt really a doxing place.
>>
>>59815492

https://startbootstrap.com/

Most of the free ones on there are slightly nicer than the one linked
>>
>>59816067
or bootstrap zero
>>
Is MySQL worth learning in the current year?
>>
>>59816709
it's always worth learning
>>
Really need help, just finished developing my initial page with bootstrapping and so forth. Now with that initial page I want to run a ajax based get script that grabs either xml or php files and displays them in the container. I've tried a get code to no avail? What appropriate code could I use?
>>
>>59816709
Oh fuck yes, nosql databases are just hipster memes
>>
File: tttt.png (32KB, 879x169px) Image search: [Google]
tttt.png
32KB, 879x169px
>>59801709
Hey guys, newfag dev here.
So I have my pages working fine, and they display properly and do everything I want, but I'm using CSS frameworks, and rather then try to use the framework's built in shit and go through the pain in the ass of searching for the things that do what I want, I just manually do inline styling instead.

Pic related is the first page I have written on my site with the Bulma framework, which is the login page.

It displays properly and scales properly. and it does what I want when I zoom in and out, but I just can't help but think that when I look at the source code of the page it looks kind of shit. My friend who is a senior web developer told me that's not how to use web frameworks, but like... It works.

It was much more quicker and easier to just manually position shit like this than to just fuck around with the components.

Am I wrong?
>>
>>59817586
>but like... It works.
Yeah, but that's not the purpose of 'good code'. Good code is supposed to be easily readable which then leads to easy ability to come back at a later time and change things when the time comes. Don't ever just rely on 'but... it works', that's what creates cancer in the industry.
Just link to another custom css file and put your styles in there. Inline styling is cancer unless it's just a couple elements, which you've already exceeded the limit from the code you've posted.

Your friend is right effectively.
>>
>>59817586
This is good for dev/learning CSS but bad for production code. Just imagine when you customer wants you to change things on 10-20 different pages.

More importantly it is bad for speed and SEO.
>>
>>59812707
It's known as an arrow function and it's in the ES6/ES2015 implementation.

There's pretty much no difference, but if you have one single parameter, you can ditch the parentheses "( )".
(singleParam) => { statements }
singleParam => { statements }


Likewise if you're just going to call one statement you can just do the following

() => { statements }
() => expression // equivalent to: () => { return expression; }
>>
>>59801956

Not at all. Learn it. Seriously. There is so much opportunity in Django development, and it has a strong future ahead of it.
>>
Month 8 of unemployment. I have knowledge of html, css, node, express, kraken, PHP, react, Vue, Laravel, postgres, MySQL, and bookshelf. Along with a slew of system admin experience.

I just wanna be a junior and learn how to put all this shit to actual use.

I have worked for two technology startups now.

I'm running out of ideas on how to get a job. Hopefully some connections I have with Denny's leads to something of value.
>>
Is writing WordPress stuff easy if you know PHP well? In my country there's a huge market for plug-ins and it's well paid.
>>
>>59819517
Pretty much.

>>59819511
>Month 8 of unemployment.
>I have worked for two technology startups now.
>I'm running out of ideas on how to get a job.
??
>>
Is there a beginner textbook that's well received here. I know programming in C, C++ and Python but have little experience with web development. I'm thinking of something like a blog with a comment section as a first goal.
>>
>>59819616
I have had 8 months of unemployment after working for a startup for a year. During this time I have worked non-tech jobs for a total of like 3 months. I have had a tech job for a week before I realized they were on a path to screw me over. I haven't had *gainful* employment during all this time.
>>
>>59821431
The work with the first startup wasn't gainful either. They were paying me like $11/hr
>>
hey guys I am trying to use a webscrapper plugin with my project but how do i use that class and my main class and a DB class together?

I can extend the DB class to my main class but how do I use the other class methods?

In PHP
>>
>>59821492
Make a singleton DB class. Here's my implementation

PHP:

// config.php

<?php
// Config for server
return array(
/* Database settings */
'DB_HOST' => 'localhost',
'DB_NAME' => 'my_db_name',
'DB_USER' => 'user',
'DB_PASSWORD' => 'password',
);
?>



// Db.class.php
<?php
namespace YourNamespace;

/**
* Contains static connection instance to the database used by other classes and methods
* Class Db
* @package YourNamespace
*/
class Db {
private static $instance = NULL;

private function __construct() {}

private function __clone() {}

public static function getInstance() {

if (!isset(self::$instance)) {
// Load config file for MySQL connection details
$conf = include('config.php');

// Create a MySQLi or PDO instance here
self::$instance = new \mysqli($conf['DB_HOST'], $conf['DB_USER'], $conf['DB_PASSWORD'], $conf['DB_NAME']);
}

return self::$instance;
}
}


// MyClass.class.php

namespace YourNamespace; // Keep the same namespace as the Db class

/**
* Checks if user can log in
* @param $username string
* @param $password string
* @return bool
*/
public static function login($username, $password) {

$db = Db::getInstance();
$query = "SELECT password FROM user_logon WHERE username = ? LIMIT 1";

if ($statement = $db->prepare("SELECT first_name FROM user_logon WHERE account_id = ? LIMIT 1")) {
$statement->bind_param('i', $_SESSION['account_id']);
$statement->execute();
// verify
}

return false;
}

>>
so if someone input website.com/search/<script language="javascript">(insert code here)</script>, depending on how I built my webpage, there's a chance the script inputted into the URL could run? In other words, XSS.
>>
>>59822782
dunno senpai, you tell us
you probably want to not display unsanitized user provided strings on your page tho
>>
whats the best book to start learning javascript?
>>
need help making the jump from windows xampp to digitalocean. im completely lost
>>
>>59823134
use digitalocean tutorials to help you set your box up, they are good
regarding your lamp setup just search how to set it up, you'll need to install a db and apache, apache root folder will be in /var/www, apache conf in /etc/apache2

but you also need to secure your server, look up how to set your ssh to only accept connexions from non root user with a keyfile, look how to set ufw or iptables so you have a firewall and fail2ban to prevent bruteforce from chinese botnet
the somewhat old guide on installgentoo wiki is also usefull for this
>>
php noob here.
whats a good method to verify that a download request comes from my site and not direct linked from somewhere else?
>>
>>59823322
look for the referer field in apache logs
>>
I'm making a Pajeet tier webpage. I need some stock images - and quickly.

Especially looking for general technology, fitness stuff and PRO WRESTLING.

How do you find good, free stockphotos?
>>
>>59819164
you misunderstood. My description was bad
I'm talking about this
createCheckbox = label => (
<Checkbox
onCheck={this.handleChange.bind(this, label)}
key={label}
/>
)

createCheckboxes = () => (
items.map(this.createCheckbox)
)

^works
createCheckbox = label => {
<Checkbox
onCheck={this.handleChange.bind(this, label)}
key={label}
/>
}

createCheckboxes = () => {
items.map(this.createCheckbox)
}

^does not work
notice the first one has '=> (' and the second '=> {'
so it's wrapped in regular brackets vs. curly ones
>>
>>59801709
Pretty new to this shit but just wondering what the fuck I'm doing wrong. Basically, I want the loading bar to go from 1 - 100% by following the users scroll. Top of the web page 0, bottom 100 etc

http://codepen.io/nubman/pen/BWXYem
>>
>>59823819
pixabay
>>
File: 1486362930640.png (377KB, 640x480px) Image search: [Google]
1486362930640.png
377KB, 640x480px
whats the point of frameworks like react and angular?
are they used for similiar things or should you learn both?
>>
>>59824896
React is a DOM manipulation library its not a full framework.

I recommend learning the basics of React because there's that not much to it. You should learn a high-level overview of all the frameworks.

Angular 1.x and 2 are both great to learn if you want to get a job using those frameworks.
>>
I am doing an internship with Sitecore right now.

Anyone here worked with this? Any tips for me?
>tfw never learned C#
>things I can do within minutes with html/css, js and php take hours now
>>
>>59822979
eloquent javascript
you're going to get stuck, work through it

>>59823134
digital ocean tutorials are actually really fucking good, look for them
>>
Just presented my first piece of client work directly to the client.

Gotta say, it feels amazing when someone turns round and tells you how much it's going to help them and that they really like what I've done.

Feelsgoodman.
>>
>>59825373
yes, that feels great. Congratulations m8. Now let's hope it solves their actual problem
>>
>>59825373
wont feel as good when the huge list of changes they want dimp into your email
>>
>>59825389
Yeah that'd be ideal.
>>
>>59824896
Angular gives you a few things:
Architecture and scalable patterns,
it does legwork for databinding so that you don't even have to think about it. You update something in the JS and the view updates automagically,
easy ways of doing ordinarily complex tasks,
standardizes patterns like routing so that they can be googled,
easy way of making templatable, reusable code
>>
>>59824211
Your code is working. But in line 11 you can use the parseInt function

document.getElementById('loading').textContent = parseInt(percent) + '%';
>>
Started playing with Semantic UI and it's actually pretty decent, save for their bizarre deployment practices
>>
company just called me to come and talk about working for them as nodejs developer
>they saw my nodejs work from 3 years ago when i was into it
and i said no thank.
Did i do bad thing?

I dont hate node as much a hate node community, that is why im into symfony
php all they way
>>
>>59826973
php is god
>>
What should I learn to make a Facebook clone? Is there some sort of framework I should use?
>>
>>59827817
PHP, mysql, javascript, css
>>
Is there a way for me to use pathe_info without printing out the / beforehand? Or alternatively, a way to get rid of the /?

<?php echo $_SERVER['PATH_INFO'] ?>


Many thanks.
>>
I do Android dev mostly, but work wants me to do the frontend for a web app instead of an Android app. I haven't done web dev in years.
I very much dislike Javascript. Am I going to fuck myself by doing the project in Kotlin then compiling down to JS?
>>
>>59827992
<?php echo ltrim($_SERVER['PATH_INFO'], '/'); ?>
>>
I'm trying to figure out the best way to deal with character encoding in my web app. Do I decode strings from whatever character encoding they're sent to my app in and store that form in my database, then reencode them as utf-8 on output? Do I leave them as is? Do I try to normalize everything as utf-8 before storing? The framework I'm using seems to encode everything as utf-8 when it renders a page, which resulted in things getting double encoded since my first instinct was to store utf-8 strings. Help please
>>
is there anyway to remove an element with a class but only the one i choose? like somehow use "this" on a div with a class....
>>
>>59828073

why dont you like javascript? its bretty gud...id rather use it than C#
>>
>>59828303
I highly prefer statically typed languages
>>
Hi, /wdg/, a small newbie question about sass.
I install sass in my node app, include it and got three basic files: css, sass and map. I tried write something in sass, but it does not works, nothing happened. Is it not works like a css "write-save-run"? Should i somehow compile sass-file before use it?
Sorry for my english.
>>
>>59828073
You're already not native by going the front end route.. now you're not even going to be native in front end. Wrappers on wrappers on wrappers. Seems like it's gonna be slow
>>
>>59828342
>sorry for my english
the meme continues

> Should i somehow compile sass-file before use it?
Yes, compile on save with gulp or grunt
>>
>>59828403
Thanks.
So should i write all in sass-file and compile it in console... e-everytime? But it completely not so comfy like a css, where i press ctrl+s and already see my result.
>>
>>59828554
there should be a command line utility to autocompile, look it up
>>
>>59828585
Okay, thanks again.
>>
>>59828554
You can have it done automatically whenever you save

By Sublime IDE:
http://www.hongkiat.com/blog/sublime-text-compiling-sass/

By Gulp:
http://codehangar.io/gulp-sass/

By Grunt:
http://ryanchristiani.com/getting-started-with-grunt-and-sass/
>>
who else hates poo in loos that are butt buddies with M$?

oh those smelly, .net loving, job taking, poo in loos....
>>
The idea is that I have a div that will be filled with text from the user, If there's few words the font size will be big to fill out the available space in the div, if there's a lot of words the font size will scale down to make the text still fit in the div. Anyone have tips or search terms towards accomplishing this?
>>
i guess im a retard since i cant figure this out

<div class="item">stuff</div>
<div class="item">stuff</div>
<div class="item">stuff</div>


if i had a delete button for each div how would i tell it to delete just that div?
>>
>>59801709
Guys, I have a problem.
I need to make slider input for Android 2.3 stock browser, and can't figure out, how to do it.
Where should I start?
>>
>>59829122
ad an id attribute in html elements, use findElementById in javscript code
>>
>>59829122
<div class="item">1 stuff <button class="delElement">Del</button></div>
<div class="item">2 stuff <button class="delElement">Del</button></div>
<div class="item">3 stuff <button class="delElement">Del</button></div>


(jquery)
$('.delElement').click(function(){
$(this).parent('div').remove();
});
>>
>>59829122
You would need to get a specific element, for example by id. Try something like this in JS:
var elem = document.getElementById("el-id");
element.parentNode.removeChild(elem);
>>
>>59829155
And I can't use any heavy libraries (>20kb).
>>
>>59829163

what if i dont know the id at the time tho since its randomly generated
>>
>>59829198

ok this worked but then the page refreshed and my php querie shows in the URL now

wtf lol
>>
>>59829237
see
>>59829198
>>
>>59829270
Because you are using a submit, my example is just a button...
>>
>>59829290

ya im using a button too man
>>
>>59829306
Post your code...
>>
>>59829532

<button type="button" class="deleteNewItem" title="Delete item">&times;</button>


$(".deleteNewItem").click(function() {
$(this).parent("div").remove();
});
>>
>>59829579
https://jsfiddle.net/egmfuzq9/
>>
File: Twitter-icon.png (12KB, 256x256px) Image search: [Google]
Twitter-icon.png
12KB, 256x256px
Are there any good APIs or scripts available for link expanding on twitter?
>>
>>59829852

ya idk still not working. I think its the order in which i have the function. Idk tho both are in document ready function
>>
File: il_fullxfull.874647802_q2ri.jpg (102KB, 972x972px) Image search: [Google]
il_fullxfull.874647802_q2ri.jpg
102KB, 972x972px
>>59829881
Too vague without the complete code
>>
>>59829881
Post entire code. Probably got something fucky.
>>
>>59829946
>>59830028

i just posted the code here this is whats in my document ready

https://jsfiddle.net/emr3yxbr/
>>
>>59830087
>https://jsfiddle.net/emr3yxbr/
>jquery to hell and back
why do people do this to themselves?
>>
>>59830122

what is teh issue?
>>
>>59830286
What is it that it's supposed to do? Maybe I can show you how it would look with some different tools
>>
>>59830506

when u add item and click the button it should delete that item
>>
I keep getting this error

ERROR: SQLSTATE[HY000] [2002] Connection refused

When I try to connect to my database. I'm using digitalocean and myphpadmin. Connecting to the database occurs in the setup.php file located within var/www/html/php

help
>>
>>59830087
This is a great illustration of everything wrong with web development
>>
>>59831723
>everything wrong with webdev is some retard who doesn't know any current practices
>>
Can anyone give me a rundown on what this does?

    <script>
window.addEventListener("submit", function (e) {
$('#submitupload').attr('disabled', true);
var form = e.target;
if (form.getAttribute("enctype") === "multipart/form-data") {
if (form.dataset.ajax) {
e.preventDefault();
e.stopImmediatePropagation();
var xhr = new XMLHttpRequest();
xhr.open(form.method, form.action);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
if (form.dataset.ajaxUpdate) {
var updateTarget = document.querySelector(form.dataset.ajaxUpdate);
if (updateTarget) {
updateTarget.innerHTML = xhr.responseText;
}
}
}
};
xhr.send(new FormData(form));
}
}
}, true);
</script>
>>
>>59832086
Seems to intercept the form submit and passes the form field by ajax instead.
>>
>tfw finally have a good idea.
I have 4 projects each with only 2-6k views a week.

This is the BIG one I hope.

Yall working on anything neato?
>>
File: gondola.png (504KB, 800x600px) Image search: [Google]
gondola.png
504KB, 800x600px
Hey /wdg/, tourist here

I need a fast VPS in Amsterdam.
SSD, 4 GB RAM, 2-4 CPU cores

Looking at Linode and Leaseweb atm
https://www.leaseweb.com/cloud/public/virtual-server/configure/23975
https://www.linode.com/pricing

Anyone got experiences with either?
Thanks.
>>
File: 1473945559955.jpg (506KB, 667x1000px) Image search: [Google]
1473945559955.jpg
506KB, 667x1000px
What's the point of redux? Why the fuck do I need frontend state?
>>
>>59828164
Anyone?
>>
I have my index.php file structured like this:

<?php

include ('html/header.html');
include ('html/body.html');

?>

and for some reason, the includes won't execute. I've tested it time and time again and know for a fact those are the correct paths to where the html code is, so I don't think it's a problem with my code or file structure.
>>
>>59801744
If you have a .edu email you can get a small but decent setup on amazon for free. Don't even have to be an active student, just need the email.
Thread posts: 214
Thread images: 19


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