« first day (3430 days earlier)      last day (572 days later) » 

12:05 AM
REFRESH! There are 8051 unanswered questions (89.4638 answered)
 
 
2 hours later…
2:19 AM
0
Q: How to using custom colormap with pixel calculation, gray scale value by opencv and make it workable on camera

David LinI tried to implement the mcolor colormap in the paper at page 8 to 10. I developed the code to process a image file and it works ok. Now, I want to adopt this image processing method to the camera which is captured by opencv. I implemented it by python and opencv. It looks like that it's not work...

 
3:15 AM
@SᴀᴍOnᴇᴌᴀ Reminds me of Visual Studio 2015 taking a full day to get uninstalled.
 
 
3 hours later…
6:11 AM
0
Q: Tic-Tac-Toe Code

FeraminecartsI'm a beginner in python programming, been doing it for only a few weeks and I decided to make a tic-tac-toe game in the python interpreter. I'm looking for feedback on the program and any way I can improve it and shorten it and point out inefficiencies/errors since I've done everything I can to ...

 
 
2 hours later…
7:55 AM
If this is working code and you want it reviewed, then check out Code Review. — Slaw 12 secs ago
 
8:11 AM
 
 
1 hour later…
9:37 AM
0
Q: Coordinate conversion program using pyqt

Bruno VermeulenAs an exercise in using PyQt, the python switch statement and abstract classes, I made a little app to make conversions between geodetic (WGS84) and PSD93 (Oman) and UTM 40N projections (instead of the ubiquitous calculator). The app has a main window and 3 dialog windows; 4 types of conversions ...

 
 
3 hours later…
12:11 PM
0
Q: Make C++ Task class similiar to C#'s Task

Y.frankI am enjoying making various programs with C++. This is my first code review request. And I hope I can get some insights or might have good advice to make my code better. I make a task class using C++14 standards after having insights of System.Threading.Task class of C#. Although I could not mak...

0
Q: Iterating over JSON more effectively

JoshJohnsonProblem: I need to get data from JSON file containing information about "contributors". Each contributor has an atrribute jobs, which is a list of string-like job positions. The program should print five most popular jobs (in the whole dataset) and assign an attribute top_job to each contributor ...

0
Q: Benchmarking an improved wheel sieve

Ahmed DiabI followed your answers for my last questions (1st 2nd) and I came up with these new versions of my codes but I face some difficulties to measure the efficiency of my code, I use chrono library to determine the run time, and of course it does not give a full description of the efficiency of the c...

 
12:21 PM
Monking
 
 
2 hours later…
2:07 PM
@CaptainObvious MRC
 
2:19 PM
0
Q: Adding multiple images to a html file using Jinja2

NatashaI am trying to load and add multiple figures from disk to a HTML file For adding a single image, I tried the following (ref.: https://stackoverflow.com/questions/35855777/jinja2-python-insert-a-images-into-html) import jinja2 env = jinja2.Environment( loader=jinja2.FileSystemLoader('.'),...

 
3:02 PM
Maybe that question is better suited for Code Review since you state your code is working and you're asking about performance improvement. — MagnusO_O 18 secs ago
 
3:23 PM
No problem, glad to help. Just FYI, if you'd like to have your code checked over to check it follow best practices there's codereview.stackexchange.com. — Rory McCrossan 47 secs ago
 
 
1 hour later…
4:28 PM
0
Q: Efficiency change between generic and classic function in rust

Teyzer18I recently started to program in Rust, having like 2 good years of experience in C++, I thought it would be possible to directly switch to Rust without following a lot of tutorials, especially knowing that it's mostly math functions that I'm making. So, here is a code that I produced to make Eule...

 
4:39 PM
@pacmaninbw How about after the edits?
 
4:53 PM
0
Q: React Native app with context - Search and Report functionality

juliascodingI have a react native app. I have a search component, that I reuse in the SearchScreen (where I search for train stops) and again in my Report screen where I report (and first search station) not station with issues. I was trying to apply best practices but not sure how well I did. I would really...

0
Q: Simplify nested list comprehension

lukstrudef parse_names(tex_names: list[str]) -> set[str]: # the list comprehension in question return set(parsed_name for parsed_name in [_parse_name(tex_name) for tex_name in tex_names] if parsed_name) def _parse_name(tex_name: str) -> Optional[str]: tex_regex = re.compile(r"^%? ?([\w() ä...

 
@Mast Much better
 
 
1 hour later…
6:10 PM
0
Q: Event Handler tkinter

Clear EmptyAfter entering data on the second window in the Entry field, the Main class should work. The result is written to the created table in the main window (there is no table in the code) The table is created only after all fields are filled and the button is pressed. The size of the table is equal to...

0
Q: Golang creating stuct with objects of other structs

Jeroen SminkFor my program I created the following struct. It describes the JSON format used by Microsoft in their Weekly Azure Ip Ranges publication on their website type AzureIpRange struct { ChangeNumber int `json:"changeNumber"` Cloud string `json:"cloud"` Values []struct { ...

 
6:36 PM
0
Q: Python Binary Search Tree Simplification

MadPhysicistI am looking to get some feedback on the following code. In particular, I am wondering what can be improved in this implementation and whether there are any errors. I am also wondering if there is a way to eliminate one of the insert methods and have only one recursive one. class BinaryTreeNode: ...

 
7:02 PM
0
Q: Trying to solve 1472C by linking Nodes together

Benjamin Chenhttps://codeforces.com/contest/1472/submission/173347946 This above link is the first way I've tried solving this problem. I first create a node representing each number inputted. After that, I link the nodes together. I try to optimize this by ignoring nodes that already linked (to prevent repet...

 
 
1 hour later…
8:19 PM
0
Q: C++ std::string implementation

JacobFollowing is my simple implementation of the std string class. Please review my code and offer some advice. I want to figure out is there anything wrong with my code or is there anything I can improve on my code. #include <iostream> using namespace std; class String{ private: char *buf=nullpt...

 
 
1 hour later…
9:19 PM
Check codereview.stackexchange.com/ for code reviews. — Fabio Filippi 27 secs ago
Is the function actually slow? You seem to be using arrays, which means you already crossed the biggest tortoise trap. After that it's basic js optimization. It's still unclear to me, on the surface, what's the input and what's the expected output with each function. Your question maybe better suited to Code Review. One thing I'll note unique can be rewritten with Set, which has better support for unique data. — TheMaster 36 secs ago
 
10:01 PM
0
Q: mypy does not recognize the correct return type

lukstruI want to load credentials into my program from different sources. If one source does not have 'valid' credentials (in my case valid credentials are all tuples of two non empty strings), try the next source until you get a valid credential (or the sources run out). I wrote a method (validate) tha...

 
 
1 hour later…
11:13 PM
There will be sneakier tricks, so take Ken White's suggestion and ask at Code Review. I linked to the Asking help pages because you'll want to do a read through and tweak the question accordingly. — user4581301 32 secs ago
 

« first day (3430 days earlier)      last day (572 days later) »