/wdg/ - Web Development General

Previous thread >Discord
discord.gg/wdg

>IRC Channel
#Sup Forumswdg @ irc.rizon.net
Web client: rizon.net/chat

>Learning material
codecademy.com/
bento.io/
programming-motherfucker.com/
github.com/vhf/free-programming-books/blob/master/free-programming-books.md
theodinproject.com/
freecodecamp.com/
w3schools.com/
developer.mozilla.org/
codewars.com/

>Useful Youtube channels
derekbanas
thenewboston
learncodeacademy
funfunfunction
computerphile
codingrainbow

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

>Backend development
en.wikipedia.org/wiki/Comparison_of_web_application_frameworks
[Gist] backendDevelopmentBookmarks.md

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

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

>How to get started
pastebin.com/pDT82mQS
pastebin.com/AL6j7GEE

>cheap vps hosting in most western locations
lowendbox.com
digitalocean.com/
linode.com/
heroku.com/
leaseweb.com

Other urls found in this thread:

forum.ionicframework.com/t/error-could-not-find-gradle-wrapper-within-android-sdk-might-need-to-update-yo-ur-android-sdk/22056/5
en.wikipedia.org/wiki/SQL_injection#Incorrectly_filtered_escape_characters
code.visualstudio.com/docs/languages/typescript
jsfiddle.net/GwgDN/64/
pastebin.com/9jH4Fnne
xkcd.com/927/
github.com/DefinitelyTyped/DefinitelyTyped
twitter.com/AnonBabble

1st for it's possible to install Android SDK to work with Cordova for some reason and no tutorial helps at all.

impossible.

Where should I put the recaptcha? Modal?

I need a designer. I have a ton of projects I'm doing and they all look like shit.

Anyone know how to get cordova working?

It's saying it "Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK"

I have the most recent android sdk.

Uninstall Cordova when you reinstall make sure it's the most recent version

I just did npm cordova -g update and I'm having the same issue.

Did you tried everything listed in the stackoverflow threads?
forum.ionicframework.com/t/error-could-not-find-gradle-wrapper-within-android-sdk-might-need-to-update-yo-ur-android-sdk/22056/5

It worked! That tools download fixed everything, it built the app.

Thank you so fucking much. No idea how I didn't come across that thread when searching for fixes.

So how come limit doesn't work when doing this?

$result = mysqli_query($con['main'], "SELECT * FROM ".$database['1']." WHERE ".$wherethis." ".$wildcard." '".$search['term'].$endwildcard."' LIMIT".$limit."");

>not using cgi and writing your backend in c

what's in $limit?
seems like you're missing a space after LIMIT as well.

besides, use parameterized queries user, don't plop them together like this.

What are some general trends right now? More and more mobile instead of desktops/laptops in the coming years? More video-based content than text-based?

I'm a total newbie

Yeah lol that was it. I let users set their own limit inbetween 100 and 100,000, so a number.

parameters, user.
en.wikipedia.org/wiki/SQL_injection#Incorrectly_filtered_escape_characters

Yeah I already filter everything separately. Hence no _GET or _POST in the query itself

When your DBA at work doesn't comply by Normalization rules, doesn't enforce table relationships and thinks it's a good idea to let foreign key columns have nulls...!!!!

Hey I have a weird thing happening on Heroku:
>push dummy commit
>request index page
>all good
>request dummy page which just lists all entries in a table
>get SQL connection exception
>refresh
>exception gone

Anyone get this before? It's Heroku Postgres if you're interested.

I had that kind of client once. 4 months later we ported an intranet for a new customer, who then required a normalized database, and somehow it was my fault.

Jokes aside don't do foreign keys and constraints lol. Huge performance impact where you could just enforce the rules in the software and retarded clients will want exceptions to those restrictions.

/s Microsoft did this in all of their Dynamics-family products

in typescript, how can i have duplicate identifiers across separate files?

it seems to think all scripts in the project are going to be ran at the same time

i'd be happy with being able to turn off "auto-include every file" and using /// to reference files in a sane way but i don't know how to do that

having "include": [] in tsconfig disables checking altogether which isn't what i want

>just use modules/namespaces
i'm using typescript in javascript mode and surely there's a solution that doesn't require added code and complexity and compilation steps

No, but I had SQL exceptions with Heroku before. It was usually caused by the connection limit being reached.

That's weird I would assume there's only one connection from my app. Do you know whether they are reusing the servers for multiple instances of the Postgres addon?

