« first day (2620 days earlier)      last day (1390 days later) » 

12:00 AM
RELOAD! There are 6800 unanswered questions (89.8742% answered)
 
12:39 AM
-2
Q: How to add an interactive plot in Jupyter Notebook?

VladimirI have made a plot for the basic SIR model. I am satisfied with my plot, however, I would like to be able to have an interactive slider that tweaks my parameters beta and gamma. I would like both of them to range from 0 to 1 and for the user to be able to increment them by 0.01. Can someone help ...

 
1:27 AM
0
Q: Why is an initial scale of 0.8 necessary on my script?

James Anderson Jr.I wrote and published a free script here: https://www.perfecterrordocs.com I need to know why it is necessary to use an initial scale of 0.8 in the <meta name="viewport"...> tag, and how I can achieve the same or better results using an initial scale of 1.0 with slightly modified CSS. I.e. What d...

 
2:16 AM
1
Q: Linked tree built from (n) leaves

Emery TanghanwayeFirstly, here is the relevant code. It is written in kotlin. package com.minz.tournaments import kotlin.math.ceil import kotlin.math.log2 import kotlin.math.pow @OptIn(ExperimentalStdlibApi::class) class TournamentTree(initialParticipants: Map<Int, Participant>) { private var rootNode: Particip...

 
 
2 hours later…
4:43 AM
0
Q: How to update a column in sql based on another table's last row, column value

Owenn GimliI'm currently on the process of making a CRUD Database program. I'm having some trouble with the database. I would like to link 2 columns with each other. It's quite different from usual though, it's a little more complicated. So, I have a table named items_list which have a column called 'Item N...

 
Monking
 
 
1 hour later…
5:53 AM
In "if you have another one Can You Tell Me About it ??" pay attention to the word "another". OP did not ask for optimizing his code. Optimizing should be asked in Code Review. — Parsa Fat'hollahi 27 secs ago
 
6:18 AM
"But I need it to be optimized" then I would suggest to migrate the question to Code Review StackOverflow is not the right platform for such questions — Mong Zhu 43 secs ago
Ok, I'll post it on Code Review. Thanks — Swapnil Walunj 6 secs ago
If your code is working then this belongs on CodeReviewroganjosh 10 secs ago
 
6:36 AM
Monking
@CaptainObvious List that under iffy questions.
 
0
Q: Python arbitrary objects Serialization and Deserialization

YunusI am trying to convert objects inside an object(arbitrary objects) to Json and later retrieve it. I have developed some codes and would like to share if there is any problem in the code. import json Here is the first class class Foo(): def __init__(self,x,y,bar): self.x =x se...

 
7:23 AM
@zvone I think there is a misunderstanding here. some_side_effect doesn't modify anything, it was just a way to represent some work that doesn't change the data. The idea behind using a frozen dataclass is to prevent modification without being explicit. However, it still doesn't prevent the usage of the "unmodified" data, which can lead to subtle, hard to track bugs. Now, obviously this sort of thing could be handled by being more careful and better code review, but it would be nice to be able to catch instances of this occurring before they cause bugs in production. — Sanchit Uttam 29 secs ago
 
7:39 AM
Monking
 
@CaptainObvious List that under iffy questions too.
 
8:19 AM
@pacmaninbw You were right:
Good point, the code is AGPL, and that is only one-way compatible with CC BY-SA 4.0 as far. I'll delete the question to be on the safe side, I'll undelete it when I get more clarity on this side from our legal people. — Amedee Van Gasse 9 mins ago
I have deleted my answer to make deletion of the question possible.
 
 
1 hour later…
9:34 AM
0
Q: Basic login by username logic with SQL Server

Francesco BonizziMy goal is to make a very simple library with the authentications basics: create a user and save its hashed password, change its password, have a method to check if the password is correct for login. The usage I thought (you find everything in my Github repository), is this: var cs = "Data Source...

 
10:07 AM
If you have working code and want to improve it, Code Review would probably be a better site than Stack Overflow. — Damien_The_Unbeliever 18 secs ago
 
10:30 AM
I’m voting to close this question because with its current lack of focus it would be more appropriate for Code Review section. — guidot 46 secs ago
@guidot Don't use the existence of Code Review as a reason to close a question. Evaluate the question and use a reason like; needs focus, primarily opinion-based, etc. This question would be off-topic on Code Review as it does not work as intended. Please familiarize yourself with what is on-topic and our guide to Code Review for Stack Overflow users. — Peilonrayz 50 secs ago
 
11:22 AM
@MartinR It is removed now, with 4 CV accumulated.
 
12:00 PM
0
Q: Multiple if/then/else combined with memoization

TomOnTimeThis code finds which "secure file erase" command exists on the system. It used to simply test for "shred" and pick "rm" as a default. Now it is a bit more complex since I've ported the code to operating systems with "srm" and "rm -P". Is this still cleanly written? How can I improve it? var ...

 
If you have working code that you want a review of, you should go to the help center of Code Review to see if your question is on topic there. Right now, this question does not ask for a single correct answer, but rather "ideas" on how to "improve" something. How are you going to determine if an answer is better than yours? — Heretic Monkey 53 secs ago
 
@ankii Mine isn't applicable there.
 
If you have working code that you're looking to improve, please post on codereview instead — Chris G 58 secs ago
 
12:23 PM
@ChrisG In the future please use doubtful wording and link to the help center when recommending Code Review. Take, "This may be on-topic on Code Review. Please check if it is on-topic and how to post a good question before posting there." — Peilonrayz 24 secs ago
 
0
Q: Part 2: Create or update record via HTTP request

User1973This script was previously reviewed here: Part 1: Create or update record via HTTP request I've made the changes that were suggested by @Reinderien. Now that the code has been significantly refactored, are there any other improvements that could be made? Description: I have an external system th...

0
Q: Track the existence of process

GraygoodI have an api endpoint that, when called, initiates the generation of a report. This is time consuming process and response could come pretty late. So, we came up with caching architecture and once finished the response is saved to redis. However, on the frontend side we dicided to make a request...

 
> please use doubtful wording
@Peilonrayz What did you intend to write there?
 
What do you mean?
 
Should the next comment be sowing doubt?
Should the words be of doubtful quality?
I thought comments should be written clearly, so I think I'm misunderstanding you here.
 
Yes, doubt that it is on-topic here. Contrast "this is on-topic on Code Review" "this may be on-topic on Code Review"
 
12:30 PM
Should the wording indicate the author has doubts about making the recommendation in the first place?
Right.
So instead of "please post on codereview", "it may be on-topic on codereview".
Perhaps the wording of your comment makes sense to native speakers, but I was starting to doubt myself.
 
Yes, I also sow doubt here too. "Please check if it is on-topic".
If you don't understand it it should be changed. I'm not really sure what to change it to tho
 
Request that the statement be made less absolute, in some form or another, perhaps.
 
Hmm, yeah that could work
 
State that there are more requirements than those listed, perhaps.
But asking someone to use doubtful wording reads to me like the quality of the comment is too high.
Which, makes no sense at all.
 
I get it Mast, I'll try change it to something else.
 
12:35 PM
:-)
@Duga This is a very clear comment.
 
