« first day (2571 days earlier)      last day (1744 days later) » 

00:00
RELOAD! There are 6631 unanswered questions (90.0000% answered)
3
-1
Q: HttpInterceptor works in ng serve but not works in ng serve --prod

gehad alharirii make angular project using angular 8 the httpinterceptor works fine in ng serve --o with no errors but when i make ng serve --prod this message error showing me StaticInjectorError(o)[InjectionToken HTTP_INTERCEPTORS -> e]: StaticInjectorError(Platform: core)[InjectionToken HTTP_INTERCEPTO...

 
1 hour later…
01:08
For what it's worth, I don't see anything wrong with the code you've posted (not that I'm always a great code reviewer). You've got code running every 100 ms, but it's not spinning off a lot of garbage, and what garbage you do have looks like Gen1 garbage. Why did you start looking for evidence of a memory leak? — Flydog57 17 secs ago
02:03
0
Q: Implementation of a vector of pairs

JordanIn a personal project I was working on, I had a vector of std::vector< std::pair<unsigned,char>>'s that represented a character and its position in the alphabet. I found that using/manipulating that vector to be clumsy so I wrote this implementation. Essentially, it just wraps the usual vector op...

1/2) You have very limited / no control over the TCP/IP stack in Lamba. There are several strategies: 1) Don't give the function permissions (roles) it does not require. 2) Source code review and test your code to remove vulnerabilities. 3) Restrict outbound network traffic using ACLs. This means once an intruder is inside, prevent him from easily getting outside to deliver any information. (sort of like a security gate that drops down if there is a break-in at the mall to keep intruders inside). — John Hanley 9 secs ago
Automatically include code reviewers should be the option you can choose, would this resolved your question? — Leo Liu-MSFT 28 secs ago
 
1 hour later…
03:13
Code review is down the hall. — John Bollinger 15 secs ago
0
Q: PHP with OR ( || ) operation

Ubayif ($_SESSION["level"] != "utama" OR $_SESSION["izin"] != $_GET["chat"]) { header("Location: login.php"); exit; } //I want limit acces admin or user with permission

03:37
0
Q: Is it a correct way to implement the system() function in Linux

Paulson Raja LI am trying to implement system() function using fork() and exec() in Linux. Could someone please review this code and suggest any improvisation and any test case failure. I am a beginner. Thanks:) #include<stdio.h> #include<unistd.h> #include<sys/types.h> #include<sys/wait.h> #include<error.h>...

 
2 hours later…
05:12
0
Q: QCombobox Case selection - Pyside2 Index via Sqlite

SamI have a very simple file where I have a Qcombobox Filter. When you select the filter, I run through a case on the index and output results. So, on selection I trigger: self.comboBox.activated.connect(self.handleActivated) Then, my handled function is def handleActivated(self, index): ...

05:36
-1
Q: scrap and analyze Instagram related hashtags using python

user2879171I am not the creator of the codes. I found it in a forum. It worked till three months ago and yesterday I tried to run it, but somehow didn't work anymore. so here is the codes: # -*- coding: utf-8 -*- """ @author: Blacklistede """ import requests import random import time import argparse import...

0
Q: BST implementation using smart pointers in C++

user_185051This BST implementation seems to work, I would appreciate an advice on how to improve the code. I am also interested in the following: rule-of-5 methods, are all of them necessary (e.g. is destructor necessary when using smart pointers)? Are they implemented correctly? Does Node class need rul...

05:58
@Mast that almost sounds like lyrics to a song
06:48
Code Review is a good place to ask this type of questions — Big Temp 28 secs ago
 
2 hours later…
08:20
I think this would fit better in the Code Review section of the site. By the way, when you place it there, make sure you explain what exactly is this transformation you are doing. — fpezzini 26 secs ago
08:44
0
Q: Javascript object to be used as a key in a Map

noi.mI have a use-case where we need to use a javascript object as a key in a Map. If we don't implement a toString() method we're going to end up with [object Object] by default so i came up with the below pattern. Are there any drawbacks to this, or a better way to achieve this? var Name = functio...

09:07
0
Q: Finding The Largest Digit in a Number using a Recursive Function in Python

Aritra PalI tried it using the code given below. big=0 ; c=0 def largest(n): global c c+=1 global big if n//10!=0: if big<n%10: big=n%10 return largest(n//10) if n//10==0: if c==1: return n else: return big But, when...

09:31
0
Q: One form for multiple models in Django

