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

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

Thread replies: 255
Thread images: 32
File: Clipboard01.jpg (172 KB, 1024x1344) Image search: [Google]
Clipboard01.jpg
172 KB, 1024x1344
Death to PHP!

Previous thread: >>54391008

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

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

>Learning material
https://www.codecademy.com/
https://www.bento.io/
https://programming-motherfucker.com/
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md
https://www.theodinproject.com/
http://www.freecodecamp.com/
http://www.codewars.com/
>Crockford on Javascript
https://www.youtube.com/playlist?list=PL7664379246A246CB

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

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

>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
http://www.youtube.com/watch?v=pB0WvcxTbCA
Good videos on the channel too
https://www.youtube.com/channel/UCVTlvUkGslCV_h-nSAId8Sw

>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
>>
First for Go.
>>
File: 1416852085957.png (193 KB, 637x517) Image search: [Google]
1416852085957.png
193 KB, 637x517
second for we're all gonna make it
>>
Third for vanilla JS
>>
Fourth for TypeScript
>>
Fifth for Gentoo
>>
>>54417078
sixth for PHP bing the only viable learning platform.
>>
>>54417153
7th for not being a pajeet
>>
>>54417153
Haha, no.
>>
>>54417194
we are all pajeet here, friend sanjay
>>
>>54414867
sorry pajeet got busy.

but where was i
oh yeah punctuation.

the reason i used the word punctuating was to imply that anon should himself punctuate before he judges. thus had you been able to understand my logic you would have read the sentence as such

>Pajeet, I would love to see proper English and punctuating used in your sentences.

Pajeet, I would love to see proper English and you punctuating your sentences before you tell me what to do; fag.

*but tried to word it nicer :)
>>
>>54417153
yes
>>
>>54417153
As someone who likes PHP, I disagree.

mysql, mysqli, PDO, mysql_escape_string, mysql_real_escape_string (depracted) mysqli_real_escape_string

It's shit and 90% of the documentation is deprecated defecation.
>>
>>54418464
>It's shit and 90% of the documentation is deprecated defecation.

what PHP has the best documentation with some of the best looking examples and comments I have ever seen.
>>
>>54418502
Then why is it every time I am researching an issue I have to wade through deprecated answers for a decade before finding something relatively useful?

I can go to php.net and find documentation that hasn't been updated, nor has comments, after 2008.
>>
What's the difference between

var funcName =  function() {};


and

function funcName() {}


