« first day (2184 days earlier)      last day (1834 days later) » 

12:00 AM
RELOAD! There are 6015 unanswered questions (89.8442% answered)
 
0
Q: INI File configuration handler

7hskand have a nice day! I am currently working on a game, and I get the configuration in an .ini file, and I get information with this library https://github.com/benhoyt/inih I would like to improve the readability / performance of this code. So I do not know much about good practices.. include ...

 
12:23 AM
0
Q: Reading a text file that may have embedded nulls

Neil EdelmanI've always used fgets to read a file. However, I want to read a file that may have embedded \0. I thought of using ftell to query the size, but it doesn't seem to work on all files. I've got a test file, 31 32 33 00 34 35 36 0A E2 82 AC 0D 0A 61 Here is my fgets. #include <stdlib.h> /* EXIT...

 
 
3 hours later…
2:59 AM
-1
Q: Concatenate two binary values in MIPS

thea9870I'm really new to MIPS and I have been struggling to concatenate two binary values. Suppose the two registers $t0 = 11 and $t1 = 101. How do I get the concatenated result to the register $t3 such that $t3 = 11101. Please clarify the issue. Thanks in advance!

 
3:39 AM
0
Q: How to combine template method and filtering without predefining how many filters will be added?

KubiK888I have an initial pool of subjects, then I need to apply a set of general criteria to retain a smaller subset (SS1) of subjects. Then I need to divide this smaller subset (SS1) into yet finer subsets (SS1-A, SS1-B and the rest). A specific set of criteria will be applied to SS1 to obtain the SS1-...

 
 
1 hour later…
4:39 AM
0
Q: LRU cache implementation in O(1) space

