@flawr I sold people tickets for a school raffle and "forgot" to give the money and tickets to the school. Basically, I scammed people at the local cafe for about 20 bucks
Anonymous
00:20
@Quintec My lawyer has advised me not to repeat my joke
Write a function that takes input as an integer, or decimal number and outputs an array containing the integer or if a decimal number includes the last integer and decimal separator portion of input set as a single element with remaining integer and decimal portions of input set as adjacent eleme...
@Adám Am not concerned with "down" votes. Am trying to break down an integer or decimal number into into lowest integral parts, with the fractional part preserved at that place in the output array - without using string methods. If you have further suggestions, kindly post them here and will edit the question.
:|
why not just put a 10 where the decimal is
this guy is disqualifying the majority of statically typed languages
@JoKing In fact: Needs more "downvote". If only to demonstrate how the "community" you refer to expresses itself. Would prefer an answer to the question. That is not presumably forthcoming
@JoKing While we are "expanding" and "collapsing" "time" in constant time, we want to graph each decimal digits to formulate logic; machine learning, if you will.
@JoKing If we start a timer at a 123 we will eventually get to 321at b. If we have x total solutions we know are in that range, we can change the frequency of the timer, multiplied by several variables, in parallel, to "find" all solutions in constant time, without comparisions. We have several variables; we are charting a fuzzy logic map where we can use decimals to get "close" to the actual solution. The closest that can compare to is compound interest with additions
The challenge is completely screwed and unrecoverable by now, but still... I'm consumed by the need to know what could have been. Or at least getting my quota of internet arguing for the day
Split and recombine a number
This code-golf challenge has two related parts. Your task is to write two functions/programs as per the below specifications. You may share code across your submissions, the submissions may call one another, and you may even submit a single submission which handles b...
Is this quadrilateral tangential? code-golf geometry decision-problem math
Related: Is this quadrilateral cyclic?
Background
A tangential quadrilateral is a quadrilateral which has an incircle:
http://mathworld.wolfram.com/images/eps-gif/TangentialQuadrilateral_1000.gif
Examples include any ...
I discovered Manjaro Linux today. It's based on Arch in that you get access to the AUR, get a rolling release, and the latest version of everything, but not like Arch in that it comes with a DE and drivers preinstalled.
Task
Given the names, the amount they had to pay n and the amount they actually paidk, find out who owes whom how much.
Rules
Input and output can be in any convenient format.
n>0 and k>=0 and both will be integers.
There will be at least 2 inputs.
Names can be a string of any length, will ...
Octonion multiplication code-golf math complex-numbers
Background
Octonion is a further extension to the quaternion number system. An octonion can be written as
$$ x = x_0 e_0 + x_1 e_1 + x_2 e_2 + x_3 e_3 + x_4 e_4 + x_5 e_5 + x_6 e_6 + x_7 e_7 $$
where \$ x_i \$ are real numbers and \$ e_i ...
A hill number is a number that has the same digit in the first & the last, but that's not all. In a hill number has the first digits are strictly increasing, and the last digits are strictly decreasing. The largest digit can be repeated.
Here is an example of a hill number:
12377731 | 1237... ...
Conjugation in Real Life
code-golf string
In @Adám's Dyalog APL Extended, the ⍢ (under) operator means conjugation: apply one function, then a second function, then the inverse of the first. It's fun to think of real-life actions in terms of conjugation:
A problem is transformed by g into ...
@dzaima When using reflect in Canvas it also transforms dots (".") to single quotes ("'"). What would be the easiest way to leave dots as is, but reflect any other character (like slashes) by default?
Hmm ok. So you haven't had any answer in the past where you didn't want to reflect the single quotes? Or you simply refrained from posting in those challenges due to the restriction?
@dzaima Yeah, I saw that replace in the docs. But as you said, it unfortunately doesn't work for canvas objects :( I guess there also isn't a toString to convert the canvas object to a string, and then apply the replace?
@KevinCruijssen probably. I've also thought about having a way to mark what's user input so it could do fancy reflections while keeping portions intact but that'd be way too complicated to add on and would have to wait for canvas 2 or whatever
@KevinCruijssen Canvas automatically converts a multiline string to a canvas object, there's no concept of a multiline string in canvas
hmm how should ╋ work if the replacement is of different shape than the thing to replace
Probably yeah ;) You could add a note in the docs that it only works for substrings / characters of the same length when replacing in the canvas object 'string'. If anyone tried to use a different length replace, just throw an error ;)
Ah well, in any case, it isn't possible now, so there goes my 1-byter for the challenge. ;p
Not sure about all the edge cases. Never posted an answer in Canvas, but I've seen plenty from you. And changing the background would be a nice option I guess. :)
I have found out the 'initial' arrangement as given in the answer. However, I can't solve the 'rearrangement'.
I have started with A: Block no. 5 remains at original place. Thus, A stays at original place.
Then I go to B: Swap positions with block no. 5. So A and B swap positions.
Then I com...
Title may be hard to understand, so an example:
If a language claim to have a busy beaver function BB:unsigned int -> double, and works fine(always return Infinity when input is a bit larger and output exceed 1e+310), can we use it as one?
You have been given the charge to calculate the current balance as of the day that you perform the calculation for 330,000 individuals who worked for an average of 30 years spanning 300 years where the initial principal was 1 with an addition of 1 per day and interest rate set at 3%.
You initia...
mAkE a StRiNg EpIc code-golf string
Now that the meme is mostly dead, we can have this challenge. It's pretty simple: take a string (either as stdin or a parameter to a function), and change the case to alternate capital and lowercase letters, starting with lowercase. Examples:
"Hello, World!" ->...
The challenge:
Print Hello, world!. Shortest executable wins.
Criteria:
Your program must compile into an ELF x86-64 executable that prints Hello, world! to the screen. The executable must return 0 upon success, and it must run without error.
Provide the source code, as well as the commands ...
Sixteen piles of cheese are put on a 4x4 square. They're labeled from \$1\$ to \$16\$. The smallest pile is \$1\$ and the biggest one is \$16\$.
The Hungry Mouse is so hungry that it always goes straight to the biggest pile (i.e. \$16\$) and eats it right away.
After that, it goes to the bigges...