@Mast It's made up of SO[C,R[Broken]], and a user has indicated a problem with SO[C]. Apparently it's not clear that "evaluate" is saying to do it from now on, rather than before the comment.
And typing that gave me a solution to it.
Rubberducking too op
 
0
Q: Python selenium web scrapping - how to refactor the code and use explicit wait?

sangharshWritten following code to extract table form portal. The code works fine (except the net connectivity). But 1. I want to make it more simple, more flat. 2. If I can use explicit wait to avoid stale element error but at the same time save the time. The URL address is available in code itself. from...

 
1:26 PM
> In the future please link to the help center and use wording that shows the post may be off-topic when recommending Code Review. Take, "This may be on-topic on Code Review. Please check if it is on-topic and how to post a good question before posting there."
Do you think that's better?
 
0
Q: Building content templates with javascript and no 3rd party library

OrtundI had a need to build a standardized layout for content on many of the pages of my website based on data returned from my web service but the project I'm doing this on is already bloated with stuff from previous developers and since I don't know what I can take out without destroying functionalit...

 
@Peilonrayz Definitely.
 
1:45 PM
possible answer invalidation by User1973 on question by User1973: codereview.stackexchange.com/posts/245073/revisions
 
@Mast Great, thanks :)
 
I think this question would be more suitable in Webmasters or Code Review. — AndrewL64 1 min ago
 