Why would I use one or the other?
>>
can one of you gentlemen explain to this poor pajeet why this fucking sidebar wont extend to the bottom of the container?
>>
>>54418657
http://pastebin.com/xWgrGF0i
>>
>>54418627

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions#Function_constructor_vs._function_declaration_vs._function_expression
>>
>>54418657
If you don't put that in a jsfiddle, I'm going to both not answer your question and murder your family
>>
File: 1452718977649.jpg (108 KB, 1109x677) Image search: [Google]
1452718977649.jpg
108 KB, 1109x677
Whats the meme behind Code writing books always having sketched out animals, specifially O' rielly? Why do they do that
>>
Should I keep a table with attempted logins?
If so, what columns?
I have user,attempted password hashed, timestamp, ip, and a session id to check for invalid sessions.
Any suggestions?
>>
>>54419100
It's just a thing O'reilly does with a bunch of their books. Why not do that?
>>
>>54419064
but i like my family :(

https://jsfiddle.net/zzwLrdop/
>>
>>54419100
It's just branding. McGraw hill had some publishing standards across their books too. With O'Riley they publish some really great stuff, but they also put our a lot of trash. MG/H only publishes shit
>>
>>54419283
https://jsfiddle.net/jd7004ha/2/

Tips:
1: for scrollbar you need defined height and need to feel it what to do with overflow
2: when you float something, it's like you're shifting gravity for it. So float both objects one direction
>>
>>54419438
ah. nice
is there any way to get the container div to the same height as the largest child element?
>>
>>54419526
probably with max-height

https://jsfiddle.net/jd7004ha/3/
>>
Does anyone know how much memory an idle TCP connection uses on Linux?

I've set the default send and receive buffer sizes to 32kb per socket connection on my web server as well as in the Linux kernel (my server will hardly ever even send or receive that amount per request to begin with which is why I set them so low). Does the kernel maintain these buffers even when an open connection is idle? I need to know this in order to figure out how much memory my server needs.
>>
>>54418792
This seems like a big load of bullshit just to allow programmers with poor algorithms skills to create functions without names.
>>
Guys, I'm going to give some advice.

Write a Twitter bot. Search for people mentioning they want a website. Have a twitter named like "cuck's web development firm" and autosend them a message "If you're serious then we can work something out".

Infinite business. No one else is doing this yet.
>>
>>54420760
you want to make the business with me? I can only do backend, if you can do the frontend.
>>
i need to write a rest api with php + codeigniter (school project).. any good tutorial?
>>
>>54420783
I'm back-end and a marketer. My front-end looks like a blind guy using dreamweaver, even with boobstrap.
>>
File: preview.png (19 KB, 1358x664) Image search: [Google]
preview.png
19 KB, 1358x664
I'm working on a website which uses various APIs from different video sites so you can make playlists of videos from different sources. The first one in the pic related is a vimeo video, and the second one is a youtube video. I've got those two APIs at least functional but I need to write the controls like transition between two videos, pausing, skipping, playing, randomization, etc.

Any suggestions for other video/music streaming services with APIs I can work with? I'm thinking soundcloud too
>>
File: 1.jpg (23 KB, 310x324) Image search: [Google]
1.jpg
23 KB, 310x324
>>54420814
kek same here, gl with development anon
>>
>>54420732
>This seems like a big load of bullshit
It's just syntactic sugar, nothing to get worked up over. You can (and should) ignore the idea of "function names" since they're kinda dumb to start with. The primary difference lies in hoisting and occasionally function names are relevant in recursive calls but if you depend on either you're probably wiring bad code.

>just to allow programmers with poor algorithms skills to create functions without names.
Don't know what it has to do with algorithms skills but anonymous functions and closure semantics enable a lot of interesting constructs. Definitely worthwhile in the context of JS
>>
>>54421009
It just has to work for the fucking user goddammit. How many other languages have a function structure half as complex and full of arbitrary rules?
>>
https://www.nsa.gov/assets/js/main.js

I'll just leave our nation's finest codebase here.
>>
i've come to the realization that my job will continue being just asp.net ecommerce stuff. Kind of boring. Been there a month now. I need a cool project to work on the side.
>>
>>54421044
Well functions are pretty fundamental to JS. Compare the rules around function deceleration in JS to inheritance/access modifiers in C++ and Java and it's really rather simple. Plus you can ignore the subtleties of things like variable hoisting 99% of the time, I've had to recall the rules around it like twice in the last year.
>>
>>54420846
NicoNicoDouga. Also there's a shitload of open file servers out there with music.
>>
Implementing a custom audio player for http://nigge.rs
>>
>>54420783
>>54420814
>>54420860
>can work magic with front end
>can't into design at all
>autism gets triggered if design goes ahead of usability
Working with designers is both a blessing and a curse
>>
File: 1453682586050.png (9 KB, 338x339) Image search: [Google]
1453682586050.png
9 KB, 338x339
>>54421212
just wondering why you are doing it on the web? Shouldn't it just be a desktop application? Sorry im new to all of this.
>>
Is using position:relative and just positioning everything like that bad practise?
>>
>>54421771
why not a website?
>>
>>54421771
I meant custom audio controls, it still uses HTML's built in support for playing sound
>>
>>54421781
>http://nigge.rs
Oh my bad, i didnt see you were building it for a specific website. I thought you were building a music/video for a desktop, thats why I asked about the localhost
>>
>>54421212
>tfw i'm also making an audio player
>>
I am making a small business web page, 5-10 pages. Is there a guide to what I should be putting on each page, I know it sounds basic but I keep re-arranging shit and adding/removing stuff and would love a guide of what is the standard for small business websites (industrial/service industry)
>>
Woul meteor make a good platform for a game streaming site (got a unity runtime i want to show to someone) or is a bit of a meme
>>
>>54422410
It's standard to talk to your client. And look what competitors do.
>>
>>54422499

>look what competitors do

This is both my issue and a bonus.

No one in my industry has a website that doesn't look 10 years old and I don't think any of them use up to date SEO techniques, if I can make on that looks half decent and uses proper practices then it will be really ahead of the game.
>>
>>54422499
>look what competitors do
This is challenging because there are a bajillion web devs out there.
>>
To www or not to www. That is the question.
>>
>>54421772
What do you mean? Everything is position relative by default.
>>
How often do users visit the parent page on a dropdown link, by that I mean if you hover over "services" and 4 services drop down, is it common for users to check the "Services" page or does it get avoided.
>>
>>54422458
Depends. Live streaming or prerecorded?
>>
Any godaddy subscribers?

If I buy a domain + hosting for 1 year and let's say
that my domain+hosting will expire soon, are they going to notify me about it if I would extend for another year or not?
>>
>>54422933
never ever use godaddy. ever.
>>
>>54422673
Never www.
>>
>>54422933
See >>54422941
>>
>>54422809
Mostly avoided. That's why our business side insists that you CAN'T do that. Instead gotta first navigate to "services" and then navigate to whatever service you want. Drives me fucking nuts but they won't listen.
>>
>>54422968
so whats a good domain+webhoster then?
>>
>>54423008
Namecheap/Gandi for domain and see OP for a VPS.
>>
>>54422969

That's interesting, cheers.

I have the issue of having 4 services, and the customer may not know what is best for them, so how will they know what drop-down to click on, and it seems like bad practice to require them to click on every service to check.

On the flip side we are a quote based company, so they tell us what outcome they want and we tell them what service we are using, they don't REALLY need to know how the magic happens so to speak.

This shit fucks with me so much as it seems like there is no right answer.
>>
I understand, if someone has no choice but to use PHP because of legacy code or retarded management, but there is no excuse for willingly using PHP.
>>
>>54423094
Best alternative?
>>
>>54423094
Go.
>>
What's wrong with PHP?
>>
>>54423336
It's old. And everything that's old gets improved upon.
Plus most people simply suck at it.
>>
What do I do guys, I can layout the website but when it gets to styling and picking a color pallet I shit the bed.
>>
>>54423700
look up template sites and steal colors/layouts.
>>
Are you guys all running on Macbook Pros?
>>
>>54424454
No.
>>
File: me.png (312 KB, 389x386) Image search: [Google]
me.png
312 KB, 389x386
>>54423700
>guys
>>54424454
>guys

please dont be so patriarchal
>>
>>54424796
there are no girls on the internet
>>
>>54424868
what about me
>>
>>54424883
tits or GTFO
>>
>>54424883
FBI agent confirmed
>>
>>54424938
but this is a worksafe board
>>
File: Comp Cigs.jpg (130 KB, 640x480) Image search: [Google]
Comp Cigs.jpg
130 KB, 640x480
Hey /g/,

Just learned some HTML and built up a basic site: http://96.61.17.240. I took some inspiration from 4chan.org/frames

What I want to start using is something like php, but you guys always talk trash.

Comments on the site and what back end I should use?
>>
>>54425028
<br /> > </br>
>>
Ok wdg, I need to make a web app in Python or Ruby during a hackathon at work. Choice of language will depend on my teammates, but it'll probably be Python although I'd prefer Ruby.

I'll most likely be the most experienced programmer, and while i have extensive experience in web development, I have very little experience doing so with Python or Ruby. I am a systems engineer that mainly writes procedural scripts these days. My webdev days mostly involved PHP and codeigniter.

So back to the hackathon, it's 24 hours, it's at work, my project will involve using the github api to essentially choose available git tags for all repos in an org, and write the choices out to a file in a certain format.

Which framework should I choose? Rails and django seem really heavy for this. I've used Sinatra before and really liked its simplicity, so I might choose that if I go with Ruby. Is there something similar with Python?

If probably choose Python as this is my company org's default language, but there are already Ruby libraries to generate the file format I need.
>>
>>54425028
>http://96.61.17.240.
Site seems fucking perfect to me, dont add or remove anything,
>>
>>54418464
Why would you use anything but PDO, or better, simply an ORM?
>>
>>54420760
No one else is doing it because it's spam and your bot will be caught by spam detection and probably banned.
>>
File: 1412635557113.gif (2 MB, 400x225) Image search: [Google]
1412635557113.gif
2 MB, 400x225
>>54425028

That is beautiful anon.

Easy to navigate and simple.

10/10
>>
>>54425028
>using position:absolute on everything
>>
File: error.png (69 KB, 907x550) Image search: [Google]
error.png
69 KB, 907x550
>>54425028
I like your error handling. Well meme'd.

>>54425251
Everything? I only see it on the index.css' nav & section. Anywhere else?
>>
mfw php will outlive every of your meme hipster languages
>>
whats the best html/css editor with live preview support?
>>
>>54425091
You should choose a framework that allows you to go back in time 6 months so you can start a flashy visually impressive project, and then just turn up to the hackathon with your project already finished and nicely polished, and then win with it despite not actually creating it at the hackathon.

Because hackathons are bullshit.
>>
>>54425373
>outlive Go
Only if Google bankrupts, so no.
>>
>>54425751
Sublime 3 with Autoreload.
>>
>>54425772
Can confirm this is accurate. Most hackathons are judged by non-technical marketing people so you just need to make something flashy with a neat idea. It doesn't need to be functional or even technically possible.

Bonus points if you make something that utilizes the api of the company sponsoring the event and they get to take possession of your code afterward with no compensation to you.
>>
>>54425772
>>54425863
This is a hackathon at work. While there will be winners, my project won't win because it doesn't involve using our company's platform, so you're right about that lol.

I don't care about winning I just want to get this project done and need a framework for a relatively simple app and api that can be used by novice programmers. Honesty I'll probably end up doing the bulk of the work so don't care so much about it being good for novices as I am about the framework vein simple enough that I can build a POC app in 24 hours.
>>
Which OS do you guys prefer for your vps?

At first I tended to use CentOs + Directadmin because that was easy. But now I lean towards Ubuntu so I can just put Ubuntu on every machine.
>>
>>54425961
I'm using debian on my home server, but it doesn't really matter that much. Ubuntu gets the job done, too.
>>
>>54425751
I'm testing brackets, it's new and supports live editing, its also a fairly new ide so its not overloading with bloaty features.
>>
>>54426693
brackets is pretty good if you don't mind it crashing every time you start it.
>>
>>54426730
I'm using fedora rawhide with highdpi resolution and a precompiled RPM, you would think i'd be most prone to crashes/bugs but i've literally never encountered one. Only thing i've had to patch was the low resolution scaling for UI text.
>>
>>54423055
Ideally you should make it possible to navigate both to the main level services and every service individually from the navigation. Everything else is gimping your site in favour of desperate attempt of selling shit.
>>
>>54421044
What the fuck are you talking about, javascript's functions are one of the least shitty aspect of it.

>>54421009
>recursive calls => bad code
What?
>>
>>54416841
I have a WordPress site on One.com.
>inb4 >wordpress, I have other sites too.
For some reason, every time I make a post, I get disconnected. I've asked them several times but they're adamant it must be a problem on my end. I don't get disconnected from other things, just the website when I'm making a post.

It's been going on for a long time and they're not doing anything. The fuck should I do?
>>
>>54427374
>recursive binary tree inversion: ~40ms
>looping binary tree inversion: ~2ms
>>
>>54427533
1. check your browser (does it delete cookies or anything)
2. check your wordpress installation for plugins (Does it have a firewall or anything that kicks you out or crashes something)
3. Run your own fresh wordpress installation
>>
I refuse to believe people actually navigate websites through hamburger menus.
>>
>>54427635
They don't, that's why hamburger menus are so shitty.
>>
>>54427597
It deletes LSOs when I quit, but it shouldn't come up with me being disconnected as I'm writing because of that.

Disabled all firewalls and everything but it didn't make one iota of difference.

I don't want to lose all of the stuff if I do a fresh installation. What do?
>>
>>54427659
Hamburger menus are a very logical solution from a developers point of view. But I think people simply dont consider using things that arent right in their face. Hamburgers are like a mystery box in which nobody bothers to look into to see what's inside.
>>
>>54427558
So what? I've read my SICP too, I know javascript doesn't yet have tail call optimization, but sometimes recursive algorithms are the most readable ones and perfectly fine in non-performance critical parts of the code.
>>
>>54425942
Use Flask, it's pretty minimal
>>
>>54427705
Have you tried it with a different browser?
>>
File: Unbenannt.png (517 KB, 1920x1080) Image search: [Google]
Unbenannt.png
517 KB, 1920x1080
So, how do I show the user (especially me) where exactly he currently is on the page? Thought about breadcrumbs, but putting them into the nav at the top probably doesn't look good. Ideas?
>>
>>54427719
They're logical from a lazy developer's point of view because it's hard to design a UI that works well on large and small screens. The easy solution is to just dump all your nav links into a burger menu so it's out of the way altogether. It's the website equivalent of a junk drawer.
>>
Recommended books for learning javascript?
>>
File: britain_w_youarehere[1].png (846 KB, 700x525) Image search: [Google]
britain_w_youarehere[1].png
846 KB, 700x525
>>54427868
>>
>>54428002
Eloquent Javascript (free online, the first js book you should read)
Javascript: The Good Parts (overrated but good)
Javascript: The Definitive Guide (the js bible)
Professional Javascript for Web Developers
Secrets of the Javascript Ninja
Javascript Enlightenment
Speaking Javascript
>>
>>54427786
Yeah. I've tried it with Firefox, Chrome, Chromium, Torch, and Vivaldi. No good. I can continue typing, but when it disconnects, I have to refresh.

Often, this means I've lost all the stuff doing it because it doesn't always backup in the browser like it's supposed to. Copying and pasting it by text is a bit annoying as a workaround, too.
>>
Google has web APIs for Chromecast right? I'm planning on building my own little Netflix clone for media on my home server, and I don't want to bother building an actual app, so if possible I'd rather be able to cast shit from a web page
>>
what do you think about the new gov site of somalia ?
http://www.somaligov.net
>>
>>54423700
http://paletton.com/
>>
>>54428876
Hideous and outdated, but pretty much what I would have expected.
>>
>>54428876
Let's see you do better when you're being paid in rubber latex and a dead seagull
>>
>>54429144
they included a 18000- character long link for a picture
>>
>>54429224
That's their unique cultural style
>>
>>54428381
The fuck? How do they even enforce this? How locked down is this piece of shit?
>>
>>54428381
just find something on npmjs.org
>>
>>54427868
What font is that?

Maybe highlight the menu item on the menu to the left based off how far down you've scrolled.
>>
>>54429622
Looks like droid sans
>>
QUESTION: Is Coffee Script considered cancer?

I just started dealing with JS at work. So far I've only been a sysadmin that develops, so C, Python, Perl, Ruby, Bash, AWK, shit like that.

I had the additional displeasure of being introduced to JS fully while trying to add a feature to a steaming pile of shit.

Now I intend to rewrite that steaming pile of shit into something usable but I was wondering if I maybe should use something that is a bit more enjoyable in terms of syntax, at least for me.

What are the opinions?
>>
>>54429756
TypeScript is a little more usable than Javascript. It still has most of the things that make Javascript the worst language ever.
>>
>>54429756
If you're going to use anything other than standard JS I would go with typescript, personally.
>>
>>54429851
>Javascript the worst language eve
thiis is my favorite meme
>>
>>54429756
If you're struggling with Javascript syntax you should just switch to a helium tank
>>
File: Capture.png (913 KB, 1366x707) Image search: [Google]
Capture.png
913 KB, 1366x707
>>54429289
404 is culture?
>>
>>54429920

I'm not struggling, I just like the coffee script syntax more.

>>54429851
>>54429863

Thanks, I'll google typescript.
>>
>>54418657
I believe you'll need to use JavaScript.
>>
>>54429756
>Is Coffee Script considered cancer?
Yes.

Use Typescript and write in ES6/7.
>>
I'm making a personal site for branding. Should I do an static site for retro points or make a drupal site?
>>
>>54430097
Well to answer your question yes, you're cancer
>>
>>54430155
>personal site
>drupal
Are you a maso?
>>
>>54430250
what's wrong with it?
>>
>>54429892
if an inline function is executed in global scope, it can access variables locally to where it was defined, but this refers to the global scope.

Who the fuck thought this shit up? There are so many little issues like this.
>>
>>54429622
font-family:"Roboto","Helvetica","Arial",sans-serif

The menu on the left is only open while choosing the page. It's not a single page with different paragraphs, but several pages.

For example the one in the picture is /functionalityInterface/showOverview, so I somehow have to show /functionalityInterface/showOverview somewhere, but I can't see a spot to place that information besides on the top of the page next to the Logout button
>>
>>54430276
He probably means it's unnecessary confusing to work with. And to upgrade sometimes.

You're better off making a static website. And if you prefer a CMS then pick Wordpress because it requires not much of a brain.
>>
I'm currently making a website for both teachers and students for submitting and grading work.

I'm currently having trouble with work submissions for students.

I want to show a list of tasks for which the student can select a file and upload it, immediately marking the task as submitted using Javascript.

How do I implement this? Currently I am doing everything asynchronously using Angular, so the task list loads with a delay, and the ng-class does not have time to properly render each task.

What is the best solution for something like this? Use server-side scripting to load the task list and then operate on it in JS?
>>
>>54430560
where do you load the task list now if not on the server?
>>
>>54430560
>Angular
Why?
>>
>>54430728

The client gets a list of tasks with all associated data as a JSON list and it is rendered client-side.

>>54430734

It's a school assignment, we can only choose the server-side script language.
>>
So tired of making things that don't matter because I will always lose motivation half-way through.
>>
>>54430939
I'm currently writing every progress into a txt on my desktop whenever I find the time to continue working on it. That way I'm being annoyed when I don't write anything in there for a day. Easy to keep going that way.
>>
>>54425177
It won't because I can abide by the twitter API use policy and know how to avoid all of that.
>>
>>54425942
>24 hour hackathon
>at work
>work
>24 hour


you servile little slave you
>>
>>54420814
You just have to practice.

With enough practice you'll start noticing patterns of design that look good and you'll start reusing and slightly altering them, the key is to gather enough of these patterns to build a full website.
>>
How do I fall for the node meme?
>>
>>54432016
https://nodejs.org/
>>
tfw working 9am to 11pm on a saturday.
>>
>>54430560
>so the task list loads with a delay, and the ng-class does not have time to properly render each task.
What does "does not have time to properly render each task" mean?

Also, I recommend against ng-class. It's such a poor hack that's based off of old jquery mentality. If you have css3 (and if this is for school, I doubt they'll be testing on IE8 compatibility), instead give your element an attribute, then target with css like so:

html:
<li ng-repeat="task in tasks">
<task done="{{task.done}}"><!-- other stuff --></task>
</li>


css:
task[done="true"] {
color: green;
}

task[done="false"] {
color: grey;
}
>>
>>54430809
>>54430560
im having a hard time understanding why you are saying
>ng-class does not have time to properly render each task
>$http(req).then() json with all the shit
>ng-repeat, on the interface, of the json array of data
how would this be slow? or are you loading tasks one by one? or are you talking about the time it takes to load the json? you can disable/hide the interface during that loading time
>$scope.isLoading = true; // right before $http(req)
>inside .then(function(response){$scope.isLoading = false; $scope.data = response.data;}, function(response){$scope.isLoading = false; $scope.data = [];})
and on the interface use that scope var to your advantage

>no im not gonna code tag that shit, do it yourself
>>
>>54429756
coffeescript is pretty much dead
>>
What are the PDO equivalents of fetch_assoc, num_rows etc?

I cant find comparisons on google.
>>
how do I fancily add an item to a list?
I have a list of flags and add/remove some of them from time to time.

but now they just plop up in the list, how do I smoothly make them pop up?
the list is also centered and I would the rest to smoothly get pushed to the left when one pops up on the right.

I have no idea what to look for, do I have to make this all manually? surely there's some css magic that will work, right?
>>
>>54432223
>>54432125

Thanks for the ideas.

The list starts rendering before the JSON array is ready. I was asking how to wait until the request is done getting the JSON array, and only then start rendering it with ng-repeat.
>>
What's the proper way to hash passwords nowadays? Don't want to store them plaintext.
>>
>>54433008
salt them and use something like PBKDF2.

https://crackstation.net/hashing-security.htm
https://blog.codinghorror.com/youre-probably-storing-passwords-incorrectly/
>>
>>54427374
>>recursive calls => bad code
>What?

From my post

>>54421009
>primary difference lies in hoisting and occasionally function names are relevant in recursive calls but if you depend on either you're probably writing bad code.

"either" refers hoisting and function names (as distinct from the variables that hold functions). Nowhere am I suggesting there's anything inherently wrong with recursive functions
>>
>>54432567
How is it, shouldn't the list come back all at once? Are you making like 50 requests or so to get this list?

Anyways:
$scope.loading = true;
$httpOrWhatever().success(LastAsyncFunction() {
$scope.loading = false;
});


in the html:
<ul id="tasklist" loading="{{loading}}">
<li ng-repeat yadda yadda...
</ul>


in the css:
#tasklist[loading="true"] li {
display: none;
}
#tasklist[loading="true"]:before {
content: "loading...";
}
>>
>>54433046
I read a bit about it, and it's recommended that one doesn't use the same salt for every password. So do I have to generate (and store) a salt for every user just to store the hashed password securely?
>>
My website needs to have a "Clients" section, the issue is the clients for the site I am building all have shit logos, does anyone have any ideas of how I can make a nice client section without using the logos.
>>
>>54433401
why are you working with clients that have shitty logos anon
>>
So I have two divs, one on the right and the other on the left. I want the right one to stay the same size and I want the left one to fill the remaining width. But I also want a gap between the two divs.