Mosbius8Here is my code. public class LRUCache { LinkedList<Integer> keyArrayQueue; HashMap<Integer, Integer> map = new HashMap<>(); int currentIndex = 0; int capacity; public LRUCache(int capacity) { this.keyArrayQueue = new LinkedList<>(); this.capacity = capacity...

0
Q: (Ruby version) Rotate linked list to the right by k places

sPaGhEtTiCaSeI saw this question (javascript - rotate linked list to the right by k places) the other day and I tried implementing it in Ruby in a totally different way. Here's the code (I also created a REPL if you want to test it - https://repl.it/repls/PrimeSomeBlock): node.rb class Node attr_accessor ...

 
 
2 hours later…
6:16 AM
0
Q: Python script to download adult comics from 8muses

N_H1922I made a simple python script using the BeautifulSoup and Selenium to automatically download adult comics from 8muses. I've used selenium for the reason that the website uses javascript to load the images. Enter the the gallery url and download location to start downloading. Sample gallery ur...

 
6:32 AM
I know I'm asking too much now and I really appreciate your help but I need to since I'm a self-taught and no one would do code review for me. So what if in access_jobs, user type SMT, SMT and I don't want repeating of jobs. What would be the best solution for that? — DecentTaro 17 secs ago
 
 
1 hour later…
7:54 AM
-1
Q: Runtime Error with specific input - Johnson's algorithm for scheduling

Loc TruongTwo twins, James Johnson and Jonathan Johnson, work at a factory which produces bicycles. Their job is probably the most important one: James attaches the front wheel, and Jonathan does the same with the rear wheel. At the beginning of their working day, they receive construction kits, consisting...

 
 
1 hour later…
9:11 AM
I'm voting to close this question as off-topic because it’s a request for a code review and should be posted to the code review site — Clive 58 secs ago
 
10:10 AM
0
Q: Worker pool implementation

FanciestBananaWith the new additions in c++11 and c++17 I wanted to create a simple implementation of thread pool. I would like your opinion on: Thread safety API performace and general code quality I also would like to know if it good idea to have wait_until_empty method. Without id I probably could h...

 
 
2 hours later…
12:09 PM
I'm voting to close this question as off-topic because this topic belongs on Code ReviewDharman 56 secs ago
Are you looking for Code Review ? — mickmackusa 59 secs ago
possible answer invalidation by Gabriele on question by Gabriele: codereview.stackexchange.com/posts/217630/revisions
 
Monking
 
12:26 PM
0
Q: Converting between cooking measurements

Jeroen VannevelI've made an Android app that converts between cooking measurements, taking into account the type of product you use (that way it can convert between mass and volume by using the density). What are your thoughts on Android- and Kotlin-specific idioms I might be missing? For brevity's sake, I've ...

0
Q: Web Api2 Controller is it valid having two posts

David BuckleyI am using web api 2 and was wondering is it valid to have two post methods such as the orignal put command and also the put command if not how should one handle various updates of different fields. I am working on a web api, I was just wondering is it valid to have to put methods in the web con...

 
1:05 PM
-1
Q: Why does my Spritesheet Animation code produce a hickup when going from last to first frame?

Sparda Dante3085As seen in this Gif: https://giphy.com/gifs/J3AksGkGlrmNwCWx0W, the Animation has a hickup when going from last to first frame. I am not shure what causes this. The code is supposed to display the next frame of the Animation when a certain amount of time has passed. If the last frame has been s...

 
2:04 PM
0
Q: Interestingly long time-taking in maximum location search in an array of array

MoreblueBackgrounds I'm writing a code that searches for the maximum index, starting from the input row index idx through the final row, and changes the input into the maximum index. (This is my own version of subroutine for Gaussian Elimination with Partial Pivoting, for those who are interested). For...

 
2:22 PM
@SᴀᴍOnᴇᴌᴀ This should be rejected, FYI.
 
0
Q: Project Euler P76

Reignimport time start = time.perf_counter() def con(H): J = [] Q = [] W = [] for i in H: for j in range(len(i)-1): Cop = i[::] y = i[j]+i[j+1] del Cop[j:j+2] Cop.insert(j,y) J.append(Cop) for i in J: y =(...

-1
Q: Longest Carbon Chain / Path, Final Hurdle To Complete

mobo pogrid = [[0,1,1,1], [0,0,1,0], [0,0,1,0]] lst = [] for rows, row in enumerate(grid) : for cols, col in enumerate(row) : if grid[rows][cols] in [1] : lst.append((rows, cols)) print (lst) # lst at this point = [(0, 1), (0, 2), (0, 3), (1, 2), (2, 2)] How...

0
Q: Find no of island Leetcode

Mosbius8Here is the question Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. Example...

 
2:43 PM
0
Q: (Lisp in (Rust))

Stepan ParunashviliI loved Norvig's Lispy, and made the first version of it in Rust. I would love your thoughts :) Two main questions: Is there a way to write ensure_tonicity without a macro? I tried, but was having trouble typing it If you were to continue on and allow define, which would set a RispExp in Risp...

 
 
1 hour later…
4:01 PM
0
Q: Finding largest number we can make

tarit goswamiThe problem is from yesterday's contest from Codeforces. Here is the link: https://codeforces.com/contest/1157/problem/B I have observed that, from the left side(i.e;MSB), for every digit, if we replace the given number with the output of f when after passing the digit - we get a bigger number w...

 
4:38 PM
Maybe better site for your question would be codereview.stackexchange.com, but you would probably need to provide also code for each diagram you created. — Pshemo 45 secs ago
 
4:53 PM
 
5:19 PM
0
Q: chrome on page load play sound

Lemon KaziI am trying to add audio on load notification on chrome. My Js code below. it's working fine on firefox but sometimes on chrome it's not running So I need code review am I doing any mistake? audio_notice = new Audio('http://www.sousound.com/music/healing/healing_01.mp3'); audio_notice.a...

0
Q: Cohort analysis in SQL

CauderI put this together as part of a practice exercise. This is the table schema. customer_id | order_date | price | order_id int date text int This is the database with the full data. It's all fabricated data. And here is a sample of the data. custo...

0
Q: Manage puppeteer memory

sfarzosoI made a web scraping application which use Puppeteer, the application run 24h and can easily reach one million pages per day. I've created a class called NetworkHelper which open a new browser for each request, and this could be the cause of the problems that I'm facing. In my linux environmen...

 
5:39 PM
0
Q: Multithreaded OpenGL Rendering Pipeline

van denchI've decided to move my rendering code to a separate thread, to help facilitate the move I've created a pipeline system for rendering. With this pipeline I can insert commands into a queue which will be processed later on the rendering thread. Thus far the code has proven to work well, but I woul...

0
Q: Took me 5 hours to build a simple responsive navigation with a little bit of flexbox

rfdesignsI looked up a bunch of snippets and probably all of them had their stuff(logo, hamburger icon, and the nav itself) in the <nav> tag which I find weird, because why would you wrap your nav in your header and then put everything in your nav? So it took me ages to figure out how to get it 'proper...

 
5:59 PM
0
Q: Converting IActionResult to something that can be mapped in JS

okThenI have the following ReactJS unordered list which is generated from answers: <ul className="mt-2 col-md-12">{this.state.answers.map((v,i) => <li className="list-group-item" style={{"width": "220px"}} key={i}> {v} </li>) } </ul> I get answers the following way: handleSubmit(event) { ...

 
6:18 PM
1
Q: C# Binary search tree

Urban KravosI implemented binary search tree. What do you think about my code? How could i optimize it? Where are my major mistakes? I am not asking only about BST but about my coding style in general, using of classes, methods, naming... using System; using System.Collections.Generic; /// <summary> /// My ...

 
 
2 hours later…
7:55 PM
I never updated my scripts. I originally did this with vba: codereview.stackexchange.com/questions/185292/…QHarr 38 secs ago
You may get more help at Code ReviewGiraffeMan91 just now
 
8:15 PM
-4
Q: Is it possible to templetize this?

overflowI have to call many times C functions from a library, which I am pretending to write a wrapper for it in C++. In these C functions the last two parameters are always the same, something like this, here I use zeros to indicate the same values: result1 = cfunc1(param1, param2, 0, 0); result2 = cfu...

 
9:14 PM
-2
Q: A little help please c++

Anonymus#include <iostream> #include <algorithm> #include <database> using namespace std; int main() { return 0; } I want to create a program that Checks if an email and password in this structure email:password is part of a webpage, so to verify if that account is registered there or not. Please help...

 
The scope of the question dictates that the input strings are consistently YYYYMMDD and valid date representations. For this reason, strtotime() is a predictable and consistent solution to the problem. As for my opinion on development, I call strtotime() when it avoids the overhead of instantiating a DateTime object (a principle that I do implement in my career). If you can break my solution with valid YYYYMMDD date representation, I'm happy to remove my answer. I have been helping people for years and I do CodeReviews too. I am here to help people. — mickmackusa 51 secs ago
 
9:34 PM
-1
Q: Best Practice for initialization logic during constructor

Kevin StreicherThere are many different ways to initialize objects which require logic during construction, and while I do have an opinion on the pros and cons of each of those, I would like to gather other experienced views on those. Problem The general problem is a class A which require any logic during the...

 
 
2 hours later…
11:11 PM
0
Q: Game that fights random enemy. basis for bigger game

user11413320 This program is the basis for a bigger game i'm working on. I want to make sure i did this correctly before moving on. Please give pointers to anything i can improve. I'm learning on my own, so i doubt my structure is the best it can be. Thanks for giving me some of your time. import ran...

0
Q: Custom Security for API access from server to mobile application

Im a Developeri am not the best at security but need a custom way to securely store personal identifiable information like name, address etc - Can i please have some feedback on this custom code, from my perspective it looks okay but with security not being my strong point i don't trust myself. The data is pa...

 

« first day (2184 days earlier)      last day (1834 days later) »