« first day (2162 days earlier)      last day (2152 days later) » 

00:00
RELOAD! There are 5959 unanswered questions (89.8586% answered)
00:16
For working code, codereview.stackexchange.com seems more appropriate. — Jarod42 7 secs ago
 
2 hours later…
01:46
@JonPhillips: It could be! You could put your final code on Code Review if you want extra confirmation. (Also, a frozen data class might actually be better than a named tuple, but the difference isn’t that big so don’t worry about it.) — Ry- ♦ 9 secs ago
02:13
0
Q: Cache with limited size; If full remove the oldest

BoyHere is a class that stores a single value into the limited cache. If cache is full, it will remove the oldest element to make a space for a new value. I'm using 2 structures to accomplish this because I need a fast lookup. I'm not very confident this is the best approach. Cache will contain a sm...

 
2 hours later…
04:04
Questions are best kept to one question per question. 1 and 2 are suitable for asking here, maybe even in the same question, 3 through 6 are better fits for Code Review. Yes, I did deliberately link to the How To Ask help page. — user4581301 30 secs ago
Hey, user458. Thank you for your feedback. I will go over that page. I did consider separating the questions. But, it felt tedious posting my code on several separate posts. Moreover, I thought I had marked my question as "code review." Excuse me since I did not! Thanks again :) — Rafael Vergnaud 49 secs ago
I realize now that code review is an entirely separate forum (excuse me). — Rafael Vergnaud 28 secs ago
No worries. The loose rule of thumb is code that doesn't work goes here. Code that does work, but could work better, goes to Code Review. A note on 2) value_type && value is a forwarding reference (sometimes called a universal reference). Most often you will find these where transfers of ownership are taking place with std::move. — user4581301 13 secs ago
04:32
0
Q: Implementing a queue: questions and clarification

Rafael VergnaudIm trying to teach myself some computer science (and c++). I am relatively new to this (and to code review). I have attempted to implement a queue. I have copied the code below for reference. QUESTIONS: I used the template described on cppreference.com to guide me in the implementation of s...

04:55
Consider posting requests for code review on codereview.stackexchange.com instead. — jayarjo 1 min ago
05:11
0
Q: SFML Circle of Stars

Walt MelonIm trying to make a SFML code that takes my code i already have to make a star with a convex shape and put it into a circle of stars surrounding the point the user chooses. The User is also able to choose the amount of stars in the circle. Here is my code for making a star #include <iostream> #...

In your studies you might want to take advantage of SO's Stack Exchange sister-site, [Code Review](codereview). There you can get helpful advice on how to improve your (working) code. — Cary Swoveland 26 secs ago
05:50
0
Q: Covariance and Contravariance related understanding the point and architecture

HenryFirst of all apologize for long post nevertheless i wanted to highlight problem exactly and to be most readable and understandably. I am developing architecture of my program which will be responsible for files/databases data gather and face some architecture issues so far. All information step b...

0
Q: looking for a way to validate urls in node.js

guaccoderim doing a node.js proyect where it has to look for urls in a markdown and validate them showing you the ones that are broken or not valid. and this is what i have so far but its not doing anything... this is what i have so far. const markdownSearchLinks = require('./linksrs'); const valida...

possible answer invalidation by DeBos99 on question by DeBos99: codereview.stackexchange.com/posts/216381/revisions
06:09
Monking
0
Q: Alternative boost::function implementation

swaggg_pickleI am attempting to write the boost::function using template meta-programming for c++03. I have not finished writing the class completely (still need to finish the rule of three at least), but I was hoping I can get some feedback about what I would need to do in order to have similar syntax to the...

06:24
"I build some code but I'm not sure if this will work." You could just run it to see if it works. As for code review, codereview.stackexchange.com might be better suited. — kerbholz 14 secs ago
read this first, it will give you an idea how to start suh things in java: codereview.stackexchange.com/questions/95084/…smoczyna 34 secs ago
07:08
0
Q: Concise way of "updating" element in nested collections

Dmitry PavlushinImagine simple game: type Combatant = { hp : int attack : int } type CombatantGroup = Combatant list type CombatantGroups = CombatantGroup list type Battle = { combatantGroups : CombatantGroups } there is some battle, in which some amount groups participate. In each group there ...

 
2 hours later…
08:49
Bom chika bom chika Moking
Maybe this would better suit codereview.stackexchange.com? — sp00m just now
09:05
0
Q: C++ Producer / Consumer multi threads pattern with maximum container size

