« first day (2181 days earlier)      last day (1837 days later) » 

12:00 AM
RELOAD! There are 6002 unanswered questions (89.8510% answered)
 
 
2 hours later…
1:33 AM
StackOverflow's scope is limited to code with specific problems. If you want suggestions around improvements, that's what our sister site Code Review is for. — Charles Duffy 6 secs ago
 
1:47 AM
@CaptainObvious
@Phrancis
 
 
1 hour later…
3:00 AM
0
Q: Having single DAO parent class in an EJB application

ps0604I have the following DAOParent class that I use to put connect/disconnect code in one place. Each DAO class in the application is an EJB that extends DAOParent (note that I don't use JPA): public class DAOParent { private InitialContext context = null; private DataSource ds = null; ...

 
3:22 AM
 
 
2 hours later…
5:20 AM
0
Q: How to use numerical conditions in python?

Jack FishburnSorry for my noobness but I've never really used math in python. My goal is to create a dice rolling game in python. def roll_dice(): print("You rolled a " + str(random.randint(1,6))) if dice == "1": roll_dice() etc for as many as 3 dice. I need to know how to set winning conditions....

 
Belongs to Site: Code Review... — Namoshek 46 secs ago
 
5:39 AM
0
Q: Array Dynamic resize in heap

f1r361rdI have answered a Question in Stackoverflow link. a) Create a function called resize that can be used to increase the size of integer arrays dynamically. The function takes three parameters. The first parameter is the original array, the second parameter is the size of this array, and t...

 
6:06 AM
This would go better on a codereview page. — Stultuske 16 secs ago
 
6:35 AM
And that isn't C#. In general though, if you've got code which works but you want to improve it, you should probably ask on codereview.stackexchange.com — Jon Skeet 17 secs ago
 
6:45 AM
possible answer invalidation by f1r361rd on question by f1r361rd: codereview.stackexchange.com/posts/218994/revisions
 
7:08 AM
Monking
@Duga rolled back by 200_success
 
-1
Q: Intro Python Tic Tac Toe

Muhammad Hamadi have an issue with my program as is written. I have the game going to the point of a win, which results in the winner being declared and the board being shown. I would like a restart function to then be ran. However I get the text but no input prompt. I also have the methods if that would help ...

 
@CaptainObvious Classic "doesn't work the way I want it yet"
 
7:27 AM
Hey @Vera, as i can see you are new to this platform... but for code review please use codereview.stackexchange.comFabian 47 secs ago
I think SO is not the right place to ask it. Try here: codereview.stackexchange.comSebastian Kaczmarek 52 secs ago
 
8:30 AM
possible answer invalidation by Anakhand on question by Anakhand: codereview.stackexchange.com/posts/214953/revisions
 
8:44 AM
@Vera That's okay! I'm just clarifying your question is actually "How do I make my AI play better?" and then you mention your MCTS attempt. If you see the poor play is not acceptable at all then it could stay on Stack Overflow because that's troubleshooting. If the poor play is just a small detail and you want to know how to make it better, then you can put it on Code Review SE for reviewing. — lucasgcb 11 secs ago
 
0
Q: Pin "How do I write a good answer?" in the Help Center

AlexWhile giving feedback on first answers, I often find it convenient to also link to How do I write a good answer? in the Help Center. Since I haven't thought about a good "template" text I can copy and paste (yet), I often find myself looking up that link in the Help Center myself. As you can see...

 
0
Q: Table View Controller class in Swift

