Is each bracket matched?
code-golfdecision-problembalanced-string
Given a string consisting only of the characters ()[]{}, determine if each type of bracket is matched--that is, every ( corresponds to one later ), every [ corresponds to one later ], and every { corresponds to one later } (and vic...
CMC: Generate 28000 programs in the same language, which output all integers in the range 1 to 28000. Your score is the size of the initial program times 28000 plus the size of its output divided by four.
The point is that you can't write 28000 programs, you have to try to find the optimizations that are worth your time and worth the added byte count for the initial program
Heavily based on this closed challenge.
Codidact post, Sandbox
Description
A Sumac sequence starts with two non-zero integers \$t_1\$ and \$t_2.\$
The next term, \$t_3 = t_1 - t_2\$
More generally, \$t_n = t_{n-2} - t_{n-1}\$
The sequence ends when \$t_n ≤ 0\$. All values in the sequence must be...
Efficient table-lookup computation
Note: as you can probably tell, this is a simpler variation; however the poster of the other sandbox post has not been visiting the site for a while.
atomic-code-golf multiple-winning-criteria (<-- ?)
The problem: compute the day of the week from a MM-DD represe...
You are to write a program which generates random integers between \$0\$ and \$99\$ inclusive, outputting each integer in turn, until \$0\$ is generated. You may choose which single-order random distribution (uniform, binomial, Poisson etc.) you use so long as each integer has a non-zero chance o...
@Razetime I'm not sure exactly how APL's ? command works, but by my understanding, doesn't it (in your answer), choose 100 integers with replacement from the set 0...99?
Because if it chooses with replacement, then x has a 1/(100^100) chance of never containing 0
Count strictly overlapping substrings code-golf string
Given two strings a and b, count how many times b occurs as a substring in a, but only when it overlaps with another instance of b.
Test cases
input a input b output
trololololol trol 0
trololololol ol 0
trololololol...
Is it a positive integer? code-golf integer decision-problem
Amazingly, we don't have a challenge this simple yet (as far as I can tell, at least; the closest I've found is Output the sign).
Given a non-zero integer, determine whether it is positive or negative.
The reason for not handling zero i...
Could anyone help me salvage this question of mine?
xigoi pointed out that the specification is unclear, and I edited it, but I'm not sure it's clear enough now. Another user pointed out that numbers could still be held as valid output, although I'm not quite sure what they meant.
Counting set bits in a byte
Here is a bite-sized problem I ran in to when trying to implement Conway's game of life on a microcontroller, and was trying to count the amount of neighbours: How can you check how many bits are set in a byte?
Challenge
Given one byte of input data and an integer N be...
I don't mean a quine that outputs its own binary.
My question is the following:
Could you write a quine such that if you compile it and read the compiled file in binary format you'll get the same result as if you read the original file?
For example, a java quine with the same binary as its jar.
Introduction
A quine is a program that outputs its own source code. For example, a well-known Python quine is _="_=%r;print(_%%_,end='')";print(_%_,end=''). Running it outputs _="_=%r;print(_%%_,end='')";print(_%_,end=''), therefore it is a valid quine. An error quine is similar to a regular quin...
your task is to write a program that receives an path to an image file, and outputs some text based on the image.
here is an example:
image:
Output:
▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓▓▓
▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓
▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓
▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓
▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓
▓▓▒▒▒▒▒...
@Anush Something like [word for word in mylist if len(word) == LENGTH and all(x not in word for x in "CP.-")]?
filter(lambda word: len(word) == LENGTH and all(x not in word for x in "CP.-"), mylist) is about the same length but needs to be converted to a list later.
I can just imagine a mod on some site noticing an old post of theirs, mod flagging it, then going to the mod flag page and writing a comment to themself :p
Fun fact: There are only 2 Participation badges I don't have (and can get) (Epic and Legendary). For the other categories it's 4 (Question badges), 12 (Answer badges), 8 (Moderation badges) and 3 (Other badges)
CMQ: What are your numbers for ^, in the order Question, Answer, Participation, Moderation, Other? Here's the badge page
Here Lies Thy Info...
The Input
An A-Z character that is lowercase or uppercase
Example of The Desired Output
a=>a à á â ä æ ã å ā
l=>l ł
I Am Still Confused?
The input will be an a-z or A-Z letter. The output should be all or at least most of the accented versions of the input. If there is not ...
The Public Platform team would like to announce another release in a series of planned work for the Review queues. This release focuses on refreshing the queue user interface in preparation for further improvements to the user experience. Starting today, we will roll out these changes in three ph...
> Review count - We’ve removed the badge progress bar in lieu of keeping track of how many tasks you can complete in a queue (don’t worry, the badge bar isn’t gone).
What? No, I liked that
On the other hand:
> There is more incentive to continue reviewing. The Steward badge can now be earned multiple times for every 1,000 reviews in each queue. If you have already completed 2,000 or more reviews, we will backfill any additional Steward badges that you have already earned. You can expect to see them accrue over the next few days.
@cairdcoinheringaahing You get the honor of upvoting me, of course. In fact, I will also grant you the honor of awarding me a 500 rep bounty on my next answer.
@RedwolfPrograms Here is a room for discussion on the bounties, so when the voting is finished, I'll invite the winners and the offerers into the room and we can discuss who gives what to what
@Lyxal Are Surfaces worth it? When it was time to replace my laptop, I thought of buying one, but it seemed too expensive, and I figured Dell or another well-established brand would be better. I'm starting to think I might have been wrong, though. Would you recommend buying a Surface (one of the ones that are three-fourths laptop and one-fourth tablet)?
I considered buying one of the surface laptops but I got an HP envy instead. The irony of trying to run Linux on a Microsoft laptop would have been too much.
Hey, anyone down for some shady shiz? I'm at 190 rep today, and it'd be hella chill if someone upvoted any of my posts. Of course, I'm not asking for upvotes, instead I'm suggesting that if someone upvotes a post of mine, I may be inclined to upvote a post of theirs :P
Also, I just finished watching The Devil Wears Prada and my god, Anne Hathaway's character is stupid. Take the super good job and be a savage bitch, duh!
@cairdcoinheringaahing did you not listen? I said the best way to get business done is with monopoly money! It's untraceable and actually can have value
My guess is that, since an interpreted language should operate on its own simulated stack AND it should fail gracefully whenever possible, setting a limit like that is a valid and sensible option
If it doesn't, what an end user gets is a segfault