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

/wdg/ - Web Dev. General

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 366
Thread images: 37

File: wdg.png (880KB, 824x553px) Image search: [Google]
wdg.png
880KB, 824x553px
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 (16KB, 400x300px) Image search: [Google]
1352527830867.jpg
16KB, 400x300px
>>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 (110KB, 720x720px) Image search: [Google]
children-965506_960_720.jpg
110KB, 720x720px
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 (166KB, 597x815px) Image search: [Google]
ss (2016-03-11 at 01.50.16).jpg
166KB, 597x815px
>>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 (40KB, 200x200px) Image search: [Google]
1410056650311.png
40KB, 200x200px
>>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 (2MB, 221x153px) Image search: [Google]
1464019062345.gif
2MB, 221x153px
>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 (20KB, 212x387px) Image search: [Google]
dab boi.jpg
20KB, 212x387px
>>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 (558KB, 1024x768px) Image search: [Google]
IMG-20160615-WA0005.jpg
558KB, 1024x768px
>>
File: 098702983734.png (13KB, 833x587px) Image search: [Google]
098702983734.png
13KB, 833x587px
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 (20KB, 477x284px) Image search: [Google]
nowheretorun.jpg
20KB, 477x284px
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 (486KB, 1740x1188px) Image search: [Google]
REEEE.png
486KB, 1740x1188px
>>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 (31KB, 436x336px) Image search: [Google]
35413616.jpg
31KB, 436x336px
>>55103460
>Hiring unemployed people
>>
File: TOMETO.jpg (55KB, 900x810px) Image search: [Google]
TOMETO.jpg
55KB, 900x810px
>>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 (3KB, 303x102px) Image search: [Google]
Capture.png
3KB, 303x102px
>>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 (7KB, 430x144px) Image search: [Google]
doctype.png
7KB, 430x144px
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 (120KB, 1561x714px) Image search: [Google]
Screenshot_33.png
120KB, 1561x714px
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 (7KB, 1143x205px) Image search: [Google]
PFFFFFT.png
7KB, 1143x205px
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 (54KB, 401x137px) Image search: [Google]
TYPEFACE.jpg
54KB, 401x137px
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 (2MB, 475x277px) Image search: [Google]
1461981983799.gif
2MB, 475x277px
>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 (372KB, 750x1334px) Image search: [Google]
image.jpg
372KB, 750x1334px
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 (99KB, 827x639px) Image search: [Google]
help1.jpg
99KB, 827x639px
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 (124KB, 825x631px) Image search: [Google]
help2.jpg
124KB, 825x631px
>>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 (113KB, 823x629px) Image search: [Google]
help3.jpg
113KB, 823x629px
>>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 (104KB, 800x800px) Image search: [Google]
unnamed.jpg
104KB, 800x800px
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 (30KB, 1621x655px) Image search: [Google]
Untitled.png
30KB, 1621x655px
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 (23KB, 604x311px) Image search: [Google]
1460552110246.jpg
23KB, 604x311px
>>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 (69KB, 336x280px) Image search: [Google]
drupal_7_0.jpg
69KB, 336x280px
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 (51KB, 128x131px) Image search: [Google]
1408314157945.png
51KB, 128x131px
>>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 (231KB, 977x791px) Image search: [Google]
FCC.jpg
231KB, 977x791px
>>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 (189KB, 1013x655px) Image search: [Google]
type.jpg
189KB, 1013x655px
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 (4MB, 471x272px) Image search: [Google]
1462118811080.gif
4MB, 471x272px
>>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 (12KB, 317x330px) Image search: [Google]
1274312945009.jpg
12KB, 317x330px
>>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 (49KB, 563x582px) Image search: [Google]
montae.jpg
49KB, 563x582px
>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?
>>
>>55117250

we need a logo.
>>
>>55116897
>>55116916
Thanks a lot senpai. I appreciate it.

>>55116991
Yes, this is being done with PHP. Didn't have much of a choice.
>>
>>55117280
Yeah I don't know what we could create either.
>>
>>55117250
From scratch or contribute to existing FOSS?
>>
>>55117409
From scratch because contributing to preexisiting projects isn't as fun.
>>
>>55117444
Do you have an idea then?
>>
>>55117454
Not really.
>>
>>55117460
And there is the problem. You don't have any ideas, but someone that does is more likely to just start hacking away, rather than look for partners on /wdg/.
>>
>>55099095
and
>>55103378

Actually hurt me, physically. It's not that people are claiming proficiency in a field they clearly do not have but that other people FUCKING HIRE THESE PEOPLE.

