[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 Dev. 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: 37
File: wdg.png (880 KB, 824x553) Image search: [Google]
wdg.png
880 KB, 824x553
I forgot to put the subject in edition

Last thread >>55052549

>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://www.youtube.com/watch?v=JxAXlJEmNMg&feature=youtu.be&list=PL7664379246A246CB [Embed] lecture series.

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

>Backend development
https://en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks
backendDevelopmentBookmarks.md

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

>NEET guide to web dev employment
https://pastebin.com/4YeJAUbT/
>How to get started
https://www.youtube.com/watch?v=pB0WvcxTbCA [Embed] - "WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice"
https://www.youtube.com/watch?v=zf_cb_Nw5zY) [Embed] - "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
>NEW!
https://www.openshift.com/
>>
What's the best way to close a menu/dropbox thing when the user clicks outside? binding to the window or document event seems so hackish.
>>
I need a place to host an mp3 file where it can be accessed at domain.com/MyAudio.mp3

Godaddy's delegate access is down right now but I need to put this audio somewhere until they're done repairing. Where can I do this.. or would any of you be willing to host the file on a domain of yours temporarily?
>>
>>55096192
Bind a click listener to the body to intercept the next click and see, if it was inside your menu.
>>
>>55096228
Buy a $3 VPS and don't use godaddy.
>>
>>55096399
It needs to be publically available, does this work for that? I can hit a domain.com/file.mp3 publically?
>>
>>55096484
Do you not know what a VPS is?
>>
>>55096512
No
>>
Is storing a varied amount of page content in database and then rendering it on request a really shitty idea when compared to rendering it on submission and then presenting that via templating?
>>
File: 1352527830867.jpg (16 KB, 400x300) Image search: [Google]
1352527830867.jpg
16 KB, 400x300
>>55096561
Like pictures? Like profile pictures? That's good for security I guess
>>
>>55096605
No, like random amount of markdown.
>>
>>55096626
I've never heard of storing html in a database, templating is the standard way to go. You can either template server side or client
>>
>>55096369
Well, that is exactly what I do not want to do. It's an ugly hack to involve the body/window/whatever with functionality that has nothing to do with it.
>>
You only have to set the A records of a domain if you just run a Wordpress website, right?
>>
>>55096897
Ah, I see.. why does go daddy cost so much then? Just for the hundreds of tools and customer service?
>>
>>55097019
You pay for the brand name.
>>
mfw every developer has a preferred framework but only 2% of them ever tried all the big 3 in real projects.
>>
there a less wordy way to do this?

re.sub('\\x[a-z0-9][a-z0-9]\\x[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]','',text)
>>
>>55097524
would be helpful to know what it is you're trying to capture
>>
>>55097625
well I just meant looping over the same set of characters in regex

the thing is just asking for \x(any char * 2)\x(any * 5)
>>
>>55096192
:not()
>>
>>55098079
Oh, that could work. Thanks.
>>
>>55097692
How about
[\n][a-z0-9]{0,2}[\n][a-z0-9]{0,5}
>>
>>55096192
I like to give modals an invisible full-viewport overlay that sits behind the modal itself and handles click events.

>>55096561
Maybe there's some weird edge case where this makes sense (eg GitHub gists), but this is pretty universally a bad idea. Its best practice to separate your content from your display logic, because you want to be able to change your display logic without manually editing all your content. This is exactly why markdown blogging has gained popularity over HTML WYSIWYG. Also saving user submitted content that's executable in any way is dangerous.
>>
File: children-965506_960_720.jpg (110 KB, 720x720) Image search: [Google]
children-965506_960_720.jpg
110 KB, 720x720
Hello guys, I have a question so if anyone could shed some light, that'd be super.

I'm a high-school dropout but recently decided it was time to go back and get my degree.
I have a choice between web design or web dev

Im not sure which to pick, web dev is the harder course but I enjoy graphical design a lot more and am kinda stupid.

What would you guys advice ?
>>
using node and redis as my session store (all in memory, not using the mode in which it writes every change to disk, only snapshots every 60s) should I manipulate session variables synchronously?
every tutorial seems to do it normally
>>
>>55096548
k
>>
>>55096888
I agree, but I've never found a better way.
>>
File: ss (2016-03-11 at 01.50.16).jpg (166 KB, 597x815) Image search: [Google]
ss (2016-03-11 at 01.50.16).jpg
166 KB, 597x815
>>55098440

Bottom tier of web design is extremely competitive because of retards like pic related. But finding a GOOD front end dev is nearly fucking impossible. It requires two very diverse skill sets of design/arts and programming. So very few people who are smart enough to be good devs bother doing pure front-end, because it generally pays less and requires you to actually have some artistic talent as well.

Also don't confuse the course difficulty for actual job difficulty. Front end programming is just as complicated as back end. The course probably seems easy because they don't teach anything worthwhile beyond basic js.
>>
>>55097524
yes, use {} to repeat something a given number of times, eg.

\\x[a-z0-9]{2}\\x[a-z0-9]{5}

also, it's a good idea to use raw strings so that backslashes work the way you expect - use r"expression" instead of just "expression" (see the python doc pages on re)
>>
>>55098152
using {0,2} will match 0-2 times, not 2 times - make sure that's intended behavior
>>
>>55099095

Link to article?
>>
I need help with logic.
Lets say I have a set of messages being chucked out of a DB with PHP. Each message will have basically the following format: The message content and a delete button to remove it.

<div class="message">
<p class="date"><?= $date ?> | <?= $sender ?></p>
<p class="message"><?= $message ?></p>

<button id="detele_btn">Delete</button>
</div>


How do I go about making each of those buttons correspond to deleting that specific message? (i.e When I click on the nth delete button, message n gets deleted)
I realize I might need to include some JS/jQuery somewhere to help.
>>
>>55099202

https://css-tricks.com/tales-of-a-non-unicorn-a-story-about-the-trouble-with-job-titles-and-descriptions/
>>
Any guides out there for responsive wireframing in photoshop?
>>
>>55099222
There's many possible ways. One fairly good option would be something like this:

<div class="message" id="message_<?=$message_id ?>">


Then when a delete button is pressed, get the button's parent element and pull the id from its id attribute. This will all be done in JS and should not require jQuery unless you're a wimp. Use the id to delete the message in whatever way you've set up.

Also, I'm assuming you have a proper primary key in your database that you can use as the ID.
>>
File: 1410056650311.png (40 KB, 200x200) Image search: [Google]
1410056650311.png
40 KB, 200x200
>>55099253

Job description:
>Frontend Developer
>Write front-end code in HTML/CSS/SCSS and JavaScript
>Occasionally write front-end code in PHP (WordPress) or Ruby (on Rails)

Her response:
>Umm, PHP and Ruby are not front-end languages..

How can people like this exist? Does she seriously expect to make pretty template with html and then hand them off to a back-end developer so he can waste his time adding embedded code?
She says she has 2+ years of experience. What the fuck has she been doing for 2 years, making wordpress websites? And why are there cucks in the comment section defending her? REEEEEEEEEEEEE
>>
Does anyone know any beginner at home work similar to sticky, but for jobs in the uk??
>>
post ur fizz buzz solutions, your best and the most convoluted for lols

for( i = 1; i<20; i++)console.log(i%3 == 0 ? "fizz" : i%5 == 0 && "buzz" || i) 
>>
>>55099321
Thank you, this is very helpful. I don't quite understand this part though:
>when a delete button is pressed, get the button's parent element and pull the id from its id attribute

How do I get the parent element?

>I'm assuming you have a proper primary key in your database
Yeah, each message has a unique id.
>>
tuples or arrays?
>>
Why am I so horrible at design?

>tfw head is thicker than a bowl of oatmeal
>>
>>55097373
Vanilla.js is the best framework. Prove me wrong.
>>
>>55097373
which are the big 3?
>>
>>55100362
all of us are
>developer
>designer
choose one
It's a meme
>>
anyone know how i an get html highlighting working in ts files if the html tags are in strings?
particularly im talking about the template property in angular 2 components.
kinda irks me since it works out of the box in jsx when i tried out react.
heres what i mean
@Component({
selector: 'my-app',
template: '<h1>Angular 2 Template</h1>'
})


basially i want the html parts highlighted inside the string. even if i use multi line strings with backticks.
currently using vscode
>>
File: 1464019062345.gif (2 MB, 221x153) Image search: [Google]
1464019062345.gif
2 MB, 221x153
>try to build something in angular
>all the tutorials are in typescript
>>
>>55100519
I know that feel. Then they started using it at my work.. took me 1 day to get the hang of it though. It actually does help with intellisense though. It's not that big of a deal actually, the minor cost is worth the minor benefit imo
>>
>>55100514
You don't.. If it's a larger template, link it in with a templateUrl so you can get syntax highlighting in an html file
>>
>>55100519
arent post people still using Angular 1?
>>
>>55100563
I will probably sit down with it eventually, but having to learn it so that I can learn something else drives me crazy

>>55100834
Are they? This is just a personal project so I figured I'd build it in 2, I'm not even sure what the major updates are
>>
File: dab boi.jpg (20 KB, 212x387) Image search: [Google]
dab boi.jpg
20 KB, 212x387
>>55100362
I dunno but I think I'm pretty good at design senpai

Ask away
>>
What keyboards do you guys like for web dev?
I'm tired of my shitty laptop keyboard.
>>
>>55101030
>not dictating all your code to a cambodian ladyboy you keep chained under the floorboards
>>
>>55101078
>>55101078
Yes, but the cambodian ladyboy needs a keyboard. What keyboard should the cambodian ladyboy use?
>>
>>55101030
Look into mechanical keyboards

Just in general, they're better for everything with a relation to typing
>>
>>55101161
Are there any you recommend in the $60-$70 price range?
>>
>>55101154
"Now do a get request in the products controller to '/products' api and hydrate the view boy!"
>>
Anybody have any experience with Hadoop?

One of my last classes for my Masters was taking Hadoop. I thought it was an interesting program and would like to learn more, but I'm not entirely sure where to start.

Should I learn Java more in depth? Am I foolish for wanting to learn Hadoop instead of something else? Anybody have experiences?
>>
>>55101190
See here: https://www.youtube.com/watch?v=Z_6UBGbGWTY
>>
>>55101264
>Am I foolish for wanting to learn Hadoop instead of something else?
https://www.chrisstucchio.com/blog/2013/hadoop_hatred.html
>>
>>55096228
Just upload it to mixtape.moe or jii.moe

problem solved
>>
>>55101330
This article is stupid. Hadoop isn't meant for data less than petabytes in size. No fucking shit you can use other tools for data that's smaller.
>>
>>55101407
It's not stupid because people actually do that
>>
>>55101410
I guess that's a fair point. He does say that Hadoop has it's advantages when used correctly. But, it sounds more like he's criticizing Hadoop rather than criticizing the idiots who use it incorrectly.

How did you find this article? I'd like to find similar blogs/websites.
>>
>>55101430
I found it on /r/programming like a year ago or something.

If you want to immediately tune me out because you heard the word "reddit" I won't stop you but it's a great way to find good and interesting articles and places to find them.

Other than that I like CodingHorrors
>>
>>55101493
I personally don't have anything against reddit. I just grew up with 4chan and have always used 4chan with no need for reddit, but I'll check it out!

I just graduated with my masters, and I'm not entirely sure what direction I want to go to, so I'm looking for different sources to hopefully give me an idea for my next move.
>>
>>55101523
oic

Yeah the "I know how to program but not what to program thing"

I'd actually recommend doing some front-end development, it teaches you a lot about who you are and what you like in indirect ways.

You can still bring your technical backend knowledge to the table by being a logical bridge between the two. Strictly front end people are best suited for something like Photoshop but you can bring that to fruition in ways that make sense and are relevant to the backend.

Best of luck man :) reddit may be the best of communities but it's still quite a remarkable tool
>>
>>55096689
>I've never heard of storing html in a database
Isn't that pretty usual for CMS?
>>
>>55099734
> How do I get the parent element?
Look up a Javascript tutorial. That's bare-basics.
>>
>>55100432
Probably Laravel, RoR, and .NET?
>>
>>55101190
I use a "CM Storm Quickfire Rapid" which is typically available for around $70. Works great, but the font on the keys is le edgy which just gave me an excuse to buy blank keycaps
>>
>>55101622
Thanks for the advice brotha! Have a good one.
>>
>>55101744
Stop calling everything edgy.

