@Steffan bro smth kinda similar to that happened to one of my other challenges, no one answers it for months, then ajax comes in with like a 900 bytes python answer out of nowhere
Background and Rules
There is a variant of chess called atomic chess, which follows essentially the same rules as normal chess, except that pieces explodes other pieces around them when captured. In addition to checkmate, you can also win the game by blowing up the king.
When a piece captures an...
@AidenChow No, it's just a reference to an answer I once wrote that timed out for matrices larger than a 2x2 despite the fact that it's easy to make an efficient algorithm that works for much larger matrices (which would have been longer)
it also uses the fact that in desmos, if the upper summation bound is lower than the lower bound, then the summation defaults to 0, which helps deal with 1
Functional(), 139 bytes
0,1,=,:,$,&,<,>,$(W,& a(>(a(:(Z,&()(W()0)))),W))0 Z Z()1()1 W()W()>()W()>()> >()>()W()1()0()0()Z W 1()1()1()> >()> Z W 1()W()>()Z W()1()0 Z
Try it online!
Print the most uncommon character
code-golf self-referential
Your task is to write a full program that prints the character(s)* that appears in your code the least. For example, if my code was AAAABBBBCCCDDD, then the program should print CD or DC.
Rules
All printed characters* must appear at le...
Gigabyte makes their motherboard info pages scroll one page at a time and it's so annoying
Like, scrolling is built-in to browsers for a reason. It's an established mental model and it needs to be performant. Just because you are able to override it does not mean that your preferred handling of scrolling is automatically better than the one everyone else in the world is already used to.
@Ginger Oh it's the same thing Gigabyte does
Except that Gigabyte has a header covering up part of the content too
I do gotta say though, I'm really spoiled by Chrome OS's lack of a physical scrollbar, a lot of my projects involving HTML probably look terrible on devices with them
Since I completely forget scrollbars exist 99.9% of the time
It frustrates me that when you say "base 16", the 16 is in base 10. We need a base neutral way of writing down numbers when favoring a specific base would be inappropriate.
How it works
We define <n> to be the nth prime. So <1>=2, <2>=3, <3>=5. Note that every positive integer can be uniquely rep...
LDQ: How useful would a "not" quantifier be in regular expressions? It would match any string the same length as what's being NOT'd, but which does not match it. E.g., 1([a-z]{2})! would match 123, 1a8, or 12c, but not 1ab or 1 or 1000
Part of why I'm considering this is that, for complicated reasons, I can't use \D/\W/\S for the inverted versions of \d/\w/\s in my regexlike, and for similar reasons character classes with [] can't use the ^ syntax to invert them
Possible solution: using Adám's proposed syntax of (!pattern), and making it so that you can put a string in between the ( and ! that the NOT'd part must match
E.g., (\w+!daniel) matches any \w+ that isn't daniel
@Adám I wonder if allowing chaining like with | would be useful at all...it would allow for an AND operator (![]!), which is pretty useless but kind of cool
@Adám Yeah, special casing the empty string feels kind of wrong, but at the same time, "empty string that is not [thing]" is never going to be meaningful anyway since the empty string is only ever one thing
Since !thing|other thing would probably be pretty common
@Adám I think it's worth it for the readability. This is a superset of regex in a lot of ways anyway, so I'm already making a lot of changes to what characters are and aren't inert
So, what I am trying to do is convert a float to a bytearray but I keep on receiving both no input, and EXTREME slowing/freezing of my computer.
My code is
import struct
def float_to_hex(f):
return hex(struct.unpack('<I', struct.pack('<f', f))[0])
value = 5.1 #example value
...
value = byt...
UX question: where should I put things like find, replace, etc in Klein? in order for them to be in the menu strip like in most IDEs the menu strip would have to be able to change depending on which workspace is selected and I don't like that idea very much
because those operations are workspace-specific
perhaps I could put them in a dedicated "Workspace" menu in the menu strip...
it does, but I don't want to put it there because:
> in order for them to be in the menu strip like in most IDEs the menu strip would have to be able to change depending on which workspace is selected and I don't like that idea very much
The whole point of having them broken down into file/edit/view/... is that you can just remove the edit one for non-editable stuff
Will you have workspaces other than welcome and text? E.g., photo editing? If so, you're really going to want the ability to add more menus for those modes
me and the [Person]s waiting for poetry to finish whatever the hell it's doing
okay so
for some reason
whenever Klein invokes poetry via subprocess, it acts as though the virtualenvs.options.system-site-packages option is always true, ignoring the actual config settings
it's supposed to be true for Klein only
and running poetry config --list from Klein shows that it's false???