Romain LaneuvilleI've just written a Producer / Consumer pattern templatized that should work in multi threads environment (IE producer(s) and consumer(s) in separate threads). The original use case is one producer and one consumer in separate thread with a limit of container size. It should work for a multi pr...

09:25
0
Q: Kadane's algorithms to leetcode "121 Best Time to Buy and Sell Stock"

AliceI employed the conventional Kadane's algorithms to solve a maximus subarray problem in leetcode Best Time to Buy and Sell Stock - LeetCode Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on day i. If you were only ...

09:44
0
Q: How do you deal with time variables?

matt14I have something quite verbose like: d = Math.floor(t / (1000 * 60 * 60 * 24)), h = Math.floor((t % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)), m = Math.floor((t % (1000 * 60 * 60)) / (1000 * 60)), s = Math.floor((t % (1000 * 60)) / 1000); Is it the way to go? Or should I go with: d = Math.fl...

Also as a future reference, questions like these are better suited for stackexchange.com/codereview — Rawrplus just now
10:00
possible answer invalidation by RoToRa on question by Marcin: codereview.stackexchange.com/posts/216834/revisions
10:23
0
Q: User upload & Drag image and update text

vickey colorsI am allowing user to upload images & drag uploaded image once user click on mask images, also gave an option to Edit the text.... I am fetching mask images and text from json file.... I am uploading each mask images in single canvas & using absolute positing.... But now its getting very diff...

10:43
0
Q: Pure methods for updating java objects

MarkI've been reading about pure methods and immutability in Java. I have a current aplication and want to convert all the methods to pure methods. My app takes payment from users. I first create a payment in the DB: Payment payment = new Payment(); payment = createPayment(orderId, status, addres...

11:02
0
Q: Lifting up the state to the main component in React application using hooks

renakreI am learning reactjs and trying to implement small things for practice. The idea is simple, to add records (feedbackTasks) to the database and list these records (when first time page is loaded and later when a new record is added). Please see the image below. The main component is ManageFeed...

0
Q: A smarter way to build custom wordpress permastructures and keep them updated in admin?

Luca ReghellinI've done this many times.. Breafly speaking, I've got a custom post type with custom taxonomy (say products_categories), and want model single urls like this structure: /products/%product_categories%/%product% example '/products/laptops/ibook-black' Currently, I do this: on the product's re...

 
1 hour later…
12:20
0
Q: Transforming golden and input files in test table

Aladdin Da SilvaI'm trying to find a way to create a test table from golden and input files. I have the following dir structure: pkg | | mypackage/ | testdata/ | file1.input | file1.golden | file2.input | file2.golden | mypackage_test.go | ... I'm trying to find an efficient way to crea...

0
Q: Minesweeper in C++ with segmentation fault and stopping at terminal issues

Byron UrsuaI started studying C++ a couple of months ago and now I'm trying to make a 5x5 minesweeper game but sometimes when I execute the program it stops running after the terminal pops-up (I use Dev C as a compiler) and more often I encounter a segmentation fault which I have no idea about. I tried fixi...

0
Q: Summing up students by the topics they studied and the marks they got

ThePassengerI have to write the scripts that sums up the students and their grades. It uses four csv files. students marks tests courses . # main import pandas from statistics import mean if __name__ == "__main__": students_df = pandas.read_csv("students.csv") marks_df = pandas.read_csv("marks....

12:38
Well, design problems are usually posted in code review SE, so maybe you could give it a go there ;} — RafaelC 49 secs ago
12:59
-1
Q: while loop is not working with vector size?

Mayank tiwari#include<iostream> #include<vector> #include<algorithm> #include<bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin>>n; vector<int>v; for(int i=0;i<n;i++) { int temp; cin>>temp; v.push_back(temp); } int j; while(v.size()>0) { sort(v.begi...

13:17
@RafaelC: Pure design questions are off-topic on Code Review. Giving suggestions on how to improve some working piece of code is on-topic (including what a better design for it would be). Have a look at their off-topic help center, where "Higher-level architecture and design of software systems" is explicitly listed. Those questions might be on-topic on Software Engineering, though. — Graipher 19 secs ago
@Duga It's fine, only overall indentation was fixed, before the code formatting was wrong...
@JL2210 As I told you on GitHub this issue is ended for me, I will not spent much more time on it and I will never use curl_multi, instead I'm going to use curl on threads, and I already started some C work to do it. The last thing that I'm going to give to this issue is another bounty when this one is over, no more minute no more thinking on this issue for me again. — Accountant م 32 secs ago
@CaptainObvious Broken Code
Greetings, Programs.
14:05
possible answer invalidation by Smolar on question by Smolar: codereview.stackexchange.com/posts/216869/revisions
14:17
0
Q: Leetcode online Find the judge, graph with highest degree

