The following program directs you to a menu once you start it where you can either enter a new guessword or start the hangman game. By looking at it I think the code should work but once I press 2 to start the hangman game it just doesn’t do anything except give me an input place where i can type...
Problem statement
Ping-pong
The ping-pong sequence counts up starting from 1 and is always either counting up or counting down. At element k, the direction switches if k is a multiple of 7 or contains the digit 7. The first 30 elements of the ping-pong sequence are listed below, with direction s...
@CaptainObvious @Peilonrayz You editied this and you didn't vote to close?
> but once I press 2 to start the hangman game it just doesn’t do anything except give me an input place where i can type something that doesn’t do anything. How can I fix that?
Welcome to Stack Overflow. Please read about what's on-topic in the help center. This is too open-ended and opinion-based to be on-topic here. You might have better luck on our sister site Code Review. — Chris12 secs ago
Working on a program that using RIOT API league of legends that collects the data of a player and calculate how skill a player is by using a grade system( AS of right now it just the average of the last ten games for each skills). Realize I used a lot of class and what is a better way to do it?
i...
Context
I would like to receive feedback on my code for the question which can be seen here.
Problem
This is another C# implementation for the a function for given parameters int a, int b - both represent characters 'A' and 'B' respectively, where the function should return a string containing bo...
I want to call an API and if it was success insert data to DB and then if it was success subscribe an observer.
The first approach its something like this :
Get list from server :
fun getList(): Single<Response<List<A>>> {
return Single.create { subscriber ->
mApiInterface.getList()
...
i want to apply 8 puzzle problem in python using BFS algorithm in simplest way. please somebody help me.
i just write the main class but i cant go further.
class Board(object):
def __init__(self, initial_values=(), dimensions=(3,3)):
rows, columns = dimensions
assert len(initial_values) =...
I want to create folders and subfolders in the order:
Test , Train ,valid.
Each of these folders will contain 1 to n subjects and each subject will have three different folders.
Ex:
Train> Subj 1>A
>B
>C subfolder
.
.
Subj N>A
...
I have the following code structure:
try:
x = function_one(args)
try:
y = function_two(args)
try:
#
# some code where I need x and y
#
except Exception as e::
print("Problem with code above : ", e)
except Exceptio...
@MiralKh: If you have working code and you're just looking to improve it, you might try Code Review instead. Though you are encouraged to read their Help Center to learn about that community first. To learn more about this community and how we can help you, please start with the tour and read How to Ask and its linked resources. — David11 secs ago
@David You stated "might try Code Review instead. Though you are encouraged to read their Help Center" yet linked to SO's help pages. From the phrasing I had expected CR's pages. — Mast41 secs ago
If you look at ImportAndPreload method, it looks bad because:
MovingAverageConvergenceDivergence, StochasticRSI, RelativeStrengthIndex and ExponentialMovingAverage. They are all indicators, they all inherit from IndicatorBase. What would happen if I wanted to pass a few more indicators? There wou...
It is my solution from a challange from edabit.com named "Drunken Python". Thats the task:
You need to create two functions to substitute str() and int(). A function called int_to_str() that converts integers into strings and a function called str_to_int() that converts strings into integers.
I h...
Please notice that requests for improving working code (i.e. without bugs or related issues) are actually off-topic here, and they should be posted at Code Review SE instead. — desertnautjust now
Nobody's being mean here, as you're new, you just don't know about how to present or write in order to make it easier for us to help you back. It's the "help me help you" mindset as well as "help futur you": you can read the answer on that code review, it covers general "problems" new coders (as i was and still am sometime) have. codereview.stackexchange.com/questions/246013/… — Patates Pilées53 secs ago
I'm writing start/stop module for my application.
I have a class that manages application life cycle and I called it Work.
Work uses WorkState class that contains 4 states the application can be in, that's:
INITIALIZING (state between NOT_RUNNING and RUNNING)
RUNNING
FINALIZING (state between RU...
I would like to get your opinion on this service, which is used to cache HTTP requests.
See the working demo, this is the full code:
ng-http-caching.module.ts
import { NgModule, ModuleWithProviders } from '@angular/core';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import {
NG_HTT...
@Duga @Mast it makes sense - the first link is to the CR help center, but then goes on to state "To learn more about this community and how we can help you" before the SO links - makes sense because he wants the OP to learn about the SO scope
I've written a 'fast & dirty' PowerShell script to harvest a system inventory of Windows client and\or server operating systems to streamline case note documentation.
$NewLine = "`n"
$FileName = Join-Path $Env:USERPROFILE 'Desktop\System Inventory.txt'
# Current Date
$TimeStamp = Get-Date -Form...
I've been going through some 2019 AoC challenges and decided to solve Day 6 in Haskell with the help of Data.Tree.
In summary, the puzzle provides a list of orbits (edges) as input, resembling:
COM)B
B)C
C)D
D)E
E)F
B)G
G)H
D)I
E)J
J)K
K)L
K)YOU
I)SAN
where COM is supposedly the centre of all or...
I have Java (or C#, Python, Kotlin, or other similar language) class that will be used to communicate with client over network. Protocol used by this application allows many different ways to create connection (TCP, unix socket, serial port, …) and perform handshake (plain connection or TLS, with...
I have the following tables in MySQL:
create table PostSchema
(id int not null primary key auto_increment,
categories int not null,
title varchar(50),
status varchar(20),
comments bool,
body varchar(255),
filename varchar(255),
date_created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP);
create t...
@jonrsharpe when suggesting users post on CR it would be great if there was also a suggestion like "Please read the relevant help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?". In the current form the code above would likely be closed as off-topic because the code to be reviewed is not embedded in the post. — Sᴀᴍ Onᴇᴌᴀ42 secs ago
What's the question? If the code you have works and you want to know how to improve it, post to Code Review instead (and post the code there as text.) — Guy Incognito44 secs ago
If your code runs without problems, Code Review might be a better place to ask. (But yeah, they will insist on seeing the code as well.) — usr256430125 secs ago
During development I needed to design a state machine with decision which runs to completion and performs state transition without the need to wait for events. So i come up with the following implementation that I want to share.
So the state machine is described with the following Enum
public enu...
The React community grew organically thanks to its instant popularity. Here’s how the folks shepherding that community ensure that everyone who wants to contribute is welcome to.
Core Guidelines mention a type synchronized_value<T>, which supposedly pairs std::mutex with the internal value. I couldn't find any implementation both in GSL-Lite and MS GSL libraries.
I implemented my class and want to have it reviewed. There are some problems, for instance, make_synch_value d...
I'm brand new in Python and trying to solve one of my exercises:
Below is a code describing growth of money, which started at $100, and which grows over time at a rate of 3% per year. The balance at the end of a given year is equal to balance*rate from the year before.
balance = 100.0
rate = 0.03...
@Mast Here's all the rules and sub rules I've found so far. (might be more apt to call them similar posts) Here is a short explanation on what all these random pages and links even mean.
I recently finished chapter 8 of Rust's book, and below is my solution to the third exercise. I'd appreciate pointers on how the code can be improved. Thanks in advance.
use std::collections::HashMap;
//An attempt at Rust book's chapter 8's third exercise:
//https://doc.rust-lang.org/book/ch08-0...
If the code is complete, works, and you just want a review of it, it should be on our sister site Code Review. This site is primarily for fixing broken code. — Carcigenicate40 secs ago
@PHilF please don't suggest users post questions involving code that is not working on Code Review since that is not on-topic there. — Sᴀᴍ Onᴇᴌᴀ19 secs ago
How would I check if my_ajax_object.ajax_url is defined or not? There are no errors in the console prior to or during the attempt of the call. Thanks for the advice, I'll move this question into code review and wordpress stackexchange — kenyac30 secs ago
@kenyac please see SAM's comment. Code Review would NOT be a good fit for this. I was only mentioning it as a possibility, but that community has said it off-topic. — Phil F57 secs ago
@PhilF Thank you, I have posted a copy with some edits in the wordpress stack exchange but I won't be posting it to code review. — kenyac5 secs ago