« first day (2542 days earlier)      last day (1469 days later) » 

12:00 AM
RELOAD! There are 6512 unanswered questions (90.0911% answered)
This sort of question is better suited for codereview.stackexchange.comAnurag Srivastava 8 secs ago
 
-1
Q: How to call JavaScript code on multiple elements without the ID attribute?

ComentaristaHow to call JavaScript code on multiple elements, when the id attribute is missing (or when it is not allowed to call an individual element, for some reason). I want to be able to perform an action on each element (BtnAction), changing the popup from 'display: none;' for 'display: flex;' . I ma...

 
 
1 hour later…
1:19 AM
@user3386109 ... and leverchux - Reinstate Monica 24 secs ago
 
 
1 hour later…
2:22 AM
The Code Review comunity is a better place to ask questions about how to improve working code. — traktor53 14 secs ago
 
 
1 hour later…
3:35 AM
possible answer invalidation by Andika Wasisto on question by Andika Wasisto: codereview.stackexchange.com/posts/240734/revisions
 
0
Q: Buffer mutex and conditions in C

Redsam121I only just started writing multithreading in C and don't have a full understanding of how to implement it. I'm writing a code that reads an input file and puts into a buffer struct array. When the buffer has no more available space, request_t is blocked waiting for available space. It is control...

0
Q: Hexadecimal to decimal converter in C (htoi.c)

kibeIs there any way I can make this code more efficient? I'm new to C, any suggestion is welcome! #include <stdio.h> #include <string.h> #include <math.h> #define LIMIT 1024 unsigned long htoi(char s[], int len); int main(void){ char line[LIMIT+1]; int i=0; for(int c=0; i<LIMIT-1 &&...

 
4:03 AM
0
Q: Looking for input on my improved playing card functions

Joel VI built a very basic blackjack program a couple of weeks ago, but I've learned a lot since then, and would like some input on a couple of basic functions for card games: a build_deck function and a draw_hand function. It seems pretty efficient use of code (at least compared to my previous attemp...

0
Q: Decorators in Python

Eric F.I've coined a decorator n called it from Import. tried to get a return when it's being called but it hasn't worked at all decorators.py def dec(fun): def wrapper_dec1(*args, **kwargs): def wrapper_dec2(*args, **kwargs): def wrapper_dec3(*args, **kwargs): print("It's me ...

 
Looks like you are asking for Code Review. — JaMiT 35 secs ago
This is probably more appropriate for codereview.stackexchange.com. — AMC 14 secs ago
 
4:26 AM
This is probably more appropriate for codereview.stackexchange.com. — AMC 5 secs ago
Did you follow my link? Code Review is a different Stack Exchange site (as well as a description of what you are asking for). So, probably double-check that this fits their guidelines, re-post over there, then delete the question here. — JaMiT 45 secs ago
 
Hello, just a quick question if anyone has every had lists nest (like indent one item under another sort of even though I want it all on one level). Using Rails 5, will_paginate, bootstrap. I've commented out what seems to be all the bootstrap and I tried commenting out the will_paginate stuff, still happens. I even unchecked most of the css in Chrome inspector. Any ideas?
Oh is this not a troubleshooting chat?
 
4:49 AM
0
Q: Updating cells based off change in other cells

Joe L Phinazee What I'm trying to do is update column "D" and "E" based off status change of column "F" For any change in "F" I want to use NOW to get the date of the status change. Secondly, I want to specify that is the status is changed to "Implemented", "Closed", "Accounting" then I want no change to co...

 
5:11 AM
0
Q: Designing in C++ using object-oriented principles

wojtekI am preparing for an interview and doing the tasks from the book "Cracking the Coding Interview". I know that there are answers to these tasks, but unfortunately in object-oriented design they are very blurred and I do not know if I do them right or wrong. Please, take a look at my solution and ...

0
Q: Custom Library (pseudo-jQuery)

OPTIMUS PRIMEWell, I'm not going to use it everywhere, as jQuery exists, but still was interested in experience of creating own library. Here are first steps: ;(function() { window["_o"] = function(selector) { if (!selector) { throw new Error("Cannot create Object from " + selector); } ...

0
Q: Webscraping code to import logs from a website which is about to die

th3_ h0pZeWe all know that the famous twitch log site OverRustleLogs is getting shut down. So I decided to do some web scraping to download my favourite streamer's logs using BeautifulSoup. How can make this code run more efficient? import requests import os import shutil from bs4 import BeautifulSoup U...

 
6:04 AM
From the blog: The new names like UNSAFE_componentWillMount will keep working in both React 16.9 and in React 17.x. However, the new UNSAFE_ prefix will help components with problematic patterns stand out during the code review and debugging sessions. — Agney 28 secs ago
 