what are you trying to do?
each page has its own Section object?
Why not make a class which contains the object and create a new instance of it for every page

Stop using typescript. It's a cuck lang.

i was hoping the contrived example would make sense

i just have two things named Section that serve different purposes and can't even exist in the same page/context

it's b*llshit how i can't use the same name for them even though they can't clash

well meme'd friend

Stop blinding yourself.
Stop using typescript.
Find better things to enjoy in life.

that's unrelated to typescript, but how vscode treats files in the same directory as one project. you can set it to file scope, so it treats each file on its own.
code.visualstudio.com/docs/languages/typescript
now how you actually set it to that I don't know, I don't have vscode.

Trying to grab the content of the data-expanded-url attribute. What am I doing wrong? Pls help

jsfiddle.net/GwgDN/64/

>Uncaught ReferenceError: myFunction is not defined

who taught you to use onclick attributes?
especiall yon jsfiddle the entire script you enter is scoped, so you can't access those from outside, use addEventListener.

to continue on that, did you even look at your console output?
>uncaught TypeError: document.getElementByTagName is not a function
there's only getElementsByTagName.

learn your development tools.

What podcasts do you listen to when you're programming?

I always listen to judge judy in the background.
americans sueing each other for trivial shit is hilarious.

I don't listen to podcasts while programming because it's information overload and one of the two winds up being half-assed.
I only podcast while doing actually monotonous tasks, such as cleaning, exercise, or gaming.

I have to build a file based php mysql gallery upload system and the images are stored on
my file system/server but the user uploads them with a description.

I've got no idea how to link the images they upload that are stored on
my file system to the description which the user then uploads to my MySQL server.
Is there a way to bind or link the data so when I display the image I relevant description.

generate a guid for the image and save it as such, save the guid and other image information in the database.

He is right though. High level of normalization is retarded. You need to design a DB by identifying what queries you'll be running and optimizing the DB layout to run these queries more efficiently. You don't need to compact your data like it's 1975 and your HDD takes a whole room and it needs 3kW of power.

>tfw you ask your client
>tfw "We don't know."
>tfw "We've been in production for 30 years and have no way to check."
>tfw "Nope you may not get readall/sysadmin rights on the database."
>tfw "That's why we hired you! To magically figure everything out and fix our problems forever."

And as a bonus:
>tfw @ Uber and switching databases every 6 months because we're retarded

Wouldn't this mean changing the filename for the image.
What if I wanted it to remain the same how would I link the GUID to the image then

DB:
img_id: 1, desc: lorme ipsum

filename: 1.jpg

tada

why would you want to keep the filename?
it doesn't matter how you save it on your disk.
you are saving the original filename in the database anyway and can return it the original filename from your backend.

You have 2 major options:
1. Save the image in the DB as a BLOB and save it's data in the same row; file type, file name, description. This will allow you to have multiple files with the same name.
2. Generate a UUID like wrote. Then rename the file with this UUID and save it in the file system.Then save the file name and description in the DB.

your mysql table should have these columns, which you should fill when an upload is successful

-path_uploaded_to
-guid
-filename
-size
-mime-type

Thanks lads, in the right frame of mind now to sort this out

PHP > others
that is a fact, not a bait desu
It is so natural way of programming

how do I php

You kill yourself. Just use some sane framework if you really like drowning in shit.

>It is so natural way of programming
let me guess, it's your first language?

Are there any guitars that have 12 strings, but have like a switch so you can mute 6 of them and change between 12 and 6?

Sup Forums - guitars

try or

No

...

That would sound like shit because you would keep hitting the additional 6 strings every time you strum.

3rd desu

I started with c->c++>java and then ->php

Which one is the best according to you?
>if you are thinking js pls dont reply to this post.

Shit, I forgot I wasn't in /gg/

>>if you are thinking js pls dont reply to this post.
who are you quoting?

>who are you quoting?
me

so js it is, you must be some hipster faggot

it's a nice language once you actually learn it

not that an unenlightened PHPeasant like you would know

no it is not nice

PHP is the best backend language ever written. Prove me wrong.

>inb4 b-b-b-but what about muh frontend language that some retard decided to use for backend

my negro

Guys how hard would it be to build something that

1.scrapes information off ebay like buyer email address + quantity

2a.Creates login details from the browser Webmin of a server by entering 3 different strings and selecting 1 option from a drop down menu
2b. Downloads a string and a zip file.

3. Create an email from a template, enter in scraped Ebay email address + downloaded string + attach zip file.

