« first day (1930 days earlier)      last day (2382 days later) » 

00:00
RELOAD! There are 5486 unanswered questions (89.9755% answered)
00:15
This is not answering the question, so please don't write it as an answer. (The question only asked for digits, so yours is another problem). If you want code review try: codereview.stackexchange.comPinkie Swirl 50 secs ago
 
2 hours later…
02:11
0
Q: Hough Line Transform implementation

yahoo.comI asked this question previously. I didn't like the source code. I mean, the way the code was written, it made things too much complicated. I have written the following code myself: public class HoughMap { public Array2d<int> houghMap { get; private set; } public Array2d<int> image { ge...

03:11
0
Q: Customized ThreadSafe RingBuffer

interceptwindHi I am trying to implement my own lock-free ringbuffer for multiple producers multiple consumers using vector. Can you guys help me review to see if there are any problems and ways to improve? :) Explanation: Each producer runs on its own thread and will use 'Push()' to enter its item into the ...

03:26
0
Q: Displaying topics in a PHP forum

CaptainAmerica16I am very new to PHP. I've only been using it for a few months. I'm currently attempting to build a forum and wanted feedback on some of the code I have so far. These are two files I feel like could have been done better. There are no errors as far as I can tell. I would just like some feedback ...

03:56
If your code/regex works and you're looking for optimizations, it's more appropriate to ask on CodeReview. — Ahmed Abdelhameed 50 secs ago
 
1 hour later…
05:09
perhaps this question is a better match for codereview, but consider reading their how to ask before posting there. — Paul Rooney 55 secs ago
0
Q: Array Partitioning

Lev KnoblockI have a method in Java that I'm using to partition byte[] arrays into a number of fixed-size sub-arrays. It's not necessary for the last array to be that size, but all preceding ones must be, and the maximum size of a sub array is the partition size. Here's the code I've been using: private...

05:30
Monking
Monking
@Phrancis On good posts, definitely. But I'm not leaving enough comments on questions there...
possible answer invalidation by Jamal on question by Predicate: codereview.stackexchange.com/posts/200796/revisions
05:51
@Phrancis Honestly, if a name change breaks your system, you got two options:
1. Create a new user which is effectively a duplicate of the old user and archive the old one.
2. Get a better system. This is a design flaw.
Of-course, 1. will break history, but it's a heck of a lot cheaper than 2.
-2
Q: How can I Print "TEST" or "ART" horizontally and vertically like this

Yash Bedi___T __TE _TES TEST EST_ ST__ T___ __A _AR ART RT_ T__ Either in C or C++

06:57
0
Q: Circular-shift with variadic bitlength

mbed_devFor some memory masking operations I need a bitwise-rotation functionality for unsigned integral types. I came across to the solutions based on the wiki article, but have not found a variation for a function for bitwise-rotation within an "arbitrary" field of bits. Therefore, I have extended the ...

possible answer invalidation by NinjaG on question by NinjaG: codereview.stackexchange.com/posts/201696/revisions
0
Q: group anagram leetcode in python

