« first day (2150 days earlier)   

12:00 AM
RELOAD! There are 5909 unanswered questions (89.9141% answered)
Q: Note-drawing program

User319This program draws a random music note on a staff, refreshing the note every second. It compiles with g++ and also emscripten, so it is runnable in both the browser and on desktop. This is my first attempt at graphics programming, so I'm not interested in feedback on how I'm using OpenGL. In par...

1:00 AM
Q: [Beginner]/[Readability]: How much does my code suck?

Jacob FranklinCompleted a short coding challenge located here: https://www.hackerrank.com/challenges/js10-loops/problem?h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen Just want to have it checked to see what I could have done to make it better and more readable. /* * * Complete the vowelsAndConsona...

1:38 AM
Q: Refactor if statements that check for different conditions

Asel SPreface: I've perused the other related questions before creating this one but I believe that those solutions weren't applicable to my situation. I'll concede that its possible that I may not have understood a possible solution (if any). I'm working on refactoring an old poker game that I creat...

1 hour later…
3:05 AM
possible answer invalidation by Jamal on question by HelloWorld: codereview.stackexchange.com/posts/216054/revisions
3:51 AM
Q: Generate alternate saturday dates list within range in R

newguylibrary(tidyr) d = seq(as.Date("2018-01-01"),Sys.Date()+365,by='day') saturdayList = d[weekdays(d)=='Saturday'] altSaturdayList = data.frame(lapply(split(saturdayList, format(saturdayList, "%Y-%m")), function(x) na.omit(x[c(2,4)]))) altSaturdayList = subset(gather(altSaturdayList),select = c(...

4:31 AM
Q: Function-based Tic Tac Toe game in C

grabbailoutrunThis is a tic tac toe game that I made in C. It works the way that I want it to but I feel like I could have done it better or shorter. Any input as to how I did would be appreciated. Include Statements and Prototypes #include <stdio.h> #include <stdlib.h> #include <string.h> //Creating the pr...

5:12 AM
Looking at that one.
5:27 AM
Q: Semaphore implementation exception

AKS I am not sure why below code is throwing exception. If I implement the same code with synchronized at method level then there is no exception, and it works fine. I think using object lock should also not have any issue.enter code here package practice; public class CustomSemaphore { ...

2 hours later…
7:21 AM
Q: Simple raw buffer queue implementation

AliI am trying to implement a simple raw queue in C++. This is what I have come up with #include <queue> #include <cstdint> #include <array> #include <cstring> class simple_queue { private: static constexpr uint32_t max_msg_size = 4096; using char_msg = std::array<char, max_msg_size>; ...

2 hours later…
9:34 AM
Q: Ref readonly struct property or regular readonly struct property?

Ehouarn PerretI am implementing the Unit type (like in F# and other functional languages) in C#, I drafted the code below: public readonly struct Unit : IEquatable<Unit> { public static readonly Unit Default = new Unit(); public override int GetHashCode() => 0; public override bool Equa...

9:53 AM
Q: Block YouTube iframes until user consents with cookies (GDPR)

TheDancingCodeI'm trying to embed YouTube video's on a website in compliance with the GDPR and ePrivacy regulations. The code doesn't load the iframes by default but shows a preview thumbnail overlayed with an info message instead. The user can load a single video by clicking the button in the info message. T...

10:31 AM
Q: Blackjack game with database

Maria LauraThis is the latest version of my Blackjack game and I did a quite big update to it. Now you can make an account that is saved in the MySQL database and you can bet money that are also saved in the database. from random import shuffle import os import cymysql from getpass import getpass import sy...

2 hours later…
12:25 PM
possible answer invalidation by Maria Laura on question by Maria Laura: codereview.stackexchange.com/posts/216105/revisions
12:55 PM
Welcome. You've given a view of the final report, but you don't explain the layout of data in "Applicant's_Status". You rightly point out that "Experience" and "Education" could run to several lines, and it is important to understand how this information is delineated in the raw data. Your code only populates rows 1,3,4,5,6, and 7. Does this codework, what about the rest of the rows - have you written the code for them yet? Please update your question to provide the additional information. To assist with code review, I suggest you also share samples of the two spreadsheets . — Tedinoz 22 secs ago
I suggest you take this to Code Review, but only after you've had a look at their help center and have edited your question to be on-topic there. — Aran-Fey 27 secs ago
@CaptainObvious is there a code-ownership issue with this question, or is it OK in that regard as a comparative review? (link)
For reviews of working code, check out codereview.stackexchange.com - be sure to read the help center and format your question accordingly — Blorgbeard 17 secs ago
@bruglesco (thanks for the clarification)
@VisualMelon I'm not certain my assessment is accurate. although I believe it is. It was your observation though.
2's a riot; so I'm happy to VTC on those grounds
1:12 PM
1:23 PM
Q: Which is better conditional rendering or styling in reactjs?

Zeyad EtmanI want to toggle showing content using reactjs, and I have two options, applying the condition on rendering or on display? I'm asking which is better from performance. Here's a running code from codesandbox import React, { useState } from "react"; import ReactDOM from "react-dom"; import "...

1:52 PM
Try CodeReview for code reviews. — Jesper Juhl 37 secs ago
Q: A N^2 solution to 3Sum

AliceI tried to solve a 3Sum problem in leetcode Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The solution set must not contain duplicate triplets. Example: Gi...

2 hours later…
3:36 PM
Q: Finding maximum homework grade ECOO 2018

Michael exeI'm trying to solve ECOO 2018 round 2(regionals) question 2 to prepare for the upcoming contest. Basically, in the question George has to achieve the maximum possible grade by completing the right assignments. Each assignment has a deadline and a weight value. I've came up with two solutions yet ...

3:55 PM
Q: Python: My program is unable to perform addition correctly

Aaryan DewanI was trying to solve a problem which stated: Calculate the first 10 digit prime found in consecutive digits of e. I was able to solve the problem but I did it by using some 10k digits of e available online. So I tried to write a program which calculates digits of e. The problem is that it...


« first day (2150 days earlier)