Top new questions this week:
|
I was given for homework to make a rock paper scissor game where I input my choice as a string either: “@” for rock, “[]” for paper or “X” for scissors. The computer …
|
I have solved the coding problem written here. In summary: Input: str = “red2 blue5 black4 green1 gold3” Output: “green red gold black blue” Here is my code: …
|
Consider the following function that implements optimised O(log n) exponentiation by squaring: …
|
Im a beginner in python and just started making little games and projects like this rock paper scissor one. Any advice to write this shorter or any better? I got kicked off of stack overflow for a …
|
This is a real problem I had to fix recently. Imagine having generic array where you can have duplicate columns and rows. You want to remove those duplicates as long as they are next to each other. <...
|
My code is about sending random poem from /etc/poem.conf to client using TCP sockets. In this implementation my daemon have restart mechanism using SIGHUP signal and DEBUG mechanism using defining …
|
I was doing an exercise from LeetCode in which consisted in repeatedly deleting any adjacent duplicate elements from a string, until there are only unique characters adjacent to each other. With some …
|
Greatest hits from previous weeks:
|
I’ve recently stared learning C++ so I’m new to all of it. I’ve got my fourth “software” under development. Could someone have a look through and give me some constructive criticism on what should I …
|
Here is my code for removing duplicated values from an array. I think I tested it with the most possible cases. Any suggestions or bugs? …
|
The use case is to convert an array of objects into a hash map where one property is the key and the other property is the value. Common case of using this is converting a “link” object in a …
|
On my quest to become a master programmer I have created a simple game of Hangman, and so I thought I would upload it here and see how it could be refined. One question I had was my use of exception …
|
Are there any ways I can clean this code up to make it more user-friendly? …
|
I’d like to ask if either my JSON data is ill-conceived and whether how I solved it is particularly inefficient/plain stupid/typical. Given the following JSON data: …
|
I want to use a better syntax than nested foreach statements to overwrite the initial list with items from the second list. In the code below: I want to overwrite …
|
Can you answer these questions?
|
This provides custom classes to work with Outlook 2016’s email security settings in trust center. Included are some top level functions to list outlook profiles, retrieve the data from a given profile,…
|
I followed this algorithm to find strongly connected graph components in C and this code works (I think … maybe there are bugs I am not aware of). I am wondering can I please get some feedback? …
|
After inspecting fzf/shell/key-bindings.bash I came up with the following, to be put in my ~/.bashrc: …
|