« first day (2945 days earlier)      last day (1369 days later) » 

00:02
RELOAD! There are 7587 unanswered questions (89.4446% answered)
00:29
This question is asking for a review of working code, so belongs on codereview.stackexchange.comStuart 59 secs ago
01:24
0
Q: How to make my code be more efficient in terms of both time/space complexity

Inhyeok YooIt is quite long so I'm not sure I can ask you to review my code. But I have no choice indeed. What I'm doing is analyzing the Korean language. To do this, first I collect data and loaded the data via pd.DataFrame. Then, I chunk the text data ('contents' column in the dataframe) into morpheme uni...

0
Q: The Blacklist -- Follow-Up 2: Electric Boogaloo

T145One of my main goals regarding this script has been to figure out a way to use the "adblock.sources" file available on its main repository and not my fork. That version has some syntax issues with its JSON, preventing it from being directly piped into jq. After some research, I came across the jq...

 
1 hour later…
02:37
possible answer invalidation by JimmyHu on question by JimmyHu: codereview.stackexchange.com/posts/260860/revisions
0
Q: simplifying regex expression for timestamp

TomI was wondering if it's possible to simplify this regex string (JS): function validateDateString(date){ const regex = /[0-1][0-9]-[0-3][0-9]-[0-9]{4} [0-2][0-9]:[0-5][0-9] [A|P][M]/; return regex.test(date) } It is supposed to validate a string in the following format: MM-DD-YYYY hh:mm A

 
1 hour later…
03:49
@yawar Sorry and I know. The question really isn't intended to get a code review. All I'm trying to do is generate some more helpful, modern content, so others can benefit. Every google search on basic functionality is garbage compared to other langs (js, c#, rust, etc). Just helping the next beginner (or me in two months). — Greg 32 secs ago
04:26
Monking
@Duga That was only mentioned in the comments.
04:38
Monking
 
2 hours later…
06:29
0
Q: Snake game in rust

Tornado547I made a small rust snake game in order to teach myself rust. I would like to know what I am doing well and poorly, and how to improve my rust code Cargo.toml [package] name = "snake-rs" version = "0.1.0" authors = ["Hurricane996 <[email protected]>"] edition = "2018" # See more keys and t...

07:05
For working code, Code Review is probably a better place to post. Honestly though, there seems to be nothing wrong with the code you've provided. — Llama 20 secs ago
As Llama said, Code Review is probably the better place for your request. They would also tell you that your class Attachments should be singular and have a constructor taking name and type. — Heinzi just now
07:30
Before you post at Code Review, make sure to read A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. question titles should simply say what the code does, as the question is always, "How can I improve this?". Be sure that the code works correctly; include include your unit tests if possible. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. — Toby Speight just now
07:41
Then you should maybe ask on Code Review Stack Exchange rather than on Stack Overflow. — Geshode 56 secs ago
Welcome to Stack Overflow! Before you post at Code Review, make sure to read A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. question titles should simply say what the code does, as the question is always, "How can I improve this?". Be sure that the code works correctly; include your unit tests if possible. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. — Toby Speight 42 secs ago
0
Q: This code is ment for capturing data to store in the database for django application developed

user242906Hi can someone please help me in reducing the complexity of the below mentioned code as I am new to this I need it to reduce the amount of code and improve the code and to improve simplicity and reduce duplications in the overall coding any any help in this regard can be of great help and thanks ...

0
Q: Criticism of C state machine

SorenpI have made a state machine in C. I would love some criticism on my implementation especially on the state handler (the callback to), my goal was to avoid large switch statements. The code compiles and behaves as expected by me in https://www.onlinegdb.com/ are there better ways of doing this or ...

0
Q: convert fs code to fs-extra using node js

Leaneri have code which used to read directory recursive and with given depth but i have wrote this code by using var fs= require("fs"); so my code look like this async function checkFileLoc(folderPath, depth) { depth -= 1; let files = await fs.readdir(folderPath); files = await Promise.all( ...

Monking
08:11
0
Q: why I am not able to fetch data from Json in AndroidStudio

jerry00I am unable to fetch Json data from https://api.coingecko.com/api/v3/exchanges.At the last I am pasting the logs of LogCat. Someone please help me? Don't get offended by my lengthy code !!! -------------------------THIS IS MY( MainActivity.kt )--------------------------------- package com.example...

08:31
I’m voting to close this question because working code you want general improvement advice on belongs on codereview stackexchange. — EOF 47 secs ago
@EOF This question is unfit for Code Review. — Mast 19 secs ago
0
Q: Object relational mapper - optimize in memory data representation and code improvements

infinitecodeAn Object-relational mapper built using php. This was done for educational purposes, and curious to know what kind of improvement has to be done to use in production. Please refer to the complete source code in the Github repository - (https://github.com/maleeshagimshan98/infinite-orm) Below, I'v...

0
Q: LeetCode Reverse Nodes in k-Group

ShokoNLink: https://leetcode.com/problems/reverse-nodes-in-k-group/ Problem description: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a...

@EOF What you do with it is up to you, as long as it doesn't end up on CR where it was already closed. Please take a look at the guide to CR for SO users if you have further questions, or find me in chat. — Mast 33 secs ago
@Mast "[...] are there better ways of doing this or does this code contain some major flaws I don't know about." looks exactly like what your handy guide associates with code review. — EOF 59 secs ago
If you have working code, you should post it here codereview.stackexchange.comklutt 37 secs ago
09:04
@0___________ Thank you for the feedback, those are some very valid points! I will be sure to implement them and get a real example going for code review. At least nobody said the design was terrible and error prone, so there's that :) — Sorenp 38 secs ago
I’m voting to close this question because it's more suitable for codereview.stackexchange.comSam Mason 25 secs ago
09:27
0
Q: Python script that converts Windows Registry Scripts (.reg) into PowerShell scripts (.ps1)

Xeнεi ΞэnвϵςWell this a re-implementation of a PowerShell script that I wrote which does exactly the same thing, and I have ported it into Python. After a quick Google search I found that there is only one other script that does the same thing, which can be found here: https://reg2ps.azurewebsites.net, thoug...

@Sam, it's not at all suited to Code Review, because only working code is on-topic there. There's an acknowledged error here, and that needs to be fixed before it's suited for review. Also, CR requires real code, not simplified minimal examples as used here on SO. — Toby Speight 55 secs ago
09:53
0
Q: Python Sum of Pairs Codewars Solution requires optimization

IceTeadef sum_pairs(ints, s): ''' Params: ints: list[int] s: int --- sum Return First two values from left in ints that add up to form sum ''' ints_dict = {k:v for v,k in enumerate(ints)} # O(n) earliest_ending_idx = float('inf') earliest_pair = None ...

10:14
Does this work or not? Usually code reviews are supposed to go to Code Review. Unless you have a specific problem. — VLAZ 43 secs ago
0
Q: Thoughts on speeding up Pandas subsets/filters using multiple conditions

KcodeIn my Python script I have a Pandas DataFrame with about 5.2 million rows and 26 columns. The current analysis I am running tests 1.5 million different subsets/filters against this DataFrame, using multiple conditions (combinations of the columns) to count the total number of occurrences. Heres t...

That's probably is a questoin for Code Review. — rawrex 47 secs ago
possible answer invalidation by rambi on question by rambi: codereview.stackexchange.com/posts/261233/revisions
@Duga Answers to off-topic questions are invalid. Anyway the code's fixed so reopening
10:33
@Peilonrayz Gotta love how that shows up in the tab list.
@CaptainObvious Can someone versed in PHP tell me whether that's a decent question or not?
0
Q: fs to fs-extra using node js

LeanerI wrote a code by using var fs= require("fs").promises; to read all my files in directories and sub-directories var fs= require("fs").promises; async function checkFileLoc(folderPath, depth) { depth -= 1; let files = await fs.readdir(folderPath); files = await Promise.all( files....

0
Q: For each of the visitors, find if they were present within a time period: code is running slow

svavilI'm working with a pandas dataframe which describes the start and end time of visits. A toy example of the data could be as follows: import pandas as pd data = pd.DataFrame({"start": [pd.Timestamp("2020-01-01 01:23:45"), pd.Timestamp("2020-01-01 01:45:12")], "end": [pd.Timestamp("2020-01-01 02:23:00

I’m voting to close this question because this belongs to codereview.stackexchange.comMartheen 53 secs ago
@CaptainObvious Considering they posted a less-complete question a few hours earlier, I've closed the original as a duplicate of the new one.
10:52
possible answer invalidation by rambi on question by rambi: codereview.stackexchange.com/posts/261233/revisions
Eh well, polish this up and post it on Code Review. I'll take a look at it, if I forget then just give me a poke here :) — Lundin 45 secs ago
11:09
0
Q: To-do app API made with Slim 3

Razvan ZamfirI have put together the back-end (API) with the Slim framework (v3) and MySQL. In index.php I have: use \Psr\Http\Message\ServerRequestInterface as Request; use \Psr\Http\Message\ResponseInterface as Response; require '../vendor/autoload.php'; require '../src/config/db.php'; $app = new \Slim\A...

11:29
Did you translate the questions correctly? Why didn't you ask "him" for details? I'd personally decline your work only due to comments in russian, but that's me ;) Also consider to do code-review using dedicated site. — Sinatr 23 secs ago
0
Q: How to make code more optimizes using custom exception

ZakaRia JanahI have the following Test class which has a lot of custom assertion message, and this will make the maintenance of the code more difficult I want to use custom exception to make the maintenance more easy, so here is my code @Test void focusOnLoginPage() { lineFromExcel = Utils.getExcelDat...

Cleanliness is subjective. Questions about cosmetic improvements to working code are off-topic for Stack Overflow. You can try Code Review. Check their rules before posting. — Michael 53 secs ago
11:51
if your code works and your just looking for review codereview SE site might be better place for this sort of question — depperm 56 secs ago
Code Review Stack Exchange is where you want to ask this kind of question. — Geshode 18 secs ago
12:26
0
Q: Quadratic equation class in Python OOP

Daro1234451Hello everyone In today's assignment I had to write a function to determine if (and how many) the quadratic function defined by the formula f(x) = ax^2 + bx +c has roots. I had decorators to write. Here is my solution: from typing import List, Tuple from math import sqrt from datetime import date...

12:51
0
Q: Parse log file and send the result to an API

MarcThe task is to get the most recent login time of the day for each user. Then send such a result to an API. The log file (file.log) looks like the following (only the last two days): 2021-05-26 09:28:40.720+0000 INFO [alice]: logged in 2021-05-26 09:47:44.714+0000 INFO [alice]: logged in 2021-05...

it's difficult to make much in the way of suggestions... optimising code is a very large topic, of which parallelisation is one powerful tool. if you could give more details of what the code is doing, then people might help (codereview.stackexchange.com might be more applicable). caching intermediate results might help — Sam Mason 37 secs ago
It might be a good idea for you to move to CodeReview. E.g. this function will fail if phrase is longer than 32kB and you have a 16 bit int. — Bathsheba 13 secs ago
This question is probably better suited for codereview.stackexchange.comjoanis just now
13:17
0
Q: Optimizing location updates when adding a new object

RDAxRoadkillI'm trying to keep a bunch of Objects called Machine in their proper order. I was wondering if it'd be possible to further optimize the function HandleLocationCount for performance. Any general feedback is of course also welcome. The function HandleLocationCount is only executed when a new Machin...

0
Q: How to make my code shorter. This Code formats Credit card number. Vanilla JS

MaxHow to make my script shorter and better? This code allows only digits, auto-format card number like this XXXX XXXX XXXX XXXX. if user hits delete or backspace to delete space in between digits, nothing happens caret just moves 1 space forward or backward, it depends on which key user pressed (de...

0
Q: Sonarqube java Read of unwritten field

Luis Marcelo SantosI am receiving this criticism from Sonar, but I do not know what should be done to correct it. Could you help me understand? public class LoginController extends AbstractController implements AuthenticationProvider, Serializable { private static final long serialVersionUID = 1L; private ...

@JoelFan I use gitea for code review and you can set protected branches that require signed commits. No hook needed. I assume github/gitlab have similar features. — EncryptedWatermelon 17 secs ago
13:52
possible answer invalidation by RDAxRoadkill on question by RDAxRoadkill: codereview.stackexchange.com/posts/261286/revisions
possible answer invalidation by RDAxRoadkill on question by RDAxRoadkill: codereview.stackexchange.com/posts/261286/revisions
@Duga Seems like the answer was a bit premature then.
14:15
Ryan Donovan on May 27, 2021
When unexpected changes are requested during the development process, your final product may be a lot more complicated than what your spec originally called for. This phenomenon is called “scope creep.” Add a fully remote team with thin work-life boundaries on top of that, and you’ve got problems.
This looks fine to me... an overloaded function with a generic call signature whose implementation is loose enough to prevent compiler errors is a perfectly valid approach in cases like this where the compiler can't verify what you're doing. If it works for you, then keep it. I don't really see how to make this comment an answer, though... this question feels more like it belongs in Code Review. — jcalz 10 secs ago
14:45
@ThomasWeller That sounds more like a Code Review question to me. The canonical solution to get a powerset in Python is answered by the dupe – "use the recipe in the itertools manual". — AKX 43 secs ago
@AKX: CodeReview.SE is for working code. OPs code is not working — Thomas Weller 13 secs ago
14:59
0
Q: How to good code for multiple if conditions?

Neha NidhiWe have to check Git and SVN folders. public static String getREPOType(String repoPath){ boolean gitRepo = new File(repoPath, Constants.GIT_FOLDER).exists(); String repoType = null; if(gitRepo){ repoType = Constants.GIT; }else{ boolean s...

15:24
0
Q: SQL Query with results from 2 Tables, 1 table multiple times

RajaI have the following data in SQL tables. Table 1 id name 1 John 2 Smith 3 Jenny 4 Bill Table 2 _id value value_id 1 New York 1 2 London 1 3 Chicago 1 1 Vegas 2 3 Atlanta 2 4 Tampa Bay 2 4 Paris 1 The result that i'm trying to show is this. id name cit...

15:43
How would not following the above steps make the code review difficult ? — Pratik Chand 26 secs ago
0
Q: How to view files on Linux based server with UNIX ID

viktorI am using a Linux-based server and I have a q id (UNIX ID). I wanted to know how I could view all the directories and files I have on the server, including /tmp. I have code which creates a folder inside /tmp but I don't know where to look to see if it actually works. I am not very familiar with...

Monking
Monking
16:05
Although I would strongly recommend hitting up SO's sister site codereview.stackexchange.com after fixing your problem so folks can help you turn this into proper JS. There's a lot of code here that shows unfamiliarity with JS, and having some people help explain why what you've written really should be written differently will be of high value to you. — Mike 'Pomax' Kamermans 52 secs ago
Try codereview: codereview.stackexchange.com - SO is for specific coding issues such as debugging not for advciing how to code better — tacoshy 14 secs ago
16:32
possible answer invalidation by ShapeOfMatter on question by rambi: codereview.stackexchange.com/posts/261233/revisions
16:58
@Duga Rolled back.
Lonking, like Monking only with the added Lurk
@pacmaninbw Did you read the recent comments on the question?
Ok, I figured out the problem, but I think we've pissed off the mods enough with troubleshooting on Code Review, and I want my fake internet points in the right place anyway :) . Open a thread on Stack Overflow and share the link here! — ShapeOfMatter 14 mins ago
Hmmm.
@pacmaninbw Got myself a synthesizer on Saturday
@Malachi What's wrong with Lurking?
17:02
@Malachi lol
just wanted to say hello too
@Duga I don't like the mess that's getting created there, at all. But I'm not exactly sure how to salvage it without doing more damage.
@Mast I don't think he was saying anything was wrong with it, just combining the two phrases
@DerKommissar sometimes synthesizer_s make me think of the FOTC song _Inner City Pressure - specifically the lyrics "You just stay home and play synthesizers"
@Mast I think the user is talking about the previous two comments and the "edit 2".
17:04
@SᴀᴍOnᴇᴌᴀ That's basically what I do
Like once again the code is broken.
_test_\ s Finally I've found one way ReST is better than Markdown
@Peilonrayz Representational state transfer?
ReStructuredText - the markup language you use for Sphinx
Oh, right, that very poorly named format.
17:06
I figured it was different given the lowercase e
Structured text was already taken
Just for completeness: note that there is also: codereview.stackexchange.comGhostCat 27 secs ago
@Mast 'Technically' Edit 1 goes against site policy... We could just rollback edit2 and advise the OP to take ShapeOfMatter offer up
@Mast After looking through it for a few minutes it seems decent, though I haven't fully processed the individual classes and their meanings
17:24
@SᴀᴍOnᴇᴌᴀ Well, it's ours now so look all you want :-)
maybe when I can't sleep tonight
that's often when I write some decent reviews
I know the feeling. My best reviews are when I should be doing something else.
Like sleeping, leaving for work...
@DerKommissar So you're really a keyboards player now.
@SᴀᴍOnᴇᴌᴀ And it has been rolled back even more now.
@pacmaninbw Yes I foresee duga posting again about it .... will it be once or twice?
17:40
@pacmaninbw ^^ yep
No. You need to prevent this by not allowing it. Write IAM policies that do not allow some destructive operations. Do code reviews to prevent accidental destruction. Preventing against a rogue employee is very difficult while keeping the normal developer still able to do their work. But even then you can implement that pull requests might need 3 approvers before being rolled out, etc. Overall this is completely unrelated to AWS. — luk2302 just now
 
1 hour later…
18:49
0
Q: trying to output possible bishop moves from an input

coder12345im making a program that accepts a chess coordinate as input such as "e4", and then outputs all possible bishop moves from that square on a chess board. this is what i have right now: pos = input("Enter a legal chess coordinate: ").lower() check_position.check_position(pos) def bishop_moves(p...

 
1 hour later…
19:53
I’m voting to close this question because this question would be better suited for codereview.stackexchange.comWOUNDEDStevenJones 21 secs ago
20:06
0
Q: Caoturing email extracted data in dataframe to store in database of a django web frame work

user242956I'm looking to reduce the amount of code, improve simplicity and reduce duplications. This code was written to capture extracted text from emails and store those details in a database but now the challange is to reduce the code and eliminate duplications in which I need help class SubmissionField...

Overall improvement of working code is the province of Code Review; Stack Overflow involves specific code repairs. For either group, you should first appropriately profile your program, to highlight the places where it's particularly slow. Without that focus, you're leaving us to test your program for you, which is out of scope for this site. — Prune 55 secs ago
Not my down vote, but it may be because have working code that you want to refactor versus having code that doesn't work that you are trying to get working. Your question may be worth posting to CodeReview. — quaabaam 38 secs ago
20:31
0
Q: Does this game's source-code need improvements?

Rodrigo SchioWhen I wrote this source I focus on minimization. Can you guys suggest improvements ? It is a browser game for chrome. Here is index.htm <!doctype html> <html> <title>Acelerado</title> <meta name=viewport content='width=device-width'> <body style='background-color:#8c867f; margin:0px; height:100v...

@WOUNDEDStevenJones Sorry, i didn't even know codereview was a thing here. — Brandon 1 min ago
20:51
Yes, you can. This is a better place to post: codereview.stackexchange.comdisinfor 58 secs ago
0
Q: Django Custom Login Form Not Being Validated

alkansteinI wanted to add a custom user registrationand login form to my Django project. The link I found was okay with the registration part but there was no login part. Hence I found some other stuff and implemented mine. I just extended the AuthenticationForm as SignInForm but it gives me the error in t...

That's great! Unfortunately I cannot help you with plugin development insights. However, StackOverflow wants questions to be focused and to-the-point, so I suggest you edit yours to make your actual question more obvious to find. Also it is customary to post the code in the question itself, not linked to a Dropbox (so people do not have to leave the page to understand the problem). Regarding your request for code review, this would be better suited on codereview.stackexchange.com (codereview.stackexchange.com/help/on-topic). — JayK 38 secs ago
21:26
if you interested @ilvar I have a problem like that. codereview.stackexchange.com/questions/261309/…alkanschtein 32 secs ago
21:39
Whilst @JayK has recommended Code Review your question as-is would be off-topic as you haven't provided the code to users in a form the site recognizes. If you post on Code Review you must include the code you want reviewed in the question. — Peilonrayz 39 secs ago
21:52
possible answer invalidation by Adrian on question by Adrian: codereview.stackexchange.com/posts/239229/revisions
22:15
@Duga Meh. Updated @pacmaninbw's answer
22:39
0
Q: I have query to database which has filters ,sorting ,limit, offset value and I need make code more effective

JusttoasktheneededquestionsI have method that fetches sorted and filtered data from Mysql Database, Firstly I had done It by using Java. Now I did it by Mysql but I don't like the way the code looks I have entity that named Order and It looks like this public class Order implements Serializable { private int orderId; ...

 
1 hour later…
23:55
0
Q: Postgresql's built in COPY command with Parameterized Query

guest1212I'm building a project where the front end is react and the backend is ruby on rails and uses a postgres DB. I want to be able to export the response from the following query using Postgresql's built in COPY command and send it to the front end. query = <<-SQL SELECT * FROM ORDERS WHERE ORDER...


« first day (2945 days earlier)      last day (1369 days later) »