@Duga Handled by Reinderien
 
2:02 PM
@AndrewL64 This question would be off-topic on Code Review as it does not work as intended and does not have the code in the question. In the future please link to the help center and use wording that shows the post may be off-topic when recommending Code Review. Take, "This may be on-topic on Code Review. Please check if it is on-topic and how to post a good question before posting there." — Peilonrayz 14 secs ago
 
2:26 PM
0
Q: Program for chopping overlapping image areas and filling up to a specific ratio

akuzminykhI've written a little program that I need for fixing two problems in my spherical panorama images. It does two things: If the image does overlap horizontally, it cuts away the overlapping pixels from the right side. It fills up the image vertically with black, so that it has a ratio of 2 to 1. ...

 
2:48 PM
@Peilonrayz That's good
 
Ryan Donovan on July 06, 2020
July 2020 Welcome to ISSUE #28 of the Overflow! This newsletter is by developers, for developers, written and curated by the Stack Overflow team and Cassidy Williams at Netlify. In the US, we’re celebrating our Independance Day, and hopefully reflecting on what freedom means and helping everyone share in that freedom. This week, we’re pondering…
 
3:07 PM
If this code works, and you want a review of the code, you should check the help center for Code Review to see if it is on topic there. — Heretic Monkey 22 secs ago
@HereticMonkey This question would be off-topic on Code Review as it is missing context. In the future please link to the help center when recommending Code Review. Take, "This may be on-topic on Code Review. Please check if it is on-topic and how to post a good question before posting there." — Peilonrayz 24 secs ago
 
0
Q: Removing OO style coding from Haskell

GustHaving coded in Objected-Oriented style my entire programming career, it's hard to adapt to functional style fully. I implemented a simple Hangman game: {- A simple gameLoop of hangman.-} module Hangman where import qualified Data.Set as Set import qualified System.IO as IO import qualified Syst...

 
3:26 PM
@HereticMonkey Good point about tick marks. Thank you I'll do that from now on. This may be on-topic on Code Review. Please check [if it is on-topic](//codereview.stackexchange.com/help/on-topic) and [how to post a good question](//codereview.stackexchange.com/help/how-to-ask) before posting there. Not all users know what or where the help center is, additionally it helps increase the number of users that check our rules rather than just clicking your link and the "ask question" button. — Peilonrayz 23 secs ago
 
3:39 PM
0
Q: Get Date Taken from Image

AlexIs there a better way of doing this? I heard that BinaryReader and Exif parsing to get the property item is faster, but I have no idea how to do that, thanks for the help. //we init this once so that if the function is repeatedly called //it isn't stressing the garbage man static Regex r = new Re...

 
4:08 PM
Reviews of working code are off-topic for StackOverflow. You could put this on Code Review, but make sure you follow their guidelines: codereview.stackexchange.com/help/how-to-askTenfour04 10 secs ago
 
4:20 PM
Is this something you're willing to release in a public repo? I'd be interested in using it if you do — Canadian Luke 2 mins ago
 
4:52 PM
0
Q: Correct flow between Kotlin, Realm and ViewModels using Coroutines

BHoganDisclaimer: This is not actual code from the app, but an example of the flow and my understanding on how best to do this. I am looking for help improving upon it. I'm stepping back into Android after being away from it for about a year. Trying to get an out of date app of mine back on its feet, a...

0
Q: I made a Java quiz program

fosionefI made a Java quiz program. The program will let you take the Java quiz and then display the quiz's result according to your score. /* * Java Quiz * by Clint * 2020.07.07 * This Java program let's you take a quiz. Quiz are taken at: https://www.w3schools.com/java/java_quiz.asp */ import ja...

 
6:05 PM
0
Q: Leetcode 957. Prison Cells After N Days

