« first day (2335 days earlier)      last day (1682 days later) » 

12:00 AM
RELOAD! There are 6160 unanswered questions (90.0869% answered)
 
 
2 hours later…
2:12 AM
0
Q: Getting around CORS error for displaying images on my website

Hooman BahreiniI have my images stored in an S3 bucket and I am serving them from AWS CloudFront. I have created 2 CNAME records for the CloudFront: mywebsite.com and www.mywebsite.com So the image path being served from AWS CloudFront could be either of the following urls: www.mywebsite.con/s3-folder/img-1.j...

 
 
1 hour later…
3:31 AM
0
Q: TFTP: Server not able to send packets

Arushi AroraI am trying to implement TFTP using stop and wait and UDP protocol in C. But my server is not able to send packets to the client. CLIENT: it is supposed to receive packets and send ACKS SERVER: Sends packets and re-transmits them if no ACK received. Here is my code. Output: I receive Sending fr...

 
3:45 AM
Might want to go with a more complete example and post to codereview.stackexchange.com. There's really no rule that doesn't have exceptions and so the devil is in the details. — Mark Peters 20 secs ago
 
4:25 AM
Monking
 
0
Q: No common project for multiple projects

user2684198Our team handles multiple projects that work with files in S3 and execute models. When I joined the team, I expected to see at least 1 common package that provides abstraction over S3, tasks, etc. However, all developers in my team seem to be extremely against common packages. What ultimately h...

 
4:53 AM
0
Q: Code readability between breakdown multple operations into each statement VS single statement with multiple lines

UltimaWeaponI have a debate with the other people in my team about the readability of the following code: size_t h = 0; h ^= hash<int>()(state.block); h ^= hash<GroupId>()(state.group); h ^= hash<GroupIndex>()(state.index); return h; versus: return hash<int>()(state.block) ^ hash<GroupId>()(state.g...

 
5:12 AM
0
Q: Angular forms what is good reactive forms or [(ngModel)] without reactive forms

pavithra roxI have a question. I am developing this angular app and it has big forms with 100 + felids. I was thinking without going reactive forms manage the forms with [(ngModel)] only. So that it is easier to do validations and I only have to provide that same JSON to the web service endpoint. Is this the...

 
5:55 AM
@CaptainObvious example code
 
6:11 AM
I achieved using iterating over the original array and pushing merged object to another array This seems fine enough, I'm not sure how it could be made less complex, in broad strokes - what about it is seeming too complex? (Maybe post the code, though this may be more suited to Code Review than here, without a specific problem) — CertainPerformance 57 secs ago
 
 
2 hours later…
7:51 AM
0
Q: C++ Standard-Thread Threadpool

AlphastrickI have written a small and simple ThreadPool-Class for rather simple multithreading applications. Here a short description of the code: The threadpool class manages a vector with the actual threads. The thread struct is used to store the thread's function. ThreadPoolElement keeps track of the th...

 
8:10 AM
Monking
 
8:31 AM
0
Q: Why is it bad to map between a Model and a ViewModel in an extension method

J86In a recent Pull Request (PR) of mine, a colleague suggested that it was a bad idea to map between a model and its view model via extension methods. I asked why and he said: It isn't how extension methods are supposed to be used, it is not in the spirit of extension methods. CODE I have a...

0
Q: (C++) Replace manual hotpatching with MS Detours

Nuris S.First of all, I'm a student and want to learn from this problem, so, I don't want a full solution code as the answer but the help. These links can help you :) https://github.com/microsoft/Detours https://github.com/microsoft/Detours/wiki https://www.codeproject.com/Articles/30140/API-Hooking-...

 
I'm voting to close this question as off-topic because post belongs on codereview.stackexchange.comsuspectus 46 secs ago
 
8:51 AM
0
Q: how to write streams in java

Cristian Iacob Q: Given a list of Persons, return the first two Students having the last name starting with “C” My classes: Person class public class Person { protected String firstName; protected String lastName; protected int age; } Student class public class Student extends Person { } ...

 
Please use CodeReview if you want your code to be reviewed. — Dino 31 secs ago
 
9:31 AM
0
Q: How to run all the robot files inside current directory

MousI have robot files inside a directory I need to run all the robot file inside it in sorted order. Below is my code. is it right code or Can we do multithreading for this import robot import os _files = [] for (dirname,dirs,files) in os.walk('.'): for filename in files: if filename.e...

