« first day (2382 days earlier)      last day (1618 days later) » 

12:01 AM
RELOAD! There are 6238 unanswered questions (90.0869% answered)
 
 
3 hours later…
2:42 AM
0
Q: Heap-allocated fixed size array with memory-reusing type tranformation function

ktbI would like to use a std::array, but am operating on sufficiently large arrays that stack allocation is not reasonable (and fails using default stack size). I also needed a function that operated much like std::transform, but always in-place. The issue being that many of these transformations ch...

 
 
1 hour later…
3:44 AM
0
Q: Incremental, encrypted backups for git

Andrei BoracI would appreciate any review of the following script I recently posted on GitHub: https://github.com/AndreiBorac/gitcrypto. Most especially, I would appreciate review of the cryptographic aspects (I am not an expert in this field): Is there a way to break the encryption from the files in the "...

 
4:10 AM
This might be a good candidate for codereview.stackexchange.com which is meant for soliciting peer feedback on working code. — Paul Wheeler 35 secs ago
 
4:26 AM
0
Q: First post: understanding RSA key generation and implementation in Java

JonathanThis is an attempt to leverage Java's BigInteger class to implement the RSA algorithm, as well as md5 and sha512 hashing functions to generate keys for what I hope to be strong cryptography. My prayer is that some of my ideas are novel and not just bad. This is a test, this is only a test. 'Key...

 
4:54 AM
"As D3 is Dom manipulation, its performance is not as good as Canvas". Where did you read that? You don't need to manipulate DOM to use D3, and you can certainly create canvas with D3. I just explained that here. — Gerardo Furtado 7 secs ago
 
5:23 AM
I think you should post this on codereview. — Reez0 22 secs ago
 
5:38 AM
Monking
 
0
Q: Python 3.6 Hangman game with .format graphics

TeaGlassthis is my Python 3.6+ version of the Hangman game, with graphics generated with print and .format. I've never written code professionally so I would like to know what must be changed to reflect good practice, efficiency, clarity of comments. Thanks in advance. from random import randint import ...

 
6:12 AM
It is a concern, but StackOverflow is a site for specific programming questions and answers. That's why we also have codereview.stackexchange.com, dba.stackexchange.com, stats.stackexchange.com, etc for other questions that still addressing concerns for an application developer but not that related to programming — Andreas 15 secs ago
 
 
2 hours later…
8:40 AM
You should ask this in codereviewGuy 40 secs ago
 
9:17 AM
I'm voting to close this question as off-topic because it belongs on Code Review. — Flimzy 58 secs ago
 
