[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/wdg/ - Web Development General
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 26
File: fhgzVEt.jpg (163 KB, 1024x1344) Image search: [Google]
fhgzVEt.jpg
163 KB, 1024x1344
Someone let the old thread die and didn't make a new one edition

Previous Thread: >>54680145


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

> Discord
https://discord.gg/0qLTzz5potDFXfdT

>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/
https://youtu.be/JxAXlJEmNMg?list=PL7664379246A246CB - "Crockford on JavaScript" lecture series.

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

>Backend development
https://en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks
https://gist.github.com/dypsilon/5819528/

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

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

>How to get started
https://youtu.be/pB0WvcxTbCA - "WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice"
https://youtu.be/zf_cb_Nw5zY - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.

>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
>>
PHP is fine.
>>
>>54718141
is it though
>>
Any of you built a SaaS and made decent money out of it?
>>
JS frameworks are the popular memes these days, right? How is React going to fare against Angular 2? I want to learn one of these to get a nice cushy overpaid job.
>>
writing javascript like a functional language

http://kongware.net/currying-partial-application-javascript

const everywhere currying, composition, etc.
ecmascript 2017 got gud records and tuples as well
>>
>>54718610

On top of that, what's the popular back-end frameworks? I've heard ember is popular
>>
>>54718632
When there are widespread horrors such as PHP and when you know how bad committee designs can get, I'm amazed at how javascript has evolved. Sure it could have been scheme instead, but it could have been far, far worse.
>>
>>54718677
ember is frontend like angular/react.

for backend pick a language you like.
I personally have been using asp.net for multiple years now and node.js every now and then.
>>
How do I learn CSS properly?

Everything I design is absolutely horrendous looking, but I'm not sure where I can learn how to design websites well.
>>
>>54718677
Everyone uses express, and many people backbone.
>>
I feel doing my master thesis is such a waste of time.
I just want to work on my websites and make them a success.

bleh
>>
>>54718712
look at template sites and rebuild some.
>>
>>54718700

Fuck I meant Express
>>
>>54718632
>ecmascript 2017 got gud records and tuples as well
What is this about?
>>
>>54718712
Knowing CCS well makes you able to implement almost any design idea. Now, if the said ideas are bad, CSS won't help, you can't just put
html { design: "good-looking" }
in your stylesheets.
>>
>>54718725
The next tech trillionaire.
>>
File: gopher_head.png (33 KB, 400x214) Image search: [Google]
gopher_head.png
33 KB, 400x214
Daily Go shilling post. If you aren't using Go for your next big backend project you don't know shit about webdev(or are happy with the alternatives).

>What is Go?
http://golang.org/
>Why should I use Go?
https://gist.github.com/ungerik/3731476
https://github.com/avelino/awesome-go#web-frameworks
>But I just want a simple way to feed data to my frontend?
Go is also bretty gud for turnkey applications: http://rest-layer.io/
>>
>>54719210
does it run on windows server and can talk to sql server?
>>
>>54719287
Yes. What can't do those?
>>
If I want to start using ES2015 but don't want to use Typescript, Coffeescript or any of those memescripts should I just use babel?
>>
>>54719542
most modern browsers handle it very well already.
only use babel if you need a wider range of compatibility.
>>
>>54718735
record and tuple types (google)
let aTupe = ("a tup", 23)

type Jigga = {Nig: string; Jig: string; Figga:string}
let aRecord = {Nig = "ayy"; Jig = "kek"; Figga = "lel"


obviously that isn't javascript, but it would be something like that
>>
>>54719633
*
let aRecord = {Nig = "ayy"; Jig = "kek"; Figga = "lel"}
>>
>>54719633
Why tuples in a language that does not have type safety and already has some non-typed array?
>>
>>54719633
Is it not even in proposal phase yet? Can't seem to find anything about it hitting ES.
>>
>>54718632
>Currying
Method chaining is better. I've never needed to use currying, unless a memoizer function counts as currying? Don't think it does tho.
>>
Is posting a github page and asking for opinions appropriate in this general?
>>
>>54719584
He should use babel anyway if he wants to use modules, which he probably should.
>>
>>54719810
Because Python
>>
>>54719952
https://tc39.github.io/ecma262/#sec-list-and-record-specification-type apparently
tuples in strawman phase
http://wiki.ecmascript.org/doku.php?id=strawman:tuples
>>
Hey guys, 30 replies in and not a single noob PHP question.

These threads are getting better.
>>
Can someone suggest a good intro to database design book?
>>
Can I get a job as a Jr just knowing HTML, CSS and JS/jQuery? Or do I need to master meme frameworks and libraries as well?
>>
>>54720039
You'd think the JS-cucks in charge of the language would ask "why implement this" before implementing something.
>>
>>54720085
If you know JS than you know the frameworks, sans routing, layouts, etc. Frameworks aren't their own language.
>>
>>54720085
Most companies don't take frontend devs seriously (= slave pay).
>>
I need to create pdf from form data, with fixed margins, some for POS printers some with gutter margins.

What do you recommend? site is php and js but is on a VPS centos so any language is ok.

also is it posible to force the browser to print this pdf or does the user have to download it first?
>>
>>54720176
php wkhtmltopdf

It's a wrapper for a html to pdf c library. I've found it handles css way better than dompdf. Less resources too. You can stream the pdf to the browser with the correct content header.
>>
What's the best style of making PHP websites without using any heavy frameworks?
>>
>>54720176
>also is it posible to force the browser to print this pdf or does the user have to download it first?

Yes, use some server side script to call a cups print job. for example in php you could use
 execute('lpr <printername> <filename>');
>>
>>54720164
Yeah, but It's not a bad place to start a career
>>
>>54718122
is it truethat webdevs cant fizzbuzz or is dpt memeing?
>>
How much do you make hourly? Also location and job.

$40, Midwest, Full stack + React
>>
>>54720176
>>54720236
On second thought, I wouldn't think you'd want to generate a pdf just to print; waste of resources. Why not format a html template and call the print dialog from javascript? You can't just command a print to the printer either, they'll have to press the print button.
>>
Can anyone troubleshoot a silly error, I tried to provide as much info as possible in the attached image
>>
File: allofmywhy.png (70 KB, 1360x623) Image search: [Google]
allofmywhy.png
70 KB, 1360x623
>>54720545
OOps, here it is
>>
>>54720561
just spitballing cause im not really a webdev, have you tried making sure its not case insensitive, also are you sure post methods work without a action redirection?
>>
>>54719210
I am happy with Phoenix framework
>>
>>54720561
<form class="container">
>>
>>54720261
none
>>
>>54720561
htaccess?
>>
>>54720304
that would be great, but fixed margins doesn't work from the browser, each user would have to set the page size on firefox or chrome, as far I know there is no way to disable page number or printing the link this has to be done manually

>>54720273
>>54720236
thanks!
>>
>>54720561
Double form
>>
>>54720299

Of course webdevs can fizzbuzz, asshole.

let fizzBuzz = require('fizz-buzz');

fizzBuzz.doFizzBuzz(100, (err, item) => {
// do fizzbuzz to 100
if (err) {
console.error(err);
} else {
console.log(item);
}
});

>>
>>54718122
any framework for user management? drupal is too big for this mysql table results project
>>
>>54720561

><form class="container">

oi m8 u takin' a piss?
>>
>>54720781
I have no idea where that came from ha
>>
>>54720751


ur mom
>>
>>54720751
Laravel 5.2 has good user ACL out of the box
>>
File: 1436398502063.png (81 KB, 409x406) Image search: [Google]
1436398502063.png
81 KB, 409x406
I need advice /wdg/. I'm making a website right now for car parts. For a single part there are multiple years for the same model. How do I even put that in the database? Do I have to make a separate table for years?
>>
>>54720853
reported
>>
>>54721033
Yeah, unless you want to serialize the years to json or that awful PHP format, or a comma separated list.

That makes it rather difficult to actually query for the data, though ("give me all the parts from *this* year").
Some databases have native support for json data fields nowadays which actually do allow you to query for this data and some databases basically are json only (NoSQL).
You're fucked when you try to use that with any ORM, though.
>>
>>54718632
> const add = x => y => x + y
undefined
> add(2)
function add/<()
> add(2)(3)
5


What is add/<
>>
>>54719210
but npm is great
>>
>>54721033
Just add a year field in your product table?
>>
>>54721033
nosql doesn't have this problem

how about a comma separated list of years in a string
>>
Let's say I have a list on a PHP page, each element of which has a button that changes the color of the items' text in the list.

I want to implement this with AJAX.

Do I first render the list in PHP then manually set the color of each element in the callback function or do I get the list as JSON whene I first get on the page and render it in JS, and have the callback function retreive the list again with the updated colors every time?
>>
>>54721233
Well shit, I guess I'll see if I can do that then. Converting this from excel will be a pain in the ass. I like the comma separated list idea though. Would there be huge drawbacks about using that instead?

>>54721371
I have no idea how to use nosql, Sounds cool but I feel like it'd take even more time to learn it.
>>
>>54721233
>That makes it rather difficult to actually query for the data, though ("give me all the parts from *this* year").

If only there were some kind of "structured query language" which made that possible
>>
>>54721033
Table One -- Cars
ID, Manufacture, Model, Year

Table Two -- Parts
ID, Name

Table Three Pivot table -- car_part
Car_ID, Part_ID

Really simple, don't listen to NoSQL hipsters. Eloquent orm would make this extremely easy to manage.

You could even make another pivot for manufactures.
>>
>>54721471
The second option should allow you to setup polling so that if you are pulling the list from a db or something, then the list would be able to be updated without refreshing the page.
>>
>>54721337
the second function.

const add = x => y => x + y

is equal to
function add(x) {
return function(y) {
return x + y;
}
}


so calling add() returns the second function.
>>
>>54720064
I would take PHP question any time over node shill or total n00bs who want to become professionals in a week.
>>
>>54720691
This. Also next time use pastebin or something.
>>
>>54721622
right but where does the name come from
>>
>>54721544
Thanks, I really appreciate the input. I'll do that and put a year column. It didn't occur to me that a separated list for a column was a possibility.
>>
Knew to HTML/CSS stuff. Is understanding how to center things something everyone goes through. Seems like I can never figure out exactly how do do it. I just made this as a test to then start applying some jQuery stuff to, but I can't get the navbar to be properly centered under the title.

https://jsfiddle.net/41cch5Lv/
>>
>>54721572

Is it possible to create a servlet like in Java using PHP to react to POST requests by updating the color, getting a list and passing it to the page without reloading it and adding another entry in the browser history?
>>
>>54721765
it's just what the firefox console tells you. arrow functions are anonymous and don't have a name.
chrome for example returns
>add()
function y => x + y
>>
>>54721805

http://stackoverflow com/questions/18494689/css-menu-has-odd-left-margin

nav ul {
list-style-type: none;
padding: 0;
}
>>
>>54721919
Its called AJAX.
>>
>>54722640

I meant handling everything in PHP, like this:

>GET request to controller
>get list of items
>render the array of items with buttons next to each with PHP
>press button
>POST to same controller
>change color, get list of items again
>render them with PHP again

All that without adding extra pages to the browser history.
>>
>>54722779
Yup, still AJAX
>>
File: 1458708215534.png (392 KB, 540x587) Image search: [Google]
1458708215534.png
392 KB, 540x587
>mfw Django
>>
>>54722844
Is that seriously a trap? Wtf.
>>
>>54720087
It's strawman stage, so not even likely to make it in yet.
>>
File: 1460828756836.png (2 MB, 1200x1131) Image search: [Google]
1460828756836.png
2 MB, 1200x1131
>>54723107
why?
>>
Anyone familiar with knockout + require? I'm using require to break the viewmodel in components, each component with its own viewmodel. The problem is that the viewmodel gets recreated every time. I need it to only initialize once.
>>
Anyone went from web dev to programming? I'm just thinking about that, I'd like to know to what field is the transition easiest. E.g. mobile applications, game dev, or some more scientific, like machine learning.
>>
>>54723596
I transitioned from gamedev to general application dev to webdev. I'd say gamedev is the most fun
>>
>>54723619
Yeah, before I even started programming the game dev was a field that interested me the most. I then stopped caring much about it but a week ago I made some simple pong game in canvas and at thar point I realized how much fun it actually is.
>>
File: 1463951577025.jpg (65 KB, 1280x720) Image search: [Google]
1463951577025.jpg
65 KB, 1280x720
>>54718122
how do i sweet talk a reciter I just got a call from one and am going to call back.
>>
>>54718145
yes
>>
How the FUCK do I make non-retarded scatter plots with c3js?? All the examples assume every "column" has the same x values. I need to give it a list of objects, tell it to color points based on a value of the object, and move the points based on the given axis values.
>>
>>54724891
Fuck this gay shit I'm going back to D3
>>
Anyone know how I should write an input box in a form for a POST HTTP request?

<input type="text" class="form-control" id="title" value={{ form.salary(placeholder="title") }}>


and it gives me
<input
in the input box and then > beneath it
>>
>>54725268
What was moot thinking with this coloring? Can barely see the purple

What tool are you using to parse the {{ }}?
>>
>>54725268
>>
Python (Flask)
>>
>>54725332
Alright, just curious. Anyways, weird, I can't say I know much HTML, but isn't input type="text" supposed to be sufficient for creating an input box?
>>
File: img101202_ac0d752185e42be8.jpg (107 KB, 501x501) Image search: [Google]
img101202_ac0d752185e42be8.jpg
107 KB, 501x501
>>54721351
npm is horrifying
>>
>>54725379
I got it mate thanks, I fixed it by

                <div class="form-group">
<label for="salary" class="col-lg-2 control-label">Title</label>
<div class="col-lg-10">
<input type="text" id="title" name="title" class="form-control" value="{{ request.form.title }}" required>
</div>
</div>
>>
How do you create a HTML element for to match the index in a database table?

Every time I google it, it doesn't give me anything about dynamically creating HTML and instead just pure SQL stuff.

I'm not asking for someone to write it for me because I'm using FLASK, but what's the approach to it? Does dynamically creating HTML from code have a name?
>>
>>54725849
Please ignore, the keyword was arbitrary
>>
File: project.png (10 KB, 539x225) Image search: [Google]
project.png
10 KB, 539x225
Senpai, I've been given a task to complete as part of my application process for a front end job. I don't know what type of project they'll ask me to do yet, I won't know until I click Start - after which I'll have 1 day to complete whatever they ask of me.

I have basic knowledge of all three in the picture but I want to read more/practice before I actually start the project, which of the three should I pick to brush up on before I start?
>>
>>54725955
memegular
>>
>>54720692
Top kek
>>
>>54720781
Top kek
>>
Should I get an a+ certification if I want to start learning web development/get a job once I do learn? Some Google research makes it look like a good idea but I'd rather not be out all the study time for the test and $400 if it's not really necessary.
>>
>>54725955
react
>>
>>54720692
>not const
>not import
>>
>>54726198
no
>>
>>54720299


for (var i = 0; i < 15; i +=1;) {
if(var = 1){
console.log("1");
} else if (var = 2) {
console.log("2");
} else if (var = 3) {
console.log("Fizz");
} else if (var = 4) {
console.log("4");
} else if (var = 5) {
console.log("Buzz");
} else if (var = 6) {
console.log("Fizz");
} else if (var = 7) {
console.log("7");
} else if (var = 8) {
console.log("8");
} else if (var = 9) {
console.log("Fizz");
} else if (var = 10) {
console.log("Buzz");
} else if (var = 11) {
console.log("2");
} else if (var = 12) {
console.log("Fizz");
} else if (var = 13) {
console.log("13");
} else if (var = 14) {
console.log("14");
} else if (var = 15) {
console.log("Fizz Buzz");
} else {
console.log("err, number too high");
}
}



Fug yuo m80.
>>
>>54726290
and by var I mean i...
>>
>>54726382
>>54726290
holy fuck you are a shitter
>>
File: Pish.png (13 KB, 867x288) Image search: [Google]
Pish.png
13 KB, 867x288
Anyone know how I can present this data better, basically its just a webpage which posts job listings. I've currently got my data in a table, which is OK but looks shit, its hard for the user to differentiate the static data and the db data.

Anyone have any ideas on how I could change it?

I have writer's block, or maybe designers block, or maybe I don't even have an imagination
>>
>>54726290
>>54726382
lollashahisaSAoidsjaoi :DDDD
/dpt/ here, you guys are pathetic
>>
>>54726478
You can eliminate the left column.

>Job title in large/bold because it's the actual important datum.
>Salary will be the only thing with a dollar sign so don't need that label
>Company and location: merge -> "Target, Detroit MI"
>Original and captured listing are your data so present them however you want, or not at all.
>Date never needs a label, it is obvious from the formatting what a date is.
>>
>>54726478
- Bold the Job title
- Use google maps for the location
- Use company logo
- Put Date up under "salary" or "company"
>>
>>54726478
CARDS
THE ANSWER IS ALWAYS CARDS
>>
>>54726545
>>54726577
Yeah that sounds great, thank you both! You both agree too
>>
>Solving the "Basic Algorithm Scripting" challenges on freecodecamp
>feel like a happy little kid who just got a new toy everytime I solve a challenge by myself
This means this is the right career choice for me , right g-guys?
>>
>>54726616
If you enjoy the struggle of solving problems, probably the right choice. Also Fuck yeah FCC!
>>
>>54726616
algorithms don't actually mean shit to the people who hire you.
>>
>>54726645
Do you know the best place to learn real world problems, or is just building it the best way to learn?
>>
>>54726683
learn and make wordpress projects if you want to get hired

either that or you have to know someone to give you a job because nepotism exists
>>
>>54726645
well, fuck them.
I just wanna get a job where I do stuff I enjoy doing
>>
>>54726707
Here's the thing you have to realize: the person that is hiring you is stupider than you. That's why they're hiring you. You need to dumb yourself down to get in.
>>
>>54726478
>>54726532
>>54726545
Thanks guys, looks much better already
>>
File: Save.png (9 KB, 246x422) Image search: [Google]
Save.png
9 KB, 246x422
>>54726748
>>
>>54726768
Actually, put date up the top.
>>
>>54726738
That's fine, I'm already used to dumbing myself down for short periods of time (making static websites for my dad's friends)
>>
>>54726738
>the person that is hiring you is stupider than you. That's why they're hiring you.
What kind of fucking autistic logic is this?
>>
>>54727193
It's partly true.
The other part is they don't have the time and/or interest to do the job in question
>>
>>54727293
So I'm an entrepreneur with Masters Degree in Management Studies with rapidly growing startup looking to add new personnel to the team means I'm stupid because I want to hire you, a developer, to an area I know nothing about?
>>
>>54727446
No, that goes to the time/interest part.
But if you're a senior writing books, and you want a website for your shit, and you hire me, it's because you're too stupid to do it yourself
>>
>>54727569
You're being silly, it's just not their area of expertise. If your car breaks down should I brand you a dimwit because you can't fix it yourself?
>>
>>54727671
OK You win, that wasn't my argument anyway, I'm just saying that it CAN be one of the reasons why people hire you.
>>
What's the best resource to learn React?
>>
>>54728876

Do this:

- Read the React Docs
- Do the tutorial from the React Docs
- Read the Flux Docs
- Read the top articules from https://www.reddit.com/r/reactjs
- Try to make something with React
- Learn a Flux implementation, most likely you should learn Redux. If so, then do the following:

- Read Redux Docs
- Watch this video tutorials: https://egghead.io/series/getting-started-with-redux
- Follow Dan Abramov on twitter
- Try to make something with React + Redux

Then:
- Get a React job
- Get paid

Bonus points:
- Read the source code of React and Redux, it's not that hard.
>>
>try and troubleshoot an issue for 30 min
>realize I misspelled a word
>>
Anyone here do general freelancing? Is upwork the only shithole around right now or is there some others sitting around? Got laid off yesterday so i'm going to dig for what I can get for now.
>>
>>54729105
>Get a React job
Yeah, good luck wit that.
>>
>>54730116
Freelancing is a myth, you're fucked just like the rest of us.
>>
>>54730150
aw man
>>
How should i approach exposing my PHP API to a mobile application. From assumptions i assume I'll need to set up some sort of token or session authentication.

i've never tried anything like this before and I would like make sure i don't start on the wrong tracks.
>>
alrighty.
project euler number 4 solved.
is there a better way to reverse a number?
the only way ive found is to change it to a string, split it up and then join it up again reversed. probably should consolidate the two functions but i like having dedicated functions to stuff just in case i wanna reuse.

r8 n hate.

// https://projecteuler.net/problem=4

let getAllPalindromeNumbers = function (factor){
let palinnums = []
for(let i = 0; i <= factor; i++){
for(let j = 0; j <= factor; j++){
//split the product of i and j after turning it into a string then reverse and join it to see if theyre still the same.
if ((i * j).toString() === (i * j).toString().split("").reverse().join("")){
let palindrome = i * j
palinnums.push(palindrome)
}
}
}
return palinnums
}

let getLargestPalindromeNumber = function(palins){
return palins[palins.length-1]
}

console.log(getLargestPalindromeNumber(getAllPalindromeNumbers(999)))
>>
>>54729105
>- Get a React job
>- Get paid
how
>>
>>54729876
Static typing does not have this problem.
>>
>>54730116

I just landed a $40/h job from Upwork. Do a good filtering and you can find even better stuff.

You could also check freelancer.com, but in my experience I've found fewer nice jobs there.
>>
>>54730122
>>54730568

Are you guys kidding? React jobs are all the rage right now, and they pay well.

Just send emails to jobs that do React work, there are a lot of them, and they are always looking for competent developers.
>>
>>54730732
Pretty much this. You'd have to be retarded to not be able to land one of these.
>>
>>54730520
Sure, I have a couple of questions for you.

1. Why do you start your loops at index 0? The problem asks for the largest palindrome made from the product of two three digit numbers, so why not start at index 100 instead?
2. Why do you bother keeping track of an array of all of the palindrome numbers instead of just keeping track of the largest one? If you changed that, you wouldn't need a separate function that is really only used to return the last element of a given array.
3. If you like having dedicated functions for specific tasks, why not separate your large `getAllPalindromeNumbers` into a couple of helper functions to make it easier to read? Perhaps you could create a function that (for example), when given a number, will return true if it is a palindrome, and false otherwise?

I don't know if this is the kind of advice you were looking for, but that's what I noticed.
>>
>>54730927
It would also be better if he just checked palindromes counting down from 999, and then breaking when the first is found
>>
PHP internship at a moderately sized web dev company (20 or so employees but high profile clients) or unspecified software internship at the headquarters of one the worlds largest banks.

Both are paid.
>>
>>54730945
Not necessarily. If you start the outer loop at 999, and count the inner loop down until it reaches 100, the first result isn't guaranteed to be the greatest possible palindrome.

For reference, the answer to the problem is 906609, which is achieved by multiplying 993 * 913. Your idea would not have gotten that answer.
>>
>>54731015
I'd go with the first one, you'll come out with more work to show off
>>
Quick question guys, I have the Adobe Creative Cloud, and I was wondering, does anyone know of a third party software that can help develop rapid prototypes for web design that can be incorporated with the cloud software?
>>
>>54730927
>>54730945
exactly the advice im looking for.
everything to make me a better programmer.
thanks a bunch.
ill revise it later.
>>
>>54731023
Right, I only quickly glanced at his code and thought it was the biggest palindrome from 999 downwards, rather than 999*999 downwards
>>
Is this a decent FizzBuzz test?
for (var i = 0; i <= 100; i++) {
if (i%3==0 && i%5==0) { console.log('FizzBuzz'); }
else if (i%3==0) { console.log('Fizz'); }
else if (i%5==0) { console.log('Buzz'); }
else { console.log(i)}
}

Also how do I skip 0?
>>
>>54731608
Just start i at 1? Is that not obvious? Did you just copy this from somewhere?
>>
>>54731647
I don't wanna start at 1 cause it would skip it and move on to 2. No I didn't copy this.
>>
>>54731681
No, it would start at 1.

And the solution is fine
>>
File: Selection_397.png (1 MB, 846x488) Image search: [Google]
Selection_397.png
1 MB, 846x488
how can I get basic protection from http://website.informer.com/ and other methods of getting my personal information? I'd prefer a cheap/free method. I haven't bought web hosting or a domain yet so now is the time to figure this out, just in case I could maybe put in fake details or something.
>>
So ive been using windows + cygwin/ming32 + conemu + Jetbrains IDE as my work environmeng. And ive to say its pretty comfy.
>>
anyone here use any products by Active State? Ive heard Komodo is good at handling XML, and perl dev kit is supposed to be good for anyone still using perl
>>
I've been stuck on a problem with node.js for fucking hours now and I need help. I have an array set up in express and I want to pass it along to jade, but I can't figure out how routing works. I have tried passing along basic strings and shit but it just doesn't work. Can someone give me some sample code for how to get this shit set up? I just can't figure it out.
>>
>>54733350
post sourcecode
>>
>>54733564
In my .js file
app.get('/', function(req, res, next) {
res.render('index', {"books": ["A", "B", "C"]});
});

and in my index.jade file
    body
ul
each val in books
li= val


This is all just to try and get the routing to work, but I get "index.jade:10 8| 9| ul > 10| each val in books 11| li= val 12| 13| Cannot read property 'length' of undefined" meaning that it's not even getting anything. I've tried using routes but can't get that to work either.
>>
>>54733613
{books} or some shit like that
>>
>>54733709
Comes out as a list but with no results. I'm pretty certain the main problem is with express routing and API rather than jade.
>>
I am using busboy with node.js for chunked uploads (with blueimp jquery file upload).

https://github.com/blueimp/jQuery-File-Upload/

How could I change the name of the file in first chunk and retain it for the next chunks.

Example:
1st chunk - filename is index.jpg (save as index-1.jpg)
2nd chunk - receive headers with filename index.jpg again instead of index-1.jpg

So, my question is, how could I override the headers in the jQuery-file-upload to send me index-2.jpg back??

Or is there an easier method to ensure unique filenames for uploads which get sent in the temp folder?
>>
>>54732420
I'm getting my domains at namecheap, and there you can get a so called whois guard which protects your information from being associated with your domain.
>>
>>54733814
>whois guard
yeah, its less hassle than writing in wrong information on other registrars lol. but the other registrars did fucking charge $10 for whoisguard
>>
>>54733746
#{books}
>>
>>54733992
Illegal token. Again, pretty certain it's a problem with express
>>
>>54733810
Chunked means you're using Node streams, which presumably means you can just pipe your uploading file into a write stream that creates a file of your choice. You shouldn't have to fuck with the incoming stream.

Go read about node streams, they're gud
>>
>>54734260
yeah, I can get this to work. but how to send back progress info??
>>
>>54734260
>>54734268
could I use socket IO for the progressbars??
>>
File: just CORS Things.jpg (245 KB, 604x575) Image search: [Google]
just CORS Things.jpg
245 KB, 604x575
I am playing around with 4chans api a bit.
With php i can fetch everything just fine, with
js CORS is always getting in my way.

I've set the correct headers, but still get the error "Cross Origin Request blocked: header not the same as boards_dot_4chan_dot_org"

But it clearly is the same!?
The return header shows the same origin.

I am at a loss here, guys. Hope someone can point me in the right direction
>>
>>54735475
because that api only allows requests from 4chan? you can't just send that header in the request. the code needs to be running on that domain.
>>
>>54735475
That's not how it works, anon

The site that you're getting the data from (in this case 4chan) sends those headers to let you know from which origins the content is accessible, it's not the other way around
>>
>>54735513
>>54735579
Thanks for the quick answers.

So since its read-only and js has nothing like file_get_contents should i just stick to php?

guess this should go into /sqt/
>>
>>54735655
if you want to serve up shit from the catalog you're going to have to proxy it through some server, it's probably a good idea too since 4chan has a pretty quick fail2ban policy so you'll def want to cache the results and serve those, if its done adhoc you'll quickly find your servers IP banned from 4chan.
>>
File: i proxy myself.jpg (112 KB, 391x463) Image search: [Google]
i proxy myself.jpg
112 KB, 391x463
>>54735579
>>54735513
>>54735705
Got it to work now, i am "proxy-ing" through myself...

In the end i think i'll just go with php
>>
goind a ffc challange
i have to verify USA numbers and have a problem with "( )" in (555)555-

how do I build a regex that checks if there a 3 numbers between ( and )
for example telephoneCheck("(555 - 555 - 5555") should return false
>>
>>54733814
>>54733846
sorry for being ignorant and looking into it myself, but should I be able to register a domain on namesilo.com and get whois guard protection from namecheap?
>>
>>54737044
\(\d{3}\)
perhaps like this?
>>
What's something simple I could make to learn react?
>>
>>54737668
a 4chan quote generator
>>
>>54737336
doubt it.
>>
>>54737718
sounds interesting

what should it exactly do? explain
>>
File: MEN_stack.png (166 KB, 993x599) Image search: [Google]
MEN_stack.png
166 KB, 993x599
why is MEN stack not more popular? how the fuck did the A (the worst of all frontend MVCs) slipped into it?

was it to not trigger feminists and SJWs?
>>
>>54737642
works, thanks
tried with [\u0028\d\d\d\u0028], have never worked with regexp before
>>
>>54737765
https://regex101.com/
>>
What's the best way to serve a web application written in C++?
CGI?
>>
https://www.npmjs.com/package/is-number
>is-number
>Returns true if the value is a number.
>238,561 downloads in the last day

web dev is fucked
>>
>>54738294
noob here, is this the better way ?

if (typeof x === "number") {return true;}
else {return false;}
>>
>>54738385
99% of the time, yes. JS is retarded with numbers though.

https://gist.github.com/jonschlinkert/e30c70c713da325d0e81
>>
>>54737752
Because Node is a pain in the ass
>>
>>54738294
Well you need packages for for just about everything else so I'm not surprised.
>>
>>54737752
Because using a rest API for your web application gives you a lot of flexibility. You can build anything to consume that API, whether it's a front-end is framework, a native desktop or mobile application, you can even write another node application with a templating engine to consume and present it.

You can get node to handle the presentation too if you want, there are tons of templating engines for it. I'm writing a new one at work.

MEAN stack is a meme tho, tutorials teach it because each element in the "stack" is a popular framework, though Mongo is definitely on the decline, last time I used it was for a tutorial. You aren't locked in to any of that shit, you can pick any combination you want.

At work we have a Node.js backend, which uses CouchDB as a database and Redis as a cache. The front-end is provided by a php application that consumes the node rest service. It works for us. We might be using RethinkDB for a new thing we're starting.
>>
Why is traversing the dom so hard in plain JS?
>>
>>54739166
That's what jQuery exists for.

But you should really be fluent with the vanilla commands. Just practice them a million times, practice them on random sites you go to. Eventually it will get easy
>>
I spent a full hour just browsing through mean tutorials and it's confusing as fuck. I wanted to follow some tutorial to build a poll app but I need to learn some express, pug and socket first.

I'm trying to figure out how to use Pug and I may be retarded. I installed it and what now? How to use it? I usually open a text editor, write html and save it as .html. How to do it with Pug? And these npm installations are somewhat confusing too, I'm just a little bit lost in all directories, don't know what am I installing, what I already have and what is global and what is local.
>>
>>54738294
JavaScript is popular because it's very beginner friendly.

That means there's a lot of monkeys using it and managing to cobble together something that works.

We are trapped in the belly of this terrible machine
>>
File: iwantorubmygirlbitsonhers.jpg (55 KB, 900x506) Image search: [Google]
iwantorubmygirlbitsonhers.jpg
55 KB, 900x506
>tfw you're 2 bullet points away from completing a project
Bought to go from paid developer, to paid world of tanks commander until support calls start rolling in

feels good mane

hows everyone elses work projects going?
>>
>>54739309
I've switched between 3 frameworks and I'm still unhappy
>>
>>54739475
MVP nigga

unless your boss wants it done a certain way, whatever framework you're using is good enough.

I'm using laravel in a way its not really supposed to be used and its been amazing to me.

just get shit done.
>>
>>54739188
>I'm trying to figure out how to use Pug

What the fuck is Pug? Use Atom or Sublime Text if you want a decent editor.

>And these npm installations are somewhat confusing too, I'm just a little bit lost in all directories, don't know what am I installing, what I already have and what is global and what is local.

NPM installs a recursive fractal of directories within directories. Just treat the node_modules folder as a black box, and never go in there. You include installed modules in your node application simply with require("myModule");

If you install something globally with NPM, that means you're installing it and providing a command to access that thing. So for example express comes with a built in generator that will build a boilerplate file structure for an express application if you type 'express' in the terminal. You don't need to globally install shit unless you need command-line/terminal access to that thing. development tools like nodemon, gulp, webpack and all that shit needs to be globally installed, but dependencies for a specific application can usually be installed without the -g tag. Just make sure you --save them in your package.json so you know what you have in your thing.
>>
yo /wdg/ is Elixir any good or is it just a meme language? I see half the Rails community jizzing over it.
>>
>>54739846
>I see half the Rails community jizzing over it.
Probably not then.
>>
>>54739037
>Because Node is a pain in the ass
yeah, but there are tons of extensions for it.

i was using nodes fs and felt like killing myself (cant even delete directories if files iniside)... but then I by mistake found fs-extra on npm and I'm happy again.

also, performs much better than php on my machine
used "ab -c 100 -n 5000 http://localhost...", that would take minutes if done on php server
>>
>>54739842
>What the fuck is Pug?
He's talking about the templating language pug a.k.a. Jade.

They had to change the name because of a copyright thing.

>>54739188
First of all, you don't need pug. Just use html. If you are going to use pug, you need to install a program that compiles it into html. Follow the instructions here:
http://jade-lang.com/command-line/
(replace jade with pug)
>>
>>54740019
** forgot csrf tokens get generated on this url
here is test without csurf
>>
>>54739309
>Bought to go from paid developer, to paid world of tanks commander until support calls start rolling in
I don't understand what the fuck this means.
>>
>>54740243
Neither did I.

I think he meant he's going to play World of Tanks after he finishes the project he is working on but then again, who knows.
>>
>>54737752
Does anyone have a list of all the different Stacks you can get?
>>
Not really webdev, but this seems to be the most relevant place.

My problem, in bullet point form:
* I need to scrape a site, extracting specifications for a large number of products.
* One product per page; I can easily generate links for and wget all the pages.
* Data is presented in a consistent way, but there's no nice semantic markup- it's a 90s table layout.
* Happy to either write code or use whatever GUI helper tools exist.
* It's a one-and-done job; it doesn't need to be updated going forwards.

What is the best way to do this?
>>
>>54740444
Check out Kimono for the scraping. Then I'd just make a simple Express app that renders the JSON.
>>
>>54740520
His brother, parents and clan.
>>
Need your help senpai. I need to do some animations that trigger when the element is scrolled to view. Any better way than to calculate if the element is visible on scroll. And once it's visible do the animation with either CSS or velocity. Or is there some easier/more efficient way I'm completely missing?
>>
>>54740434
Not sure what you're asking. You can use anything with anything else if you're determined enough.
>>
>>54739166
It isn't. You're doing it wrong.
>>
>>54739475
Have you tried not using frameworks?
>>
>>54740778
I mean like, someone posted MEN, there's LAMP etc.

What are all the other options?
>>
>>54740769
What?
>>
>>54740775
You either need Javascript that guesstimates the scroll point based on window size, or else just try jQuery waypoints
>>
Is web dev dead considering everything is getting an app nowadays?
Should one learn mobile app development instead?
>>
>>54740903
That's suicide.
>>
>>54740921
I'm using Go, RethinkDB and TypeScript right now (GRT?). LIterally anything can be a stack. Stop buying into memes.
>>54741050
This is why other programmers look down on framework lego webdevs.
>>
>>54740921
They aren't boy-scout merit badges. Just take the first initials of whatever technologies you're using, combine them in a way that looks like a word in UPPERCASE, and you've got yourself a "stack". Here you go:

> Cassandra
> OpenTTD
> C++
> KVM

Tada, COCK stack
>>
>>54741127
all of my lel
>>
File: 1406679279260.png (160 KB, 355x395) Image search: [Google]
1406679279260.png
160 KB, 355x395
>>54741127
>Powered by COCK

It's beautiful
>>
File: 1460396742555.jpg (88 KB, 413x395) Image search: [Google]
1460396742555.jpg
88 KB, 413x395
>>54741127
>>
Hi /wdg/ real programmer here. (j/k)

>>>/vg/agdg/ are having problems with a shitposter. It has prompted me to want to filter his images. So I don't know JS and it's not something I have a particularly big interest in learning. But it'd be sort of cool to be able to do some shit in it.
So I started maybe 5 minutes ago and If ound this https://huddle.github.io/Resemble.js/
Seems like a neat library afaik
And I've found that I can type to get an element ID.
document.getElementById("pc#######")
So I'm thinking maybe I'l just hook my code to some event which I might imagine 4chanX is calling to a function to match between the different thumbnails found in the posts and compare it to an offline stored list somehow.

But as I said I'm not the most interested (yet, I do find the progress I've made so far rather intriguing) so I'm just wondering where I can go to learn the bare minimum JS to do this stuff?
>>
>>54741288
>to get an element ID.
To get an element by its ID obviously. I'm not dumb.
>>
>>54741288
>It has prompted me to want to filter his images
Appchan X can do this.
>>
>>54741367
Only from MD5 sums last I checked.
This guy changes his images regularly/ all the time.
>>
>>54741395
Completely different images or changing 5 pixels each time etc.?
>>
I got a phone interview with a guy for a web-dev job in a few hours. How do I not vomit. Fuck Im nervous.
>>
>>54741418
Anon don't worry about me fucking up my comparisons OK?
It's generally just ugly compression (because the point is that source is ugly)
See
>>>/qa/541513
>>
>>54740989
>guesstimate
Nigga it's trivial to calculate if the element is in view or not. That isn't my problem. Just curious if there's better way to doing it. Note some bloated library isn't an option.
>>
How do I equate a string of numbers and arthmetic symbols.
Like.
var result="1+2+3"
console.log(result) ///Gives 1+2+3
Instead I want 6.
>>
>>54741508

new Function('return 1+2+3')();
>>
>>54741508
eval
>>
>>54741442
fap
>>
>>54741654
This
>>
>>54741288

how to deal with shitposter 101:

ignore them
>>
>>54741442
>>54741657
Suck his dick.
When that's out of the way what could possibly go wrong?
>>
>>54741666
>how do deal with people who don't ignore shitposters
Filter the shitposters and hide replies.
So that's what I'm intending.
>>
>>54741654
So I don't have to have all my pent up testosterone for the interview? I don't want to come off as a beta male.

>>54741670
Its a phone interview unless you mean kiss up to him. if that is the case then Im going to suck his dick soooooooooo good.

I just hope the interview questions aren't so hard a retard like me can't do them.
>>
>>54741103
>This is why other programmers look down on framework lego webdevs
I wrote an entire CMS platform without a framework and it's a bitch to maintain. I've never used a framework for any project. Most of them have a considerable learning curve and un-necessary bloated shit that I don't need, but if I had to do it over again I would have done it with a framework.
>>
>>54741794
Make sure you report back afterwards so we can all learn from your mistakes.
>>
>>54741794
>So I don't have to have all my pent up testosterone for the interview?
That would actually be a good thing.
Thread replies: 255
Thread images: 26

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.