i used the react tutorial on their site to start learning it. finished the tut and decided to move it out of codepen bullshit to work on it in my machine, but i cant seem to figure out why i cant do it. am i retarded and is there something i missed?
Matthew Johnson
yeah im retarded. its right in the tutorial
Luke Hughes
Heyo, any good angular ressources or tutorials you'd recommend?
Ethan Rogers
Yeah I got this resource right here: dont use angular
Ian King
This
Samuel Wood
Tell that to my boss. Also if you wanna dev webapps there's not much better than angular. once it's compiler, this shit is very lightweight.
Connor Richardson
>github.com/ekussberg/simple-credits i'm about to go start soliciting bids to add the option for two virtual currencies instead of one to this script. the original dev is too busy with his actual jobs to do it. two currencies, so users buy the first currency with real money and spend it, and other users accumulate the second currency, then cash out. no, it's not a casino. it's going to be a google answers clone. if anyone can tell me how much i should expect to pay for this, or if i can manage to learn enough php editing in a week or so to do it, that would be awesome. assume i am a reasonably bright 15 year old who did way too much cocaine for a while.
Jayden Baker
>someone asks a question >they don't even understand what's going on because they only understand how to npm-install and do whatever the module says >even when the solution is a simple bit of javascript they just don't get it and complain about the plugin
Can i make pretty, modern looking website with pure HTML/CSS/some JS for scripting. For example something like that systemspace.link/ view-source:systemspace.link/ Where do i find resources for this skill and taste?
Jacob Peterson
*?
Ayden Smith
alright
Nicholas Butler
have patience brosky, this general is slow
Carson Johnson
Yes you can, check OP for links on getting started. >taste that looks like garbage but ok
Chase Ortiz
tricks he uses: preloader: idk how u do that tbhfam cursor: that should be easy animated-background: just use a an animated gif as bg clip-path: you'll have to digg here animate section: just the animate function in css embeded music: shouldn't be hard all I can see
oh and parallax: you can use one of the "plugins" for iit floating in the web, but what he did was add even listener scroll scroll the same background-position-y, never mind, he just used background-position:fixed on the bg and have a regular img on top of it for increased parallax effect
you are not thinking right, divs are like squares that take all horizontal space by default, and the height of it's content. Imagine you add a new line to your page, that's a new div, if you paint it you'd have like multiple lines one above the other, the new ones, go on the bottom, if they have content they are squares, or if you give them a height. that's why if you place the div at the bottom it will be at the bottom. So one way to put your fdiv at the bottom would be div container (contains all the divs with content) height calc (1vh -" height of the nav in pixels") that way you wouldn't need to place the nav in in position relative fixed or other thing
another way is to set the position of the nav as fixed and bottom 0 right or left 0 it will stay at the bottom of the page no mattter what
It's basically modern knockout.js which had been superior to these massive frameworks imo due to its simplicity, and therefore maintainability.
Its usefulness increases due to the number of web APIs blowing up as well. Nobody wants to manage a full fledged framework with native APIs that are used simply outside of them
Nolan Fisher
How long does it take for someone with programming knowledge to learn HTML and CSS good enough for a web job? And is xahlee.info/js/html_index.html a good source ?
Julian Johnson
That resource looks to be enough desu. HTML isn't really hard, it just clusters groups of elements together. CSS is the tricky bit, so would recommend focusing more time on that. Maybe research on sass as well as that is popular so might be a requirement
It's a sad situation if you boss hired you for angular stuff and didn't give you resources. You didn't lie on your resume, right user? Because no decent boss would leave a newbie alone without resource to get on the saddle.
Jace Long
No, that looks absolute garbage. Use javascript.info/ instead if you seriously want to do this.
Gabriel Jones
10 unique visitors a day. I denied every robots and didn't SEO on purpose. My three share paltforms are infringing every copyright law available and have only word of mouth spread. Music, books and misc.
Jaxon Bailey
Retard here. I need to call a wordpress shortcode with a AJAX. function showProduct(id){ jQuery.ajax({ url: '/wp-content/themes/chap-child/single-product-modal.php', type: 'post', data: {'id': id}, success: function(response) {jQuery(".product-popup").html(response);}, });
and the very basic PHP file that doesnt work
Xavier Anderson
nice resource, why let instead of var though?
Robert Rogers
First of all, haven't done WP/WC in a long while, but have you checked that do_shortcode has been declared? It should be, but some trickery might be preventing it, or maybe the shortcode product_page hadn't been declared yet
Grayson Ortiz
>Sure, sounds good.
David Bennett
traineeship, I'm still very young. My coworkers are trying to help me but they're all very busy with their own work so I'm kind of on my own rn.
Dylan Green
Doesn't seem to make a difference if I include the shortcodes.php file or not.
Thomas Robinson
The only bad thing about that site is that it uses let by default, which is wrong. You shoud use const by default and use let only when your linter is telling you that you should be using let. Noone uses var now
Hudson Smith
What I mean to say is does it error if you called do_shortcode?
Can you visit the ajax page manually to see what is precisely returned? Doing that as well might be an easier way to debug
Xavier Edwards
>use let only when your linter is telling you that you should be using let what's a linter, how does it tell you that you should be using let?
Landon Brooks
>does it error if you called do_shortcode? Yes, the error is >undefined function do_shortcode() Which I thought the 'include' might fix, but im stumped.
>Can you visit the ajax page manually to see what is precisely returned? Doing that as well might be an easier way to debug The ajax call returns a full product page composed of HTML. The actual return statement is return '' . ob_get_clean() . '';
and I have no idea where ob_get_clean() leads, but it returns a bunch of HTML.
Caleb Barnes
is web development a good career that I can do for the next 20-30 years and retire or would I get fired or outsourced for cheap labor from India?
Grayson Cooper
>undefined Yeah, looking online, looks like that's normal, not sure how I did it, but 1 search did show putting the functions in admin-ajax.php. Alternaitvely, if you have some other 3rd-party libs (maybe WooCommerce too), see if they use any ajax so you can see how to tie it in. Sorry I can't provide much more. WP is generally a bitch to work with
Yes. Just don't use Java if you dont want to be outsourced, and make sure to keep up to date with JS if you want to keep a job for the few decades
Jason Sullivan
Ask them for resources, not Jow Forums. Report back. Traineeship is meant to be supervised by the team you're a part of.
Nathan Sanders
>Just don't use Java what's a good language that won't get outsourced?
Ryder Hernandez
It seems like wp doesnt like me using include('/wp-includes/shortcodes.php'); and prefers include('../../../../wp-includes/shortcodes.php'); Which fixed the undefined error. thanks for the help
Justin Morgan
I've been hopping around doing python and that isn't being outsourced. Straight JS doesn't seem to be outsourced too
Kayden Taylor
thx >../../../../ how did you find out?
Cameron Bell
By JS do you mean Java Script?
Joshua Collins
>how did you find out? you just have to find the directory where shortcodes.php is at.
a quick find in the terminal is enough to reveal the location
Ryan Clark
Java (Javascript)
Landon Wood
>how did you find out? Googled the error, found out that PHP needs the exact path. Turns out that php file didnt fix the problem I was having anyway, now its just showing the shortcode on the page without actually getting the content from it.
I'm guessing the shortcode wasn't loaded due to WC not being instantiated. So many things seem to not be instantiated considering do_shortcode is core to WP and hadn to be included. There must be a proper way to get everything declared. I think best way is really to see how other libs do it. AFAIK WC must have some ajax functionality in one of its pages. Maybe just do a search across WC files for ajax
Nolan Ramirez
How do I make it so that Webpack doesn't bundle up everything in my node_modules folder but it also doesn't NOT include require so I don't always get an error stating that 'require is not defined'
Henry Harris
1) work with flex/justify-content/align-items 2) work with absolute positioning 3) use margin auto or float
Luis Cook
Anyone here familiar with woocommerce? Is there a template I could call via AJAX that would return a product if provided the product ID?
But yeah it sucks, I was planning on doing the same thing, allowing everyone to play their favourite games, then I realised this
Owen Harris
i used to play Zelda: Ocarina of time in my Nintendo 64
shit was so cash
Jaxon Flores
VueJS is pure hype
Hunter Torres
Quints of justice. I know that feel, all the zelda games you can emulate are cash
Isaac Cooper
>have to use !important on everything because material UI fucking sucks dick and FUCK using css in js
Owen Cook
Is Greensock still the best animation library for JS or are there better now? I'm reading some Top 10 animation libraries on some sites and they point out to shit like Three js or Anime js
>Re-inventing the wheel This is why you don't have a job, and I know you don't have a job since you're the "muh vanilla, built from scratch everything" type.
Asher Nguyen
not when it comes to CSS tho, i use a CSS framework sometimes, but i enjoy writing CSS myself, its easy and everything is there.
i once made my CSS framework using php as a per-processor, it generated a CSS file with all 'color-{color}' classes, 'background-color-{color}' classes, 'padding-{size}', 'margin-{size}', 'width-{size}' ( using grid ), 'font-size-{size}', ... etc and it worked fine, took me about 15 mins to write. with flex and grid available i don't see the need for a CSS framework, unless you want the shiny stuff like cards, buttons, shadows and all that .
my favorite CSS framework is UIKit so far, its dead simple and just amazing getuikit.com/
Learn the specificity of css selectors. You can override fairly easily but only if you know the right ways to select the thing you want to overwrite.
Blake Brooks
put it in your GitHub
Jaxon Davis
I don't know much about web dev, I am more of a /dpt/ kind of person. I notice that many websites rely on ajax.googleapis, particularly for jquery. Why do they not host the library themselves, instead of relying on google? Especially since jquery is advertised to be a small library.
I really see no difficulty in taking the source code of jquery, giving it to your server and then importing the script with all the definitions.
can't you just inspect and automatically generate selectors?
Brody Peterson
Have you got a link to the site you’ve got in the OP pic?
Ian Scott
user is trying to override styles built in to MaterialUI.
There is a hierarchy of selector tags that govern how specific the selection is. The most specific selector will override the less specific ones. It's not about selecting the element, it's about selecting it more specifically than MaterialUI already is.
then why the fuck are you using materialUI? either work with it or don't use any goddamn framework at all. make your own classes nigga
Owen Hernandez
So I was trying to figure out how the js console seemed to have object names that did not match any of:
let obj = $('.thing');
obj[Symbol.toStringTag] // not this obj.constructor.name // not this either obj.toString() // not this Object.prototype.toString.call(obj) // not this Object.getPrototypeOf(obj).constructor.name // not this
Basically, I cannot find out how to get the n.fn.init(1) that the developer console always reports.
I did eventually figure out how to reproduce the object names. [see picture] (why is this retardation a thing?)
But my question is:
How do I programatically pull that information back out? How can I get the same object name that the developer tools console provides?
Is there a nice way to point out that one of your coworkers is being way too careless when it comes to coding?
Most of the errors this person runs into is being of spelling errors, too much copy-and-pasting, using [] instead of {} and vice-versa, and just not having an overall understanding of how Javascript works. No matter how many times these mistakes happens, there's never any improvement, either. It's super frustrating when questions are brought up when the answer is normally "Just use your fucking IDE for what it's made for."