« first day (2572 days earlier)      last day (1743 days later) » 

00:00
RELOAD! There are 6632 unanswered questions (90.0005% answered)
00:12
Perhaps this question is better suited for codereview.stackexchange.comJanez Kuhar 24 secs ago
00:41
@Peilonrayz You can't know if you're on the right track if you don't know your destination. And I didn't see one in the first revision.
Good work on the edit by the way.
If OP puts in the last bit, we can upvote and reopen.
> I was looking at the internet and I saw this variant. But there were a lot of other variants... This code is just an example code
@Mast I would just follow the "if there is no question" 'rule' in most situations - just assume they want good code. Unfortunately I think the OP specified it at the end of the next sentence.
Yeah, hopefully they edit as requested.
You're up late Mast, you still on holiday?
01:00
@Peilonrayz No, insomniac.
My alarm goes in a little over 2 hours.
Ouch, that's not great. D:
No, especially since it's kind of chronic.
Every once in a while it gets worse enough I got to skip a night.
*bad enough
Oh, I sometimes get rough patches. But that far exceeds the roughest of mine
Wow, I didn't notice that... I have a friend that speaks like Yoda, whilst amusing I notice myself speaking like Yoda too...
@Peilonrayz Interesting that sounds.
It is it is
01:09
If it gets really crazy, I got to skip a night and still have trouble falling asleep the next night.
If I ever find a foolproof method to fix that...
01:24
That's rough, I hope you have a nice sleep tomorrow to make up for tonight
@Mast I still of the opinion that example code isn't off-topic. The question seems to have enough context for my liking. But I don't know the language and C style languages always look like they have more context then they normally do... :/
@Peilonrayz It's littered with someStructand plucked right of the internet. There are at least 2 valid reasons to close that question, possibly a third.
The problem with questions like that, is the moment an answer comes in, OP will respond with "Oh, yea, but that's only in this example. My real code actually does it more like X."
@Mast Ah! Thank you. Could you help me see through your eyes for the other 1/2?
@syb0rg Your answer looks very interesting, but it does not reply to my question. I'm asking: "Do you think this is a correct implementation of a Siamese neural network with cosine similarity function to minimize?" Do you think it is or not? Thanks — DavideChicco.it Jul 29 '16 at 14:07
^^ Crap like that.
That's a question with a score of 81 by the way.
01:39
IIRC that was the highest scoring zombie at one point right?
@Peilonrayz Authorship. It's code plucked right of the internet. OP doesn't have a clue how and why it works, so a review is likely to go straight over their head. And then there's the legal and moral reasons why we don't do questions closed for Authorship.
@Peilonrayz Yup.
Bountied into oblivion.
And the kicker is it started on Stack Overflow.
If we close it now, will the migration still be rejected?
That would be something...
We all missed it on that one.
We missed the question shouldn't have been answered.
But oh well.
@Peilonrayz The 'maybe third' is RAW. Code should work as intended to the best of OPs knowledge and OP doesn't seem to have a clue.
Partially due to Authorship.
Ok, those explanations are great. Thanks! I'm not going to pick the authorship reason, as I don't really want to have to possibly defend "it's my code why are you saying it's not?"
@Mast We can't win them all. I should really learn ML so I don't just ignore them...
@Peilonrayz I've reviewed ML in the past, but most questions are simply not worth it IMO.
Tensorflow is quite debugable if you got the spare cycles.
This is more from a moderation rather than reviewing perspective. Some things I don't know so I just ignore them. Only moderating pure Python is a bit focused.
ML is also a bit trickier to moderate, yes.
01:52
Indeed, given the working x% rule where x is undefined is somewhat confusing
Yup
@Kaz About that race... I just realized I won it on the day of the big recalculation.
2
02:15
Would this be more relevant on the CodeReview SE? — Invizio 13 secs ago
@pacmaninbw I know it's been a while, but might it have been Empire from 1972 by Peter Langston? His site here and it looks like it's still alive in some version. Either may know whether the 90's version still exists. The original from 72 is lost though.
@Mast The mention the one I was talking about, a VAX game in the 80's, but the comment is that it bears no relation to that.
02:37
@pacmaninbw Perhaps they can identify the exact game, version and origin.
0
Q: Reactjs, control list of list of input