1
Q: Finding which items have at least one common value with other items

tigrouI have the following collection : var items = new[] { new { Name = "A", Values = new [] { 20, 4, 5, 9, 3, 22 } }, new { Name = "B", Values = new [] { 10, 7, 9, 8, 42 } }, new { Name = "C", Values = new [] { 11, 103, 0 } }, new { Name = "D", Values = new [] { 7, 35, 42 } } }; I...

 
9:49 AM
codereview.stackexchange.com/questions/120537/… i hope this link will help you solve this issue — gowtham rajan 26 secs ago
 
0
Q: design student results database with django

namo I'm looking for advice to improve my database design in order to get better result. I'm trying to create an online system for a high school grade results with django something like that: the admin enter the marks for each subject in courses? teen = '10th' eleven = '11th' twelve = '12th' class...

0
Q: Deadlock with python generator (seeking simplest example)

root-11What is the simplest example that can show a deadlock with generators? Here's what I have in mind, but can it be made simpler? # python >=3.7 class Network(object): def __init__(self): self.reservations = {} def reserve(self, location): if location not in self.reservat...

 
10:04 AM
The question as posted is far too broad for this site. Have a go at implementing something or maybe try codereview.stackexchange.comuser667489 35 secs ago
 
10:16 AM
It tells me that the stack is corrupted. Code review, building with verbose warnings enabled (and treated as errors) and using static analysis tools are the ways to find out these kind of things. — Some programmer dude 13 secs ago
Code Review is probably what you are looking for. Though, I'd read their requirements before posting. (Why do you have the header at the start of your class?) — Script47 55 secs ago
I didn't even know Code Review thing exisits. thank you for your answer. — Janghan Park 38 secs ago
 
10:44 AM
Is there a problem with the code you show? Does it work? If it does work (very important point) then it seems like what you want is a code-review, and such should be posted on the Code Review SE site. Otherwise, please read about how to ask good questions as well as this question checklist, and edit your question to improve it. — Some programmer dude 48 secs ago
 
