So ES6 would be more memory efficient then, right? Interesting.
Juan Clark
...
Hudson Thompson
Really need help! nypa i know but it'd be much appreciated I forced my site to use HTTPS and it broke the site, is there anyway to not force https after it's been forced?
Isaac Peterson
if you have HSTS headers you're fucked as long as the timeout ends
Oliver Butler
I have a few questions regarding loading part of a JS application dynamically, let's say that I have a rather complex app designed to run in the browser: I want to initially only load the basic "modules" to have a fast loading a limit the size of my page.
Then when a user starts interacting with parts of my app, I want to load these parts as the user is using them, is there a framework/library/concept to manage all of that?
Colton Flores
>memory efficient Newer JavaScript VMs are going to be more efficient in a lot of ways. But more just improvements in general, not specifically improvements when using newer syntax.
If you're talking about the let-block-scoping vs var-function-scoping, then maybe it's more "memory efficient", but probably not in a very impactful way. Also if it was block-scoping causing performance issues, you're probably doing something wrong.
If you're talking about the file size, ES6 can produce a smaller file, yes, but that doesn't really matter since in general when deploying you're transpiling to ES5 anyway.
The main advantage of ES6 is that it's more concise and provides some functionality that you would normally require a library for.
Jose Howard
thanks for explaining it for brainlets m80, appreciated
Jace Ross
you want onClick, onHover, onScroll etc. ajax requests?
Logan Cox
My question wasn't clear sorry: I'm not talking of the content of the website, but of the actual JS tied a module, for example I have a chat system written in JS but I don't want to load any of that module as long as the user isn't opening the chatbox.
You can picture a Twitch-like as a example: the user initially only load the JS that is useful for watching the stream, then if he chooses to display the chat all of the JS necessary will load.
I don't know if it makes sense.
Gabriel Murphy
How to I get a navbar like on the image I posted ? I can get a nav to work on top of an image, it's centered when viewed at the minimal size but floats towards the right when the screen size is increased. What setting do I need to look at in order to get the navbar to stay at a certain position as the image resizes ? I've also already tried using the image as a background inside of a div (just something I was wondering if it would work) and ended up with an image that was the correct width but only as high as the text.
How do I make it so that it updates the result instead of adding to it?
Right now it goes: 123 I want it to update the value as the user checks a box. Any help?
Alexander Williams
How could i make javascript run another language script, let's say python from a JBoss enviroment? I am learning to use a JBoss based framework named OpenUnderwriter and it's documentation it's all but clear, only thing i know it's how to install it and have access to some files from it but I would like to run certain scripts from the site it creates.
Can't reply with my code for some reason, but overflow:hidden; didn't solve the issue.
Dylan Edwards
try jsfiddle
Jack Russell
I didn't know the code tags are broken, I would have used Jsfiddle much sooner. jsfiddle.net/1umpew4x/ Is it because the nav links seem set to a certain place on the screen ? Is there a way to make them move around in some way as the screen gets bigger ?
Kayden Reed
also sorry for having to pick a different banner, we need to have everything locally for the assignment and I couldn't remember where I even got the cheeto banner from.
Robert Young
tell me exactly what you want to acomplish, in a simple and detailed way, and then what happens now instead
Cameron Thomas
>tell me exactly what you want to acomplish I need the nav bar to scale with the top image till the screen gets to a width of 1280px, it needs to be centered at the bottom of it and 4 nav sections stretched across the length of it as the screen gets bigger.
>and then what happens now instead I think I have a fixed position for the nav section since when the screen does get bigger it just stays in one place and doesn't seem to move in position so it's in the same place on the image.
The other things that are required I can figure out such as the breakpoints in the @media where it needs to morph into a different layout (flexbox does what I need for that) however I have no idea how to make the navbar do the same.
I hope that's detailed enough the get the idea across I have the image added in this post how the navbar should be acting
Jeremiah Anderson
The way you doing it, the new way of doing it, with felxbox is alien to me, what I would do is do it the old way, the only way I know
You already have the image scaling, so that's no biggie
.I would put the image as a div background, .Make the bgimage scale with background size 100% auto (or the other way around) I'd make the div that contains the image absolute I'd make the navbar position relative I'd make the div contain the navbar have a bottom attribute of 0 .and I'd place a left value on each one of the items of position relative left 0% 25% 50% and 100%
I don't know if all of this would work, but that would be my first attempt, I might give it a try
Charles Jones
You could use dynamic import() syntax with Webpack. Whatever you only import dynamically will end up in its own bundle. The import() expression gives a function that, when called, will start loading the bundle and returns a Promise that resolves into whatever the module exported. It's not very hard to make a React component that takes such a function, only calls it when it's being mounted, and then renders the loaded component when it's ready.
Anthony Smith
thanks for the input, yes it is a new way of doing it, I had to read up on how flexbox would even work although if it's just boxes you need to move around it's a lot easier (for me at least) than using floats (which i find a pain in the ass).
Carson Adams
Makes sense I'll look into that, thanks user
Lincoln Thomas
Where do you put your actions for getting stuff from your backend in React?
I usually put them in the didMount and/or didUpdate in my containers but it feels a bit tacky. I started putting that stuff in an own container instead which sends an action if an api request needs to be done, but I don't know if that is the correct way to do it.
JS question. Is it possible to add an event listener to all elements with a certain class? I have two buttons with the same class so I presume I need to iterate through all them with querySelectorAll or is there a more elegant way to do this?
So I just got out of an interview with a big consulting company, mainly based in India, but they have offices in the US. I think it was a mistake to even take this interview.
Both the technical interviewers were indian, so I had trouble understanding them. At one point I thought they asked about pointers, and I gave them a basic description, and they just looked confused the whole time. Then they described what they were talking about, something to do with using CSV files and stuff, and I was super confused. Then one of them finally wrote out on a piece of paper "import pandas". Like the Python library. So TIL "pointers" and "pandas" sounds a lot alike in an indian accent.
Also, at one point they asked me what the meaning of '/' and '//' were in HTML. I asked if he meant within links (I figured he meant like root-relative URLs and protocol-relative URLs) but he said no. I said they had no real meaning in HTML that I knew of, and we moved on. Later, I asked what answer they were expecting there, and they told me it was for selecting elements like '//html/body/div/whatever'. I asked what API this was, and they didn't really give me an answer. I looked it up and it's apparently called xpath syntax, which I had previously said I didn't know.
And they asked me at one point if I had used "Appium" (which I guess is a cross platform mobile app framework), and I said no. And then they asked what I had used then, and it kind of felt like they didn't believe it was possible to develop mobile apps without a framework like that, and like they were accusing me of lying about having done mobile dev.
yeah I got it somewhat working with position relative and absolute, at least it stays at the bottom of the image now if I have it really small. I just need to figure out how to center it now and make it fill out the width. Can you wrap elements in div tags ?
Joshua Nelson
what'd you do?
Logan Richardson
background-position:center; check: and: we did his homework hardcore
Jayden Williams
you can use the li elements as divs with display:inline-block and avoid using float that way, you set the divs to 25% width
Robert Bailey
he better thank us for those free marks
Jaxson Howard
how much do we charge the hour? >tfw going to make just 270€ for redesigning CSS of a wordpress theme to a friend of my brother
Parker Watson
I think the image is now centered where it would veer off into the right side before.
thank you guys so much for the help, this pretty much removed the one big roadblock I was stuck at for ages. Now I should be able to get past this pain the arse without too much trouble.
Grayson Rogers
you forgot to quote flexman with his skills
Luke Myers
>270€ that's CAD 402.87 I need to move
Nathan Carter
Samefag here, I have one more question. I have a menu that is flexbox, flex-direction row, and I want to have know when the window size gets so small that it wraps to 2 rows, to render a dropdown instead of the original list. I have successed with knowing when the screen goes from big to smaller by checking offsetTop, but when you resize the window to be bigger it does not snap back to the original list again. Code for checking if it has wrapped once in pic related
canadian dollars which is pretty much monopoly money at this point
Zachary Thompson
I get it, kek, I feel like I should have gotten paid much more, like 250€ or so, but to be fair I failed to deliver plenty of features, fucking wordpress
Thomas Howard
*like 500€
Caleb Powell
can you post the design?
Tyler Morris
I'm affraid of doxing user, it was a good design, not made by me, the friend of my brother was the designer, I was but merely a CSS codemonkey, but anyways, Raleway everywhere, green accent instead of red, green logo, very bold letters in titles, activated the parallax of the image banners in the header mid and bottom and fixed some form with contactform 7
Jeremiah Bennett
Almost $800 Canadian for a redesign alone? fugg
damn, I'll take your word for how good it looks
Jeremiah Cooper
>Almost $800 Canadian for a redesign alone? it changes the face of the site completely, from a standard theme with no soul to a well designed product, worth that and more
Zachary Cooper
plus I'm sure they charge a lot more than that in US
Michael Hughes
Fuck it, time to buckle down and learn a stack, this peasant life is not for me.
Grayson Hernandez
There used to be a discord for this general. Did it finally get destroyed?
Anybody here use Sentry and can share what it actually looks like and does? I tried reading through their website but it just keeps saying that it reports errors and that's it. What actually is it?
James Long
I miss phpfag
Dominic Rivera
i think it grabs errors and context of those errors from the user and throws it back at the developers so they can stop fucking up and fix their broken piece of shit i'm guessing it looks like crap if all you see are errors, but at least you know it's working
Jaxson Kelly
How is one supposed to use JWTs exactly ? I understand the logic behind them, but I'm not sure how to handle token expiration. Are we supposed to display a login form when that happens ? Or maybe make the front end automatically resend the refresh token ? But in this case, how is it different than just having a JWT with an infinite lifetime ?
Ryan Russell
>i think it grabs errors and context of those errors from the user This part, how exactly? Does the user submit a bug report or what?
Juan Fisher
from what i've been told, it's middleware it's probably a script that sits on the page somewhere out the way and only really flares up when there are problems i'll be honest, i'm not sure how the magic works and i dont care enough to find out
Chase Stewart
Yes, show a login form just like you do when a session expires if you're using them in a webapp. For mobile apps its different, for those you would only need to revoke them when a user logs out or changes their password.
Jose Williams
Give me one (1) reason why Angular is shit
Jack Butler
It's not, but Vue isn't half bad either.
Samuel Robinson
To add to my comment, JWT expiration is there in the case a JWT is stolen. Its there to prevent someone from abusing it indefinitely.
Brandon Flores
How does it feel knowing I make more money than you because you can't into backend dev
Jordan Thompson
It's another layer of unnecessary complexity, dependencies, and shit that'll go through the motions of updated, deprecation, copying other standards, and inevitably be outclassed and die out. The web breaks down into HTML mark-up, JS, CSS, and media. I think it's better to strictly work with the fundamentals when the project is simple, otherwise it's adding more overhead where none is needed. Also, it's yet another JS library, so yay, more fucking bloat.
Jackson Evans
I'd argue that you wouldn't want to work on a large scale enterprise application in just HTML, JS, and CSS. Not only would it be a pain in the ass to maintain but even having simple things such as routing would be way more difficult than it would be with Angular. I agree with you though, if its a small app you might as well stick with the basics and if need be use something like Vue.
Owen Williams
Why? He was cancer.
Blake Gray
what's the point of having lamp on linux when I have to reinstall shit once in a while because it's the only sane way of getting rid of errors
Joshua Moore
>Jow Forumsuys how do i prevent scrolling to buttons on focus? i tried all of these. the last one gets offset top after the scroll has already taken place. e.preventDefault() e.target.focus({preventScroll: true}) $('html, body').animate({ scrollTop: $(this).offset().top }, 0.1);
also tried these and listening for 'focusin'. e.stopImmediatePropagation() window.scrollX
scrollX is as expected when clicking the buttons, but it seems the event is too late when tabbing to them.
Owen Morales
I have no idea what you're trying to do
Jack Johnson
literally was joking when I wrote this and reinstalling expecting nothing, fucked up my php dependencies for a brief moment, reinstalled it, tried to install what I wanted initially, same xml error, install php-xml, get php-curl error, install php-curl error, get php-zip error, install php-zip get it through
I have no idea where the .env file is, it's for symfony 4.
Brandon Cruz
nevermind, guide might not have been for symfony 4, I'll search for another tomorrow, going to sleep now
Adrian Walker
so i have a sticky 'header' with buttons and inputs. when scrolled away from the top of the page, if i tab through the elements, on focus of buttons, the page is scrolled back up to the top; however, if i click those same buttons while scrolled away from the top of the page, no scroll even takes place. i want to prevent the scrolling that occurs in the former condition described.
each line of code i posted was basically a separate attempt to accomplish what i want without any context. so i've tried using: - preventDefault() - focus() with a preventScroll option - stopImmediatePropagation() - scrolling the page back to its position before scroll to the focused button using the scrollX attribute
my only other idea is to listen to key downs and try to either prevent events or manually facilitate them, but that seems like overkill. i just don't want the page to jump around when navigating through a sticky element with the keyboard.
Evan Ward
I am currently taking the Django Python Bootcamp course on Udemy. Do you guys have any other suggestions for webdev courses I can take online?
Also, just got to the bootstrap part. Is bootstrap used everywhere in the industry since it's so easy to build a nicer site with it?
Anthony Hill
so the keydown approach works but wtf i have to listen to every key and crawl through the html structure to switch between the subset of elements within the sticky element.
i tried to simplify it by acting on the keyup events where the target is the destination of the inevitable focus event, but its too late by then.
Anthony Perry
Is using node.js the most efficient way to make a real-time multiplayer browser game, considering you can write the game logic once and use the same code client- and server-side?
Justin Lopez
>use the same code client- and server-side You shouldn't need to have the same logic on the frontend and the backend in the first place.
What is the best way to learn html/css? I just need to learn to make my own startpage. Should I start with freecodecamp or I need to read something before?
Lincoln Long
Just start FCC There is a lot of resources everywhere, try to remember stuff but don't be discouraged if you can't remember everything, you will be referencing a lot of material, and you'll get better through repetition. Focus on how things work together
Luis Thomas
Thanks user ! Although, wouldn't it be counter intuitive UX-wise to suddenly display a login form to the user because the token expired ?
Alexander Stewart
is the sid in the cookie always the first 40 character, be careful with the info, my session login hangs on one split function line
Angel Jones
What's a good domain name for a personal portfolio?
i realize it doesnt make a big difference but i have a bunch of options available for registering a domain and might as well make the optimal choice
Kevin Gray
firstnamelastname.me i've seen used a lot for portfolios, and it looks good if you have a short/nice full name. .com would of course also be acceptable. avoid .org, .net and especially .info
probably wouldn't use any of the other examples you posted.
>domain suffix protip: it's a TLD (top-level domain)