« first day (2481 days earlier)      last day (1519 days later) » 

12:00 AM
RELOAD! There are 6376 unanswered questions (90.1381% answered)
 
12:18 AM
0
Q: Test Case for rowBoat()

MsCr3oleI am writing a test case called No Farmer No Row where I would call the below method without anything on the boat. when I call the rowBoat method I should still be at Start however it still rows to Finish. Am I missing a logic in my method? public void rowBoat() { assert (boatLocation != Loc...

0
Q: Decorator & Visitor Pattern in Python

deviceI have implemented Visitor and Decorator Pattern in python. I am much used to java design pattern style and hence thought would try in python as well. Could anyone tell me if this is the correct way to do in Python. Is there any better way to do this? I have made coffee class and decorating it...

0
Q: Foo Bar - Power Hungry challenge test case failing on unknown edge cases

Daniel BertoldiThe challenge is to find the maximum product of a subset of a given array. Here's the problem: Write a function solution(xs) that takes a list of integers representing the power output levels of each panel in an array, and returns the maximum product of some non-empty subset of those numb...

 
What you are asking for is a code review. You should delete this and ask, instead, on the Code Review Stack ExchangeRob 37 secs ago
 
 
1 hour later…
1:19 AM
1
Q: Takes json input and builds dynamic json output based on values in input: Looking for a better way to accomplish this

Philip Jay FryI have this specific scenario where I'm going to get a JSON that could have multiple Objects. From the Multiple Objects I will create a new Json that can have nested arrays growing by n amount depending on some json object values. I hoping there is a better way to do this. Maybe my example below...

 
 
3 hours later…
3:55 AM
possible answer invalidation by AJNeufeld on question by Connor1234: codereview.stackexchange.com/posts/237441/revisions
 
 
2 hours later…
5:50 AM
Ben Popper on February 18, 2020
We try to climb the teetering tower of abstraction, examine a human readable magazine on computing, and prepare for Y2038.
 
6:06 AM
0
Q: Newspaper layout

gwrukrisc This is the template for my school newspaper that I maintain. It contains bits and pieces from everywhere (we all need to start start somewhere). I am aware that there are probably a lot that I can improve with this file. Right now, it's not pretty, but it works. There are always two columns, ...

 
6:46 AM
Monking
@Feeds Y2038? I'd say addressing that in 2025 is early enough.
Besides, I think parking meters use NTP. Hasn't that been checked?
 
7:07 AM
-1
Q: Python Tkinter countdown app with a freezing GUI

RMWIXXSo I want to create a very basic constantly changing textvariable with a counter funcition. I created it, and it is working as well, but once I press the "countdown" button, the GUI freezes, and the only way to close the window is from PyCharm. Any suggestons about what causes the freeze and how ...

 
7:26 AM
Why are people so mean to downvote my question? I literally have no idea how to know the answer if I can't even post it here ! — RMWIXX 4 mins ago
@SimonForsberg And that's why less and less people comment. I've seen much worse.
 
7:47 AM
0
Q: Better way to query and pass the elements to conditional operator in Javascript

Lax_SamI have the following function which has the required functionality. Is there any way that I can reduce the code but have the same functionality? addClickEventListeners = () => { let multipleChoiceQuestionButtons = document.querySelectorAll('[name="multiple_choice"]'); let trueFalseQuestionBu...

 
possible answer invalidation by Mast on question by RMWIXX: codereview.stackexchange.com/posts/237476/revisions
 
@Duga Ssssssh.
I fixed an off-topic question by writing a review. What's wrong with me today...
 
possible answer invalidation by Stefano on question by Stefano: codereview.stackexchange.com/posts/237322/revisions
 
@Duga Probably not malice, but that's not the first rollback required.
Now I got to get some work done.
 
8:08 AM
0
Q: Parsing a Graph To Convert It Into Adjacency Lists And CSR And Then Make Connection Queries Using Bidirectional BFS

NickDeltaI was assigned an university project where I had to parse directed graph files coming from SNAP and then convert them into CSR (Compressed Sparse Row) format. Then the client must have the ability to perform connection queries between any 2 vertices by using Bidirectional BFS. Here is my impleme...

 
Hi there - Stackoverflow isn't the proper forum for code optimisation, more for issues with getting code to work. I suggest you try posting on Code Review as this is more the appropriate forum for this. — Rafa Guillermo 52 secs ago
 
8:32 AM
Questions are free today, no extra charge. — Mast 33 mins ago
Absolute gold 😂
 
9:09 AM
0
Q: Understanding of OOP paradigm in python

StefanoSuggestions to better understand when and how is convenient to use OPP. This question is a follow-up question on this post. I have a script that reads an input file. In time, the script may be modified to account for new elements, that are directly added in the same input file. I would like to ...

0
Q: Django auditing fields created_by, created_at, etc

Adrien HI wanted to add auditing fields to a model in Django and they would take care of themselves. The fields would be: created_by created_at modified_by modified_at I want to add new columns to existing table rather than a new table with foreign keys. I achieved it using a middleware and the pre_...

 
@Peilonrayz Yea, some users seem to think it's better to recycle questions. Don't do that.
Recycle plastics, not questions.
2
 
Kaz
9:26 AM
Monking @all
 
9:45 AM
Monking @Kaz
In one part of my code, I use if entry['partnr'] is not None:, in others, if not entry['partnr'].startswith(foo): and it just doesn't feel right.
Yet it looks like both are stylistically correct.
I could fix that by storing the result of the startswith in another variable, but that's just obscuring things.
 
10:03 AM
This question rather belongs on CodeReviewMaxPowers 16 secs ago
 
@Mast Looks fine IMO, if entry['partnr']: Optional[str]. We don't have a ?. in Python to remove the null check.
 
0
Q: What would be proper way to store data from file and validate data from file

Anvewhat is proper way to save all lines from text file to objects. I have .txt file something like this 0001Marcus Aurelius 20021122160 21311 0002William Shakespeare 19940822332 11092 0003Albert Camus 20010715180 01232 From this file I know position of each data th...

 
I normally use (entry['partnr'] or '').startswith(foo) as a ghetto null chuck
 
@Peilonrayz Beats writing a .startsnotwith.
 
Monking
 
10:17 AM
Monking
 
10:30 AM
0
Q: My code is trying to pull data and present in a web page from 2 databases using php/pg_connect and postgresql

Gunasekaran DesaiyanMy code is trying to connect and use 2 different postgresql dbs (postgres and postgres1) on the same computer (localhost) and same php file. pg_connect is working for the default postgres db - no problem. How can I use pg_connect to connect to another instance called postgres1 from the same p...

 
 
1 hour later…
Kaz
11:35 AM
Hey everyone, I'm looking to hire a data/business analyst in St Albans (just on the NW tip of the M25) or potentially remote. Anybody from a junior up to mid/senior level with a head for data/numbers, knows their way around a spreadsheet and enjoys solving problems.
We're an awesome little wealth management startup, 30 people, growing ~50% a year, doing some heavy M&A which is only set to accelerate from here. If that sounds like a company you or someone you know would be interested in, please get in touch with me at Zak.Michael.Armstrong@Outlook.com
Added bonus: You get to report to me, and I'm a pretty chill guy ^^
 
11:51 AM
0
Q: Uploading an image, getting its Sha-256, getting its EXIF, and saving all in separate NoSQL schemas using async functions

Major DespardSo guys I'm working on a website with MEVN stack and this is my first big project. The way I have designed the schemas is like, that there's one "Super" schema, such as UserSchema or PostSchema, and then there's "intermediary" schemas such as PostImageSchema, and then there are "container" schema...

 
I'm voting to close this question as off-topic because code reviews are better asked on CodeReview.se — rene 15 secs ago
 
12:11 PM
0
Q: First "real" HTML/CSS/JS project. Feedback on design/code please

timlwskMy goal was to create a portfolio site for my motion design work. The website should be modern and intuitive, yet pose a good gallery. Please also comment on the dark mode functionality and responsiveness. The full website is hosted under timlwsk.bplaced.net (good domain coming soon). The contac...

 
12:49 PM
in Tavern on the Meta on Meta Stack Exchange Chat, 12 hours ago, by Shog9
And so now, upon realizing that pissing off the 30-some thousand people who keep SO afloat is maybe a bad idea... They're re-thinking their strategy. Good for them; even if a bit late, revisiting bad analysis is always a good choice.
About that Feeds of late.
 
Note there is a code review site too: codereview.stackexchange.com. — Ben 44 secs ago
 
0
Q: Is this function effective and secure to validate an IBAN?

Davide ToninI've found this explanation on Wiki on how to validate an IBAN.. Since the number generated from the transformation can cause overflow with all data type available in vba I've worked with string and I'd like to have someone else review.. Thanks in advance! From Wiki: Check that the total IBAN ...

 
I am not sure this is the best place for these kind of discussions. You should probably post to codereview.stackexchange.com instead — dbrumann 24 secs ago
 
 
1 hour later…
2:13 PM
-1
Q: Are there any bugs in this implementation of minimax?

N8JavascriptSo, I'm working on a Chess AI, and I wrote the following code to perform minimax and alpha-beta pruning: minimax(depth, alpha, beta, maximingPlayer, top = true) { const startTime = Date.now(); let oldCastle; if (top) { oldCastle = canCastle; } ...

 
2:56 PM
I went to the code review site, but they said my post was invalid there - you aren't allowed to post posts asking for debugging help. — N8Javascript 57 secs ago
 
3:14 PM
0
Q: Django model manager improvments

Amit RahavI'm trying to get a computed field at my Project model. It should calculate all foreign key data specific field. At first, I created a model property with a @property decorator, but I need to filter this calculated field easily so it wasn't much help. I decided to write a model manager my self,...

 
Rebekah Rombom on February 18, 2020
Interview processes run the gamut from a few conversations, to hours of writing code on a whiteboard, to evaluative social events with the team. It can all seem very mysterious and nerve-wracking from the outside. But here’s the big secret: No matter what kind of process you step into, the hiring team, really, is only trying to figure out three things.
 
3:34 PM
0
Q: Django Companies db design dilemma

Damjan DimitrioskiShould the category, user model be attached to every single relation? Does my DB design is ok for having multiple stores and multiple products on top of a single company? Any performance-related issues :) ? from django.db import models # Create your models here. class Product(models.Model)...

 
 
1 hour later…
4:48 PM
If this is working code and you just want something more efficient, then this question is for Code Reviewmaccettura 19 secs ago
 
Monking
 
5:16 PM
I'm voting to close this question as off-topic because it belongs on CodeReview. — Scott Hunter 7 secs ago
CodeReview won't be able to help here. — chepner 47 secs ago
When the theorem states "infinite" it could be more than 10 minutes, depending on the complexity (length) of the control string. You have some options to "see" a result: Reduce the length of the control string in order to have less permutations, or increase the tries per second. This could be done using a more powerful machine or using parallel computations. BTW, I also think this should be on CodeReview — gustavovelascoh 39 secs ago
 
5:52 PM
If you have code you wish help improving, you should post it on CodeReview. — Scott Hunter 17 secs ago
 
0
Q: Multi-@Services in Spring Boot RESTful controllers for many inbound requests

lincolnadymNot sure if this is a code review or more of questions on how Spring Boot operates regarding @Service components with many inbound requests. If it is a question I can certainly re-post in StackOverflow, but part of my question is are we even designing this in the correct way? We basically have ...

 
6:17 PM
-1
Q: border each node in a network created using networkD3::forceNetwork() with a specific color

Wasim AftabConsider the following network, can nodes be bordered with colors based on a column in the MisNodes data frame? The forceNetwork function has option to color edges but not node borders. I will appreciate any suggestion library (networkD3) # Load data data(MisLinks) data(MisNodes) # Plot forc...

 
6:35 PM
possible answer invalidation by Redu on question by Redu: codereview.stackexchange.com/posts/159817/revisions
 
6:57 PM
0
Q: Bit shift 256 bits

ZacariazI have a working solution to my problem, but I'm less than satisfied with the result, both when it comes to style and performance. In short, I need to be able to shift 256 bits of data, say an array of 4 64 bit integer, by n bit, right and left. If other type are easier to work with for some rea...

 
7:39 PM
0
Q: Fibonacci N(th) Number: Iteration Or Recursion?

David PetersonI'm a beginner programmer and I came upon this problem which is to find the n(th) number of the fibonacci series...I used to solve the problem using a for loop but today I learned about recursion but there is a problem...when I type 40 or 41(in recursion method) it takes a bit of time to calculat...

-1
Q: throwing exception from __init__() VS letting invalid object and exposing .problem property

VinkSo lets say we have a simple class SourceURL that represents a file and is is defined something like this (lets call is Option1), class SourceURL: """Class for a URL of object""" scheme: str bucket: str key: str def __init__(self, url: str): scheme, netloc, path, pa...

 
8:00 PM
possible answer invalidation by M2tM on question by M2tM: codereview.stackexchange.com/posts/237117/revisions
 
8:19 PM
0
Q: Mapping a complex JSON response to two different JPA Entities

user2094257I am mapping a complex JSON response to two JPA Entity model classes using Jackson. The classes are CxExport and Mention, Mention has a Many to one relationship with CxExport I.e. Many mentions belong to one CxExport. The HTTP Response returns a List of mentions 2. The JPA model is a flattened in...

 
8:41 PM
This is likely a better question for CodeReview instead of StackOverflow — zfrisch 18 secs ago
possible answer invalidation by Srivaths on question by Srivaths: codereview.stackexchange.com/posts/232897/revisions
 
9:01 PM
If there's no problem with your code, you might consider posting it to codereview.stackexchange.com. — Rufus L 56 secs ago
 
 
1 hour later…
10:21 PM
0
Q: EFCore 3.1 - It is the best practice to save data on related tables?

IgorI have the following relationship in EF Core 3.1.1 (Many-To-Many) public partial class Movie { public Movie() { Reviews = new HashSet<MovieReview>(); } public int Id { get; set; } public string Title { get; set; } public virtual ICollection<MovieReview> Reviews ...

 
Welcome to StackOverflow. On topic, how to ask, and ... the perfect question apply here. StackOverflow is a knowledge base for specific programming problems. This is not a code review site; if you don't know whether or not your code works, you do not (yet) have a Stack Overflow issue. — Prune 17 secs ago
 
10:49 PM
Code Review is a better place to ask for advice on coding style for working programs. — Barmar 26 secs ago
I'm voting to close this question as off-topic because it's asking for a code review. — John Montgomery 32 secs ago
 
11:06 PM
Ajames, if you post this on Code Review, I have some comments for you. Your question got closed here in the middle of my answer. :-( — scrozier just now
 
11:47 PM
Heya
 

« first day (2481 days earlier)      last day (1519 days later) »