« first day (2771 days earlier)      last day (53 days later) » 

12:00 AM
RELOAD! There are 7153 unanswered questions (89.7141% answered)
 
12:19 AM
0
Q: How to use smart pointers with SDL2 (SDL_RWops)?

JustOneManI want to write read savefile function with smart pointers and SDL2. I have little expirience with smart pointers and just want to ask is my code good, correct and no memory leaks. this is my code: std::shared_ptr<SDL_RWops> saveFile; -- int GameEngine::ReadSave() { int Highlevel; ...

0
Q: Is my code to extract values from English numerals, e.g. "nine million and one", all right?

niamulbengaliThough many have done it the other way around, I have not seen such code in many places. And, to be honest, I don't know why this cluster of if-statements and for and while-loops works! def parse_int(string): numbers = {'zero':0,'one':1,'two':2,'three':3,'four':4,'five':5,'six':6,'seven':7,'e...

 
@CaptainObvious no, it looks like it is all left...
 
12:43 AM
0
Q: Abstracting async hooks out from components

CoupcoupA component makes displays a list of values and I'm trying to hide everything about how those values are gotten, essentially divorcing concerns about state away from the component itself so that in the future any changes to which API data is fetched from, what store is used, etc won't effect the ...

 
 
1 hour later…
1:56 AM
-1
Q: Is there a condensed way of adding multiple event listeners each with different functions to the same group of elements?

thenomadicmannI would ideally like to add event listeners to a single group of elements, topLevelDesktopNavDropdownItems , in some kind of object syntax like {event: function, event: function}. Or is there another way to do this? Here is my current code: topLevelDesktopNavDropdownItems.forEach( element =>...

 
2:21 AM
-1
Q: TIME complexity issue in python code

Saketh ReddyI tried it a different way but I am unable reach lowest time complexity - please help and I am running it on online compiler class Solution: def primesum(self, A): # write your method here n = A return self.findPrimePair(A) def findPrimePair(self,n): isPrime = [0] * (n+1) ...

 
2:45 AM
0
Q: My TicTacToe attempt in C++ Console [Intermediate]

Andrew DizenzoI saw another user post their implementation of C++ TicTacToe game and thought what a coincidence! I was just in the process of making one myself after picking up Programming Principles and Practice Using C++, Second Edition by Bjarne. Would be very grateful if someone could give my code a fresh ...

 
3:34 AM
0
Q: VBA to address MS Word File in Use Dialogue

AdriennePosting here in hopes that it is the right forum... I'm not sure if this question has been asked before, but I have been googling/troubleshooting for over 8 hours and I'm at still at a complete deadend-- apologies in advance if I'm asking something that has already been answered. I have a vba cod...

 
4:05 AM
Attention 2020 Googlers: a rather nice combined effort is mentioned here on Code Review. — MickyD 6 secs ago
 
4:16 AM
Hello! Requests for general commentary and critique on working code are considered off-topic on this site. You may want to consider posting this on CodeReview.SE instead. — Brian 21 secs ago
 
4:26 AM
You should give a better description of your requirements (for your post on CodeReview). If you literally just want efficiency and the ability to enter multiple names, then int main() { string s1; while ( true ) { cout<<"Enter Student Name: "; getline (cin, s1); } } would satisfy those requirements. I'm not saying that someone would seriously suggest this, but that you should put enough time into your question so that this no longer fits your question.JaMiT 46 secs ago
 
4:42 AM
Monking
 
5:35 AM
What are you really asking about, to get a review of your code, or help with the crash? For a review of working code (a hard requirement) then post on the Code review SE instead. For help with the crash please include a minimal reproducible example and if possible use a debugger to locate where it happens in your code and point out that location to us. Also please take some time to refresh ask], as well as this question checklistSome programmer dude 48 secs ago
 
0
Q: user-facing email validation

jimmontI'd like to have a generic way for validating user provided email with a bias toward ease of use. Does the following do so in a clear way for implementations that have the URL interface available? The sample input below is only intended to exercise the range of expected input and demonstrate it w...

 
6:06 AM
Hi and welcome to SO. SO is not a forum, tutorial/guide nor a personal help desk. Even if it might sounds harsh to you, your topic does not belong here nor does it have any value for SO. SO is for programmers that already know how to prgram and stuck with very specifc coding issues. Issues that they cant resolve on their own even after own research efford. For code review, use the stackexchange codereview: codereview.stackexchange.com - As your topic missing a spicific coding issue and do not meet the SO guidelines, it will be flagged for closure. — tacoshy 19 secs ago
Stack Overflow's main focus is around specific, answerable questions about a given topic or code problem. Questions seeking a code review are off-topic for Stack Overflow, as they can often lead to opinionated answers. You might be able to find an answer on Code Review, but please keep in mind what topics you can post about there and how to ask a good question. — Hoppeduppeanut 5 secs ago
 
6:25 AM
-1
Q: sympy in jupyter notebook cannot give answer in latex form

user234103I encountered a problem when using sympy in Jupyter Notebook. Here is the code [![enter image description here][1]][1] import sympy as sp sp.init_printing() x,y = sp.symbols('x,y') expr = x**2 + y**2 expr Adding sympy.init_printing() will cause cessation of jupyter notebook. How could I solve th...

 
 
2 hours later…
8:44 AM
Yes. According to prettier: "No need to discuss style in code review". So you can leave defaults and it will work without the issue. Well, in my case the only setting I use "semi": false. — KiraLT 57 secs ago
 
9:08 AM
Code review questions are off topic here. Please read help centerbolov 16 secs ago
 
9:40 AM
1
Q: PowerShell - Calculating date difference between two given dates in days without builtin and with builtin

Xeнεi ΞэnвϵςThe title says it all, I have written two scripts to calculate dates to test my abilities in programming, one from scratch, without [DateTime], New-TimeSpan and even [math]::Ceiling, and it's really long and complex, and there is a max error of one inherited from algorithm, the other uses builtin...

 
9:50 AM
It sounds like you're really asking for a code review? If so, there's a specific StackExchange Code Review site where your question might fit better - check their guidance of course before you post though. Here at StackOverflow we tend to deal with "this isn't working" type problems more than "could I do this a different way"? — ADyson 31 secs ago
 
10:04 AM
0
Q: Compring two columns on SqlServer in t-sql

Thomas KoelleIn SQL I have two columns, and I only want to do an update if the columns differ, but e.g. a null should make '' become null etc. The code I really want to write looks like this: (@new is null and @old is not null) or (@new is not null and @old is null) or (@new is not null and @old is not null...

0
Q: Operations on nested data

kluvinProblem description. I have JSON which comes in bad shape: data = [ {"ids": [1]}, {"ids": [3, 4]}, {"ids": [1, 2]}, {"ids": [4]}, {"ids": [3]}, {"ids": [2]}, ] # LD. List of dictionaries. I want it to get in shape, like this: expected = [ [{"ids": [1]}, {"ids": [2]}], ...

0
Q: PowerShell - Find Least Common Multiple of a series of numbers

Xeнεi ΞэnвϵςI am a Windows power user, a system tweaker, my idol is Leanardo da Vinci, and now I want to be a hacker. I am extremely new to programming, but I really am a fast learner if I am interested in the subject, now I use PowerShell to hone my programming skills, I have only started learning PowerShel...

 
10:36 AM
This might be more of a codereview question — Moosefeather 25 secs ago
 
11:17 AM
0
Q: How to update the record to CSV file using angular http?

Kunal VijanI have a requirement of reading the data from the CSV file and allowing the user to update only one column using inline editing. I am able to read the data using the angular HTTP module but I am not able to save it back to CSV. Please look into the code and help me to saves the data back to the ...

 
If you have working code that you want to improve, you might want to check if your question could be made on-topic for codereview.stackexchange.com. You should at least specify what the code is supposed to do. — khelwood 25 secs ago
 
11:41 AM
0
Q: PowerShell - Convert English words describing numbers to their values in Arabic numeral

Xeнεi ΞэnвϵςI am extremely new to programming, and I am a really fast learner if I am interested, I have only started using PowerShell in less than a month, to improve my programming skill, this is a script I have written a few days ago, to do what I said in title, I developped it all by myself, completely w...

 
12:10 PM
This is great, thanks a lot! Just of curiosity, what would you suggest performance wise? Thanks also for the hint with codereview.stackexchange.com - I will keep it in mind for next time! — Wolfgang Wohlwend 42 secs ago
 
12:30 PM
0
Q: A Various Container Type Arbitrary Nested Iterable Generator Function Implementation in C++

JimmyHuThis is a follow-up question for std::array and std::vector Type Arbitrary Nested Iterable Generator Functions Implementation in C++ and std::deque and std::list Type Arbitrary Nested Iterable Generator Functions Implementation in C++. The only thing different in the previous implemented n_dim_ve...

 
12:54 PM
0
Q: Find plane (walls, floor, ceiling) that a falling car will land on

VirxECI have a function that takes a falling car's location & velocity as well as the world gravity. The world has a floor, ceiling, and walls that are in fixed positions. The car's x & y velocity can't change once it's airborne, but gravity does force the car down. I'm trying to find exactly which pla...

 
1:15 PM
Does this code work? If yes, this might be better suited for Code Reviewadiga 54 secs ago
Also codereview.stackexchange.com is the place for reviewing working code. Though please read their help centre first. — Liam 30 secs ago
 
1:44 PM
0
Q: Neural network predicting straight line

Lallahere is the code it is predicting most of time straight line but some time it gives a good fit. I have attempted to use a variety of different network configurations, with anywhere from 1 to 3 layers, and 1-64 nodes. I have varied the learning rate from 0.1 to 0.00000001. I am using the leaky ReL...

0
Q: Improving a filter array function, to match elements and conditions

Rafael de CastroI have to do some check/match elements with conditions. A have a list of conditions, each with a specific ID. I've put for each of my elements an array with the ids of their respective affirmative conditions. Some elements can share a condition. The goal is to, everytime a condition is "checked" ...

 
 
1 hour later…
3:08 PM
Ryan Donovan on December 04, 2020
Welcome to ISSUE #50 of the Overflow! This newsletter is by developers, for developers, written and curated by the Stack Overflow team and Cassidy Williams at Netlify. We lined up a whole bunch of goodies for our big five-oh: how to write a great resume from a hiring manager who reads hundreds each year, the etiquette of pull…
 
Greetings, Programs.
 
3:25 PM
Hey! Your question does not fit stackoverflow. You should ask the code review stack exchange instead. Also note that sharing code as image is not a good way of sharing your code, copy the text in the question instead. — Lescurel 38 secs ago
 
0
Q: Simple http helper in Go

Matias BarriosCan you please share your thoughts on the following simple httphelper in Go? Thanks in advance. I mainly would like to know whether returning a channel of a custom type seems like a good idea and if so , how could I improve it for only receive chans. package services import ( "bytes" "en...

 
3:42 PM
@CaptainObvious Current title: 3-Digit Narcissistic Numbers Program - Python 🐍
That's one way to work-around the unique-title requirement...
 
0
Q: 8 arguments in method

user1562I'm developing a networking library for C++ based on sockets. I have the method Send for sending data to a remote peer. Signature of this method: void Send( PacketId packet_id, UserPacket user_packet, RemoteSystem* remote_system, bool broadcast, uint16_t request_id, std::function<void(Pac...

0
Q: Mutex Angular Typescript browser implementation

Leonel Franchellii've implemented a waiter service in Angular for syncronice multiple calls to one async function and i want to know if there exists a simplier way of atchiving the same result or if it's over engineered the code import {Injectable} from '@angular/core'; export class PromiseRef { resolve: (any?...

0
Q: Convert boolean array to integer in Typescript

Benjie WheelerI have a database object that has a field called workdays, it's a array boolean that contains 7 elements representing whether the user is active on the corresponding day. I need to save this array into the database, I thought the bets way would be to convert the boolean array into a integer (bits...

 
@CaptainObvious Off-topic for 2 reasons, it seems the user wants us to re-write a function and they have only provided the current function call and not the body of the function.
 
I suggest you make a code review on the adequate stack (codereview.stackexchange.com) — Pat. ANDRIA 5 secs ago
 
4:16 PM
0
Q: Simple to-do list application in React

bona-petiteI'm getting started with React, so I took a React tutorial for creating a simple to-do list app. After finishing it, I read "Thinking in React", and tried to improve what I did during tutorial based on that article. This is my original code from tutorial: https://codesandbox.io/s/todo-initial-bkl...

 
@Mast for a while... I'm envision a custom comic about the matter
 
possible answer invalidation by Rafael de Castro on question by Rafael de Castro: codereview.stackexchange.com/posts/253038/revisions
 
Happy Last first Friday of the month of the year
 
@SᴀᴍOnᴇᴌᴀ And what a year it has been.
 
I'm not a huge Merle Haggard fan but it seems his song If we make it through December is more applicable than ever
 
4:32 PM
Monking
 
@SᴀᴍOnᴇᴌᴀ The what now?
 
Is there a problem with the code you have posted, or are you looking for a code review? If you are getting an error or an unexpected result, please elaborate. — Fred Larson 1 min ago
@Pat.ANDRIA et. al when suggesting users post on CR it would be great if there was also a suggestion like "Please read the relevant help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?". If the post was posted on CR in the current form, part of the description (i.e. "I also need to calculate the length of the path through the points.") might likely lead to the post getting closed as off-topic since it isn't working properly yet. — Sᴀᴍ Onᴇᴌᴀ 31 secs ago
 
@Mast would it help if I add parentheses? Last (First Friday of the month) of the year
2
 
0
Q: Can someone help me create an untwist function for my program?

Programmerwould love feedback on this! I’m trying to create a untwist function out of the following program. I also need to calculate the length of the path through the points. Any feedback will be greatly appreciated as I’m quite stuck!! I have below added the program. Any help on this would be fantastic ...

 
@SᴀᴍOnᴇᴌᴀ Now it's clear on first glance, it took me at least 3 with the original message :-)
 
5:31 PM
👌
 
possible answer invalidation by Rafael de Castro on question by Rafael de Castro: codereview.stackexchange.com/posts/253038/revisions
 
5:50 PM
@Duga rolled back
 
0
Q: Noughts & Crosses (Tic Tac Toe) OOP Design

George Austin BradleyI was wondering if someone could review my object oriented design for my Noughts & Crosses program. Yesterday I did a submitted a procedural version and now I've done an OOP version. Can someone tell me what I've done well, what I haven't done well, and provide any suggestions on how I can improv...

 
6:05 PM
@Donald.McLean Since NASA !== NSF - were your colleagues talking about the recent satellite collapse in Puerto Rico?
I'm envisioning Boris somewhere saying "I'm invicible"
 
6:23 PM
0
Q: Hangman Game with Python

esker-luminousI'm super excited to share my hangman game with you. (haven't added the graphics yet...) I will be using this program as my final project (for school), but I would like to have this polished before handing it in. I have given my program the limit of 7 attempts, but if the user continues to guess ...

0
Q: Simplify Square Orders body_order_lineItems if statements

user-3857385Can this be simplified to a single statement (for each loop)? I would also need the body_order_lineItems index to change based on how many line items there are. if ($ticket['price_1'] != '0.00') { $body_order_lineItems_0_quantity = $ticket['qty_1']; $body_order_lineItems[0] = new Square\...

 
6:33 PM
@SᴀᴍOnᴇᴌᴀ There have been a number of posts on internal Slack channels.
 
7:05 PM
I’m voting to close this question because it would be better-asked on codereview.stackexchange.comGreen Cloak Guy 40 secs ago
 
7:38 PM
@Duga @SᴀᴍOnᴇᴌᴀ Now they posted an answer.
 
@Mast ಠ_ಠ I'm not sure if the "answer" qualifies as a review... does it?
 
8:04 PM
1
Q: Using templates to wrap variardic JNI method calls into type-safe C++ functors

HermannI am working on a project which uses JNI. More than once I fell over the absence of type safety working with the variardic function calls. So I came up with this module. It wraps the variardic JNI functions using C++ variardc templates to offer a type-safe alternative. It also features integrated...

0
Q: Need help cleaning up code for a math game using classes/constructors (I cannot wrap my head around it) (Java)

sahderachI've done some coding in the past but nothing with OOP and honestly, I cannot wrap my head around using classes and constructors to tidy up my code. I'm used to "calling functions" instead of pasting code over and over again but in Java, the methods and classes, etc. take care of that but man, I'...

 
Questions about coding style are generally off-topic on Stack Overflow. They can be part of a question on Code Review, but they want to review complete programs, not just little excerpts like this. — Barmar 37 secs ago
 
@SᴀᴍOnᴇᴌᴀ sigh
Another mess.
 
9:10 PM
possible answer invalidation by Hermann on question by Hermann: codereview.stackexchange.com/posts/253057/revisions
 
9:23 PM
@Duga rolled back
 
You're doing great.
 
10:10 PM
0
Q: Angular Typescript Async queue service

Leonel Franchellii've implemented a waiter service in Angular for syncronice multiple calls to one async function and i want to know if there exists a simplier way of atchiving the same result or if it's over engineered the code import {Injectable} from '@angular/core'; export class PromiseRef { resolve: (any?...

 
10:30 PM
@Mast should we allow that last edit, since the OP claims the code wouldn't compile in that form?
That line never ever belonged there (copy paste error in the first place). As it stands now, the example would not even compile. — Hermann 56 secs ago
 
0
Q: A contact form with CodeIgniter and Twig

Razvan ZamfirI am working on a online newspaper/blogging application with CodeIgniter 3.1.8 and Twig. I use the Twig template engine for the front-end views. I have put together this simple contact form which uses a controller, a view and no model. The controller: class Contact extends CI_Controller { pu...

 
11:26 PM
0
Q: Python Game of Life

carter85Following 'automate the boring stuff using Python', in chapter 4, there's a practice project coding Conway's Game of Life to run in terminal. I hand typed into VScode, when ran it populates a board, but doesn't actually run. Copying and pasting code from the book, no issues. I've compared them si...

 
11:46 PM
If the code works and you're looking for advice on improving it, Code Review is the appropriate place. But see codereview.meta.stackexchange.com/questions/5777/… first. — Barmar 29 secs ago
 
0
Q: Improving a filter array function with Set and objects, to match elements and conditions

Rafael de CastroI've posted a similar question on: Link With the help of the other users, I was able to improve the code, but I don't think is the "ultimate" form. Thats my code now, any help? Conditions entries example: [1,2], [9,6,4], [3] [7,1,5,2,3] private filterElements(userSelectedConditions: Set<number>)...

 

« first day (2771 days earlier)      last day (53 days later) »