« first day (2265 days earlier)      last day (32 days later) » 

12:00 AM
RELOAD! There are 6249 unanswered questions (89.7335% answered)
Welcome to SO and congrats on starting a way of programmer. I, though, recommend using a codereview.stackexchange.com for getting code reviews and constructive criticism. — Victor Sergienko 16 secs ago
 
1:01 AM
So is this a code review of working code? — Nkosi 46 secs ago
 
 
2 hours later…
3:21 AM
0
Q: Making a function for a tie game in Tic Tac Toe

winston mcnairI am making a tic tac toe game, and so far there is complete functionality except for a tie game instance. The program doesnt end when there isnt a winner. I am not sure how to approach this, maybe I should add to my champion function, or make a completely new function. Some suggestions would be ...

 
3:40 AM
1
Q: Attendance using biometrics in php

Elliot AHello I'm currently now developing a system using php and Im working on attendance using biometrics. $attendance = [ "2019-07-01 08:00:00", "2019-07-01 13:00:00", "2019-07-01 17:00:00", ]; I have attendance logs where it get the data from biometrics. In my logs it doest designates if it ...

 
4:03 AM
0
Q: dapper if else in insert if id is not null

ost1m1ron -hello if the way to get rid of if else in the code since I noticed that this approach is very often found using (IDbConnection con = new SqlConnectionFactory().Create()) { if (data.ID > 0) { con.ExecUpdate("[dbo].[ta...

0
Q: Triangle of numbers maximum path - Greedy algorithm Python

emadboctorA triangle of numbers path maximized using a greedy algorithm. It's not the most efficient way since I'm a beginner this is the best I could do. I need your feedback on how to make it better in terms of maximizing the total. It works in a way that it chooses the highest value of the adjacent numb...

 
Monking
 
4:23 AM
0
Q: ROT13 encoder/decoder

AJDThis is a simple utility, intended to sit on the desktop for when needed, that does the simple ROT13 encoding and decoding. I am used to coding in VBA, and I am interested in more .Net idiomatic coding styles. Public Class Rot13Decoder Private Sub TextBox1_TextChanged(sender As Object, e ...

 
5:12 AM
Yep. Don't do it!!! - I almost downvoted the question because all I could see were duplicate variable names. That's just a SO post, imaging it getting as far as a code review! — John3136 41 secs ago
possible answer invalidation by emadboctor on question by emadboctor: codereview.stackexchange.com/posts/224318/revisions
 
 
1 hour later…
6:33 AM
This should be asked in code reviewGuy 48 secs ago
 
6:55 AM
possible answer invalidation by johnashu on question by johnashu: codereview.stackexchange.com/posts/224293/revisions
Look like you need https://codereview.stackexchange.com/hs-dev2 MR 25 secs ago
 
7:22 AM
0
Q: Rock, paper, scissors game in Python 3

oscarfrederiksenas a beginner in Python I made a rock, paper, scissors game and was wondering if my code was a bit weird and could be simplified??? print("Rock, Paper, Scissors") def rps(): userInput = input("Please enter your choice: ") userInput = userInput.lower() if userInput != 'rock' and userInput != 'pa...

 
Try codereview.stackexchange.com or softwareengineering.stackexchange.com. But please make sure your question is suitable for these sites too (see help) — Vadim Kotov 51 secs ago
 
8:02 AM
0
Q: Making text based Blackjack game in Java. Can't figure out how to deal with Ace(1/11) and Splitting

NickI've been learning java for about a year in University and decided to start this Blackjack game which I can hopefully animate into a full app in the future, although I'm still working on the functionality atm. The game functions as it should for the most part, but I still can't figure out how ca...

 
8:22 AM
-1
Q: Request to get more efficiently and clearly function

user204879I have function that create token depends on the giving parameters, the JwtSecurityTokenHandler tokenHandler will include different parameters each time the function called. I think the way I wrote it not good enough. any advice? private string CreateUserToken(string memberId, EmailOrPhone email...

 
8:42 AM
-1
Q: Refactoring Generic function with conditions

Musikero31I need your help on how to refactor this. I'm currently "playing around" (if that's the proper way to say it) with generics. So I have 2 classes (EmployeeRegistration and StudentRegistration) which inherits the IRegistration class. Now, I created a method which uses generics in order not to dup...

 
8:55 AM
If you want people to check your code you should post it on codereview.stackexchange.com — LLJ97 59 secs ago
 
9:12 AM
If the code works and objective of this post is optimization/ improvements, CodeReviews is the right forum for it — Rajesh 48 secs ago
@IskrenLalov then post your code at codereview.stackexchange.com. This sister site of SO focuses on improving working code, while SO focuses on answering concrete programming questions. You do not have a concrete programming question, you are asking for opinions. — Shadow 19 secs ago
I'm voting to close this question as off-topic because there is no actual programming question, the OP wants opinions whether the code follows best practices. Such questions are on topic for codereview.stackexchange.com. — Shadow 45 secs ago
 
0
Q: am I using the Factory pattern right in my code & how I can test it?

Rasheed SamawiIn my application I have an Interface "IEmailNotification" that represents an Email and the concrete implementations have nothing to do with MailMessage class so to be able to send it through SmtpClient I used an adapter to let the communication between SmtpClient & IEmailNotification possible an...

 
9:45 AM
In addition to this, you can take reference from the code here. It uses jQuery, but you can reuse the calculation/creation logic and skip jQuery part — Rajesh 42 secs ago
Stack Overflow is for specific programming problems. It is not appropriate for broad, open-ended questions such as "Any suggestions?". Try code review. — Michael 21 secs ago
 
10:00 AM
Quiet in here.
@Duga shrug
 
0
Q: Collecting numbers in ascending order

problemsolverWhat kind of algorithm wold solve the following problem from https://www.ohjelmointiputka.net/postit/tehtava.php?tunnus=junar ? I have been given a positive integer n. Take the n first positive integers 1 to n and permute those to some order. At the beginning you can swap the position of two num...

0
Q: Find Todos by Line Number (or any other reference) in Python - Revised as functions

johnashuA new function based version of the code from this question as suggested by by @Hlib Babii https://codereview.stackexchange.com/posts/224288/edit I write a lot of TODO's but I never keep track of where they are. This program will search through files (and recursively through folders if needed)...

 
10:42 AM
0
Q: Efficiency of the method of loading all related entities for one main entity

OwlI have method Load(int id) which should load all related entity for one Contract. I have some problems with understanding how the data is loaded into EF Core. I would like to get a feedback on how efficient the current implementation of the Load() method is. For my computer, time from Stopwatch:...

 
11:21 AM
0
Q: Dynamically inserting html from external file and updating the database

IskrenI need some suggestions on how to approach this. I want to allow users to create sections of website. The code so far is working but since I am new to back-end I feel like there is better, more elegant way to approach this. I am open to any approaches, as long as the code is kept as concise as po...

 
12:21 PM
0
Q: Handle Exceptions when reading excel data using Apache POI?

KennyBartManI have the following code which is working but I am not satisfied with it and it seems like an ugly hack. NppColumn is an enum which contains the column indexes. The problem is when a POI row cannot be saved in the vehicle object a class cast exception is thrown. I want to know which column caus...

 
12:38 PM
For broad, open-ended questions about improving working code, post on Code Review. This off-topic for Stack Overflow. — Michael just now
+1 for recommending this be enforced during code review. Unless the compiler can guarantee parts of the architecture you must rely on peer review. — Greg Burghardt 32 secs ago
 
1:41 PM
0
Q: Staircase challenge - Python

EML Your task is to print all unique ways to climb a staircase of length n where, from each step, you can take steps of size x where x is an integer value from an array For example: if you want to climb a staircase of length 3 and you can move [1, 2] steps from each stair, the output should be ...

 
2:21 PM
0
Q: Please help refactor these jQuery code selectors for checked and unchecked checkboxes

kigAs you can see below, the following code has redundancies: $selectContainer.find('label[for="vendor-product-checkall"]').on('click', function(e) { var $isSelectAllChecked = $('#vendor-product-checkall').prop('checked'); if($isSelectAllChecked == true) { $('.data-g...

0
Q: A way to simplify this jQuery?

ToddTI have an app that after install, "reads" the site for the checkout button. The issue is, is that we have 100's of customers with 100's of different themes, and theme customizations. So we end up having to customize the query for each store. What I'm hoping to do is somehow simplify things so tha...

 
3:01 PM
0
Q: Generate random letter without repetition

Alexanderi have this code but it brings repeated results i want it to generate without repeating the letters private char[] lettersArr = "abcdefghijklmnopqrstuvwxyz".ToCharArray(); public char generateLetter() { return lettersArr[rdm.Next(lettersArr.Length)]; }

 
3:17 PM
0
Q: Why was my question put on hold for Authorship of Code even though everything was written by me?

LeoVenI have this question that was put on hold because some people thought the code was not made by me, putting the question on hold and so I got no feedback or code reviews for it because some people simply don't care! I've spent 4 days reading through papers and other people's code to understand how...

 
poke @Donald.McLean @Hosch250 @pacmaninbw ^^
 
VTRed, and apologized on the meta.
 
If it works then it should be on code review not SO. — Error - Syntactical Remorse 18 secs ago
 
3:33 PM
Nibjubg
 
@SᴀᴍOnᴇᴌᴀ bless you!
 
@Vogel612 Authorship?
 
If the code works and you just want someone to review it, there's a specific site for that: Code Review. SO is for when you're stuck and can't get your code working. — Magnus Eriksson 45 secs ago
Code Review is the more appropriate place to ask about improving code style. — Barmar just now
 
@SᴀᴍOnᴇᴌᴀ ahhhh... wasn't familiar with that variation on the theme.
nibjubg to you too!
 
3:42 PM
ヽ(´ー`)ノ
@pacmaninbw Do you remember which VTC reason you selected for that one?
 
@SᴀᴍOnᴇᴌᴀ Yes, I thought that the OP copied the code from someone else's GitHub account. The way the text in the question reads is what caused me to cite Authorship.
I've already voted to reopen.
 
3:58 PM
okay... your message ~25 minutes could have been perceived as you not knowing why it was closed as such...
17 mins ago, by pacmaninbw
@Vogel612 Authorship?
 
@SᴀᴍOnᴇᴌᴀ Vogel didn't reference the item in his poke.
 
oh, well he included ^^, pointing to the previous post (about the meta question), which had a link back to the CR post
 
0
Q: Display errors without static function calls

Michael ArrisonI'm trying to avoid using static functions as much as possible. But the code is so clean when I use them. How would you cleanly refactor this without static functions? <?php class display { public static function error(string $message) { ...<render message>... } } ... if ($p...

0
Q: Adding a Node to the Linked List is taking a longer Time when using a reference to the Tail Node

MANOJ VARMAI am trying to add two numbers in the form of linked List and return their result in a Linked List as given in https://leetcode.com/problems/add-two-numbers/ Question: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and eac...

 
@CaptainObvious looks a bit like stub code, but apparently Your Common Sense went ahead and replied
 
Monking
 
4:10 PM
possible answer invalidation by dfhwze on question by Gilad: codereview.stackexchange.com/posts/158664/revisions
 
@SᴀᴍOnᴇᴌᴀ Yes, at which point I read the meta question, the the original question, then went to all the links the original question pointed to, found that the owner of the GitHub used the same name as the OP, then voted to reopen, then posted my comment on the meta question. 25 minutes.
 
@SᴀᴍOnᴇᴌᴀ It does look like stub code, can we suggest to Your Common Sense that it might have been better to VTC rather than answer?
 
@Duga meh... doesn't appear to really be much of a code change, nor invalidate the lone answer by dfhwze anyway
 
If you are asking about the semantics of writing good code then this type of question may be better suited to codereview.stackexchange.com. The syntax of the snippet in your question is OK, but implementation is another matter. — MrWhite 52 secs ago
 
4:18 PM
 
@pacmaninbw I'm not sure... the content of his answer feels too long to be a comment, and wouldn't be something that should be in a comment... while the code leaves out certain details (E.g. what $problem would look like, the implementation of display::error()) it seems (at least to YCS) that there is enough to provide an answer; I am interested to hear the thoughts of others
 
4:32 PM
@SᴀᴍOnᴇᴌᴀ I generally leave a question with an answer open. I would have VTCed because of the ellipses. The question is too hypothetical and not the kind of question's that we should answer on CR. Since Your Common Sense has a great deal of experience on SO but not so much on CR it might be a misunderstanding of what CR is about. The code posted is not working code.
@Mast @Vogel612 ^^
 
0
Q: Implementing Linked lists in Python from scratch

Matan CohenAfter finishing my ds and algorithms course I wanted to implement what I've learned through the semester so here is my try for Linked lists, both regular (one way) and double one (two way). code: from abc import ABC, abstractmethod from node import ListNode ''' ABSTRACT DATA TYPES ''' ''' Link...

 
4:54 PM
@pacmaninbw YCS has 164 answers on CR...
 
 
1 hour later…
6:00 PM
0
Q: Managing millions of objects in a MMO game server

SvtyrosA litle context: This game server is coded entirely on C-with-classes (plain C code using basic C++ features like classes, templates and such, to avoid any possible overhead). At startup the server allocates a big block of memory to hold an awful lot of objects (talking about millions of objects...

 
6:40 PM
0
Q: leetcode 987. Vertical Order Traversal of a Binary Tree

A.Leeanyone can provide some suggestion about my answer for the questions 987. Vertical Order Traversal of a Binary Tree Given a binary tree, return the vertical order traversal of its nodes values. For each node at position (X, Y), its left and right children respectively will be at positions (X...

0
Q: Hurst Exponent Calculator

Matthew AndersonI am aiming to compute the Hurst Exponent of a 1-D signal time series in Python. For now, I have one existing function hurst(sig) which returns the Hurst exponent of sig as a float. Unfortunately, the code runs very slowly even for signals with only ~3000 data points. My main concerns are: C...

 
7:00 PM
0
Q: Type & Thread-safe Logger Implementation

Riettyso I had previously posted this question and asked for some feedback regarding my (now) header-only logging system and figured it would be a good time to go back to the changes I made it and see if it can be further improved before starting a larger project. #pragma once /* Header only logging ...

0
Q: Simple income/expenses accounting program

strangethingspyI've decided to start working on a budget application for the purposes of getting started on Rust. In its current form this program takes given expenses and income and tells the user whether they have a surplus, a deficit, or if they are breaking even. I will add more functionality to this progra...

 
7:58 PM
if your code works, and looking for optimizing it then this isn't the correct place for this type of questions, codereview is better suited — Zohir Salak 51 secs ago
 
8:30 PM
But threads at codereview tend to just die alone... — Iskandar Reza Razali just now
 
0
Q: Basic Reinforcement learning in a grid environment

Minh TrietI am implementing the Bellman equation for utilities, in a grid environment as follow. It is an example on Chapter 17 of Artificial Intelligence: A Modern Approach 3rd Edition. There are some math bended in, I would be extremely appreciate if you can verify the mathematical accuracy of my imple...

 
8:59 PM
-1
Q: Finding all possible pairs of square numbers in an array

JanBI am writing a program that allows me to find all possible pairs of square numbers. e.g an array of {5,25,3,25,4,2,25} will return [5,25],[5,25],[2,4],[5,25] since 25 is square of 5 currently, i am using a nested for loop to find the squares. I'm just wondering if there is a better way to do thi...

 
9:39 PM
0
Q: Bowling Kata in Java

Michel Dambros FigueiredoI am sharing my Bowling Game Score Kata made in Java, it is available for whoever wants to code review it. I appreciate any comments. class BowlingGameScore { private int[] pinsKnockedDown = new int[21]; private int currentRoll = 0; void roll(int pinsKnockedDown) { this.pinsKnockedDown[cur...

 
 
1 hour later…
11:04 PM
This may be better in place over at the guys in code review codereview.stackexchange.comNathan 25 secs ago
 
11:19 PM
0
Q: 1: my spider is giving me all the results in one liners on csv file and 2 I can't make scrapy scrape info from the list of links I just scraped

Leonardo QuinteroIn the first place, If I use extract_first, scrapy gives me the first element of each page and if I run it like this it returns all the content I want but in one-liners. In Second place, I can't make scrapy go to the links I just scraped and get information from inside these links, returning an ...

 
This however fells more like a [codereview] — Nkosi 8 secs ago
 
11:37 PM
You should post this question on codereview.stackexchange.comSimply Ged 18 secs ago
 

« first day (2265 days earlier)      last day (32 days later) »