0
Q: Changing state of a light (Uncle Bob's light switch problem)

Szymon CzemborI watched Robert Martin's programming 101 video. I'll explain what problem he talks about in the video for those of you who haven't watched it. Robert Martin is in his house and shows a light switch. If this switch goes up, a light is on. If switch goes down, the light is off. He wrote a code to...

0
Q: binary search tree code

brijesh kalkaniPlease review my BST Code 1.Class node class Node: 2.Constructor def __init__(self, data): self.left = None self.right = None self.data = data 3.Insert node def insert(self, data): if self.data: if data < self.data: if not self.left: sel...

 
11:23 AM
Consider to do codereview. Show your current implementation and ask how to improve it to have more dry code. — Sinatr 54 secs ago
 
11:50 AM
If your code is working, you can try Code Review if you can reword your question to be on-topic for that site.L. F. 7 secs ago
 
I may need to stop screwing with Excel, since Excel won't stop screwing with me.
5
 
This question is off-topic here. Please try at Code Review, but read their rules first. — Dharman 12 secs ago
 
user image
3
 
I'm voting to close this question as off-topic because this community is not a code review service. — GhostCat 57 secs ago
And yes, when posting on codereview.stackexchange.com: forget about linking to github to a whole project. stackexchange questions should always be self contained. Really few people will be willing to turn to another site, and to then spend potentially hours reviewing your input. So: focus on some core aspects, and then put up real code in your question. When there is more than one topic you care about, rather ask multiple distinct, clear, crisp questions. — GhostCat 14 secs ago
Yes, in its current form it's absolutely not welcome on Code Review. Might want to link to their rules next time instead of simply acknowledging them. That's a good first step, now make the 2nd one too. — Mast 26 secs ago
Okay, sorry for that. I will aks precisely on codereview.stackexchange.com. — bibobuba 10 secs ago
If the code you have works, and you are only looking to improve it, I think that it would be more on-topic on codereview.stackexchange.com. — Algirdas Preidžius 7 secs ago
 
12:32 PM
0
Q: Longest Increasing Subsequence without using DP

KEEWhat is the wrong point in my code? class Solution { public: int lengthOfLIS(vector<int>& nums) { int len = nums.size(); if(len == 1) { return 1; } hash(vector) is the array contains the number of the nums. std::vector<int> hash; lis(vector) i...

 
12:52 PM
1
Q: Hibernate - entity design with multiple dependencies

Sven M.I am currently working on an API and came across the following design. // not mandatory @ManyToOne @JoinColumn(name = "person_id") private Person person; Actually, a telephone number should belong to a company, person or a contact form. However, this is logically not possible...

0
Q: Verify that all item of List are True in Scala

mkUltraLet say we have a List of Boolean in Scala: val xs: List[Boolean] = List(true, true, true) There are many ways to verify that all values are true, I am looking for a more readable one. xs.forall(identity) !xs.contains(false) xs.reduce(_ && _) ... What do you thinking?

 
@CaptainObvious Verify the help center first.
 
1:12 PM
This may be a better fit on Code Review. But asside this, why do you not want to make an own class or structure for this. It seams like this is something that should be included in your Object-Model. — Ackdari 52 secs ago
 
1:31 PM
I dont understand what are you asking. Can you be more precise? I already have branch policy and added automatic reviewers and they are Code Reviewers group. @ShaykiAbramczyk — Eldin Jakubovic 50 secs ago
 
1:45 PM
possible answer invalidation by grimi on question by grimi: codereview.stackexchange.com/posts/229557/revisions
It seems off topic here on SO. There is a Code Review Stack Exchange: codereview.stackexchange.comSebastian Kaczmarek 29 secs ago
 
0
Q: Regarding dice rolling game in python program

AnuI would like to play for 3 rounds, and each round user prompt by would u like to keep any dice. print(f'{players[0]}s dice value is:', dice) keep = input("would you like to keep dice: ") if keep == 'y': keep_dice = input("Which dice you want to keep:") keep_dice = kee...

0
Q: Credit card check with expire and CVV

sami saadHi i want regex that match credit card with NUMBER+EXPIRE+CVV in one regex line what I done \d{4}-?\d{4}-?\d{4}-?\d{4} credit card number MATCH (0[1-9]|1[0-2])\/?([0-9]{4}|[0-9]{2}) EXPIRE MATCH [0-9]{3}$ CVV MATCH I need credit card match only...

-3
Q: hellohellohello

hellowhy import random import time --- functions --- def ask_for_magnitute(): while True: value = input("Choose your attack magnitude between 1 and 50: ") if value > 50: print "The attack magnitude must be between 1 and 50." elif value < 1: print "The attack magn...

 
I'm voting to close this question as off-topic because it's asking for a code review, not how to solve a problem. ask on codereview.stackexchange.comrlemon 31 secs ago
 
2:05 PM
possible answer invalidation by brijesh kalkani on question by brijesh kalkani: codereview.stackexchange.com/posts/229631/revisions
 
2:23 PM
@Duga rolled back
 
2:37 PM
Code review questions aren't inherently off-topic because they're code-review questions; they're off-topic because they're too broad. However, OP seems to have a pretty specific ask in this case: "modify the animation function such that it takes the class of the div box as input"Tyler Roper 51 secs ago
 
3:07 PM
Monking
 
0
Q: Is there a simpler way to check user permissions against a method input?

Rilcon42I have a C# MVC Framework being passed objects by an Angular UI. On the C# side I am trying to check if the user is allowed to create the object by checking the passed in object properties. Is there a cleaner way to do this? Right now I have: [HttpGet] public ActionResult<AppUser> UpdateUser([Fr...

2
Q: MaxCounters solution in C# from Codility

newbieI programmed a little in java a while back, and now I'm learning C#.This is the first exercise of "medium" or "respectable" difficulty according to Codility, so I'm pretty pleased of finding out that the approach used by me was the same Sheng followed in codesays.Writing here and in SO as a mémoi...

 
3:33 PM
0
Q: Improving string parser and large switch statement

pfinfernoI have an app that takes in "commands" in the form of strings that are parsed, and then passed off to a function based on the first word in the string. Every command is comprised of two or three words separated by spaces, and can also have an '=' followed by more words/numbers separated by comma...

 
If this code works, please ask at Code Review. But you will need to provide a lot more detail as to what it is supposed to do. — Andy Turner 24 secs ago
 
3:50 PM
possible answer invalidation by tigrou on question by tigrou: codereview.stackexchange.com/posts/229620/revisions
 
@Duga rolled back by @dfhwze
hmm... has 4 VTC...
oh I see... edit was trying to make post on-topic
 
Monking
 
4:07 PM
@SᴀᴍOnᴇᴌᴀ yeah this question is in a mess now
 
I don't know how to best proceed with it.
 
4:31 PM
Chip because your question has to do with your implementation and is not general to a language or algorithm I think your question might better be suited for the codereview stack exchange. codereview.stackexchange.comErich 41 secs ago
 
-1
Q: Finding Eulerian Cycle

another 'Homo sapien'I have the following code for finding an Eulerian cycle (i.e. a path through the directed graph that traverses every edge exactly once). I know this is nowhere near the best algorithms to work with, but I still wanted to get this to work. def EulerianCycle(Graph): """ Create an Eulerian ...

 
@dfhwze did you roll it back because the change actually invalidated an answer, or just because answers existed?
 
possible answer invalidation by pfinferno on question by pfinferno: codereview.stackexchange.com/posts/229643/revisions
 
@Duga in discussion with OP and reviewer
@SᴀᴍOnᴇᴌᴀ I might have been too fast rolling back. I don't know the policy whether OP can edit to make question on-topic if answers are already made on previous revision where code had different behavior.
 
4:46 PM
Hey chip, its generally preferable to have a very minimal example for stack overflow, and to not necessarily look for holisitic "why doesn't it work". Your post would benefit from narrowing down the exact behavior in question. It would also be helpful if you explained the "hang" behavior. I will also mention that you might want to use codereview.stackexchange.com for general feedback. — Erich 45 secs ago
 
@dfhwze I feel like there are recent meta posts about it
18
Q: How should we deal with askers fixing off-topic questions when an answer has been posted?

PeilonrayzI done a quick search to see if this has been asked, but it didn't seem to be. The intent behind this question is from how this question was handled, but is not limited to it. The situation is an asker posts broken code. It gets an answer. (Question may get closed as 'off-topic broken code'). ...

Obviously it wasn't obvious to the users that supplied answers that the post was off-topic
 
ah voila, thanks for pointing out this meta post
 
5:10 PM
so if the answers weren't invalidated, I would say rollback the rollback
 
Welcome to Stack Overflow! 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 54 secs ago
 
5:33 PM
@Duga oh joy... that post is now a HNQ as of a minute ago
I think we should undo the rollback
rollback reversed
 
5:54 PM
0
Q: Turtle Doodle (my first web app)

luser droogTurtle Doodle presents several panels which arrange themselves responsively. There is a canvas where the Turtle will move, leaving a paint trail behind him. A control panel allows various commands to be sent to the Turtle such as Forward, Back, Left, Right. An "info" area shows a textual run-leng...

0
Q: Why is my N-Queens program hanging at filled=3, row=4, and col=7/8?

Chip SimmSo I'm working on an N-Queens problem in C++ that requires me to use stacks for back-tracking. So far, I have the code shown below, and it seems to be stuck in an infinite loop. The values keep getting stuck at: row: 4 col: 7 col: 8 filled: 3 Basically, all queen characters denoted by "1" in the ...

 
6:08 PM
So many questions in the VTC queue that don't have a comment...
 
the world is becoming a dumpster fire
 
6:25 PM
LOL, I have the weirdest image in my mind now.
About the guy who discovered fire saying "We have fire, now all we need is a dumpster!"
 
That said this question would be more appropriate on Code Review, if you actually included the whole code. — Mathieu Guindon 41 secs ago
 
0
Q: Tick. Tick. *breathe* BOOM! - Taming the SetTimer API (part 1)

GreedoWinAPI Timers can be quite tricky to work with, as anyone who's tried to use them and fallen foul of one of the many pitfalls probably knows. Problems such as screen freezing, crashes, uncontrolled printing to the debug window etc. will be familiar, and so I've tried to make some code to mitigate...

 
Is there something specific that's wrong? If this is functioning code and you are looking for advice on improvements, it might be better suited to Code ReviewC.Nivs 12 secs ago
 
6:52 PM
posted on September 25, 2019

Thank you to everyone who came to events on my book tour! If you weren't able to make it to any of my tour events, How To is now available everywhere, including at Barnes and Noble, Target, Amazon, local independents, and more. Some Barnes and Noble locations and indies have special signed copies, so you can check with your bookseller to see if those are available.

 
7:05 PM
possible answer invalidation by Progrmming is fun on question by Progrmming is fun: codereview.stackexchange.com/posts/229585/revisions
If all you did was port it, then the problem is in the original code. Fixing bugs is a separate task. You have to make sure that your Ubuntu fixes don't break the Windows version, for starters. What I think I'd recommend is printf/logging, as well as a code review to find design bugs. — markspace 5 secs ago
 
-1
Q: A program that is supposed to compute the maximized value of gcd + lcm of two numbers that range from 1 to n

programmer45As the title says, the input one number - n, the output is max value of two numbers that range from 1 to n, for example if n == 3, the answer is 7 because gcd(3,2) == 1 and lcm(3,2) == 6. #include <iostream> using namespace std; int main() { int n; cin >> n; int highest_value = 0...

 
7:35 PM
0
Q: Traversing an unknown data structure in Go

rubikIn my code I need a function to traverse an arbitrary JSON-like data structure with a path definition. E.g., given the structure {"root": {"inner": [{"name": "obj1"}, {"name": "obj2"}]}} and the path ("root", "inner", "0", "name"} I would obtain "obj1". I just started learning Go and to be hon...

 
8:10 PM
This question doesn't seem 100% on-topic here. Maybe consider checking out Code Review SE's rules & whatnot and see if there's any way to solicit feedback over there within their guidelines. Seems most likely to me that this will be closed here as opinion based. — CollinD 16 secs ago
 
8:41 PM
Regarding the on-topicness of the question and the rollbacks around it. As per meta policy answers to off-topic questions are not considered for the purposes of evaluating rollback criteria. As such fixing the code to make the question on topic is always acceptable. — Vogel612 ♦ 32 secs ago
cc @SᴀᴍOnᴇᴌᴀ @dfhwze
 
@Vogel612 thanks for cleaning up that post
 
8:55 PM
0
Q: is this a good practice? Communicate between obj instances with event-emitters

Tomas GonzalezI want to communicate between two node.js modules that handles async tasks. I am using like this and working correctly but I need to know if this is a correct practice. const BetaBOT = require('./beta') const AlphaBOT = require('./alpha') function App(options) { this.io = options.io; this....

 
9:15 PM
0
Q: Why map's merge remapping function uses lower bounded wildcard <? super V>?

isahI was looking at merge method of Map. Why does the remapping function use lower bounded wildcard for the existing and the new value? default V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction){...} I kind of understand the ? extends V - the resu...

 
9:36 PM
@CaptainObvious I left a comment and it soon became RBA'd... which should save reviewer's time. Remember to leave comments (including clarifying questions) when you see a post that appears to be off-topic
 
9:55 PM
1
Q: Portable BrainFuck Interpreter in ANSI C

JL2210I wrote this BrainFuck interpreter in ANSI C: #include <string.h> #include <stdlib.h> #include <stdio.h> #define DEF_MEM_SIZE 30000 void bf_interp(unsigned char *, unsigned char *, size_t, size_t); void exit_if_true(int, const char *); unsigned char *read_file(const char *, size_t *); int mai...

-1
Q: Very very very slow Chess Engine in Python

Garry KasparovI have made a chess engine, and it seems from cProfile that my most expensive function is the one that calculates attack squares for both players. Here is the cProfile results for a perft function I wrote that goes 4 ply deep: https://imgur.com/a/VMoF3G5 The reason why my calculate attack square...

 
10:16 PM
0
Q: Process strings of operations

thadeuszlayThis was the task (I don't know the exact wordings anymore): You get a string with operation as input: if it is a number push it to stack if it is "DUP", then duplicate the one one top and push it to the stack if it is "POP" then remove the one on top if it is "+" add the two ...

 
10:29 PM
I'm also not advising that you modify your solution to make it more optimized. In directing you to code review I am just pointing out that it is also valuable to be concerned about code quality, design principles. CR.SE is a great network of individuals that regularly give industry quality review. — Erich 22 secs ago
 
 
1 hour later…
11:30 PM
possible answer invalidation by Daniel Ryan on question by Daniel Ryan: codereview.stackexchange.com/posts/167197/revisions
 
@Duga sneaky... OP reversed change after 2 years... only answer is self-answer by OP
but now it might be off-topic again?
Jamal closed it and then re-opened it after OP removed part about error and said its an "intended error" ... that was just reversed...
its like that user waited until Jamal's usage has dropped... like as if nobody was watching...
 

« first day (2335 days earlier)      last day (1682 days later) »