Fizzbuzz is insultingly easy, and if you can't figure it out first go with no prior knowledge in any language you claim to "know" then you _don't fucking know shit and quit saying you do_.

/rant
>FUCK!
>>
>>55112464
Where am I as a Python webdev, anon? Am I at least stapled to a hot bitches asshole? Is her name Ruby?
>>
>>55117454
There's any number of things a group project could be.
A chan in not-PHP
Forum software in not-PHP
An OS simulator in the browser
A complete CMS.
A search engine
A JavaScript game engine
A browser-based image editor
A fully-functional HTML5 Video Player (include support for things like MKV and subtitles, for example)

Just pick something you think isn't done enough, and think about whether you want to do that. Just going "anyone wanna start something?" and saying "i dunno what" won't get you anywhere.
>>
>>55117601
You are missing my point. Why would someone look for co-founders on 4chan, which are likely to quit early on, instead of just starting to actually write code?
>>
>>55117632
Meant to quote the other guy, but yeah, I get what you mean.
>>
>>55117632
I have alot of my own projects but I've never done a group project before (self taught).
>>
>>55117601
>A chan in not-PHP
Working on one in Go. Need a login system for board creation and administration. Looking into OpenID at the moment.
>>
>>55117748
What have you got so far?
>>
>>55117748
Just make your own? Security isn't that hard you know.
>>
>>55117839
I'm more concerned about password recovery. Wouldn't I have to run my own mail server and make sure my mails are not filtered as spam somehow?

>>55117832
Basic stuff like demonisation and configuration loading/reloading, JSON API, Websocket client management with change feed subscription, almost finished image upload handler in pure Go and HTML template rendering.
On the client-side there's some post rendering I ported from the previous version, a working options framework and panel, feature detection for loading polyfills, websocket connectivity and reconnection via a FSM and a custom background setting script.
>>
>>55117839
>Security isn't that hard you know.
Don't make anything.
>>
>>55118036
do you really think salting and using bcrypt is that hard?

>>55118000
yeah password recovery would be an issue, but if it's just for a chan-like board do you really need it?
>>
>>55118000
>password recovery
For such an event, you could probably code something to reset your password from the command-line, seeing as your only accounts will be those that are administrators of some sort.

>websocket
Oh? I'm guessing this is for instant updates to threads and shit, instead of polling the API for new updates every x seconds?
>>
>>55118074
>>55118104
With board creation I probably do. What if somebody loses a password and can't access his board controls? On the other hand, would people want to associate any email with an imageboard? I'm still not sure about this.

Websockets will be used for updating posts as they are typed in character by character. If that proves too much overhead, then just word by word. You can see the latter implemented in a similar way on the previous version. Mind the cancerous community. https://meguca.org/a/
>>
File: 1385107057.jpg (22KB, 251x231px) Image search: [Google]
1385107057.jpg
22KB, 251x231px
Can you use .fon fonts in websites?
>>
>>55118074
Of course it isn't, you retard. But security doesn't only involve hashing passwords; there are tons of ways to fuck up a website. Security isn't easy, when you think you've covered everything, there's always something someone else will exploit.
>>
>>55118204
No, you have to convert them.
>>
>>55118253
As long as you're doing simple shit like base64 before entering stuff into your database and proper html purifying you're pretty much fine.
>>
>>55118263
Can you display fonts like ttf without aliasing?
>>
>>55118266
What about SQL injection?
What about XSS?
What about CRSF attacks?
>>
>>55118276
>sql injection
prepared statements, non-shitty database access layer
>xss
html purifying to remove any unwanted elements
>crsf
idk what that is desu
>>
>>55118306
I'm aware these techniques exist, but the higher the profile is of your website, the more difficult your security will become
>>
>>55118170
>What if somebody loses a password and can't access his board controls?
In such an event, they would contact you about a lost password, and you can provide them a new one. It shouldn't be a problem unless you intend to have hundreds of mods, all of whom lose their passwords regularly.


>https://meguca.org/a/
I see. That's pretty neat.
>>
>>55118325
Yes, but how do they prove a board is theirs?
>>
>>55118324
That's why you use things that have been proven to work, I just use the php HTML Purifier because there have been almost 0 weaknesses found. Implementing security yourself isn't always the best option, but for a chan board why would you even need email control and stuff?

>>55118338
You give them a code and tell them it's their only option if they lose their password. Make them print it off or some shit.
>>
I am thinking of starting a torrent site which will be highly specific to a niche.

It won't be a private tracker, just a public site like piratebay/kat which only has links to torrent and has no upload functionality.

How hard is it to find a webhost to let you host this type of content and let you do things like running a torrent client to extract details from a torrent?

