« first day (2398 days earlier)      last day (1917 days later) » 

00:00
RELOAD! There are 6287 unanswered questions (90.0544% answered)
00:33
I must point out, but don't ever do this: globals()["list%d"%n] = [], don't use dynamic variables. Use a container, like a list or a dict. Anyway, this might be a better fit for Code Reviewjuanpa.arrivillaga 57 secs ago
00:45
@ juanpa.arrivillaga Fair enough -- appreciate the comment and suggestion for Code Review — Margaret Gruca 40 secs ago
01:23
0
Q: Translator method failing to translate two words

S.FawSorry if this has been answered to death—I'm working on a pig latin translator for Odin Project. The code below works fine for individual words, but when it receives two words ("eat pie"), the output is nil. Please let me know if I've left out any details. Thanks in advance for any suggestions. ...

01:39
0
Q: Perl6 is now known as Raku

Hollihttps://news.ycombinator.com/item?id=21251666 The perl6-Tag should be renamed to "raku", existing postings should be re-tagged. SO did this allready. Thanks

0
Q: Raku and the Knapsack

HolliThe following is a solution to the knapsack problem and supposed to be my entry to this weeks perl challenge. I wonder if this is a good use of dynamic variables or is it too confusing? I use them so I don't have to put the variables $n, @things and @result in all the signatures of the multi-s...

0
Q: Merging rectangles

nz_21I am looking at some code that merges boxes: #include <stdio.h> #include "opencv2/objdetect/objdetect.hpp" #include "opencv2/opencv.hpp" #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <fstream> #include <...

02:05
A better place to post this would be codereview. — Frontear 41 secs ago
Peer review questions belong on Code Review, which was created for that specific purpose. — Ken White 35 secs ago
I'm voting to close this question as off-topic because it is asking for peer review of working code, which would make it more suitable for Code Review instead. — Ken White 43 secs ago
02:46
0
Q: C++ linked list inheriting from node class

DevInThenRough     Hello,     I am currently in between semesters at school and am using that time to improve on my knowledge of C++ classes by making a node class and a linked list class that inherits from the node class. There is a list of areas in need of improvement at the start of the code, but I was al...

03:27
0
Q: Scheduling threads to run at a particular time

farnasirimI was wondering if you could please comment on code quality, correct usage of c++17 constructs, stl/c++ compliant api, performance, or anything else that you might find relevant. Also do you think that this class should be move assignable/constructible? What would be a good approach to go about ...

I recommend deleting this question now that you've posted on Code Review. No point to it existing on both sites. — user4581301 just now
03:48
0
Q: Comments and recommendations on a python aiohttp request code

JOHN The code below will scrap data from APIs. It uses aiohttp to be async, and tor to rotate IPs as well as user-agent rotation. I learnt Python by myself. I am wondering if the code can be further improved. import time import math import json from bson import json_util #for import into mongodb fr...

04:11
0
Q: Using Data.Array to solve Sierpinski in Haskell

dhuHere is an earlier attempt to solve the original problem: Solving Sierpinski Triangle in Haskell I was never satisfied with my solution and found it was awkward and twisty. Here is another attempt to solve the same problem using Data.Array and I found that by using mutable arrays the solution be...

05:02
Monking
05:25
Monking
06:06
You may visit codereview.stackexchange.com if there is no bug/error/malfunction etc — vahdet 39 secs ago
 
1 hour later…
07:35
Possibly helpful: Working with Arrays in Swift on Code Review. — Martin R 50 secs ago
08:02
In addition to kaya3's comment: see also codereview.stackexchange.com . — 0 0 55 secs ago
 
1 hour later…
09:23
0
Q: Playframework Java application, saving User details into couchbase db. Want feedback on DAO implementation

Kulwant SinghI am creating back-end for a web-application in Play framework with Java, using Couchbase for storage. Below class is saving and fetching User details from couchbase. My questions are: Will my DAO implementation work for high volume traffic? thousands of users saving and fetching User details s...

09:44
Also check the [Code Review SE site](codereview.stackexchange.com/tour), but note their hard requirement that the code must be working. — Some programmer dude 5 secs ago
10:01
0
Q: Parsing opening hours, discarding insane ones (part of the OpenStreetMap editor)

Mateusz KoniecznyThis code is used to check opening hours data from OpenStreetMap can be handled by an editor app. In case where opening hours is not too complex data is also turned into an usable form. It is a part of a StreetComplete editor app. This specific file will be part of pull request that will add abi...

10:47
0
Q: How can I Nest loop for fetching XML child nodes with each html <select> options?