Lax_SamI must allow user to add city, state and country if it is not already present in the drop-down. Then I must create the respective model instances and then update the city in the userprofile. The below is the working code. I have not checked it for all cases but I have checked it for most cases. P...

10:24
yes. Post this question where it belongs, on codereview@stackexchange and I surely will — Your Common Sense 49 secs ago
10:42
0
Q: Db class improvements

Fabian SchussHell guys, does anyone have some improvements for my class ? <?php class DB { public static function connect(){ if($GLOBALS["db"] != NULL){ return $GLOBALS["db"]; } try{ $pdo = new PDO("mysql:host=" . DB_SERVER . ";dbname=" . DB_NAME . ";c...

 
2 hours later…
13:03
0
Q: Use proxy for jquey-like DOM extensions

KooiIncI have cleared all my scripting from the use of JQuery, but sometimes I miss a few handy extensions. Now I'm playing with the idea to "extend" document.querySelectorAll with some handy stuff, using the proxy Object. Here's a snippet to demostrate that idea. The advantage seems to me that there'...

13:28
The question you posted on codereview — Your Common Sense just now
13:50
possible answer invalidation by akuzminykh on question by akuzminykh: codereview.stackexchange.com/posts/242464/revisions
@Duga sigh
Left a comment on the answer, give it time.
If the first line of the answer is scrapped it's all fine again.
I'll keep an eye out.
14:18
Ryan Donovan on May 18, 2020
Today we’re seeing another shift from virtual machines to containers. Containers are virtual runtime environments running on top of the operating system kernel that emulates the operating system itself. That’s where the serverless model comes in.
14:37
-1
Q: A simple chess engine in Haskell

L292092This is my first Haskell project so I don't really have a good feel for what makes Haskell code clean, so they'll be lots of things that can be improved. Things I have a gut feeling are wrong: pieceAt on line 194 throws an error when it's called on an empty square. My reasoning was that it's un...

@Duga @akuzminykh I have rejected your suggested edit on the answer. It's a sticky situation that is better resolved whenever vnp comes online.
Monking
Monking
15:00
0
Q: Efficiently generate large file

I wrestled a bear once.Here's a function I use to generate a 2.5 gig SQL dump file for testing. It works but it takes a long time. How can I make it more efficient? const crypto = require("crypto"); const fs = require('fs'); const os = require('os'); const path = require('path'); (async function main(){ var dumpf...

Asking for open-ended suggestions on your program is inappropriate for Stack Overflow. Perhaps Code Review is what you want. — Prune 18 secs ago
15:24
0
Q: React - How to create a generic component & avoiding duplicate code

Shir KI create a website of images, using React. The data of each image received from Firebase. When the user clicks on a certain minimized image - loaded a new component named ZoomCardItem, that contains details about the image (received from the parent) and displays a larger view of the image. Then,...

Monking
15:56
This question is more suited for codereview.stackexchange.com — pinkfloydx33 43 secs ago
If the code works as written, and it's code you've written, and you want a review of all the code, check the help center of Code Review to see if the question is on topic there. — Heretic Monkey 30 secs ago
16:19
@Peilonrayz You can't ping them.
I agree though. Although vnp has been online in the meantime and hasn't responded. I hope to see that changed in the near future.
@Mast You can't now, but they were in chat when I did.
Huh
I thought I could ping anyone that had been here in the past 2 days.
Same, I know I've been pung like ~1/2 months after I'd last been in here
I guess it's relative to how long they've been in & if they've posted or something
I'm looking for a chat ping faq, but no such luck.
There's this:
13
Q: How to make sure I'll be pingable in chat for a few days?

Revetahw says Reinstate MonicaLet's say I want people to be able to ping me in a certain chat room for a few days. Do I have to actually say something there, or is it enough to simply join the room? And do I remain pingable even after closing the room? If yes, for how long? And for how long if I said something?

If left and never posted in room, not pingable.
If left and ever posted something in room, pingable for 7 days after leaving.
Yeah, that'll explain this event
16:28
Yup.
Oh, and a direct reply will always ping.
Shiiiiit, I'm going to remember that.
4
A: Does a direct reply to a message in chat create a notification, no matter what age the message is?

Shadow Keeps Social DistanceYes. Direct reply to a chat message always creates a "ping" to the user who wrote that message, and uncleared ping will become an inbox notification within 15 minutes. The age of the message does not matter: it can be few seconds old, and 10 years old message.

That's so convenient.
And totally not abusable ahum
possible answer invalidation by Sᴀᴍ Onᴇᴌᴀ on question by I wrestled a bear once.: codereview.stackexchange.com/posts/242516/revisions
@Duga Fine.
@Duga I hope one day SE auto add 1 \n to the end of posts...
I guess cause SO doesn't have MathJax they don't really care
17:29
Code review suggestions: name your commands with imperative tense, like "BlockCardCommand" and your events with past tense, like "CardBlockedEvent". Also, the exception handling looks suspicious. You normally want the exceptions to Buble up in message handlers so that the operation is retried until it succeeds (for transient errors). — Francesc Castells 28 secs ago
17:40
possible answer invalidation by I wrestled a bear once. on question by I wrestled a bear once.: codereview.stackexchange.com/posts/242516/revisions
it sounds like you're not going to accept any answers that adhere to the question, but you have a working program that needs help dealing with larger data sets -- post to the code review site codereview.stackexchange.comKenny Ostrom 26 secs ago
@Duga Rolled back.
@CaptainObvious haven't seen that user around here in a couple years...
0
Q: Python - Selection Sort

Myzel394I tried to create my first sort algorithm using Python. What do you think? def selection_sort(data: List[int]) -> List[int]: unsorted_list: List[int] = data sorted_list: List[int] = [] for i, number in enumerate(unsorted_list): # Insert new value min_value = min(unso...

This seems more like a question for Code Review — user 9 secs ago
17:57
@CaptainObvious Hopefully no-one has any problems with me adding another code block there.
@Peilonrayz Why not make them both part of the same block?
@Mast Cause that is against site policy. Do I put one or two empty lines between them? If I put one what if someone comments on it?
lol
I understand.
18:13
Yeah, I'm normally happy to break RAW, but IMO that's breaking RAI
Yea, you made the right call there. Let's see what happens.
18:32
0
Q: CLRS implementation (opportunity to sort subarray) of merge sort in golang

maxim-glyzinI'm reading "Introduction to Algorithms" by CLRS and I can't find an implementation of the pseudo code from the book in golang. By the original implementation I mean that we deal with extra parameters in the function to define slice of an original array. All implementations on the web deal with w...

You might want to post this on codereview.stackexchange.comjuharr 10 secs ago
There's literally a stack exchange platform for code review: codereview.stackexchange.com You should resubmit there — Isaí Hinojos 43 secs ago
I’m voting to close this question because it belongs on codereview.stackexchange.com, and the option is not available in the Closing reasons list. Which it should be! Or at least a fill in the blank option. — mxmissile 9 secs ago
Welcome to Stack Overflow! As you have probably figured out, you should ask this question on the code review site. When you have specific problems or questions, please come back to see us! — MikeH 58 secs ago
18:56
0
Q: Correct MVVM pattern format with Delegation

DaveloperI would like to ask you if my implementation of the pattern MVVM is correct. 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. struct Person { let firstname: String let lastname: String var phone: Int } pro...

@Peilonrayz is RAW or RAI related to this?
29
Q: Should you edit someone else's code in a question?

LstorI have seen several (suggested) reviews lately, where someone edits the code in the original poster's question. Should such edits be allowed? The edits in question are mostly minor. Some add spaces to the code to increase readability, others fix syntax errors in the posted code.

@SᴀᴍOnᴇᴌᴀ Yeah, there's also a couple of similar questions IIRC
19:13
If this is working code that you think could be improved, see Code Review. — jonrsharpe 25 secs ago
-1
Q: New to C# and OOP in general. Am I doing it correctly?

A100F1I'm just looking for a code review and tips/advice because I am new to coding and want to make sure I am on the right track. Before I move on to new concepts I would like to ensure the ones I have learned so far are being used correctly and efficiently. I would like help with the following: ...

19:44
0
Q: Caesar-Cipher Implementation

chrysaetos99Background I am a total beginner in Haskell, so after reading the Starting out-chapter of "Learn you a Haskell", I wanted to create my first program that actually does something. I decided to to the famous Caesar-Cipher. Code import Data.Char encryptChar :: Char -> Int -> Int encryptChar cha...

 
1 hour later…
20:48
Is it worth keeping this question around, or should it be deleted? There is one answer with no votes on it...
If you want help improving working code, you should post this on CodeReview.SE. If you do decide to do so, please delete the question here. — NathanOliver 7 secs ago
If this is code you've written yourself, and you want a review of all aspects of the code, you should consider visiting the help center at Code Review to see if the question is on topic there. — Heretic Monkey 59 secs ago
0
Q: Import huge XML data set into MongoDB while parsing data

djozefiakI am currently working with the Stack Exchange Data Dump - to be more precise - with the dumped Posts.xml data set from Stack Overflow. What am I trying to achieve? I want to read the whole data set and import each row (a post on Stack Overflow) as a document into an MongoDB database. What am I...

@SᴀᴍOnᴇᴌᴀ Deleting that doesn't sit right with me. But I wouldn't fight against it.
@Peilonrayz because it has an answer, upvotes or something else?
It's mostly a gut feeling. If I were to attribute it to something I think it'd be that there's an answer.
21:00
I was going through some ripe zombies and noticed there are a few of those that are closed yet have an answer
I can see a good argument about the answer having no score. But I don't agree with that argument here.
Probably a good idea to post on meta if there's more than one.
I’m voting to close this question because questions about design of functioning code belongs on sites such as codereview.stackexchange.com. — Rob 29 secs ago
21:20
possible answer invalidation by Stephen Rauch on question by beppe9000: codereview.stackexchange.com/posts/236318/revisions
21:42
@Duga That's okay - SR removed excess code fence at end of code... the one answer may be NAA given comment by @pacmaninbw
Huh, VLQ has gone. Now there's only NAA
21:56
@Peilonrayz flag it for moderator attention.
I was hoping the answer would add a few observations and they haven't.
@pacmaninbw Oh, I thought they must have merged them. However that is not the case.
I get that feeling with a lot of users that ask questions. They post and disappear for a day.
@Peilonrayz Or never return at all.
Indeed
soo ... umm ...
22:04
Yes?
suggesting to use a builtin over calling an external program that's a port of a program from a different platform seems like a viable review
So I should remove my comment?
0
Q: Getting rectangle (on screen) around points in world C++

WillemI am curious is the code I have written can be optimized or simplified. The code successfully gets the bounds, as in min and max (think: opposing corners in a rectangular prism) and from there gets the two points on my screen which, if corners of a box, would encapsulate the object. auto util::g...

0
Q: GET request subresources

Connor ButchI have a few questions revolving around making get requests to resources with subresources; for a contrived example let’s look at sports teams and the players on a team. This is a many to one relationship, and it does not make sense for a player to exist without being on a team, so the a team has...

the answer is kinda still crap right now :/
@Vogel612 Yes, it definitely is that.
22:06
@Vogel612 Indeed, VLQ as it's salvageable rather than NAA
oh VLQ and NAA are both a mess...
neither is really applicable here, because deletion is over the top
Indeed, I downvoted but decided a VTD was a bit much
the answer has a really good core observation, it's just presented so incredibly badly.
OK, so we should all upvode the answer?
Huh, re-reading the description all my VLQ and NAA flags have been wrong
> This answer is unlikely to be salvageable through editing
22:11
how you vote is really none of my concern so long as it's not voting abuse
It is the kind of answer I would expect on SO rather than on CR.
@Vogel612 I'm going to delete my comment, yours is better.
wasif was on SO ~8 hours ago so hopefully will heed advice soon 🤞
22:52
@CaptainObvious Somebody else can try and explain it.
@pacmaninbw Not in its current state.
We could add a couple of lines, majorly improve it. Lead by example and all that.
Feels wrong, but may be the least worst option.
Alternative is outright deleting it.
In time.
Welcome to The 2nd @MironV
@Mast You didn't hear the sarcasm in my voice when I asked it.
@pacmaninbw My monitor was too cheap to have the sarcasm-filter adjustable.
3
@Mast Does my comment encapsulate what you are getting at? codereview.stackexchange.com/questions/242528/…
@Mast Thanks!
@Mast lol
23:02
@pacmaninbw Close enough.
@MironV What brings you to our little corner of the internet?
23:14
@CaptainObvious Cleaned it a bit.
@Mast LOL.
@Mast I'm a bit confused by the following comment. The "to what" is defined in the idiom.
"want to make sure I am on the right track" Right track to what? — Mast 4 hours ago
@Peilonrayz American idiom meaning "Heading in the correct direction".
Or following the correct path.
I understand the idiom. I don't understand Mast's question about it.

« first day (2571 days earlier)      last day (1744 days later) »