How easy it is to get fucked by copyright and DMCA related shits?
>>
>>55118393
>How hard is it to find a webhost to let you host this type of content
Very hard

>running a torrent client to extract details from a torrent
This changes per company.

>How easy it is to get fucked by copyright and DMCA related shits?
Depends if you're willing to hire legal help.
>>
>>55117307
Oh, well your ID is stored in the DB right?

When you go through your while loop to print all the shit just add it in there on the button the same way you ID'd the div.
>>
>>55118416

> Very hard
> This changes per company.

I've read about a host called online.net which is quite popular and lets you run seedbox on their servers. But I'm not sure if they'll ignore DMCA complaints :(

> Depends if you're willing to hire legal help.

Is this US related or you are talking about any corner of the world? I don't live in US.
>>
>>55118492
I think every country has some sort of anti-piracy agreement almost.
>>
>>55118515
Thanks for the help :)
>>
>>55118354
Oh, that works. Thanks.
>>
File: zf2.jpg (33KB, 449x373px) Image search: [Google]
zf2.jpg
33KB, 449x373px
Using zf2/php and need to set up an authentication system with user profiles as well. Was checking out ZfcUser - seems ok... docs are not great though.

Any thoughts on the best ways to set up authentication? either 3rd party libs or from scratch.
>>
>>55118872
Laravel.
>>
What's the best way to secure a Wordpress site? Anyone have experience with the codebase?
>>
>>55118939
Don't install any plugins.
>>
>>55118872
>Any thoughts on the best ways to set up authentication? either 3rd party libs or from scratch.

Use oAuth. You shouldn't store passwords yourself, it's very easy to fuck it up
>>
>>55118939
99/100 times people get hacked because they don't update, it's a shitty theme or it's a shitty plugin. It's usually the plugin.
>>
>>55115818

Stuff doesn't get depreciated very often. Plus if you built something using old tech it'll continue working just fine for as long as the server has power. The maintainability of an application has more to do with the code you write rather than what libraries and frameworks you used. Ideally you do want to actively maintain things, but if you don't there aren't really any huge downsides. At some point you might have to rewrite something or migrate functionality over to something new piece by piece, but that's not exactly a thing that needs to be done all the time.

But you can't just leave a CMA running, if a CMS does get updated you'd better be johnny on the spot with the updates because you could have a publicly known security hole in your site. Your CMS might as well be a remote access shell for every script kiddie on the internet.

The Panama Papers were leaked because an out of date WordPress slider gave the attackers access to the server. But it's fine lmao who cares just slap a CMA on there and walk away.

You can just forfeit all control over your development process, but you can't do so while pretending it's a good idea or expecting anyone to respect what you do. That's why you'll always be a Pajeet if you rely on CMS
>>
>>55096127
I want to enable my users to send pictures through websockets. Basically I take the base64 representation of the picture, send it over my websocket and the other users just do
var img = document.createElement("img");
img.src = "data:image/png;base64" + message.picture;
document.getElementById("pictures").appendChild(img);

What's the worse a malicious user could do?
>>
>>55121817
>img.src = "data:image/png;base64" + message.picture;
You're missing a comma at the end there, I think?
Besides that, the only thing that comes to mind is possibly malicious content inside of the image that takes advantage of known exploits in the format. Maybe use a sanitizer of some kind before sending the image, or at least verify that it's actually the correct format?
>>
React is a huge load off after trying to build UIs in jQuery for years

Much better paradigm
>>
Wordpress randomly doesn't show some thumbnails RRREEEEEEEEEEEEEEEEEEEEEEEEERRRRRRRRRREEEEEEEE
>>
>>55121817
1) If you are sending anything big, don't use websockets. HTTP is a lot more optimized for this.
2) Don't encode as base64. Websockets support binary frames. Use ArrayBuffer.
>>
I spent SO MUCH FUCKING TIME just writing a Wordpress template from scratch and adding some additional functions (if I can do it without a plugin, I code it myself). Now I don't feel "better" than others, I just feel I wasted my time. I didn't even use any libraries or CSS frameworks.

Meanwhile, """Pajeets""" get shit done in a day just hacking together plugins and bootstraps, customizing some premade theme and roll in cash - and their website is not even much worse than mine.
>>
>>55121817
Send the binary over datagram
>>
Do any of you has a side project that turned profitable? How long did it take to do so?
>>
File: Capture.png (118KB, 1363x725px) Image search: [Google]
Capture.png
118KB, 1363x725px
my python program is slowing down over time, even though I'm not doing anything else resource-intensive

I have an array of some 15 elements which is constantly being overwritten, and two pointers consistently increasing (which sets the filenames and position)

everything else is redone on each pass