9:51 AM
Monking
 
 
3 hours later…
12:30 PM
@Bharat [codereview.stackexchange.com/questions/33109/… In addition, you can improve your code Repository pattern with UnitOfWork pattern. Read more about UnitOfWork moreStepUp 12 secs ago
 
12:42 PM
@Bharat Oh, great, I am glad that it helped to you! Repository with Service Design Pattern In addition, you can improve your code Repository pattern with UnitOfWork pattern. Read more about UnitOfWork moreStepUp 1 min ago
 
12:54 PM
Monking
 
1:05 PM
0
Q: Find the largest sum of any slice inside an array

newbieThis is the 26th exercise I solved from Codility. It scores 100%. I think I improved a lot since I started with this lessons, around 2 months ago, but still every post I made had things to be improved. What do you think about this code? Task description A non-empty array A consisting o...

 
This looks more like a Code Review problem. Post here, if your problem can be reduced to a specific programming question (i.e., not "please spot any problems in my code") — chtz 19 secs ago
I'm voting to close this question as off-topic because it better fits to Code Review. — chtz 1 min ago
 
1:45 PM
0
Q: Refactor this RXJS code

J Rui PintoI have this angular service that is working perfectly but I'm feeling that it isn't very readable. How would you refactor it? import { Injectable } from '@angular/core'; import { concat } from 'rxjs'; import { map, concatMap, toArray } from 'rxjs/operators'; import { EntityApiAbstration } from ...

 
2:03 PM
I think this question would fit better on Code Review since the OP wants to improve his code. — Amy 6 secs ago
 
0
Q: Generating a random string of 6 characters long in Python 3.6.2

RahulI am learning Python so pardon me if this is the very crude approach. Am trying to generate a random string using alphanumeric characters. Following is my code: #Generating random 6 character string from list 'range'. def code(): # List of characters [a-zA-Z0-9] chars = ['a','b','c','d',...

 
@Amy Code Review doesn't accept hypothetical/stub code though. — JAD 40 secs ago
 
JAD
oh hey, that's me
5
 
2:24 PM
Oh dang I can't tag Mat in this room anymore
 
Greetings, Programs.
 
@410_Gone It is unfair that mods can superping users, but not the other way around
@Vogel612 might be able to draw his attention here though
 
I am, but Mat is very much pingable in VBA Rubberducking and most likely also reads the transcript in here, soo ...
 
Yeah, I always go to VBA Rubberducking whenever I want him something.
 
2:47 PM
0
Q: Solving Fizz Buzz using LINQ in C#

Wim ten BrinkThe Fizz Buzz challenge is well-known and should not need any explanations, right? I recently got a bit bored and came up with a solution for Fizz Buzz using LINQ and even asynchronous code and a lot of extension methods. Actually, it's only Extension methods! So, I thought, let's share it and ha...

 
3:01 PM
@chtz Since OP is not getting the expected results (implying the code is not working properly), this is not appropriate for Code Review which requires working code. — 1201ProgramAlarm 18 secs ago
 
Geoff Dalgas on November 11, 2019

We are always looking for ways to make it easier to be a part of the Stack Overflow community. One of the ways we make things easy is by offering the option to log in via other services, like Google or Facebook. As of today, we’re adding another option to log in – GitHub!

What this means to you is that you can now sign in to Stack Overflow by choosing GitHub when logging in, just like you can do now with Google or Facebook. 

Speaking as one of the developers who helped build this, I’m excited to bring this feature to our community especially because it’s been a longstanding request fr …

 
Q2: Is the above program logically correct? Have you tested it for some inputs to see if it at least happens to give the right answer in some cases? If it works, it's a question for codereview.stackexchange.com, if it doesn't then include the test case to make a minimal reproducible example. — Peter Cordes just now
 
@Vogel612 It's not important anyway, was going to make a Tim Horton's jab at him
I stopped at a speedway on my way to work to get a gas station coffee ($1.00 for anyone wondering) and there was a Timmy's next door.
Also got a gas station vending machine sandwich.
 
3:28 PM
0
Q: Monitor progress of written lines of code

SamuelNot long ago I was asked about how many lines of code I have written in C++ and could not really answer that question. For this reason and to become more familiar with Bash shell scripting I wrote a small code to monitor the lines of code written in a cerstain subdirectory. Currently, I count th...

 
3:48 PM
-2
Q: Java code doesn't display the reversed array

Jim6834 public int[] myMethod(int[] theArray){ int p = 0; int right = theArray.length -1; for(int i =0; i < theArray.length/2; i++){ p = theArray[i]; theArray[i]=theArray[right]; theArray[right]= p; } return theArray;` When I call myObject.myMethod(new int[]{1,5,6,7,3,4}) ...

 
4:23 PM
@CaptainObvious RBA
 
4:45 PM
possible answer invalidation by Łukasz D. Tulikowski on question by Samuel: codereview.stackexchange.com/posts/232186/revisions
 
0
Q: Shift part of char array to the same array after encountering a delimiter

rb-93I have a char tempBuffer which stores say my!string!hello!. After every ! is encountered that token is moved to a char codeBuffer and the rest of the characters are shifted to the begiinging of tempBuffer. So after my is moved to codeBuffer, tempBuffer contains string!hello!. I have currently i...

0
Q: Replace anchor tags and force create new tag with custom attributes

Engkus KusnadiI'm just use the add_filter('the_content', function($content){}); for filtering anchor tags in a post. Basically, I want filter anchor tags to appropriate format. I want to add custom attributes like rel="nofollow noopener" and target="_blank" if the anchor tag linked to external of my WordPress...

 
4:59 PM
@Duga Surprisingly, that's ok.
Still wrong, but hey...
 
possible answer invalidation by Mast on question by Samuel: codereview.stackexchange.com/posts/232186/revisions
 
@Duga I strongly doubt that.
 
@rolfl What is your opinion on edits like this, where among other things the capitalisation of imports is changed?
 
@AbeA. As long as you call the log method once, your code will fall in a pattern precode-log-postcode. This could be made more generic through delegates, conditions or just overriding methods. But to suggest a better optimization, we'd need to see more code. Consider posting the code at codereview.stackexchange.com for a review. — Wim ten Brink 49 secs ago
 
@pacmaninbw Me too.
 
5:07 PM
MOnking
 
@Mast :)
 
0
Q: Interface for getting Github PRs commenters using Github API

Mauricio RobayoI build this silly app to get the commenters' information on some PR, mostly for learning how to use API's and for improving my JS dom skills. Although it is working, it's mostly spaghetti code and very disorganized, so I am sure there is a lot of room for improvement. I would like to get some ...

 
5:23 PM
@Mast It's too much
His previous edits have been good though.
Monking
 
@rolfl I've been looking at really old C and C++ questions and answering those I think are worthy, and VTC for the ones that should have been closed. If you can take a pass through the close vote queue I'd appreciate it.
 
@rolfl Some of them, yes. Others, too much as well.
He means well.
 
@Mast I've rejected 2 or 3 and approved the others.
Generally I don't like it when he modifies code.
 
Me neither.
 
@pacmaninbw Hmmm , I hate the concrete-context close votes, is this an example of the question you thing should be closed? codereview.stackexchange.com/questions/232150/…
(that was the first one for me in the Q)
 
5:35 PM
Yes, I was looking for a real example of how to use the code, but that is a much more recent question than the others, it was asked in the last few days.
@rolfl ^^
 
Yeah, that has plenty of context. Why does it need to have an actual use case presented? Vote-to-leave-open
 
OK.
The others are 4 years old with no answers.
Trying to improve our ratio of answered to open questions.
 
There are plenty of zombies out there that I don't like. Doesn't mean they should be closed.
 
OK, my bad.
 
5:52 PM
@pacmaninbw - I went through the queue. In almost every case where you commented asking for a working example usage, a test case, or similar, I voted to leave open. Code Review does not need a complete program to be considered on-topic... but, what is posted, has to come from within a working program - the difference is subtle.
There were some cases where I thought that the question was possibly off-topic for other reasons, but my language-specific knowledge was not good enough to ascertain for sure, so I skipped those.
 
@rolfl Thank you for your time, I'll think about my definition of LCC.
 
The history of the close-vote queue is an interesting thing to see: codereview.stackexchange.com/review/close/history
 
As for efficiency, consider asking that on Code Review - where working code turns into amazing code. — Mathieu Guindon just now
 
Close reasons can be complicated.
 
@rolfl Do you see more users than just me or yourself in the link you sent me?
 
5:56 PM
If it were someone else, @pacmaninbw - I would typically say something like: Just because the context given in a question is not sufficient for *you* to make the post reviewable, does not mean that a person with the right background/skills won't find it reasonable.
But, in this case, I think your expectations on what the question asker is required to give is not in line with site expectations/
I see many users in that link.
 
I only see myself.
 
@rolfl Is that a 10k+ link?
 
perhaps. Nothing really sensitive in there, though.
 
Oh, no, it's a personal link.
Lists my own CVs.
 
Awarded at 10K: The full history of reviews by all users in any /review queue codereview.stackexchange.com/help/privileges/moderator-tools
 
6:01 PM
Oooh, so it's a multifunctional link. Shows your own until 10k, everyone's above it.
Pac & me are still mortal.
 
Very mortal, probably won't join the gods until some time next year.
Passed 9000 today.
 
Congrats.
 
Yeah yeah, it's embarassing how fast I started off with rep, that I did not really ever experience the impact of low-privilege access, and I can't remember what's available and when.
 
Thanks, I was thinking earlier that you should try to answer at least one question a week.
Also passed 4000 for the year today.
 
Had I been answering a question a week, I'd probably have double my current rep.
Oh well. Who needs rep. At least I did some clean-up.
 
6:11 PM
-1
Q: refactoring existing working code into separate file

TanI've the following code working on stackblitz editor as showing in this URL Right now I have only 2 tabs. Let's say if in future I have 20 tabs, I don't want to have 20 different this.initGrid(); for each tabs.Is it possible to create a separate file for first tab(something like firsttab.tsx) , ...

0
Q: A prime numbers enumeration optimized for speed

Wim ten BrinkI know there is this thing called "Eratosthenes" but that requires the allocation of a large array while I want to find (small) prime numbers fast, yet without needing too much memory. So I wrote PrimeTable.cs with this content: using System; using System.Collections.Generic; using System.Linq; ...

 
@Mast Yes, better clean-up than I have done.
There have been years when I haven't earned any rep, because I was busy working.
This is my best year.
 
I think I'm at 1k a year for the past 2 years. So with this speed, I'm going to need about 12 years to reach 20k.
 
Yes, and then we have one person who earned 13K and now doesn't bother.
13K in 7 months^^
 
Life isn't fair.
 
Never said it was.
@Mast Were you substituting moderators for Jedi or Empire on MSE?
 
6:20 PM
@pacmaninbw Considering it's about moderators going on strike, it was an obvious pun to make.
Yes, that's replacing Empire.
 
0
Q: hash image url and if valid store image url

Ryan i am trying to get all image urls which are valid are unique for which i am doing this.To make sure i am wont end up using the same image again i calculate hash of the image and store it in a text file and read the text file again.if there is any better way to do this, please let me know.Overall ...

 
6:52 PM
0
Q: Receive a list of names and return a list of users - HackerRank test

Andressa CabistaniSo, few months ago I did a HackerRank test for a company. The problem was to create a function which receive a list of names and returns a list of unique usernames. For example: For the list of names = ['john', 'john', 'tom', 'john'] The function must return: = ['john', 'john1', 'tom', 'john2'...

1
Q: VBA and SQL to return SQL results to Excel

Zack ENow that I finally have time to look back at this code I wrote over a year ago. I need help with streamlining the code I have written. I had to write a significant amount of IF statements to get this to work, but im thinking using functions anbd maybe dictionaries would be a much more efficient...

 
7:02 PM
Looks like a question for the code review stack exchange — JVApen 21 secs ago
 
@CaptainObvious That's interesting.
 
Treating this as a code review, this looks good to me. This is perfectly readable imo. — DetectivePikachu 28 secs ago
 
7:56 PM
Greetings!

I have a probably quite silly question:
While I'm profiling code (e.g. with cProfile or line_profiler) will the results be distorted if I do something else on the same computer? E.g. writing e-mails, watching youtube...
 
Profiling the timing of execution?
If so, yes.
 
Yep.
I see.
Thank you very much!=)
 
Anytime! :)
 
8:13 PM
-1
Q: Is there any way to make this code perform faster (deep learning)?

Ben CThe purpose of this network is to see in the dark. I am new to deep learning and haven’t had the time to debug this network and test it. Although i would appreciate any advice. Here is the code: I used Tensorflow and sympy class network(): def __init__(self, inputs, width, height, kernel_size...

 
@benjaminaaron_m - while @410_Gone is correct, there is often a lot to be learned even with impacts from other programs.
Also, you will never get a 100% clean profile.
It's important to always take a statistically significant sample of results before drawing conclusions, whether that is running the program multiple times, or some other mechanism for doing the code-under-test in a way that mitigates any external factors.
 
@ar2015: Read Checking if a number is prime in NASM Win64 Assembly which I linked earlier. You can use div r13d to do division with 32-bit operand-size, which is about 2.5 faster on Skylake CPUs for the same small-number inputs. — Peter Cordes 59 secs ago
 
8:59 PM
If it stays unanswered here, you might try codereview.stackexchange.comJohanC 32 secs ago
Maybe some ideas here? — JohanC 27 secs ago
 
9:15 PM
@rolfl If the results are extreme, other programs will generally have minimal impact for sure.
 
0
Q: Solving Subset-Product in Python

Travis WellsI've written a python script that solves a restricted variant of Subset Product by using integer factorization. The purpose of the script is for my empirical observations of the similarities between factorization and the NP-complete problem. The code compares two sets (or lists) from the origina...

 
Generally, in my experience, if you're profiling (not comparing) then other programs don't typically matter. But, they technically do.
If 70% of your time is spent in one method, chances are cleanliness of the test didn't really affect it that much, and that one method is definitely the bulk of your work.
 
That: ^^^ But I fear that the OP took your response as an absolute, and now he's doing youtube and e-mail instead of profiling ;-)
 
Hahaha possibly...I should have clarified more.
I do a lot of A/B benchmarks, so for me cleanliness is important because I need the comparisons to be as exact as possible.
Generally, I'm looking for A > B or B > A, so they should have the same relative interference.
That is, if I was watching YouTube during A, I either need to rerun A or do the same for B.
Though, I have a dedicated (minimal) machine for those benchmarks, so it's less an issue for me.
 
9:53 PM
For some reason the water in my pool is green and there's a weird film on the surface #nofilter
2
 
0
Q: Find Index of SINGLE odd / even number in array

van derSo I was doing some challenges on codewars.com and came across the following challenge (I managed to close the browser so could not submit my answer and therefore could not see the best possible solutions). Given an array of at least 3 integers, all the elements in the array are either even or...

 
10:12 PM
0
Q: How can I comment on or ask a question about a post edit?

Mode77On several occasions, my posts have been edited, but the editor did not leave any comment(s) on the edits. This is not helpful, as I am left with the question of the rationale behind the edit and/or how to avoid making the same mistake when writing future questions. In particular, the edit on th...

 
10:56 PM
@410_Gone
@rolfl
I get the message=))
Thanks to both of you!
 
0
Q: c++ Code that rearranges class of students, in ascending order

CoderGuy12345My code is almost complete... But, in the section where I need to rearrange students, it completely falls apart. I'm just not sure how to use the member functions in for loops/if else. Any ideas, anybody? //Use a class to create a gradebook #include <iostream> #include <algorithm> using namespac...

 
11:38 PM
0
Q: Computer guessing HI-LOW game C++

killerkody gamingI'm a csc101 student currently and I have so far not had much trouble on any of the projects, but on both of our tests so far, I have made a 63 and a 65. Now, I really want to succeed in this field, so I really can't afford to not pass the class this semester so I have too keep my current grade u...

 
11:58 PM
I wonder whether writing 300 lines for a simplistic socket-based calculator is overkill or not ...
but it seems like I did a bit of an overkill on the latest practical assignment...
3
 

« first day (2382 days earlier)      last day (1618 days later) »