Intro
This post is the continuation of Get histogram of bytes in any set of files in Java. This time, I have incorporated all (?) the suggestions provided by Alexander Ivanchenko.
The entire repository is in GitHub.
Code
com.github.coderodde.file.util.ByteHistogramApp.java:
package com.github.cod...
I've got the following Java (8) code:
String originalstring = "-1000"; //read from a file
char symbol = '+'; //depends on user input
long numberone = 1000; //-"-
long numbertwo = 2000; //-"-
String newstring = "";
if(originalstring.charAt(0)=='-') {
switch(symbol) {
case '=':
new...
Referring to the exercise in chapter 4 number 18 of the text "Programming Principles and Practice Using c++" which asks:
Write a program to solve quadratic equations. A quadratic equation is of the form
ax2 + bx + c = 0
If you don’t know the quadratic formula for solving such ...
Thank whoever for git. I am debugging CMakeLists.txt and managed to do an rm -r in the wrong directory (should have been in the Debug directory rather than the parent project directory). Thankfully .git was not deleted and every time I'm satisfied with what I do I do a commit. :)
Only lost the last half hour of work, where I was trying to add gcov test coverate to the project.
If .git had been removed, I could have restored from GitHub since it was up to date (most commits are immediately pushed).
Anyone willing to intervene in this comment exchange to help me educate a low-rep user how review requests and reviews work here? The differences to other SE sites, in particular.
I made one small observation about the code and user says, "that doesn't answer my question".
This has "I got called out in code review and am looking for validation" vibes. And since it got mentioned, the Code Runner extension is hot garbage for C++. — sweenish52 secs ago
@TobySpeight: I agree with the comment you posted on your answer to the question. However, at this point, I don't think there is anything else anyone can do to convince the OP that you are correct. I recommend disengaging. I think the comment thread should be flagged for deletion as NLN because it is now an extended discussion. If anyone wants to debate, it can be done on Meta.
import random
alreadyAsked = []
questionNumber = 1
numCorrect = 0
numIncorrect = 0
print("Welcome to Multiplication Game")
numQuestions = int(input("How many Questions would you like to answer?"))
def generateNumbers():
num1 = random.randint(1,12)
num2 = random.randint(1,12)
while [...
@toolic Thanks for suggestions, I'll not reply further, and hope that reduces the temperature there. I guess not all users "get it", and I've done as much as I can to guide this one.
Before you post at Code Review, be sure to read A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. question titles should simply say what the code is for, as the question is always, "How can I improve this?". Be sure that the code works correctly; include your unit tests if possible. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. — Toby Speight52 secs ago