what could be causing this? It went from 1.25 passes/second>1.1 passes/second>1pass/second and is dipping below now

surely it can't be the fault of the two variables, right? What else could it be?
>>
>>55122822
That's because Wordpress is the only thing Pajeet knows. Do you have any idea how many Wordpress-only chopshops India has? They have oodles and oodles of prewritten plugins on hand because all they ever do is churn out the same websites with horrid underlying code
>>
>>55122955
one possibility, if it is the fault of the variables, is making a tuple of the 5000 positions needed I suppose
would that speed things up?
>>
>>55122955
Would be incredibly helpful if you could post code instead of task manager scrots
>>
Mongo/node question:

I want to do an if check on whether or not a certain document exists within a collection in my database.
How would I go about doing that? Would this work:
if (db.collection('myCollection').find({"query" :  "queryvalue"}).toArray().length > 0) {
// code
}
>>
>>55122987
https://docs.mongodb.com/manual/reference/method/db.collection.count/
>>
>>55122983
http://pastebin.com/uZwBBqcv

see each pass practically everything is reset
I know there are other issues but just focusing on why it is slowing down
>>
>>55123000
>https://docs.mongodb.com/manual/reference/method/db.collection.count/

god bless you fampai
>>
>>55123001
First of all if you are going to use regex within a loop you should use re.compile() to compile each regexp first. Some of your regexes can probably be combined, too.

Generally your code is a bit hard to read, since everything is deeply nested within a loop. There's a lot of duplicated code (e.g. switch at lines 144 and 164 are completely identical) so the first thing you should try to do is break down these duplicate blocks into functions.

Consider trying to make your code a little more Pythonic:

if number_on==0:
include_header=True
else:
include_header=False


Can be changed to:

include_header = (number_on == 0)


And

categories=[]
for element in soup.findAll(('li'),{'class':'category normal'}):
categories.append(clean(element.text))


Can become:

categories = map(lambda e: clean(e.text), soup.findAll(('li'),{'class':'category normal'}))


Cutting down on lengthy code that can easily be shortened while still being simple to understand is the first step. This code is just very difficult to make sense of so I'm not sure where to start debugging how fast it goes.

Bonus: bug in the file path on line 224.
>>
>>55122822
>Spend time
>WordPress

You fucked up. Learn a php framework like Leave or Symphony or some other language/framework. If you're building bespoke stuff and actually give a shit about what you make, it makes no sense to use a CMS
>>
>>55123179
yeah I know the structure is very convoluted, but unfortunately with yattag you have to keep your outputs nested and a second bonus of having a non-linear structure is you can do conditionals that don't require variables

an example of the first one:
you have to say (if you want a bracket 5 deep)
with tag('html'):
with tag('body'):
with tag('thread'):
with tag('div'):
with tag('p'):
text('Hello World')


and if I need to check 5 things (element.parent.name, element.name, boolean state, element.text, element.parent.text) I don't have to delegate out those to functions through some function through like a tuple. I can just do the conditional and if I need to branch off at each stage I can do so easily
so it's mostly convenience, Its probably not the best it could be but its fastest this way and easiest to debug (if you already understand whats going on)

thanks for the other advice though
>>
>started working for a website
>they want me to make a page/blog with information and videos alongside
>upload the videos to the brand's youtube page and embed them to the website page
>SEO complains that that's not the proper way to do it
>as why
>uhh well uhh youtube uses flash player and it's slow and uhh it's ugly
>tell him youtube uses HTML5
>wont listen

Am I in the wrong here?
>>
>>55123409
are they paying you to follow company policy or not? of course you're in the wrong
>>
>>55123449
There is no company policy regarding this. Why would I use the shitty outdated player on the website, that's garbage, and has almost no controls or anything, and waste time, over simply embeding a youtube link, that would also bring traffic to the youtube page?
>>
>>55123504
it's that's the company does it IS their company policy, even if it is unofficial.
Also presumably the company youtube is for stuff like their ads or whatnot, not hosting whatever it is you're hosting
>>
>>55123556
Whatever bro, you're illiterate.
>>
>>55123504
Show him he's wrong, by right clicking on the damn video. If he insists, take it to a higher up.
>>
>>55122822
make a template and sell it to pajeets
>>
>>55123409
You're correct.

I can't see any reason as to why you go to the effort of implementing your own inferior video player when a YouTube embed takes half a second.
>>
File: file.png (555KB, 527x900px) Image search: [Google]
file.png
555KB, 527x900px
I know I'm late to the party but I went 8-2 and this is what I placed.

