« first day (2329 days earlier)      last day (1671 days later) » 

12:00 AM
RELOAD! There are 6156 unanswered questions (90.0746% answered)
Another options is to derive from the standard Promise class: CancellablePromise. — noseratio 46 secs ago
 
12:26 AM
0
Q: Performance for simple code that converts a RGB tuple to hex string

CarcigenicateI'm rewriting a full color Mandelbrot Set explorer in Python using tkinter. For it, I need to be able to convert a Tuple[int, int, int] into a hex string in the form #123456. Here are example uses of the two variants that I came up with: >>>rgb_to_hex(123, 45, 6) '#7b2d06' >>>rgb_to_hex(99, 88,...

 
 
1 hour later…
1:28 AM
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com — Simply Ged 35 secs ago
 
1:38 AM
This is probably better suited for codereview.stackexchange.comReblochon Masque 48 secs ago
 
2:06 AM
0
Q: Attempt on tkinter class

John Melody MelissaI Need a code review. I can't know my mistakes, Dear masters, please give some insight. Point out my mistake where I just did wrong in this code. #!/usr/bin/env python3 import tkinter from tkinter import * from tkinter.filedialog import asksaveasfilename from PIL import Image, ImageTk, ImageGrab...

 
2:46 AM
1
Q: how do you get a list of waypoints assuming that there is a map?

user209795I'm a beginner learning ROS. I'm developing an android application that will control my robot and that includes getting the list of waypoints to display it to my spinner. just wanted to ask on how do you get the list of waypoints to my topic /waypoints assuming that there is a map? I've already d...

1
Q: Converting integers into Unary Notation

Travis WellsI have written a python script that has tallies representing digits 1-9 (0 is just ":" ) Unlike true Unary languages that are in the form 1^k. I represent values for n as per their decimal digits. The integer 121 is 1_11_1 Overall every k digit out of n "integer" is in Tally notation, and the amo...

 
3:27 AM
@JLC You're very welcome. Another thing you may want to consider is to post your code on Code Review. Since you have a working and reproducible piece of code, you may want to ask there for possible code optimisations. They've got an R code tag as well:-) — Maurits Evers 17 secs ago
Welcome to stack overflow, Vincent. Concerning your second question about advice in general. SO has a section on Code Review. I recommend posting this question there as well. You will get some really great advice on how to clean it up. This isn't really the area for that. — SteveJ 10 secs ago
 
4:06 AM
@SteveJ It might just be me, but I have the image that Code Review is for working code — Mars 40 secs ago
 
 
1 hour later…
5:15 AM
Monking
 
5:48 AM
what pseudo code? all I see is actual code. I'll grant you, it 's code that would never pass a code review, but actual code none the less. Please don't post answers where the answer is a copy-paste solution without explaining what you have done. — Stultuske 59 secs ago
the only thing missing to be complete is the treatment of m, t and i, as far as I can see. In order to add that, you don't really need to know what you are doing. Do you also know what remark would be given during a code review? — Stultuske 43 secs ago
 
7:17 AM
This question belongs on Code Review. — aschipfl 15 secs ago
 
7:29 AM
If your code works and you're just asking us to check if it's good or not, then post it over at Code Review instead. If it doesn't work, then you need to include a complete explanation of the issue. — Magnus Eriksson 35 secs ago
 
0
Q: transform list to array