Not everyone lives in insecure memeland like you, some people just like how things look.
>>
File: IMG-20160615-WA0005.jpg (558 KB, 1024x768) Image search: [Google]
IMG-20160615-WA0005.jpg
558 KB, 1024x768
>>
File: 098702983734.png (13 KB, 833x587) Image search: [Google]
098702983734.png
13 KB, 833x587
I'm trying to get or replicate this font. Except it's not explicitly a font.

The Japanese set of characters has within them roman characters, By default these characters display like the font in pic related. Any Ideas?
>>
File: nowheretorun.jpg (20 KB, 477x284) Image search: [Google]
nowheretorun.jpg
20 KB, 477x284
Sup

I need to make a simple html interface for handling a small database. I am familiar with wordpress.

I want:

-Login
-Display data
-Enter data
-Update data
-Delete data
-Being able to filter and get results out of that filtered data (like totals)

It's pretty much bringing a basic Excel spreadsheet interface to a website.

Any plugins you guys know that can help me?

Cheers
>>
>>55102625
There are some online tools which will do OCR and try and find the closest font, but they are only as good as their DB so YMMV. Usually they will at least find a font that is close, although often they aren't free fonts.
>>
i wanna expand my knowledge on rest apis.
i usually only work client side with them but ive made small apis with flask and express.
flaks is really great though.
are there any more neat frameworks i should know off? preferably with the simplicity of flask.
im also thinking of trying out go or dart for backend stuff.
>>
>>55099095
So I've never coded a FizzBuzz implementation, and without looking up the answers, I threw a simple one together in python in 2 minutes. And she's complaining about 'OMG MATH?'. What an idiot. This is why the tech industry scares the fuck out of me, that there's idiots like this who can't even do the simplest problem ever
>>
>>55099095