Mosbius8Here is the problem. In a town, there are N people labelled from 1 to N. There is a rumor that one of these people is secretly the town judge. If the town judge exists, then: The town judge trusts nobody. Everybody (except for the town judge) trusts the town judge. There is exactly one person...

possible answer invalidation by Smolar on question by Smolar: codereview.stackexchange.com/posts/216869/revisions
14:36
0
Q: SQL inner join - include rows from table 1 with no match in table 2

potatoI have the following tables in my database: people: phones: +----+------+ +-----------+------------+-------------+ | id | name | | person_id | number | description | +----+------+ +-----------+------------+-------------+ | 1 | Jade | | 1 | 1234567890 | home ...

15:15
0
Q: Get a JSON parameter from the response of an asynchronous HTTP request

David GardI'm attempting to get a single JSON parameter from some content that is returned by an HTTP request - var httpClient = new HttpClient(); ... response = await httpClient.PutAsync(url, body); Assuming by HTTP request is valid (I'm checking for a 200 StatusCode, which is all a valid request shoul...

0
A: Knowledge-based authentication using Domain-driven Design belongs to Software Engineering

Simon Forsberg I find the question Knowledge-based authentication using Domain-driven Design in C# should be moved to Software Engineering First of all, two things. Just because a question seem to be a better fit on other sites does not make it off-topic here. We have told Stack Overflow about this many ...

@Mast @t3chb0t @Peilonrayz @DerKommissar @those-who-are-interested ^^
Screw it, close it.
Kinda DGAF anymore. A certain user has historically been very anti-me, I'm done.
@DerKommissar They don't want it. I'm not moving it anywhere.
@DerKommissar Would that user be @t3chb0t ?
15:17
I'm not speaking on it any further.
I don't consider it off-topic at all. I'm not closing it.
@SimonForsberg Silly enough I started out on that thread with the explicit mention I'm not interested in that question since it's content it's way out of my expertise. Got roped in anyway trying to be helpful.
Thanks for the heads up.
I can understand all mentioned sides of the story here, the real question is how we're going to handle questions like this in the future.
@Mast Maybe I should have written "@those-who-might-be-interested"
That means figuring out what 'questions like this' mean and whether there's even consensus.
@SimonForsberg I'm interested in your answer, not the original question, so it's close enough.
@SimonForsberg Nice, the perfectly answers the aspect of the question that I didn't look into :)
15:22
@Peilonrayz For the record, I agree with your answer.
As for some of these Q and A thingies, I see them more or less as the OP rubberducking with himself, to answer some of his own questions that he thought of in the process of writing this code. — Simon Forsberg ♦ 8 secs ago
^^ also possibly relevant
I also removed all the questions after 3, and moved those to Code Review per your suggestion. — Rafael Vergnaud 17 secs ago
@DerKommissar I haven't said a single word about your answer and I even gave it a +1, it's about the question but if you think I'm against you then I can't help it. I voted for many other questions to be off-topic regardless who has answered them and sometimes even after I answered some of them myself... don't make it about you.
@t3chb0t I really don't care to get into it right now -- I haven't the patience nor the clearheadedness to do so, unfortunately.
^^ trying to lighten the mood here, with the risk of being hated :)
@DerKommissar well, apparently you cared enough a few minutes ago so I think it deserves an answer which I gave you - case closed.
16:02
Monking
16:13
Cross dupe and stil low quality quesiton. — πάντα ῥεῖ just now
If it works and you want your code reviewed then Code Review is the place to post this. — Dave 9 secs ago
16:33
Stack Overflow is no page to request code reviews. — Tom 43 secs ago
0
Q: Java Swing Exercise: BMI Calculator

mdotThis is my first question here and this is my working Body Mass Index Swing Calculator. Any improvement or recommendation is welcome. // Metric units // Weight in kg // Height in meters import javax.swing.*; import java.awt.*; public class MainProgram { public static void calculateIMC(D...