How do I do this?
>>
>>54433637
Flex
>>
>>54424454
I am, /wdg/ is less autistic about thinkpads than the rest of /g/ but the fanboyism spills over to here as well.
>>
>>54427868
What's the site structure? If you use breadcrumbs that seems to imply hierarchy. Is it strictly necessary to show the user where they are in the hierarchy? You could describe 4chan as a hierarchy but 90% of the typical user's navigation is home page(maybe) > board > thread > board > thread etc... so all you need on, say, a thread page is return/catalog
>>
>>54424454
Yes
>>
>>54433203

dont put content in the presentation layer plz
>>
File: Unbenannt.png (795 KB, 1918x1080) Image search: [Google]
Unbenannt.png
795 KB, 1918x1080
>>54433752
Many things look alike, for example this one looks almost exactly like the linkInterface, which are two different things.

At the moment it's only category > thing. But that may change, as links can be n layers deep in categories.
>>
>>54433619

The joys of cottage industry
>>
>>54433401
Humble Bundle has this issue, or not the games they sold had shitty logos (although some did) but that they just have very different styles so they started drawing similarly styled icons for each game, usually featuring a central character from the game (they stopped doing it after a while but it looked cool while they did). If your clients are sufficiently different that you can come up with something that symbolizes them conceptually without looking like a logo (like box company gets a box drawn in your preferred style, paper company gets a packet of paper, whatever) then that can be an attractive direction to go.
>>
>>54427920
What would be a good alternative for mobile screens though?
>>
If I'm making small website for a relative how much should I charge him?
I thought something like 50€ for the page and 15€/month for keeping it up. I'm going to host the page from my vps.
How do people charge for hosting the site or how do they handle the hosting?
Not sure if 15/month is too much.
>>
>>54434464
Honestly, I could probably write a book on this topic, but it would probably be outdated before I finished it. The best solution is to design the site in such a way as to not need a hamburger menu, or at least minimize the usage thereof. The way to go about doing that depends on the specifics of the site, but it's easier than you might think. Think about the design in terms of actions the user will want to take instead of locations they want to get to. Usually you can narrow it down to 3-5 things. Then, add individual icon buttons, or links or whatever, as appropriate. If your site is a single page portfolio thing or similar with just a bunch of # links, you can literally just get rid of it and be done.
>>
>>54434731
That's a ridiculously small amount to charge for a professional site. Like 1/10th a normal price. Either charge them your normal rate (if you have one) or do it for free. If you charge that little, they will get the wrong idea about how much work it is to make a functioning site and you'll be constantly micro-maintaining it forever and/or they'll tell their friends how much you're charging.