Employer: I'm sorry, you're asking me when a basic understanding of print statements, loops, and functions would be used? You realize that web development goes beyond using stackoverflow every time you want to move an item from one side of the screen to the next right?
>>
>>55102625
It's not a font. It's unicode full width characters
>>
>>55099460
>Umm, PHP and Ruby are not front-end languages..
Correct, I don't know why that triggered you

On the whole though FizzBuzz represents a fundamental understanding of how computers work, why they exist and they kind of code you want to be writing. If you can't figure that out atleast in premise that's a huge red flag.
>>
File: REEEE.png (486 KB, 1740x1188) Image search: [Google]
REEEE.png
486 KB, 1740x1188
>>55099095

>>>/wsg/1134271
>>
>>55103378
>having free time is bad

Arbeit macht frei
>>
>>55102034
2007 should be AJAX and 2009 should be jQuery
>>
>>55103378
The kind of people who got into coding because of the good paying job and not because of interest.
>>
>>55103378
>have too much time in their hands
>how dare this unemployed person have so much free time
>>
>>55103378
>i was a hiring manager

Adds up
>>
>>55103378
>being able to solve FizzBuzz is suspicious
w h a t
>>
File: 35413616.jpg (31 KB, 436x336) Image search: [Google]
35413616.jpg
31 KB, 436x336
>>55103460
>Hiring unemployed people
>>
File: TOMETO.jpg (55 KB, 900x810) Image search: [Google]
TOMETO.jpg
55 KB, 900x810
>>55103487
>hiring people with less than 5 years experience for trainee positions
>>
>>55103487
>Hiring people with fewer than 1000 friends on facebook
>Hiring people that can not write a 50000 word formal essay describing their life struggle, passions, and what they love the most about diversity
>>
>>55099095
Front-end is more difficult than backend I think, but not because you need to be "artistic". I do mostly backend using Node, the environment in which my code executes is 100% in my control. On the frontend you have to write code that will work on a myriad of different browsers, and ideally write a page which functions without JavaScript enabled at all, all while keeping the resulting page as small as possible.

Front-end is very easy to do badly because UX is about more than how pretty it is. Plenty of front-end nerds focus on making it look nice and fancy, and end up with a 6mb page full of janky gimmicky crap that is awful to actually use.

At work our sites have to work on shitty old non-touchscreen phones running opera mini which could be running on a shitty gprs connection, because we have clients in the Caribbean and India and people there can't use most of the crap that most front-end devs shit out these days.
>>
>>55103378
So this guy thinks that solving fizzbuzz is a matter of having free time to work everything out beforehand, rather than, y'know, having any basic programming/problem solving abilities

At this point you might as well get applicants to dance for you during interviews.
>>
nothing more frustrating
any tips? Already doing this:
html=str(html.encode('utf-8', 'strict'))

import re
html=re.sub('\\\\','',html)
html=re.sub('(<p></p>)','',html)
html=re.sub('(<a></a>)','',html)
html=re.sub('(<h2></h2>)','',html)
html=re.sub('(<h3></h3>)','',html)
html=re.sub('(<b></b>)','',html)
html=re.sub(r'(\n)','',html)
html=re.sub(r'(\\n)','',html)
html=re.sub('(\\t)','',html)
html=re.sub('( )',' ',html)
>>
File: Capture.png (3 KB, 303x102) Image search: [Google]
Capture.png
3 KB, 303x102
>>55103788
forgot pic
>>
>>55103549
Nah, they are equally hard, it's just that you have engineering skills so backend makes more sense to you. If you were more artistic, the backend would seem more difficult.

