# programming

**URL:** https://forum.kirupa.com/c/programming/41.md?page=32

[Latest](https://forum.kirupa.com/latest.md) · [Categories](https://forum.kirupa.com/categories.md)

**Page:** 33

---

## [VS Code Live Server](https://forum.kirupa.com/t/vs-code-live-server/650588)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 7\
**Last updated:** [January 25, 2022, 7:45am UTC](https://forum.kirupa.com/t/vs-code-live-server/650588 "2022-01-25T07:45:27Z")

</div>

@kirupa when you are doing the regular coding video tutorials. You can install a vs code plugin called live server to not to have to refresh the html page for each file update manually.

---

## [Code not working for page 136 JavaScript Absolute Beginner's Guide 2nd Edition](https://forum.kirupa.com/t/code-not-working-for-page-136-javascript-absolute-beginners-guide-2nd-edition/650566)

<div class="topic-metadata">

**Author:** [@Sueny](https://forum.kirupa.com/u/Sueny)\
**Replies:** 3\
**Last updated:** [January 23, 2022, 10:01pm UTC](https://forum.kirupa.com/t/code-not-working-for-page-136-javascript-absolute-beginners-guide-2nd-edition/650566 "2022-01-23T22:01:50Z")

</div>

Here is code that must show warning and error messages on the console but it not working

---

## [State of CSS](https://forum.kirupa.com/t/state-of-css/650534)

<div class="topic-metadata">

**Author:** [@Wayne](https://forum.kirupa.com/u/Wayne)\
**Replies:** 3\
**Last updated:** [January 22, 2022, 7:26am UTC](https://forum.kirupa.com/t/state-of-css/650534 "2022-01-22T07:26:08Z")

</div>

---

## [Having probs with 'Target\[i\].setAttribute()'](https://forum.kirupa.com/t/having-probs-with-target-i-setattribute/650481)

<div class="topic-metadata">

**Author:** [@vmars316](https://forum.kirupa.com/u/vmars316)\
**Replies:** 2\
**Last updated:** [January 19, 2022, 1:42am UTC](https://forum.kirupa.com/t/having-probs-with-target-i-setattribute/650481 "2022-01-19T01:42:08Z")

</div>

Can anyone help me… When I run the code below , I get 3 of these: ‘Target = \[object HTMLOptionElement\]’ and one of these: ‘Target = undefined’. \<html\> \<head\> \<script\> document.addEventListener("DOMContentLoad…

---

## [Creating a Single-Page App in React using React Router](https://forum.kirupa.com/t/creating-a-single-page-app-in-react-using-react-router/636201)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 53\
**Last updated:** [January 18, 2022, 11:55pm UTC](https://forum.kirupa.com/t/creating-a-single-page-app-in-react-using-react-router/636201 "2022-01-18T23:55:33Z")

</div>

by kirupa | 5 March 2017 Now that you've familiarized yourself with the basics of how to work with React, let's kick things up a few notches. What we are going to do is use React to build a simple single-page app …

---

## [Spring animation on html canvas](https://forum.kirupa.com/t/spring-animation-on-html-canvas/650448)

<div class="topic-metadata">

**Author:** [@Wayne](https://forum.kirupa.com/u/Wayne)\
**Replies:** 2\
**Last updated:** [January 13, 2022, 6:53pm UTC](https://forum.kirupa.com/t/spring-animation-on-html-canvas/650448 "2022-01-13T18:53:34Z")

</div>

I have been trying to figure out how he made this spring animation where the spring does not redraw different waves on drag but simply expand the whole spring when you drag the weight without losing the structure of the o…

---

## [What is a mistake i made in this code?](https://forum.kirupa.com/t/what-is-a-mistake-i-made-in-this-code/650363)

<div class="topic-metadata">

**Author:** [@Programmer\_Uz](https://forum.kirupa.com/u/Programmer_Uz)\
**Replies:** 4\
**Last updated:** [January 8, 2022, 4:57pm UTC](https://forum.kirupa.com/t/what-is-a-mistake-i-made-in-this-code/650363 "2022-01-08T16:57:12Z")

</div>

Hi Kirupa! What is a mistake i made in this code? Where is my mistake? I think, I did all correct, but I can’t see result. I want to do cards as cards in online-shops class Btn extends React.Component { ren…

---

## [Creating a 3x3 grid in CSS](https://forum.kirupa.com/t/creating-a-3x3-grid-in-css/650354)

<div class="topic-metadata">

**Author:** [@radmo](https://forum.kirupa.com/u/radmo)\
**Replies:** 3\
**Last updated:** [January 7, 2022, 11:14pm UTC](https://forum.kirupa.com/t/creating-a-3x3-grid-in-css/650354 "2022-01-07T23:14:15Z")

</div>

Kirupa’s video is the isssue here: Creating a 3x3 Grid in CSS - YouTube Now how to access the innerHTML etc of a specific element in the grid from Javascript? That is the challenge. It seems the grid layout uses a tem…

---

## [Where is my mistake? Who could help me find it?](https://forum.kirupa.com/t/where-is-my-mistake-who-could-help-me-find-it/650214)

<div class="topic-metadata">

**Author:** [@Programmer\_Uz](https://forum.kirupa.com/u/Programmer_Uz)\
**Replies:** 4\
**Last updated:** [January 7, 2022, 10:07am UTC](https://forum.kirupa.com/t/where-is-my-mistake-who-could-help-me-find-it/650214 "2022-01-07T10:07:05Z")

</div>

\<!DOCTYPE html\> \<html lang="en"\> \<head\> \<meta charset="UTF-8"\> \<meta http-equiv="X-UA-Compatible" content="IE=edge"\> \<meta name="viewport" content="width=device-width, initial-scale=1.0"\> \<title\>My …

---

## [Kirupa.com - Random Numbers in JavaScript](https://forum.kirupa.com/t/kirupa-com-random-numbers-in-javascript/352102)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 4\
**Last updated:** [December 31, 2021, 3:33pm UTC](https://forum.kirupa.com/t/kirupa-com-random-numbers-in-javascript/352102 "2021-12-31T15:33:10Z")

</div>

Have questions? Discuss this HTML5 / JavaScript tutorial with others on the forums. In programming, it is often nice to be able to work with numbers whose values are a bit unpredictable. To c…

---

## [Scroll a div while background remains fixed](https://forum.kirupa.com/t/scroll-a-div-while-background-remains-fixed/650263)

<div class="topic-metadata">

**Author:** [@travis](https://forum.kirupa.com/u/travis)\
**Replies:** 0\
**Last updated:** [December 31, 2021, 3:30am UTC](https://forum.kirupa.com/t/scroll-a-div-while-background-remains-fixed/650263 "2021-12-31T03:30:14Z")

</div>

I’ve been playing around with some frontdnd development recently using Svelte and SvelteKit. I’m struggling with an effect that I know I’ve seen before but I don’t know what it’s called so it’s hard to Google it (some sp…

---

## [Fetching Country flags emojis from API in react](https://forum.kirupa.com/t/fetching-country-flags-emojis-from-api-in-react/650062)

<div class="topic-metadata">

**Author:** [@not\_survivng](https://forum.kirupa.com/u/not_survivng)\
**Replies:** 2\
**Last updated:** [December 30, 2021, 12:18am UTC](https://forum.kirupa.com/t/fetching-country-flags-emojis-from-api-in-react/650062 "2021-12-30T00:18:29Z")

</div>

I have a small piece of code from a weather App where it is supposed to look for any city’s weather after searching the name but also fetch the country flag of that city from this website https://www.countryflags.io but …

---

## [I am Getting a Blank Image for Unsplash API](https://forum.kirupa.com/t/i-am-getting-a-blank-image-for-unsplash-api/649821)

<div class="topic-metadata">

**Author:** [@Pragati\_Sahane](https://forum.kirupa.com/u/Pragati_Sahane)\
**Replies:** 21\
**Last updated:** [December 24, 2021, 5:53am UTC](https://forum.kirupa.com/t/i-am-getting-a-blank-image-for-unsplash-api/649821 "2021-12-24T05:53:53Z")

</div>

\<html lang="en"\> \<head\> \<meta charset="UTF-8"\> \<meta http-equiv="X-UA-Compatible" content="IE=edge"\> \<meta name="viewport" content="width=device-width, initial-scale=1.0"\> \</head\> \<style\> body { …

---

## [Is this the correct Forum ?](https://forum.kirupa.com/t/is-this-the-correct-forum/650151)

<div class="topic-metadata">

**Author:** [@vmars316](https://forum.kirupa.com/u/vmars316)\
**Replies:** 1\
**Last updated:** [December 22, 2021, 5:00am UTC](https://forum.kirupa.com/t/is-this-the-correct-forum/650151 "2021-12-22T05:00:44Z")

</div>

Please , what am I doing wrong : In index.html : \`\`\` \<button id="go"\>Go\</button\> In renderer : go.addEventListener('click', () =\> { console.log("GO Button Clicked") alert("GO Button Clicked") ipcRenderer.send…

---

## [What was that other way to set CSS styles?](https://forum.kirupa.com/t/what-was-that-other-way-to-set-css-styles/650117)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 2\
**Last updated:** [December 21, 2021, 6:02pm UTC](https://forum.kirupa.com/t/what-was-that-other-way-to-set-css-styles/650117 "2021-12-21T18:02:22Z")

</div>

@senocular - a while ago, as part of your JS Tips of the Day, there was a clever approach for setting CSS styles on elements that you came up with. Do you remember what that is? I’m planning on revising the old tutorial …

---

## [Should I not be using app.on & invoke ?](https://forum.kirupa.com/t/should-i-not-be-using-app-on-invoke/650082)

<div class="topic-metadata">

**Author:** [@vmars316](https://forum.kirupa.com/u/vmars316)\
**Replies:** 0\
**Last updated:** [December 19, 2021, 12:12am UTC](https://forum.kirupa.com/t/should-i-not-be-using-app-on-invoke/650082 "2021-12-19T00:12:39Z")

</div>

Hi Kirupa , I enjoyed your youtube talk on WebView . I am having trouble with a simple browser program , Trying to use electron ipc communication : in renderer.js go.addEventListener(‘click’, () =\> { ipcRenderer.i…

---

## [Can't get the difference](https://forum.kirupa.com/t/cant-get-the-difference/650053)

<div class="topic-metadata">

**Author:** [@banchego](https://forum.kirupa.com/u/banchego)\
**Replies:** 1\
**Last updated:** [December 17, 2021, 10:49am UTC](https://forum.kirupa.com/t/cant-get-the-difference/650053 "2021-12-17T10:49:03Z")

</div>

What’s the difference in these codes if they work same? const name = "Nick"; const age = 21; const print = function(){ console.log(\`Mr. ${name} is ${age} years old\`); }; const person = {name, age, print}; print();…

---

## [Creating Circles using Radial Gradients](https://forum.kirupa.com/t/creating-circles-using-radial-gradients/643020)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 4\
**Last updated:** [December 17, 2021, 6:02pm UTC](https://forum.kirupa.com/t/creating-circles-using-radial-gradients/643020 "2021-12-17T18:02:49Z")

</div>

This is a companion discussion topic for the original entry at https://www.kirupa.com/css/circles\_radial\_gradient.htm

---

## [Quickly Adding Many Elements into the DOM](https://forum.kirupa.com/t/quickly-adding-many-elements-into-the-dom/650047)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 0\
**Last updated:** [December 16, 2021, 11:35pm UTC](https://forum.kirupa.com/t/quickly-adding-many-elements-into-the-dom/650047 "2021-12-16T23:35:53Z")

</div>

This is a companion discussion topic for the original entry at https://www.kirupa.com/javascript/quickly\_inserting\_elements\_dom.htm

---

## [IF statement in Switch React JS](https://forum.kirupa.com/t/if-statement-in-switch-react-js/650019)

<div class="topic-metadata">

**Author:** [@not\_survivng](https://forum.kirupa.com/u/not_survivng)\
**Replies:** 1\
**Last updated:** [December 15, 2021, 11:06pm UTC](https://forum.kirupa.com/t/if-statement-in-switch-react-js/650019 "2021-12-15T23:06:34Z")

</div>

I’m making a snake game in React and it works fine but I have defined a switch case, where you can control the snake with the arrow keys. But there’s a problem, when the snake is going to one direction I don’t want it to…

---

## [Functional component in React](https://forum.kirupa.com/t/functional-component-in-react/649980)

<div class="topic-metadata">

**Author:** [@not\_survivng](https://forum.kirupa.com/u/not_survivng)\
**Replies:** 3\
**Last updated:** [December 12, 2021, 9:41pm UTC](https://forum.kirupa.com/t/functional-component-in-react/649980 "2021-12-12T21:41:58Z")

</div>

I’m new to react and need to learn the Functional components with Yahtzee game but all i can find with that game are class components. :") Can anyone please refactor one example of it to a functional version of Yahtzee …

---

## [\[Help AS3\] create non-repeat combinations of multiple arrays](https://forum.kirupa.com/t/help-as3-create-non-repeat-combinations-of-multiple-arrays/649936)

<div class="topic-metadata">

**Author:** [@Nayzuko](https://forum.kirupa.com/u/Nayzuko)\
**Replies:** 13\
**Last updated:** [December 10, 2021, 12:17pm UTC](https://forum.kirupa.com/t/help-as3-create-non-repeat-combinations-of-multiple-arrays/649936 "2021-12-10T12:17:44Z")

</div>

Greetings all, I have arrays like these: var arr1:Array = \[0,1,2,3,4\] var arr2: Array = \[0,1,2,3,4,5\] … var arr6:Array = \[0,1,2\] How to combine all arrays into one non-repeat arrays (permutation) in AS3? Such as: …

---

## [Refactoring a class component to Functional, Invalid value](https://forum.kirupa.com/t/refactoring-a-class-component-to-functional-invalid-value/649866)

<div class="topic-metadata">

**Author:** [@louyi](https://forum.kirupa.com/u/louyi)\
**Replies:** 0\
**Last updated:** [December 2, 2021, 8:05pm UTC](https://forum.kirupa.com/t/refactoring-a-class-component-to-functional-invalid-value/649866 "2021-12-02T20:05:59Z")

</div>

I’m trying to refactor a Class component to Functional, but i’m pretty new to React and got myself confused with some things and got the Invalid value for prop disabled on tag. the whole code is here, may I know if …

---

## [Refactoring class component to React functional component](https://forum.kirupa.com/t/refactoring-class-component-to-react-functional-component/649442)

<div class="topic-metadata">

**Author:** [@pepasteel](https://forum.kirupa.com/u/pepasteel)\
**Replies:** 15\
**Last updated:** [November 30, 2021, 11:04pm UTC](https://forum.kirupa.com/t/refactoring-class-component-to-react-functional-component/649442 "2021-11-30T23:04:17Z")

</div>

I am a beginner in javascript and react. I’m trying to refactor the class component into a functional one (Rules for Yahtzee game scoring). This is class component: /\*\* Rule for Yahtzee scoring. \* \* This is an "abstr…

---

## [I have an old project with legacy code that I cannot get to run now](https://forum.kirupa.com/t/i-have-an-old-project-with-legacy-code-that-i-cannot-get-to-run-now/649806)

<div class="topic-metadata">

**Author:** [@Fejiro\_Eruotor](https://forum.kirupa.com/u/Fejiro_Eruotor)\
**Replies:** 8\
**Last updated:** [November 28, 2021, 9:42pm UTC](https://forum.kirupa.com/t/i-have-an-old-project-with-legacy-code-that-i-cannot-get-to-run-now/649806 "2021-11-28T21:42:21Z")

</div>

I made a simple desktop app sometime back that is meant to be my own custom plaintext encryption software(yes, I know, a weird project when I was bored). Now I actually need the software working as I see a need to encryp…

---

## [Code from the book isn't running](https://forum.kirupa.com/t/code-from-the-book-isnt-running/649808)

<div class="topic-metadata">

**Author:** [@banchego](https://forum.kirupa.com/u/banchego)\
**Replies:** 0\
**Last updated:** [November 28, 2021, 1:22am UTC](https://forum.kirupa.com/t/code-from-the-book-isnt-running/649808 "2021-11-28T01:22:43Z")

</div>

\<!DOCTYPE html\> \<html\> \<head\> \<title\>React Styling Using CSS\</title\> \<script src="https://unpkg.com/react@latest/dist/react.js"\>\</script\> \<script src="https://unpkg.com/react-dom@latest/dist/react-dom.js"\>\</script\>…

---

## [Why the complexity of React Components?](https://forum.kirupa.com/t/why-the-complexity-of-react-components/649666)

<div class="topic-metadata">

**Author:** [@JohnHansenArtist](https://forum.kirupa.com/u/JohnHansenArtist)\
**Replies:** 2\
**Last updated:** [November 16, 2021, 2:08am UTC](https://forum.kirupa.com/t/why-the-complexity-of-react-components/649666 "2021-11-16T02:08:22Z")

</div>

React is quite the tool, and using it’s powers to control the DOM and build out web apps has changed a lot about web development… though… I was looking at a form component I built where I thought it might be a good idea …

---

## [Creating a Sweet Digital Clock](https://forum.kirupa.com/t/creating-a-sweet-digital-clock/649581)

<div class="topic-metadata">

**Author:** [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Replies:** 0\
**Last updated:** [November 9, 2021, 10:50pm UTC](https://forum.kirupa.com/t/creating-a-sweet-digital-clock/649581 "2021-11-09T22:50:13Z")

</div>

This is a companion discussion topic for the original entry at https://www.kirupa.com/buildstuff/sweet\_digital\_clock.htm

---

## [Chrome DevTools: Record and playback page interactions!](https://forum.kirupa.com/t/chrome-devtools-record-and-playback-page-interactions/649513)

<div class="topic-metadata">

**Author:** [@senocular](https://forum.kirupa.com/u/senocular)\
**Replies:** 2\
**Last updated:** [November 3, 2021, 10:47pm UTC](https://forum.kirupa.com/t/chrome-devtools-record-and-playback-page-interactions/649513 "2021-11-03T22:47:32Z")

</div>

https://storage.googleapis.com/web-dev-uploads/video/dPDCek3EhZgLQPGtEG3y0fTn4v82/jDJpU85zWj1dipsUPrMr.mp4

---

## [Repeating Animations](https://forum.kirupa.com/t/repeating-animations/649376)

<div class="topic-metadata">

**Author:** [@marqimoth](https://forum.kirupa.com/u/marqimoth)\
**Replies:** 24\
**Last updated:** [October 27, 2021, 6:56pm UTC](https://forum.kirupa.com/t/repeating-animations/649376 "2021-10-27T18:56:21Z")

</div>

how can i make a repeating animation like a question mark box in super mario world?

[Previous page](https://forum.kirupa.com/c/programming/41.md?page=31)

[Next page](https://forum.kirupa.com/c/programming/41.md?page=33)
