« first day (2352 days earlier)      last day (1655 days later) » 

12:00 AM
RELOAD! There are 6183 unanswered questions (90.0955% answered)
 
12:15 AM
It's a new day! Use your votes and stars before they run out!
3
 
12:29 AM
1
Q: Light weight C++ Signals/Slots or Event System

johnb003This assumes there is no need to aggregate results from the listeners of a broadcast signal. Technically I guess the slots are whatever your std::function holds, so they aren't special. So I guess this is more of a Signals/Connections design. The "connection" or Signal::Listener is the owner of...

 
 
2 hours later…
2:30 AM
Pretty sure this belongs on codereview.stackexchange.comHerohtar 24 secs ago
Hey @user3002473, thanks for accepting my answer, but as some fellow commenters have pointed out, it is in fact quite broken. I implemented a 'correct' version - or so I believe. Still, I have concerns about its performance and memory usage - do I have your blessing to post it to Code Review SE? I'll link to your question and identify you as original author of course. — Marc.2377 7 secs ago
 
3:11 AM
0
Q: Verifying Mathematical Expressions

sg7610This is a part of my calculator program. I have to check if the input entered by the user is a valid mathematical expression. The first check is performed by another program, where the program checks if the numbers and symbols are valid and it converts the string into tokens for further verificat...

 
3:31 AM
0
Q: My code seems to work fine until i started to input a string on my x coordinate and it just kept on looping

GG BroThe program runs totally fine until i decide to input a letter when the program ask for the x and y coordinate and it just keeps on looping forever and i cant seem to know why. If i do input a number when it ask for the x and y coordinate the programs runs fine #include <iostream> using namespa...

 
4:27 AM
It would be easier to answer your question if you explained what your code does. Also, this question is most likely a better fit for Code Review. — Alexander Zhang 45 secs ago
 
0
Q: Is this a good random password generator?