>the environment in which my code executes is 100% in my control.
KEK. Only if you wrote the OS, libraries, JS runtime, etc

>Front-end is very easy to do badly
It is really easy to crap up your backend too
>>
>>55103788
Google "html minifier". There are many around and they might do better than your regexes.

But if you html doesn't have much fat on it, you are going to be hard pressed to eliminate ~4MB
>>
>>55103900
shaved off 2 mb
fug this gonna take a while
don't think site can host it, its too big
100 million characters already
>>
File: doctype.png (7 KB, 430x144) Image search: [Google]
doctype.png
7 KB, 430x144
Why does this annoying "DOCTYPE" shit come with my ajax response? Its always appended at the end and is making my life miserable...

header('Content-Type: text/event-stream');
header('Cache-Control: no-cache');
echo 'data: ' . json_encode(array('today' => "test"));
ob_flush();
flush();
>>
>>55103886
>Nah, they are equally hard, it's just that you have engineering skills so backend makes more sense to you. If you were more artistic, the backend would seem more difficult.

No, I'm plenty "artistic", but databases aren't that hard. Frontend is almost entirely engineering though because it's more important that something works and performs well, than whether it looks pretty.

>KEK. Only if you wrote the OS, libraries, JS runtime, etc

You don't have to have written it yourself to be in control of it you pedantic autist. I know what runtime os, webserver etc I'm using and what features they have. I don't have to do feature testing or write polyfills for a variety of different shitty browsers with missing features.
>>
Best way to handle user sessions in php?
>>
>>55104205
I'm storing the user ID in $_SESSION. It defaults to 1, so I can associate stuff with the not logged in user. Set it to something else on login, set it back to 1 on logout.
>>
>>55104142
>ajax
>>
File: Screenshot_33.png (120 KB, 1561x714) Image search: [Google]
Screenshot_33.png
120 KB, 1561x714
thatfeelwhen you're likely the reason behind a github security update (around 1k accounts total). Didn't realize they even had a system to detect this since they clearly don't have any way to stop it.
>>
Is it better to join and filter tables in your codes or through a view on the db side?
>>
What do you guys use for technologies like nwjs/nodejs?

looking for an editor atm
>>
>>55104644
Atom. I am learning vim though
>>
>>55104644
Atom or sublime, whatever I feel like using.
>>
>>55104644
WebStorm with typescript is pretty comfy
>>
// original classes
function Animal(name, numLegs) {
this.name = name;
this.numLegs = numLegs;
this.isAlive = true;
}
function Penguin(name) {
this.name = name;
this.numLegs = 2;
}
function Emperor(name) {
this.name = name;
this.saying = "Waddle waddle";
}

// set up the prototype chain
Penguin.prototype = new Animal();
Emperor.prototype = new Penguin();

var myEmperor = new Emperor("Jules");

console.log( ); // should print "Waddle waddle"
console.log( ); // should print 2
console.log( ); // should print true


Learning Javascript. I'm a little confused.

If Penguin and Emperor are inherit properties from Animal? Why do I still have to set the name in their constructors? Can't they inherit the constructors themselves?
>>
>>55104764
If you want to write in a shitty pseudo-classical style, you should use the ES6 class syntax.

Or pick a better programming paradigm
>>
>>55102864
php, mysql and a little css.
>>
when I run googles structured-data/testing-tool for my site it says property sameAs is not recognized by google for object of type LocalBusiness

what the hell this is supposed to be easy help a wannabe pajeet out
>>
>>55105808
or, you know, node.js if you don't want to be stuck with a messy hack for making personal home pages in 1994
>>
>>55105808
you left out that he needs a masters in CS memes to operate his apache server securely
>>
File: PFFFFFT.png (7 KB, 1143x205) Image search: [Google]
PFFFFFT.png
7 KB, 1143x205
I'm having a bit of a brainfart with what should be some really simple CSS.

How do I get the child's top,left,and right to expand to the width of its parent? The bottom is the only place I want white space as I plan to have search results expand the parent.

Anyone able to help?
>>
>>55106614
Have you checked the padding for the parent? For example:
padding: 0px;
padding-bottom: 10px;
>>
>>55106655

Ahh, that's exactly it. Many thanks.
>>
Have you ever done a web conference/video call interview?

I got one at this hipsterish company where they're all in their 20s-30s and seem very energetic. I'm afraid to set up a time with them because I don't know how to handle it
>>
>>55104764
You don't have to, codeacademy just decided to include name in all of the constructors.
>>
Stupid Question, but I was looking at a code example in Angular that uses cookies
$rootScope.globals = $cookies.get('globals') || {};

what does the || {} mean? does it just mean that if the cookie doesn't exist define $rootScope.globals as blank?
>>
>>55107282
Yes.
>>
>>55107282
Exactly. It's a shorthand for
if (foo !== '' || foo !== null || foo !== undefined) {
bar = foo;
} else {
bar = {};
}
>>
>>55107383
Fuck I meant
if (foo !== '' && foo !== null && foo !== undefined) {
bar = foo;
} else {
bar = {};
}

>>
File: TYPEFACE.jpg (54 KB, 401x137) Image search: [Google]
TYPEFACE.jpg
54 KB, 401x137
Fucking fontrendering.
>>
>>55107399
You forgot 0 and NaN.
>>
>>55107453
Yeah and -0
>>55107282
Here is a list of the "falsy" values in JS
>http://stackoverflow.com/questions/19839952/all-falsey-values-in-javascript
>>
Hey, I've got a question.
I've to manage a website hosted on a cheap vps for reliability but we need to use a local machine (less reliable but with much storage) to store pictures.
What are the option to easily store the picture on the storage server but keeping the webiste on the vps ?
We thought about nfs is it safe ? Thanks
>>
>>55096127
>2016
>not using Ember
>>
Is it possible for me to make a button which toggles a website to a dark mode and keeps it that way during a session? It's on a wordpress btw.