NinjaGI was working on this problem online at leetcode, and I was wondering if I can any code review for my code. Thank you. The problem is called group_anagram. Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: [ ...

07:14
Monking
07:26
@Duga rolled back
07:39
Monking
 
1 hour later…
08:42
0
Q: Recursion: Count from x until n and backwards

Fix3rI wrote this recursive function to print a number sequence from x to n and n to x back. I have been thinking how could I improve this and if it is possible to use another ternary operator at the end of the first one. eg.: return x < n ? printNumberSequence(x + 1, n) : n = 0 x > n && x != n...

0
Q: How to remove card from deck of card in java code?

KING ThokIn this project, your team is asked to develop a card game using Java and object-oriented programming technique. This game is played using standard 52-card deck (13 ranks of 4 suits). The followings describe the game rules of the proposed card game.

09:06
@CaptainObvious What makes people think they'll get away with that...
09:42
0
Q: retreive weekly and quarterly data

Mraimoudef retrieve_data(self): res['A'] = { 'this_quarter': { 'ammount_y': self.get_y('quarter'), 'ammount_z': self.get_z('quarter'), } 'this_week': { 'ammount_y': self.get_y('week'), 'ammount_z': self.get_z('week'), } ...

Why would method 3 ever apply? You can document what exceptions to expect. I would reject any except Exception in a code review where the developer can't empirically figure out what exceptions could be thrown, and decent unit testing can expose anything we missed. — Martijn Pieters ♦ 16 secs ago
10:12
0
Q: Search query to find articles on website with certain tags

TschallackaI have the following search query to find pages on my website where i'd like to make as much as possible use of existing functionalities to determine relationship names and to hardcore the least as possible. I have the following relationships: Richpage - belongsTo - Domain - Se...

10:58
0
Q: currency convertor in python

kiran kumarWrite a program that takes an amount in Indian Rupees as input. You need to find its equivalent in Euro and display it. Assume 1 Euro equals Rs. 80. Please note that you are expected to stick to the given input and output format as in sample test cases. Please don't add any extra lines such as...

11:10
possible answer invalidation by mbed_dev on question by mbed_dev: codereview.stackexchange.com/posts/201781/revisions
Mnkng
@Duga @Mast Was going to say that the edit was just to improve readability and did not invalidate the answer.
Mnkng skw
@MathiasEttinger The code was explicitly mentioned in the answer. If the question changes the code, the answer makes less sense.
For example, the question and answer talk about bitwith while in the edit it's bitwidth_u8.
So why rollback to rev 3 then?
No rollback or rollback to rev 2 would have make more sense
The code is not changed, only variable names.
11:20
@MathiasEttinger Latest rev before the answer.
If I read the timeline correct.
Eh.
Looks like answer assumes rev 2?
7 minutes between answer posted and edit, hm.
It is likely that the answer was started while rev 2 was the latest one and posted after rev 3 went live.
Agreed. Rolled back to 2.
Thanks!
And SE keeps wondering why the community thinks they don't listen to user feedback. That bug has been there since the feature was launched and it's still not fixed...
@MathiasEttinger This is probably the most constructive comment I've seen in a long time on such questions:
If only you’d have written the code for this task… we could review it! — Mathias Ettinger 23 mins ago
Fabulous.
Kaz
Kaz
Hi Everyone, it's been a while :)
@Kaz You're alive!
2
cough Welcome back
2
Kaz
Kaz
@Mast Yep. Got a bit sidetracked the past 18 months. Our head of investments/trading quit, so I got handed half of his job to take over. Spent a year building some proper systems & processes, hired some minions to take over my work, got promoted twice, but basically haven't written a line of code in over a year.
Now, having fast-talked my way into the last title promotion, work finally figured out I was vastly underqualified for it, so I persuaded them to move me into PM, and now I'm back to coding again, but with "Manager" in my title.
Looking forward to it.
11:35
Sounds good.
Kaz
Kaz
Have I missed much around here?
You probably missed the moderator election.
Mug, 200 and janos stepped down. Vogel, rolfl and Simon stepped up.
0
Q: Binding a foreground service in android for OREO

Nepster I am trying to create a service that will act both as bind and foreground. Am I doing it in the right way .Kindly review it... public class BindingActivity extends AppCompatActivity { private Context mContext; private LocalService mService; boolean mBound = false; public fin...

@user3616622 like suggested by 2pha you need to make a code review of your custom JS , you probably made a mistake or code standard not respected — Fky 1 min ago
Kaz
Kaz
@Mast Always sad to see awesome people step down, but always good to see awesome people step up as well. Sounds good. How's the site doing?
11:45
@Kaz More questions, more answers, relatively more zombies. Some more regulars got less regular, others come in their place. Doing relatively well, I guess.
Welcome to The 2nd Monitor @Valgaal
@Kaz We're still racing to 10k, I don't post enough content...
in The Nth Monitor, 12 hours ago, by Duga
Mast vs. Kaz: 198 diff. Year: +282. Quarter: +27. Month: +19. Week: +3. Day: 0.
Kaz
Kaz
@Mast :)
Chance would have it I'm currently writing a piece of VBA for a work-related drawing viewer. I started with that an hour ago and all of a sudden you show up.
I wonder.
0
Q: Get checkbox value of unchecked checkboxes in a tale

AnnaKleinI have a table where a user can (un)check checkboxes among other features in each row. I faced the problem that I don't receive uncheked checkboxes to my backend. This led to a bigger issue since every row should have synchronized fields of course. For example: Row 1 - checked Row 2 - unche...

12:05
possible answer invalidation by erturne on question by erturne: codereview.stackexchange.com/posts/139875/revisions
@Duga seems fine
Greetings, Programs.
I'm voting to close this question as off-topic because it is asking for a code review (and this thus too broad / opinion based). It could probably be adjusted to be on topic for the code review stackexchange. — Quentin 29 secs ago
12:45
possible answer invalidation by Shelby115 on question by Shelby115: codereview.stackexchange.com/posts/201581/revisions
@Duga Requested by the writer of the only answer of the question, ok.
12:59
-1
Q: Null exception on initializing list in class

Bob McCarthyI have the following class which contains a List. After instantiating class I initialize each member but I receive a Null exception when I try to initialize the List member. p.FACILITY_TYPE is not null and contains a valid string value. How can I fix this? class Facility { publ...

13:29
0
Q: Int to Enum Extension Method

user1424660As you know, converting an int to an enum is straightforward. Doing it generically with type/range checking isn't. I looked for a reusable example since this seems like a common situation but did not find a suitable one. If one exists, please let me know. Below is a C# extension method that encap...

1
Q: Simple CLI Python Hangman game

James WhiteleyPreamble: I am very new to Python, and outside of Googling functions and a former work colleague telling me why I'm wrong, I have no formal training and haven't taken any "Learn Python" courses. I have written a CLI Hangman game which selects a random word from a ~7000-line list of words (in ano...

0
Q: User defaults extension

graceHi I'm new to iOS and I need help refactoring my UserDefaults code so it looks neater. I'm getting information from textfields and saving them on button click. All the code is in a View Controller, is there a way to clean up that View Controller let userDefaults = UserDefaults.standa...

@CaptainObvious A Kenyan writing Dutch?
13:59
0
Q: Command line todo list manager

MarcoLucidiThis is a tiny project of mine, a minimal command line todo list program that I regularly use to manage my todos. It saves todos using GitHub markdown task lists format in a plain text file. The whole thing is divided into three files: utils.c, todoargs.c and todo.c. utils.c contains few smal...

-1
Q: should I wrap pytest parameter before testcase

jacobcan118Question aboutif I should optimize the code as test_prefix_2. I have one testcase required passing different parameter that are changed in some case and some parameters are not changed. Two different ways to write it like method 1 or method2 However, since parameter state, country are used for t...

14:12
Your question doesn't make much sense in its form. A) you have working code, and requests to review/improve working code belong on codereview.stackexchange.com B) there is a of material about "real world" checks for prime numbers. Don't expect that other people take your code and put in the work to implement another kind of algorithm. — GhostCat 46 secs ago
I explicitly stated that I DON'T want people to implement other algorithms. I just want to know how to handle large inputs, since my code only works up to 9 digits. The duplicate link you posted also uses int's so it will probably also have the same restriction. As for posting on code review, fair enough. I'll post there instead. — ruckarucka 27 secs ago
And as said: questions to review working code are off topic here. That is what codereview is for! — GhostCat 40 secs ago
So I guess that means that A) the code I have in its current form is the fastest it can be without implementing a new algorithm. B) A new algorithm is a prerequisite for larger numbers and faster speed. That's fair. And I will post on code review instead. — ruckarucka 25 secs ago
14:44
0
Q: Developing a method of programming a multi-level menu using Java

JacobI am attempting to create my own speech to text assistant. This involves the user speaking and the assistant responding to the user's input. I do this by looking for keywords that indicate the user wants to initiate a certain command. However, some commands can only be accessed if prior commands ...

15:03
Monking-ish
Nibjubg
15:49
The connection code is the same always. I was told by a code reviewer that this was inefficient. I'm trying to make sure I'm doing it right. Could any of this produce the IO Exception? — John Wooten 45 secs ago
:46247293 reopened :)
16:14
-2
Q: Need Help . Code to put in a for-each loop for the Pattern Loop Exercise

delluserI'm working on the Pattern loop exercise posted at : http://anh.cs.luc.edu/handsonPythonTutorial/loops.html#type2hint2 . The question is : Write a two-line for-each loop in a file types2.py containing a call to the type function that will have the same effect as this code in example file ty...

0
Q: Extending kotlinx.html dsl to create functions that include bootstrap classes

Johan VergeerI'm looking to create a library that extends kotlinx.html and will include functions that have default css classes. The goal is to be able to use a function row{} instead of having to type div(classes = "row"){} each time. I would like to create these functions for a lot more commonly used Boot...

16:56
If your code is working and you are just looking for it to be improved, this might be a better question to post on Code Review Stack Exchange. And what exactly do you dislike about the current code? Is it not readable? Not efficient? — Wrokar 16 secs ago
@Slaw It came up in a code review — linuxNoob 43 secs ago
ah thank yoi @Wrokar, I did not know exists a code review stack exchange — Marco Tulio Avila Cerón 44 secs ago
If I were code reviewing I would say return List.of(1) or, with Java < 9, return Collections.singletonList(1). — Boris the Spider 47 secs ago
17:15
0
Q: List all direct and indirect employees of a manager

Justin LingThis is the question: You have an Employee class: class Employee { String name; Integer id, Employee manager } Each employee has a manager and the manager of CEO is null. Find all direct and indirect employees of a manager. For example: Say Employee e1 report...

17:45
-1
Q: looking for my bug

Revelnations//main [courtesy of making games with ben] the code seems to go right to press any key to continue but should be producing two separate node values for [sup noob!] and [Hello strange voice] #include <iostream> #include <cstdlib> #include <string> #include <list> #include "DialogueTree.h" using...

As your code works, it should really be posted on Code Review, not here. — N. Wouda 42 secs ago
Yes, that would be best. SO is mostly meant for help, Code Review for improvements to functioning code - although admittedly, the distinction is not always clear :). — N. Wouda 43 secs ago
18:01
0
Q: Calculate NPS in a stored procedure