CyborgBetai wrote the following password generator, to generate a password in which each character group appears at least at once, good practices? import java.security.SecureRandom; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class PWGen { public static final ...

 
4:54 AM
0
Q: What to hack with Python?

HaaziI have skill with Python, but what should I use my power for? I have a simple password strength tester, but I want it to be faster. I need ideas for more programs. Here is some code: arg = open('password.txt', 'r') d=0 passw = input('What is your password? >> \n') c=1 for line in arg: a = st...

 
 
3 hours later…
8:11 AM
Monking
 
 
1 hour later…
9:18 AM
0
Q: Group items by types: replace nested for loops with reduce

ClarityI have a working code that groups items by their type values. The types can be one or multiple, however they are always returned as an array. To illustrate: if an item has types with values type1 and type2, it should be included in both type1 and type2 properties of the resulting grouped object...

 
 
1 hour later…
10:19 AM
0
Q: Inserting records via ADO.NET in C sharp

AppDeveloperI have the following code snippet and I'm wondering if there's a nicer way to re-write this. The code works, and it also returns generated id, however, I'm also skeptical about the last if statement in my code, kindly review. public int InsertEmployee(string body) { int result = -1; Emp...

 
10:39 AM
-1
Q: Notepad java-swing ( undo redo)

Vu Vuanyone helps me please . I create a notepad program , and anything ok except the Undomanager . I can undo and redo in the current file . But when i use new file , the undo and redo still work , it can back the word of the previous file . I dont know how to make it reset or null when i close the o...

 
11:20 AM
-1
Q: SUITCSS Methodology

user211234I'am trying to understand SUITCSS methodology for writing front end code. I've written this code and want to know if this is good SUITCSS methodology by using class names: <div class="Messages"> <div class="Message Message--danger"> <h4> Incorrect email ad...

 
11:56 AM
8
A: Please don't vent frustration by going against the rules

JamesI have closed the question linked. I appreciate that people are upset and frustrated with what has happened but this isn't constructive. The question isn't all that bad. If it is edited to not be a jab at SE it can be reopened as far as I am concerned. Going back on strike now.

Turns out some of the striking moderators aren't striking 24/7.
 
MOnking
 
@Mast Worldbuilding never cease to amaze me.
 
1:01 PM
0
Q: User defined function call on a stack based interpreter for concatenative language

FoxyI would like to receive some advice on how to improve a small concatenative stack-based interpreter, executing a joy-like programming language. It is really minimal, and is in fact a subset of a larger version that should, a priori, be used as a compilation target. The version I would like to re...

 
1:26 PM
@Mast WOW
 
 
1 hour later…
2:29 PM
Requests for improvements to working code should be posted to codereview.stackexchange.com; be sure to read their posting guidelines first, though. — chepner 32 secs ago
 
2:47 PM
0
Q: Heart beat logic - kubernetes cluster vs HA cluster

overexchangeOne cluster type is HA cluster(like Veritas cluster, Sun cluster, HACMP cluster) that runs heartbeat logic. Another cluster type is Kubernetes cluster which also use heartbeat logic. Is the purpose of heartbeat logic different in these two cluster types?

 
3:06 PM
Check out Code Review on Stack Exchange, it's a better place for conversations about working code. — Étienne Laneville 9 secs ago
 
3:43 PM
0
Q: Categorize & sub categorize from contents of one row and more execute even more queries in results

LetsSeoI have a table called sales and it has below columns: 'id' 'product_type' 'soldDate' 'text' 'product_type' examples are: Tshirt-XL, Tshirt-L, Tshirt-M, Trousers-XL, Trousers-L, Trousers-M etc. I have an array called products which is; $products = array('Tshirt','Trausers'); My output is aft...

0
Q: Target Sum leetcode

nz_21I am trying to solve this problem You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its new symbol. Find out how many ways to assign symbols to make sum of integers ...

 
4:03 PM
0
Q: Prime coins- Segment Tree

Alohomora So this question came up to one of the company interview. I felt it as a straight segment tree question with sieve, and I was able to pass the given sample test cases, but unfortunately not a single test case ran after submitting and moreover I got 4 test cases which showed runtime error. I wou...

0
Q: Flat file column based parser

AlexandreI implemented a Column-based FLAT parser and generator, where the information is loaded from a base class, which contains the attributes that tell the column size and type. For each line of the flat file, a new instance of this class is generated which in turn is loaded with the file line data. ...

 
Kaz
4:14 PM
Finished Mindustry. It was fun, but simplistic. For the price, decent bit of fun. I think I'll go back to Factorio though.
 
4:44 PM
0
Q: Computational verification of Collatz conjecture using OpenCL

DaBlerThis code review request follows my previous request Computational verification of Collatz conjecture. Unlike the previous program (which was designed for the CPU), this code should run on modern GPUs. For this purpose, I chose OpenCL as a programming language. Prerequisites Since the verificat...

 
4:55 PM
@Kaz I'm very annoyed at that game.
I have been playing it for 30 hours so far. It's definitely not as addictive as Factorio. It's also a lot more annoying than Factorio.
There are a few things they do right, and a few things they do wrong:
- It's way too easy to overwrite your belt paths and place a junction/router/belt where you intended to have a router/belt/junction.
- Mining drills, and other buildings, output to everything around them
- Bridge exits, routers and other things also connect to everything around them
- All the above will lead to the wrong item being on the wrong belt, clogging everything up and there is no way to easily wipe a belt that I know of, so you have to remove the entire belt and build it again.
- You have no indication of how much health you, or your drones, have
- You have no indication of how much health enemies have
- You have no indication of what monsters will come in the next wave or that exist in the current wave (the bosses will surprise you, and also various flying enemies)
- Sooner or later enemies will break some of your stuff, it will be annoying for you to built it up. There are no ghost-entities that construction robots rebuilds for you. This is super annoying when a large part of your production belts and buildings are destroyed (It's been a reason for me to quit the game and continue later several times)
- Every single level that you start you will start from scratch and rebuild everything. While this is the same in Factorio, in Factorio you spend more time on the same map
- In the campaign you can unlock way too many things way too quickly so you get confused by all the stuff you can build but haven't tried out yet
- If you right-click one too many times, everything that you planned to build is cancelled.
 
Kaz
5:39 PM
Aye. for me it was just too easy. 1) Start. Set up copper mining for everything within easy reach.
2) Go find where the enemy spawns. Find the nearest copper deposit. Set up mining and build a wall of blocks/basic turrets blocking off the spawner
3) Repeat, but for lead/AA turrets.
All of that takes less than 5 minutes, and keeps the enemies at bay for quite a while.
Finished the campaign in ~30 hours.
For £3, I think it was worth it, and the Dev seems active so hopefully they can build on it the same way the Factorio guys did.
 
If the code is complete and works, it should be on Code Review instead. This site is primarily for fixing broken code. — Carcigenicate 58 secs ago
 
6:02 PM
@Kaz And what then do you use against the big bad flying bosses?
 
