« first day (3007 days earlier)      last day (54 days later) » 

12:03 AM
REFRESH! There are 7709 unanswered questions (89.3829 answered)
12:21 AM
Q: Filtering data on stackoverflow survey of 2019 in Pandas-Jupyter

irtexas19results_public.csv: https://drive.google.com/open?id=1QOmVDpd8hcVYqqUXDXf68UMDWQZP0wQV The above file is a stackoverflow survey from 2019, which contains information of programmers like: country, age, used programming language, etc... My program displays on a dataframe: All countries (in a objec...

2 hours later…
2:05 AM
This question would be much better suited to code reviewT3RR0R 28 secs ago
2 hours later…
3:35 AM
@Mast Yes of course. I just created an animation for that and I was happy. Moreover Its never too late.
3 hours later…
7:03 AM
Q: Which of these two Vuetify Navigation Drawer prevent prop mutation workarounds seem better?

ajax333221I am very new to Vue.js, I just stumbled on a very hard thing to do (at least for me) where Vue was complaining about mutating a prop (children shouldn't change parent props apparently), I was about to give up at 8~ hour mark, but then it worked! then not only that, I came with another solution. ...

Since your code appears to be functional (it works, it's just slow), you might want to try asking this question on codereview.SE instead. — N. Wouda 17 secs ago
Since your code appears to be functional (it works, it's just slow), you might want to try asking this question on codereview.SE instead. — N. Wouda 29 secs ago
2 hours later…
8:42 AM
You wrong place, post it hereSimone Rossaini 55 secs ago
1 hour later…
9:58 AM
Q: GUI that reads data and generates/ saves charts

JudasMosesI have a program that uses pandas to read csv files and then generates and saves graphical charts. I have been trying to follow the SOLID principles so I have tried to seperate responsibilities. So far the project has the structure of GUI ├─ Service │ ├─ Business Logic │ │ ├─ DataReader │ │ ...

Q: Execution Timed Out. error

Kabir SharmaI am trying to find the "Number of trailing zeros of N!" (N factorial). In the python code I am trying to find the factorial first and then the number of trailing zeros. However, I am getting "Execution Timed Out" error. 1) Why is this code giving the error? Is there anyway to optimize the code t...

10:48 AM
Q: Common CRUD function in node js using Express

user3022326I have created common function for CRUD operations. I am using Sequelize JS, I have created all models in Sequelize I have written stored procedures in mysql for CRUD operations for each module/tables I have GetItems GetItemById CreateItem UpdateItem Deleteitem Then I have created Common CR...

11:14 AM
Q: First non-repeating character in string

eirikdaudeI've been trying to learn a bit of JavaScript over the last few weeks, and inspired by this current hot network question, I tried creating a function for finding the first non-repeating character in a string. Is my approach a decent one, and is there any obvious improvements which can be made? fu...

1 hour later…
12:34 PM
My rule of thumb is: the more stuff put into a single statement, the higher the cognitive load. So I tend towards preferring code in smaller, easier to grasp sequential statements, rather than packing a lot of behavior into a single statement — because it is easier to code review and easier to maintain. I work with some brilliant developers who hold the opposing view, and would rather cram everything into one statement. The compiler doesn't care, and the optimizer can optimize either style really well. So use whichever works best for your team. — Eljay 44 secs ago
12:55 PM
Q: processing exec.cmd stdout/stderr pipes output

LogicDaemonI'm learning go, and writing helper functions for easy processing of commands output. I want to concurrently read from two pipes (stdin and stderr) and process their output. The functions should work, but they look dirty with redundant code. It's only two pipes, but what if there were 10? How do ...

1:20 PM
Q: As part of the model for a web crawler, I want to store the parts of a URL to a database using Entity Framework. Is this a good solution?

matt-in-the-hatInstead of trying to parse a URL into its component parts myself, I thought I could inherit from the System.Uri class and add a BaseEntity Id for the Entity Framework. But, VS Code complains with a message like "'Hyperlink.' hides inherited member 'Uri.'. Use the new keyword if hiding was intended."

2:11 PM
Q: Update large object partially on events

Apoorva ChikaraI am having a large object which might grow in size. I want to update some properties on each event, there are multiple events like click, navigating to specific routes, taking prints and a lot more. I am able to do it using Object.assign(targetObject, keys). Currently, I am using the Assign meth...

I'm not sure you want to do this honestly; the problem is that increasing that size "accidentally" is easy and can have high cost; so if someone anywhere makes a bigger derived instance, suddenly code "far away" starts requiring more memory. Imagine someone deriving with a class that is 10x larger than prior. Silently, costs to store all derived instances balloon. What I'd do is inject a constexpr auto largest_derived = ##; in the class definition, which people writing derived classes that trigger your static asserts must update manually. Then in code review it can be caught... — Yakk - Adam Nevraumont 19 secs ago
Ryan Donovan on July 28, 2021
Dwarf Fortress is one of those oddball passion projects that’s broken into Internet consciousness. It’s a free game where you play either an adventurer or a fortress full of dwarves in a randomly generated fantasy world. The simulation runs deep, with new games creating multiple civilizations with histories, mythologies, and artifacts. I reached out to him to see how he’s managed a single, growing codebase over 15+ years, the perils of pathing, and debugging dead cats. Our conversation below has been edited for clarity. 
2:36 PM
Q: Easily add a Pandas DataFrame

wander95The following code works: # df is a Pandas DataFrame # add columns with column numbers in l l = [4,5,8,9, 10,11, 13] mass =0 for blk in l: mass = mass + df[str(blk)] Is there a more efficient or elegant way to accomplish this?

3:01 PM
Q: Game Of Life program in Java

MichaPehlivanI wrote a program for Conway's Game Of Life in Java. This is the main class. Are there any improvements I could make? Apart from this one there are also classes for the board, window, and handeling input. package main; import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.Buff...

The question might be better suited for Code Review. — Turing85 11 secs ago
3:26 PM
Q: Finding programmers that use python in a dataframe, Pandas-Jupyter

irtexas19I have a dataframe which contains information of programmers like: country, programming languages. etc: COUNTRY PROGRAMMING_LANGUAGE usa javascript uk python;swift;kotlin india python;ruby usa c++;c;assembly;python canada java;php;golang;ruby angola pyt...

3:52 PM
Q: Calculating Days off: Is there a better way?

Bob StoutThe code below works, but it seems it could be done better. Is there a better/more efficient way to do this? Given: All days off ("relief days") will be consecutive. Relief days will be imported as a string. Days of week are represented by their first letter. "S" can represent Saturday or Sunday,

Q: Compare enum's and adding key word

JeffersonI created this sample and wanted any advice on how to make this code; cleaner, more effective, just overall better! I need to add the key word and only if the NegativeScheduleCalendar enum is before the ScheduleCalendar enum. The only way I was able to do this was to loop the list and checking if...

4:09 PM
4:42 PM
Q: How can I speed up this Autocomplete Query that is using multiple criteria?

ColeslawI'm looking to speed up this query. It is not currently using the indexes in the table which is slowing it down. There is an index on playerName. The function of the query is for an autocomplete script in the search bar of my site. A player starts to type their name and this query runs and return...

5:03 PM
This site is for programming Q&A as defined in the help center. It is explicitly not for code review. — MattDMo 17 secs ago
Better asking on Code ReviewSayse 39 secs ago
1 hour later…
6:23 PM
Q: Image upload filter for PHP

JoSSteI am trying to improve my file upload handler filter. Environment Since any client-side validation is easily circumvented, there is none in this code, for ease of testing. Not even an accept="image/*" on the <input> element. Production code will include some client side validation. The upload han...

7:13 PM
Q: Minimum moves to ensure that each element X in an array occurs X times

Sparsh GargI would like to brainstorm/get some advice/tips regarding the following question. Given an array,you can either insert elements or you can delete elements from it.Note the insertion/deletion must be done in such a way so that in the end,for any element X in the array,X occurs X times. The objecti...

7:39 PM
Q: Reducing if conditional statement

Mateen KaziaHello I'm trying to figure out the best way to reduce this if statement I was thinking of possibly chaining together ternary operator const display = () => { // linkedItemType == LinkedItemType.Prospect ? "pendo-prospects" // : linkedItemType == LinkedItemType.Loan ? "pendo-loan" // :

8:04 PM
Q: Yet another .ini parser for AutoHotKey

Ismael MiguelI decided to learn a little about AutoHotKey, to practice a little and learn about classes. I ended up writting a basic ini file parser. Class Ini { ini_file := "" ini_data := {} __New(ini_file) { if ini_file { this.ini_file := ini_file Fi...

2 hours later…
10:27 PM
@CaptainObvious If someone down voted this question, the OP has added the additional 2 classes.

« first day (3007 days earlier)      last day (54 days later) »