« first day (3506 days earlier)      last day (504 days later) » 

12:07 AM
REFRESH! There are 7615 unanswered questions (90.0317 answered)
 
12:33 AM
0
Q: Why wont the item variables work in this code?

travise grinnellThis is a text based game I am working on. The movement around the map works perfect. The end conditional works as it should. When I try to add in the items python will not accept the new variables I am attempting to utilize and I cant understand why. This is the code I am having issues with: # H...

 
1:09 AM
I do have a much simpler solution if you post this on CodeReview. I see you store city names in a Set. Try just outputting the size of the Set rather than converting it to an array and doing stuff based on indexes. — Michael Ruth 20 secs ago
 
1:49 AM
0
Q: Validator for basic XML format

ProgrammingLlamaI recently completed this task for a job application, which I seemingly failed. I'm trying to understand what I could have done better with this code. The spec was as follows: Method name: bool DetermineXml(string xml) A string is a valid XML string if it satisfies the following two rules: Each...

 
2:39 AM
1
Q: Python code to add GeoIP data to a Suricata eve.json log

Devilish SpiritsI wrote this script as part of a Suricata course where I had to annotate destination IP addresses with GeoIP data in an EVE JSON log file. I would like your input on my code style and smell, especially the gen_geoip() function - it takes an IP address and return a "geoip" JSON object. It is very ...

 
3:30 AM
0
Q: Password cracker

YvermaI am trying to make a Brute force script for Instagram using a password file full of passwords. I'm making this not for malicious intent but to learn since I want to go into Cybersecurity. When I run the script using my Instagram account to test it out, the "correct password" output is incorrect,...

 
 
2 hours later…
5:53 AM
Monking
 
6:44 AM
You can miss a lot of things, but your words won't help anyone understand what you wrote and how likely you made a certain mistake. Again, this is more like a code review request, which I don't think belong to Stack Overflow. — Lex Li 22 secs ago
 
7:18 AM
0
Q: Asynchronously building a service container in TypeScript