6:20 AM
Does it work for you? If yes what you want is a code review and here is the wrong place. HG — CodeScale 43 secs ago
 
 
2 hours later…
7:51 AM
0
Q: A simple printf implementation in C89

ema-peI tried to implement printf family functions in C89, after I've read K&R book. The goals are three: Do not use dynamic memory allocation (like malloc); Write a modularized code; Write portable code without use machine dependent behaviour; Avoid undefined behaviour. Performance is not a goal, ...

 
8:14 AM
-1
Q: Is there any other faster way to find cartesian product without using itertools.product()?

Insane_ bandaLink To The Question I cannnot explain the question here so visit the link above to see the question. My solution is: import itertools def last_stone(a,b,stones): last=[] for i in itertools.product((a,b), repeat=stones-1): if(str(sum(i)) not in last): last.append(st...

0
Q: Chrome Dinosaur Game in C++ Applying OOPs

Ankush TripathiI am gaining alot of interest in Game development. I created Chorme Dinosaur game in C++. I have not paid much attention to UI/UX, just trying to see if i can apply some OOPs in game programming. As im newbie, im not sure if im using good code design and logic. I could use some code review and...

 
8:47 AM
If you want a code review, there's a site for that (codereview.stackexchange.com) but make sure you follow their guidelines. A whole project usually is too large. — Mat 36 secs ago
 
9:44 AM
-2
Q: Waive shipping fee for purchase above $39

Teo Hui MinI would like to Waive shipping fee for purchase above (derived in subtotal & excluding Tax)$39 Please advise on how I could achieve that by using the span values derived in the subtotal code I am struggling hard on that. <span style="font-weight:bold;"></span>Tax: <span class="simpleCart_tax"></...

 
@EMarci15 ok, that's fair. But, consider that using condition variables that way is very 'un-idiomatic' to say the least. There's a reason why programmers are advised to check the condition in a loop and so on. Making condition variables work as expected is a tricky stuff. Just from a code review standpoint I would suggest designing synchronization in such a way that the desired effects you with to achieve in T2 are based on some state invariant that is independent of whether T1 managed to signal T2 or not. — ciamej 17 secs ago
 
 
1 hour later…
11:16 AM
0
Q: Simple Product Rating System

EmmanuelAm trying to build a product rating system into my web application.Not the best solution and needs your advice to come up with a better solution. Below is a link to my codes using jsfiddle. <div class="container-fluid rating"> <div class="row"> <h2>Product Rating</h2> ...

 
11:29 AM
Monking
 
your question talks about reimplementing tolower, if you had asked wether there is something wrong with your own implementation for a specific narrow use-case the response would perhaps been different (but the question would still be off-topic. You can to get a review at codereview.stackexchange.com) — idclev 463035818 51 secs ago
 
Monking all
@A13X Not really, it's the main chatroom for Code Review Stack Exchange. And so it's mostly to discuss the happenings of the site. With some off-topic chatter. You may be better helped in the Ruby Stack Overflow chat room - if there is one.
 
0
Q: General C++ AsyncTask based on the Android class

Nemetschek ErnestAs an hobby project, I've made a general C++ AsyncTask class, which interface is inspired by the similar named Android java class. Original android.os.AsyncTask Please review my solution, I would appreciate any advice on how the code could be improved. AsyncTask.h class IllegalStateException : ...

 
12:03 PM
Hello and welcome to StackOverflow. It's a bit unclear what you are asking for in this question. If you are looking for a code review, this is the correct stack exchange site: codereview.stackexchange.comSebastian Brudzinski 19 secs ago
 
12:24 PM
0
Q: String input and split functions in C

ChaseI've some functions targeted to simplify working with strings in some of my other projects. I'd like feedback on this code and whether or not the implementation is efficient and memory safe. I work with both normal strings (char*) and string arrays (char**) in this code. Here's stringfuncs.c #i...

0
Q: Random number generator utility class

CortexI have implemented a utility class to perform various random number related task. I am looking for any feedback on design / implementation. I plan to expand the class, and so would like to correct any "bad habits" and or improve the basics before I proceed. Random.hpp #pragma once #include <g...

 
12:47 PM
0
Q: Satisfying general rate limits in PowerShell

schuelermineI wrote this code for a PowerShell function that allows you to specify rate limits and makes a script block follow those limits. The script block return value is for specifying if it should be counted, i.e., when a server has rate limits and the request to the server doesn't happen due to a clie...

 
1:01 PM
Monking
 
If you want your program reviewed, this site is not the right site to ask; if would be more on topic on Code Review. However, if needs a lot more focus: what are you trying to achieve with it, are you asking about its readability, its maintainability, its performance etc. — Mr Lister 12 secs ago
 
Is this red background new, or have I just not browsed the home page enough to see it?
 
1:50 PM
@Peilonrayz Did yo want to try the new dark view?
I'm still seeing the background I always see.
 
No, this is Code Review with dark reader
So you've seen the red background before. Cool cool
 
-1
Q: First Haskell Program

Adam SI decided to dive into the world of functional programming since my programming so far has been mostly in C/C++, Java, and Python. I've gone through a couple Haskell tutorials and played around in GHCi so I decided to try my first real program. I decided to try one of the easier problems on Katti...

0
Q: Instagram Scraping Using Selenium - Download Posts - Photos - Videos

AlexDotisPython script that can downloads public and private profiles images and videos, like Gallery with photos or videos. It saves the data in the folder. How it works: Log in in instragram using selenium and navigate to the profile Checking the availability of Instagram profile if it's private or e...

 
2:08 PM
@Duga I noticed that way too late. Your call @Peilonrayz
 
@Mast AI on both answers
 
I'll go fix it.
 
I need to have a duga queue or something
Ah ty :)
 
