« first day (2867 days earlier)      last day (1158 days later) » 

12:00 AM
RELOAD! There are 7391 unanswered questions (89.5640% answered)
 
12:11 AM
Code review has it's own site and own posting rules: codereview.stackexchange.com make sure you see their how to ask section. — Scott Craner 42 secs ago
 
 
3 hours later…
2:56 AM
got this sorted in the end - took a bit of study and T&E - thank for help these comments helped. gonna post the finished code on code review in accordance with meta advice before production just tidying etc and style ;-) — byronyasgur 37 secs ago
 
 
1 hour later…
4:44 AM
0
Q: Returning maximum number of consecutive 1s in list of binary numbers

zowhairThis is what I implemented in Rust to get the maximum number of consecutive 1s in list of binary numbers. impl Solution { pub fn print_values(nums: Vec<i32>) -> i32{ let mut result = 0; let mut count = 0; // let mut end = 0; // NotE: Change the if so that it ch...

0
Q: Caesar Cipher Encryption / Decryption in Python

tommy2111111111I'm trying to write a Python program to predict the most likely substitution for a Caesar cipher. I managed to get it working, but it just seems very clunky and slow, especially because I need to preserve cases and non-alphabetical characters. Would it be cleaner / more pythonic to use the chr()...

 
5:08 AM
Monking
 
5:20 AM
I think this would belong on Code ReviewCATboardBETA 31 secs ago
 
5:36 AM
0
Q: Python get all Unique Pair combinations from list of elements

PluviophileI tried to get the all unique pair combinations from a list. Here is what I have done so far, # Unique Combination Pairs for list of elements def uniqueCombinations(list_elements): l = list(itertools.combinations(list_elements, 2)) s = set(l) # print('actual', len(l), l) return li...

 
6:01 AM
0
Q: C.Insertion sort with guard

Lusinda Babaika I have already addressed this issue and corrected something .really..now the graph looks different Please tell me if the program works correctly?You can see the results in the picture above.I will be grateful if you find any mistakes (if there are any, of course..) /I'm just not sure if the aver...

 
6:15 AM
possible answer invalidation by Setris on question by Pluviophile: codereview.stackexchange.com/posts/256952/revisions
 
 
2 hours later…
8:40 AM
possible answer invalidation by Pluviophile on question by Pluviophile: codereview.stackexchange.com/posts/256952/revisions
 
 
1 hour later…
9:52 AM
0
Q: Sort and reverse lists

Kushagr Jaiswaldef main(): get_the_number_of_students_from_user() if (NUMBER_OF_STUDENTS > 0): get_the_list_of_names_from_user() get_the_list_of_marks_obtained_from_user() print_the_names_after_sorting() print_the_marks_obtained_after_sorting() else: print("...

 
10:05 AM
possible answer invalidation by ferada on question by tommy2111111111: codereview.stackexchange.com/posts/256950/revisions
Also, note that if your code (not shown in full here) works, this may be more suitable for Code Reviewburan 44 secs ago
 
10:25 AM
If it works, you could ask the question on CodeReview. But even there, the question would be better received if you had some context (what this code if for, and what does it does), and a sample input or how to build it, so that others could easily test. — Serge Ballesta 48 secs ago
Overall this is fine and I only see small improvements that can be made. I’m voting to close this question because working code belongs on codereview.stackexchange.comAlex Hall 42 secs ago
@AlexHall Please do not use Code Review as an excuse to close questions. — Peilonrayz 48 secs ago
@AlexHall Many Stack Overflow user do not know Code Reviews rules. As such when someone who doesn't know the other site's rules closes the question because the other site exists, but not because the question is on-topic on the other site, the user is creating a no-win situation for the OP, because the question is closed on both sites. If the question is off-topic on SO close with the reasons SO has given you, if you want to be nice you can say "this may be on-topic on CR" but don't close because CR exists. — Peilonrayz 27 secs ago
I am sorry, i now see that the question wasn't very clear so i edited it, you still think i need to submit it to code review? — geoka 6 secs ago
 
11:00 AM
possible answer invalidation by Pluviophile on question by Pluviophile: codereview.stackexchange.com/posts/256952/revisions
 
Monking (hello) @AncientSwordRage
 
0
Q: Find sub-list index with the closest to a given number sum

geokais there a way to imrpove this python code? The task that i have to perform is to take an array of a specific length, and figure out which sub-list has the closest sum to another given number. Then, i need to print the index of that sub-array. num_of_cases = int(input()) for case in range(num_of_...

 
Probably best asking this on codereview.stackexchange.com if your code is working — Pete 12 secs ago
 
11:35 AM
0
Q: CSS animated button and custom meter made of divs

potatogandalfI know I could've used a <meter> element, but I wanted to try implementing from scratch. The positions are a bit hacky, and I tried to make it responsive but ended up using px anyway. I would like some advice on when and how to use sizing units, if possible. Thanks! P.S. Please don't mind the goo...

0
Q: random team distributer

XusAny idea how to shorten and improve the program? it's going to take a list included of 22 people and split them into two teams and return the names and teams import random # list of teams teams = ['A', 'B'] # list of players which is inculded of 22 people players = ['a', 'b', 'c', 'd', 'e', ...

 
@Peilonrayz cabbage
How goes it anyway?
 
Lemon! Rare to see the salad language around these parts
 
@Peilonrayz I don't really know much beyond cabbage
 
@AncientSwordRage I remember someone writing a sentence in salad lang in room6 and some jokes about not being able to read the message without going to the wiki were made ;)
 
@Peilonrayz heh!
 
11:47 AM
@AncientSwordRage Not bad. How's things for you?
 
@Peilonrayz good
I keep refreshing my latest question here, but alas that's not encouraged an answers
 
I’m voting to close this question because your code works but you are looking for a code review. Thus this question belongs on: codereview.stackexchange.comBooboo 7 secs ago
 
@AncientSwordRage Unfortunately my JS skills are not something I think other people would want ;) So I'm not much help here. I'll drop a link here in case any JS users are around tho
2
Q: Indexing and searching an list of rectangles to see if they contain a point

PureferretI have a flat list of rectangles, in the following format (id, x co-ord, y co-ord, height and width): [ { id: 4206, x: 360, y: 700, width: 60, height: 50 } , { id: 6621, x: 1260, y: 1100, width: 60, height: 50 } ] I want to index this by range of X values, and then use that indexed object to ...

 
Hey, this question might be more relevant on Code Review (codereview.stackexchange.com)! — Luke 53 secs ago
 
@Peilonrayz thanks, I'm trying to shy away from too blatant self promotion as I'm only a sometimes-user of CR
I was half tempted to ask on Computer Science, because I'm really after a better algorithm
 
12:00 PM
0
Q: Is there anyway to use less if statements in my function?

some_user_3I have made a random password generator using a class called password and a method called generate. My program works as it should. It generates a random password determined by the users preferences for length, upper or lowercase, numbers and special characters. I was just wondering if there was a...

0
Q: T-test Independence for a Pandas DataFrame

PluviophileI want to calculate the scipy.stats.ttest_ind() for numeric columns in a pandas DataFrame with the binary target variable. import pandas as pd from scipy import stats def calculate_tStatistic(df, target, numeric_cols): """ Calculate the t-test on TWO RELATED samples of scores, a and b. ...

 
i'll have a look at posting it on codereview :D Edit: heres the link: codereview.stackexchange.com/questions/256967/…lunAr- creator 49 secs ago
If your code works and there is no issue, please consider posting it at Code Review for any optimisation help. — Wiktor Stribiżew 45 secs ago
 
12:27 PM
0
Q: Can this Jquery be more efficient?

LowisI have 3 checkbox's with 8 different combinations and outcomes. It does work with errors and I was wondering if this can be wrote more efficient and without errors? https://jsfiddle.net/Lqdagn19/ $('input[type="checkbox"]').click(function () { $('.box').hide(); if ($('#red').is(':checked'...

 
@Peilonrayz thanks for the comment, see my update for details
 
1:04 PM
As I understand it, elevating to admin rights has to be for the whole app, not just for one operation. — stuartd 41 secs ago
 
1:17 PM
@AncientSwordRage Hey, sorry was away. Thanks for the info! Hopefully you can get some more views from the homepage now too :D
 
@Peilonrayz exciting!
 
@CaptainObvious work with errors is not working as expected.
 
@pacmaninbw Don't forget the language is JavaScript. Programs working correctly with errors is a design feature
3
 
1:57 PM
@pacmaninbw FWIW the code runs fine on my end. IDK what errors the OP was on about
The OP possibly meant mistakes in the code, like bad formatting and such.
 
2:21 PM
@Peilonrayz I've removed or flagged all comments about code not working and retracted my VTC.
@Peilonrayz JavaScript is the reason I'm no longer willing to work on web development.
 
@pacmaninbw that bad eh?
 
Never works the way I want it to.
 
@pacmaninbw Wow the flags were handled fast :O :O Thanks! :D
 
I also prefer compiled rather than interpreted languages.
 
@pacmaninbw it's a tricky one for sure
@pacmaninbw If I'm honest, that exactly how I felt about C++ and Fortran back at university
 
2:27 PM
@Peilonrayz I think @Vogel612 was just waiting for me to clean up the mess I made.
@AncientSwordRage At the university I helped other students and faculty write correct C, Pascal and Fortran. C++ didn't exist yet.
 
@pacmaninbw I just came back from my exam today, soo ...that's really not it :)
 
@pacmaninbw I definitely tried to help students and faculty with C
Except one of my lecturers for our computing course (who was, naturally a material physicist) said, in all seriousness
> C doesn't like pointers, just make everything global
2
 
eurgh
 
@AncientSwordRage Yeah, whenever I translate from Python my code just never seems to work... But if I write JS from scratch the code just works. I don't get it...
 
@AncientSwordRage Really?, C loves pointers. You can't write efficient C code without them.
2
 
2:33 PM
@pacmaninbw yup! I was just like.... "::blink blink:: ok."
The same prof who when I told them there was an integer division issue in their student's fortran code (it mean the exponent of something was always 1)
> It can't be wrong, they got their PhD with this code
6
@Peilonrayz JS is magical
 
0
Q: housekeeping script improvments

user956924I have built a houskeeping script and I would like to improve it. I have a JSON file with the details such as directory path, number of days after which the directory or file should be zipped, deletion period for the zip as well as if it's files or directories that we are zipping. Config JSON fil...

 
She was a lovely professor, just no longer had a handle on her students code.
 
3:02 PM
What is your question? This is not a code review service. You should explain in detail the problems you have with your code. Post error messages and stack traces, etc. You should read How do I ask a good question? and What types of questions should I avoid asking?. — vanje 30 secs ago
 
3:52 PM
0
Q: Stripping Quotations from a List of Lists

GalacticPondererI have written a short function as part of my program that strips the quotation marks (") from a list of lists. An example of the input data is: [['"foo"', '"Spam"', '123', '"Angry Badger"'], ['"dead"', '"Parrot"', '321', '987']] The target result would be: [['foo', 'Spam', '123', 'Angry Badger...

 
4:26 PM
Teresa Dietrich on March 10, 2021
Teresa Dietrich leads Product, Community, and Engineering at Stack Overflow. She will be posting quarterly updates laying out key accomplishments and future goals.
 
4:44 PM
Monking
 
@skiwi cabbage!
 
Since this is working code that you're just trying to optimize, this question may be better suited for codereview.stackexchange.comSean 49 secs ago
 
5:00 PM
I’m voting to close this question because it's been cross-posted to codereview.stackexchange.com/questions/256976/…IvanSanchez 43 secs ago
 
0
Q: Speed up javascript code to convert csv to geojson

ale19I'm using a script that converts a CSV file into GeoJSON in order to display it on a map. You can see it for yourself here. The CSV has about four thousand rows. It's quite slow. I'm wondering what is slowing it down and how I can speed it up. function latLonColumnsToNumbers(data, latName, lonNam...

0
Q: What is the correct practice of Django viewset?

Shivendra Pratap KushwahaI am using viewsets in Django rest framework. I have seen many examples that serializer is being used every where. What if I don't want to use serializer and return simple response data? I am not getting any error doing so, but is it a good practice? Below is just an example of how I am using it....

 
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 18 secs ago
If this is working properly, your question might be more appropriate (correctly framed) for Code Review. — chrylis -cautiouslyoptimistic- 31 secs ago
@chrylis-cautiouslyoptimistic- when suggesting users post on CR it would be great if there was also a suggestion like "Please read the relevant help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?". In the current form the code above would likely be closed as off-topic because it is missing context. — Sᴀᴍ Onᴇᴌᴀ 31 secs ago
 
 
1 hour later…
6:52 PM
0
Q: max() without arithmetics or so

Алексей Неудачинso i have a plan to make something to solve this stuff: you have 7 chips that are on the run. each has some cargo loaded. And also there's where record on each.Latter could be either track means running(or gone offroad) or tobeauty means it reaches its finish. Where .cargo = -1 means it's gone...

 
7:18 PM
0
Q: DRY input-checking in python

tommy2111111111Let's say I want to write a super simple Python program to ask a user for their personal information and list it back out in a "pretty" format. def get_info(): first = input("enter your first name: ") while not first.isalpha(): first = input("enter your first name: ") last = ...

 
7:30 PM
If your code works, this question should be in Code Review. — M-Chen-3 53 secs ago
 
7:44 PM
I would not let this through if I saw this without unit tests in a code review... and if there were unit tests I'd still berate them for wasting time on this unless we're in some crazy environment were loading any libraries is out of questions... — blub 1 min ago
Seems more like a question for Code Review codereview.stackexchange.comNikki9696 18 secs ago
 
8:13 PM
it is hard to give you an answer since there is not a specific question. However you should probably forget the index stuff and just store your objects as is. Also you don't seem to need an order so you may consider a Set instead of an array. Lastly you may want to avoid the double reference (parent/array) if possible. Ease your life before performance. indeed codereview may be more suited — grodzi 18 secs ago
 
 
1 hour later…
9:26 PM
0
Q: Java UDP port knocking authentication. Many clients at the same time

Student123Student project of mine i got 4/5 points but i suspect theres a lot of weird stuff in there. I never had a chance to hear my teacher feedback about it and it bothers me so i figured out somebody could take a glance at it please and provide some feedback. Quick documentation https://pastebin.com/9...

 
9:44 PM
This works, ergo it's a question for Code Review, not Stack OverflowTangentially Perpendicular 51 secs ago
Try asking on Code Review. — Justin 28 secs ago
 
 
2 hours later…
11:34 PM
0
Q: Random walk generator - looking for optimizations (Python)

VojtaI just started learning Python and this is the first code I wrote. It's a Random Walk generator. I think I got it to work pretty well but I'm also sure there are more effective and less clunky ways to do this. Could you give me some tips on what to change to make the code shorter/more optimized a...

 

« first day (2867 days earlier)      last day (1158 days later) »