Questions tagged [simplify]

This tag refers to the process of making something simpler or smaller in order to increase its efficiency, usability, or operation speed.

Use this tag for questions related to making something simpler or smaller in order to increase its efficiency, usability, or operation speed.

770 questions
-4
votes
3 answers

Simplify a php function that uses a counter

I have this function that gives a specific number to every item of a loop.
-5
votes
1 answer

How can i simplify this

Is there any way i can simplify this code? I have exactly 1 white piece and want to get its position Code: final Tile[] white = {null}; board.forEach(tile -> { Piece temp = tile.getPiece(); if (temp != null) { if…
TimSom
  • 11
  • 1
-5
votes
2 answers

how can I simplify this code (by using a loop?)

I use the following code to create accordeon-elements on a webpage: document.getElementById('accordeon1').innerHTML += '
-5
votes
2 answers

How can I simplify my code?

I recently wrote a program that calculates the number of friday the thirteenth's after 1900. The code is perfectly fine and it works; however there are parts that are extremely redundant. Is there anyway I could simplify it. import…
Eric Gan
  • 23
  • 4
-6
votes
3 answers

Simplifying redundant variable assignment

I don't like this code, it is overcomplicated and impractical, so I'm looking to simplify it. I want it to change a var by a random amount, and I need to put at least 150 variables into this code. //Variable list public double price1 = 100; public…
f3rn0s
  • 115
  • 1
  • 7
1 2 3
51
52