Richard RobinsonMy TableView consists of four cells (for blacklisting categories) with a boolean property (indicated with a checkmark) and another cell with a UISwitch embedded in it. My current controller is as follows: class TableViewController: UITableViewController { var blacklisted = Set<Category>() ...

-1
Q: finding course ID in record

SamJonesI am trying to enable a voting system where i can upvote and downvote using an enum and also i have applied the appropriate relationship between all classes but when i try to find the @course = Course.find(params[:id]) i get an error "can't find id= " empty id but when i use @course = Course.find...

 
9:30 AM
possible answer invalidation by JimboFlex on question by JimboFlex: codereview.stackexchange.com/posts/217973/revisions
 
10:10 AM
0
Q: A* algorithm as simple as possible

ChatterOneI'm a beginner when it comes to path finding, so I decided to write an as simple as possible (to me) A* algorithm to learn. I looked up on internet the general idea and found some pseudo-code that I translated in Python. What I'm most interested in is if I'm missing some edge case or not (I wro...

 
10:29 AM
-1
Q: Scrapy Returns no data

M. ObyI am beginner in scrapy. Can someone please help why it returns no data. I am trying to scrape email address from "https://www.iald.org/Designers?search=true&pt=&st=&stc=&sts=&sc=USA&ma=" Thank you Sir. # -*- coding: utf-8 -*- import scrapy class IaldSpider(scrapy.Spider): name = 'iald' ...

0
Q: Suggestions for optimising this front end code

Matt KentI've stumbled across some UI (React.js) code that I've worked out to have a time complexity of O(n^4) (I hope that's right, if not please do correct me). I was interested in how one might go about optimising something like this. I know that for() loops do perform slightly better than array.forEa...

 
 
1 hour later…
11:33 AM
The OP in this question admits that either the code hasn't been tested or it doesn't work because it is a work in progress codereview.stackexchange.com/questions/217973/…
 
11:47 AM
-1
Q: K30 CO2 sensor readings triggers URL variables

Sebastian Montanares-- Raspberry3, Python3, writing and compiling in GEANY-- The provided code for my CO2 sensor wasn't working, so i had to rewrite it. Have i done it correctly? I've borrowed some code snippets from the web. I need to make some variable parameters, and i don't know how to do it, in a good manner....

 
I'm voting to close this question as off-topic because this question should be on codereview.stackexchange.comJoseph Wood 19 secs ago
 
12:25 PM
possible answer invalidation by Sam on question by Sam: codereview.stackexchange.com/posts/217955/revisions
possible answer invalidation by ChatterOne on question by ChatterOne: codereview.stackexchange.com/posts/219006/revisions
 
 
1 hour later…
1:44 PM
0
Q: Efficient counting sort for large byte arrays in Java

coderoddeI have this counting sort for byte values running in linear time with respect to array length: Arrays.java package net.coderodde.util; import java.util.Random; /** * This class contains static methods for sorting {@code byte} arrays. * * @author Rodion "rodde" Efremov * @version 1.6 (Apr...

0
Q: vuejs vuex element-ui used to toggle a login dialog but req

John<template> <div> <el-button v-if="!authenticated" @click="visible = true">Login</el-button> <el-dialog :visible.sync="visible" title="Login or Register"> <el-tabs v-model="activeTab"> <el-tab-pane label="Login" name="login"> <log...

 
Greetings, Programs.
 
2:03 PM
0
Q: Secure session handling in PHP

J. DoeI tried to search and read for 10-12 hours on how to have a secure session, and this is the code that I came up with. (found no good book or article with complete guide about PHP Sessions, each had something and missed something else) Could you kindly please check if I have taken the necessary s...

 
@pacmaninbw Something being a WIP doesn't make it off-topic. Is it broken or something?
 
@Peilonrayz I don't think it works.
 
@pacmaninbw So it's a hunch that it doesn't work, and there's the possibility that it in fact works?
 
@Peilonrayz yes. I haven't tried testing it, I don't believe there is enough context to test it.
 
@pacmaninbw Something doesn't seem right here. You first said that WIP is off-topic, then you said it's broken now you're saying it's lacking context. The fact you've flip-flopped so far make make me seriously question your rational for saying it's off-topic.
 
2:36 PM
@Peilonrayz and that s why it takes 5 VTC to close a question. I feel it is a bad question, everyone else may disagree. I'm not always right. I don't plan on ever running for moderator.
 
@pacmaninbw We have plenty of 'bad' questions, doesn't make them off-topic. Your mentality will hinder the site if we get more active users.
 
0
Q: Javascript ES6 Coding Challenge

user6248190I am Learning Javascript, after doing Java development for 2 years. I am doing a module on udemy which had a coding challenge which I completed and it works but wanted to get it reviewed to find out best practices and how the code can be improved and optimised. Here is the Challenge ///////////...

 
Your question is probably better suited for Code Review. — Alex 1 min ago
 
2:53 PM
If your code is working, your question might be better suited for codereview.stackexchange.com. — Thierry Lathuille 33 secs ago
 
@Peilonrayz Please see the comments on the question, OP says it doesn't work codereview.stackexchange.com/questions/217973/…
 
@pacmaninbw It's ambiguous if the no is in regard to it working. It could be just a reply to "Have you tested it".
 
@Peilonrayz What do you want me to do?
 
@pacmaninbw Wat
I wanted to know why you VTC to also VTC. Given that the reasoning is a hunch, I'm not going to VTC.
 
posted on April 24, 2019 by CommitStrip

 
3:03 PM
If you want recommendations on code that actually works (for better or worse), Code Review is a better spot. Even then, if you do decide to go there you should try to make your concerns a little more specific than "is this the best way" -- are you concerned about maintainability? Performance? Safety? — Jeroen Mostert 47 secs ago
 
@Peilonrayz OK. There are 2 problems as I see it, 1 I can't test it, and 2 I think it is not fully implemented and doesn't work as it is currently implemented. If you don't think you can VTC, I don't have a problem with that.
 
Monking
 
3:20 PM
1
Q: Diictionary search: compare many values in a dictionary using keys

Noah16What I have: Mainly, a graph consists of 10000 nodes and around 500000 edges. I would like to construct a dictionary where keys are the edges and the value for each edge is an array consists of 0, 1, 2 or based on a comparison between the values of another dictionary (as detailed in the algori...

 
3:56 PM
I'm voting to close this question as off-topic because SO is not a site for code reviews. — Caleb 18 secs ago
If you do post on CR please read What topics can I ask about here? - note that it states: "It is fine to post supplementary code on a third-party site, but the most important parts of the code must be embedded directly in the question." — Sᴀᴍ Onᴇᴌᴀ 14 secs ago
 
0
Q: Find png files in folder structure and map it to Photoshop Groups and Layers

wizofeI've created a heavily problematic code that works. Summary: It looks through a folder structure, for png files and tries to replicate this structure in Photoshop. Files are mapped layers and Folders to Groups. I am using comtypes to access Photoshop and create the groups and layers. The issue ...

1
Q: How to split numbers into different type of coins

SaelythI have 3 types of coins: Gold, Silver, Copper. 1 silver = 100 copper. 1 gold = 100 silver. My input is always in coppers, and I want to be able to make it a bit more readable. So far my code is: def api_wallet_translate_gold(value): """Translate a value into string of money""" if va...

-1
Q: Code output should be what's left in stock but I get a different output

AdeWas hoping to get some feedback on this code, and why I might be getting the output that I'm getting and not an output for what's left in stock. The output that I get is . Code is posted below, thanks: import requests from bs4 import BeautifulSoup as bs import random session = requests.sessio...

 
Monking
 
4:13 PM
@EdCottrell agreed. I am just pointing OP to correct direction. He needs to post specific parts of code to get reviewed on code review stackexchage. — kalimba just now
 
4:33 PM
mc1arke @ There is no one to review the code and want it automated via sonarqube. I have to look for plugins that are available in Sonarqube that has the rules that code reviewers look for in the code. great that you replied, thanks. — arunp 32 secs ago
 
Hehe:
Does anybody even bother to do a web search before posting here? See docs.sonarqube.org/display/DEV/Adding+Coding+Rules then edit your question to clarify what's still missing. — Robert yesterday
 
0
Q: Saving row versions in MySQL

ControlAltDelI just want to confirm that I am versioning my "versionable" fields correctly, and that there isn't another, better way to do this. I have a table event, a record of an event in time. It has some fields that I want to be invariant, like it's ID and event series it is associated with. It also has...

 
This belongs on codereview.stackexchange.com not here. — Daniel T. 13 secs ago
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comDaniel T. 5 secs ago
@DanielT. Feel free to recommend the OP post on CR but in the future, please don't use the existence of the Code Review site as a reason to close a question. Evaluate the request and use a reason like too broad, primarily opinion-based, etc. Then you can mention to the OP that it can be posted on Code Review if it is on-topic. Please see the section What you should not do in this answer to A guide to Code Review for Stack Overflow usersSᴀᴍ Onᴇᴌᴀ 1 min ago
 
5:16 PM
0
Q: Jug problem - 3 jugs (solved - code improvement)

EMLSo I have solved the jug problem with 3 jugs: For jugs size A, B and C find the minimum number of steps to reach D, where D < max (A,B,C) My code is below. I am wondering if there are other ways, faster ways or more efficiency ways to compute the answer. Solution in Python 3 Thanks #Creat...

 
5:28 PM
> why I might be getting the output that I'm getting and not an output for what's left in stock
That's a request for explanation of current bugs.
Quite broken.
 
@Mast I can't find that quote
 
@CaptainObvious @Peilonrayz that appears to be the opening of this post: Code output should be what's left in stock but I get a different output from ~1 hour ago
 
@SᴀᴍOnᴇᴌᴀ Ah cheers, thought I saw, and closed, something like it earlier today.
 
IDK why Mast replied to pacman instead of CAptain
 
0
Q: Central Game class: Valid approach ? Coding practices

Sparda Dante3085I have worked on a SFML Game/Game-Engine Project for 2 months now and am looking for some feedback in terms of... Is this a valid approach for a Game class ? Are there any glaring C++ coding practice mistakes ? The following code is from my Game class which is the main organizational unit of ...

0
Q: Should my MVC controller create objects from "AddCustomerView" or should I specifically create a "handler" class for this?

ryansanI have a MVC project with a simple view where the user can add a customer by filling in name and address. The controller checks if the TextFields aren't empty and adds a new customer. I'm wondering whether I should move this to another class that handles creating a new customer from these fields,...

 
5:38 PM
@SᴀᴍOnᴇᴌᴀ I replied to Peilonrayx
Because he asked a question
 
ah - wrong user but my point was that you replied to him instead of Captain
 
@Mast That was in response to a different question.
I've not looked into whether it's on/off-topic, but the reasoning everyone seems to have used looks really lazy and borked to me.
 
@Peilonrayz Oh, not sure why you linked to a different comment then, but ok.
 
@Mast Did I reply to the wrong thing in the comment you replied to?
 
@Peilonrayz You replied to this.
 
5:46 PM
Welcome to SO! There's a different site for reviewing your codes having its good name as Code Review SEChirag Jain 36 secs ago
 
@Mast That's the correct comment. That comment links to the C# question, not a Python one.
 
@ChiragJain in its current form, this post would not be on-topic for CR because it lacks context. See "Which Site?" and "Code Review or not?"Sᴀᴍ Onᴇᴌᴀ 7 secs ago
 
0
Q: Tkinter buttons won't work on click

Satyam NiranjanMy code here has a chess matrix where a Tk window will appear when the pawn reaches the last block.The Tk window is created along with the buttons but the buttons won't work.And when I close the Tk window the last button command gets executed.This is just a part of my code,I can provide more if n...

 
6:50 PM
@CaptainObvious RBA
 
7:32 PM
0
Q: Using Interface Segregation Principle in Builder Pattern

RikudouSenninIn one of the youtube videos from Rachit Jain, He defines a problem with a set of restrictions and achieves it by using Builder Pattern and Interface Segregation Principle. Restrictions On creating an object for the class all the member variables must be initialized by the value given by the u...

 
8:15 PM
possible answer invalidation by Roland Illig on question by user6248190: codereview.stackexchange.com/posts/219024/revisions
 
@Duga its okay - only the description was changed, which originally contained c-style comments
 
0
Q: Graph implementation using FIFO lists

Balog SzilárdI've made a little implementation of an undirected graph, using FIFO lists, for one of my homeworks. Never really knew how to write a proper FIFO data structure, so I would be glad to see some opinion of yours. #include <fstream> using namespace std; class Graph { class Node { ...

 
8:50 PM
0
Q: Manually writing a function marixpower() in R

user366312 Problem 1 - Matrix powers in R R does not have a built-in command for taking matrix powers. Write a function matrixpower() with two arguments mat and k that will take integer powers k of a matrix mat. My attempted solution. matrixMul <- function(mat1, mat2) { rows <- nrow(...

 
9:48 PM
0
Q: Node/Express authenticate Google email address

Dan GTrying to set up express server that will authenticate a user's Google email before proceeding. The code below works, but is there any way to make it more elegant? The whole new Promise thing feels clunky. Still wrapping my head around async functions. All the googleapis functions are async, s...

 
10:08 PM
0
Q: Document classfier

CodeYogiDescription: I am working on a classifier which categorizes the text based on some criteria, at present, it is a map of category and list of words if any of the words appear in the text, a category is assigned to it. The text can have multiple categories. The number of categories can be more tha...

 
Good to know for tee! I got something working with asyncio, I still need to figure out how to remove consumers that would cancel their subscription. It may end up on codereview once I get it to work! — JonesV 49 secs ago
 
10:31 PM
Since there is no means for the compiler to know that a function is an interrupt routine, and an interrupt vector can be assigned at runtime, I cannot see how this could work or would solve any issue. It could also be defeated by callbacks through pointers, and the issue is not specific to C++, it is as likely that some C function is inappropriate or ill-advised in an interrupt. On the subject of "opinion", it is certainly an opinion that this is a problem, and you are canvassing opinion on a solution. My opinion is that the solution lies in good design, design guidelines and code review. — Clifford 28 secs ago
 
10:47 PM
0
Q: Simple Javascript logic, proper use of undefined

BlackhawkI have an array of things and I need to find the valid one at runtime. Is this a reasonable use of undefined? Is there a safer way of doing this? Should I make the return value explicit in the null case instead of letting the undefined drop through? var ThingManager = { things : [], getV...

 
11:26 PM
0
Q: Windows Installation Script - Detect SSD

JomOkay so, I bought a laptop, installed an additional SSD (now running 1 HDD, 1 SSD), and now I'm trying to install the Manufacturer's customized Windows version. The problem is that that Windows version comes with its own installation script created by the manufacturer. When you try to install tha...

 
11:46 PM
0
Q: Vigenère cipher in Ruby

sPaGhEtTiCaSeWhat I'm trying to do: implement the Vigenère cipher in Ruby. I already have a working version, but I want to make sure it is efficient and well-designed. module Crypto # Vigenère cipher encryption and decryption abstraction module Vigenere LETTERS = ('a'..'z').to_a.freeze private_co...

 
11:58 PM
@CaptainObvious example code
 

« first day (2181 days earlier)      last day (1837 days later) »