Jelly, 1 byte
¬
This uses base k+2, in which case there's a single 0 iff i is 0. It takes two arguments, but applies the logical NOT to only the first one.
If we don't want to cheat:
rD¬SS
Uses decimal.
dyadic link:
r inclusive range
D Convert all to dec...
Brainfuck
Uses: -.
Does not use: !"%&')+,0123456789<=>ABCDEFGHIJKLNOPRSTWXYZ]`acefghjlnoprstux{| from CJam.
Thanks to SuperJedi
----------------------------------------------------------------------------------------------------------------------------------------------------------------------...
I mean, technically, I could do !$args[0] in PowerShell and follow the same k+2 base method ... but since PowerShell doesn't really handle arbitrary bases, I'll stick with the spirit of the language.
Convertible bases in PowerShell using built-ins -- 2, 8, 10, 16. And Base64-string with a little trickery. You want something else? Write it yourself, n00b.
I need a char that is disallowed. I was commenting that I was sad.
Anonymous
@ThomasKwa It's beyond trivial; it's exploiting a loophole in an uninteresting way. It may be valid, but that doesn't mean people aren't going to downvote it.
@AlexA. It's not explicitly allowed. It's implicitly allowed by allowing users to choose their base. It's valid, but it's cheap; hence the downvotes. The question would be massively better if the base was required to be input (i.e. if the bonus was a requirement), and this is one of the few cases where I'd support that edit, despite invalidating answers.
Suppose my inputs are 3 and 14 (written here in base 10). In base k+2 (16) they are written as 3 and E. So, the only time that there would be any zeros is iff the first digit i is a zero.
This isn't very widely known, but what we call the Fibonacci sequence, AKA
1, 1, 2, 3, 5, 8, 13, 21, 34...
is actually called the Duonacci sequence. This is because to get the next number, you sum the previous 2 numbers. There is also the Tribonacci sequence,
1, 1, 1, 3, 5, 9, 17, 31, 57, 105...
Write a program or function that takes in two integers that represent the X and Y coordinates of a point on a Cartesian plane.
The input may come in any reasonable format as long as the X value comes before the Y. For example, 1 -2, (1,-2), [1, -2], or 1\n-2 would all be fine for X = 1, Y = -2.
...
Patch the Image
graphical-outputpopularity-contestimage-processing
In a popular image editing software there is a feature, that patches a selected area of an image, based on the information outside of that patch. And it does a quite good job, considering it is just a program. As a human, you ca...
b) "or any other preferred format" seems a bit loose. I can't think of a loophole of the top of my head, but I guess there are some.
@flawr Usually an inpainter takes two value: The size of the clone stamp which is used to fill in the area "block size"; The radius of the scan area around the "patch".
Well the program should basically work on it's own. I think you can easily deduce the needed "block size" and the size of the clone stap by looking at the size of the masked area.
Patch the Image
graphical-outputpopularity-contestimage-processing
In a popular image editing software there is a feature, that patches (The term used in image processing is inpainting as @mınxomaτ pointed out.) a selected area of an image, based on the information outside of that patch. And it...
The confused twister code-golf quine
The basic idea is to write a program that twists itself, and the twisted version untwists itself.
Sandbox notes
This is just here to get a feel on how this would be received.
@flawr Yeah, it enters an infinite loop looking for more color, which is kind of futile on a b/w checkerboard and keeps allocating memory until it dies.
@flawr It's hardly ever (never?) used in a practical setting but since it technically is the singular form of data it's useful for when you want to be pedantic (but never useful for anything else...)
It's like correcting someone for saying "one dice"
Perl was likely the first language to use it. Groovy is another language that supports it. Basically instead of returning 1 (true) or 0 (false) depending on whether the arguments are equal or unequal, the spaceship operator will return 1, 0, or −1 depending on the value of the left argument relat...