Nghi Thanhimport React from "react"; import "./styles.css"; const testData = [ { name: "list 1", content: [ { id: 1, value: " this is value 1 of list 1" }, { id: 2, value: " this is value 2 of list 1" }, { id: 3, value...

 
1 hour later…
04:10
@Mast Funny you should ask. I was browsing available stackexchange chatrooms for the first time, and stumbled into this one because it had a curious name.
04:21
0
Q: I implemented my own version of hash table in java with arrays and linear probing

RogerThatI did some manual tests by instantiating the class and it seems to be working okay. I wanted some feedback on the following: Is the code well structured? I notice I have a lot of redundancy. The search and delete methods are almost the same. I use a string to flag deleted keys until they are re...

04:36
This is better suited for codereview.stackexchange.com — Mateen Ulhaq 46 secs ago
 
1 hour later…
05:39
05:54
0
Q: Backtracking Longest Increasing Path Matrix

PenguinSnowHow do I implement backtracking to get the coordinates (index) of the longest increasing path in a matrix? The following is my code (diagonal movements allowed): def longestIncreasingPath(M): if M is None: return(0, []) row, col = len(M), len(M[0]) if (row == 1) and (col == 1): re...

06:40
possible answer invalidation by KooiInc on question by KooiInc: codereview.stackexchange.com/posts/242512/revisions
0
Q: Run non overlapped periodical tasks on user specified executor

g4s8I have concurrency tasks in my module: user code is able to instantiate my object and specify Executor service, then user can submit requests to this object which should be run on specified executor. I'm calling this object requests queue. Also, this object holds internal state, but it's not rele...

07:05
0
Q: Best way of converting a dynamic number of list items into variables in Python

SamI have a simple scrapy spider that crawls a page and returns H1 on the pages. Since, each page is unique, one cannot know how many h1's will be on the page. Since the scrapy spider returns a list, I need to convert the list of lists into variables that I can then insert. The output of H1 could l...

0
Q: Why my code always get exception?

FaisalHi I am working on a project in c#. I am using async task to perform parallel activities. But when I execute my code, it always goes to the exception part. While debugging I am able to perform my desired tasks but still it hits the exception part I don't know exactly what is the problem. Needed a...

07:28
-2
Q: In C, why can't you use sscanf() to trim a string?

Jeff SzuhaySo, if you get a string with fgets(), what is wrong with trimming the string this way: const int stringMax = 80; char* string[ stringMax ]; fgets( string , stringMax , stdin ); // remove trailing <newline> that fgets preserves. len = strlen( string ); if( isspace( string[ len-1 ]...

-1
Q: Why does it display the wrong date in php

XYBOXNote: Please don't mark this as duplicate This is not related to other questions as they all have incorrect timezone while I don't and the time getting displayed is literally January 01, 1970, 05:00:00 although it is May 19, 2020, 12:19:00 right now. I am using the PHP date function for this <?...

08:00
possible answer invalidation by KooiInc on question by KooiInc: codereview.stackexchange.com/posts/242512/revisions
08:13
@CaptainObvious Closed.
@Duga Rolled back.
@Duga Took that with it too.
08:38
0
Q: Logger which writes asynchronously to file from multiple threads

Wballer3I have written a simple logger, AsyncFile, which asynchronously writes data to a file. Since data is going to be written very often (E.g. 10 writes per 30 milliseconds from different threads, my system has a 30ms sync time), I would like to know if: 1. The design makes sense att all? Am I missin...

09:01
0
Q: Cannot read property 'fromJSON' of undefined while testing in Jest

Jabbar Memonwhile running jest i get the following error.I dont know why am i getting this error. TypeError: Cannot read property 'fromJSON' of undefined at Object. (node_modules/@grpc/proto-loader/node_modules/protobufjs/ext/descriptor/index.js:3:66) at Object. (node_modules/@grpc/proto-loader/build/src/...

 
1 hour later…
10:22
I’m voting to close this question because it belongs to codereview.stackexchange — Reblochon Masque 25 secs ago
@Touqueer I might, but I won't optimize on code level, sorry. I have too limited a knowledge of c++ and its library ecosystem to help you out here. If you are after optimization of a given code base and do not intend to abandon it altogether (eg. in favor of a completely different algorithm), then maybe the code review site would be a more suitable venue for your question anyway. — collapsar 37 secs ago
10:35
0
Q: Autofill a table based on the input provided in a userform

Mariusz KrukarGood morning, I have the following code: Option Explicit Private Sub CommandButton1_Click() Dim LastRowA As Long, LastRowB As Long, LastRowC As Long, lastrowD As Long, LastrowE As Long, LastrowF As Long, LastrowG As Long, LastrowH As Long, LastrowI As Long, LastrowK As Long, LastrowL As ...

0
Q: mocha chai tests

Ibn RushdProblem: I want to have a test fail, because the email already exists. Code: So I create [email protected] and [email protected], but is there a way to do it without this. it('prepare', (done) => { chai.request(rest_api_url).post('/subscribers') .send({email: '[email protected]', name: '...

10:58
0
Q: Simple State Machine and Transition Table

J. DoeThe goal is to have well defined state transitions, and the ability to provide the next event to execute. I'd like to know if this is a proper implementation of State Machine, considering how states and transitionTable are defined, and how I handle event as input and output via update. In many ...

11:22
0
Q: Await all http request body chunks before moving on

GGirottoI'm developing a man in the middle proxy that will let the user see and modify HTTP and HTTPS requests before they leave the client and responses before they arrive at the client. The code I'm working on is working, but I don't know if it's the right or beast way to achieve this behaviour. I'm wa...

 
1 hour later…
12:30
@DerKommissar If you're still using it V4 just got released. Now they have a few arbitrary length arrows. It makes RST headers so much nicer :D
0
Q: implementing lexical, syntatic and semantic analysis

Amiram GoldblumMy program , developed with C using win_flex , implements lexical, syntatic and semantic analysis , given defined grammar rules. I would like to know if you any suggestion for improving or refactoring this. Here is my code: main.c #define _CRT_SECURE_NO_DEPRECATE #include <stdio.h> #include <...

Nice lol
I don't use it as much anymore, the JetBrains IDE's ship with their own version of Fira Code and I don't use Visual Studio at all anymore.
12:45
Huh, I'd never noticed that with JetBrains. However I prefer a standardized font across my applications :)
13:07
If this program is working and you only have issues about performance or architecture, it is maybe better to ask that on Code Review. If you do so, maybe it is better to delete question here to avoid cross postings. — colidyre 50 secs ago
13:18
0
Q: Email Service - Sending an email with azure blob storage

JsonDorkHere is some code that sends an email using Mimekit for .net C# to send email via Office365. DI is done using TinyIOC. It downloads an image from blob storage and then sends it with an attachment. Each email will ALWAYS have at least one attachment. Code feels a bit messy, especially the body/sub...

14:05
0
Q: How do I make this code much simpler and short?(If there is any recursive method to build this function please share)

Uncalled AstronomerTask: Complete the following function that determines if the number of even and odd values in an integer list is the same. The function would return true if the list contains 5, 1, 0, 2 (two evens and two odds), but it would return false for the list containing 5, 1, 0, 2, 11 (too many odds). The...

14:15
possible answer invalidation by tieskedh on question by Uncalled Astronomer: codereview.stackexchange.com/posts/242563/revisions
14:29
0
Q: emplace_back is faster than allocate once + move in c++11?

user3360601I have two fuctions: f2 - first allocate memory , then move data. f - deallocate + move = emplace_back. I am trying to understand what is faster and better to use in terms of performance and code quality? void f2(const std::vector<std::string>& users) { std::vector<std::pair<std::string,...

Please don't try to use panics as exceptions: github.com/golang/go/wiki/CodeReviewComments#dont-panicJimB 49 secs ago
14:46
It might be best to have a specific example where you do your best to convert the code and then post the result in Code Review. In many cases, the best approach might be to essentially throw away the old code (still using it as a sort of pseudo-code for the core algorithm) and write an idiomatic C++ implementation from the ground up — John Coleman 45 secs ago
@CaptainObvious I'm betting that's going hot
Kaz
Kaz
15:06
@Mast Congrats :)
0
Q: How many different bracelets can Harry make if repetitions produced by rotation around the center of the bracelet are neglected?

user718833Description Ginny’s birthday is coming soon. Harry Potter is preparing a birthday present for his new girlfriend. The present is a magic bracelet which consists of n magic beads. The are m kinds of different magic beads. Each kind of beads has its unique characteristic. Stringing many beads toge...

0
Q: Less code vs More readable

Robin van der PlasI was rewriting some code from my colleague and I was questioning if I was improving the code at all. My take at the code: if (account == null || (!account.Authorizations.Any(x => (x.Role.Name == RoleNames.ADMIN || x.Role.Name == RoleNames.SENDER || x.Role.Name == RoleNames.SENDERSA...

15:25
Monking
@Peilonrayz Hotness 44% according to this user script mentioned on Meta SE
@SᴀᴍOnᴇᴌᴀ What an interesting user script
yes - I just saw it yesterday and installed it
Yesterday it showed 39% for this question before it went hot
@Peilonrayz now it shows 32%... maybe because we are boosting the views now
@SᴀᴍOnᴇᴌᴀ What, I'm still getting 25%
Interesting you can get hotness 124%. It also seems fairly accurate on where the questions are on the list too
15:39
Probably you could find answers here: codereview.stackexchange.com. — norbitrial 12 secs ago
@Duga TIL there is a SO tag refactoring
TIL (also) about the duper, superduper and thor badges - likely won't be too many of those on CR...
16:00
@CaptainObvious heh OP added own cross-post comment
stackoverflow.com/questions/61893787/… Main discussion and an answer is here — user3360601 20 mins ago
@SᴀᴍOnᴇᴌᴀ Err, they don't exist it's tagged and not .
Monking
16:15
Monking
16:37
@Peilonrayz Yeah JB has a "JetBrains Mono" font that I think is based on FiraCode or something. I just use it because it's the default.
17:12
1
Q: Implementation of cp program that prints the number of bytes copied

Vijay AntonyI have written the code for implementation of the cp program that prints the number of bytes copied when the user presses Ctrl-C. Could someone please review this code and provide feedback. Thanks a lot. #include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<fcntl.h> #include<error.h>...

@DaveNewton they are not generally used a logical operators and any code reviewer would throw that right out. — engineersmnky 44 secs ago
17:34
Monking
-2
Q: How many different bracelets can Harry make if repetitions produced by rotation around the center of the bracelet are neglected?

user718833Description Ginny’s birthday is coming soon. Harry Potter is preparing a birthday present for his new girlfriend. The present is a magic bracelet which consists of n magic beads. The are m kinds of different magic beads. Each kind of beads has its unique characteristic. Stringing many beads toge...

Last comment reads "...**the author** thinks it can't be accept, but it do". Seems like the asker is not the author, in other words (?)
0
Q: Filter out unwanted substrings while generating all possible relevant substrings

Brayoni Write a Program that determines where to add periods to a decimal string so that the resulting string is a valid IP address. There may be more than one valid IP address corresponding to a string, in which case you should print all possibilities. For example, if the mangled string is "19216...

Test .**foo** foo
Wat, the pre-post preview showed that as "Test .\ foo foo" And ofc you can't escape whitespace
@MaartenBodewes Seems like a reasonable assumption. It's too flaky for my taste so I asked if they are.
 
1 hour later…
19:08
This is a great question. A 2D Zipper could be just fine however perhaps we can achieve even a better Grid type structure composed well enough to suit your particular need. Here is a trial case with it's own problems and possible solutions. — Redu 48 secs ago
19:25
possible answer invalidation by J. Doe on question by J. Doe: codereview.stackexchange.com/posts/242555/revisions
0
Q: Project Euler #14: Longest Collatz sequence on HackerRank

RNanowareThe following is the conclusion in a long chain of attempts to solve Project Euler problem #14 (Longest Collatz sequence) on HackerRank in the Haskell programming language. The problem is defined as follows: The following iterative sequence is defined for the set of positive integers: ...

0
Q: Protein Translation - Translate RNA sequences into proteins

Milliorn RNA can be broken into three nucleotide sequences called codons, and then translated to a polypeptide like so: RNA: "AUGUUUUCU" => translates to Codons: "AUG", "UUU", "UCU" => which become a polypeptide with the following sequence => Protein: "Methionine", "Phenylalanine", "Se...

@Duga Rolled back.
For reviews and feedback on working code, you might try the Code Review SE community: codereview.stackexchange.comDavid 18 secs ago
possible answer invalidation by J. Doe on question by J. Doe: codereview.stackexchange.com/posts/242555/revisions
20:07
@Duga It's ok, added a comment.
20:20
0
Q: Return a 404 when a resource is not found in Spring Boot

PittoI wrote this code in order to return a http status of not found to my users in case the resource is not present in the DB. @RestController public class ExampleController { public final ExampleService exampleService; @Autowired public ExampleController(ExampleService exampleService)...

21:04
Also, code review: prefer 32-bit operand-size whenever possible to make the machine code smaller. e.g. let implicit zero-extension to 64-bit do its job with movzx eax, cl. Also prefer mov to a different register so modern CPUs can optimize internally with mov-elimination, saving a uop for the execution ports and adding 0 instead of 1 cycle latency to that critical path dependency chain. e.g. mov ecx, r8d instead of mov r8d,r8dPeter Cordes 15 secs ago
21:31
0
Q: efficient way for nested loop

NodegeekI got this script which work perfectly but I got some delays because of this 2 for loops [i][j] is there any way to do the same function but with a better and effective process like foreach or other this my code : User.find({}).lean(true).exec((err, users) => { let getTEvent = []; ...

21:52
@codecrafter_123: My pleasure helping you. Stackoverflow is for asking doubts and questions. If you want to get your code reviewed, you can post a question over here. Where people can assist you better. — Saad 54 secs ago
0
Q: Trying (and failing) to implement the best conventions on OOP Swift

CornwellI'm making a MacOS app that will do some analysis on the user's calendar data. For now it only supports Apple's native calendar (EventKit), but I will later add support to Google, outlook, etc. Models/Events/Base.swift: import Foundation struct EventData { var title: String; var startD...

0
Q: HashMap Implementation (dictionary) in Python

MahdeenSkyI attempted making a hashmap in python, and it was harder, due to some limitations but this is my version of dictionaries in python. Are there any way to simplify or do the same thing in less code along with tips and tricks? class HashMap: def __init__(self, memory): # refers to the length o...

22:05
Then fix it. The easier it is for people to read, the more substantive suggestions you might get. Again, CodeReview might be a better place. Check it out. — TomServo 44 secs ago
@TomServo fyi, if you write [codereview.se], it links to Code Review. — Andy Turner 29 secs ago
@TomServo if you didn't know that Code Review is a stackexchange site, how would you find it? Type "CodeReview" into a search engine? Code Review does come up as the first result for me; but I'd assume you meant something different, because of the spacing. Or maybe you did mean that...? Help a beginner out, give them the link. — Andy Turner 53 secs ago
@Orland there are things like the fact you don't close the stream (use try-with-resources); you don't need to keep casting to char; you probably shouldn't use bis.available(); you don't need to create a new StringBuilder, you could just clear it. But, again, head over to Code Review to get a thorough answer. — Andy Turner 1 min ago
22:41
0
Q: How can i optimise my code with BufferedInputStream

OrlandSuppose I have an InputStream that contains text data, and I want to detect all words and their numLine. this is my code: BufferedInputStream bis = new BufferedInputStream(new FileInputStream(filePath)); int currentChar; int numLine = 1; StringBuilder word = new StringBuilder(); while ...

22:58
that makes no sense. What if the OP doesn’t even know what java is? They might get very confused. Also, not in this case, but all the languages don’t have the same features; some languages might have completely different features which might be impossible in some other language. Please make a habit to answer only in the language tagged. This is not codereview. — Harshal Parekh 38 secs ago
@Duga "This isn't Burger King, and you can't have it your way..."
@Duga Wait what "this is not codereview"
23:25
possible answer invalidation by lettomobile on question by lettomobile: codereview.stackexchange.com/posts/242473/revisions
If your code works and you want to improve it, please post your question on codereview — Harshal Parekh 21 secs ago

« first day (2572 days earlier)      last day (1743 days later) »