Done.
@Peilonrayz Like, this chat? :-)
 
I seem to not be reading chat after I stared reviewing... :(
 
2:11 PM
In the past, we had multiple people keeping watch. So if one was asleep, another would handle it. But we're bleeding dry here.
 
Unfortunately you're correct :(
 
-1
Q: rxJava 2 + Room. How to handle the absence of an element?

DestroyerI have a database with users, I need to make it so that I can check if the user is unique. At the moment I am using the following code for this: UserDao @Query("SELECT * FROM User WHERE userName = :userName") fun getUserByUserName(userName :String) : Observable<List<User>> Handling Add New Use...

0
Q: A Statistics Calculator For Listed, and Grouped Data

MahdeenSkySo i made a statistics calculator based on raw data for my edexcel ial statistics 1 which i'm going to use in my calculator's micropython since it is programmable, I need some suggestions for ways to further compact my code, or make it look better. I'm also in need of coding tricks, to become bet...

 
3:15 PM
This question is better suited for SE site Code Review. — john 18 secs ago
 
0
Q: Minesweeper with GUI

chrysaetos99I created the famous Minesweeper-game in Java, for which I used java-swing to create the GUI. Here's the code: Control.java: This class contains the main-method, which just opens the GUI. import javax.swing.SwingUtilities; public class Control { //Just to start GUI public static void...

0
Q: Android single activity app structure for smooth ux

MointyI have an app that has only one activity and 5 fragments. I removed the navigation component because it was buggy and restored the old navigation, which is simply a BottomNavigationView with OnClickListener. The problem is, that I don't want to recreate the fragment views, because it takes up to...

0
Q: Profiling for Bézier curve calculations

ReinderienRecently I posted an answer on a question about Bézier curve calculations. As a micro-synopsis: there are three implementations of De Casteljau's algorithm here, including the original poster's, AJ Neufeld's, and my own. As an important attribution notice: those implementations are included here...

0
Q: Goroutine wait select operation on multiple channels

InianI'm trying to understand an SO answer for this question Golang select statement with channels and waitgroup. The author of the now accepted answer goes on to say that OP's code is almost similar to this, when the function is replaced with the actual code package main import ( "errors" ...

0
Q: Python Desktop Activity Log App

user2956141Code Review I've recently (within the last month) started learning Python and am now building a few basic apps. One of the apps I've created is a sort of desktop monitoring tool, that attempts to build a list of all applications used within a specified time period. Process - Check whether the...

 
Probably better suited for codereview.stackexchange.com . I'd suggest looking into how you can utilize a dictionary — rdas 33 secs ago
 
3:51 PM
@JerSci, please ask only question at a time and use comments only for discussing that specific question. If you want others to review your (working) code and give suggestions for improvement, that is off-topic for Stack Overflow, but on-topic on Code Review. You might post a question there for that purpose. — wovano 13 secs ago
I’m voting to close this question because question belongs to codereview.stackexchange.comemix 29 secs ago
 
4:12 PM
1
Q: Counting slides shift in javascript object

dmm79Adding Dynamic Slides to a slider used by a client shifts its index, need to account for that so i wrote this simple code, but i think it's pretty lame, is there any way to improve it and accomplish the same output? var slides = { 1: { content: "", group: 1 }, 2: { group: 1...

0
Q: Harry Potter Kata

ilyesI have implemented the Harry Potter Kata and i need your feedbacks. The rules are: A book costs 8 euros There are 5 different volumes To get a discount, you must buy books of different volumes: Buying 1 book doesn't give you a discount Buying 2 books applies a 5% discount Buying 3 books applies...

0
Q: Reading 100,000 of data with loop and usort is too slow

samtax01The below code is meet to solve the question posted here https://stackoverflow.com/questions/61302983/in-a-meetup-schedule-algorithm-to-get-unique-and-available-date, but I can't post it as a solution until it works perfectly. Right now, the code is working fine but I am having an issue with ex...

 
This isn't an answer to your question. Maybe post this code to codereview? — Sam Stafford 24 secs ago
I don't know how to send my code to code review. Can you help me to way of it — Gokberk 41 secs ago
 
4:35 PM
0
Q: Is it possible to optimize multiplying an array by a number in C?

MarcI have a code in C that multiplies each element of an array by a number(0-9), resulting in a series of base 10 digits. My problem is that this function takes longer to run that I expected. I need it to be faster. I know that my problem when it comes to optimizing my function is the dependence of...

 
4:57 PM
1
Q: Python Class Coding Simplification

GokberkMain purpose of this code, Take some information for animal features Clasification of user input print those input into txt file My problem is that, I think coding of animal features takes too much lines. Is there any way to do that in a simple way. Something like putting all the features(nut...

 
 
1 hour later…
6:15 PM
-1
Q: if sum of any two integers from two lists is equal to a given number

emki'm looking for the python code for finding pairs from two lists(consists of integers) if the sum of any items from each list is equal to a given number this is my code, and can i get any other fresh algorithm for this? def twosum(list1, list2, target): n=len(list1) m=len(list2) k=10 i=0 j=0 w...

 
6:27 PM
Then maybe you should consider codereviewcigien 22 secs ago
 
@CaptainObvious Wat, deletes a post that isn't off-topic...
 
7:08 PM
-3
Q: I need to optimize the array management method

chipI'm not comfortable reading the code, I spend a lot of time to understand where the number comes from and where it goes. But I can't get rid of numbers, they must be there and there are a lot of them, so I use arrays. int mechanism[3][3] { { 1,1,1 }, { 2,2,2 }, { 1,1,1 } ...

 
I’m voting to close this question because I believe it belongs to Code Review Stack Exchange (codereview.stackexchange.com). — Marko Grešak 50 secs ago
 
7:46 PM
@MarkoGrešak Looks off-topic for Code Review. — Peilonrayz 59 secs ago
 
0
Q: Column File Format

Martin YorkFollowing up on my previous Column work: Column File Format Stream It is now available in github: https://github.com/Loki-Astari/ThorsStorage I have incorporated the comment by @L.F. but have done a lot more work since then. Unfortunately the main code is now at 798 lines so too much for a sing...

 
8:03 PM
godbolt.org has gcc and clang for RISC-V. (They'll probably turn your range check into sub / unsigned-compare instead of two branches, though.) And there are RISC-V simulators. The fact that you don't have a setup to test your code doesn't make this a good programming question. If anyone wants working code for that C in real life, they should just ask a compiler. It's not good for codereview.stackexchange.com because you're asking people to check it for bugs, not just style and implementation choices. Codereview.SE also expects you to have at least tested your code. — Peter Cordes 46 secs ago
 
0
Q: Handling callback of a React Component which uses a context

RobinA component framework should make pieces of a web frontend reusable, right? So I refactored a component into its own NPM package. You can find the component and package here: https://github.com/openscript/react-dsv-import When I tried to use the component I ran into a problem: Cannot update a c...

 
8:19 PM
In the future, Such questions are meant to go to codereviewZohir Salak 19 secs ago
 
8:33 PM
0
Q: Finding Build Order For Packages With Dependencies

Koray TugayI gave a shot to infamous finding dependency problem. I highly encourage to give it a go yourself before seeing the solution I came up with. Here is the problem statement: Given a list of projects that need to be built and the dependencies for each, determine a valid order in which to build...

 
Hey Emmanuel. Welcome to StackOverflow. 1. You didn't post any code 2. The site with code reviews is: codereview.stackexchange.comSebastian Brudzinski 30 secs ago
 
8:56 PM
0
Q: Encrypted Online Rock Paper Scissors Game

Mr.ChefI made an RPS Game with python with the Crypto and socket modules. I would like you to look at the code and tell me if anything can be improved, and if there are mistakes, etc. The game is working like this, the server is setting up the socket connection, and then listening for 2 clients at lea...

 
9:32 PM
Post this over at codereview.stackexchange.com. The site exists specifically to critique and help improve code that functions but needs work, as opposed to Stack Overflow which is for code that doesn't work. — John Kugelman just now
 
10:28 PM
0
Q: export one const vs. exporting individual functions

knot22The following shows the structure of a file which provides unit of measure conversions to other files in a project: export const converter = { convertStringFractionToDecimal() { // ... }, convertToOfficialUom() { // logic for this method calls this.convertUom() }, convertUom() ...

 
10:51 PM
@user3783243 please read KIKO's comments on codereview.stackexchange.com/q/240813/141885mickmackusa 15 secs ago
assume the LIST is length-1 long -- Then many code reviewers would have you rewrite the loop to use the real length of LIST as the index terminator, not an ersatz length that came from somewhere else.. — PaulMcKenzie just now
 

« first day (2542 days earlier)      last day (1469 days later) »