« first day (2575 days earlier)      last day (1460 days later) » 

12:00 AM
RELOAD! There are 6654 unanswered questions (89.9771% answered)
 
12:21 AM
0
Q: Tic Tac Toe game logic

DylanSpI've implemented tic-tac-toe in TypeScript before; now I'm porting it to Elixir. As before, this is pure game logic, no UI involved. I'm very new to Elixir, so any suggestions are appreciated. defmodule MassivelyMultiplayerTtt.Game do defstruct current_player: :player_x, winning_pl...

 
1:09 AM
0
Q: Progress bar in C++ to count seconds with CLI animation

BunnyGuyAfter 2 year with python and bash script and some months with NASM Assembly i decided to learn the Scary C++ Programing Language i am a slow learner and after 2 Months learning C++ i saw the need to have a Nice and Tidy progress bar for my programs. Here what i wrote: #include <iostream> #include

0
Q: User-defined function for estimating coefficient of performance

LShaverI am using hourly weather data to estimate performance of commercial refrigeration systems under various parameters. The formula for estimating co-efficient of performance (COP) of these systems is repeated for each hour. I defined a formula to do this calculation: Public Function estimatedCOP...

0
Q: Better way to extract html table to dictionary using beautifulsoup in python

sangharshI am scrapping html pages. Part of the page has a table which has acts and sections of those acts mentioned in table format. For some other project I need to convert them to Dictionary. The key values are previously set (in the other project). I want to use the same key values for the dictionary ...

 
 
3 hours later…
 
2 hours later…
5:58 AM
0
Q: Todo app in React.js

kibeI've built a simple todo app using React and it's really basic. However, before I continue to implement new functionality, I would like to check if everything is alright. dashboard.js (the app.js): import React, {useState, useEffect} from "react"; import ReactDOM from "react-dom"; import TodosC...

 
 
1 hour later…
7:11 AM
0
Q: Implementation of system() function in Linux using fork() , exec() and waipid() system calls

Vijay AntonyI have written the code for implementation of system() function in Linux using fork(), exec() and waitpid(). Could someone review the code and provide feedback. Thanks a lot. #include<stdio.h> #include<string.h> #include<unistd.h> #include<sys/types.h> #include<sys/wait.h> #include<error.h> #i...

0
Q: How to write a bet settling function in Python

Konstantin KostanzhogloI'm trying to write a function that takes a sports bet and returns its Net result. While I managed to accomplish it for bets on total, I couldn't finish settling bets on handicap since it led to some enormous wall of nested if/else statements. If you are not familiar with betting, an exhaustive...

 
7:51 AM
posted on May 22, 2020 by CommitStrip

 
0
Q: Leetcode three sum in Javascript

iRohitBhatiaI was doing 3sum question on leetcode Question 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: Given array n...

0
Q: Testing an action returns a View with a ViewModel using xUnit and Moq

mattfullerdevThis is my first test, I think it's testing what I need it to test but wanted to get some feedback. I wanted to test to make sure the controller action returns a view with a certain ViewModel. The code that it will be testing: Controller: public class UserController : Controller { private...

 
8:22 AM
0
Q: Signature scanner (aka. pattern matcher), is there are more beautiful way to write this?

HummasI'm still new to C++ and I am very open to any kind of suggestion on how write proper and understandable C++ code. I decided to create a class for the code to have everything closely tided together. Don't know if that was a good idea. About signature scanners (aka. pattern matchers), see see wik...

 
I should probably lave you with this link as well: codereview.stackexchange.com It's for refactoring / optimizing code. People who love to help make code better and the community is more revolved around your project I suspect. — Torxed 15 secs ago
 
9:02 AM
I’m voting to close this question because it is a better fit for codereview.stackexchange.com . — Karl Knechtel 20 secs ago
I have posted it there codereview.stackexchange.com/questions/242728/… However there are a very few views so that it is unlikely to be answered. — Konstantin Kostanzhoglo 23 secs ago
 
0
Q: Is there a better way to retrieve variables from class method

primitiveProgrammerCurrently my code works but I wanted to know if I'm going about this the right way. I want to be able to individually call variables from method 'data_by_name' in 'otherfile.py' . At the moment I import 'otherfile.py' and put the elements into a list within 'main.py' and use tuple unpacking to gi...

 
9:34 AM
0
Q: sleepless timer that does not lose time and handles spurious wakes