As for hosting, I would just set them up with a cheap shared hosting plan (like send them a link/sit down with them and tell them what to buy) and have them send you the ftp info. That way they can cancel it themselves without it being awkward with you and they have a support number to call when their site goes down at 3:00am (and it's actually just their router or something)
>>
Anyone know how to serve files while they're still being written to the disk? Or maybe serve them from another programs output? I'm building a media server type thing for Chromecast and need a way to handle 10-bit video and unsupported audio codecs. Obviously I could just have the server call ffmpeg and transcode everything before serving, but instead of wasting up to hours (in the case of 10-bit video) I'd rather be able to serve the transcoded video as its being transcoded. I've seen it done WAY back in the day with old media servers made for the PS3, but I'm not sure how one would go about it now. Any ideas?
>>
>>54435236
Streaming data? For videos, see if there's a file format that still makes sense from the header onwards. You can then use low-level api to play the video up to the point where the binary data makes no more sense
>>
>>54435284
>>54435236
Found this. Apparently it can pipe ffmpeg's output on the fly to Chromecast, which is my end goal.

https://github.com/xat/castnow
>>
/wdg/,

I fucking hate myself. Does it get any better?
>>
>>54435370
And then there's this: http://rost.me/2015/03/15/ffmpeg-and-chromecast/

Apparently you HAVE to reencode the video for whatever reason. Anyone have any idea why piping ffmpeg data with vcopy doesn't work but piping transocded video does?
>>
How do i make a website that will handle user accounts? There is so much i'm overwhelmed

I will start doing it locally, user credentials to get access to my service for example
>>
>>54436851
Pick a stack and keep Googling whatever you're trying to do.
>>
>>54416841
this faggot here
>>
File: Untitled.png (45 KB, 1021x594) Image search: [Google]
Untitled.png
45 KB, 1021x594
>>54416841
>>
Anyway have a recommended source for learning ASP.Net as a beginner C# developer? I've built websites using Flask and Django but this will be my first foray into C#.
>>
File: 1460468795476.gif (2 MB, 400x300) Image search: [Google]
1460468795476.gif
2 MB, 400x300
Hey guys.....I've got a big project I'm trying to envision. My company is a cloud reseller, so we support Amazon Workspaces for our customers.

Every so often they need a Workspace added, removed or rebooted. Right now they need to put a ticket in to do so and it takes our support team a few minutes to get around to them. I'd like to make it so that these three functions can be done by the customer themselves to relieve the workload on some of the support guys - I know that AWS-CLI supports these three functions so there's no problem on that side.

So what I was thinking was adding on to our existing tech support site but there's a couple things that are fucking up my plans.

-Authentication
I want to use SSO from Amazon for this but I've never implemented that before so I'm not sure where to start.
I'd like to make it so that our users can just go to our support page and be authenticated automatically based on their Amazon credentials being passed to us.

-User signatures
Adding or Removing workspaces requires a customer signature so instead of requiring somebody to physically print our Add/Remove excel form, sign it with a pen and then have to scan it back in and send it to us I'd like to use Docusign for signatures. I think I can do SSO with them as well to make it so the user doesn't have to log in to yet another service.

Can I do all of this in Windows-based stuff or should I be looking at Linux to make this happen? I know I can run some of this stuff with Powershell on the Windows side but AWS-CLI is cross-platform and for the core functions I need, it'll work just fine.
>>
How can I learn git?
>>
>>54438090
just git gud senpai
>>
>>54438116
heh
>>
File: Git-Cheat-Sheet.png (373 KB, 3508x2480) Image search: [Google]
Git-Cheat-Sheet.png
373 KB, 3508x2480
>>54438090
read cheat sheet.
learn basic commands git commit, git add, git init.
then use it on a project.
when you find yourself wondering "how do i clear the staging area?" then google it
>>
I want to make a rails app where two users can rate baby names, then see a list of the names by descending average rating.

currently have a users table, babies table, and rating tables (using ratyrate).

should I make another table or column for average ratings? Or should that value just be generated in the model
>>
>>54438207
what kind of little projects can I learn to use it on? I haven't made anything big yet..
>>
Does anyone have some tips for a recent web dev grad in landing interviews?
>>
>>54419213
why do you want to do that? if you want to do lockout after x login attempts from an ip address in y time, use redis. don't need to store password though
>>
D-Django....?
>>
>>54431198
I'm doing the same with git commits.
>>
>>54416841
Need a little help figuring out an issue and was hoping someone could help, been looking at this all day and i can't figure it out.

My issue is, I'm trying to fill a list with by calling javascript function that calls a php file, which is filled with items and links.


my code so far is

function list(element){

var display=document.getElementById(element);

display.innerHTML='<? echo include ('links.php')?>';}


with this though for some reason using "include" causes javascript to freak out and not want to do anything. even other functions
>>
>>54424454
No. Debian stable on a cheap Ideapad.
>>
>>54436851
It's pretty simple actually. rather than looking at it as a big thing just take it step by step.

make the database, make some code that connects to it. write some queries that work for it, put the queries in files and modify them for user usage, put some input fields which set variables to set into the queries, and then pretty much cover your ass on accessiblity
>>
>>54439508
wtf are you doing
>>
>>54437159
>ad populum
I'm sorry, anon. Not everyone is a Pajeetcode monkey, who will work on any project as long as it pays.
>>
File: screenFetch-2016-05-08_03-04-38.png (501 KB, 1357x652) Image search: [Google]
screenFetch-2016-05-08_03-04-38.png
501 KB, 1357x652
>>54439575
Just fucking around really. I just wanted to make myself a home page and then the idea of a dynamic list came to mind.
>>
>>54418464
Use Doctrine/DBAL and you will enjoy database querying in PHP
>>
File: >>54439655.png (40 KB, 546x372) Image search: [Google]
>>54439655.png
40 KB, 546x372
wow ok
>>
>>54439743
Alright, that didn't solve it 100%, but that did put me leaps and bounds ahead of where I was. Thank you.
>>
>>54439743
>>54439899

Alright. I was able to resolve that issue. Turns out that where you had
 request.open("GET", "links.php"); 
will return the code, but as plain text. but substituting "GET" for "POST" returns it as viable code. Again dude. thanks, probably couldn't have done it without you
>>
>>54418621
Cuz you don't know how to search, retard
>>
>Setup Amazon AWS with free tier, get a years worth of hosting for nothing.
>Install LEMP stack, wordpress.
>Use ThemeForest to find templates, affix nulled to your google search to find a nulled template. Remove any nulled watermarking.
>Show client website and do live development until they're happy.
>Charge 200-600 dollars (for labour, not for the website itself on invoices) for a small website, offer to host for your ten dollars on top of the average $15 dollars the AWS instance will cost after free tier, put money in the bank.
>Buy a licence for the theme for use with other websites to support the author.
>Repeat this process for new clients, look up small businesses in your area, mockup improved websites and hustle them.
>You now have capital and a nice little business going.

That's how I started two years ago, now we manage corporates and I'm certified.
>>
>>54416841
How do I permanently change the HTML of a webpage? Similarly to how Stylish applies CSS changes, but for HTML?
>>
>>54440317
>wordpress
I'd rather starve, thank you
>>
>>54440790
Srsly I can't understand what do you guys hate so much about wp and nobody wants to explain.
>>
>>54440839
Then explain what you like about it so much.
>>54440343
Define permanently.
>>
>>54441115
Wow both your replies are particularly stupid
>>
>>54440343
Some Javascript hackery loaded into an extension.
>>
>>54441132
Very constructive. If you tell me what you like about wordpress, I can tell you how other solutions do it better.
And the fuck does permanently mean? Does the change persist for that particular client? Does it modify the global template?
>>
>>54441202
>If you tell me what you like about wordpress, I can tell you how other solutions do it better.
Tell me how your other solutions are better at offering more out-of-the-box plugins and better interface for technologically impaired clients that just want to post their shit.

>And the fuck does permanently mean?
>Similarly to how Stylish applies CSS changes, but for HTML
I don't even know how to explain this more clearly. Dude obviously wants something (userscript/add-on) that modifies the HTML of a random page for as long as they keep it enabled
>>
>>54441245
When it comes to out of the box, then no. Wordpress has that and it is arguably the only selling point. What it lacks is anything close to decent performance, code maintainability and you could argue that securing a Wordpress project is harder.
>>
>>54433261
Fuck it, I'm generating a salt for every user. Doesn't hurt I guess.
>>
>>54440343
Greasemonkey add-on, which lets you add JS to a page, and then change the HTML via JS.

>>54439655
If you want some design pointers:
>change font to sans-serif
>use a white font with a text-shadow: 1px 1px 1px rgba(0,0,0,.5);
>make link squares the same color (preferably monochrome)
>less margin between squares
>maybe 1px border-radius on squares

>>54439508
Haven't really done stuff like that. Maybe it's related to quote escaping?

>>54436851
Google php sessions and cookies

>>54435467
With discipline

>>54433637
In HTML, write the right div first, then the left one. In CSS apply float:right; to the right div, and overflow:hidden on the left div.
Like so:

https://jsfiddle.net/nwtyL6uL/

>>54433401
Use client names instead of logos.

>>54433008
Bcrypt?
Just one google search away: database password hash

>>54432457
In CSS have the new list item be height: 0; padding: 0; margin: 0;, and then after it's added to the DOM use CSS transitions to return the values. If the height for example is unknown (auto), you should use JS, or some sub-optimal CSS solution, such as changing max-height instead.
>>
If anyone needs help with pure HTML/CSS, I can probably help. Been doing front-end for some years now. I'll try to answer any questions you might have.
>>
>>54442857
How the fuck do I integrate svg into designs without it breaking everything?
>>
>>54442878
Would you care to elaborate on what you mean by "breaking everything"?
Using the <svg> element is pretty straightforward.
Depending on the case, you might want to create a @font-face font of the vector and display the design as a font instead. That has solved some problems for me.
>>
>>54442924
for example, when I made a svg a link the svg kept rendering above the a element
>>
>>54442945
Eh.. do you have some example code showing this problem?
I made a simple fiddle, where I have an svg element inside an anchor tag, and it behaves quite normally.

https://jsfiddle.net/5ez9rL1y/

Also, you said you made the svg into a link. In HTML that would mean putting the <svg> element inside an <a> element, which means that the <svg> element is a child element of the <a>. Child elements are rendered on top of their parent elements.

If you meant that the <svg> rendered so that the <a> tag seemed to be positioned below the <svg>, I'd assume it was because <a> elements default to display:inline; which means they don't wrap around their children.
(In the jsfiddle I linked, try removing both of the "display:" rules in the CSS to see this behavior)
>>
>>54443041
>If you meant that the <svg> rendered so that the <a> tag seemed to be positioned below the <svg>, I'd assume it was because <a> elements default to display:inline; which means they don't wrap around their children.
This was what I meant, thank you
>>
File: 2HRNmTE.jpg (71 KB, 600x1066) Image search: [Google]
2HRNmTE.jpg
71 KB, 600x1066
>>54442857
Bumping this because bored.
>>
It's 7:55 AM on a Sunday morning and I thought I could wake up fresh and do some coding. Even now I'm fucking frustrated. I don't know how you people manage to work with either Node or Python. Fucking mad how many packages and dependencies you have to worry about, starting to think web dev isn't for me - at least not the back end. ffs
>>
>>54443159
Use PHP and stop using depending on libraries. Write your own code, an things become simple and enjoyable.
>>
>>54443159
Try Go.
>>
>>54443177
I already semi-mastered PHP. I was trying to branch out and learn something else.

So frustrating trying to learn something by following a tutorial step by step but not having it work at all. I posted in the previous thread and nobody could figure out why I couldn't connect my Python app to the MongoDB database despite having the exact same setup, for example.
Had the same set of problems with Ruby on Rails, dropped it.
Had the same set of problems with Node, dropped it.
Now having the same set of problems with Python, dropping it.

>>54443225
Yeah was going to try this next, or ASP (baka).
>>
>every programming language used in web dev is cancer while real applications are written in proper shit like C/C++/C#
>>
>>54434731
I'm making on for a relative for free.

Money wont be more important than family to me.
>>
>>54438413
I know what you are doing and that's a prettt smart idea.
>>
>>54445315
>Money wont be more important than family to me
Aww, how noble.
>>
>>54445604
Not that anon, but I can say from experience that family/friends make the worst clients. You're almost always better off just doing it for free and letting them pay back the favor next time you're planning on painting your house or something.
>>
>>54442830
Those style suggestions actually turned out really nice. Thank you.
>>
File: 1436584245813.jpg (148 KB, 500x666) Image search: [Google]
1436584245813.jpg
148 KB, 500x666
>>54446477
Sure thing.

>>54442857
Bumping this again.
>>
File: map3.png (685 KB, 2820x1368) Image search: [Google]
map3.png
685 KB, 2820x1368
>>54446816
Alright maybe you can give me some advice.

I've been working on this for a few weeks, it uses d3.js to render the map into svg vectors from a GeoJSON file, which lets me plot the data points using lattitude and longitude.

My real trouble is in getting a format that can be made a little more responsive. This one breaks, not horrendously, but it doesn't currently display well on tablets and phones and I'm wondering if I just need to redo the structure of the layout altogether. I was thinking maybe have the map take up the whole screen and the info panel appear as a modal when you click on a node, rather than the sidebar like this.

http://immense-ridge-1024.herokuapp.com/
>>
I am fucking terrible with time management and being motivated.

Will I ever learn how to code, or will I be a poorfag forever?
>>
>>54447135
You can change once you get fed up with what you are.
>>
when should I be moving my code to another files? I'm using flask right now and I have most of my stuff in one file which is currently 700 lines long, is that enough that I should be moving some of the stuff to another modules and etc?
>>
does this thing mean the image didn't load?
>>
File: ayylmao.png (1 KB, 80x74) Image search: [Google]
ayylmao.png
1 KB, 80x74
>>54447853

forgot to include.

My images in codepen are dissapearing n shit. Fuck I hate the codecamp tribute project. Writing is cancer
>>
>>54447875
It means the inage URL is broken.
>>
>>54420804
CodeIgniter doesn't use RESTFul routing. Use laravel instead
Thread replies: 255
Thread images: 32

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.