« first day (3734 days earlier)      last day (578 days later) » 

00:02
If your code runs without error and produces the correct result then you'll get better feedback on performance, style, technique if you repost your question over at the Code Review StackExchange. — Woodford 30 secs ago
@Kaz Been a little while. You still over seas?
REFRESH! There are 7273 unanswered questions (90.5844 answered)
01:05
0
Q: USACO Arithmetic Progression

Michael GrangerThe problem statement: An arithmetic progression is a sequence of the form a, a+b, a+2b, ..., a+nb where n=0, 1, 2, 3, ... . For this problem, a is a non-negative integer and b is a positive integer. Write a program that finds all arithmetic progressions of length n in the set S of bisquares. The...

Kaz
Kaz
01:32
@Phroggie Depends what overseas is to you. Still in the UK for the time being. But just started a remote contracting gig for a US startup. And most companies have dropped the vaccine requirements at this point. So I’ll probably be moving somewhere else by the end of the year.
01:51
Oh sorry Phroggie is me
@Kaz Ah! I must have misremembered, I thought you were going overseas a year or so ago. Contracting for a US start up sounds nice. Got some nice projects to work on?
Kaz
Kaz
02:20
@Phroggie Oh yes. It reminds me of where my old startup was right before they started making serious money. Excepted with 3x the revenue per employee, and I’m coming in as an experienced consultant instead of an analyst.
So I’m very optimistic about where it’s going.
03:11
0
Q: Code to compare strategies of Domino play. (Have I implemented the Strategy Pattern by accident ?)

LozmindaPreamble: I'm my Nan's full time carer and we play dominoes. This got me thinking about domino strategy and code. Dominoes is very largely deterministic, the only time any choice is to be made is when a player has a choice of more than one domino to play. So here's some python code to test out di...

 
1 hour later…
04:39
Monking
04:55
 
3 hours later…
07:42
Monking
@Kaz More Excel? ;-)
0
Q: Formatting line breaks according to PEP8

half of a glazierWhat's best practice to format line breaks in this code according to PEP8? one_very_long_return_value, another_very_long_one, and_a_third_value = my_very_long_function_name(argument_1, argument_2, argument_3) If I break on the function opening parenthesis, the return values are still too long to...

 
2 hours later…
09:31
0
Q: A recursive_depth Function Implementation with Target Type Parameter in C++

JimmyHuThis is a follow-up question for A recursive_depth function for calculating depth of nested types implementation in C++. I am rethinking about the proposed recursive_depth function. When it comes to the type std::string, the output is always 1 because the base type is char. However, why it is 1, ...

Kaz
Kaz
@Mast-onstrike It’s where I do my best work. And with all the awesome functions they’ve added the last 5 years, it’s stronger and more versatile than ever.
To me, Dynamic Array formulas are mind blowing. To everyone else I show them to, they’re just pure magic.
 
3 hours later…
12:34
If you are asking more about how to improve this code than how to fix a problem with it consider posting on Code Review. — ryyker 52 secs ago
13:19
0
Q: Rest API design with Spring Boot

Dimitar AngelovIn a recruitment interview I got this small projet to do at home: rest API written in Java using Spring Boot. As I didn't hear back from the company I wanted to have feedback from review. I am a rest api/spring boot beginner. Requirements: Design a rest API managing horse races and their particpa...

 
2 hours later…
15:02
@JérômeRichard: In a well-optimized (C or asm) SoE for sizes that aren't too huge, a significant amount of time is spent in the first few strides, crossing out 3s, 5s, 7s, etc., since N/3 is much larger than N/37. But maybe I'm just remembering some tuning for medium-size problems where the array fits in L2 or L3 cache, like I commented about in Sieve of Eratosthenes in x86 assembly and the two other godbolt links in a later comment. For strides much larger than 512, you're not touching every cache line which is interesting. — Peter Cordes 28 secs ago
@Kaz I'm reading up on them now, xlookup and xmatch look promising.
I've gotten so used to working around the limitations of Excel with Python that I never learned about dynamic arrays before.
I knew about array formulas, but that's different.
Kaz
Kaz
15:43
Those are nice. The really cool stuff is things like:
Lambda() (Define custom functions without VBA)
IsOmitted() (Allows you to define behaviours for optional inputs)
Let() (Perform multi-step calculations using named variables)
Map()
Reduce()
Scan()
Sort()
Take()
Filter()
Unique()
VStack/HStack
Chooserows/Choosecols
Excel is now officially Turing-Complete :)
Kaz
Kaz
Basically, you can now manipulate arrays of arbitrary size with a single formula in one cell. And you can now create custom named native functions with their own variables names.
Isn't the question more suitable to codereview.stackexchange.com273K 57 secs ago
@273K: No, this is a question about a suspected bug, codereview is only for code believed to be fully working — Ben Voigt 19 secs ago
Kaz
Kaz
At this point, I think the only big thing it still can’t do is loops.
16:07
People have tried to find ways around that for a bit.
46
Q: How to loop in excel without VBA or macros?

JeffIs it possible to iterate (loop) a group of rows in Excel without VBA or macros installed? A web search didn't yield anything helpful. =IF('testsheet'!$C$1 <= 99,'testsheet'!$A$1,"") & IF('testsheet'!$C$2 <= 99, 'testsheet'!$A$2,"") & IF('testsheet'!$C$3 <= 99, 'testsheet'!$A$3,"") & ... and so ...

But that doesn't look very promising.
I mean, sure, you can make something that works roughly like it. But unless you're really desperate to make a workbook work without VBA yet have loops, I wouldn't attempt it.
Monking
Sacrifice a sheet per calculation and you can get a lot done. INDEX, various lookups, combined with if statements...
Hi @skiwi
0
Q: Mouse and keyboard event system

Tristen WoodruffI wrote a mouse and keyboard event system in C++, using the GLFW library to get mouse and keyboard states. I've been working on a 3D game engine of my own for a long time (about 9 months) and wanted to have a way to handle input independent of having to intertwine GLFW calls randomly in my code (...

 
1 hour later…
17:31
0
Q: Hunting for the 100,001st prime in Rust

Tom HoskerMost of my programming experience is in Python, but my first language was C, and I was intrigued by the combination which Rust offers: a streamlined syntax and no manual memory management, but with all the performance possibilities that a strongly typed, low-level language has to offer. To that e...

 
1 hour later…
18:47
-2
Q: Where's the common practice to organize your code? | Code architecture for dummies

xLisiqI'm relatively experienced in C# and Unity. I'd say I know enough to turn any of my ideas into life simply by writing methods. But my problem is: that I'm not sure whether I get OOP concepts correctly. I'm just not sure whether I'm doing it right or wrong. Imagine you want to add enemies to the g...

 
1 hour later…
20:03
0
Q: Army Supply Problem | Python coding error | unexpected output

Math-Learnerdef gameWithCells(n, m): if (n%2 == 0 & m%2 == 0): return (n//2)*(m//2) elif (n%2 == 0 & m%2 ==1): return (n//2)*((m+1)//2) elif (n%2 == 1 & m%2 == 0): return ((n+1)//2)*(m//2) else: return ((n+1)//2)*((m+1)//2) So when I call the function with...

 
2 hours later…
22:10
0
Q: my results keep giving some errors, idk where the mistakes at

Shin Kurtmy result keeps displaying wrong answers, idk wheeres the mistakes at. i tried fixing it for few hours and still cant find any solution. `<div class="game-info"> <p>You picked: <span id="player-move"></span></p> <p>Computer picked: <span id="computer-move"></span></p> <p>R...


« first day (3734 days earlier)      last day (578 days later) »