« first day (1719 days earlier)      last day (2284 days later) » 

12:00 AM
RELOAD! There are 4896 unanswered questions (90.2751% answered)
 
12:32 AM
0
Q: Bug in my fractal code,

Ritvik TanejaI am trying to draw a recursive structure in python using the turtle module. Essentially, the function to draw this structure is drawFrames(d), where d is the 'depth', i.e. a number specifying the complexity of the fractal. d=1 just splits the window into 4 rectangles (no recursion); d=2 splits e...

 
 
2 hours later…
2:30 AM
0
Q: Open multiple url tabs in a single window

Computing...I decide to open three url tabs in one chrome window with following code: import subprocess open_chromes = [ 'https://en.wikipedia.org/wiki/Embodied_cognition', 'https://docs.python.org/3.6/index.html', 'https://docs.djangoproject.com/en/1.11/',] for chrome in open_chromes: cmd = ['open', '-...

 
 
3 hours later…
5:01 AM
Monking
 
5:52 AM
0
Q: Text adventure game - text input processing

neoflashAs a fun project with my wife, I decided to make a small text adventure game à la Zork. Instead of using available engines, I decided to roll my own. It won't be that hard since there are no graphics. The piece of code I submit for review is a class representing a room in the game. The processI...

 
Monking
 
6:24 AM
0
Q: Project Euler 122 Program Not Working?

Husnain Razadef euler122(): out=[[1,2]] out2=[1,2] count=0 flag=True while flag: print len(out) print "-"*59 for i in out: for j in [x+y for x in i for y in i]: if i+[j] not in out and sorted(list(set(i+[j])))==i+[j] and j not in out2: if count%100==0: print l...

 
@skiwi New PCs always smell a bit odd, it shouldn't get worse.
@CaptainObvious Borked.
And for the love of all that's holy, please don't point crap towards Stack Overflow.
We don't accept it if they do it the other way around either.
 
6:44 AM
I would have had more incentive to at least gloss over all of this post if it was introduced succinctly. I take this works by and large: consider asking on Code Review after due time (My take: 60 hours, minimum - well, this post had at least 48...). — greybeard 44 secs ago
 
Monking
 
7:20 AM
Please post to Code Review codereview.stackexchange.com | Here on SO it’s an offtopic. — mudasobwa 9 secs ago
 
7:44 AM
@mudasobwa As it currently stands, this question would be closed as Unclear on Code Review. — Mast 32 secs ago
This is about codereview and should better be ask at Code ReviewJens 29 secs ago
 
@Duga I'm this close to ripping him a new one, but that would violate our Be Nice policy...
And now it's RBA, great.
 
8:01 AM
posted on January 17, 2018 by Vel

I'm making my first steps in OOP and I'm currently doing some exercises. I've done a simple program with class structure like this (I'll provide only essential parts): Super class: public abstract class Employee { private String lastName; private float salary; public Employee(String lastName, float salary) { this.lastName = lastName; t

 
@Mast Right, okay, figured new stuff smells anyways
 
@skiwi Exactly. New socks smell too, doesn't mean your feet stink.
 
8:16 AM
0
Q: Implement the function to find the combination of 4 digits in a row which gives the max multiplication

МаксимHelp me, please. Check my code.Did I do everything right? There is an assignment: Implement the function to find the combination of 4 digits in a row which gives the max multiplication. If object is not a string or there are no combinations found - return nil. If combination is found - return i...

 
9:02 AM
@A.T. SO is not meant for code reviews — Stultuske 17 secs ago
(@Stultuske - true, but this doesn't appear to be a request for a code review. At least ... not to me.) — Stephen C 23 secs ago
 
9:15 AM
This question seems more suitable for Code Review. — Turing85 29 secs ago
@Turing85 Absolutely not! Please take a look at their help center. This is example code, highly illegal at Code Review. — Mast 23 secs ago
 
9:33 AM
-4
Q: chutiya bnata he

gjyufrjdjgdjerror he bsdk program me.errrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr...

 
9:48 AM
@CaptainObvious HAMMERTIME!
 
possible answer invalidation by yuga on question by yuga: codereview.stackexchange.com/posts/183937/revisions
 
@Duga rolled back
 
10:23 AM
0
Q: Downloading latest monthly files VBA - HTML. How to future proof targeting the correct files?

QHarrSituation: I am trying to download files, for the latest available month, from the webpage NHS Delayed Transfers of Care. I am unable to locate these files, within the HTML, with confidence that my current code will continue to work over time. Question: How do I isolate the latest month with ...

 
2
Q: Could we detect phrases like "not working" and "bug" in question titles and warn users

user1118321It has been mentioned recently that ~62% of close votes come from the "broken code" or "code not yet written" category. I'm wondering if we could help lower that percentage by detecting certain key phrases in the title (or possibly body) of the question and give a red warning banner before the us...

 
10:42 AM
0
Q: unique_ptr in struct leaking data?

Jonas KI have code similar to the one below. It iterates over a 2D grid using smaller sub-regions. Because this is happening in parallel, I use unique_ptr. Now I came across a weird memory-leak that made me think whether using unique_ptr here may me wrong. Is this memory leak free? #include <thread> #i...

0
Q: Using asynchronous pattern best practices

MicrosmsmI am wondering if there's a best practice using this new pattern in javascript and async/await keywords instead of traditional callbacks Core function: async function typeWriter(text, n, elementId, waitAfter) { const el = document.getElementById(elementId); if (n < (text.length)) { ...

 
10:57 AM
0
Q: Console Application Customization - GetBootstrap v2.8.6.19

Leonel SarmientoIt's been a long time since my last post. I decided to continue this little project and tried to debug the GetBootstrap v2.7. I found out that the progress bar that I create is not working properly when the size of console buffer is changes. so I decide to rewrite it again. Below, the progress t...

 
11:09 AM
Intersting, here's his answer btw, I'll post a question on code review later about it, and thank you very much for your answer — Robert Andersson 22 secs ago
 
0
Q: Better way to query a table for different range of a column's data

bozzmobI am trying to get number of times (or sessions) a user re-visited the website. What I'm trying to find out- Get the total number of users, number of sessions in the last 30days. I need to a pie chart ultimately where it shows people who revisited- more than 100 times, 50-100 times, less than...

 
11:30 AM
0
Q: Correct way to add dxtension methods to IServiceCollection in ASP.NET Core

nfpleeI have the following extension method to add themes support to my application: public static void AddThemes(this IServiceCollection services, Action<ThemesOptions> setupAction) { services.Configure(setupAction); } Where ThemesOptions is defined as: public class ThemesOptions { public ...

 
12:19 PM
-3
Q: Max repeated number set occurance from integer arraylist

RohitInput -int arr[] = {3,3,0,0,3,3,3,0,3,3,3,3,0,0,0,3,3,3,3,3}; Ouput should be 5 As the the set of number 3 is repeated maximum time in an array.. Please give me optimized solution

 
12:42 PM
You should consider posting on Code Review, not here — appa yip yip 33 secs ago
 
12:53 PM
0
Q: Updating data in d3js

Robert AnderssonIn this chart I'm calling d3.csv everytime I update the data, which if I understand correctly is a bad thing to do. In this answer on S.O Gerardo explains that d3.csv is asynchronous and the data should only be loaded in once. I understand why that is, but what I'm wondering now is what is a b...

 
1:08 PM
1
Q: Elegant Output Separators

seheToday I found myself reinventing output separators for the zillionth time. I have converged on an approach like the following that seem pretty clean: Live On Coliru #include <iostream> void foo(int a, int b) { auto sep = [first=true]() mutable { return first? (first = false, "") : ", "; }...

 
Monking
 
1:28 PM
0
Q: Common Implementation for Sending mail based on time

LjdhameliyaI have created one Background service that execute after every 5 minutes and this service used for sending email after 6 hour,24 hour and 48 hour for user booking order is not confirmed. for that i have created below method and enums. public enum Enum_AbandonedCartEmailNotifyHour { ...

 
@willlplaya please always try to reduce your code to the minimum before you post it here. I also recommend posting your game on codereview.stackexchange.com/questions/tagged/pygame to get some refactoring tips. On the codereview site you have to post all of your code instead of a minimal example. — skrx 50 secs ago
 
2:05 PM
0
Q: Largest palindrome made from product of 3 digit numbers

Latika Agarwal I am given a task to write a program to find the largest palindrome made from product of two 3 digit numbers. Below is the code : def check_palindrome(s): """Checks whether the given string is palindrome""" if s == s[::-1]: return True product_pal = [] for i in range (9...

 
You may want to try this at codereview.stackexchange.com. — deceze ♦ 24 secs ago
 
2:35 PM
0
Q: Efficiently determine whether a matching image exists

Sean DugganFirst off, this is a legacy project that I inherited, so there are some aspects of it that I will have to explain as "that's just the way it was done and I haven't found a better way". However, I am always open to better ways. I am working on a scrapbooking product involving a large number of ph...

0
Q: Safe, simultaneous string replacement

MarkI've written a function which takes as an input a string to be modified a vector of regular expressions on which to match a vector of replacements option to ignore case in the match statements The function will then, from the users perspective, simultaneously perform all replacements in a 'sa...

 
Thanks, I wasn't familiar with stackexchange codereview until you mentioned it! I did it here so that anyone searching for such a regex would easily find it. — Medievalist 30 secs ago
 
2:52 PM
0
Q: Digital clock with many functions - follow-up

Sebastiaan SpeckThis is a follow-up from Digital clock with many functions I used the review mentioned above to optimize the code, but the code can still be made better. I made a digital clock with the use of an RTC (DS3231) and an LCD (16x2). Current functions: Display time Display date (different formats)...

0
Q: What's wrong with this HashMap?

BlasI am trying to work my way on this exercise on HackerRank, using C as an excuse to learn. https://www.hackerrank.com/challenges/sparse-arrays/problem It's really unclear to me why I don't seem to get the desired output. Any thoughts? #include <stdio.h> #include <stdlib.h> #include <string.h> ...

0
Q: Refactoring digital clock - JavaScript ES5 Functional Programming

Aurelian SpodarecI'm making a digital clock with ES5 ( no arrow stuff and so ). The location and temperature I'll do later. How can I improve/refactor the current code that I have with functional programming? CodePen: https://codepen.io/Aurelian/pen/opaxqx?editors=1010 This is the HTML: <div class="clock"> <...

 
3:07 PM
0
Q: Array Manipulation - Hacker Rank

WooWapDaBugThis is my implementation for this hacker rank problem. My first attempt I think is very readable (ignoring the way input and output is handle in hacker rank) #include <bits/stdc++.h> #include <algorithm> using namespace std; int main() { int n, m; cin >> n >> m; vector<long long>...

 
@CaptainObvious broken
 
3:29 PM
this might be better suited on codereview.SE — I wrestled a bear once. 19 secs ago
 
3:39 PM
0
Q: Combine Overlapping 2 Rectangles ? (javascript)

Achref BoukihiliThis is my solution to find the combination of 2 overlapped rectangles implemented in JavaScript. rectangle is presented by 2 points(x,y). So do you have a better solution ? const maxOfX = (rec) => (Math.max(rec.x1, rec.x2)); const maxOfY = (rec) => (Math.max(rec.y1, rec.y2)); const minOfX =...

 
@CaptainObvious Closed.
 
4:16 PM
user image
3
@Peilonrayz and others ^^
Got my shirt.
 
@Mast Wooo, :D
 
4:44 PM
0
Q: Print a random anagram of a given string

Latika Agarwal I am given a task to Create a function that prints a random anagram of a given string Below is the code: def anagram(value): '''Prints random anagram of given value''' import random newWord = '' for i in range(len(value)): pos = random.randint(0, len(value)-1) ...

0
Q: Ontario Health Card Mod 10 Validation

Dan BracukAn example of the business rules are here. Does this code implement those rules correctly? Note that you will have to derive the rules from the example. /* test number from url 9876543217 other valid numbers 5322369835 7089771195 8108876957 4395667779 6983806917 not valid numbers 2790412845 ...

 
4:59 PM
Monking
My Windows has a black screen with a cursor on it :o
 
@skiwi When booting? Not usually a problem.
 
@Mast After logging in, signing out and again fixed it th ough
Just Windows things...
 
Oh, Windows was probably configuring stuff in the background. It happens.
 
5:20 PM
0
Q: Are loop for bad?

NanBlancHere is my code that need to process 100*250 000 data in less than 3s (i don't know the exact spec of the running machine) As i'm quite new to coding, what can i improve or change to make it faster, and more optimized ? Here is the code chef page to the problem : https://www.codechef.com/problem...

0
Q: Shared disposable object, where only one can exist at a time

Jean-Bernard PellerinIn my program I need to impersonate users on the domain network to perform various tasks. Obviously I can only be one user at a time, and there are multiple threads that would like to be either the same or a different user. I thought it would be neat to generalize the solution, so if you know o...

 
0
Q: Edits change the main topic of my question, have I done things wrong?

NatNgsRecently, I posted the following question on Code Review: Convert ES6 yield recursive method to a loop At beginning, I post a question whith my actual code; asking to know if there is a way to write the same thing as not recursive methods. I made the error to simplify the code (to my mind to be...

 
5:51 PM
posted on January 17, 2018 by CommitStrip

 
6:10 PM
0
Q: Invoke-WebRequest in a loop until NotFound

craigI'm using SAP's Raylight RESTful SDK to get a list of universes from the BusinessObject Enterprise repository. To get all of the universes, the request needs to be called repeatedly, incrementing the offset parameter until the request returns a Not Found [404] error. Current approach: $baseUrl...

 
6:25 PM
Monking!
 
6:45 PM
possible answer invalidation by Achref Boukihili on question by Achref Boukihili: codereview.stackexchange.com/posts/185323/revisions
 
7:08 PM
Code reviews belong on codereview.stackexchange.com. Check their help page and then consider moving this question over there after ensuring your question meets their standards. — rmaddy 42 secs ago
 
7:27 PM
0
Q: getting ans setting data using Firestore

Walid Omonosi am saving string input in firebase and updating the front end realtime with firestore. how can i do these same thing in fewer lines of code. Is there a better way to do this? // Initialize Firebase var config = { apiKey: "AIzaSyDZJgaeqMCztZYbBk-83Oiv5HVhioLsyhQ", authDomain: "my-proje...

0
Q: Getting table cell contents in a row and displaying them as a concatenated tooltip?

JAT86I have a JavaScript code that gets the inner text content of certain table cells in a row and displays them as a tooltip on mouseover. However, I am a novice at JavaScript and I do not know how to make the code more efficient and/or secure from exploits. Could please review the following code and...

 
8:01 PM
0
Q: Good (ASP.NET WebAPI) REST design refactoring

EhouarnI am working on ASP.NET application and I would like to get some feedbacks about refactoring ideas, in particular on the WebAPI part. Spoiler alert: the current design is really rubbish. Note: Get: Get all the items (unless some sort of filtering is applied) Post: Add new item Put: Update ex...

 
8:17 PM
I think this isn't the forum for code refactors bro, try code review stack — Mike Tung 50 secs ago
 
@Duga OK bro...
 
8:33 PM
0
Q: A C++ custom iterator for indirection iteration

coderoddeThis program does not quite conform to the previous related question, yet does basically the same thing: given a collection of elements and a collection of indices, return via an iterator collection elements according to the sequence of indices. Here it goes: #include <exception> #include <iostream

 
9:00 PM
Hi guys, pretty new on CR SE. What is the best way, when you make a code review question, they give you some input in their answers and you want to "repost" the new code? Update the old code? Post a new question?
 
0
Q: Create another Singelton object from a Singelton class

PankajI want to create singleton object of a third party caching library (ThirdPartyKVStore). But I don't want to reference this class all over the places from where I want to access the cache. To address this, I created a wrapper CacheManager which is managing the lifecycle of ThirdPartyKVStore. Does ...

 
9:27 PM
0
Q: Effective way of finding data on xml using pythons lxml

ÑhoskoUsing python's lxml I must read an XML file and print from each "basic" and "expert" tag, the name and email text from it. I've done a script that works but I don't think is the best way of doing this. Is there a better (simpler) way for getting the data of the xml without having to make 2 iterat...

 
9:43 PM
Final count: 390 tabs
 
@manuzi1 the most conventional is: posting a new question
 
This might be better suited on code review — MadProgrammer 29 secs ago
 
14
Q: "What to do when someone answers" seems to give bad advice at a glance

PimgdTake a look at this page of the Help Center - What should I do when someone answers my question? If you only read the text with special markup, as someone would when skimming the page, it reads like so: What should I do when someone answers my question? vote accepting the answer mark an answer...

 
10:09 PM
This is might be better suited for Code Review as it seems to be a matter of style/opinion. — Paul H 21 secs ago
You might get a better response from Code Review, since you have working code you are needing optimized. — K.Davis 57 secs ago
This might get closed pretty soon as it's not a SO type of question, better on codereview.stackechange.com — Darren Sweeney just now
possible answer invalidation by 200_success on question by Pankaj: codereview.stackexchange.com/posts/185345/revisions
Yeah I'd close it here and repost on the codereview site, you'll get better a response probably — Darren Sweeney 19 secs ago
I can work around the problem if I have to, but I'd rather not. The function I am working on incorporates the logic presented here in Code Review. codereview.stackexchange.com/questions/185329/…Dan Bracuk 55 secs ago
 
11:08 PM
Seems like the conclusion is that this should be moved to code review. I'm (obviously) new here... Is there a builtin way to move it, or should I delete this and repost there? — John Aaron 13 secs ago
possible answer invalidation by kingdom5500 on question by kingdom5500: codereview.stackexchange.com/posts/185164/revisions
 
11:46 PM
0
Q: Need help formatting my code with new if else statement with python/flask

davidjbeilerBefore I added the if, else it was working fine Basically, i want to make it so if the sans.db has been modified once in the morning, do not modify it again when the flask page loads, but if it hasn't been modified create the table, is there a better wwy to do this, currently it doesn't work i...

 
@CaptainObvious borked
@CaptainObvious migrate to SO?
 

« first day (1719 days earlier)      last day (2284 days later) »