code_fodderI have written a timer class. Here it is in all its "glory" with some functions around it to test it: https://rextester.com/LQSXUA43758 Below is the class on its own, note it also relies on another class called stop_watch (which can be seen in the link), but stop watch is quite simple and just ...

 
possible answer invalidation by J_Scholz on question by J_Scholz: codereview.stackexchange.com/posts/242689/revisions
 
9:58 AM
0
Q: How to work in linear time with DFS

user224769I tried a hackerrank problem link and that gives me successful message. There I used a dfs method to check for the connected components and get the ans using sum of products of each disjoint elements (\$ab + ac + ad + bc + bd + cd = ab + (a+b)c + (a+b+c)d\$). However, it fails for graph with more...

 
 
1 hour later…
11:09 AM
0
Q: changing values in a vector

Dmitry N. MedvedevI am looking to have a code review on this tiny repo: https://github.com/Dmitry-N-Medvedev/algorithms/tree/quick-find The code seems to work, but I am not sure if I have written it in idiomatic rust. #[derive(Debug)] pub struct QuickFind { items: Vec<u64>, } impl QuickFind { pub fn new...

 
11:49 AM
Your question is somewhat unclear, it's hard to tell what you actually need us to help you with. Furthermore, asking if some code could be rewritten for "better performance" is off-topic here, you may have better luck at codereviewGrumpyCrouton 40 secs ago
possible answer invalidation by mattfullerdev on question by mattfullerdev: codereview.stackexchange.com/posts/242731/revisions
 
12:09 PM
I didn't know about "codereview" thank you for the tip! — andreasv 19 secs ago
 
12:50 PM
Ben Popper on May 22, 2020
We discuss what’s exciting about Deno, why Stack won a Webby, and how to borrow and steal code the “right way.”
 
1:29 PM
@Duga Rolled back.
 
possible answer invalidation by Ali on question by Ali: codereview.stackexchange.com/posts/242709/revisions
 
1:57 PM
0
Q: TicTacToe board, wanted to know if there are anyway i could run the tictactoe board looked more aesthetically pleasing

ShreddedPumpkinare there any other bugs for this tictactoe game and could i improve the way the board look? from AskUser import ask_user as As from random import randint Choice = 0 Player1 = None Player2 = None #Introduction def intro(): global Choice while True: Choice = As("Press 1 for Multi...

0
Q: SQL Negation: Find X when X does not do Y

RAbrahamI'm learning The essence of SQL by Rozenshtein indirectly from the SQL Cookbook which has a section on it with modern SQL operators introduced after the book was released. The exercise: Given: create table student ( sno integer, sname varchar(10), age integer ); -- /* table of courses */ c...

 
Asking for a code review to improve existing, working code can be posted to the Code Review stack exchange. — ryyker 6 secs ago
 
Ryan Donovan on May 22, 2020
May 2020 Welcome to ISSUE #22 of the Overflow! This newsletter is by developers, for developers, written and curated by the Stack Overflow team and Cassidy Williams at Netlify. We’re pondering the benefits of sharing your work, pushing the limits of children’s names, and praising accessibility in the time of Covid-19. From the blog Ensuring…
 
I removed the comment about code review after I re-read and saw "but when they are empty, they invent them". — ryyker 16 secs ago
 
2:21 PM
0
Q: Exclude rather than include elements in a function

