« first day (2968 days earlier)      last day (40 days later) » 

12:02 AM
RELOAD! There are 7646 unanswered questions (89.4084% answered)
2 hours later…
1:54 AM
Q: Need explanation for below code <Panagram>

Pushpanjali''' static boolean isPanagram(String s) { int n = s.length(); if(n < 26) return false; //pls help me to understand below lines ** boolean visited[] = new boolean[26]; for(int i=0; i<n; i++) { char x = s.charAt(i); if(x >= 'a' && x <='z') ...

2:26 AM
Q: Debit card validator Python

JeanIn this python program, I built a debit card validator. I need advice on my code in terms of (architecture, risks, opportunities, design) so that I can learn how I can code better & grow my skills. card_number = list(input('Please enter a card number: ').strip()) # Remove the last digit of the c...

5 hours later…
7:18 AM
Q: Ansible shell command tasks not running

Bhanuprakash VattikutiI am new to Ansible, I trying Ansible shell module to execute command on the host, But task containing shell is skipping. can some one help me. Here is the code I am using - name: To rectrive the process running state hosts: localhost tasks: - name: Change the working directory to somedir...

1 hour later…
8:31 AM
Q: Debugging problem with dimension shapes in CapsNet and Routing setup

MarioI'm learning about CapsNet (Ref. :Paper) and inspired by this GH. considering I tried to simplify entries in the Routing algorithm, I get the following errors which I show its traceback: --------------------------------------------------------------------------- ValueError ...

9:19 AM
Q: How to change logging configuration from within my own code, without touching the code in the (upstream) module?

Andreas SchuldeiThis code demonstrates how to log stuff from inside my class. It is a simplified version of what I find in a module called mptools. Now I want to use this kind of logging in my project, together with the mptools module. How can I keep the changes which make logging to syslog work local to my own ...

1 hour later…
10:32 AM
Q: Is there a way to optimize code for pairing the elements in a list and generate count of pairs

Diwakar SHARMAi want to optimize my code for following question /* A company sells dumbbells in pairs. These are weights for exercising. They receive a shipment of dumbbells weighing anywhere from 1 unit up to a certain maximum. A pair can only be sold if their weights are sufficiently close: no greater than 1...

10:56 AM
Q: Tiled Matrix Multiplication for Rectangular matrices with dimensions as multiple of tile size

Atharva DubeyI am studying matrix multiplication and its various different ways in which it can be optimized on a GPU. I thus have a kernel that utilizes tiling, coalesced access and avoids bank conflict. The code is as follows - __global__ void sharedMatrixMultiplication(float* MatA, float* MatB, float* ...

11:21 AM
Q: How to handle configuration from a config file and global variables transparently in python?

Andreas SchuldeiThis is how I handle configuration in my python code, currently, but I guess it might look magic to people, and it is cumbersome to code. How can this be improved? Are there better solutions? The purpose is to have a general working configuration stored in UPPER CASE in global variables at the be...

Q: Should moderators be able to undelete any comment, including self-deletions?

Paul WhiteModerators were granted the ability to undelete comments, primarily to make cleaning up long comment threads more efficient. The idea was for the moderator to purge all comments, then selectively undelete those deemed worthy of continued existence. The moderator UI only allows moderators to undel...

Look at what you caused ;-)
11:41 AM
@Mast And I'm proud of it!
> The system does not enforce this on the backend, so user scripts exist to allow moderators to undelete any comment
Oh yes, that caused some turmoil.
If they don't even bother enforcing a backend check on it, then that's just security by obscurity frontend which is not really any security at all.
To make it more obvious what things are protected against, allow frontend to do everything, then have backend determine what is allowed or not!
11:49 AM
Your code looks fine to me, but as @MickyD pointed out, your question isn't really suited for this site because we don't know what kind of answer you expect. Maybe it would be better on codereview.stackexchange.comKevin Gosse 48 secs ago
That would require a frontend and backend that actually does what it's supposed to and you know perfectly well the SE codebase is far from perfect. It feels like the system was created as a hotfix on a hotfix on a hotfix, one meta post or tweet at a time.
I'd like to not need userscripts. I really do. And when I started out as a moderator here I thought I wouldn't have to.
Wjat's the hot talk today?
23 hours ago, by Simon Forsberg
Flagging something for "other" reason should not be an automatic request for deleting something!
@Mast The only two userscripts I've used are 1. the auto-comments one. 2. my "moderator flag desktop notification" script
12:12 PM
So basically you want a base 26 number system but using characters A-Z rather than 0-P? Maybe the code here can help you get started. — Llama 55 secs ago
@SimonForsberg That post brings back memories. Faint ones.
12:33 PM
Q: Reading list in Python

JeanThis python program allows users to add books to a reading list based on a set of info, store the books and display them from the user's reading list. I need advice on my code in terms of (architecture, risks, opportunities, design) so that I can learn how I can code better & grow my skills. read...

1:02 PM
It seems to me this question is more suited to be asked in the Code Review Forum. Code Review is a question and answer site for peer programmer code reviews. Please read the relevant guidance related to how to properly ask questions on this site before posting your question. — itprorh66 7 secs ago
Ryan Donovan on June 19, 2021
In the fifth lesson of the series we’ll learn how to build more flexible linear models by adding interaction and polynomial terms. We’ll fit and inspect our models both mathematically and visually to understand how they work. In the process, we’ll continue to practice our Python skills and discuss some of the merits (and drawbacks)…
2 hours later…
2:59 PM
Q: Sanitation and validation of a user input 10 digits phone number

hibihphoneNumberCheck() is using 2 helper function to check if a users input of a phone number is valid. this is a client side check, if this code is ok should I check the same at the nodeJS back end? is splitting the number validation function to validate length and another function to validate pre...

3:21 PM
This post is better suited for codereview.stackexchange.comCoolBots 38 secs ago
Q: Issue with implementing JavaScriptSerializer library to seralize datatable to JSON string and remove blank values

Sachin MittalThe problem boils down to as below: PS: The datatable structure is defined as in the image: https://i.stack.imgur.com/AEaPj.png I am using C#.Net core to solve the problem of removing the '[' and ']' from each of datatable column values. I would also like to convert the complete datatable by seri...

2 hours later…
5:25 PM
Q: Asynchronous Web Scraper

dougjThis is my first asyncio/aiohttp web scraper I am trying to wrap my head around Python's asyncio/aiohttp libs these days and I am not sure yet I fully understand it or not so I'd like have some constructive enhancement reviews here. I'm scraping https://www.spoonflower.com/ which contains some pu...

1 hour later…
6:42 PM
The first thing you should achieve is to have a working code that does what it should. Once it does what it should, proven by tests, you should start refactoring your code into smaller pieces to improve readability. I.e. if this code is working as expected, you may ask at codereview.stackexchange.com for how this code can further be improved — Roman Vottner 15 secs ago
7:07 PM
elif True would not pass code review on my team :-) — Christian Sloper 25 secs ago
7:50 PM
Q: Commands loader

KristalkillPlayLoader public async load_Commands():Promise<void> { for (const module of readdirSync(`${this.directory}commands/`)) { const Commands = readdirSync(`${this.directory}commands/${module}/`).filter((file) => file.endsWith('.js')); for (const commandFile of Commands...

8:39 PM
Q: Python text based game: Adding to inventory from a dictionary

JaelynI am trying to add items to the players inventory from a dictionary. However, when I add the first item to the dictionary, the program stops repeating the while loop. Can anyone help with this or give me some other way to add items to the inventory? Thanks so much. def main_menu(): # prints the ...

3 hours later…
11:50 PM
I see some formatting and heterogyny issues especially regarding newlines, tabs, and access modifiers. About teh code itself, there are some inconsistencies. And some repetitions of assignment with different values, some lines being unnecessary, it seems. As well as unconventional names starting with a lower case. You can also refactor certain things and certain reference chaining. You would probably get a detailed answer on codereview. — Olivier Rogier 43 secs ago

« first day (2968 days earlier)      last day (40 days later) »