Cristian IacobQ: Write a method that transforms a list into an array (don't use collections or already implemented methods in lists, make your own method) I've come with this solution: public static Object[] toArray(List<Object> list) { Object[] arr = new Object[list.size()]; for (int i = 0; i < lis...

 
7:51 AM
0
Q: Functions to obfuscate and deobfuscate String. Am I missing out any edge cases?

Cheok Yan ChengI have 2 functions, which are going to hide/ unhide the multiple languages plain text. Security is not a major concern. The objectives are Just want to find a way to hide multiple languages plain text from ordinary user. Even he spends some effort to unhide it, that is completely Ok. Works we...

 
 
1 hour later…
8:51 AM
0
Q: Is this the right way to make shopify php app or not?

Kunjan I am new in making shopify application.I make one application which help to merchant for add additional features in his store. I write some php code that given below. $themeList = shopify_call($token,$shop,"/admin/api/2019- 07/themes.json",array(),'GET'); $themeList = json_decode($themeList['r...

 
9:11 AM
0
Q: Constraint solving a puzzle game solution

feradaThere's a puzzle game called CrossCells (not affiliated; there's also multiple other ones with the same kind of idea, but slightly different layout and rule set) that I've been playing on and off. After getting a bit frustrated with one puzzle (they're getting larger and larger and I'm not very ...

 
9:31 AM
0
Q: Python: Using @classmethod as constructor

eviliveI'm just trying to learn python: I tend to write my own customized wrappers arround "more complicated" python functionalities so that i can use them more easily, more consistent, easier to change in one place, etc. I.e. if wrote my own class my_os with i.e. has the functions rm(path) or mv(from_...

 
9:44 AM
For rating code, please consider codereview.stackexchange.comRoQuOTriX 14 secs ago
I'm voting to close this question as off-topic because commenting on working code is the subject of codereview.stackexchange.com and off-topic on Stack Overflow. — Angew 21 secs ago
Apologies, new here, I'll go to codereview, thanks :) — Joel Gray 53 secs ago
 
0
Q: Perform append, pop, popleft and appendleft methods on an empty deque

MousA deque is a double-ended queue. It can be used to add or remove elements from both ends. Deques support thread safe, memory efficient appends and pops from either side of the deque with approximately the same from collections import deque d = deque() for _ in range(int(input())): cmd, *arg...

 
10:31 AM
0
Q: This program reads from serial port, Saves this to a text file, increments file name each time it is run

Joel GrayI want to condense it and get rid of any noob programming errors. The code works fine but I know it's not as elegant as it could be and I really want to improve. Your advice would be brilliant! I've talked to other engineers and had some basic help but not a lot. int main(){ //OPENING SERIAL P...

 
Well, I went to the site you mentioned, and they didn't like my question either: codereview.stackexchange.com/questions/229184/… I guess I should just stop using these site all together, since nobody seems to be interested in the problem as provided, perhaps I need to learn how to make the problem more attractive to the mods? @PeterHall I thank you for your suggestion anyway, I wish they would have been more helpful there... — Felipe Valdes just now
 
 
1 hour later…
11:46 AM
Monking
 
0
Q: Rendering a dynamic component with dynamic html having data bindings inside ngFor?

RameshPreviously this is my template: <div class="rep-prev-left" *ngFor="let report of processedReportList"> <div *ngIf="report.IsEditable && report.ReportLayout !== 'Landscape'" class="rep-portrait zoom-out" > <div [innerHTML]="report.HTML | safeHtml" class="pr...

 
12:27 PM
How do people feel about this question?: codereview.stackexchange.com/questions/229308/…
I've written an answer which says "no", but the question feels off-topic, though I couldn't say why.
 
0
Q: reverse a list of generic type

Cristian IacobQ: Given a list, reverse the order of its elements (don't use collections) Here is my solution: public static <T> void reverse(List<T> list) { if (list.size() > 0) { T t; t = list.get(0); list.remove(0); reverse(list); list.add(t); } } I want t...

 
12:43 PM
Well, I have more to say than 'no', so I'll post it. Please shout at me if I've posted on something off-topic.
 
1:01 PM
I'm voting to close this question as off-topic because better fitted at codereviewstovfl 42 secs ago
 
1:11 PM
Your question is nice, but it belongs to codereview IMHO — French Boiethios 14 secs ago
 
0
Q: duplicate Text field validation in java script

Sarvesh KumarI have a multiple row,created dynamically on tab press,want to validate duplicate string doesn't allow in text field. enter code here function duplicateDataChk(inputTxt){ var inputTxtValue[]=inputTxt; var sorted_arr = inputTxtValue.sort(); var results = []; for (var i = 0; i < sorted_arr.l...

 
1:24 PM
Greetings, Programs.
 
1
Q: An Algorithm Which Schedules Your Life

John SalterAn Algorithm For Scheduling Your Time There is a strong body of research in cognitive science which has large implications for how best to plan your day to get the most out of it. However, it isn't practical for everyone to understand it, keep on up to date on recent findings, weigh up the relat...

 
1:52 PM
0
Q: Code to pick buckets for a list of value

SabIn my current project, I came across a scenario where there will be two sorted list of Decimal values. Let's call them bucket_list and value_list Where bucket_list represents the sum of one or more elements from the value_list value_list may have duplicate values Every element in value_list sho...

 
2:12 PM
0
Q: This code toggles between two classes when the page scrolls

JakePowellAs soon as the user scrolls the notScrolled class is removed and the scrolled class is applied. It works but seems like it could be more concise. Any comments appreciated! function toggleOnScroll() { let item = document.getElementById("element"); if (document.body.scrollTop > 0 || documen...

0
Q: Flexible Binary Search

TinManThis search consists of two functions QuickMatch() which searches for the value and getQuickRowValue() which returns the value of a given row. Both functions have a SearchBy As SearchByIndex parameter which is used to determine which values will be compared. For instance: getQuickRowValue() can...

 
possible answer invalidation by AlexV on question by John Salter: codereview.stackexchange.com/posts/229313/revisions
 
2:32 PM
1
Q: Properly Structuring a Tkinter Application

ShockDoctorI'm fairly new to object oriented programming and while I understand the basic concepts, I'm still having some trouble organizing my applications. I'm building a small Tkinter application and trying to make sure I follow correct object oriented principles. I have a couple specific questions regar...

 
2:43 PM
Sean Bave on September 19, 2019

Control the types of ads you see. We’ll categorize the different advertising offerings and you’ll be able to select the ones you want to see.

Report specific ads you don’t like and we, together with our ad partners, will make sure you don’t see them again.

 
0
Q: Customizable unidirectional questionaire in javascript

IcepickleI wrote the below answer for the following question on SO a couple of days ago, and I was curious if the usage of the generator function is an acceptable one. I choose the generator function, because I could easily exchange the generator at a later time to ask the question not in sequence, but r...

 
3:33 PM
0
Q: Maze image solver and animator in Python

Emad BoctorThis is a continuation to the maze generator I posted here recently Maze generator & animator in Python This code takes an image containing a 2 color maze as input and solves the maze and produces an image of the solution or an animated GIF. The algorithm implemented so far is breadth-first sear...

 
3:59 PM
Monking
 
4:13 PM
0
Q: FAMILY.PY | OOPython

Mikey AkamiheSimple code where family and person instances can be created. There is a method where any instance of Person can be added to any instance of Family. class Family: def __init__(self): self.names, self.birthplaces, self.dobs, self.deaths = [], [], [], [] class Person: def __init_...

 
4:33 PM
0
Q: BANK_ACCOUNT.PY | OOPython

Mikey AkamiheSimple object-oriented, money management code where a user can deposit money in, withdraw from, show, and exit the balance. class BankAccuount: def __init__(self, name): self.name = name self.balance = 0 print('Hello! Welcome to the Deposit and Withdrawal Machine {}!'...

 
4:47 PM
I'm voting to close this question as off-topic because it should be on Code Review instead. — EJoshuaS 24 secs ago
 
0
Q: Replacing spaces with tabs. Exercise 1-21 in "The C Programming Language"

GhxstI'm looking for feedback on the code I came up with for exercise 1-21 in "The C Programming Language" by K&R. Write a program entab that replaces strings of blanks with the minimum number of tabs and blanks to achieve the same spacing. Use the same stops as for detab . When either a tab or a ...

 
5:15 PM
possible answer invalidation by Emad Boctor on question by Emad Boctor: codereview.stackexchange.com/posts/229322/revisions
 
@VisualMelon To prevent further confusion regarding the provided restrictions on collections, and since an answer is accepted anyway, I'm voting to close for UWYA.
 
5:33 PM
-2
Q: C# How to get a value from a date from a table with date range

Afzal HossainI have a table with the value of a range of dates. If I input a date then it should look that date within a date range in the table and give me a value. I am working in C#. Please help. DateFrm |DateTo |ivalue ----------|----------|----- 2019-01-01|2019-02-01|10 2019-02-02|2019-03-01|11 201...

 
ugh... I have the suspicion that reading XML files from a URL / resource automatically adds the XML header declaration in some cases...
which is ... not useful if you want to assemble these into different files...
but that makes literally no sense.
so .... wtf, I guess?
 
6:00 PM
possible answer invalidation by TinMan on question by TinMan: codereview.stackexchange.com/posts/229317/revisions
If your code works and you only seek improvements or constructive criticism, Code Review might be a better fit for your question. — Amy 57 secs ago
 
0
Q: C# stringbuilder header for loop

Tom MCDEVITTI am building this report but I we only like the header to display on the first record I have it working using the bool and resetting it each time but wanted to see if there is a OOP principle that would be better. StringBuilder reportResult=new StringBuilder(); foreach (ExchangeGroup eg...

 
6:32 PM
I'm voting to close this question as off-topic because the OP has moved it to Code Review. — Amy 15 secs ago
 
6:53 PM
-1
Q: Copy Non-continuous Cell Values

seadoggie01Backstory: I'm creating department level workbooks that contains director-level information, so I can't use a single workbook (as easy as it would make this). I need to split (and combine) 4 workbooks into 140 or more. I manage to do this relatively quickly (~30 minutes), but I was hoping to spee...

-1
Q: Creating a cson generator in python

JeacomI need to generate valid cson syntax from python objects for a project, this is being specially fun but I am still not sure if it always generates valid syntax. cson is similar to json but with prettier syntax imho. """ Small module for generating cson structures from python objects """ __all_...

 
7:13 PM
1
Q: LeetCode: Symmetric Tree C#

Giladhttps://leetcode.com/explore/interview/card/top-interview-questions-easy/94/trees/627 Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ / \ 3 4 4 3 ...

 
7:54 PM
1
Q: Rest Api with generic crud operations

Dev_JoshiI am learning how to create a rest api in which I've decided to use generic for crud operation. I am attaching the code which I have written so far. Please have a look. Thanks for the review in advance. What I expect from code review: Good part of the code (if any) Code portion which needs i...

-1
Q: PyTorch Vectorized Implementation for Thresholding and Computing Jaccard Index

yipingI have been trying to optimize a code snippet find the optimal threshold value in a 256 * 256 probability map to get the optimal Jaccard index and the ground truth mask is given (so we can find the optimal threshold). However, even I have optimized the implementation as vectorized as possible, th...

 
8:10 PM
possible answer invalidation by FutureCake on question by FutureCake: codereview.stackexchange.com/posts/229256/revisions
 
8:21 PM
@Duga Needs one more roll back and I don't know how to do it.
 
8:34 PM
0
Q: Symmetric Tree Check in Python

LinnyInspired by This LeetCode Question. Instead of checking if every layer is symmetric, it instead checks if any aren't. This allows the program to leave early is an early layer fails the test. I'm looking for performance mostly, as I loop through each element in the list, instead of each layer. Al...

 
8:54 PM
-1
Q: create a dictionary representing the counts of recursive digit sums within a given range

user209860I am trying to write a function which will return a dictionary that represents the recursive digit sums within a given range as the dictionary keys and how many times those recursive digits occur as the dictionary values. I created a function which returns a recursive digit sum of the number whic...

 
@dfhwze I think it's OK, and the other answer is good either way, but I'm not going to vote to reopen if the community agrees otherwise.
 
9:26 PM
Glad that it works for you, but your code does all sorts of things that make no sense. You might consider posting it over at Code Review. — jwvh 41 secs ago
If you want a Code Review - try the Code Review site. StackOverflow isn't for code review! — Luke Joshua Park 8 secs ago
 
@Duga @pacmaninbw rolled back to version 3
@Duga left a comment on MG's answer to ask if it is invalidated
@Duga looks like a change in comment/documentation... I presume that is fine, right?
@Duga superfluous end code fence removed
 
10:28 PM
@Mast can I ask why you voted to leave this post closed?
I did so yesterday before I knew that the OP believes the code now works
but then later voted to reopen after the OP answered my question via comment
 
0
Q: What do you think about this code

Dr GRISHAusing System; namespace Console_Calculator { class Program { static void Main(string[] args) { double Num1; //A Number double Num2; //A Second Number string RL; //Console.ReadLi...

 
@CaptainObvious it doesn't have much of a description, and isn't formatted using markdown formatting :/
 
 
1 hour later…
11:36 PM
@SᴀᴍOnᴇᴌᴀ MG replied
@SᴀᴍOnᴇᴌᴀ I would indeed - and feel free to disagree with me and roll it back anyway (that intervention wouldn't be contrary to site rules about answer-invalidating edits), but I believe the way the edit was made (with the seams showing, i.e. it's explicitly called out), with the instruction being commented-out rather than outright removed, keeps the little DoEvents side-note relevant. IMO the Q+A as a whole remains coherent, so while it's technically invalidating, the spirit of the rule is upheld, there are far worse cases of answer invalidation edits that do warrant a rollback ;-) — Mathieu Guindon 1 min ago
 

« first day (2329 days earlier)      last day (1671 days later) »