Kaz
@SimonForsberg Lots of AA turrets ^^
 
@Kaz You mean those turrets that take lead as ammo?
 
Kaz
Plus in later levels shields, more powerful turrets etc.
 
Yeah I thought so ^^
I'm at later levels now, and have unlocked everything. What's your favorite powerful turrets?
 
0
Q: Fast way to iterate through billions of numbers

Hither JoeI have a data sheet with corrupted IDs and references. I was tasked to create a java program that will take the corrupted references reverse it and compare it to another ID. The references are randomly generated but they all have unique seed which runs from 100M-1B. So, will have to iterate hundr...

 
Kaz
6:05 PM
The long range one that uses silicon as homing bullets.
Had some great results with those.
 
6:21 PM
Was reading from bottom to top... was wondering where you were talking about :D
I'm being fascinated recently by the concept of text-based games on Discord
 
cough Pokecord cough
 
0
Q: Implementing a REST API in Go using gorilla/mux and Gorm

Sasha ShpotaWhile learning Go I decided to implement a simple REST API to get to know the language and since I am inexperienced in Go I would appreciate any feedback on the code. Please post any thoughts you have. They don't have to be constructive, but if you have some constructive feedback that will be gr...

 
6:46 PM
0
Q: Is there a better way to do this i have a working code but i think it could be optimized?

Steven HIs there a better way to achieve this ? Basically I have a list that may contain anagrams. I need to return a list with the anagrams and if there are more than one occurence of that anagram I need only the first occurence. I can achieve the result using above code but I think this could be optimi...

 
6:59 PM
When (s)printf() is insufficiently accurate, could roll a helper function Function to print a double - exactlychux 34 secs ago
 
 
1 hour later…
8:07 PM
0
Q: OpenFile function in C++

Rahul WadhwaniI am in the process of learning basic C++ and one of the practice questions I came across was to write a function to open a file in C++. I did understand how to use the streams but I think I went overboard a little bit by making sure that it works. I would appreciate any feedback on my code. The...

 
8:27 PM
0
Q: Which of these code blocks should I use for max efficiency?

AsadefaI am aware that isalnum() really just returns isalpha(character)||isdigit(character) to see if it is alphanumeric. Is alpha does the same with isupper() and islower(). I wonder if a function which calls a function which calls a function is more efficient or just directly having it all in one stat...

 
8:47 PM
@juanpa.arrivillaga No specific concern. Just not sure if this will come back to bite me later. Thank you for pointing out CodeReview I did not know it existed! — D. Morell 26 secs ago
 
9:13 PM
This question may be a better fit for codereview.stackexchange.comJonasMH 48 secs ago
maybe CodeReview would be better place for your question. — furas 15 secs ago
 
9:28 PM
0
Q: Seekable HTTP response stream wrapper

Nazar554I created this wrapper to use together with HttpClient streams and ZipArchive. ZipArchive reads .zip index once from the end of the archive, so this wrapper caches last 4MiB of the stream. Also the wrapper avoids pointless seeks until the first read. I am interested if there any issues with this...

 
9:57 PM
213
Q: Would a note about preferred pronouns qualify the same way as a "thank you"?

zerkmsI've seen that the community has agreed that "thank you" should be removed from questions: Auto Remove “Thanks in Advance” No Thanks, Damn It! Would (my preferred pronouns are she/her) qualify as the same type of message? Context: Typing an array of instances of React components There has b...

Somebody took a sock-puppet and decided to take the CoC for a test.
Not a smart move, but everyone seems still focussed on the CoC instead of on the troll.
 
10:48 PM
Possibly a better question for code review3NiGMa 17 secs ago
 
11:10 PM
0
Q: Application uniqueness and unilateral IPC on Unix

Hossain AdnanThis program Detects application uniqueness, if the application is a unique/primary instance, it launches a server, otherwise a client over a Unix domain socket. Client will send a message that will trigger the server to invoke a time-heavy task. When the task is running, the server will ignore...

0
Q: creating inverted index and posting lists takes long time

TasmeerI am working on an information retrieval project, where I have to process a ~1.5 GB text data and create a Dictionary (words, document frequency) and posting list (document id, term frequency). According to the professor, it should take around 10-15 minutes. But my code is running for more than 8...

 
11:45 PM
possible answer invalidation by Hither Joe on question by Hither Joe: codereview.stackexchange.com/posts/230610/revisions
 

« first day (2352 days earlier)      last day (1655 days later) »