Skip to main content

All Questions

Tagged with
1 vote
1 answer
116 views

Matching Card Game using JS

*{ box-sizing: border-box; } .clear { clear: both; } section { border: 1px solid black; height: 200px; width: 50%; float: left; } <!DOCTYPE html> <html lang="en"> <...
techCARE_'s user avatar
0 votes
0 answers
33 views

Why do these lines extend to the current bar instead of stopping like the boxes do?

As you can see, I have boxes drawn that when broken based on certain logic stop at that bar index. The lines should follow this same logic, yet do not. I've spent hours over the past week+ reading up ...
Classic Scott's user avatar
3 votes
4 answers
80 views

Including more commands if CSV column is not empty

Let's say I have the following CSV file (sample.csv) filepath1 filepath1,filepath2 filepath1,filepath2,filepath3 filepath1,filepath2,filepath3,filepath4 filepath1,filepath2 And the program I need to ...
Gabriel G.'s user avatar
-1 votes
2 answers
51 views

How to find each word in a 2D array from a specific ch

I'm new to Java and I'm trying to work this question out: Write another method in the class (a suitable name for this method would be findChar). This method should take a char and a 2 dimensional ...
Matthew Wallbridge's user avatar
0 votes
1 answer
24 views

how to access each json object in a array using for loop?

{ "item1" : [{"index":"1"},{"id":"1","name":"npm","result":"expected text1"},{"id":"2",&...
Jemi Artista's user avatar
-3 votes
2 answers
89 views

Can you assign an element's class list to a variable by clicking on the element?

The main question I have is: Is there a way to assign to a variable an element's class list by clicking on said element without directly referencing the element in the JavaScript. Expanding on this, I'...
ScalarQuantity's user avatar
-1 votes
2 answers
49 views

Error while building a program which should output assigned domino tiles for each player in Java

So, I am a total beginner in Java. I need a program that takes a number of players as an input. Then assuming there are 91 domino tiles each with two squares with dots ranging from 0 to 12 in each ...
PabloSaint's user avatar
0 votes
1 answer
38 views

I'm trying to filter an array to print read book using express but it can not be read or empty result

I have a booklist and try to print out those already read in 'title by author' form const bookList = [ {title: "Harry Potter", author: "J.K. Rowling", alreadyRead: true}, {...
yeeee's user avatar
  • 1
1 vote
1 answer
105 views

Getting undesirable output from a variable inside the for loop

I wanted to try and make an armstrong number check program in C using arrays and for loops but have been facing problem with what input is getting saved in the variable input_num below; In my code: #...
Krrish Dhaneja's user avatar
-1 votes
2 answers
49 views

how to prevent this list from being updated? [duplicate]

my program: num_cards=8 list1=[1,2,3,4,5,6,7,8] shuffle_cards=list1 for j in range(0,num_cards//2): shuffle_cards.insert((2*j)+1,shuffle_cards[(num_cards//2)+(2*j)]) shuffle_cards=shuffle_cards[0:...
Anirudh SV's user avatar
2 votes
2 answers
58 views

returning two arrays in one array that contain names with a certain letter and names without the stated letter

I'm doing for-loop practice and can only use for loops to iterate over the arrays and strings in the problems I'm working. QUESTION:Return and array of 2 arrays // (1 - an array of names that contain &...
Justin Hawkins's user avatar
0 votes
0 answers
114 views

Updating items of Boolean array in For Each loop

How to update each item of a Boolean array in a For... Each loop? This code updates item variable in every loop but it doesn't update the array items themselves. Dim BoolArr(1 to 4) as Boolean Dim ...
house_of_codes's user avatar
-2 votes
3 answers
105 views

Given an array of numbers(arr) and the length of the array(n) as arguments, how do you create a tribonacci sequence?

Consider: function tribonacci(arr, n){ let sum = 0; for(let i= arr.length-1; i > arr.length-4; i--){ sum += arr[i] } while(arr.length < n){ arr.push(sum); }...
Decodeme's user avatar
3 votes
3 answers
60 views

Access buttons of a div as an array

This is a problem I was having: I am trying to access the button inside of the div and make each of them log its own text content on click. But all of them display all of the text content. And it has ...
Sara Freitas's user avatar
1 vote
2 answers
75 views

How to update json with variable array using bash script

I have a json file test.json with below format: { "environments": { "egress": [ ] } } I want to ...
AkashR's user avatar
  • 69

15 30 50 per page
1
2 3 4 5
579