Top new questions this week:
|
Intro
A couple of weeks ago I finished a Python implementation of a multithreaded port checker and I wasn't quite happy with the result I've got (speed). I needed it to be faster, so I've built ...
|
I wrote a simple Rock, Paper Scissors game in Python for class. As a beginner, I would like some input as to how I could abstract or make my code smoother. I feel like the repeated use of if or elif ...
|
The MSP Tech Club puts on an annual CTF, available here. I've worked on a solution but was wondering if there's a better way to write it or if I have any particular bad habits showing themselves?
The ...
|
I have my code which makes a web service call based on a type of request:
public class Client
{
IRequest request;
public Client(string requestType)
{
request = new ...
|
I'm making a rectangular prism function who's results look like this:
I think I can reduce the amount of code I'm using by somehow using np.meshgrid more effectively and using a Python iterator, ...
|
I have vba code that loops through a large number of records and deletes rows based on criteria. The issue at hand is that it takes far too long to run. I have never actually let it finish because it ...
|
Reversing an array in Python without using a built-in function:
def reverse(alist):
end = len(alist)-1
limit = int(end/2) + 1
for i in range(limit):
alist[i],alist[end] = ...
|
Greatest hits from previous weeks:
|
In a Win Form I'm doing initial validation in the Form. So before saving data, I want to validate whether all the required fields are filled (Text Boxes) by the user. There are about 18 such Text ...
|
I'm generating all combinations of an array, so for instance, ["a", "b", "c", "d"] will generate:
[
"a", "b", "ab", "c", "ac",
"bc", "abc", "d", "ad", "bd",
"abd", "cd", ...
|
Can you answer these?
|
I have built a shell function aimed to perform the following:
Given a string as first argument, perform safe expansions (i.e. those that cannot cause arbitrary code execution and only produce string ...
|
This is very similar to other code I've posted, however this is designed for very large csv files, for example 35gb.
The files typically look like this:
...
|
What this code is basically supposed to do is find how many even divisors a number has.
For example the number 100 has the divisors 1, 2, 4, 5, 10, 20, 25, 50, 100 of which 6 (2, 4, 10, 20, 50 and ...
|