4. Once email sent, send email, leave feedback and mark as dispatched in ebay.

I know basic bitch programming but not done it in years so don't really know where to start. How hard and length a project would this though and if I were to do it what languages and programs would I need to be up to speed with?

The only program I am any good with is excel...

It'd be extremely easy. Try it in Webassembly.

>TFW we have no foreign keys in our database because "They make development slower".
Developers who don't understand technical debt should be shot. Out of a cannon.

no relationships, some people take them hard :'(

Why are there so many JS frameworks?
Why can't we just make one framework that solves everyone's problems?

because js is for hipsterfaggots
hipsterfaggots like to be different so they will always try to bring something new, even if that new is shit

>curly brackets for single lines

REEEEEEEEEEEEE

class
{
function
{


if{
else{
for{
while{
switch{
etc{

only when is class and function

Because that isn't how anything works in the real world? In which scenario has "one solution" effectively worked for everybody? Truly curious.

you could just run ffprobe instead of ffmpeg, it can return all the info as json.

oh never mind, it does thumbnails, whops.

you shouldn't let the internet influence your opinions on things so easily

you're criticizing a language you don't know

what's that thing called where you settle with something bad because you've never tried anything better

or the one where you refuse to try anything new

i think combined with pigheadedness and immaturity they'd describe you well

i don't know how to talk sense to someone who won't listen

everyone has different problems, you don't want one giant framework with everyones edge cases in it.

>class for a single method that doesn't even use any class features
php users

>what's that thing called where you settle with something bad because you've never tried anything better
>or the one where you refuse to try anything new
>i think combined with pigheadedness and immaturity they'd describe you well
>i don't know how to talk sense to someone who won't listen

I tried rails, django and node, i try everything by myself

I like it that way because i dont include any class in file, i use autoloader.
When i type class name autoloader will load it
pls dont be bully

i might be confusing you with if that post isn't yours

i've used php before & i followed some site making tutorial involving node, express and jade once and i can't understand how anyone could prefer manually concatenating and echoing strings and manually managing loops when frameworks (is that the right word) exist

You are not memeing /wdg/? Should I unironically learn PHP?

ofc you should

Of course, but not because of memers.

How much should I charge for installing a free WordPress™ theme+plugins
+make them some logo if their's is shit on an existing domain for some small pizzeria or cafe?

I thought of just searching for these in some small towns on yelp/4square/google and if they have a shitty website, send them an email proposing this.

Would they even pay through Paypal?

Its pretty much used for everything and does a lot of the heavy lifting if you have databases.
>B-but facebook uses react
Big websites specialise have javascript specialists and only use it for certain small tasks.
Only use javascript for fancy animations or dom manipulation. Things like form handling is much better in PHP

You are joking, right?

Creating global variables is almost always stupid. Wrap that shit in an IIFE.

I am trying to make it so a raspberry pi with no javascript can connect to Micky D's Wifi.

This wifi is free, and all you have to do is hit a button and then it whitelists your mac address.

The HTML of the page that has the button has a form.

The form looks like this by default:

pastebin.com/9jH4Fnne

I have tried reading the form, copying its data to a new form with no onSubmit field, and then submitting it but that didn't work.

Feels like that was a shitty hack. My question is: what is the right way to do this?

xkcd.com/927/

can't use them in other files that way

i ended up renaming the other Section

What are typescript postscript and coffeescript actually used for?

Are they just meme langauges for people who dont wanna use javascript.
How would one use them when their are so many javascript frameworks would they accept the language

Who /ELIXIR/ here?

I'm assuming the validationHash is generated when the page loads once, so you'd have to get the correct value from the actual page beforehand every time.
without JS or any other language, forget it.

Is it comfy?

Comfy general desu

they transpile to javascript, it's just a little different on how you write your things, the outcome is plain js.

I refuse to use Elixir for any complicated application until it gets a good IDE or debugger.

So you are saying I need to recalculate the validation hash?

Would the hash be generated from the JSON of the form data?

I'm trying to do it in python. I can cope with any language though.

>typescript
it enforces types

>their are so many javascript frameworks would they accept the language
github.com/DefinitelyTyped/DefinitelyTyped

most popular-ish javascript things have type definition files for them, and you *are able to* use plain javascript files with typescript but there isn't much type information in them so it can't do much type checking around them

no, you just grab the hash.
open the page, read out the hash and session cookies if any.
then post it with the other information to the target page.

any way to get free credit on digitalocean (already used a ten bucks code) or namecheap? im a cheap bastard