« first day (3795 days earlier)      last day (207 days later) » 

12:13 AM
REFRESH! There are 7052 unanswered questions (90.8756 answered)
 
12:48 AM
0
Q: Implementing a --assume-yes/--assume-no command line flag to affect a `input()` based `confirm()` function

LucasI have a Python command line application that needs to ask the user for confirmation at some point. I want to add a --assume-yes/--assume-no command line flag to skip the confirmation. I have several ideas how to handle this flag and am not sure which is good/best/terrible. current code # main.py...

 
 
1 hour later…
1:57 AM
does this seem right? can it be modified in a better way? Such questions are more suitable to codereview.stackexchange.com. — 273K 21 secs ago
 
 
4 hours later…
5:49 AM
0
Q: Mapping Entity Database Table to Model

Scottish SmileI am not sure of the correct way to do this. I want to separate my Entity database model from the model I use throughout my application, as it will have fields in it that I may not want added to the database. This means, after any Entity call I am doing mapping. I have come up with this solution ...

 
 
6 hours later…
11:40 AM
0
Q: Expirable LRU cache

OmegaThe requirements are: evict any expired items find the items with the lowest priority and evict the least recently used one Any feedback would be appreciated. from collections import OrderedDict class LRUCache: def __init__(self, capacity): self.capacity = capacity self.cac...

 
Monking
 
12:15 PM
@CaptainObvious CNW
 
12:27 PM
Can you provide complete, reproducible code? Have you verified that the Mathematica implementation and the Python implementation output the same results? If so, your question may be appropriate for Code Review. — ken 49 secs ago
 
 
3 hours later…
3:51 PM
Thanks for the edit @TobySpeight
 
4:41 PM
0
Q: Recursively create a TreeView for file paths using C# and WPF

RamzaI'm building a program that allows the user to monitor files on their local system. To display the files, I created a TreeView using System.Windows.Controls from the WPF framework. The files are added recursively. What suggestions would you give to improve this code for cleanliness, structure, o...

 
5:06 PM
0
Q: Python tic-tac-toe using tkinter

sbottingotaI recently made this tic-tac-toe program using tkinter, but I am quite new to tkinter, so I would be grateful for tips on how to improve the program. (The actual tic-tac-toe logic is being done by a library.) This is my code: import tkinter as tk from tictactoe import Board from tictactoe import...

 
5:56 PM
0
Q: Testing the cost of boxing in System.Reactive Observables

Kevin KrumwiedeI was curious whether boxing impacts performance in a long chain of IObservable<T> operators where T is a value type, and whether performance can be improved by changing T to Box<T> from CommunityToolkit.HighPerformance. I tested this in the form of some unit tests. I also included a test without...

 
 
3 hours later…
8:38 PM
Monking
 
 
2 hours later…
10:57 PM
0
Q: How to read key value in JSON output without using index

Patrick HennesseyHere is a sample JSON output myJSON: "results": [ { "data1": 123.45, "data2": 67.89 } ] I'm trying to directly read data1: mydata1 = myJSON['data1'] I get an error KeyError: 'data1'. I can only find a way to do this by using an index: mydata1 = myJSON['results'][0]['data1'...

 

« first day (3795 days earlier)      last day (207 days later) »