slepictest/compiler.spec.ts import { newCompiler } from '../src/compiler' test('new compiler compiles empty object', async () => { const compiler = newCompiler() const app: {} = await compiler.compile() expect(app).toEqual({}) }) test('compiling single sync extension resolves to whateve...

 
 
3 hours later…
10:38 AM
Maybe Code Review Stack Exchange is a better place for this? — pmacfarlane 57 secs ago
 
0
Q: Thread Pool Class

riokiI have a thread_pool class, that mimics std::thread. (I would have liked std to have a pool, but alas that is not the case.) thread_pool.h #ifndef _C9Y_THREAD_POOL_H_ #define _C9Y_THREAD_POOL_H_ #include <functional> #include <thread> #include <vector> #include "defines.h" namespace c9y { ...

 
Questions about optimizing running code is better asked at Code ReviewJens 10 secs ago
 
11:06 AM
0
Q: Could someone explain how to write this code properly without the use of unnecessary SCAN.nextLine()s as the code is not working properly?

SpecialistSteakWhile writing a program to make a simple taskboard tool in Java, I was wondering if anybody knew of a simple way to make it so that I didn't have to use nextLine() so much, as it has made it so that the program does not run properly. (sometimes you have to press enter before it accepts a value, a...

 
11:31 AM
0
Q: Most effective search algorithm for guessing list of strings via function returning bool if substring is in list using Python

n0kI trying to figure out the most effective way to accomplish this task: A function, check(), contains a list of strings. Calling the function with a string as argument, will return True if the argument string is part of any of the strings in the list. False if not. I want to guess the content of t...

 
11:56 AM
0
Q: A simple EventHandler in C#

AxekanThis is an EventHandler I use in a Blazor application to add listeners and trigger events. It's also accessible through JSInterop since the app is implemented in both JS and C#. This class exists in a static class available everywhere, so that components can subscribe to events and interact with ...

 
 
1 hour later…
1:12 PM
1
Q: Changing file encoding, removing mid-line LF, and converting DOS CR-LF to Unix LF

rxFt20We have several thousand large (10M<lines) text files produced by a windows machine. We need to change the file encoding of these files from cp1252 to utf-8, replace any bare Unix LF sequences (i.e. \n) with spaces, then replace the DOS line end sequences ("CR-LF", i.e \r\n) with Unix line end se...

 
Since you already have working code and are seeking ways to improve it, this question might be better suited for codereview. But note that CR has slightly different rules from SO, so be sure to read A guide to Code Review for Stack Overflow users before posting there. — Jmb 29 secs ago
 
1:37 PM
0
Q: PHP Bootstrap Autoloader

NvrKillI wrote an PHP Autoloader to include it "easyer" to my projects. Here the folder structure: www ├───index.php ├───init.php └───Libarys └───bootstrap ├───index.php ├───bootstrap_loader.php └───bootstrap_core_files (Files and Directories (Abbreviated so it doesn't get to...

 
 
1 hour later…
2:39 PM
posted on December 09, 2022 by CommitStrip

 
 
2 hours later…
4:09 PM
0
Q: Simple blackjack program in Python

H. WalkerI created this blackjack program which I'm looking for feedback, both with the code and how the program itself works. I'm also looking to see if my code could be faster or cleaner before I compile it using Cython. I've used three files: main.py, class_handler.py and account_handler.py. For clarit...

0
Q: Simple N Puzzle console game

DarkeI am completely new to object oriented programing (OOP). I have also never worked with C# before. The exercise from my book had some requirements that should be followed to complete the exercise. Use of at least two classes (not counting the main class), one of which should be a Tile class, repr...

 
Monking
 
0
Q: C++: alias for a class method

NDCI was wondering if you could help with the following query. I am writing char/wchar_t and string/wstring agnostic code in C++, and in the process I came across the need to come up with one such function for the string()/wstring() methods of the std::filesystem::path class So far, I have had to pl...

0
Q: How can I condense my code in node.js for sorting unique values within an array?

doroshmKattis problem - ("I've been everywhere") I would highly recommend looking at the problem through the link, however I will summarize it a bit here and explain the functionality of each part of my horrendous code. Example input: 2 7 saskatoon toronto winnipeg toronto vancouver saskatoon toronto 3 ...

 
Monking
 
Can anyone tell if this code works as intended? I asked the OP and they replied, though it isn't very clear cut, at least in terms of whether it works as intended
@SᴀᴍOnᴇᴌᴀ For the take10 list and the code following it within the foreach block, it will pull data but I'm hoping to get confirmation that this will work in place of recursion. — villasenorbritt 3 hours ago
 
 
1 hour later…
5:45 PM
@SᴀᴍOnᴇᴌᴀ Can't tell if it works or not, it doesn't compile for me. else; in the foreach loop is bad news too. It does compile but it shouldn't be there. There is a section of commented out code that shouldn't be there.
 
0
Q: <html>The first image will be shifted to the left, reversed, and inserted into the last image in the stack

user267787How to do :The first image will be shifted to the left, reversed, and inserted into the last image in the stack. I try with transform in css,but only run with move not rotate and insert to bottom. function change() { event.srcElement.style.transform = "translate(-200px,0px)"; event....

 
@SᴀᴍOnᴇᴌᴀ Missing review context, I added a comment to the post, down voted and VTC.
@Mast ^^
 
@pacmaninbw it appears there maybe should have been a backtick before SummaryDataItem in your comment?
 
Fixed it
 
right on
@CaptainObvious there's a phrase I don't believe I've encountered before:
> So far, I have had to plump for the nuclear option
 
6:04 PM
@SᴀᴍOnᴇᴌᴀ I don't see that in the question, there are 2 VTC, feel free to provide the final nail. See my comment on the answer.
 
@pacmaninbw why is it CNWAI ? isn't it MRC?
 
Not MRC, definitely enough info to answer if it was on SO. Code isn't working the way the poster wants, feature request.
 
6:31 PM
@pacmaninbw would you mind adding a comment on the question?
 
@SᴀᴍOnᴇᴌᴀ There already is one.
 
The name should indicate what the code does, not the method it is using, an example might be Log slicer thickness control. It is too hard to review at the moment since other necessary classes are missing such as mConsole, ThicknessContext and SummaryDataItem. Code that is commented out indicates that the code is currently not ready for review. Why is there a dangling else; in the foreach loop. — pacmaninbw 44 mins ago
 
0
Q: I have refined my Maybe type in Python to be more ergonomic by adding extra functionality

schuelermineI have decided on a preferred solution to my question A maybe type in Python. Which implementation is best?, and have expanded it to be more ergonomic. I have implemented a host of utility functions (largely borrowed combinators from Haskell) and I have implemented all dunder methods I feel can b...

0
Q: Inserting Rows after Contiguous Set of Integers - Excel VBA

Brandon MurrayI have a repetitive data reduction where I have a list of ID's that I want to find in a longer list. I have a method, but it is slower than I'd like. How can can I speed this up? The process: After each contiguous section of ID's I want to insert a blank row (I'll do other things with the blank r...

 
 
1 hour later…
8:00 PM
Monking
 
8:17 PM
I think you probably want Code Review. — SiKing 31 secs ago
Does look like a reasonable Code Review candidate, but make sure you read through Code Review's Help Center section on Asking Questions and to help make sure you're framing the question effectively and meeting all of the expectations. — user4581301 12 secs ago
 
@SᴀᴍOnᴇᴌᴀ It was closed by 2 other C/C++ experts (Edward was one) none of felt it needed a comment. I'll think about it.
@SᴀᴍOnᴇᴌᴀ Commented.
@SᴀᴍOnᴇᴌᴀ In C++ using an old style C language macro is almost never the correct way to do things. I guess that is plump the nuclear option.
The answer is actually decent.
 
8:45 PM
In C++20, the only valid answer to "How do I macro" is "Don't".
Don't macro, don't pragma.
Include guards can get an exception.
@TobySpeight And when hot outside, it's nice and cool underground. There really is no good reason not to go underground :-)
 
0
Q: Slowness in the process that must loop through all the lines of a DataFrame

Digital FarmerAt each line I need to analyze whether the sum of the previous lines that have the same filters as the current one are above zero or not. So I need to go line by line. The problem is that I want to parse all possible combinations of filters, but in a CSV like my complete one that has 48K lines, t...

 
9:21 PM
0
Q: how do i make my code figure out if two numbers are a factor of each other

thekidwhoneedananswertotheirquSo i need a code or just the code i need that figures out if two numbers are factors of eachother print("Hi") print("Hi") print("Hi")

0
Q: Optimizing double loop with branches, openmp apparently doesn't work

Ja_cppI'm trying to optimize algorithm 1 in my following code. First double loop, I calculate points beforehand which will run only once. Then I have the first version of algorithm 1 which is another double loop with many branches. After that, I presented the optimized version which runs two times fast...

 
9:47 PM
0
Q: Node graph implementation for a material system

EdzijuI'm working on a material/shader graph system. I came up with a simple solution, but nodes that weren't connected were used in some situations. So, I thought of using Kahn's algorithm to execute nodes' tasks. I'm not quite sure if it's a proper implementation. I've only played with it, so it's a ...

 
10:08 PM
@pacmaninbw yes - good deal
 
If your code works and you just want a code review, it's better to ask this question on Code Review than on StackOverflow — Rabbid76 32 secs ago
 

« first day (3506 days earlier)      last day (504 days later) »