jacobcan118I am working on 957. Prison Cells After N Days but getting timeout error for my code. as I assume my code should be 14+O(n-14) about O(n) am I right since after 14 run pattern will be repeated? and how can I improve my code? from collections import defaultdict step_map = defaultd...

 
Monking @SᴀᴍOnᴇᴌᴀ
 
@pacmaninbw per your comment:
Note to reviewers in the Vote to Close Queue, the code works. — pacmaninbw Jul 2 at 15:07
While the OP did remove the text stating that an error sometimes occurs the code wasn't changed .... 🤔
 
hmmmm
@SᴀᴍOnᴇᴌᴀ so the code doesn't work?
Not a python person
 
6:20 PM
¯\_(ツ)_/¯ there is no sample code to utilize the function otherwise I would try running it...
 
@SᴀᴍOnᴇᴌᴀ UWYA, I don't have a clue what it's doing. I've gotten it to run, but the code looks like it's black box debugging code that shouldn't be in a project.
from datetime import date
import pandas as pd

df = pd.DataFrame({'year': [2015, 2016],
                   'month': [2, 3],
                   'day': [4, 5]})
datetime_check_format([df])
 
That runs, but idk what they're even doing so...
 
@Peilonrayz Can you understand the answer?
 
@pacmaninbw I'll give it a go
I changed the input, and they output slightly differently. Still seems like debugging code. return tracker, false_dates, true_dates and returning a string is not normal
But they seem to 'do the same'. I'm not sure why they have exceptions tho I'm no Pandas pro
 
7:21 PM
I've done some pandas, but that looks odd. Am on mobile though, so can't be of much help
Remind me tomorrow if need be.
 
I'm gone for the day, talk to you all tomorrow.
 
7:47 PM
Posts looking for feedback/suggestions on working code likely belong on codereview.stackexchange.com. — AMC 49 secs ago
For now I am doing it very manually but it takes a while and there must be more efficient and elegant ways to do it. For feedback and suggestions on working code, try codereview.stackexchange.com. Please see How to Ask, help center. — AMC 42 secs ago
 
8:30 PM
@AMC This question would be off-topic on Code Review as it is asking us to implement code and does not have the code in the question. In the future please link to the help center and use wording that shows the post may be off-topic when recommending Code Review. Take, This may be on-topic on Code Review. Please check [if it is on-topic](//codereview.stackexchange.com/help/on-topic) and [how to post a good question](//codereview.stackexchange.com/help/how-to-ask) before posting there.Peilonrayz 24 secs ago
 
0
Q: Package function to perform operation on different "sets" of data in same dataframe

WasabiThe ubiquitous dplyr package has the function mutate_at (and many other *_at()'s), which allows us to perform a similar operation on multiple columns. Using purrr-style formulas, the relevant column is indicated by .: df %>% mutate_at(vars(colA, colB, colC), ~ 2 * .) This would double the values...

0
Q: Simple MVVM Navigation for WPF in c#

EricNieI have been learning MVVM and I have decided to create a small framework for simple MVVM programs I can make in the future. This program provides navigation between a main menu, settings menu, start menu, and exit button. There is no functionality yet, and this is because I want to work on the na...

 
 
1 hour later…
9:44 PM
0
Q: Liquid includes HCard module

S0AndS0The source code of this project aims to enable defining contact information either via FrontMatter or named parameters, and having that information then formatted to HTML that is both human and machine readable. I've attempted to adhere to the MicroCode specifications for both HCard and VCard for...

 
10:08 PM
1
Q: Combining data to create a list

Mario ArendI am trying to create a list based on some data, but the code I am using is very slow when I run it on large data. So I suspect I am not using all of the Python power for this task. Is there a more efficient and faster way of doing this in Python? Here an explanantion of the code: You can think ...

 
 
1 hour later…
11:11 PM
 
11:26 PM
@RMunroe so many holes can be poked in that one... like "where are the river difficulty classifications?", "why is there only one EF-* rating?", "what about neutral?" , "what about short (smaller than tall)", etc...
 

« first day (2620 days earlier)      last day (1390 days later) »