kvkootenMy code contains the following function: function deactivateSwitch(theSwitch) { $(theSwitch).removeClass('activated'); } I have 16 of these switches. Whenever one of them is "activated", all others need to be deactivated. So my code also contains this extensive piece of non-DRY code (edited ...

0
Q: Syncing Redux state with the URI in 2020

AdyBabyI have a React/Redux/Router/Reselect app in which I am syncing some parts of the redux state with the URL. As an interim, hacky measure (I've only been learning how to write wepapps for about 6 months so I'm very much a n00b right now) I’m currently implementing that sync as follows: A selector...

 
it would be good if you can share your solution. Even better, if you use this hub: codereview.stackexchange.comAlexander Pushkarev 1 min ago
 
2:40 PM
Greetings, Programs.
 
Greetings, Donald
 
For everyone: Francis passed away last night / this morning.
14
 
0
Q: Binary Search Tree (BST) Implementation

MahdeenSkyFirst Time implementing a Binary Search Tree, based on how it works from visualgo website. I made this algorithm purely based on what i saw, and the remove method was quite challenging. How can i improve the speed/efficiency and make the code look better? Methods: Inorder: basically an inorder ...

-1
Q: Read an object variable having “FileInfo” object content in C# script task

Gowtham RamamoorthyI'm trying to loop and read an object variable(as shown in the pic) where it has the file details(name/size/datemodified) from a share point location. Basically I need something similar to below code to just read the "Name" value. using System; using System.Data; using Microsoft.SqlServer.Dts...

 
3:09 PM
0
Q: VBA Excel bulk data loop for few columns at once

Mariusz KrukarGood afternoon, I have a set of working code, which works as a loop between values i = 0-90 step 0.25. It gives 360 combinations exactly. I used to do this loop separately column by column. It takes time and I must repeat the process exactly 9 times. So, red bounded is the column first, whic...

 
Monking
Not so good monking anymore now...
 
3:33 PM
-2
Q: How to group an array of objects by key

Vinoth KumarWhat is the most efficient way to groupby objects in an array? var allGlobalRoles = []; Enumerable.From(BASF.HRAutomation.HiringApproval.objJobCatalogs) .Where(function (thisObj) { return thisObj.JobFamily == $("#selectJobFamily").val() && thisObj.Role == val...

 
3:46 PM
@skiwi What's wrong?
 
@pacmaninbw Scroll up a few lines :(
 
@pacmaninbw @Phrancis passed away and he was a fervent user of Monking
 
OK got it, I just looked at the twitter post.
That's an aw s##t if I ever saw one. Going to miss the thinker.
 
4:36 PM
<strike>Happy Friday!</strike> greetings
 
@SimonForsberg I asked her to let me know if they're doing anything where he lived for him, he didn't have any family there really so I don't think they are, but if she is doing anything for him I will probably drive there.
 
@DerKommissar Sad.
 
Also @SimonForsberg, from what the DM said Francis talked about you and I a lot...for whatever that is worth. "Elliott" and "Simon from Sweden"...
 
@DerKommissar That's nice to hear :)
 
I'm gonna go out in my garage and work for a while...everyone stay safe.
 
4:49 PM
Ryan Donovan on May 22, 2020
Node.js creator, Ryan Dahl, left the Node.js project in 2012 and started working with it again around six years later. In using it again, he found a number of design flaws that bothered him. So he decided to create a new implementation of his original idea: Deno, which released V1.0.0 last week.
 
@DerKommissar Yes, apparently so.
 
@DerKommissar Don't break anything (thumbs, fingers, etc.)
 
5:09 PM
@pacmaninbw I have to build 2 sawhorses, wait for my air compressor to drain so I can re-plumb it, and build a bench for a table-top to sit on.
 
What / where is your problem? Maybe the question is better suited for the sister site "Operations Research" or "Code review". — albert 36 secs ago
 
5:20 PM
2
Q: Progress bar in C++ to count seconds with CLI animation

BunnyGuyAfter 2 year with python and bash script and some months with NASM Assembly i decided to learn the Scary C++ Programing Language i am a slow learner and after 2 Months learning C++ i saw the need to have a Nice and Tidy progress bar for my programs. Here what i wrote: #include <iostream> #include

how can i improve my question, so people can anwser it
at the moment no one anwsered, maybe they can't understand my code ?, or i'm just doing a dum question.
 
@BunnyGuy Reviews take time, wait a bit longer
 
0
Q: Function to extract Top 10 in State

Jeff PonceWas told to post this over here.. In the code below Ive been extracting the top ten non-profits based on Income from each state, putting them into a variable and then merging everything into a new list. In order for me to do it with my limited skills is to just go in a manually exchange the, for...

 
5:39 PM
@BunnyGuy while it is a bit brief there is one help center page on that topic
 
6:01 PM
@SᴀᴍOnᴇᴌᴀ Wow, that is short, maybe cause we have an faq for it
 
@Peilonrayz perhaps... I started looking at meta but got distracted looking at an old question about bounties & rep
Then I saw this comment
Is there any place where we can see why this was decided so? i.e Any place the discussion relating to this decision is archived? — rahul May 29 '12 at 17:57
Then I started to look at Meta SE for an answer
then I decided I should focus on work for a while ...
 
lol, sounds like quite the little adventure
 
just an average day :)
FWIW I did reply to rahul
@rahul Bearing in mind that it has been 8 years since you asked that follow-up question and this may not explicitly answer it, the closest thing appears to be this FAQ answer about bounties on the SE Meta siteSᴀᴍ Onᴇᴌᴀ 21 mins ago
initially I noticed his profile showed "Last seen Jan 1 '18 at 10:19" but I just checked other sites and on CR and SE has "seen" in recent weeks
How many kids with ADD does it take to change a lightbulb? Wanna go ride bikes?
 
thank you guys, i will try to add more details to my question
 
6:44 PM
0
Q: Would my implementation of this enum pass?

User3I have a feature with feature flagging enabled, basis the condition I want to load different pages in my screen, to achieve this I have the following enum: enum class ImageHolderEnum( val titleId: Int, val qFragment: BaseFragment, val fragment: BaseFragment ) : IPageHolder { PAG...

 
7:08 PM
0
Q: Simplify data packet assemble in C

lucky1928Below code just for assemble data into network packet. but the code logic has many repeat parts to convert integer for byte array. what's the best method for such purpose to simplify below logic? typedef struct _INFO { int pid; int score; } INFO; void send_packet(int connfd,INFO* info,i...

 
7:56 PM
1
Q: Optimizing a code that puts the results of a first json file of to subparts of a second one when key matches

Revolucion for MonicaI have a geojson file with results for each province and one that gives other results for each constituency (an administrative part of the province). I would like to make a third one that puts the results of the first one for each 'constituency' level of the second one that has the same provinc...

 
8:19 PM
0
Q: Point where maximum intervals overlap

Isaac BuitragoI am solving the "Point where max intervals overlap" problem on geeks for geeks, https://www.geeksforgeeks.org/find-the-point-where-maximum-intervals-overlap/. Following the solution in the article, I used two lists to store start and end times of the intervals. This is my solution in Python: de...

 
8:42 PM
I’m voting to close this question because questions asking about working code, and asking for better implementations, belong on codereview.stackexchange.comTaplar 23 secs ago
 
8:56 PM
This code would fail a profession code review or code inspection. — Thomas Matthews 13 secs ago
 
9:07 PM
0
Q: Shorten runtime of this Python program

Aryan BeezadhurThis is an answer to this question on Code-Golf.SE (but obviously not golfed). How can I shorten the runtime of my program? It is taking far too long to run some of the test cases. Can I utilise Python map() or lambda? def main(): # Store number of test cases T = int(input()) # Loo...

0
Q: How to efficiently execute multiple async calls in parallel to cassandra in C#?

dragonsI am working with Cassandra where I am getting some stuff out of it using Datastax C# driver. Below is my code which interacts with Cassandra db and in my GetAsync method I am extracting stuff from three different tables by making multiple async calls for each client id and item id. Earlier we...

 
9:31 PM
0
Q: C++ Random Tree Node

Brandon MoretzI've been trying to kind of teach myself "Modern C++" the last couple of months and I just finished this interview type problem and thought it would be a good one to get some feedback on. I not including the full implementation for brevity, just the relevant parts for the problem. Random Node...

1
Q: Givens QR decomposition in R or C++: poor performance (or lack thereof) for rectangular matrices

Antonio PiemonteseMy own Givens-based QR decomposition function in R (pseudocode from Politecnico of Turin's math department) is the following: >Givens.fn<-function(V) { tol<-1.0*10^-14 m<-dim(V)[1] n<-dim(V)[2] spId<-bandSparse(m,m,0,list(rep(1, m+1))) # computed just once Q<-spId ...

-1
Q: Custom memory manager works fine in release mode, but not in debug mode

OmidI'm trying to implement a simple memory manager to experiment with memory pooling mechanism and track memory leaks. I'm using VS2019 and so far my code only runs in release x86 mode. Changing the build configuration to debug or setting target platform to x64, results in an access violation error....

 
 
1 hour later…
10:34 PM
 
-1
Q: Nested Lists HackerRank Code

Dew ManGiven the names and grades for each student in a Physics class of students, store them in a nested list and print the name(s) of any student(s) having the second lowest grade. Sample Input 5 Harry 37.21 Berry 37.21 Tina 37.2 Akriti 41 Harsh 39 Sample Output Berry Harry Here is my code: ...

 
 
1 hour later…
11:56 PM
-1
Q: How to find the minimum path with highest sum of edge weights?

Paulo McMillerI'm trying to implement a modified Dijkstra's algorithm to find the shortest path with highest weighted value between all nodes of an undirected graph. Looking at the figure below, I want that this algorithm determine that the low-cost path between node 1 and 6, for example, is d(1-6) = w(1-3) + ...

 

« first day (2575 days earlier)      last day (1460 days later) »