[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: 21
File: 1431344258923.png (747 KB, 824x553) Image search: [Google]
1431344258923.png
747 KB, 824x553
Death to PHP edition

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

> Tutorials & Resources
https://www.codecademy.com/ — Learn to code.
https://www.bento.io/tracks — Start here if you’re new.
http://www.theodinproject.com/ — Alternative to above, focused on Ruby on Rails back-end.
https://developer.mozilla.org/en-US/Learn/Choose,_Install_and_set_up_a_text_editor — Choosing a code editor.
https://libraries.io/ — Discover new open source libraries, modules and frameworks.
https://www.coursera.org/browse/computer-science — CompSci courses.

> Getting Hired
https://pastebin.com/4YeJAUbT/ (embed) — NEET Guide to Web Development
http://elliotec.com/how-i-got-a-job-in-web-development/

Previous thread: >>51186001
>>
PHP 7 will be available in a week
>>
>>51211768
and it's still shit
>>
Which one is more readable?
for (let thing of things) {
do(something(thing))
}

things.forEach(thing => do(something(thing)))
>>
Do you know a blogging platform like Jekyll that is not written in Ruby of PHP?
>>
>>51211808
Hugo.
>>
Hey guys, I want to improve my WD skills. Currently I know basic HTML4 and CSS, and I only learnt it to make a website for a family client (enviroconcrete.com.au)
Except for the slideshow and contact us form, i made it completely from scratch, but it isn't "responsive" or anything

Anyone know where I should start with learning the new stuff, like HTML5. Is their other languages people use for web dev? I heard angular, c# from other threads, but could someone explain to me what each of those do, and how people use it in web design
>>
File: 1429560339064.jpg (62 KB, 554x390) Image search: [Google]
1429560339064.jpg
62 KB, 554x390
>>51211627
I'm working with a startup, and for their webapp, they want a fully-fledged client-side download manager that lets you pause and resume downloads and all that fun stuff. It looks like there's no good way to do this for large files right now, so I'm planning on rolling this functionality from scratch using indexeddb and info I can glean from the HTTP 1.1 specification.

From my research, I'm reasonably confident that this is the only "sane" way to do this in a browser-based web app, but if any of you have any better ideas, please do tell.

But my real questions is: How hard should I push to have my client let me open source this? The fact that it's not really been done before gives me the impression that no one particularly wants this, but this could be really convenient for cloud storage services to have access to.

What do you guys think? Is it even worth having that fight with my client?

>>51211808
Ghost if you don't mind node.
>>
>>51212116
wait till the product is released to push open source

it could be a great advertisement opportunity, and you could possibly create a 'support' branch or something.

you could also maybe make it a WP plugin?
i dislike WP and only use it when a client needs it, but shit, do those plugins sell for money

i might actually be able to use something like that for
lunarmessaging.net

>currently setting the image to a JS object encoded with base64
>starts to go full retard after an image is above ~512kb

i literally need that but also in reverse (so i can de/encrypt images client-side)
(except the pause and reloading)
>>
>>51212116
Just mention the free bug fixes, examples of successful and well-known companies that do this and cred with the developers. Explain that it is going to be just one library, not the entire website. Don't push further.
>>
Why would I use Django over PHP? Sell me.
>>
>>51212273
because you'd rather not get paid for a living
>>
File: 1388887801963.jpg (53 KB, 608x507) Image search: [Google]
1388887801963.jpg
53 KB, 608x507
>get cheap 20/year webhost
>dont see anything about python or node support on their site
>email support and ask if they can host Diango/Flask
>"sorry we only run PHP on shared hosting, upgrade to a dedicated server to run custom apps"
>mfw
>>
>>51212351
why the fuck would you not check what they allow before contracting with them?
>>
>>51211798
I'd go with the for loop personally.
Aside from being more readable IMO, it's faster as well as being possible to break out of.
>>
>>51212395
first year is free
>>
>>51211798
if it's only doing one function call, the 2nd one

if more is added to the loop, then the top one
>>
Is there any flask love? Do I have to use the official sqlalchemy plugin for flask or just use sqlalchemy as normal? Raw SQL makes the code messy when entering fucktons of info to the DB.
>>
File: 1443522583404.png (89 KB, 600x599) Image search: [Google]
1443522583404.png
89 KB, 600x599
>>51212181
>wait till the product is released to push open source
Their product already is released, actually. They're fully funded, already have their webapp and I think their smartphone/desktop apps built. I was initially brought on to brush up their webapp (it was built by their offshore team, and dear god is the code awful) but the founder asked me offhand if this was possible. I initially told him it wasn't without severely limiting the download size, but I wasn't satisfied with that, and it turns out indexeddb can almost definitely handle the task now that it's been properly implemented in all the major browsers.

>i might actually be able to use something like that
That alone is enough for me to make the effort to open source this. If I can make even one person's life easier by open sourcing it, I'll be happy.

That being said, you probably wouldn't need everything I'm planning on implementing for your use case. Look into indexeddb. It's basically a client-side nosql database that your site can mess with. There don't seem to be any size limitations, and it's pretty versatile. Plus, if I remember correctly, client-side de/encrypting is one of the main things people are using it for. You might actually be able to find some tools that other people have built to do what you want with it.
>>
>>51212439
Yeah, probably this.
>>
>>51212463
mega does massive file downloads without triggering browser download window, not sure if it does resume, but it handles big files, when it's finished downloading the file for you the browser dialog appears and it just saves it instantly
>>
>>51212506
That's actually what I showed the client to demonstrate that it's possible. From what I've been able to half-assedly reverse engineer, I'm 90% sure that indexeddb is their secret sauce. From my understanding, that's only a small part of the puzzle, but that's given me enough to get started, and now I have a good overall idea of how this thing is going to work.
>>
File: itshabbening.png (251 KB, 1304x879) Image search: [Google]
itshabbening.png
251 KB, 1304x879
Yay so i've finally figured out the shell system, all the backend was pretty much done to do because of how i was doing page loads to begin with, this is pretty much how i've got it setup for the "single page expierence".

Works "perfectly", if you load a URL or click a new link.

Now the only thing i need to do is a proper response handler so i can make js redirects better than random ifs.
right now the validation was done when you did a GET call for the page, now since its all ajax, i need to implement the auth checker there.

now i just need to figure out how to reliably check that your session has expired so that you can get a new token/server public key.

>>51212463
fuck yea man thanks for the tip, i'll tottaly look into it, finished getting the "shell loader" working last night.

oh wait holy fuck, is that more secure than saving say your temp keys and shit in a JS object (pic related)?

How does that work compared to local storage? if i reload the page is the data still there? (dont need it to be, would prefer not)

yea its probably a bit robust for what i technically need, but thats a seriously great tip with the indexeddb.
>>
>>51211798
Second one definitely. It's also a lot easier to change the functionality as needed by just replacing forEach with map or filter if you're going for one of those specific use cases. If you get used to for loops, it's a lot easier to forget that those exist.

If I've got a lot of those or there's some kind of nesting, I'll do something like this:
var doSomething = function (thing) {
do(something(thing));
}
things.forEach(doSomething);


I mostly only bother with doing it like that if I've got really complicated nested logic that has multiple anonymous functions though.
>>
>>51211786
I bet 10 years from now, PHP 9 will still be shit.
>>
Is Sublime Text good?
FOSS alternative?
>>
>>51212670
>indexeddb doesnt work on mobile
well you tried anon thank you <3

hell i might end up using it, but i have a feeling telling mobile users "sorry you can't upload image" would result in a big backlash.
>>
>>51211768
FUCK YEA SPACESHIPS

wonder how long till i can update my localhost and the server
>>
>>51212772
Why exactly would you even want local storage in a browser?
Synchronizing it with whatever backend or API you are using would be a pain.
>>
>>51212759
I use sublime text 3 for all my web dev, I like the package management, easy to customise, haven't had any issues with it, haven't seen it crash yet
>>
File: 1436005276667.jpg (281 KB, 1278x736) Image search: [Google]
1436005276667.jpg
281 KB, 1278x736
>>51212772
I was about to mention that in a response, actually. It's fine for our case because we can just tell users to download the app if they want that functionality.

The other problem with indexeddb is that it's only just reached the point of stability where most current browsers support it well enough. Users on older browsers wouldn't be able to use it. It's a good option for us because our product works without the feature; it just works much better with it.
>>
>>51212759
vim or emacs, but both of those have a steep learning curve in their own special way. Atom's an alternative too if you're good with javascript
>>
Should I be at all concerned with performance when dealing with SQL queries which have chained WHERE AND clauses based on form inputs? How would it affect caching if the columns which are searched (in where clause) are almost always some different combination?
>>
>>51213082
Vim and emacs are two redpills I've never swallowed. What exactly are their advantages compared to a more standard IDE?

Is it worth learning to use on Windows?
>>
I'm curious, how do you guys deal with font sizes for responsive sites?

Let's say you have all sorts of headers (small, medium, large) and you want them to fit on the screen in the same way on all mobile viewports.

Do you write media queries for each and every major screen format, re-defining font sizes every time, like a caveman, or is there some better alternative?

I imagine Bootstrap has responsive headers already defined, but what if you need different proportions than what it already has defined?

This is an issue not only for font sizes, but also for the vertical spacing of headers.
>>
>>51213158
>Is it worth learning to use on Windows?
Probably not if you're going to stick with windows. I'd recommend at least trying out Linux. A lot of open source developer tools are written for Linux/Mac, and then if you're lucky they have Windows support tacked on as an afterthought.

There are a lot of advantages, and you'll probably get a different answer depending on who you ask/what they use.

I use Vim, so I know a lot more about the Vim-specific advantages, but I know enough about emacs to give you an idea of what that's all about.

For starters, you can customize the shit out of them. If you took two experienced Vim users and asked them to trade vim configs, they might as well be learning a completely different text editor. I imagine it's the same for emacs.

Without drowning you in buzzwords, the main reason I started using vim is that you don't need a mouse, and once you've gotten used to it, you'll be faster without a mouse. This is great for me because I do most of my programming on my laptop.

There's a really dedicated plugin development community, and in most cases, if you need support for a specific language, you can find it. Most IDE's are tied down to a specific language to various extents, so you have to learn a whole new interface and new keybindings to be productive in a new language. This is the main argument for any text editor, not just vim or emacs, but they have such a dedicated following that you can almost always find what you need.

Vim is terminal-based by default (and emacs can run in the terminal). Basically, what this means is that even if I don't have a plugin that gives me the commands I want inside vim, I can suspend vim with ctrl-z, run whatever tools I need straight from the command line, and then resume with fg. This might not sound like a big deal, but it can be a huge advantage. Plus it beats the shit out of right clicking and then clicking through seven layers of menus to get to a command you need to run frequently.
>>
>>51213304
If you use the source code of boostrap, you can customize it pretty easily with Less.

Personally, I like to have a main style sheet and then separate sheets that override parts of the main sheet and only have them load when their specific media query is matched. That way rendering isn't blocked while the browser parses shit it's not even going to use.

If you use Less or Sass, you can sidestep a lot of the caveman bullshit. If you haven't heard of them, check them out because they will make your life so much easier. Basically, they're CSS with variables and functions.
>>
>>51213421
>only have them load when their specific media query is matched
How do you do that? Do you import those specific style sheets inside each media query?

That would be great if it's possible.
>>
>>51213568
<link rel="stylesheet" 
media="screen and (min-width: 601px)"
href="large.css">


no muss no fuss
>>
>>51213636
Cool.

Do you preprocess your LESS code first or include the JS file to process them when the page loads?
>>
>>51213700
Preprocess them, unless you don't give any shits about performance. Plus it's less hassle because you just run one command and then you have minified CSS files that you can just do whatever you normally do with your CSS with.
>>
>>51212351
This is actually very common. If you use anything other than PHP then you pretty much have to check. Most reputable places use cPanel which is generally just PHP with RoR if they choose to enable it.

I use Digital Ocean since a single site Apache or Nginx is simple enough to set up. Anyone can do it with a little Google'ing.
>>
>>51213421
they're moving to SASS with Bootstrap 4…
>>
Should I use a php framework? Or is it fine to create my own
>>
>>51212116
>fully-fledged client-side download manager that lets you pause and resume downloads and all that fun stuff. It looks like there's no good way to do this for large files right now
you mean wget? or one of the many download managers out there? or are you talking about some custom download manager for this specific website?
>>
How do I make baby's first Web scraper? I want to learn how to make something that finds new episodes of my favorite show.
>>
>>51213906
They plan on supporting BS3 for quite a while, from what it seems. Looks like they burned companies who used 2 with the transition to 3 and they've learned their lesson.
>>
>>51213940
A download manager that you don't have to download on your system that runs in your browser. Yeah, I know it sounds stupid. I told my client the same thing you're saying, and he wants it his way and is willing to pay for it, and it sounds fun, so I'm willing to do it.
>>
>>51214017
but i want the card thingie from Bootstrap 4
>>
>>51213999
while loops and regex
>>
>>51213935
Why bother? They're bloat unless you remove what's unnecessary, which defeats the purpose of using one.

Laravel is one of the worst offenders. 4x slower than raw/normal PHP just so that you can use Elixir (kek) and Eloquent (kek) and be a "Web Artisan" (kek).
>>
>>51212116
>>51212463
Sounds like a waste of time. How much time will that take that develop (and maintain!)? How many customers will care about a download manager? (Personally, I'm less likely to use a site if they require a download manager to use their services) You should consider if your time would be better spent fixing bugs, working out tech debt from the offshore team, building better features, or even literally making sales calls.
>>
>>51213935
If there's gonna be more than one developer in the project, use a framework.
>>
>>51211627
Anyone have any experiene with Tornado?

I want to learn NodeJS but right now I'd rather keep it python based
>>
>>51214103
>Personally, I'm less likely to use a site if they require a download manager to use their services
That's the point. He wants me to seamlessly integrate a download manager into the site. Translation, I'm rolling my own download manager that the user doesn't have to download or secure permissions for and just works. The user doesn't have to think about it at all.

>How many customers will care about a download manager?
At least one, but it's the customer responsible for over 50% of their business right now, so that's enough customers to make my client willing to pay me enough to make it and make it right.

>How much time will that take that develop (and maintain!)?
It shouldn't be too terribly bad if everything works out like I think it will (which of course it never does.) Regardless, the client is willing to pay me whatever it takes, and this looks like a fun project for me, so it's not a big deal.

>You should consider if your time would be better spent fixing bugs, working out tech debt from the offshore team, building better features, or even literally making sales calls
That's still the main job. I'm almost finished with the more urgent issues though, so he's taking me on for this project. He's taking me on for another contract as my work with the current one is wrapping up, and it's for a more interesting project, so I'm not complaining at all. It's not really my place to. He wants to pay me. I want to work. Simple as that.
>>
What's a good program to test your website for php vulnerabilities
>>
Anyone has any experience with PostCSS?

Some people say it will render Sass, Less and Stylus useless. Twitter and Google already use PostCSS.
>>
>>51214408
never heard of it but sounds like it's only really useful in fringe cases.
>>
>>51214458
From what I'm reading about it, you can basically build your own CSS preprocessor using plugins.

You can even write your own functions in JS to process your CSS. So you're not limited to what the authors of Less, Sass, Stylus chose to include.
>>
File: 1441589042853.jpg (149 KB, 752x1036) Image search: [Google]
1441589042853.jpg
149 KB, 752x1036
What woul you guys charge for this?

A small blogger wants to rework her blog. She has graphics and her own content. She wants wordpress, she has a theme and logo. She wants a curated blog section where it pulls posts from her subscribed blogs to post on her own page. No problem, we will use a plugin.

She also wants to switch hosting providers.

My strategy is get them to handle the hosting via digital ocean, I would set it up for them once I have a developer key.

My question, how much would you typically charge for this?

Please guide me, this is my first ever client
>>
How would one do responsive layouts with flexbox?
Do you have to make a grid system that works like bootstrap's with media queries and shit or do you just slap min-height on everything and let flex-wrap take care of everything?
>>
File: 1931 01 31 news.png (46 KB, 818x734) Image search: [Google]
1931 01 31 news.png
46 KB, 818x734
is 1930s newspaper-core typography relevant in web design yet?
>>
Hey guys, i need your opinion on something. I'm taking the "Web Developing/Programming with PHP" this semester and i have a project as a homework which basically, i have to write a website which includes XHTML, PHP, JavaScript and MySQL. Can you give me some ideas on what should i go for?

>inb4 porn
nah, pass. I'm thinking more of a movie/music database or a social network. what do you guys think? any better ideas?
>>
>>51214647
expected hours of work x fee for which you enjoy working + a get out of bed fee
>>
>>51214765
>Programming with PHP
FLY, YOU FOOL
>>
>>51214815
>le php is bad meme
>>
>>51214821
It's not a meme. This is an objective fact.
>>
File: 1451566457.jpg (21 KB, 250x241) Image search: [Google]
1451566457.jpg
21 KB, 250x241
>>51214765
>PHP
>>
>>51214815
>>51214850
>>51214925

I've heard that is not good. No idea why is bad but i cant just go to my professor and tell him fuck u with your php. you both are memes
>>
>>51214948
Yeah, I know that you can't. Just make sure that you take everything with a grain of salt.

Does your professor still make you use mysql_ functions? If that's the case, you SHOULD tell him to fuck off.
PHP's standard library isn't fit for web development at all. The only usable functions are the preg_ functions (stolen from perl), explode and implode, var_dump and PDO's functionality. Everything else is worthless.

Except of course for gzgetss (http://php.net/manual/en/function.gzgetss.php), easter days (http://php.net/manual/en/function.easter-days.php, jdtojewish (http://php.net/manual/en/function.jdtojewish.php) and levenshtein (oy vey, http://php.net/manual/en/function.levenshtein.php), those are the main pillars of any program and I'm glad, proud even to have them pollu- enrich my global namespace.
>>
File: doiturself.png (443 KB, 1783x760) Image search: [Google]
doiturself.png
443 KB, 1783x760
>>51214647
http://iflyun.net/blog/log/my%20blog%20in%20php.txt
>>
File: 1431424918390.png (47 KB, 805x343) Image search: [Google]
1431424918390.png
47 KB, 805x343
>>51215098
>jdtojewish
You can't make this shit up!
>>
File: 1427684699269.jpg (39 KB, 578x472) Image search: [Google]
1427684699269.jpg
39 KB, 578x472
>>51215098
>gzgetss - Get line from gz-file pointer and strip HTML tags
>easter_days - Get number of days after March 21 on which Easter falls for a given year
>easter_date - Get Unix timestamp for midnight on Easter of a given year
>all of these are compiled by default
fucking comedy gold
>>
Tell me about NoSQL databases. Why some people consider them better than SQL databases?
>>
File: Untitled.png (134 KB, 1366x768) Image search: [Google]
Untitled.png
134 KB, 1366x768
How can I set up browser integration for sublimetext3? I've tried for 2 whole days with no result.
When building the chromedriver is invoked and a chrome window is opened, but all I get are localhost connection errors.
I'm using the save versions that were confirmed working in the github's description, so I don't know where my problem might be.

How can I set this up for firefox? it may be a good workaround isntead of getting chrome working.

If someone has a working version for windows can you just compress that shit and send it to me?
>>
>>51215225
If you've ever used SQL before, then the name says it all.
>>
>>51215299
>being bad at relational tabling

How does it feel to be a brainlet?
>>
>>51215349
>needing relational tabling
I think your just projecting, senpai
>>
>>51215288
Or also if somebody recommends a good Js editor with browser integration I'd be happy
>>
>>51215288
do you have a webserver running?
>>
>>51215859
I'm running XAMPP but why do I need a webserver for JS? I would understand for PHP but JS?
>>
>>51215288
>>51215847
Why do you even need that?
Just gulp + browser-sync and keep a Chrome (or whichever browser you prefer) open and it will refresh itself automatically whenever you make a change and save.
Personally, I just use Atom and Chrome side by side.
>>
>>51216063
You don't. Or rather, you need one, but not something like XAMPP (or any variation of LAMP).
These days, unless you're still doing PHP, you'll probably be using something like Node.js or ASP.NET (or any similar framework for your backend language of choice) which runs its own webserver instead of using Apache or Nginx.
>>
>>51216135
I'm slighly lost, why would I need anything from browser integration with sublime, if I can just open my html file in my browser of choice and my javascript runs no prob.

All I want is a streaming connection between a browser and my editor so that I see every change I make every time I save, without going back and forth between programs
>>
how much do UI developers make?
>>
File: 1438833313858.gif (432 KB, 274x200) Image search: [Google]
1438833313858.gif
432 KB, 274x200
>tfw downsized from gay customer service Jo
>tfw searching for a customer service job for months to no avail
>tfw put my fucking GitHub profile on my resume and apply to five front end web developer positions, interview twice, get fucking job based on some shitty little website I built with Bootstrap
>tfw making 30% more than I ever have doing easy layout work that I actually enjoy

Was it supposed to be this easy, /g/?
>>
>>51216374
webdev is piss easy to get into.
I still feel kinda angry at myself when I think that if I had some more self-confidence and charisma, I could start working in the field three years earlier.
>>
>>51216403
You're not kidding. I'm pretty pissed off with myself for not doing this sooner. Cost myself tens of thousands of dollars doing work I hated. I could have bought an old Acura NSX with cash if I'd done this three years ago.
>>
>>51216063
Most likely it (the browser integration plugin) doesn't load the file that you edit, it just reloads the page that you are already on (or starts the browser if it's not open), because opening the html/front end js files that you're editing wouldn't make sense because most of the time you'll have a framework doing the routing for you and you say something like when "/hello" is requested, load "world.html" template. You won't even be able to do something like localhost/world.html because static files are usually hidden from the public and are available only to the script itself.

So if you wanted to edit html and reload on save you'd go to the path where that html is loaded and then when you edit it the browser refreshes the page making the framework route you to the html file that you're editing.

Also default XAMPP port is 80 whereas that plugin is loading up 8080
>>
>>51216374
>spend 3 years learning this
>learn LAMP/MEAN
>expand my scope well beyond web dev, learn networking, linux etc
>make shit
>apply for jobs
>get a few calls
>get a few interviews
>never get a call back
>"well it would be good if you had some commercial experience"
>give up
>being autistic doesn't help
>come to /wdg/ to help others because otherwise all of the knowledge I've accumulated over the years would just be wasted.
>>
>>51216524
Prove it
>>
>>51216524
>"well it would be good if you had some commercial experience"
if all else fails, try finding an internship or something. getting hired for the first time is always the hardest. after that it's easy peasy.
>>
what do you guys think about https://github.com/yuvaltz/Granular/wiki/TL;DR? I come from the .NET land and was wondering if this was feasible when compared to the current front end frameworks that are out there
>>
>>51216524
I feel you bro. The only job that I've gotten so far, they aren't open to any type of change at all from how they've done things. No unit/e2e testing, no git, no version control, no angularjs, nothing. It's fucking frustrating that I can't use what I've spent so much time learning.

But you'll get something at some point. If anything, you can always collab with a fellow anon with some cool project.
>>
>>51214765
>>51215098

The thing you gotta remember about PHP is that started as a personal project for convenience and made by someone who - by his own admission - never intended for it to become a language and just kind of added to it as he went along. As it got popular more people got in on it and tacked on their own shit and it's grown into a big mess of decent stuff, edge case methods, inconsistent naming conventions and what have you.

That being said, it's a perfectly usable language once you've gotten to grips with it.
>>
>>51216259
>All I want is a streaming connection between a browser and my editor so that I see every change I make every time I save, without going back and forth between programs
And that's exactly what you get with gulp, browser-sync and a browser window.
Gulp can be set up to watch your code and instantly compile or copy any changes to your web root directory and browser-sync takes care of automatically refreshing your browser every time a change is made. Just keep a browser window open on one side of your screen and your editor on the other. If you've got multiple monitors, you can give the browser its own and dedicate your main one to your editor.
>>
>>51216651
>The thing you gotta remember about PHP is that started as a personal project for convenience and made by someone who - by his own admission - never intended for it to become a language and just kind of added to it as he went along
That's pretty obvious from its design - or lack thereof.

Literally the only reason PHP is "popular" (as in, used in many old projects that are still developed and in use) is because it's old as hell and became popular back when it was practically the only option.
These days, there are a ton of other scripting and programming languages, all of which are in every way superior to PHP, and pretty much all of them have one or more web application frameworks.

PHP is essentially the Perl of web development.
>>
>>51216524
Why not start your own business? Make websites for people, just remember to read up on contracts and shit so you don't get fucked over by one of them.
>>
My collection of useful Javascript utilities continues to grow.

https://nonegiven.github.io/
>>
>>51215225
They aren't. Is your data relational? Use a relational DB. It isn't relational at all? Don't try to ORM yourself inside out and use NoSQL.
>>
Matt Damon
>>
File: wdg.jpg (16 KB, 640x360) Image search: [Google]
wdg.jpg
16 KB, 640x360
>>51216374
How do you nkow it was your bootstrap site and github? Was that all you had?


Btw, what should I put on my resume? I figure a lot of buzz-words but I feel like it'll be too short.
>>
>muh .js frameworks
>>
>>51218096
>frameworks
>>
>>51216739

I don't agree that age is the only reason for PHP's popularity.

> Low barrier to entry
> Well supported
> Many, many learning resources
> Many, many libraries
> Multiple *mature* frameworks
> Active community
> Still being updated/improved

The Perl comparison is apt though.
>>
>>51216739
Are those other web languages better at prototyping than PHP?
To be honest, frameworks and Composer (and the community) have saved PHP's ass.
>>
>>51211627
>Death to PHP edition
What do you guys think of crystal, then?
>>
>people actually think php is ded
>literal 80k a year doing php

stay delusional
>>
>>51218424
>reading comprehension
>>
>>51218352
>> Low barrier to entry
Yeah, of course this is probably also part of the reason. Any idiot can install some sort of LAMP package and throw together a .html file intermingled with PHP, whereas most frameworks actually require you to learn a little bit about how they work, not to mention "tricky" concepts such as routing and view engines.
>>
>>51217715
The only thing I have uploaded to my GitHub is a single website I built in Bootstrap.
>>
>>51218469

theres nothing to comprehend unless OP was being sarcastic
>>
If PHP is bad then what is a good backend language?

I've heard arguments against all of them desu, but give me your best.
>>
>>51218687
meme.js
>>
>>51218352

Yeah I really found the Owncloud design document quite interesting. They talk about deliberately choosing PHP to encourage babby's first project to be a contribution to owncloud source.

THere's also the huge amount of cPanel based hosting which is usually PHP only.
>>
>>51218687
Node.js, Python, Ruby, C#... anything that isn't PHP and that you enjoy programming in.
>>
>>51218535
Link?
>>
>>51218687

php isn't "bad" stop being a dumbarse

so many autists in this thread
>>
Do you guys have a method when you start working based on a PSD?

Like do you first make the structure, then you write your classes, first test structure on mobile, then desktop? What's the order in which you do all this stuff?

I'm thinking of creating my own method to save time and work faster. I keep noticing that it's probably better to first analyse the page design then decide how many classes you need for different types of text, so that you can reuse them later fast.
>>
Is procedural PHP viewed as deprecated because of OOP PHP?
>>
>>51218826
It is easy to write a mess in node.js, if you are not careful with all those callbacks and nested functions you wrote.
>>
>>51218564
PHP needs to die != PHP is dead
>>
PHP is gr8 m8
>>
>>51218889
You should store related functions inside namespaces, starting from PHP 5.6
>>
>>51218901
True, but using bluebird's promises allows writing significantly cleaner code. It can be used both in Node.js and in client-side javascript.
>>
>>51218979
Beginners won't use it. Experience is also important when developing in any language.
>>
im using flask and im running my hello.py from my desktop but flask is installed under C:\Users\John\myproject

how is it able to still run?
>>
>>51219051
Are you using virtualenv?
>>
>>51219223

yeah

so as long as flask is in a virtual environment i can run .py files from anywhere?
>>
>>51219307
It should work, assuming you've got the virtual environment activated, since doing so adds its binary paths to the current commandline's PATH.
The point of virtualenv is to have a separate set of python packages for each project that are isolated from whatever is installed globally. That way you avoid conflicts if you're running multiple projects that require different versions of the same components.
>>
>>51219586

ah ok so i dont need the virtualenv if im only working on one project at a time?
>>
>>51219610
Not necessarily, if you've got everything it needs installed globally, but it's still probably a good idea to use a virtualenv and avoid polluting the system-installation more than absolutely necessary.
>>
whats the benefits of using web frameworks that use routing? ruby on rails, flask, etc instead of making .html files and having your links go to those pages? why isnt that the standard anymore?
>>
>>51219775
Because for anything but the simplest site, you'll probably need a backend anyway, and serving the html from the backend is more flexible. This way you'll be serving both your html and your APIs from your backend. Usually, you'll use some sort of templating engine along with those frameworks, which make it a lot easier to serve dynamic HTML.
Also, no more ugly .html extensions in your urls.
>>
File: 1439856480336.gif (690 KB, 139x200) Image search: [Google]
1439856480336.gif
690 KB, 139x200
Going to be starting a project with the following

angularjs, webservices, web api, Odata.


I'm comfortable with angular and I'm only responsible for the front end, what should I know about the remainder? Best practices?
>>
>>51220692

i do the exact same thing anon

angular front end dev

just read up on the w3 schools tutorial. It goes over everything.
>>
>>51220715
I'm trying to get a grasp on it. The project I just finished used restful services. Can you describe what the differences will be between rest and this new architecture?
>>
>>51219775
Routing gives you nice URLs, and it solves the problem of when you change the structure of your web application (moving files around or renaming them).

It also provides a cleaned way to access URL data, instead of having to parse GET in your functions.

And if it's supported, why not use it?

For some uses, having some PHP files lying around isn't so bad - like an imageboard software. Static sites also use HTML files.

It's about picking the right tool for the job.
>>
>>51218400
https://github.com/veelenga/awesome-crystal
>crystal-mysql - Basic MySQL bindings for Crystal

Still in beta, and not popular enough yet.
>>
ok i set up the skeleton of my flask app

now what should i make? need ideas
>>
>>51212670
So how much/would you pay for encrypted messaging?

>implying anyone on here would pay
>just jump in when i do beta, and actually 'do dis, fix dis' messages back
>get free accounts

but thats entirely not the point of this post beta still a week or two out, and that will last a minute.
it will also remain open source


ignoring everything i've said above what would you pay for text/image/voice message?
I was thinking something as simple as $5 a year.

if a userbase goes crazy, i'd like to actually turn this into a company, that way time can be dedicated to make it more robust.

unless you think people are good enough for this to become donation based.
>inb4 Please Read: A lunar appeal
>>
>>51220969
textboard
blog
forum
question and answer site
todo list
pastebin
code hosting site
torrent site
chatroom (with websockets)
irc client
messaging system (like centralized e-mail with a web interface)
search engine
HN/reddit clone
system administration interface
lisp repl
text-based rpg
image gallery site (something like Exhentai)
booru

and of course, imageboard
>>
im so glad I foudn out about w3schools angular.js tutorial. only place that doesn't teach like they are full on autists
>>
>>51211627
If you had to learn PHP in a month, how would you do it?
>>
Should I make forms in JS?? My main reason is to prevent spam bots, since they'll probably ignore my site if they dont find any <form> tags.
>>
>>51222567
No.
https://www.youtube.com/watch?v=nNU1CYryF_8
>>
Can you use the getElementbyID() on more than 1 id?
Like
document.getElementById("input","inputtwo","inputthree");


If not, is there something similar I can do?
>>
>>51223599

What are you trying to do?
>>
>>51223599
For loop.
>>
>>51223599
I'm not entirely sure, but what if you gave all your inputs a class name, and then used getElementByClassName()?
>>
>>51223599
No, but you can make a function that does that

http://codepen.io/anon/pen/zvmBvZ
>>
>>51223684
If more than 1 field (the different IDs) has a non-numeric character than return false

>>51223701
>>51223731
Which is better for this method the getbyclass or the loop?
>>
>>51223925
For loop will probably be better, since then you don't have to add a bunch of irrelevant class names, but adding class names will be easier.

Not that the for loop is hard. What are you trying to do exactly, besides get all the input IDs? That might answer the question better.
>>
>>51224011
An order form essentially. There are 3 fields, and it calculates the total price, but if one (or more) of the fields has a letter in it, then an error code will show up after you attempt to submit it.

I already have my regular expression set up, I just need help implementing the two into my code, hence why I need more than 1 id.

Here's my code
https://jsbin.com/madumariho/1/edit?html,js,output

submission doesn't work yet of course, I'm still tweaking it
>>
Is there a clean/preferred method of persisting the "checked" state of checkboxes after form submission?

Using hidden inputs with 0 value seems a little retarded to me.
>>
>>51223925
>>51224201

Add a class to each of the input fields, then loop through them (jQuery).

$('.class').each(function() {
console.log($(this).val());
});


>>51224446

How are you doing it now? I'm not sure, but maybe cookies?
>>
http://nask.co/
any suggestions? I need feedback on features/bugs...
>>
>>51225445
says "single quote" at the end even thought there isn't one

http://www.nask.co/hear/WcCroXQJlc
>>
Content stealing is really rampant on the internet. I just Googled some random lines from niche sites and it's everywhere. Don't those paki's have any creativity themselves?
>>
>>51225515
thanks, should be fixed
>>
>>51225627
It's not stealing when you make it openly available to everyone.
>>
>>51225708
Even if you make it available to everyone you still keep your publishing rights.
>>
Why are people so high on node.js? I do like javascript but it seems like that for an application that has to be maintained by multiple devs, I'd rather it be written in something more retard proof than JS.

People always talk about muh efficency, but most of the work on an application isn't in the initial development of it, it's in maintenance.
>>
I wanna make a portfolio site from scratch with either Python or Java. Scouring the web pulls out differing results and I wanna use it as a learning experience too. Anyone know of any good tutorials?
>>
>>51222181
By starting now instead of wasting my time on cantonese photogravure tabulae.
>>
http://ringojingosden.com
take a squiz?
>>
Anyone have any experiences with Meteor to share?
>>
>>51214765
>XHTML
That was like 5 years ago. Everyone is using HTML5 now.

>PHP
Why.jpg
>>
Are React and Polymer the best javascript libraries out there, /g/? I think I want to learn one of those. Jquery components are fucked up.

Polymer seems to be better, because it works the way web components are supposed to work, but polyfills like shady dom seem to ruin lots of things (you still generate stupid ass HTML structures). Also the browser support is... oh god.

React, on the other hand... writing your entire website in one huge script tag seems like a terrible idea. How are the initial load times? But the browser support is great and so is the performance. But still you end up writing plainly visible html structures with all side effects, which is one of the things I despise about jquery. Also react lacks anything besides view components.

Which are you using?
>>
>>51226011
>Everyone is using HTML5 now.
Hm. You may find <!cocktype html> at the top of nearly every website, but they aren't really using many HTML5 elements. After all, many of them are not supported by old IE versions. Of course the sectioning elements can be polyfilled easily and html5 video can be replaced by flash if necessary, but I've hardly seen websites actually take advantage of HTML5.

Not that I'm defending teaching fucking Xhtml…
>>
>>51226029
localStorage, sessionStorage
>>
>>51226035
And how does this degrade for IE 8 users?
>>
>>51226049
Apparently it does. But I would not support IE8 for a new application under almost any circumstance. IE8 support is a nightmare.
>>
>>51226070
I know, I agree 100%. But muh boss...
IE just wasn't made for web applications. It just doesn't work. It was made to display text documents... poorly.
>>
>>51226092
Wherever you work should have a strategy for deprecating support for IE8.
>>
>>51226152
I'll ask them.
But even if we deprecate it, IE 9 isn't much better. IE 10 is the first browser that is somewhat acceptable.
>>
>>51226160
IE9 doesn't have the same type of userbase IE8 did. Some corporations are still stuck on XP/IE8. Which is the reason we have the problem of IE8 compatability.
>>
>>51225844

Most of the time it's because you can use the same language (JS) on the front and back end.

>>51225929

I'm not sure what you're trying to achieve here. Are you trying to practice back-end skills? If so, a portfolio site is not exactly a good idea since you will be writing front-end code 90% of the time.

Really, just use a static site generator like Jekyll.

>>51225985

I haven't touched Meteor in a long time but sure, what are you curious about?

>>51226016

These days, when it comes to JS frameworks, just use whichever that gives you a better development experience and has the features you need.
>>
>>51226201
I see, that's what I was secretly hoping for. After all, Vista and 7 got the upgrade to IE 10.

...But this makes it really unlikely that IE 8 will die anytime soon. After all, these insane companies are paying microsoft so they can keep using XP and still receiving security updates etc.

It's terrible.

Now Win8.1 and less are going to be stuck on IE 11 forever. It's not like edge is amazing or anything, but at least it's being actively developed and it already has some HTML5 features that IE 11 doesn't have.

Of course IE 11 support will never be as painful as IE 8 support is now or even IE 6 support was a few years ago (oh god), but I bet that there are going to be lots of new, amazing goodies for JS, CSS and HTML in the next years that will be painful to look at because IE 11 does not support them, so we can't use them. Actually, there already are plenty of those.

IE's legacy is going to be holding us all back. How fitting.
>>
>>51226274

Alright, so what's a good resource to learn front end stuff?
>>
Do you think that <select> replacements like https://harvesthq.github.io/chosen/ are a good thing?

For huge-ass lists, I absolutely HATE having to scroll through them and locate the thing I want to find manually. The search box really helps with that. I also prefer the "tokenization" for the multiple select box.

But I rarely see those used anywhere. Is there a problem with inputs like that? Of course it sucks that it hides the original select, but that's just what you have to do in HTML (until web components hit).

Also, is there a name for these kinds of selects? I'm looking for something like this for polymer.
>>
>>51226201
>Microsoft has announced it will drop support for Internet Explorer 8 on Windows beginning January 12, 2016

I don't see why webdevs would keep supporting a piece of s..oftware for which support has been dropped. After all, how much money do IE users have or spend on the webs? How important is this IE users base is in commercial terms? If we ignore companies and institutions with old XP PCs, because frankly you're not supposed to buy on the web when you're at work and corporate acquisitions are not made via browsers anyway.

So, it's likely home users with IE are just either a bunch of peasants living on a farm or just totally tech-illiterate with not much money to spend.

On the other hand, IMO, webdevs should unite and defend their rights not to develop for such a backwards platform like IE. There should be new campaigns to boycott and replace IE, educate users to install other browsers. If you keep supporting old IEs, you don't push its userbase to change their browser...
>>
>>51226515
I'm glad I work for myself desu. My website was never build for IE. I simply don't have it on my computer so I can't even check it. They just have to deal with it.
>>
>>51226442
http://morgancarter.com.au/design-solutions/which-input-when/

Solutions like chosen.js are nice, I'm using it when needed and it's a big plus to the UX.

Now it's not common use simply because in most projects nobody gives a shit about usability, you can also have some backward thinking like "Only native form elements. End of argument." (saw this shit on leddit), to me this is just lazy work, native elements are fine most of the time, but sometimes something like chosen.js is a genuine good way of enhancing a form.
>>
>>51226523
If I had a business in webdev I would have no problem with not supporting any IE version below 11. Or not supporting it at all, for that matter. I don't think I would be losing that much and I would actually not care. If those customers are so retarded that they still are using IE in 2015 I don't even feel sorry for them. They should just educate themselves and step into the 21st century.

It's not my problem if they are losing out on everything that's cool and standards-complying on the web. I wouldn't want any money from such customers.
>>
>>51226538
That's great, thank you.
>>
>>51226430

You're >>51225929 right?

https://www.bento.io/tracks/front-end
https://www.bento.io/tracks/front-end-continued

>>51226515

Because most of the internal facing (not end-user stuff) web applications in large corporations (heck, even Fortune 500s) are written with IE8 in mind (heavy use of ActiveX?). Webdevs that support and maintain these applications are paid A LOT. So the problem here is that these corporations has a "don't fix it unless broken" mind set, they'd rather pay devs an upwards of 100K / year to maintain everything in status quo and ensure nothing breaks than upgrade their tech (which, by the way, is still very costly even if you outsource them; corporate stuff is different).

And besides, anyone that has held a IT job in a corporation whose market isn't tech knows how it's like to deal with upper level management so nobody really bothers with them anymore.

>>51226442

There's nothing wrong with them and improves UX a lot especially when you're working with large datasets. Anyone who tells you otherwise are idiots.

also, https://brianreavis.github.io/selectize.js/ is better IMO
>>
>>51226555
if your customer is a huge company where most users use IE8/9, which they cannot upgrade themselves, then it's your problem.
>>
>>51226623
>https://brianreavis.github.io/selectize.js/

Looks pretty good. This also has ADDING custom tags, which is something that I've been looking for in chosen and skins for bootstrap.

I'm trying to make an application in polymer where I also need a select element like this. Google's components don't seem to contain something like this, though. Does anyone know of a select replacement like this that's implemented as a polymer web component and has material styling?


...Actually, now I get it. I don't need one. I can easily make my own by using that JS plugin. That's exactly what HTML imports are there for... Holy fuck is this amazing.
>>
>>51226555
>>51226640
>>51226623
>Because most of the internal facing (not end-user stuff) web applications in large corporations (heck, even Fortune 500s) are written with IE8 in mind

Surely these companies do not want to keep unmaintained browsers with security holes, right? Even if they don't upgrade their tech, they would upgrade a piece of software as crucial as a browser?
>>
>>51226623
>Because most of the internal facing (not end-user stuff) web applications in large corporations (heck, even Fortune 500s) are written with IE8 in mind (heavy use of ActiveX?).

Oh, so if they are large corporations they have the money to upgrade? Cool. We just dropped support for their IE8/9. It's time for them to upgrade. All it takes is for webdev firms to make an alliance and decide to stop developing for such platforms at all costs. If you don't make the change, they don't make the change either, and everyone ends up supporting card-punching technology just because if it works why change it. With this mentality nothing will change.

>>51226640
No, then it's their problem that the IT guy didn't install some version of Chrome or Firefox on their PCs as part of the default package. How can they possibly keep IE which has a history of known major security bugs? Normally, if you are a company which cares about the security of your infrastructure you don't even keep IE installed, you remove it immediately and install some secure version of Chrome/Opera/Firefox.
>>
>>51226201
Don't newer versions of Chrome or Firefox run on Windows XP anymore?

Even if they don't, there are probably old versions of them that do that are still a hell of a lot better and more standards compliant than IE8.
>>
>>51226623
>web applications
>IE8
>>
>It's jQuery-based
why, why, why every interesting piece of code needs jQuery? With modern browser, it's not as useful as in the past.
>>
>>51226029
Just because not every element from the standard is used on every site doesn't make them not HTML5, as long as what IS used follows the HTML5 standard.
>>
>>51226029
>but they aren't really using many HTML5 elements
what do you mean, like not using semantic tags instead of <div>?
>>
>>51226748
And also, regardless of how many sites do or don't use XHTML currently, no new site created today should ever use it.
>>
>>51226709

Sure.. Bring it up with the management, if you're lucky they will dignify you with a response along the lines of:

> It's been functioning properly for a long time, there has been no security incidents, why should we spend money and downtime to upgrade? And it's all internal running on local network wired through Ethernet which is never exposed to the public. What security risks are you talking about?

Because that's the reply I received.

By the way, I know of a hospital that is still running IE7.

>>51226724

Someone somewhere will still do it for the money. Money is how businesses and corporations work. It's futile. Microsoft dropping support is the only thing that will change anything.

> With this mentality nothing will change.

That's precisely the problem here.

>>51226740

?
>>
>>51226744
it's still the best library for standard non-app-like websites for crossbrowser dom manipulation

$('input[type=checkbox])
.is(':checked')
.addClass('whatever');


I like it, it's easy to see what's happening and fixes browser quirks for you.
>>
>>51226902
oops
$('input[type=checkbox]')
.is(':checked')
.addClass('whatever');
>>
>>51226874
>It's been functioning properly for a long time, there has been no security incidents, why should we spend money and downtime to upgrade

Because we just stopped developing for that old shit, so now you have to deal with it. :^)
>>
>>51226874
>IE8/9 ~ 2% market share

>Developing for a total of 2% of market share which uses an old browser, full of security holes and which lacks support for many web standards

Tbh senpai, I only support IE9, if an employer will ask me to support IE8, I'm sorry, I'm going to look for an employer which doesn't support IE8 and possibly, not even 9, though I'm willing to make an effort still for 9.
>>
>>51227106
9 is doable, it has svg, canvas, a bunch of css3 selectors, border-box sizing etc, 8 isn't an option anymore

the last company I worked for dropped 8 about a year ago, I reckon they will drop 9 early next year

I'm a freelancer, I won't work on a project for ie8 unless my hourly rates are increased to compensate, and only then if it's a simple website
>>
What's Opera Mini real market share, I though it was based on Chrome too but it seems to not support a lot of latest ES6 features.
>>
>>51227131
too small to matter
>>
Who /fuckedupsleepingschedule/ here?
go to sleep at 9PM and wake up at 2AM.
>>
File: 1442698873080.png (148 KB, 348x421) Image search: [Google]
1442698873080.png
148 KB, 348x421
>>51227106
>MFW I'd love to use a lightweight flexbox-based grid but it'll be a pain in the ass to have a consistent behavior in all browsers for years.
>>
>>51227451
Flexbox kinda works in every non-IE8/9 browser, I think.

Just a few alignment types don't work in Safari I think (justify-content: flex-start etc).
>>
>>51227665
There's always this annoying client who wants support for Safari 6.
>>
>>51227238
I actually met a guy today that goes to sleep at 6:30 PM and wakes up at 3 AM. Normal guy at the office, bachelor life
>>
>>51228054
Nothing fucked my health more than not having a regular sleep schedule for years...

You should literally sleep during the night and be up during the daylight. Anything else will fuck with your health very badly later age.
>>
>>51228054
The likelihood he became like that by looping right around is great.
>>
>>51227131
Opera Mobile != Opera Mini
Mini is for non-smartphones.
>>
>>51228287
Ha thanks, I was looking at this http://caniuse.com/#feat=fetch
I don't care about IE but mobile support was important
>>
is there a way to do this with variables and not only functions
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/static

class Foo {
static bar = [];
//...
}


gives SyntaxError: Unexpected token =
>>
>>51229451
Nope. Maybe typescript has class properties, I'm not sure.
Class Foo{ }
Foo.bar = [];
>>
>>51229451
Coming in ES7. Right now you have to
class Foo {
//...
}
Foo.bar = []
>>
I need some help picking a direction to go in. I'm trying to make something that behaves differently things that I've done before and I'm not sure how to google for it yet.

>user clicks button to create a unique session and receives a sharing link to it
>additional users join session by clicking sharing link
>any data manipulation performed by a user in a session immediately propagates to all other users of that session

At first I thought Angular's two-way data binding could do this, but after some reading it sounds like two-way data binding means "if i change this variable in the client, anywhere this variable is used elsewhere in the client will also change immediately" and it doesn't really have to do with pushing change back to the server and out to other users.

Any ideas on where to start with this behavior?
>>
>>51229568
Websockets, you can use Angular bindings to detect the changes and push those to the websocket server.
>>
>>51229568
Websockets (SockJS/socket.io/engine.io/etc.)
>>
>>51215288
Use brackets, Atom-based and the browser thing works very well.
>>
Is there any way to create form components in react.js? In Polymer, that's not that difficult... you just implement the correct behavior and wrap your inputs in an iron-form.

I have not found anything like this for React. It seems like this is because React, unlike Polymer, does not actually have a "standard library" of elements (or behaviors for components).

So... how do you handle forms in it?
>>
I'm using SweetAlert, and I need to add !Important to everything when using a custom CSS class. Is this supposed to be this way?
>>
>>51230731
Oh nevermind, adding the custom stylesheet last fixed it. Still pretty new to HTML.
>>
>>51230743
Look into "css precedence" too.
>>51229871
Google (Duckduckgo) has some results, but maybe that's not what you're looking for.
>>
>>51212329
>this
>>
>>51212116
I think mega.nz does this.
It's not perfect though.
>>
im connected to a project in VS and can access the bug list but cant seem to find the actual source files of the project so i can start editing code. Where should i be looking?
>>
File: 1418182674209.jpg (28 KB, 498x321) Image search: [Google]
1418182674209.jpg
28 KB, 498x321
>javascript is a fundamental required skill for today's developers
>>
>>51232553
ES6/7 is nice to work with though, not perfect, but nice
>>
File: 1360079757586.jpg (66 KB, 518x460) Image search: [Google]
1360079757586.jpg
66 KB, 518x460
Why does the export database function in Phpmyadmin have so many vaguely named checkboxes? All I wanted to do is to export my database.
>>
>>51232906
mysqldump -uroot -p your_database > your_database.sql


You only really need to set the format to sql and hit export in PHPMyAdmin anyway.
>>
I need to write a Javascript that will iterate through elements in an unordered list and hide the ones whose contents don't match a regex. The problem is I don't have much experience with Javascript, how hard is doing this? Is it feasible? Can I learn enough to do it in at most an hour?
>>
>>51233240
sounds pretty straightforward. i don't have much experience with js, but i'd probably create a new array, iterate over the old one `push()` elements that match the regex into the new one.
>>
>>51233240
https://lodash.com/docs#filter
>>
>>51233240
you can use .match which will return only matches to your regex, it will return it as a new array. use that array instead of your old one as your base so you don't need to hide the ones who don't match.
>>
>>51232942
I'll give it a try. Just for the sake of learning.
>>
Aspiring web dev here. If you were freelancing Is this the type of field you can enter, work for 6-8 months, take a month off and enter right back in for the rest of the year? Im interested in understanding the dynamic behind acquiring clients and work in general
>>
>>51233435
You can do whatever you want if you have money and clients lined up for when you want to work.
>>
>>51233435

That sounds about right. A gap month between contracts shouldn't mean shit, because you can say that you were coding for personal projects or doing continuing education for new web standards. Managers who contract in this way usually have no idea what programming is, and are willing to throw a couple hundred to "just make it work!"
>>
>>51232906
it was made by php "developers" who obviously can't do anything right
>>
>>51232906
anything with php or mysql is bound to be shit
so that makes phpmyadmin doubleshit
>>
>>51233536
>>51233550
famesag
>>
>>51214725
don't think so. Looks weak and stressful to read.
>>
>>51216739
>the Perl of web development.
perl was the perl of web development
matt's http://www.scriptarchive.com/ anyone?
>>
Can someone help me. I have a popup calendar script that I'm trying to use with a form that has a button to add another form of the same type (form #1, *click button* form #2, etc) The inputs are arrays which work but I cant get my script to work after the first form. Any tips? Thank you


<input type=text name='doc_date[]' size=9 required> <A HREF="#" onClick="cal.select(document.forms['mortgages'].elements['doc_date[]'],'anchor1','MM/dd/yyyy'); return false;" NAME="anchor1" ID="anchor1"><img src="calendar.gif" border="0"></A>
>>
>>51233742
Well, apart from Perl itself than.
While Perl probably can be and has been used for CGI scripts, it's so unimaginably horrible that it makes even PHP seem quite pleasant in comparison, and it's not popular like PHP anyway.
>>
>>51233923
What's wrong with Perl?
>>
is using eval() still bad if there's absolutely no user input involved?
>>
>>51234227
Weak typing. Prefixed variables.
In other words, the same main ones as PHP.
>>
>>51234365
In what situation?
>>
>>51234387
I have a basic page where certain elements need to be update periodically without reloading the page by fetching their content from the server, but setting an element's innerHTML doesn't run any scripts in it, so after inserting it goes through all the <script>s in the element and eval()s their content.
>>
>>51234423
what you're doing is probably stupid and unnecessary.
>>
>>51234589
Thanks for the help I guess
>>
>>51212114
>enviroconcrete.com.au
nice. u made this in 1997?
>>
>>51234423
the fuck are u doing son
Thread replies: 255
Thread images: 21

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.