« first day (2875 days earlier)      last day (1141 days later) » 

12:00 AM
RELOAD! There are 7421 unanswered questions (89.5392% answered)
 
 
2 hours later…
1:44 AM
0
Q: Traverse directory using multithreading

user765443I have written program which following purpose Traverse directory in multi threading environment First determine all top level directory and store into vector which have following result /home/dir1 /home/dir2 more than 1000 create number of database create number of threads assign each thread...

0
Q: Efficient NumPy sliding window function

Björn LindqvistHere is a function for creating sliding windows from a 1D NumPy array: from math import ceil, floor import numpy as np def slide_window(A, win_size, stride, padding = None): '''Collects windows that slides over a one-dimensional array. If padding is None, the last (rightmost) window is ...

 
2:05 AM
possible answer invalidation by Reinderien on question by Apex: codereview.stackexchange.com/posts/257304/revisions
 
2:22 AM
and if you want a review of working code you should go to codereview.stackoverflow.comuser1558604 10 secs ago
The url for code review is a stackexchange not stackoverflow: codereview.stackexchange.comMark M 56 secs ago
 
0
Q: Can it be simplified/improved? Finding the best set of values in array JS

TimonekI have an array which I want to check for some values in second and fourth column. If I pass to function GWPA4205022 and 1550 I want function to: find in array all matches to GWPA4205022 find the best combination of elements which sum is close to 1550 if it's less than 1550 then it should find a...

 
2:48 AM
This kind of answer would be suitable if the question were asked on codereview.stackexchange.com - Stack Overflow is meant for answers to specific programming questions, not really meant for general, open-ended feedback. In this case the OP is not asking a specific programming question so it is not really possible to write a good answer. Please see How to Answer, particularly the section on answering "well-asked questions". — kaya3 21 secs ago
 
 
1 hour later…
5:11 AM
You should ask code review in here codereview.stackexchange.comM.Innat 18 secs ago
 
 
1 hour later…
6:26 AM
Well, if you say so. I'm just saying from a code review perspective that's an assertion that needs more guarantees than your word. — tadman 41 secs ago
 
 
2 hours later…
8:30 AM
possible answer invalidation by ProtractorNewbie on question by ProtractorNewbie: codereview.stackexchange.com/posts/257303/revisions
 
8:44 AM
Actually, this belongs on codereview — georg just now
possible answer invalidation by ProtractorNewbie on question by ProtractorNewbie: codereview.stackexchange.com/posts/257303/revisions
 
0
Q: Excel Lambda function that checks if a number is a prime

vzczcCreated an Excel Lambda function in name manager to check if a number is a prime, and named it ISPRIME Calling it From Excel like this: =ISPRIME(7) returns 1 =ISPRIME(6) returns 0 But it does not work for a range. I have created other LAMBDA functions that operate on ranges, but there is clearly ...

 
9:09 AM
I’m voting to close this question because questions seeking improvement of working code are better suited for codereview.stackexchange.comzett42 42 secs ago
possible answer invalidation by ProtractorNewbie on question by ProtractorNewbie: codereview.stackexchange.com/posts/257303/revisions
 
9:26 AM
"TL;DR: Is the code below really pythonic and a good idea?" Stack Overflow is the wrong website for a question like this. You could try codereview.stackexchange.com , but they have their own posting guidelines. — Karl Knechtel 55 secs ago
 
9:45 AM
This might be more suited towards Code Review but read their guidelines before posting — Sayse 28 secs ago
 
 
1 hour later…
10:58 AM
0
Q: Java convert an int to a String

TombezlarHere are 3 ways to convert an int to a String String.format("%d", 100); String s = String.valueOf(n); String s = Integer.toString(n); String s = "" + n; I understand what we did for the first and second method. But can someone please explain what does 3rd method do. In other words, how does "

 
11:24 AM
0
Q: Animating Pathfinding Generically

L292092This is part of a project I built to visualise pathfinding algorithms. These files run the algorithms and gather a list of frames, which are used to show the animations. algorithms.ts export type Algorithm = (start: Coord, goal: Coord, walls: boolean[][], weights: number[][], heuristic: string) =>...

 
 
1 hour later…
12:31 PM
@Waruyama - you asked about the down and close votes. They happened because you're asking for an opinion, not an answer. There are many possible solutions to your dilemma, and SO doesn't allow that sort of question. We only really answer questions with a definitive answer. Your question would be better suited to the Code Review or Software Engineering stack-exchange sites. — Software Engineer 22 secs ago
Thanks @KarlKnechtel for referring me to codereview.stackexchange.com, from now on I'll know better to ask such questions there. — Pomaranczka 1 min ago
 
0
Q: Remove and add connection string

AstropheI want to remove a connection string that may already have been set in a different config file and then set it again. Say my application has a Web.config file and a Web.Debug.config file then I can achieve what I want to do in the following way: Web.config: <connectionStrings> <remove name="...

 
0
Q: Read created json files inside a given folder

ProtractorNewbieI have been working with where I use watchdogs to be able read whenever I have created a file by the name -> kill_.json and it contains: *kill_*.json & *start_*.json contains: {"store": "twitch", "link": "https://www.twitch.tv/xqcow", "id": "2710"} and currently what my script does is to read t...

 
possible answer invalidation by ProtractorNewbie on question by ProtractorNewbie: codereview.stackexchange.com/posts/257303/revisions
 
2:13 PM
If it's just improvements you're after, you might want to ask over at codereview.stackexchange.com. Although you'll definitely want to take their tour to make sure your question is a good fit. — Broots Waymb 10 secs ago
 
0
Q: Amplifying this ddos code

zAndrewiI am trying to make a ddos code, and that's what I got so far. I am trying to make it more efficient and powerful, just for testing purposes. I'm new and I was wondering if I could do that? Is there any way to make this better My code ddosed the specfic ip adress until right now. ################...

0
Q: Using asyncio and aiohttp in classes

anddtTo better familiarize with async requests I wrote a very simple scraper that relies on aiohttp to retrieve some basic information from the product page (product name and availability status) or an Italian e-commerce retailer. Code is organized according the following structure: stores.py stores m...

0
Q: Chunk a large set of characters by a specified set of delimiters and a maximum chunk size

Matt HopeProblem I need to be able to grab a subset of characters but ensure that each set doesn't exceed a specified limit and must end with a defined set of characters. For example, say I have an entire book worth of characters, I need to chunk that into a set of 300 characters but ensure that none of t...

 
3:11 PM
0
Q: Animated menu system - mobile and desktop

BagseyeI have the following menu concept - https://codepen.io/morgancarbonfourteen/pen/GRNbgEO A brief outline of it’s operation: On Mobile The user presses the Menu button This triggers the top level menu items to ‘drop’ down If a user selects a top level nav item with a subnav it: Opens the subnav ...

0
Q: Utilities for Coordinate Transformations (via homogenious Coordinates)

FirefoxMetzgerI regularly wish to convert poses (position 3d + orientation 3d = 6d total) between different coordinate frames. Use-cases are for example in game-engines and simulations to compute the position of objects relative to one another, or for example in robotics (my use-case) to compute the position o...

 
Monking
@Duga apparently rolled back by OP
 
3:30 PM
looks like it was a somewhat slient night as far as chat here...
 
3:40 PM
possible answer invalidation by ProtractorNewbie on question by ProtractorNewbie: codereview.stackexchange.com/posts/257341/revisions
Yeah, I saw your edit. Thanks! Code review is a beautiful thing — Flydog57 25 secs ago
 
Thomas A. Limoncelli on March 18, 2021
If there is one thing developers like less than writing documentation, it’s responding to unnecessary escalations.
 
4:02 PM
0
Q: Deploying Google reCaptcha for contact form and SMTP Sendmail

Michel MI'm a junior here ... we lost our developer so we are doing reverse engineering! We are spammed in our phpmailer eMails with outgoing mail. We are a small Nonprofit Organization ..so Web Maintenance by Volunteering! We have a Contact form located in our public web page. (contact.php). This is a p...

0
Q: Bowling kata in Python

StuartEhttps://github.com/stuie382/bowling-kata-python Github link provided. Hey All, This is my first post on here, so apologies for breaking any conventions. I'm not really a Python developer but with time on my hands it seems like something interesting to learn. What I'm after in particular is how di...

0
Q: Ensuring that attributes referenced by a mixin are present in the children class

barciewiczI have implemented the below _get_schema method to ensure that schema attribute is always present on the Todos instance, and can therefore be used in the mixin. Is it OK to do it like this? As far as I know, mixins usually do not implement constructors. Is there a better way to make sure that som...

 
4:27 PM
0
Q: Display N Prime number less than 100 having odd index

JHDevI have this problem to resolve using Lambda and stream. Here this excise: display a list of all prime numbers less than 100. From this list, display only the prime number that has odd index Example: 1) 2, 3, 5, 7, 11,13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89,...

 
@CaptainObvious borderline AoC... perhaps OP is now maintainer of code but the first question might be off-topic
> The reCaptcha widget is displayed on that form... Correct?
 
4:43 PM
I'd upvote your question, but won't - because of why it's closed. Not sure if "Code Review" is a better place for this, but pro/con questions really are about opinions, not code. You may as well ask about which is better... a web app or something running native on both platforms. — dfd 33 secs ago
 
Mo nking
 
@dfd This doesn't seem to be on-topic for CR. See "Which Site?" and "Code Review or not?"Sᴀᴍ Onᴇᴌᴀ 15 secs ago
 
5:42 PM
0
Q: jquery filter not working with unchecked boxes

Adão CoelhoI'm making a jquery filter for some options in my website but the problem is that I want the filter checkboxes to load (be checked) by default to show all the options available and when the user unchecks the checkbox, it filters to the remain options that are stil checked. html <div class="checkb...

 
6:01 PM
@SᴀᴍOnᴇᴌᴀ shrug
Technically, yes.
Perhaps it should be rephrased a bit.
@SᴀᴍOnᴇᴌᴀ Absolutely, it should've been closed.
1 more VTC.
@Duga Looks like a manual rollback.
 
@Mast done
 
@SᴀᴍOnᴇᴌᴀ That should automatically kick it from HNQ if it was still on there too, right?
 
> Closed questions are excluded
 
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 8 secs ago
 
@CaptainObvious CNWAI
 
6:13 PM
I’m voting to close this question because this probably belongs on Code Review, another site in the Stack Exchange network. — AndrewL64 22 secs ago
@HannahdeGuzman: You haven't actually described a problem, the only request you have is for the community to examine your code and provide feedback. That is off-topic here, but potentially on-topic at the Code Review site. To learn more about this community and how we can help you, you are encouraged to start with the tour and read How to Ask and its linked resources. — David 16 secs ago
If you provide the code for the method you can do, then this might be a great question for Code Review since their focus is on improvements for working code. As it is, this question doesn't have enough detail for a minimal reproducible example for this site, and it would help if you would edit it to show expected output and code for what you've tried so far — G. Anderson 16 secs ago
@David & AndrewL Code Review isn't a code explanation site either, so I'm not so sure it would do well there. — Mast 53 secs ago
@Mast: Indeed, it's only potentially on-topic there. The OP is encounraged to first take their tour and consult their help center as well. — David 34 secs ago
@Mast: Another user recommended Code Review. I recommend that the OP consult the Help Center at Code Review and first see if the question would be a good fit. It's more likely to be a better fit there in something close to its current form, but not guaranteed. Please only make corrections to the users who actually made the recommendation in the first place. — David 20 secs ago
 
Keep calm and sigh on.
 
Because your code works but you'd like to improve it, this might be better suited to Code ReviewG. Anderson 13 secs ago
No, on this site we ask for a minimal reproducible example which you've provided (and thank you for that btw!). It's not that you won't get answers here, but the code review stack site is explicitly meant for exactly what you're asking, i.e., "How can I improve the efficiency of my code?" — G. Anderson 11 secs ago
 
6:58 PM
0
Q: How to use "np.where()" to generate *multiple* new arrays

Omar AlSuwaidiSay I have the following two different states: state1 = [0, 1, 0, 1, 1] state2 = [1, 1, 0, 0, 1] And I want to generate n number of new states by only changing the values at where these states differ; and I want to do so randomly. So I did the following: state1 = np.array(state1) differ = np.whe...

 
@CaptainObvious wow I'm not used to seeing a response to the suggestions from the auto-comment about CNWAI ....maybe the OP just meant the last part about updating the code when it works
Thank you @SᴀᴍOnᴇᴌᴀ will do that for sure! — Adão Coelho 1 min ago
 
It's rare indeed.
 
 
2 hours later…
9:04 PM
0
Q: Exists Method Implementation for Multidimensional Array in C#

JimmyHuTo determine whether the specified array contains specific element or not, Array.Exists can be used if the given array is one dimensional. I am attempting to implement Exists method for multidimensional array cases. The experimental implementation static class MDArrayHelpers { public static b...

0
Q: How do I structure and create the base for my react project?

MalbertI just followed along Brad Traversy react course, and understood most of the basics of react. However styling, and dividing the UI into components are things that are hard for me. Creating a plain vanillaJS site it is easy to do, you add html, style it and add functionality. In react the html is ...

 
9:19 PM
@CaptainObvious CNW - DNE
 
possible answer invalidation by JHDev on question by JHDev: codereview.stackexchange.com/posts/257353/revisions
 
@Duga OP added NA - should have been an edit to the original code
 
 
1 hour later…
10:28 PM
@CaptainObvious would that be on-topic for softwareengineering? OP asked me where it could be posted...
 
11:11 PM
0
Q: jquery optimization

Adão CoelhoCan someone please give me some advice about this jquery code, in this particular case, is this practice correct? It works fine but it feels kind of outdated. <script> (function($) { 'use strict'; var $filters = $('.filter [data-filter]'), $boxes = $('.boxes [data-cat]');...

 

« first day (2875 days earlier)      last day (1141 days later) »