« first day (2406 days earlier)      last day (1594 days later) » 

12:00 AM
RELOAD! There are 6298 unanswered questions (90.0578% answered)
3
 
12:37 AM
@Duga c'mon man...
 
12:52 AM
-1
Q: Execute asynchronous read in parallel

Dmitry NoginI found it useful to execute multiple reads in parallel using a set of my extension methods for TaskFactory, which could be used as: static async Task Main(string[] args) { var (r1, r2, r3, r4) = await Task.Factory.StartNew( Read1Async, Read2Async, Read3Async, Read4Async); async...

 
1:32 AM
0
Q: Python3 Simple Xor Pipe/CLI Program

Chev_603I wrote a simple python3 program that takes data from either a file or standard input and xor encrypts or decrypts the data. By default, the output is encoded in base64, however there is a flag for disabling that --raw. It works as intended except when I am using the raw mode, in which case an ex...

 
1:53 AM
0
Q: Intersection of sorted lists

kyrillI don't like this function. Looks too imperative. It takes two sorted lists and returns a sorted intersection of the two lists. There is an implicit assumption that there are no duplicate elements in either list. Please don't suggest converting (even one of) the arguments to set, or using some ...

0
Q: Simplify & Reduce steps in the IsDistinct function

thisBecause I often have to deal with two Variants that may or may not be Null, we need a null-safe equality test, so I came up with IsDistinct which works but I have some issues with the code: When I tried to keep it terse, the readability was harmed. When I tried to expand the logic for readabili...

 
2:13 AM
0
Q: Generate Unique ID in C#

karsnenObjective To create a unique id with few characters as possible. Language: C# Engine Unity3D Target : iOS && iPadOS Scenario I found quite a few solutions from Stack Exchange but would like to know if someone could just look at my code to review it. It is a very important module IMO Cod...

0
Q: How to get the desired output Java

MichealThis Java file is suppose to run and pull the information from the legoSets.XML and show me the output. Right now the output I am getting is sum-num only. it does not display any information of the other 3 i need to see. (name, year, num-parts) I have comment out set-num to see if i can get name ...

 
2:25 AM
What is it supposed to do? Is it working? If it is working the question might be a better fit for codereview.stackexchange.comSelcuk 13 secs ago
I seriously doubt that where you place import math will have any real impact on execution time. I agree with @Selcuk that `Code Review seems like a better fit for this question. — John Coleman 28 secs ago
 
 
1 hour later…
3:30 AM
Unrelated to your question: code review: Windows x64 guarantees 16 byte stack alignment before a call. If start is called in an ABI-compliant way, you don't need and rsp, -16, just sub rsp, 8 + 16*n (including any pushes). If you did want to over-align the stack, e.g. by 32, you can use RBP to hold the old RSP, again like compilers do if you use an alignas(32) volatile int x = 1; or something. So push rbp; mov rbp, rsp ; and rsp, -32; sub rsp, 32*n. Then of course you can return with leave ; ret. — Peter Cordes 13 secs ago
 
 
2 hours later…
5:27 AM
Monking
 
5:38 AM
0
Q: Aligning the playing time of a video with the observed time within the video

HJA24I have a video that displays a soccer match. Video file match.mp4 consist of some opening commercials, the actual match and the half-time end/break. As a result, the video file is always lengthier than the match itself. The properties of match.mp4 looks as follows: So according to my Windows c...

 
6:33 AM
I think, this question might be better asked at codereview.stackexchange.comgurioso 8 secs ago
I think, this question might be better asked at codereview.stackexchange.com. But check out a few posts there before you place your own one, they have their own formalities. — gurioso 49 secs ago
I'm voting to close this question as off-topic because it belongs on Code Review. — EJoshuaS - Reinstate Monica 59 secs ago
And it is not clear to me yet, what this is supposed to do, and what the idea was behind the code you posted. Maybe a few sentences about that would be good before codereview. — gurioso 22 secs ago
 
6:58 AM
Monking
@SᴀᴍOnᴇᴌᴀ We're removing parts of titles here (scrapping), not retrieving (scraping) them here.
 
Monking
 
7:46 AM
@Mast NGL, it doesn't make much sense to me either way.
 
@EthanBierlein I would guess that it's because they've posted 3 questions all starting with "Advent of Code 2019: " in the space of what like 10 minutes. Every time I've seen questions posted in quick succession I've always seen some downvotes.
@JAD Yes, I know what the word means.
 
8:23 AM
@Peilonrayz I'm not a native speaker, may have to improve the wording later today.
The idea was removing parts of the title. I thought scrapping parts was appropriate there.
 
Eh, you speak better English than many people I know. "Scrap" has other connotations to me, so maybe I'm the one who's wrong. ;P
 
Thank you.
 
 
1 hour later…
9:36 AM
I'm voting to close this question as off-topic because it belongs at Code ReviewJoakim Danielson 54 secs ago
 
10:03 AM
0
Q: Middleware which works with REST API and connects to Websocket

Vraj ShahProblem Statement: Users can chat while the replies of the chatbot are based on past messages. So the chatbot needs to have the context of the previous messages and reply accordingly. Here is pseudocode of chatbot for more understanding hi_flag = False message = await websocket.receive_bytes() ...

0
Q: Finding shortest path in matrix

User3000Given an N x N matrix of positive integers, I need to find the shortest path from the first cell of matrix to the last cell of matrix. I can move exactly x steps from any cell, where x is the value of the cell. The possible movements are right or down, i.e from any cell M[i][j] I can move to loca...

 
I think that question would be better suited for codereview.stackexchange.com. If there is a problem with your code ie it doesnt work we can help you fix errors we cant really tell you the best way to code something — DaImTo 14 secs ago
 
10:23 AM
0
Q: Google Script - Calendar events not owned by me

Joe HayesI'm trying to write a script to delete event invites from my personal google calendar. I get invited to multiple events everyday such as "Click here to win an iPhone" etc. I have written a google script to run each hour and delete any events where I am not the owner. However this is getting all ...

 
10:44 AM
0
Q: Round numbers in MS Word

Máté JuhászI need to round numbers in a Word document, as I couldn't find a built-in way, here is my approach. As I use VBA mainly in Excel I'm not sure whether I've done it the best way possible: Sub RoundNumbers() Dim OrigRng As Range Dim WorkRng As Range Dim FindPattern As String Dim ...

 
 
2 hours later…
12:25 PM
0
Q: Python multi-thread kubernetes watcher

GeorgiosMy program (which eventually will be containerised) should be able to do the following: *continuously listening for deployment and daemonsets in kubernetes (2 threads) *collect info needed (like annotations) *use the info collected in order to create objects in a remote database I could use som...

 
12:42 PM
It not my code. As I have said, I was working on a old and big repo. Every time I edit a file, it will diff too much, make it hard to check the diff and do code review in gitlab — hackrole 1 min ago
 
1:06 PM
0
Q: How to get rid of many if null checks - c#

Roxy'ProHow could I refactor this code to get it more cleaner: public List<TestDTO> Map(product product) { if (product == null || product.productModules == null || !product.productTests.Any()) return null; return product.productTests.Select(x => _productService.Map(x)).ToList(); } Is it possi...

 
possible answer invalidation by Swapnil Kotwal on question by Swapnil Kotwal: codereview.stackexchange.com/posts/233408/revisions
 
Monking
 
possible answer invalidation by Roxy'Pro on question by Roxy'Pro: codereview.stackexchange.com/posts/233470/revisions
 
1:44 PM
@CaptainObvious example code
 
JAD
:/
 
0
Q: Hunt the Wumpus Game (C++ with QT)

Sandro4912I reworked the Game I did in FLTK some while ago: Hunt the Wumpus GUI (FLTK) This time I used C++ with the Qt Framework. The result looks like this: If you want to try out the game. The full code can be found in my Git Hub: https://github.com/sandro4912/hunt-the-wumpus One more hint not fin...

0
Q: Drawing star shape square in terminal using python

thatUserI am trying to draw a square with stars on my terminal using this code: print("\t"" "*15 + "*"*45) print(" "*9 + "*" + " "*9+"some text" + " "*25+ "*") print(" "*9 + "*" + " "*9+"some text" + " "*25 + "*") print(" "*9 + "*" + " "*9+"some text" + " "*25 + "*") print(" "*9 + "*"*45) What I am tr...

 
2:00 PM
I initially VTC this question then the user said it works, I retracted my vote, but I think it is broken codereview.stackexchange.com/questions/233458/…
@SᴀᴍOnᴇᴌᴀ Monking
 
0
Q: connecting QCombobox currentIndexChanged

TomBombadilI had some issues with connecting the currentIndexChanged(int) signal of a QComboBox to a lambda function. Since the signal function is overloaded the compiler could not determine which function is used. However, I found this solution. Now the code looks like this. QObject::connect(this->ui->c...

 
2:20 PM
I get what you are saying, but the code works. However, for some frames the output is incorrect/not usable for the gameTime-calculation. I will edit my question to make this more clear — HJA24 23 mins ago
Clear case of brokenness.
 
If you already have working code, consider codereview.stackexchange.comCDJB 10 secs ago
 
2:48 PM
0
Q: Using regex to get more elegant solution

raphael_mavI want to count the occurrences of a multi line ASCII pattern within a file. The pattern looks like this: a1 b2 c3 The file I want to search looks like this: (The _ represent whitespaces but I thought it's easier to understand with this notation) _ _ _ a1 _ _ _ b2 _ _ _ c3 _ _ _ _ a1 a1_ _ ...

 
3:08 PM
0
Q: GAME OF LIFE python? beginner problems with coding

user214442Hi im a beginner at coding and im struggling alot! i have an assignment to code the classic game "Game of life" by john conway through python, but the problem is that i barely understand anything on how to solve a problem within coding. We did learn all of the "basics" of python such as lists, cl...

 
@pacmaninbw Nibjubg
@Mast ah I see - typically I see scrapped instead of scraped (and similar variations) when fetching data from another source and it seemed like your post involved scraping the text from the source of the Challenges; should you or I rollback that edit?
 
@CaptainObvious There are just so many things we can close this for, I chose authorship.
 
3:34 PM
@pacmaninbw whats the reason for leaving open this codereview.stackexchange.com/q/233470/29371 ?
 
@Heslacher It has a decent answer. I will grant that the question actually belongs on SO rather than CR. If you want me to close, have @JAD remove the answer.
 
possible answer invalidation by this on question by this: codereview.stackexchange.com/posts/233451/revisions
 
@pacmaninbw how does it matter if the answer is ok but the question is off-topic ?
 
@Duga this
 
@Duga you and your pronouns... c'mon!
@Duga looks okay - just added to the section Inputs & Expected Outputs
 
3:46 PM
@Heslacher I have changed my vote, but rather than using LCC I used belongs on another site.
 
ok
 
@JAD It might be better if you didn't answer questions with 2 close votes.
 
The question didn't have a close-vote as JAD answered the question.
 
 
1 hour later…
4:50 PM
0
Q: What are the advantages and disadvantages of how I've written my program?

George Austin BradleyHi StackExchange community. I was wondering if you would be kind enough to take the time to review my program and give me feedback on it? I want to know what I've done well and what I haven't done so well. Please don't criticise the fact I've used Hungarian notation, it's required in my universit...

 
 
1 hour later…
5:57 PM
@410_Gone Any good documents on how to use Action and Predicate in a command. My problem is how to define an action and a predicate and I could use some examples. Basically I'm trying to implement MVVM and RelayCommand as described in docs.microsoft.com/en-us/archive/msdn-magazine/2009/february/…
 
Yeah, it's opinionated for sure. Sounds to me like a management, and not a coding problem. What are the (new) business requirements you need to implement? Upgrading to Wildfly cannot be a requirement. Which way you are implementing the requirement is (foremost) dependent on the team that needs to implement it and their skills. Also, I would advise to put that code on the codereview site. — Martijn Burger 35 secs ago
 
@pacmaninbw @MathieuGuindon Knows better than I.
 
    public class DelegateCommand : ICommand
    {
        private readonly Predicate<object> _canExecute;
        private readonly Action<object> _execute;

        public DelegateCommand(Action<object> execute, Predicate<object> canExecute = null)
        {
            _canExecute = canExecute;
            _execute = execute;
        }

        public virtual bool CanExecute(object parameter) => _canExecute == null || _canExecute.Invoke(parameter);
        public virtual void Execute(object parameter)
^ I use this
(hi!)
 
I knew you'd have that handy, thanks @MathieuGuindon. 🙂
 
6:13 PM
@410_Gone @MathieuGuindon Thank you both!
@MathieuGuindon You don't believe in suggesting the author change the title? codereview.stackexchange.com/questions/233480/…
 
If you code is working and you're looking for a "cleaner" approach, then this isn't really a question for Stackoverflow, but rather CodeReview: codereview.stackexchange.comTim Lewis 36 secs ago
 
6:33 PM
-1
Q: C++: return exception instead of throwing

peterchenTo simplify the pattern: int result = 0; try { result = GetSomething(); } catch(...) { /* handle exception, return or set a result value... */ } I've tried the following idea (prototype code, not functional): template <typename TResult> struct Result { std::exception_ptr exception; TResult re...

 
6:43 PM
Yaakov Ellis on December 05, 2019

We know that giving our community mechanisms for sharing and receiving feedback is important. In her recent blog post, Meg Risdal described some of the ways that our Public Q&A product team is working to improve the way our system helps users share and receive feedback. I’m pleased to announce that starting today we are rolling out our new post notice system on Stack Overflow and across the entire Stack Exchange network. 

As a reminder, post notices are the informational banners that sometimes appear on closed, duplicate, and other questions. …

 
@Feeds I just noticed the new format
 
@pacmaninbw sometimes, yes. titles aren't something only the OP can edit though. gave a whole 20 minutes between my comment and the title edit....
 
0
Q: Finite automaton library in Scala including subset construction and minimization

LukeGI built a scanner generator like flex or jflex in Scala for a class last year. Part of this project is a small library for handling and manipulating finite automata. It works completely as intended, except for maybe some bugs in the conversion to dot-code, which is of little concern. I would lik...

 
7:06 PM
@Feeds I don't like it, but if that's what they want...
 
What would Monica do?
 
8:13 PM
codereview.stackexchange.com is a good site for this kind of thing :) — SpaceCowboy 27 secs ago
 
8:57 PM
0
Q: making diagonal check for win in connect four visual basic

Phantom SultanI got the vertical and horizontal check for win to work but I have no clue for the diagonal check for win. This is on visual basic using visual basic. Private Sub checkforwin(color) 'horozontal check for win Dim count As Integer = 0 For row = 5 To 0 Step -1 For...

 
9:38 PM
0
Q: Add items to Dictionary from another dictionary on cell value change

Zack EI have created a very simple Class Module and a Dictionary to store original values when the workbook is opened as part of this project ive been working on. When the workbook opens I call a test to see if its open in read only mode because multiple people will be in the workbook, but only one pe...

 
 
1 hour later…
11:42 PM
0
Q: Shortening function calls with closures

swaltekI wrote this code that makes a fairly long function call multiple times using some of the same parameters match key { Key { code: KeyCode::Left, .. } => self.map.move_object_by(PLAYER, -1, 0), Key { code: KeyCode::Right, .. } => self.map.move_object_by(PLAYER, 1, 0), Key { code: KeyC...

 

« first day (2406 days earlier)      last day (1594 days later) »