« first day (2405 days earlier)      last day (1598 days later) » 

12:00 AM
RELOAD! There are 6293 unanswered questions (90.0625% answered)
This is better suited for Code Review. Honestly though, I'd probably create "pseudo-constructors" that call a main constructor on behalf of the user. Then have a separate static constructors for each set of arguments that you want to allow. — Carcigenicate 54 secs ago
@Carcigenicate: Thank you. Should I delete this question and ask in code review? — IamNotaMathematician 39 secs ago
 
12:26 AM
0
Q: Overloading python class constructor

IamNotaMathematicianI am trying to create a very basic class: Line as follows: class Line: def __init__(self, x1, y1, x2=None, y2=None, dx=None, dy=None): self._x1 = x1 self._y1 = y1 if dx is None: if x2 is None: raise ValueError("You must specify either x2 ...

 
1:03 AM
0
Q: Bounty Award Procedure may be Unclear

AJNeufeldActually, it was unclear, at least to me. But perhaps it is perfectly clear to others. Irrelevant background: Of the resulting 3 answers, I felt two were good (together they'd be great); the third was a "Your implementation is really good", which it wasn't. From What is a bounty? How can I ...

 
1:15 AM
"any critiques or improvements to my code?" This kind of question is unsuitable for Stack Overflow (too broad), but is ideal for codereview.stackexchange.comkaya3 5 secs ago
 
2:08 AM
0
Q: Using Python to search a sorted 2D Matrix, any critiques or improvements to my code?

mattahttps://repl.it/repls/PlushFluidRecursion <- Code https://leetcode.com/problems/search-a-2d-matrix-ii/ <- Problem class Solution: def searchMatrix(self, matrix, target): """ :type matrix: List[List[int]] :type target: int :rtype: bool """ if l...

 
 
1 hour later…
3:09 AM
-1
Q: Space complexity of a bottom-up binary search tree?

EdamameI have the following code which validates if a tree is a binary search tree. I am wondering in such case, what's the Space complexity here? Although each tree node is creating Integer[] array, array will be out of scope once its parent uses it. So is the space complexity O(N) or O(1) ? Thanks! p...

 
 
1 hour later…
4:11 AM
0
Q: Advent of Code 2019 Day 3, Part 3

enderlandAdvent of Code, Day 3 Problem Definitions input1 = 'R995,U982,R941,U681,L40,D390,R223,U84,L549,U568,R693,D410,R779,U33,L54,D18,L201,U616,R583,D502,R307,U46,L726,D355,L62,D973,R134,U619,L952,U669,L28,U729,L622,D821,R814,D149,L713,U380,R720,U438,L112,U587,R161,U789,R959,U254,R51,U648,R259,U555,R86...

0
Q: Calculate the movement required to get from one angle to another angle on a compass

VaderThe goal of the function is to find out how to get from one angle to another angle. Two things are involved: the amount to move by and the direction (+ means turn right, - means turn left). The most the angle will have to move by is 180deg. The function is rather short. I wanted to avoid using an...

 
4:26 AM
You probably want to post this on codereview rather than stack overflow. codereview.stackexchange.comMatthew Gaiser 55 secs ago
 
4:55 AM
Monking
 
 
2 hours later…
6:29 AM
@AlexanderCécile, I think the question was not about that. The link I provided is not essential to the answer, nor to be considered a complete code review. Otherwise I would have had to embed that code in the answer. Feel free to post your own answer. — trincot 15 secs ago
 
6:43 AM
@trincot Alright, I was under the impression it was a code review! I guess I can always do one myself, yeah. — Alexander Cécile 52 secs ago
 
7:14 AM
0
Q: Java Neural Network Implementation

Edwin CarlssonI have recently tried to get a better grip on machine learning from a point of implementation - not statistics. I've read several explanations of an implementation of a Neural Network via pseudocode and this is the result - a Toy Neural Network. I have used several sources from medium.com and tow...

 
 
2 hours later…
9:16 AM
0
Q: Advent of Code 2019 Day 3

Tobi AlafinAdvent of Code 2019: Day n I'm doing Advent of Code this year. Below is my attempt at day 3: Problem Part One --- Day 3: Crossed Wires --- The gravity assist was successful, and you're well on your way to the Venus refuelling station. During the rush back on Earth, the fuel manageme...

 
9:32 AM
0
Q: Titles that reference external resources

Toby SpeightA couple of us disagreed (in comments) on whether titles such as "Advent of Code 2019 Day 3, Part 3" and "Project Euler nº 5" are reasonable. I believe that such titles are meaningless, and reviewers want some idea of the problem domain when deciding whether to read a question, but there seems t...

 
9:57 AM
0
Q: Advent of Code 2019: Day 2

Tobi AlafinAdvent of Code 2019: Day 2 I'm doing Advent of Code this year. Below is my attempt at day 2: Problem Part One --- Day 2: 1202 Program Alarm --- On the way to your gravity assist around the Moon, your ship computer beeps angrily about a "1202 program alarm". On the radio, an Elf is a...

0
Q: Advent of Code 2019: Day 1

Tobi AlafinAdvent of Code 2019: Day 1 I'm doing Advent of Code this year. Below is my attempt at day 1: Problem Part One --- Day 1: The Tyranny of the Rocket Equation --- Santa has become stranded at the edge of the Solar System while delivering presents to other planets! To accurately calcula...

 
I hope you are aware that this string class of yours has a lot of other problems aside from the one you asked about (and I mean aside from the obvious, reimplementing functionality already in the standard library). If you wonder about what they might be, codereview.SE might be a good place to ask. — DevSolar 1 min ago
 
10:13 AM
Monking
 
0
Q: Generic Implementation for Paging Class in c#

Lalji Dhameliyai have created one generic Page class for store paging information with its data. class look like public class Page<T> where T : new() { private List<T> _list = new List<T>(); [JsonProperty(PropertyName = "total_count")] public long TotalCount { get; set; ...

0
Q: Matrix Addition,Subtraction and Transposing with file handling

QazsThe input is in a file and when you run the program the user will choose which operation #include <stdio.h> int main() { printf("Matrix Calculator"); }

 
 
1 hour later…
11:18 AM
It's worth pointing out that this is a horrible use for a trigger. The correct way to enforce such a rule is a check constraint: alter table tr add constraint phone_length_ck check (length(phone) = 10);. No doubt this is a homework assignment mandating the use of a trigger, but in real life this would fail a code review. — APC 30 secs ago
Isn't this question more a codereview.stackexchange.com question? — Stephan Hogenboom 46 secs ago
 
11:51 AM
Questions about codereview of running code is better asked at Code ReviewJens 10 secs ago
 
0
Q: What model mapper in a service for repository pattern

Kaiser69I have a doubt regard Repository Pattern and services layer. For View layer I have a controller that create an interface from ViewModels DTO (View) and my EntityModels (DataLayer). It's separated correctly and controller/service works with correctly models using mappers. Example: //Model DTO c...

 
 
1 hour later…
1:00 PM
0
Q: Find and replace consecutive string values in a list

badukerSuppose I have a list that holds a list of column names: columns = [ 'Village Trustee V Belleville', 'Unnamed: 74', 'Unnamed: 75', 'Village President V Black Earth', 'Village Trustee V Black Earth', 'Unnamed: 78', 'Unnamed: 79', 'Village President V Blue Mounds', ...

 
1:12 PM
This is about reviewing running code and should be asked at Code ReviewJens 56 secs ago
codereview.stackexchange.com/q/233408/214372 done! once I get the satisfactory answer, I'll delete this question 👆🏻 — Swapnil Kotwal 15 secs ago
 
0
Q: Nested queries in node js

nidaavCan i simplify the following code Conn.beginTransaction (function (error){ if (error) throw error; Conn.query('SELECT TestID FROM Tests WHERE Testname = ? ', testname, function (error, result, fields){ if (error) { Conn.rollback(function(){ throw error; }); }...

0
Q: Single player Hangman in Python

SrivathsThis program is yet to become user-friendly, but it works. from random import choice from os import system clear = lambda: system('cls') # FOR WINDOWS ONLY words = [i.strip() for i in open('words.txt').readlines()] # Possible stages STAGES = [ """ ------- """, """ _______ |...

0
Q: Java check if java native object don't have default value, or whether it is instantiated or not

Swapnil KotwalI have check whether "Java native object don't have default value". Please note: I have to ignore the custom Object values, in case they aren't 'null' /** * This method will check if given object is used by given testConfig file 1. if * instance of {@link String}, and it's value shouldn't be '...

 
1:39 PM
@CaptainObvious I don't have a clue what this question is about.
 
-1
Q: Issue of “Unsupported auth type for ”Try this API“ - api_key:apiKey.” while working on google cloud endpoints with using Nodejs

Vishalt winjitI created open API by using Nodejs and deploy on google cloud endpoints also trying to implement securing this API by using an API key. Then, I created openapi.yaml file added security definition in the bottom that is : # [START securityDef] securityDefinitions: # This section configures ba...

0
Q: stimulateTik Tok Toe game using c language

Avijit MandalI made a Tik Tok Toe game using C.Here two player preaent player1 and player2 are participate and play.Please rate my code and suggest for improvement #include<stdio.h> #include<conio.h> void board(char t[]); int cheak(char T[]); void main() { int i=0,n,r=100,p=1; char TOT[9]={'1','2','3','4'...

 
There is a code review post here that goes into detail on how to create a child process. — ryyker 7 secs ago
 
JAD
@pacmaninbw seems to me like it's an attempt to check whether some object is equal to the class' default value.
 
Monking
 
@JAD Why does that check need to be performed? What is the program/entire class for?
 
JAD
1:54 PM
:shrug:
The docstring seems rather unrelated
and returning List<String> doesn't really make sense to me either
 
0
Q: Merge objects in Kotlin if they are updated

NewUserI am very new to Kotlin and I am trying to achieve this: I get a batch of PersonDetails to save or update In the batch, the same PersonDetails with name is different locale can be present. The end goal of this method is to merge the batch itself and also merge the existing entries in Database t...

 
If it currently works, codereview.stackexchange.com is more appropriate for this kind of question (open-ended requests for improvements to working code). — chepner 30 secs ago
 
2:15 PM
Monking!
 
2:26 PM
Monking @Ethan
Decided to stick around for a while this time?
 
This question belongs on Code Review. — aschipfl 21 secs ago
 
Has everyone seen this yet on SO?
242
Q: We’re lowering the close/reopen vote threshold from 5 to 3 for good

Megan RisdalIt’s my birthday today and I’ve got a gift for you. 🎁 We’re lowering the close/reopen vote threshold on Stack Overflow from 5 to 3. About a month ago, Shog shared the results of our experiment testing this lower close/reopen threshold. From that, we observed that closing, reopening, and editing...

 
Seems so, I suppose; been getting back into development-related stuff lately, so I figured I might as well pop back and stay around CR so I can continue improving. Fwiw, too, I did miss hanging out around here.
@Mast I didn't see that; they specifically mention that the change is only taking place on SO, but I'm curious if they have plans to implement it network-wide.
 
@EthanBierlein There have been experiments on Programmers a lot earlier already, so it's likely they'll try it on more sites now.
 
JAD
2:42 PM
I was kinda surprised that was announced on MSO instead of the blog
 
@Mast Personally I think 5 is the correct number, even though we sometimes struggle to close a question. Overall I think the company is trying to reduce it's dependency on volunteers.
I didn't know about it until you pointed it out.
 
JAD
I think it has a lot to do with the signal to noise ratio in new questions
this is a lot higher on SO than on CR, making CR close voting a lot more manageable
 
@pacmaninbw There's pros and cons to both. Bit ambivalent about it so far.
@JAD We could use more people in the queues though.
 
JAD
I don't have the rep for close voting yet :/
 
2:58 PM
@JAD You could fix that by writing a couple of answers, take down a couple of zombies :-)
But hey, flagging and leaving comments is very useful as well. So if you're doing that, good! Keep up the good work.
We'll take it from there.
 
I did not downvote that but I believe this should be moved to CodeReview — RomanPerekhrest 25 secs ago
 
Lori Colston on December 04, 2019

One of the great secondary benefits of an open knowledge base like Stack Overflow for Teams is that anyone can contribute. When exceptional answers get voted to the top, your organization gets to identify subject matter experts. Today we’re excited to announce our new subject matter expert feature that allows domain experts to be easily recognized and acknowledged within your organization.

The new feature, available on the Business tier of Stack Overflow for Teams and coming to the Enterprise tier in 2020, allows your Team to associate a subject matter expert (SME) with a tag. Multiple Team members can be designated as SMEs for any given tag by your Team Admin.  …

 
3:19 PM
For improving working code, go to Code Review. You'll need to post your code to get meaningful advice. FWIW, if your output is in fact a list and not an iterator, you're probably doing something wrong. And yes using itertools is a good idea. — wjandrea 21 secs ago
 
3:52 PM
@Feeds What's wrong with tag badges?
 
Ideally, you should provide a minimal reproducible example of the flow you're using right now so someone can point to places you could improve it. But even then, it would probably be better on codereview.stackexchange.comEmile Bergeron 37 secs ago
 
4:23 PM
@Mast doesn't account for turnover
 
@Vogel612 Neither does the rest of SE. Is that a problem?
 
for a business offering it is, yes
 
I think the code review community can help you better — Gareth Ma 6 secs ago
 
4:43 PM
Hmmm.
In larger organisations, yes, it could be useful.
 
0
Q: Altering MySql Tables on the Fly - Bad Idea?

FamousAv8erI recently saw a comment on StackOverflow that basically said it is a bad idea to alter tables on the fly. In my case I have a json file that is storing some information about some "products". One of those pieces of information tells other programs which column in a data table is related to this...

 
5:38 PM
maybe you should show it on CodeReviewfuras 5 secs ago
 
6:12 PM
@Mast maybe somebody finally determined a huge close vote queue was not a good thing... like a national debt...
We’ll just put every split decision into a review queue. That’ll solve all our problems. — Cody Gray ♦ 1 hour ago
 
@Mast @Vogel612 I don't think this is for the normal communities, think this is for the new organizational stack overflow.
 
0
Q: RSpec shared example for CRUD Controllers that might be nested or not

ManosI've been trying to create a shared example to quickly and efficiently test controllers with CRUD operations that might also be nested. I came up with this solution that works, but I feel that can be improved. module ApiHelper RSpec.shared_examples "a CRUD controller" do |model:| def...

 
6:46 PM
0
Q: Extension method for getting custom Principal Claim

Michael Brandon MorrisI'm writing extension methods to shorten the code required to get custom Claims from an IPrincipal. I have two general forms for the bodies of these methods. Form 1 public static long? GetFirmId(this IPrincipal principal) { return ((ClaimsPrincipal) principal)?.FindFirst(nameof(User.FirmId)...

 
7:04 PM
 
0
Q: Log the diff of a httpd config file and reload the service with Python and systemd

user12430166Using systemd's .path unit to run a Python script whenever a httpd config file is changed. The Python script creates a backup of the config and logs the differences of the newly modified and backup file. After that it checks the syntax of the httpd config and gracefully reloads the web server ser...

 
7:26 PM
-1
Q: Why isn't my program dynamically adding users?

George BradleyThe following is the scenario which I had to base my program on. I have met all the criteria except the part where users can be dynamically added to an array. I've tried to come up with a solution but to no avail, what I have doesn't work. Does anyone know why or does anyone know of a different a...

0
Q: "Rock Paper Scissors Game" Java

Islam Šakrak What can make this code better? And how could i improve this code? Oh and what,i would love if someone has a project that is not that challenging but I could learn a lot from it :) import java.util.Scanner; public class RockPaperScissors { final static int ROCK = 1; final static int PA...

 
@QuangHoang you're right!, it should start from 0, you found an error in my for-loop code, even if no one will find an answer I am at least happy that you did that code review off my code. thanks. fixing my question. — ohad edelstain 28 secs ago
 
8:25 PM
0
Q: Advent of Code 2019: Day 1

Tobi AlafinAdvent of Code 2019: Day 1 I'm doing Advent of Code this year. Below is my attempt at day 1: Problem Part One --- Day 1: The Tyranny of the Rocket Equation --- Santa has become stranded at the edge of the Solar System while delivering presents to other planets! To accurately calcula...

Trying to figure out why this question is getting downvotes; nobody has commented a rationale and (thus far) I can't seem to find the issue with the question itself.
 
0
Q: String replacement with dictionaries -- follow up

Ethan BierleinI was reminded by an achievement notification yesterday of this question of mine, posted nearly four and a half years ago. After reading through my own code and the review posted, I decided to re-implement it. Thus far, I have implemented a few changes: The function has been renamed to mappin...

 
8:48 PM
0
Q: static memory block allocator in c99

rookieI wrote this snippet to allocate blocks of memory, whose sizes and number are available during initialisation. I choose to equally divide the statically allocated memory. There are some error checks before allocating a block to a pool of memory and I maintain a free list in the memory blocks. It ...

 
8:59 PM
@CaptainObvious Too much is currently missing from the code to be able to review it.
 
0
Q: Less incomplete Z80 emulator written in C++

JL2210Follow-up to Partial Zilog Z80 emulator written in C++ I would say that I'm still new to the language, so I'm going to keep the beginner tag this time. Changes: I've implemented the suggestions from @1201ProgramAlarm and have implemented about 1/4th of the instructions in the main set. I have...

0
Q: Wrapping a C API to be implemented in rust

stewbasicI'm writing a Rust library to facilitate implementing the following C API in Rust: // Called first. Implementer may allocate memory here. void init(); // For each input: start is called, then run is called repeatedly, finally stop // is called. The input pointer is valid until the end of stop. ...

 
Requests to improve working code belong on codereview.stackexchange.com. That said, not every task benefits from OOP. Also, nothing you are doing in this script will raise a SyntaxError that you can catch at run time in Python 3, and if you are using Python 2, you should be using raw_input, not input. — chepner 47 secs ago
 
9:47 PM
What about unsent comments? I'm not finished with a larger code review but need to close VS. — StingyJack 36 secs ago
 
0
Q: Converting a Sql Query to a Linq Query

Sadi SerdariI'm trying to convert my Sql query to the Linq query below. code is stuck in the Number of Days Remaining Birthday only code, and I cannot proceed. Waiting for your ideas and suggestions. Thank you. SELECT CONCAT(c.Name, ' ', c.SurName) AS NameSurName, c.BirthDate AS BirthDate, FLOOR(DATEDIFF(dd...

0
Q: A simple 3D Wrapper class around std::vector

Tyler ShellbergI am working on a very simple 3D vector class, which I can use to set up and access three-dimensional vectors using a wrapper around std::vector. It's not intended to be foolproof, just good enough to get by. The main goal is to make it simple to use, explicit and easy to debug. I have often acc...

 
9:59 PM
Anyone seeing any problems with page layout?
Actually found it on meta meta
27
Q: Strange overlapping post-layout and sidebar

GammaGamesI've noticed this issue on a handful of other communities, but making the browser window narrow (mine is 1080x960) makes the .post-layout and #sidebar elements overlap. Maybe something to do with the grid CSS? The #mainbar element seems to be the correct width and changing the .post-layout's over...

 
@Peilonrayz Saw it here
 
0
Q: C++ Robust UI Transition System

Daniel GI am writing an animation system for GUI elements of my own user interface layout system. I am struggling trying to find an easy way of extending the base animation class. Here it is: class Animation { private: // Thread to run the animation on std::thread anim; // Total time for ...

 
@AGirlHasNoName That looks better than the one I found 😂 Even effects answers...
 
Thats a good one
 
11:05 PM
possible answer invalidation by Montmons on question by Montmons: codereview.stackexchange.com/posts/233295/revisions
 
11:38 PM
@Duga rolled back by @ethanBierlein
@EthanBierlein ¯\_(ツ)_/¯ revision 1 wasn't much different than the current form
@SᴀᴍOnᴇᴌᴀ good job remembering to escaping the escape character this time!
3
 

« first day (2405 days earlier)      last day (1598 days later) »