>Free beginner resources to get started Get a good understanding of HTML, CSS and JavaScript. developer.mozilla.org/en-US/docs/Learn - a good introduction to HTML/CSS/JS and Node.js or Django freecodecamp.org - curriculum including HTML/CSS/JS, React, Node.js, Express, and MongoDB javascript.info - curriculum providing a strong basis in JavaScript
>Further learning resources and documentation developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS hackr.io - crowdsourced collection of tutorials from across the web for learning languages and libraries (ignore sponsored stuff, look at upvotes) learnxinyminutes.com - quick reference sheets for the syntax of many different languages (generally not sufficient on their own for learning something, but very helpful) pastebin.com/gfBPg24A - Collection of PHP links.
>Asking questions jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS 3v4l.org/ - Use this and post a link, if you need help with PHP/HackLang
A little troubleshooting later, I reach the following conclusion:
THIS ONE WORKS
THIS ONE DOESNT
Wat do now
James Johnson
This is the best I could think of off the top of my head. It could be greatly simplified by using the built-in methods of Array, but that would, in all probability, be slower. Basically in JavaScript if you want it to be fast, it's also going to be verbose.
function delFromObjArr(arr, ...KeyValPair) { const klen = KeyValPair.length;
// We probably don't want to remove everything if (klen < 1) return;
loop_entry: for (let i = 0; i < arr.length; i++) { // Skip holes and other garbage if (typeof arr[i] !== "object") continue;
for (let j = 0; j < klen; j++) { if (!arr[i].hasOwnProperty(KeyValPair[j][0]) || arr[i][KeyValPair[j][0]] !== KeyValPair[j][1]) continue loop_entry; /* Jump to the entry of the parent loop */ }
// This is potentially dangerous (and stupid) and also leave holes. But it IS faster than splicing. delete arr[i]; } }
Where KeyValPair is a set [p_0, p_1, ..., p_n] of key-value pair sets [key, value]. Any immediate member object of arr, with a set of properties that is either equal to KeyValPair or that KeyValPair is a subset of, will be deleted.
Kayden Rivera
Most standard elements have default style values associated with them. for instance has "color", "text-decoration" and "cursor" set by default.
Oliver Thompson
(repeating my response from the last thread) If you have an array then you don't have a dictionary, so the answer should be obvious. Array.filter would be what you are looking for, but if you know that the property should always be unique (an "id" or something), you could build a Map, then just delete the key from the map when you want to remove it.
Daniel Rivera
Yeah it is definitely not a good Dictionary replacement
Alright, thank user, I think i just iterate like a retard from 90s because javascript has no hashset-based collections in 2019
Austin Ortiz
What exactly do you want to do? You have some value and you want to delete an object that has that has a property with that value?
>have a button >button has an ID >need to send that ID to another page for processing when I press the button
that's about it
Parker Reed
Map looks alright, thank
Christopher Walker
What's wrong with
Hi.
or
or somesuch.
Matthew Wright
attach a click event to your button. the button itself will be in the event target property you get on a click. use fetch to post it to your php file.
Jose Edwards
my half ass approach: -have hidden input . button type submit - on click prevent default . send the button id as parameter on click .fill in the hidden field with the id of the button - on the page on post retrieve the value of the hidden field that contains the id of the button
there might be more optimal ways to do this, but as I said this would be my halfass attempt
Jonathan Nelson
second one should be type="button" ofc
John Perry
>clicked.php?id=myButtonId this transfers the parameter to the page (clicked.php) via GET, correct?
Carter Morales
When that shitty PHP script runs, it will have the value of "id" stored in $_GET like so:
Luke Edwards
why are modern web developers insane? why do i have to enable javascript to view a static web page? take me back
Joshua Ward
just as I thought, thank you for confirming
Cooper Johnson
blame marketers, not the developers.
Jonathan Smith
elaborate, developers are on the wrong for putting those practices at use and neglecting the no-js first rule
I provided an answer given the restraints that _you_ set out. Obviously limited within the bounds of possibility. So don't complain to me when you are the one that stubbornly attempt to bend one language into working like another.
Had you actually asked "what's the best way of storing a key-value pair, preferably without having to implement any helper methods?" I would have told you to use Map or perhaps just a plain null prototype object. But you specifically said Array. Meaning that you'll almost inevitably end up having to, one way or another, iterate through it.
>I think i just iterate like a retard from 90s It's not at all retarded. It's a task that machines excel at because it allows the CPU to leverage caching, out-of-order execution and/or SIMD. When utilized properly it can yield significant performance gains. Remember that time complexity is not a measure of performance. Particularly when taking caching into account, big O can be very misleading if used as such, due to the CPU caches being orders of magnitude faster than RAM.
>elaborate Marketers want to learn as much about you as possible, thus attempt to track you across multiple sites. This is made very difficult without the use of JS. One way to increase the probability of the user not disabling JS, is simply to deny access to content, or considerably worsen the experience if not enabled.
David Diaz
I see, wow, fuck t hose kikes
Colton Brooks
Oh and I forgot to mention that Dictionary is considered obsolete and has been for quite a while now. Use the Map interface instead.
James Wood
>Dictionary is considered obsolete JS neevr had Dictionary, how it can be obsolete if it didnt exist?
Julian Hernandez
I'm talking about Java, not JS.
Connor Brooks
Oh, I see. I meant c# dictionary when I was talking about it which is why your statement "it is obsolete" confused me. C# Dict is miles ahead of Java's one and supermegauseful.
Liam Rodriguez
Had my job interview.
I just went from 10/hr to 19 an hour to 54k to 150k 100% remote in 2 years 3 months.
Hot damn.
Isaiah Davis
describe the job interview
what's your role like? JS developer?
Henry Bennett
kickass, living the dream user!
Anthony Evans
how old are ya
Austin Campbell
30. Started at 28 professionally but was a hobbyist my whole life.
Senior-level full stack. I'm joining another senior in building a product from the ground up and that really excited me.
Basically they gave a rundown of their products and how they work. He wanted me to be mid-level but I explained I am senior-level. I said my work is trusted by over 10 million a day to get very sensitive information out and that I run a lot of side businesses by myself that I built from nothing but ideas. He asked my rate so I said another recruiter had called about a position and said the pay was 75 so I want that and it was accepted.
Zachary Cruz
>my work is trusted by over 10 million a day alpha as fuck
Landon Sullivan
>trusted by over 10 million a day what do you mean
Samuel Ross
Which Web APIs should I learn in first place?
Anthony Rivera
what do you mean by Web API? What is webapi for you?
Backend/desktop dev here. How do I make a somewhat professional looking web frontend (SPA) without wanting to pull my hair out? I like minimalist, sleek UIs, like material UI or whatever. Please recommend your favorite frameworks and stuff, thanks.
Brody Kelly
>LAMP das my stack yo! Any tips for a beginner that has done minor projects like a mini CMS for a slider with ajax and a MySQL database?
Chase Bell
Bulma/Bootsrap/Material UI. Pick your poison. That or git gud with CSS it isn't that hard.
Charles Sanders
Considering stealing this material UI implementation and just tweaking it to my needs. Sadly it uses scss, which is complete aids. >mfw you need a C++ runtime to compile CSS
Justin Allen
Someone explain to me flutter. How do you build an iOS + android app with it?
I've glanced through the documentation, and they seem to have 2 different component (widget) versions for iOS and android.
Now how to structure the project to build both versions at the same time? Seems like you have to build 2 different codebases for the layouts...
Caleb Bennett
Hello did I do something wrong? It seems to be impossible to set a value to default codepen.io/user/pen/pmamZg
When you have a date with a value that is the default value, if you press the "x" or the "reset" button it sets the input to mm/dd/yyyy however it does not POST this, it sends the POST of the value="" which is your default value (here it is 2019-05-23)
In order to get around that, do we have to reset the value using hacky javascript?
This does work, and does POST correctly, though it should be default function of the browser? Is there a better way to achieve this?
Jordan Young
...
Samuel Ross
>No using actually good back ends built with Go, C#, and Haskell
Joseph Davis
Net core 2.2
Signin manager works fine and the login is successful and it also registers accounts just fine. If i login with invalid credentials it says "invalid attempt" as expected.
But somehow if its successful it never adds the cookies. It just stays logged out. Only server side it logs in.
I added the identity to an existing mvc project.
I dontnknow how to debug this
Adrian Hughes
Unironically just git gud with CSS You don't need CSS frameworks You don't need stupid meme css preprocessors
Get a CSS/site design book. Learn about the box model. Learn about commonly used designs. Shouldn't take more than 2 days. Can't get more minimal and professional than that.
Gavin Morgan
Send help
Robert Russell
I guess this is what will cause the least frustration in the long run.
Mason Rogers
I guess just keep building stuff until you've used about everything PHP has to offer. Learn about apache reverse proxy and virtual host, redis/memcache, cron, how to consume APIs, and I think that covers most of it.
Building a CMS is a pretty top-tier project though. That's cool.
Kevin Bennett
>Minimalist Don't even think about CSS then. Plain HTML is the best
Levi Johnson
I have some server code that relies on some C++ binaries that are compiled from some source code and static libraries. If I make a docker image of this code, would it also capture the static libraries the binaries are built from?
Jace Russell
Is there an online resource for like, good-looking components? I can probably recreate stuff if I have examples to take from, but I don't even know how I want my stuff to look.
Statically linked libraries are baked into the binary file, so you don't have to add anything extra. But in theory you can put whatever you want into the docker image, it just depends on what commands you run in your dockerfile.
Lincoln Adams
Think of Flutter almost as a game engine. It just takes a blank canvas and draws shit on top of it. It uses zero native (Android or iOS) graphic elements. When you make your app with flutter, you can tell it to use material design (what many Android apps use) or Cupertino (mimics how iOS apps look). If you choose Cupertino as the style, the app will look like an iOS app both on Android and iOS. If you wanted, you could make a style that makes all widgets look like Windows 98 UI elements. Making an app that uses material design for Android and Cupertino for iOS is going to be really difficult, so just choose either one, or come up with a completely original UI design.
Brayden Thompson
Or rather it will take much more work to build the UI's separately for iOS and Android so you should just stick to one design.
Elijah Richardson
based and redpilled
Logan Powell
How expensive to have conditional CSS like
.className > .anoherClass .finalClass {}
In this case, .className > .anoherClass are the two sibling elements, however, .finalClass is like 999 elements deep How bad it is performance wise? Anything I can read up on the subj?
Lucas Phillips
Almost done with my simple backend for a gay anime RP message board. What are some front-end modules that complement Angular and worth checking out? I only have Angular Materials in mind.
Camden Bell
How do I fill an empty array? I am using chart.js and want to be able to switch out the X axes labels by making an if statement that determines what array is used. I have a js file that holds the data to be used for making the chart and labels is set to " [ ] ".
hmm well I want to have a separate js file where I could do something like:
this.labels = this.functionToSetArray()
Joseph Brooks
desu this look at this website vulfpeck.com/ perfectly functional and very little CSS required
Liam Howard
I have three elements with multiple options in every element. How can I search my SQL database for the option values selected? PHP and SQL is really non intuitive for me so excuse my brainlet question.
Liam Richardson
>I said my work is trusted by over 10 million a day to get very sensitive information out and that I run a lot of side businesses by myself that I built from nothing but ideas. He asked my rate so I said another recruiter had called about a position and said the pay was 75 so I want that and it was accepted. Do businesses really fall for that stuff? Unless you actually went more in depth? Cause that is stuff anyone can say but it doesn't really mean it's true. Congrats though user I suck ass at this shit.
Oliver James
>tfw learned about setTimeout(0) trick for deffered execution
So are your select elements wrapped in a form with the method "post"? If so, you should be able to write a PHP file/method for handling the request when its method is post. For example if the action of the form is on "options.php", you could write into that a function that accesses the $_POST array, the key for your element will be its HTML "name" attr
Blake Diaz
>course assignment is make a Wordpress theme oh okay >need to document the entire process down to the last detail, looking at up to 50 pages of "i pressed button" I just wanna make scam sites, fuck this
Brandon Roberts
SEND HELP please somebody
Daniel Hernandez
Try removing the built in css for the anchor when it has your btn class. You could also put an anchor around the button, but that seems weird to me
Ryder Martin
let a = 'a' const o = { a: 'b', p: { a: 'c', getA: function(){ return this.a } } }
console.log(o.p.getA()) let f = o.p.getA console.log(f())
What does this print? You should be able to solve this.
Leo Hughes
> 'c' > 'a'
Never hurts to review lexical scope. If you had used an arrow function it would have been 'a' twice. I get fucked over by this type of thing about once a week.
Aaron Hill
You're not even correct though
Justin Garcia
>Get a CSS/site design book Any recommendations, friend?
Tyler Butler
fyi this changes if you turn on strict mode, which you generally should do.
The second one doesn't print 'a' because when you use 'let', the variable isn't on the window object, so it's not in any this context.
I have a side navigation that I want to give the effect of a SPA. I.e. when a link is clicked, it will just change some text, not updating the entire page, just some paragraphs, and images.
Can i do this with jQuery?
Josiah Morales
you can do this with js
Christopher Barnes
How so? Store text/images in an array or object? pls help
Brandon Adams
Sup /wdg/, my sister in law asked me if I could implement, on her professional website, a form her customers could fill and it would generate a pdf (or odf) filled with the information they user had input earlier. There is a constraint : her website doesn't use a database because she hasn't needed it up to, maybe, now.
I just wanted to know if such thing could be possible without having to create a database and implement it. Is it possible to do that without a database? I was thinking about using a json or some other type of flat file. Is it possible to do this as is, ie with no database or even a json?
Adrian Lopez
I keep seeing these type of css classes everywhere, does anyone know what library are they using? I assume it's css in js stuff
the generation of the PDF is probably more complex than the form stuff. you need SSH access to that server to install software which can generate PDF-s (from html or whatever).
but if you have SSH access, what prevents you from installing a database server as well to save the input?
I think styled components (in react generates such classes). Never used it though, mixing css with JS makes only sense if you create modules for NPM (and even then people get pissed off, since it becomes hard to overwrite those styles with random classes)
Parker Reed
I think the generation will be ok, I'll just use a plugin (her website was made with wordpress wordpress), something like gravitypdf.com/
>but if you have SSH access, what prevents you from installing a database server as well to save the input? Time, or rather the lack of it. I just want it done quick, it's just about filling a simple pdf with personnal infos, plus an insurance company and it outputs an estimate.
Samuel Watson
>her website was made with wordpress wordpress Wordpress uses mysql database and most form plugins already save the data to the Wordpress db (you could even write your own plugin and save data to it)