beginner_codesI've created two html Select elements with data options connecting each other, How do I give a Nested loop for appending child Nodes from xml for each select option. Here bydefault its fetching the first child from xml and shows it again each time we click it. var song = document.getElementsByTa...

11:08
0
Q: 8bit Microcontroller Modbus Implementation Code

 ZékányHello guys! I have a little project. I'am using ESP32 with some component on it, eth, rtc module , etc.. And i left out from pins. I want to use some I/O Expander but this project is in my house and i want the expanders to be able to go like 15-20 meters from the esp. I2C is not good because wit...

@CaptainObvious That may be a problem.
11:48
Might be better suited for Code Review which handles things such as efficiency and performance. — Bram Vanroy 33 secs ago
12:02
@Mast You think there's not enough there?
@pacmaninbw I think OP doesn't have the foggiest whether it works or not.
Now, Modbus isn't terribly complicated, but if it doesn't work yet, it's not ready for review.
There is no main(), it can't currently run.
1
Q: Merge sort implementation in python 3

Brijesh KalkaniI have implemented a Merge sort in Python 3, and it works well. If anything needs to be improved, I would appreciate the criticism. def merge_sort(nums): if len(nums) == 1: return middle_index = len(nums) // 2 left_half = nums[:middle_inde...

12:37
@pacmaninbw It's a library of sorts without usage example, so that's expected.
While I don't particularly like questions without usage example, they are not necessarily off-topic.
True. Part of what I don't like about the question are the last two functions that have macros in place of their specifications, I don't see the definition of the macro in the code.
@Mast ^^
12:52
0
Q: Creating an affinity-matrix between protein and RNA sequences

KaPy3141I wrote an algorithm that analyzes protein-RNA interactions and I found that the following function is the bottleneck that causes performance issues: import numpy as np #len(protein_sequence)~500, len(rna_sequence)~1500 def affinity_matrix(protein_sequence, rna_sequence): python_matrix = ...

@pacmaninbw I got a notification from JetBrains that they closed the issue about the toolbox not supporting changing the install folder, but it turns out they just marked it as a duplicate: youtrack.jetbrains.com/issue/TBX-3722
13:33
0
Q: Sharing an object amongst several classes in C#

MSOACCI have a class that creates an object, PlannedYear, and then passes that object into several other classes to manipulate it. The ultimate goal of the class is to manipulate and add items to this PlannedYear object. I have, however, ended up going down a rabbit hole whereby I am updating the same...

0
Q: Linked list: removing first element (Java)

