How do I do server validation for a form in php when working with wordpress?Can I just have action in the form as empty and then have some check on the top of the php script if there's anything in the global post variable and then go on from there?
Carter Nelson
>tfw two threads in a row got archived before reaching bump limit
Anyway, how do I get better at web/UX/UI design? Where can I find good sources on those topics? I tried googling and only found shitty blog posts saying "just use right colors and fonts :^)".
Jeremiah Morris
I do multi tenancy with shared tables in postgres, e.g. most queries work with filtering for the user_id. It feels like such a hack and scared one day I will introduce some shitty bug and will leak sensitive data. What would be the correct way not to fuck this up?
William Peterson
Php + Laravel + Elephant.io > NodeJs
Adrian Ross
'for of' is stupidly slow in Firefox and .reduce() is slow in Chrome. basically means unless you know the environment your code is running in like Node, you have no choice but to default back to a normal for loop, if you want your code to be efficient.
Is it that hard to optimize them both equally? Each browsers dev team seems to have gotten one part of it right.
eh, you could read some design specs of different companies, like the ones for googles material design, but much of it just seems to be a matter of feeling and intuition, if it's not supposed to look like a clone of hundred other sites.
Ryder Bell
What's the css id of the firefox background behind a website before it loads.
I have dark themes and it flashes white every time it switches between webpages.
Jace Scott
what I especially don't get is how for...of is >90% slower. It's literally just syntactic sugar for a normal for loop, except that it gets the element of an iterable value right away. Someone got any insight here?
.forEach() is also not that fast as the normal for loop as far as I know.
Gavin Turner
Why is it so damn hard to embed videos correctly?!?
I got a smaller site where I have to embed some Vimeo videos. But on some mobile phones (newer iPhones) you can't even play the videos.
I've already put a lot of effort into this, what's the correct way of doing it? Which HTML / CSS elements do you use for responsive videos?
Logan Thomas
Your daily dose of webdev free resources and memes.
hey guys, I had my first phone interview for a Python Developer position, did pretty well on that so I'm gonna do their technical interview tomorrow. They said it's a 6-hr long challenge, 2 problems to solve, not related to web-dev but just general coding and problem solving. Any useful tips to prep? Good sites not just with exercises but with tips and stuff like that?
Jaxon Jenkins
apple doesnt support flash bro
Jeremiah Parker
Eh?
I'm not sure this is the point here. First of all it works on some iPhones. Also it should be HTML5 and not flash, amiright..? I mean we have 2018, I'm sure Vimeo doesn't use flash.. Hehehe.
Connor Ward
for loop is faster however a lot of the time this added performance won’t make a difference in your application, and using for over forEach() is premature optimization. Instead, optimize for code readability to ensure easier long term maintenance.
As for firefox... just don't . It lost the browser wars its not meant to be fast. Its a fashion browser funded with donations from literal google.
Nicholas Price
Webkit on mobile doesn't handle media too well, you still can't view webm as far as I know.
Ryder Howard
Mang, that feels bad. My customer has zero tolerance because "how hard can it be to play a video on a mobile phone?!" - if you know what I'm saying..
Anyone using golang? I'm going to have to pick it up for a job, what are the best resources I should look at? Ideally, project based tutorials. Thanks.
Zachary Kelly
> >64232039 stop splitting the thread with your server spam Yeah Safari support for many things is really dodgy. Not without a reason that it sometimes gets called the new IE. yeah I guess. I mean JS is fairly fast already compared to other webdev languages and I don't have any performance issues. >As for firefox... just don't . It lost the browser wars its not meant to be fast. The new FF version improved performance quite a bit and no wonder that Chrome has such a massive marketshare with the reach Google has.
There are definite issues with Mozilla though, like them sending considerable amounts of money to political antifa-like activist groups for whatever reason. youtu.be/KPgyTzqDJhM?t=65 Or the shit they pulled with force-installing that Mr.Robot tv-series browser extension recently. Generally showing that they don't really give a fuck anymore about users, as long as their behavior is profitable for the company. youtu.be/qMALm1VthGY?t=40
It's frustrating that there is no real alternative. The best you can potentially use are things like Chromium or the various FF forks, but there is no real standalone browser committed to the simple principle of privacy and not fucking over people and shamelessly profiting from their data, while at the same time shipping with compatibility for modern HTML, CSS and JS features. But I also know too little of Brave and Vivaldi to determine, whether they would be viable options.
It's true that nothing beats Chrome for webdev purposes currently at least.
Christopher Fisher
start of the semester in which i create my senior capstone web development project -- what should i do?
Aiden Cook
How do these interview tech challenge things work? Can i look stuff up on stackoverflow? I mean, even at work i always look stuff up all the time. I may not know everything,but im damn hood at finding out
Noah Butler
How should MPA react apps be structured? Should every page have its own root component that imports what's needed?
Luis Long
offline coding, aka whiteboarding. You will probably explain your ideas and throw up some (pseudo)code, they will help you with whether to use size or length and whether it is a function call or a property.
in 6 hours you will get different etaps, probably you will have to sketch up some system architecture too, e.g. here is this webserver/load balancer/db, but oh no, we have a problem with performance, how would you investigate, what components would you introduce/change to increase throughput, decrease latency etc.
you might get some puzzle questions think how many piano tuners in new york, or some algorithmic bullshit e.g. invert a binary tree or some stupid linked list pointer fuckery
cracking the code interview covers 90% of the questions I was asked in all my interviews and it really never mattered, because in 5 mins you will know whether they want you or just wasting your time. In the first case they will make excuses if you fuck up, because you explained your thoughts well and looks like a helpful teamplayer, in the latter you are capable but not a good fit and will be notified in a week
>what does this do function f(a, b) if b = 0 return a; else return f(b, a mod b);
Nathaniel Perry
>what does this do computes the gcd (greatest common divisor)
in C, simple example int gcd(int a, int b) { return !b ? a : gcd(b, a%b); }
Gavin Cook
just got hackerrankd one more time. BST and linked list fuckery, just as I expected. Always swear I will never fill another shittest, but need to get a job.
Ian Bell
what's a good place to buy design resources that isn't themeforest
Bentley Mitchell
>cracking the code interview Thank you for mentioning this I'm very nervous about interviews for my first position this helps me feel more prepared
Zachary Ramirez
Every fucking time I play javascript youtube video tutorials I get a fucking WIX add. EVERY FUCKING TIME. This is is trying to discorage me or what? mother fuckers
Joshua Martinez
>wix >kode with karly >grammarly The future is nigh.
Asher Bailey
you gay
Jose Clark
>grammarly
everything about those ads makes me see red
Jaxson Powell
that shit helps you with your grammar, but you are giving to them everything you tipe?
Levi Thompson
Why aren't you using a good content blocker? You can support channels you like way more by other means.
Noah Richardson
>The future is nigh. I changed path because what I was doing will be automated in 2 years and now i am learning web development because I dont want to be replaced... ;__; I have to worry?
Wyatt Wood
>using a good content blocker? like adblock and that shit? can i use different ones at the same time instaled in my browser? Sorry for my ignorance
>can i use different ones at the same time instaled in my browser? probably, but why?
Ethan Taylor
why did you get fired / why are you about to get fired?
Alexander Gomez
MySQL or Azure table for my simple blog project? Which looks better to a prospective employer?
Jose Edwards
MySQL, simply because how popular it is.
Adam Nguyen
I am going to start a blog. I want to design it myself, but I am a turbopleb when it comes to design. I am a programmer though. I've setup Jekyll and GitHub pages etc.. How do I make my own design? This would be like a portfolio site+technical blog.
Justin Kelly
The portfolio is going to be a bunch of WebGL and we audio stuff btw.
Josiah Edwards
just find a free template and modify it however you need to.
Parker Bennett
Steal other designs, or use a UI framework. I like Semantic UI
Grayson Ross
newbie developer here. Know react and rails. My father has a project he wants me to work on involving his business. Basically he wants a user to be able to answer questions which will then render out the users buying options.
It's simple enough sounds like a perfect project for react and I could build it out if I had data needed from his end.
The part that I'm lost by is how would I be dealing with users submitting credit card info and how would i even process such a transaction. Is this all way over my head??
Benjamin Sanders
Should I just give up on designing it from scratch?
Lincoln Ward
Look at APIs for payment gateways.
Leo Anderson
Do the logic yourself, but if you're not a designer then nobody is going to judge you having someone else do your design work.
I work for a small web consultancy and every time we build some utility for a business's in-house use we just use AdminLTE for the early versions if not the finished product itself. It's free, looks good, works well (and its easy enough to pick apart if something weird is happening in the stock JS), and we don't have to pay a designer to keep making revisions while the spec is still in flux.
Colton Collins
Like, right now the 3rd largest wholesaler of [REDACTED] in the US has an admin back-end that's just straight up AdminLTE because of us lol.
Kevin Watson
We're using Braintree for a couple projects at work and while I'm not the one tasked with implementing it, it seems p dope from what I've seen. Like Swipe and other CC processors, the CC info never touches your servers so you don't have to deal with any bullshit data security compliance. If a user wants to save his CC info, you get a key to reference a user's CC in Braintree's system. It's also css-stylable. I don't know what they charge though.
David Bennett
wtf am I doing
export function fetchBundler(actionType, fetch) { let bundle = []; let promise = null;
how is that supposed to work? 'ids' is a reference to 'bundle'. 'bundle' is set to [] and then passed on to next(fetch) as 'ids', which then can't fetch anything??
Daniel Green
bundle's value isn't cleared. bundle variable will reference a fresh array, but ids will keep referencing old, populated array.
Dylan Allen
Calling all PHP developers. I'm trying to calculate procent between two prices, and its not giving me multi-hundred procent prices.
((1 - $usdold / $usdnew) * 100)
So if $usdold = 70 and $usdnew = 1000, procentage = 93.000% when it should be 173.832%
Anyone know a way to get around this?
Ryder Parker
i have a pretty noob question. my images that are loaded with html and css disappear after maybe 10 minutes of inactivity and have to be moused over (or scrolled by) to reload. Anyone know why something like that would happen? Literally just loading images with tag or using backgroud-image.
Jaxon Brown
ah yes, In my head I just jumped directly to "arrays are passed reference" and then overlooked, that bundle isn't mutated, but gets a completely new object assigned to it. nevermind
Charles Mitchell
I don't know how to make a query. I have a catalog with item ids, and users express preference between item a and item b, where a and b belong to the catalog. So the set of possible choices is all combinations or order 2 of id column. The db also needs to remember decisions, so a third table remembering choices. I was thinking about making a cross join with id itself and then a NOT IN in choice, but cross join gives me same tuples in a different order.
Kayden Cox
I came here to complain.
>Following "Pro MERN stack" book >Everything is going fucking great, learning shit ton of new things >Get to chapter 7: Modularization and Webpack >Everything he says and does crashes application, doesn't work >Try fucking with the webpack.config.js >Compiles succesfully >It makes 1000 new files, all weird as fuck >Application no longer visable >Errors in the console
This is the worst fucking feeling in the world. Spending 3 days going through a fucking book, only to get to a chapter that is outdated as fuck. Like I can't even finish this book now, it was almost a fucking waste. Stupid Indian author done fucked me up!
Anyone familiar with this shit?
first console error is: Uncaught Error: Module build failed: Error: ENOENT: no such file or directory, open '/home/user/code/issue-tracker/node_modules/react-dom/index.js'
Second:
Uncaught ReferenceError: process is not defined at Object.emptyFunction (app.bundle.js:694) at __webpack_require__ (app.bundle.js:638) at fn (app.bundle.js:48) at Object. (app.bundle.js:997) at __webpack_require__ (app.bundle.js:638) at app.bundle.js:684 at app.bundle.js:687
What the fuck.
Levi Reyes
So, extending on this: I might have configured the webpack file correctly, as it compiles and shit....
It's pointing to node_modules, which I've deleted and reinstalled numerous fucking times.
Robert Wilson
export function fetchBundler(actionType, fetch) { const bundles = new Map(); let promise = null;
Happens all the time. I usually like figuring out workarounds when something goes wrong like this, but I'm completely clueless right now. But yea, I'm pretty sure it does.
Jeremiah Rivera
is there anything else I need to do on my end besides regular authorization stuff?
Lucas White
It's a generator for curried middleware generator that captures, collect and bundles fetches of given type during one js tick and then fetch them in bundles separated by search parameters and returns a promise to original dispatcher that resolves into requested resource.
Eli Morris
Everything besides the processing would be on you, I think. You'd still need to send email confirmation, store the user's braintree key if they want to save their CC, all that shit.
Bitbucket's back up so I can peek on my coworker's branch and see what he's added to the DB schema:
Taking a look at the checkout logic it all seems to be synchronous, so I doubt it'd be too difficult to implement. Seems to mainly be a matter of putting the data together and stuffing it into the classes Braintree provides you.
Luis Harris
I got rid of one of the console errors after running: node_modules/.bin/webpack-dev-server --port=8000 --content-base=static
Now all that remains is: Uncaught ReferenceError: ReactDOM is not defined
in app.bundle.js
Looking for solutions now, if you have an idea, please respond. Thanks senpai.
Caleb Diaz
Yoooo motherfuckers, I fixed it!!!! Forgot to include "import ReactDOM from 'react-dom'"; in app.jsx
What a fucking relief.
Lucas Peterson
shouldn't you have some index.js or some plain-javascript file that acts as the entry point? It's been a minute since I've done any react, but I'm pretty sure ReactDOM needs to be imported in a plain JS file before you get to any JSX.
I could be totally wrong though.
Charles Gray
welp nevermind then
Bentley Gray
Yes, m8 Awesome, you would have solved my problem instantly... that's rare in these threads, no one ever helps. Thanks man
John Thomas
Round #2: This works on localhost:8000, but not localhost:3000. Still get the console error, i.e. ReactDOM is not defined. Wtf?? :/
Luke Martin
I am not doing it the same way, so I am not sure about out, but do you also load the vendor.bundle.js in your HTML in addition to the app.bundle.js? What files are specified in the index.html ?
Thomas Parker
Hey Sup Forumsuys, newbie here.
What are the typical retarded security problems ones could make when making a web app that connects to a server, db ,etc?
Evan Reed
I believe so, all of these files were generated via webpack.
Jose Lee
basics would be preventing XSS and preparing the server to be able to handle any potential retarded user input without shitting itself. >I believe so but you can just check the index.html and see which JS files it's going to get from the server.
You may want to add some kind of cleaner plugin for the build folder, so old build files don't add up. Can get confusing otherwise if you don't know which ones are actually part of the recent build.
Ryan Myers
I have to write my first web application and never did anything like that. my main question is: do I have control over the frame rate?
So in my code, I started using absolute directories but since the website folder itself isn't the root directory, I've been putting href="/website/favicon.ico/" I went to change the localhost root directory in httpd.conf itself so that I don't have to always put /website/. Now that I went and changed directories for everything, my .htaccess won't work with my 404 error page, and my favicon is the xampp favicon. What the hell.
Michael Hill
>Never tried that course but as a Protip: Everything on Udemy is always ~90% off
What? Err, why?
Connor Torres
So you FOMO any buy shit
Austin Gonzalez
How do i lazyload images on vue.js?
only the spinning loader gif is showing, not the dynamic image. the data-src attribute doesnt seem to work.
Anyone here? Pajeets? Guys at durgasoft?
ps: adv java means durga sir XD
Juan Scott
what text editor does Sup Forums uses for web dev?
Julian Martinez
I use Visual Studio Code. Seems to work just fine, but then again i am just a beginner.
Christopher Murphy
I use Atom
Kevin Price
VS code like this anonNot a beginner; VS code is simply amazing. Also use sublime for the simplicity, and Vim for quick file edits
Grayson James
Sup Forums doesn't let me post code so much. Keep getting a connection error. Wtf?
Gavin Bennett
is there any small and aesthetic css/ui framework?
Jace Fisher
Bulma
Leo Torres
that looks like shit on dick
Adrian Flores
Webstorm by JetBrain
Connor Diaz
by the way this is totally free if you have access to a student email
Charles Gonzalez
WHAT IS ANGULAR CALLED NOW FOR FUCKS SAKE
Cooper Nelson
Angular 2+ is called just Angular, Angular 1.x is called AngularJS.