Im currently trying to figure out why my encoder/decoder doesn't add or subtract the right amount. Any help is greatly appreciated.
document.getElementById("message").innerHTML = ("<h2> </h2>");
var msg= prompt("Enter your message." , " ");
var newmsg = " ";
var upCaseCode...
Below is my code for the Fantasy Game Inventory problem from Chapter 5 of Automate the Boring Stuff with Python. Is there anything I can do to make it cleaner or more efficient?
The code starts out with a dictionary "inv" that contains the player's current inventory as well as a list "dragon_lo...
I am beginner in OOP. And i want you to analyze my piece of code and give me some recommendations.
My task was :
RPG game give a chance to choose race of Hero : Argonian, Breton, altmer, nord. In addition to choosing a race, the user has the opportunity to choose these characteristics : sex, co...
I got frustrated with the jargon and created an alternative state management solution. Its up at https://github.com/smakazmi/react-soliit. It goes something like this
import React from "react";
export default class StateStore<T> {
private listeners: Array<Function>;
constructor(public stat...
import re
log = open("automatic.log", "r")
answers_in_my_head = 0
chance_on_succeeding = 100%
print("Hey guys! I am a beginner, I've only written a few question games, but now I would like to make a new, bigger project. So I am trading on Steam, and I have a script that is tradi...
I have coded a speedreading training bash script. My targed was to make some experience with bash in a funny way.
It essentially does the following:
Prints to screen a random number consisting of a default number of digits
Erases that number after a default time interval
Waits for the user inp...
Now I have this very simple priority queue. add and changePriority both run in \$\mathcal{O}(n)\$ and extractMinimum in \$\Theta(1)\$:
net.coderodde.util.pq.PriorityQueue:
package net.coderodde.util.pq;
/**
* This interface defines the API for priority queue data structures.
*
* @author Ro...
I am currently working on a AIS message decoder written in pure Python. It's just a little project to teach me some things about binary data, decoding, etc. Because I am only programming for about a year or so I am not quite sure, if my approaches is reasonable. The full source code be found here...
I have a piece of working code that takes some strings from Consul configuration exports, sanitizes them a little and converts them into valid json and/or hocon structures.
While I am iterating over a vector of Nodes in the process function, I couldn't come up with a better solution than having...
All functions in std::string are thread-safe. However, using multithreading, you have a bunch of other ways to shoot yourself in the foot. This may or may not show inside those functions, but it sure isn't caused by them. If you need advise with your code, consider codereview.stackexchange.com or, if you know it to be buggy, extract a minimal reproducible example and post that here. As a new user, also take the tour and read How to Ask. — Ulrich Eckhardt14 secs ago
My name is Valentino, I am 14 years old and I have just created with a friend an encryption program.
I haven't got many people to try it yet and wondered if anyone would try it and give me feedback for further development.
I have made a website for this http://agencryption.ecwid.com
This site ...
Well the safety is as strong as the weaked link, so if the authentication method/layer is leak the whole system after is unsafe.. Also consider reasking this on codereview.stackexchange.com or security.stackexchange.com as this question is more or less in the gray area of been considerd offtopic here.. As stackoverflow is meant for non working code.. — Raymond Nijland49 secs ago
Well the safety is as strong as the weaked link, so if the authentication method/layer is leak the whole system after is unsafe.. Also consider reasking this on codereview.stackexchange.com or security.stackexchange.com as this question is more or less in the gray area of been considerd offtopic here... Also be ready to post more of your code when asked for then poeple can give much more solid advice instead of guessing.. — Raymond Nijland46 secs ago
I have been given the following input:
n where n is size of sequence
k is an integer
a sequence A[0] A[1] A[2] ............A[n-1]
I need to perform for each i from 0 to (k-1) inclusive
find a,b
where a=A[i%n] and b=A[n-(i%n)-1]
then set A[i]=a XOR b
and output the final sequence s...
I'm learning Rust.
I find it sometimes confusing when compared to other programming languages, especially when dealing with strings and slices.
Her's an implementation of the 99 beer song that I've written, but the code feels clunky and I think it's bad.
How would you have written it, if it wa...
How to improve this code? Is it somehow possible to remove fields fro, html and pass all necessary data through FormGroup?
app.components.ts
import { Component } from '@angular/core';
import { FormGroup, FormBuilder, FormControl } from '@angular/forms';
@Component({
selector: 'app-root',
t...
I’m David Fullerton, Stack Overflow’s CTO, responsible for the product, engineering, and community teams.
I joined Stack Overflow in 2010 because I believed in the vision and mission of Stack Overflow. I wanted to be a part of building a community where programmers come together to help one anot...
This is very significant to me: "Second, we hurt a longstanding member of the community and an important volunteer moderator. She deserved the benefit of a private, comprehensive process. "
considering that Community has a comparatively large stake in technical decisions it may not be terrible, but it's also not something I would call "conventional"
It's going to be difficult. They are going to need to make amends without backpedaling so fast that they step on the people they were supposedly protecting in the first place. I know they addressed that but it is my biggest concern.
Dear Stack Exchange, Inc.,
We know you know about this already, so we'll keep this brief. The past two weeks have been rough. Lots of moderators have lost confidence in you; for some, it was the final straw. For many of us, though, we like being here and we don't want it to get to that point. So...
This is a second drafted letter (also drafted before the meta post) addressing more specifically the issues the LGBT+ community feels it is necessary to address. The website containing the primary letter will be edited to add this, but it is a process (and I thank ArtOfCode for putting the tim...
I have added an update to my resignation meta post ... I am still resigning, but I am hopeful that SE is on the right track in the process to restoring trust in the community, including moderators.