OverLordGoldDragonSuppose below implementation: public class LinkedList { private class Node { private int value; private Node next; public Node(int value) { this.value = value; } } private Node first; private Node last; public void removeFirst() {...

0
Q: Debian-Apache-MySQL-PHP-HTTPS version-agnostic environment bootstrapper

JohnDoeaThe following program is comprised of three files and is aimed to be used as a Debian-Apache-MySQL-PHP-HTTPS version-agnostic environment bootstrapper. It is aimed to be used on raw Debian systems (anything that doesn't come with the OS wasn't installed) and to establish web domain associated we...

14:16
For reviews on your code you might want to look at codereview.stackexchange.comGPhilo 23 secs ago
well, for starters, you should post code-for-review here: codereview.stackexchange.comsleepToken 35 secs ago
I'm voting to close this question as off-topic because working code should be discussed on codereview Q&A site. — dasblinkenlight 58 secs ago
14:35
@CaptainObvious One more VTC
0
Q: Django Unified Method for Deleting Instances of Any Model

creyDThis code works, but I don't know if there are better and especially safer ways to do this. For context: this is a Django view (Python) and I wanted to unify the deletion methods because there were many of them. def delete(request, class_name, object_ID): obj = get_object_or_404(eval(class_...

15:17
0
Q: VGG19 codes from a CNN model

Kenjie Thio-achiya so i just followed some codes on how to make a CNN and i read some things about VGG16 and VGG19 and can anyone check my code if it is right? i dont have any errors i just wanna know if i did it right cause i just manhandled this code like idk anything i just wanted to make it work model = S...

@n.'pronouns'm. if it produced the correct result then it was working. OP is seeking to improve its performance, which is what Code Review is suitable for. — Weather Vane 50 secs ago
If you don't want to "mash it all together", you can have the Controller methods call other Controller methods, but I actually think that's worse practice than the other approach I suggested. But again, that's open to opinion. At this point, it might be better to open this question again on codereview.stackexchange.com; that's the place for asking for alternate approaches/best practices/etc regarding existing functional code. — Tim Lewis 20 secs ago
15:50
possible answer invalidation by OverLordGoldDragon on question by OverLordGoldDragon: codereview.stackexchange.com/posts/233065/revisions
16:41
posted on November 27, 2019 by user3742929

I have the following arrays which save the MAC-adresses of a lot of bluetooth beacons and their positions in a building: private static final String[][] MAC_ADDRESSES_A_BLUETOOTH = {{"B09122F5D126", "210.105"}, {"B09122F5F26B", "136.121"}, {"B09122F5F619", "181.172"}}; ... private static final String[][] MAC_ADDRESSES_Q_BLUETOOTH = {{"B09122F5D124", "210.105"}, {"B0

17:01
-1
Q: Is code rev not my thing?

JohnI'm new to review code. Just started today, I am reviewing Javascript code and having issues with understanding few things. Sometimes I also can't keep track of functions because one functions call another and it calls another can this just keeps happening and I can't keep track from which functi...

17:14
MOnking
17:43
-1
Q: Python itertools groupby and aggregate

Sincole BransI am trying to group on a column based on the sequence it appears and simultaneously finding aggregate (mean) on the other variables within the small group. I can successfully group it but the aggregation keeps failing and I need help with that part Here is my sample input: Date T/F X1 1...

so I guess this is chain of repsonsibility - en.wikipedia.org/wiki/Chain-of-responsibility_patte - but honestly - this code looks fine. If I did a code review where someone made this more complicated I would make them re-write it. — Hogan 35 secs ago
18:04
0
Q: Find pair of adjacent prime numbers in two-dimensional array quicker than this?

Darek MajcherczykDoes anybody know how to find pair of adjacent prime numbers in two-dimensional array, quicker than this? I'm talking especially about this part which looks for adjacent numbers not about function finding prime numbers or anything else in the code. for(w=0; w<5; w++){ for(k=0; k<5; k++){ if(is_...

18:15
Finally, consider Code ReviewPrune 53 secs ago
18:27
If a notice is posted on here about my Z80 question, I was just making the example more portable -- it doesn't affect any of the existing answers.
possible answer invalidation by JL2210 on question by JL2210: codereview.stackexchange.com/posts/232962/revisions
19:25
 
2 hours later…
21:32
0
Q: Recursive Mergesort using goroutines

c4llmeco4chWhen learning a new language, one of my first tasks I like to go through is writing a few different sorting algorithms in that language to help familiarize myself with the syntax and see if there are creative ways that algorithm can be conceived in the language. In Go, I wanted to use this as a...

Have you tried looking at questions about the same thing in other languages like stackoverflow.com/questions/39062111/… or codereview.stackexchange.com/questions/150518/… ? The language may not be the same, but the algorithm has a high chance of being the same. — Seblor 1 min ago
sounds like this might be better suited for code review — aws_apprentice 10 secs ago
22:10
possible answer invalidation by Anve on question by Anve: codereview.stackexchange.com/posts/232914/revisions
22:34
I don't think this question is overly broad, but it might be better suited to codereview.stackexchange.comDaniel Haley 20 secs ago
@Duga rolled back
22:56
0
Q: find indices of 2 numbers in array that sums up to an number

calvin barI would like someone to review my code on find indices of 2 numbers in array that sums up to an number. Following is the code that I have tried and it works. The real issue in the code is I am doing Map.lookup twice. Is there a way to avoid it. Input [1,2,3,4,5] 5 Output [2,1] Input [1,2,3,4,...

23:17
0
Q: XML, .dtd help to make sure it is correct

MichealI want to make sure that I am writing the code correctly and fully understand what is needed. My biggest concern is what tags to use, (? * | ect.) 2.The element feed 2.1.The element feed starts with a required source element. Must appear exactly once. This is source of the feed 2.2.The element f...

23:58
0
Q: Program on Java to calculate the cost of the carpet as well as fitting cost.. please read below

SelenaI am trying to write a method calculateCarpetCost() that takes two int arguments representing the width and the length in metres of the carpet to be purchased and returns the cost of the career as a double. it needs to first calculate the area of the carpet then multiply this by price. I am strug...

0
Q: XML, .dtd help to make sure it is correct 5-7

MichealI want to make sure that I am writing the code correctly and fully understand what is needed. My biggest concern is what tags to use, (? * | ect.) The element stories 5.1. The element stories contains 0 or more story elements. The element story 6.1. The element story has an enumerated at...


« first day (2398 days earlier)      last day (1917 days later) »