And before that, is that even worth it? I know there are a lot of people that like dark backgrounds more.
>>
>>55107679
Yeah, keep telling yourself that.

>2016
>still needing top level controllers
>
>>
File: 1461981983799.gif (2 MB, 475x277) Image search: [Google]
1461981983799.gif
2 MB, 475x277
>angularfire2 app

maximum comfy lads
>>
Is there any money in WordPress themes?
>>
>>55107945
So just a button that toggles a few CSS classes and stores a cookie. That's not difficult, no

>>55108335
None at all. Fifty million Wordpress "devs" starve to death every second
>>
File: image.jpg (372 KB, 750x1334) Image search: [Google]
image.jpg
372 KB, 750x1334
Anyone here know about data visualization? Is d3 still the thing to use in 2016? Any other popular options? Thanks!

Pic unrelated
>>
>>55108783
d3 is the only library I've worked with. I found it to be a bit of a pain in the ass to learn, but after that it's good and has stuff for all kinds of datasets. I'm not really sure what else is out there, there might be some hot new hipster library.

What are you planning to do in it?
>>
What is the best css frameowork a-la Bootstrap, that isn't slow and bloated like bootstrap?
>>
File: help1.jpg (99 KB, 827x639) Image search: [Google]
help1.jpg
99 KB, 827x639
Oh god, PLEASE guys, give me some feedback fast. I have to finish this in about 24 hours. It's just an architecture of a main content in the front page.

I've been on Dribbble for far too long, my standards are messed up now.

Should I add some more links on the right in the header, or just put an image as a background?

3 columns or 2 for the content? I've tried this 3-column look but I don't feel it. I have NO clue how to organize it. Basically, I want to have