I was around 2.3k mmr preseason.
>>
>>55123875
HOTS is a trash game that takes absolutely zero skill. This coming from a plat V league shitter that was in top 50 MMR wise in EU before I quit.
>>
>>55123919
give it another try, its fun
>>
Sorry somewhat stupid question but I was wondering how to completely center my body tag using html, no css. I have align=center there but it only horizontally centers it, not vertically as well.
>>
>>55124169
impossible without table
>>
>>55123409
>SEO complains
when the search engine optimization is complaining to you then its time to double your daily dosage
>doesnt want to utilize youtube
thats the opposite of SEO
>>
>>55124178
Really? You 100% sure? Damn
>>
>>55124191
why not use css or even better a js framework
>>
>>55124205
I would use css but its for a personal web browser home page, and if it's all in one html document its easy to transport to other computers, and I wouldn't have to edit things.
>>
>>55124191

if you're targeting old browsers, do it in js. otherwise use flexbox
>>
>>55124205
>a framework
he just wants to center some stuff sempai
>>
>>55124232
put the css in a <style> tag bro. you can even have images in a single html file if you are so inclined
>>
>>55124169
>>55124191
You can use a number of <div> tags and css to imitate the effect. Just google it for specifics.
>>
>>55124264
>no css
>css

wow
>>
>>55124169

http://stackoverflow.com/questions/2830296/using-style-tags-in-the-body-with-other-html

Babby's first Google search.
>>
*{
text-align: center;
}
>>
>>55124353
>http://stackoverflow.com/questions/2830296/using-style-tags-in-the-body-with-other-html

This didn't help, I tried this. Maybe I did it wrong?

>>55124369
>no css
>css

wow
>>
>>55124484
what's with the aversion to css?

throw the html and css file into one folder, and you can transport it super easily

better yet, if you dont want that extra double click to enter the folder, why not just define the link href with that in mind. then all you'll have to do is move the folder to the new computer, drag the html out of the folder into the parent directory and you've eliminated the extra double click

all in all, it'll be less work that this styling without styles
>>
>>55124484
>Maybe I did it wrong?

Most likely. Try this: http://www.w3schools.com/TAGS/tryit.asp?filename=tryhtml_style
>>
>>55124534
I have to edit file paths if I'm transferring to a different OS wouldn't I?
>>
>>55124543
>http://www.w3schools.com/TAGS/tryit.asp?filename=tryhtml_style
Trying this in the actual website there, and when i do vertical-align:middle, it doesn't do anything except change text to black since its not color styled anymore.
>>
Do all node callbacks use the same parameters?

I'm trying to find documentation for mongodb's insertOne method. I assume it can use a callback with it, but I can't find anything written about it.
>>
>>55124600
>vertical-align
that is not what you want, that is and old property used for tables.

It's clear that you don't know your shit about CSS.

What you need is flexbox. Google how to center with flexbox
>>
>>55124563
hm, I don't think so. for instance, lets say you drop the folder onto the desktop, then pull the html file out onto the desktop

the css link href would be href="folder_name/styles.css"

This is true even of Windows, which works with backslashes. I assume this is the case because the browser handles the linking/rendering.
>>
>>55124657
https://docs.mongodb.com/manual/reference/method/db.collection.insertOne/

That function is synchronous. Learn to google pajeet
>>
>>55124693
woah, most dank

but where on the page does it say that it's synchronous?
>>
>>55124747
It doesn't, but it says that the function returns a value, and can throw errors. That alone and no mention otherwise means that it is synchronous.
>>
>>55124657
yes it can use callback optionally
insertOne(doc, options, callback)



all callbacks are not the same type. for more info visit http://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#insertOne
>>
Ok so I gogled some flexbox stuff like the other poster said, and after putting it into the html it just moved the body down slightly, didn't vertically center it
>>
>>55124563
Just put the CSS file in the same path as the HTML file, and use relative paths in the HTML file?

OR, or, use <style> tags?
But if you're really adamant about not using a <style> tag, just put your styling shit into the "style" html attribute.

<div style="text-align: center;">
>>
>>55124837
>http://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#insertOne

Thanks for the help

>>55124802
WHAT A TWEEST
>>
>>55124850
><div style="text-align: center;">
This is the simplest option and it never crossed my mind to rec it because we never do it otherwise

Do this, mang
>>
>>55124843
google more, or post a jsfiddle
>>
>>55124886
><div style="text-align: center;">
Tried this, didnt work? I mean the text is already horizontally aligned, it just needs to be vertical.
>>
>>55124867
haha wow, you got me there. my bad
>>
>>55124951
whatevs dude, i'm glad you gave enough of a shit to help me in the first place

god bless u
Thread posts: 366
Thread images: 37


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.