FreeManWe collect customer surveys and one of them is the dreaded "How likely are you to recommend our service?" question from which we calculate a Net Promoter Score. (I hate this calculation, but I'll leave that discussion for a different time.) We store the surveys in our database, and, since the qu...

hey @bruglesco - I noticed you sometimes select No Action Needed in the First Posts queue, which I did for a while, but then was pointed to this post
28
A: First Post Review Queue — what is it? Why is it a bad idea to click "No Action Needed"?

rolflWhat items appear in this queue? Overview: What are the Review Queues? History: New Review Queue: First Posts Help: Review privilege The first question a user asks, and the first answer a user provides, will be automatically added to this queue. First posts may also be added to the 'late answe...

 
1 hour later…
19:18
@SamOnela I saw someone (I think it was you) share that yesterday. I will amend my behaviour accordingly. Thanks for the heads up!
cool
I wish I would have read that when I first started reviewing here
I went through many of the review queues on SO a few years ago
0
Q: Match form posted array values and output as matching pairs

user1559189I have a form: <form action="index.php" method="post"> with multiple selection inputs <select class="form-control" id="location" name="location[]" > <option selected disabled value="">Choose Location</option> <option value="closing">Closing Station</option> <option value="device">Device/ROF</...

0
Q: How to make my codes faster?

J.Z.Here are my codes. library(gtools) library(Rmpfr) library(OBsMD) precBits=1000000 K=9 n=1000 p=mpfr(c(K:1),precBits = precBits);p=mpfr(p,precBits = precBits)/mpfr(sum(p),precBits = precBits) zu.mpfr <- function(freq, u, precBits){ sum=mpfr(0,precBits = precBits) n=sum(freq) for (i in (1:l...

19:37
@CaptainObvious hmmm borderline not working correctly
@SamOnela closed by jamal 23 secs ago ...
yeah I see that now
he's so damn fast
maybe it comes from IRS training
0
Q: Checking yet unknown values during the runtime

mayenThe following code should be used to check various conditions and states of data yet unknown, during the runtime. These conditions are subject to changes and I hope to bring up some variability with a solution like this. Defining some standard cases and using them throughout the code, is a thing...

19:56
Man I hate having old vehicles sometimes...
Finding parts is such a PITA.
how old?
1988, but it's a motorcycle.
ah; where do you currently look for parts?
They have most of what I need, but one of the things I need 4 of is 150/ea, and I can't find one of the other parts I need...
would any salvage yards in the area have such parts? or are you mostly looking for new parts?
20:01
Oh well, I'll order the stuff I know I need and find the rest later.
0
Q: Hunt the Wumpus GUI (FLTK)

Sandro4912I used the code from the text based hunt the wumpus game discussed here: Text based game “Hunt the Wumpus” Version 3 to create a gui Version based on excercises from PPP by Stroustrup. For the GUI i used FLTK because the book is based on it. I used it with MSVS2017. I got FLTK to run with thi...

0
Q: Basic dictionary script

ardasevincWell i have this code i wrote that prints the inventory # inventory.py stuff = {"coal":42,"dagger":1,"iron":20,"torch":2} total_items = 0 def display_inventory(inventory): for k,v in inventory.items(): print(k,v) global total_items total_items = total_items + v print("\n") ...

0
Q: Interview Take Home Challenge (What is "wrong" with my code?)

shreddishRecent take-home challenge I was assigned from a recruiter prior to technical interviews with the team. The team wanted it written in GOlang (I had no experience in the language) but told the recruiter I was confident I could complete the task. He mentioned he would let the team know of my inexpe...

would any salvage yards in the area carry such parts, or do you want strictly new parts?
I don't know, nearest actual salvage yard to me is 60 miles or so.
One of the parts I can't find is a gasket, but the one I had was usable, just not good.
20:12
Question: in Python, I can add if __name__ == '__main__': ... to a file so it executes some code if the file is ran by itself; is that possible in C# and/or Java?
0
Q: Find the K largest element in a unsorted array.

NinjaGI was solving the following problem from Leetcode. Find the K largest elements in a unsorted array. Returns an array of the k largest values. Question: Write an efficient program for printing k largest elements in an array. Elements in array can be in any order. For example, if given a...

@Phrancis What do you mean? C# isn't a scripting language, so there's no concept of that. (That's what the difference between Console Application and Class Library is.)
Though it's entirely possible to reference a C# .exe as if it's a .dll, and as such the code in main wouldn't execute by default.
@202_accepted I was just wondering if it was possible to have a different entry point
@Phrancis Not "technically" / literally, but if you create a .exe, you can reference it as a dependency from another .exe (or .dll), so it's the same idea, just a more backwards way of doing it. Burden is on the caller, rather than builder.
I didn't consider Python is scripting vs strict OOP
20:24
Yeah, with python you can include/import the file, whereas C#/Java are both compiled languages, so they have different semantics.
Ah, ok, ty
0
Q: Vowel Counter 2000

Gabriel DiazGreetings. Today I present to you a program that: Identifies vowels and their total number Prints each vowel's numeric value Adds the numeric value of each vowel found Also: Prints which letters are NOT vowels. If you want to check out the rules from where I got the project, here you g...

21:17
0
Q: Concurrent hash map implementation with Go's channels

MariiI've implemented a concurrent hash map in Go. I'm fairly new to this language as I have mostly Python background so I'm looking for suggestions how to improve my code. I've ran the tests with --race and there weren't any reported issues but I'm not entirely sure that data races / deadlocks are no...

21:31
@CaptainObvious Not sure, but maybe this one must be tagged with and [reinventing-the-wheel]
21:43
I'm going to take my first language bronze badge with Go. Really excited about it :)
I find it funny that I have 19/20 questions and only 16/100 score writing nice Go reviews. With JavaScript I got much higher score of 38 with 12 questions with much simpler reviews.
0
Q: Find sum of all perfect squares less than n

loremIpsum1771I wrote the following solution to the leetcode problem 279 "Perfect Squares": Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. def numSquares(self, n): """ :type n: int :rtype: int """...

0
Q: What's wrong with this code for reversing a string?

JustStartedCoding#include<stdio.h> int main() { int string[100]; gets(string); reverse(string); printf("%s", string); } void reverse(int string[]) { int i = 0; for(i = 0; i < strlen(string)/2; i++) { swap(string, i, (strlen(string) - 1 - i)); } } void swap(int string[]...

22:17
0
Q: Codility's BinaryGap: Hardware-aware answer

EduardoThis is a well-known question, which some others have posted about on this site: https://app.codility.com/programmers/lessons/1-iterations/binary_gap/start/ Here's my first shot following a state machine approach: int solution(int N) { int longestSizeGap{}; int sizeGap{}; bool gapSt...

TTGTB
@sineemore Not a popular language, happens here pretty frequently. :/
23:15
If this is working code, you might want to move your question to Code Review. Just make sure to read about the expectations for questions there first, they're different than SO. — Comintern 7 secs ago
23:25
@Duga awareness is spreading (ˆڡˆ)
You just join the codereview version of this site. Everyone there is more than happy to help you with code that you’re passionate about, even if the questions are about minutiae — Marcucciboy2 31 secs ago
> How can you be more then happy? To me this sounds like a dangerous mental condition. "We had to put Dave in the mental home. He was, whahaha, more than happy". - George Carlin
23:50
Hey @stephenRauch
how is the reviewing going?

« first day (1930 days earlier)      last day (2382 days later) »