>the latest 10-15 posts from mixed categories
>some videos from "trailers" category
>popular posts
>>
>>55109095
purecss
skeleton
>>
File: help2.jpg (124 KB, 825x631) Image search: [Google]
help2.jpg
124 KB, 825x631
>>55109197
This is the article page (I can't tell anymore if it looks same enough as the rest of the website).
>>
>>55109095
in what scenario does bootstrap cause a problem for your web2.0 site?

can you describe your hosting platform?
>>
File: help3.jpg (113 KB, 823x629) Image search: [Google]
help3.jpg
113 KB, 823x629
>>55109233
>>55109197
And here is how individual categories look.

Basically, I removed the middle row and put large latest posts one after the other - pretty safe choice, so I guess it's ok. But is there something else I should add? I feel that I went too minimalistic now.
>>
>>55109095
It all depends which of bootstraps functions you want...

...if you want them all... welp, that's the bloat that took an unacceptable .000001seconds to load in the first place!
>>
>>55109095
>>55109198
What this anon said, pure.css is nice
>>
>>55108783
I know nothing but want to learn.

People at my company seem to use powerpivot and microsoft power BI aka just BI also SPSS/PSPP

t.pajeet
>>
>>55109095
what are you going to do with the .5 seconds/year you gain from this efficiency?
>>
>>55109254
>>55109348
I am not going to use 80% of the things bootstrap provides so I am asking for something simpler. I think i'll use purecss, seems nice.
>>
File: unnamed.jpg (104 KB, 800x800) Image search: [Google]
unnamed.jpg
104 KB, 800x800
weird shit i get sent by recruiters edition
>>
>>55109462
>knows exactly whats best
>cant describe a single requirement
i dont know why i expected anything different
>>
>>55109718
He is right and wrong. Bootstrap brings in a shitton of unnecessary crap that you will almost definitely not use and if you just want a simple responsive grid you may as well use a smaller framework.

On the other hand, even with all that unnecessary shit it's not going to slow down your site in any noticeable way so he's being a bit precious about >muh bloat

who even cares
>>
>>55096127

Say I want to scrape pastebin.com but I'm too cheep to pay to whitelist my IP

how do I jew them?
>>
>>55109855
is scrape a term outside of SEO?

youre not talking about targeting pastebin search keywords are you?
>>
>>55109964

yes

I'm talking about extracting data from their website with a headless browser

The problem is they sell the ability to do this for 25 bucks so they try to detect IPs that are trying to scrape them
>>
>>55110055
Just use a bot that pretends to have a real browser, by using headers, and a proper-looking user-agent?
>>
node.js question

I'm wondering if I can call a function within the callback associated with a mongodb connection, and successfully have that function interact with the database connection.

E.g.
mongoClient.connect(mongoURL, function(err, db) {
// err handling
var myCollection = db.collection('myCollection');
nestedFunction();

// nestedFunction is declared within the scope of the .connect callback
function nestedFunction() {
// code
// then, a database query
myCollection.find();
}

}


I think it should be alright, provided nestedFunction is declared within the callback scope, right? I've only just moved nestedFunction into the callback, so I'm not entirely sure. I think it solves the issue I expect might happen.
>>
>>55110055
there would be no value to the data unless you are in direct competition with pastebin which I know you arent
>>
>>55110230

which is why I'm not paying for it
>>
>>55110230

Also I bet you can get something worth while from pastebin if you know what to look for
>>
>>55110414
Like what? Do you collect shit copypastas and ERP chatlogs?
>>
>>55110414
what exactly about their titles, keywords and content categories do you think would be worth anyone's time
>>
>>55110441

At the rate at which they allow you to request new pastes, probably find a few credentials and some secret proprietary code
>>
>>55104583

You realize that they contact the FBI whenever they have a security threat right dumbass?
>>
>>55110551

also

>using proprietary software with a gui to submit form data instead of writing a 10 line python script
>>
>>55110173
var express = require('express');
var mongodb = require('mongodb');
var app = express();

var MongoClient = require('mongodb').MongoClient;
var db;

// Initialize connection once
MongoClient.connect("mongoURL", function(err, database) {
if(err) throw err;

db = database;

// Start the application after the database connection is ready
app.listen(3000);
console.log("Listening on port 3000");
});

// Reuse database object in request handlers
app.get("/", function(req, res) {
db.collection("myCollection").find({}, function(err, docs) {
docs.each(function(err, doc) {
if(doc) {
console.log(doc);
}
else {
res.end();
}
});
});
});

>>
>>55110589
Will I ever encounter any issues with connections hanging because they're waiting for the database connection to close (i.e. db.close())?

Thanks for the help
>>
>>55110841
no.

>>we recommend calling MongoClient.connect once and reusing the database variable returned by the callback

this is called using pooled connections and it is recommended by the framework designers.

call db.close() in cleanup function at the end of your application's life
>>
>>55104644
Im starting to become impressed with all the features in VS Code, I cant figure out what MS's angles is by giving it away
>>
How do comparators send thousands of AJAX requests to websites without getting banned ? want to do a comparator but I only have one IP
>>
>>55110892
cool beans dude, thanks a million
>>
>>55110913
Microsoft is just trying to get developers interested in their ecosystem again.
>>
why does the company i am interning with want me to build a laravel project on top and using their legacy system
>>
File: Untitled.png (30 KB, 1621x655) Image search: [Google]
Untitled.png
30 KB, 1621x655
I'm trying to make a really simple animation, the idea is to have different images fly past the screen and loop.

I've searched online for codepens and similar things but I can't seem to get any like this.

Where can I lean to do VERY basic animations in css (or similar) to get this up and running?
>>
>>55111309
http://www.w3schools.com/css/css3_animations.asp

It's pretty simple. Btw, you don't have to literally make it fly around, just reset it to a starting position.
>>
>>55111309
Look at the clouds here
>http://codepen.io/pmk/pen/ByXOOq
and maybe look at this for an intro
>https://robots.thoughtbot.com/css-animation-for-beginners
>>
>>55111390
Good point, now I feel stupid about the spinning around
I've followed w3schools but I'm not sure their animations are what I'm looking for.
Also is css animation the correct approach for this?
>>
>>55111249
I'm going to add to this a question and I would appreciate it if someone helped me.

They use their own legacy PHP login from around a half a decade ago. I need to somehow integrate this system with Laravel Authentication. Is this even possible? Everything I have seen suggests it is not.
>>
>freecodecamp
>2000 hours
I don't have 5 years to spare on learning, I have a job and I don't have time for this, is there where else I could learn Javascript and Node.JS?
>>
>>55111435
Sure, why not? What you want to do is very simple. I don't even know how else you would do that.
>>
>>55111488
Kysssssss

Why can't people stop looking down to webdev and think they can learn this shit over night? Maybe how to build the wordpress site with premade templates. Do you think this is some joke?
>>
>>55111592
Because it is, I already know PHP I just have no desire to pursue it. Are you offended because your entire career can be learnt in a week?
>>
>>55111604
It's not even my career, and knowing some syntax doesn't mean shit.
>>
>>55111803
It means that I could get things done if I needed to and that I don't need to waste 2000 hours learning Javascript.
>>
>>55111836
Spoken like a true Pajeet
>>
File: 1460552110246.jpg (23 KB, 604x311) Image search: [Google]
1460552110246.jpg
23 KB, 604x311
>>55111836
>i don't need to learn javascript

At the moment of your inevitable failure sometime in the near future, I want you to remember this post. Somewhere, I will be enjoying a wholesome kek.
>>
>>55112151
I never said that though, if you can't comprehend basic sentences I don't know what you're doing in /wdg/.
>>
>>55112174
/wdg/ is exactly where retards belong
>>
>>55112174
No need to get so defensive anon. I'm rooting for you, really I am. Go learn Javascript from a 4-hour online course and then come show us your amazing projects. We'll all be holding our breath.
>>
applied for 3 rails positions and got rejected on every one

guess im gonna build some more sites for my portfolio

fuck
>>
>>55111604
>Are you offended because your entire career can be learnt in a week?

Okay look. When a Java baby comes to Javascript and thinks he already knows everything because he fizzbuzzed his way through university, that's understandable, he doesn't know any better.

But you're a PHP dev. You of all people should know by now that you don't get to try to think you're better than anyone else. You're at the very back of the human centipede of programming languages.
>>
>>55112464
>triggered
>>
I'm only a beginner in web design but I'm working on a project right now and need some advice.

What would be a good starting point for trying to make a website that you would navigate by clicking, holding, and dragging the same way you would in a zoomed in photoshop file. I imagine it would be done using javascript but does anyone know of something I could go off of for an example?
>>
File: drupal_7_0.jpg (69 KB, 336x280) Image search: [Google]
drupal_7_0.jpg
69 KB, 336x280
I'm trying to use the redhen crm module with drupal 7. One page in the module lists all the contacts in a table, and there is a pager that cycles through all of the contacts if there are lots of results. The problem is the pager always shows only 2 pages no matter if there is only 1 total result, or if there are hundreds of results. The client needs this fixed, but I don't have a clue what is going on or how to troubleshoot this pager mess. Does anyone know how I can troubleshoot this problem? I'm desperate because I'm starting to look bad, but I have no clue where to begin to fix this problem. I'm pretty proficient with webdev and php, but this one is really stumping me because it is all in the core functionality and a module I didn't write. Does anyone have any clues about how I can figure this out?
>>
>>55112544
>does anyone know of something I could go off of for an example?
Google maps?

Canvas element might be what you're looking for.

Or you could not be a special snowflake and just make a normal website using well- established working UX patterns.
>>
File: 1408314157945.png (51 KB, 128x131) Image search: [Google]
1408314157945.png
51 KB, 128x131
>>55112580
>drupal
>I'm starting to look bad
>>
I'm still kind of iffy on flexbox browser support, what's a good, light alternative to do things it can usually do?
>>
>>55112679
What do you do that makes you look so great when you are setting up a super complex crm/cms with lots of permissions n shit?
>>
File: FCC.jpg (231 KB, 977x791) Image search: [Google]
FCC.jpg
231 KB, 977x791
>>55111488

It's not 2k hours tbqhfam. Also its a scam and relatively poor learning resource
>>
>>55112679
Are you at your job when you typed that? Cause I am at a real job that pays me real money.
>>
>>55112748
http://caniuse.com/#feat=flexbox

Any browser that can't support flexbox should not be on your support spectrum.IE 8 is 5 years old, fuck it off.
>>
>>55112803
I was more worried about Android not supporting wrapping.
How many devices are still on 4.3?
In a way I care more about mobile since this is something I expect people to pull up more on their phones.
>>
Google doesn't give me anything on this specific error, similar errors are usually resolved by adding parenthesis to the method

TypeError: delete() takes exactly 1 argument (0 given)


Here is my route for delete in the controller:

@app.route('/delete', methods=['POST'])
@login_required
def delete(job_id):
if request.method == 'POST':
job = JobPost.query.get(job_id)
db.session.delete(job)
db.session.commit()
return redirect(url_for('home'))


Here is my view:

            <form id=delform action="{{ url_for('delete', job_id=job.id) }}" method="post">
{#<input class="btn btn-xs btn-danger" type="submit" name="delete_job" value="Delete">#}
<a onclick="$('#delform').submit();" class="btn btn-xs btn-danger" id="delete_job" href="#">Delete</a>
</form>
>>
>>55112748
I dunno. I don't use CMS because I'm a developer and I actually develop and maintain bespoke web applications by writing actual code. I'm sorry I can't help you with your configuration menus.

>>55112794
Well done Pajeet, enjoy your 67 rupies per hour.
>>
>>55112842
>How many devices are still on 4.3?
mouse over the browser on that page, you'll see a usage statistic.

Android Browser 4.3 is 0.73%
IE 8 is 0.61%
IE 11 is the highest at 5%
>>
>>55100519
Yeah, Ms is pushing a new language, my bet is it being dead in a few years like most of their other front end language attempts.
>>
>>55100834
2 only just came out of beta, so yeah. But they will have to upgrade eventually.
>>
>>55111488
>I don't have 5 years to spare on learning, I have a job and I don't have time for this, is there where else I could learn Javascript and Node.JS?

Learn the basics.

Get an junior developer job

I've learned a fuckload more working with node in production than I ever did on my own.
>>
>>55112847
Anyone?
>>
>>55112895
Obviously you are not a developer because if you were you would know that you can use a cms and write lots and lots of your own code to customize every aspect of it, especially with drupal.
>>
Any pointers or resources on developing responsive sites?
>>
>>55112895
>I don't use CMS because I'm a developer

Oh my.
>>
File: type.jpg (189 KB, 1013x655) Image search: [Google]
type.jpg
189 KB, 1013x655
I pray somebody will help me this time, a lot of people here right now...

Anyway, can you tell me which type looks the best to you (inside the red box there are 4 different types: Arial, Arial Condensed, Helvetica and Chronicle Display)?

Also, I'm not sure how to use effectively the middle part ("Traileri" section). I might have to switch the layout yet again, but I kinda like the left and right parts now.
>>
>>55113002
Either the first one or the last one, imo. I'm leaning more towards the first.
>>
Which ORM module would you guys recommend for Node?
>>
>>55113046
Yeah, me too. The only thing is that I use the serif one for my article titles and wouldn't like to change that, but I can't tell anymore if it is fine if I use both the serif and sans serif.

See

>>55109233
>>55109197

E.g. I like the serif one for titles on the articles and for smaller thumbnails, like those on top of the black header, but I feel that the sans serif (Arial) is better for everything that is bigger and what I want people to focus on. But I don't know if I should mix them like that or go all in with one of them.
>>
>>55110913
I will try it out.

I use Atom right now.

Mostly because it has a cool name but it's just really slow opening up.

I really like the folder open option.
>>
File: 1462118811080.gif (4 MB, 471x272) Image search: [Google]
1462118811080.gif
4 MB, 471x272
>>55112972
But I can just write a bespoke web application to create an objectively better solution to the problem. I can choose everything about the stack that I'm using, what language, what database(s), caching solutions, whether its a RESTful api or whether the backend also handles the presentation, etc. Plus there are plenty of frameworks available in many different languages that enable rapid prototyping of web applications.

At work we use Node.js with Express, CouchDB and Redis as data stores. There are some elements on other servers that are still written in PHP but they're gradually being migrated over to Node. A new project we're starting might use PostgreSQL or RethinkDB, we haven't decided yet but it's nice to have all these options and be in control of what we're building.

So why would I take an existing web application and hack at it to try to fit it into a certain role unless I was actively looking for a cheap, quick and dirty solution? We do have one project using Wordpress, and that is literally just there as a cheap, quick dirty placeholder while some legal stuff gets sorted out, and its just there until we have to actually pay attention to it.

CMS are for Pajeets, don't be a Pajeet, learn your craft.
>>
>>55113002
Serif fonts are usually discouraged.
>>
File: 1274312945009.jpg (12 KB, 317x330) Image search: [Google]
1274312945009.jpg
12 KB, 317x330
>>55113002
>Anyway, can you tell me which type looks the best to you (inside the red box there are 4 different types: Arial, Arial Condensed, Helvetica and Chronicle Display)?

You know the font will change depending on what device the page is viewed on, right? Nitpicking over this shit is a waste of time. Focus on usability, nobody gives a shit about fonts except you.
>>
>>55113242
You sound like a fucking retard. I'm pretty skilled with my craft, but sometimes you get brought into projects and they already have something set up that they want you to work with, and sometimes it makes absolutely no sense to start something from scratch when perfectly viable solutions exists. Take your bullshit buzz word languages and your completely undeserved sense of entitlement and go suck a dick.
>>
>>55113306
>they already have something set up that they want you to work with, and sometimes it makes absolutely no sense to start something from scratch when perfectly viable solutions exists

i.e. you don't have a choice, because when a job lands in your sweatshop in India, you just have to do what your boss says or you don't get your bowl of rice at the end of the day.
>>
>>55113249
Hm, well, it depends, but sans serif often ARE better for web. But due to high resolutions that rule is no longer really the case. A lot of sites use serifs.

Actually, I just tried Lora on my paragraphs and it looks very very good, but now it would probably be too much serifs. Ahh, I don't know, I just like very much Chronicle for big titles, Lora for paragraphs and Arial for everything else.

>>55113278
Will it change if I set it on my server and make users download it?

I don't think that nobody cares about fonts, I also enjoy this, but of course, I won't argue that I should focus on other things (which I do).
>>
New to the web dev game
>FF doesn't support media queries
well, shit
>>
>>55113407
>Will it change if I set it on my server and make users download it?

Results may vary.

>>55113415
>FF doesn't support media queries
Firefox supports media queries that are in the W3 spec. It doesn't support the ones that are still at the draft phase.
>>
>>55113415
the good news is you dont have to take ff into consideration as it is joke tier.
>>
>>55112958
i cant feed my family with rupees
>>
>>55113752
Pajeets only use PHP, Node is too advanced for their tiny minds to comprehend.

Junior developer position can still be pretty good money depending on where you are.
>>
>>55113752
My entry-level developer position that I got with no degree and no experience was £28,000 per year. Would probably be more in London but I don't speak Arabic.

Its not Silicon Valley but wouldn't call it rupees either.

Are you expecting to teach yourself in your spare time and walk into a mid-level position with no actual commercial experience? If so, good luck.
>>
Are all of you inbound marketing experts? Do you submit a projected cost of customer acquisition when you compile a SEO bid?
>>
>>55113970
No?

But good luck pulling numbers out of your ass and building up your client's expectations for no reason.
>>
>>55113968
My plan is to teach myself and then teach normies how to use my custom CMS and focus on obtaining more clients.

I already have 3 clients and a real job during the day.
>>
>>55113892
>Pajeets only use PHP

Java. You're forgetting Java, they use that too.
>>
File: montae.jpg (49 KB, 563x582) Image search: [Google]
montae.jpg
49 KB, 563x582
>looking through job ad archives
>back in 2008 people were basically offering training on the job as long as you knew PHP
>mfw those times will never return

>>55113968

How'd you get that job?
>>
>>55113242
yes, and then you can spend all your time updating and changing out all the carefully chosen bits of your custom stack when they get deprecated or something new comes along.

or you can move on to the next thing and leave it for some poor fuck who picks it up later, probably 2 years from now, and everything will feel horribly out of date.

but if you used a standard cms that lots of other people support, and everyone keeps updating it regularly, it stays pretty coherent, and doesn't degrade into a shitshow.

want proof? try opening up a backbone app someone wrote 3 years ago. you'll rage.
>>
I've been doing programming for about 6 months and was told by some people a while ago that I was ready for a junior front end position. I thought I would look up some questions I might get asked during an interview and found this: https://github.com/h5bp/Front-end-Developer-Interview-Questions


Am I really supposed to be able to answer most/all of these? I know about 20-30% of this, but the rest of the topics being about asked about are stuff I've never even heard of.
>>
>>55113401
I don't know why I expect rational discussions from anyone on here anymore. Fucking hell, everything goes back to pajeets and 'shit tier' languages/technologies as the basis of every argument.
>>
>>55115962
Developer interviews can be pretty brutal. It's not unheard of for people to ask all kinds of obscure questions as well as look for people with a solid understanding of algorithms and data structures.
>>
is jsfiddle not working for anyone else or is it just me?
>>
>>55096192
>>55096399

Amazon S3 would probably be quicker, cheaper.
>>
Lets say I have this:
<div class="msgbox" id="1">
This is the message content for this particular message.
<button onclick="myFunction(1)">delete me</button>
</div>


Instead of manually passing the value of the div ID (1) to the function, is there a way to use jQuery or vanillaJS to get the value of the ID in which that particular function was triggered? Keep in mind that there will be several divs like this on the same page, but with different ID's.
It doesn't have to be like this either, if there's a better way to approach this please let me know.
>>
>>55116400
http://jsbin.com/felewalopa/edit?html,js,output
I put it on JSBin. The divs are generated by iterating through messages stored in the database. I need some help lads.
>>
>>55116400
myFunction(value){
if (value === 1){
console.log(document.getElementById(value.toString()).innerHTML)
}
}

???
>>
>>55116469
http://jsbin.com/wuqisuruja/1/edit?html,js,output

though you should really consider using event listeners instead, inline javascript is bad practice
>>
>>55116534
Oh man, I probably worded it poorly. My bad. Please check the example here >>55116469 maybe you'll better understand with an example. I want to dynamically pass the ID of the div to the function without hard coding it every time.
>>
>>55116563
This is it! Thank you. I'll modify it to use listeners, just wanted to get a gist of how to get the values dynamically.
>>
>>55116222
Than $3? Nope.
>>
>>55116400

It doesn't get cleaner than this. No need for ID's or inline JS.

https://jsfiddle.net/2c8vhu7b/
>>
>>55104583

Top bantz

>>55110551
>>55110564
 thug lyfe
>>
>>55116737
The ID is necessary, because each message is being pulled from a database then displayed on the page. When I click the button I'll send the value to the backend to have that message deleted. Thanks anyway, I learned something new from this.
>>
>>55116788

For semantic reasons, the ID attribute should be used for CSS only. If you need to use the ID for anything else then put it in a data-* attribute. You can use data-* attributes for storing anything from JSON to ID's like you need to.

https://jsfiddle.net/2c8vhu7b/2/
>>
>>55116897
>>55116788

Forgot to mention that if you need to use $(this).parents('.msgbox') a lot then you might want to cache it in a variable instead of calling jQuery's $ every time.
>>
Do you use fake addresses when registering a domain?


I don't like the idea of people having my address.
>>
>>55116572
EZ-PZ

You're outputing the shit with PHP right?
>>
>>55106263
>node.js
>>
Why don't we do a group project?
Thread replies: 255
Thread images: 37

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.