0
Q: Best way to performance permutations

Juan Carlos Oropeza This has been my white whale for a while, the idea is convert all the symbols to the goal symbol using all the pieces. I did an algorithm like 5 years ago (now is lost) and reach lvl 48 but got stuck here and drop. After I watch The Imitation Game and see how Turin solve enigma using a Heil Hi...

17:43
0
Q: Is a good morse converter?

Dalu_21I created a morse converter from a .txt file. I'm learning java and I created a simple morse converter. Convert only A to Z and 0 to 9 chars. Space char remain for split words in morse-code. At the beginning I used a big switch for any letters or number but it was no good. Thanks for all critiq...

0
Q: Find the smallest distance between any two given words in a string

thadeuszlayThe task: Find an efficient algorithm to find the smallest distance (measured in number of words) between any two given words in a string. For example, given words "hello", and "world" and a text content of "dog cat hello cat dog dog hello cat world", return 1 because there's only ...

18:33
This is not a code review site. You should go to a different Stack Exchange Network web site. — El Tomato 30 secs ago
18:55
possible answer invalidation by DeBos99 on question by DeBos99: codereview.stackexchange.com/posts/216381/revisions
19:09
0
Q: How do you print the placement of a certain character in a string?

MustafaI want to make an alarm clock that alarms the user when his/her chosen alarm time has passed. Here's my script so far: import datetime currentDT = datetime.datetime.now() print("The time is ",currentDT.hour,":",currentDT.minute,", on ", (currentDT.strftime("%a, %d %b, %Y")),".",sep="") timer =...

19:28
-1
Q: Nesting 3 divs within another div repeating

BenI'm new to this site, and very new to Javascript, but I thought I would give it a shot! I'm trying to create elements that are nested within another element and repeated multiple times. For example, I have currently: <div class="columns"> <div class="column"> <div class="box"></div> <div...

19:58
You may be better asking this sort of question on Code Review — RiggsFolly 27 secs ago
-1
Q: Exploring code objects

MiniMaxI am reading the book: "Obi Ike-Nwosu. Inside The Python Virtual Machine" and have reached the "Code Objects" chapter. This chapter has all code object fields printed out: co_argcount = 1 co_cellvars = () co_code = b'|\x00d\x01\x16\x00d\x02k\x02r\x1e|\x00d\x03\x16\x00d\x02k\x02r\x1ed\\ x04S\x00n...

0
Q: My code is an advanced love calculator that generates a result based on the similarities between the two names. Is this correct?

MustafaMy love calculator gives a result from 0 to 100% based on these factors: If the first letters of the names are the same. If the number of vowels is the same. If the length of the name is the same. If the number of consonants is the same. Also, there is an extra boost of 10-50%, so the result ...

20:22
You may want to consider code review. Not that code review questions aren't on-topic here, you just may have better luck there! — Tyler Roper 27 secs ago
-1
Q: Translation between a Matlab code into Python language

Edison CesarI have the following code, written in Matlab language: [Aph, index] = max(Ah); indexleft = dsearchn(Ah(1:index),pct*Aph); indexright = index + dsearchn(Ah(index+1:end),pct*Aph); [pcoeff,~,mu] = polyfit(t(indexleft:indexright),Ah(indexleft:indexright),2); tph = mu(1)-mu(2)*pcoeff(2)/2/pcoeff(1); ...

21:06
0
Q: C++ static initialization ordering

kevin clineI have inherited legacy code containing static initialization order problems: // A.hpp class A{ public: static A A1; A(...); }; // A.cpp A A::A1(...); // B.cpp #include "A.hpp" A MY_FAVORITE_A = A::A1; This fails when MY_FAVORITE_A is initialized before A::A1. I'm trying to ensure that ...

Since this code is working, I would suggest placing it on SO's Sister Site CodeReview — Zack E 36 secs ago
21:38
@CaptainObvious I think this one is off topic, not sure.
22:04
0
Q: tracking segments of a picture

Ewan Simpsonso i gotta create this sliding block game for an assignment and part of the assignment is i have to track where the blocks are in the game and the plan was to create a list of all RGB values of each block and give them separate names such as list 0, list 1 etc. im wondering is this a good way to ...

 
1 hour later…
23:19
@Mast @SimonForsberg I'm compiling the guide to wonderland, and have gone through , are there any other 'rule' tags?

« first day (2162 days earlier)      last day (2152 days later) »