Corrupting A Binary File By Interpreting It As Text
code-golf file
Using FTP's ASCII mode to transfer binary files is a bad idea. It is likely to corrupt your data. Badly. Let's simulate this corruption!
Your task is to write a program which takes a filename as input and outputs the corrupte...
HOURS trying to figure out why my Perlin noise wasn't working. I was using the coordinates within the unit cube for the dot product instead of the true coordinates!
Bleh, script had an old function that wasn't being used any more, script worked on my win10 box but crashed when ran on win7. Comment out the unused function and now it works
Given an input string consisting of only letters, return the step-size that results in the minimum amount of steps that are needed to visit all the letters in order over a wrapping alphabet, starting at any letter.
For example, take the word, dog. If we use a step-size of 1, we end up with:
def...
I just got the Silencium hat? ask a question that gets no answers within a week of being posted. Do they take it away from me if my question gets answered?
Challenge:
Given two inputs, x and y, round x's second to last digit, then round it's new second to last digit again and again until it has y number of unrounded digits left. (the decimal point does not count as a digit)
Input & Output
Input can be a combination of strings and integers, e.g....
Given a positive integer input n seconds, output the time in human readable format.
The time will be considered from 00:00:00, 1st January, 1 A.D.
Leap years must be taken into account.
Assume that the gregorian calendar was followed since the beginning.
(Gregorian Calendar: Every year that i...
There are some iron particles on a board. We pass a current carrying wire through that board and the particles form circles. Show these circles if input given is the position of the wire.
Consider the board to be a grid of size 7x7 (fixed)
No extra white spaces are allowed.
Input can be 0-inde...
There is a lab in my extended family that will even eat panetone when it is still in the box and bag (the panetone, not the dog) if you look away.
And its only purpose seems to be napping in some place where it is most inconvenient for any other living being in its proximity. E.g. on the tv remote or right on the doorstep into the kitchen.
Question: Print out all the coordinates of a NxN grid. Preferably in C, however other languages also accepted
Example Output for a 3x3 grid:
0,0
1,0
2,0
0,1
1,1
2,1
0,2
1,2
2,2
For a computer vision app I want to do a mapping of an image, in such a way that every pixel fit hilbert curve, instead of conventional layout, eg reorder pixels indices as follows:
0 1 2 3 > 0 1 E F
4 5 6 7 3 2 D C
8 9 A B 4 7 8 B
C D E F 5 6 9 A
So task could be as follows:
Given squ...
This challenge is about printing a series of growing ASCII-art arrows. I'll describe the pattern in words, but it might be easier to look at what the start of this series looks like:
>
<
->
<-
-->
<--
--->
<---
---->
<----
----->
<-----
------>
<------
...
An arrow with length n contains an ar...
@flawr I'm actually planning on writing a script to repair that kind of thing. All the text files I need are still on disk; I just need to recreate the database entries.
Prime Steganography
code-golf steganography string prime
Alice and Bob have devised a steganography encryption method where they encode the letters of their message (the "secret message") into the letters in the prime positions of the larger message (the "carrier message"). Your job is to cr...
Most images here don't work, since i.stack.imgur seems to be blocked. I just thought it was humorous that this (and only this) hat worked, and seems quite oversized.
the reason i wondered about the update was that web whatsapp suddenly thought i have chrome that's not 36+ (well it is chromium). that doesn't seem to have fixed either :|
@AdmBorkBork When you can convince our internal webapp devs to upgrade their crap so it works on edge, we can talk. Until then, I can't even use it enough to find out if it's decent
@Mego Normally I'd agree with you, but these aren't exactly "modern features" I'm talking about. It'd be more right to say it doesn't support a lot of legacy features in this case
Anonymous
@Geobits Modern as in "invented since 2015 when Edge was first released" :P
Oh, yeah. I'm more on about "deprecated before edge was first released" :P
I work for the state, so modern has no meaning here
Anonymous
8:24 PM
The other day, I had to explain to a customer why Edge wasn't going to work. It wasn't even anything complicated: just reading data from a customized canvas. But Edge failed at that.
Background
OEIS sequence A272573 describes a spiral on a hexagonal grid as follows:
Start a spiral of numbers on a hexagonal tiling, with the initial hexagon as a(1) = 1. a(n) is the smallest positive integer not equal to or previously adjacent to its neighbors.
The sequence begins
1, 2, ...
A post without sufficient detail recently posited an interesting game:
2 children sit in front of an array of candy. Each piece of candy is numbered 1 to x, with x being the total amount of candy present. There is exactly 1 occurrence of each number.
The goal of the game is for the children to ...
For those who can't see deleted posts: I deleted the memes question. However, I didn't act unilaterally; this decision was made by the moderation team.
While it wasn't the best fit for a Meta question, it was locked and doing no harm to the community.
Unfortunately, we disagree with the sec...
Don't blame me hard on the issue I have no clue how to solve, I'm new to this area, but I wanna know how one can build an autocomplete program, which would suggest a number of certain words from a database (say a dictionary) in any text field and add new ones while typing them.
Where should I sta...
@JonathanAllan actually, my Jelly answer would've resulted in 2 without the « :D
It looks like x=1 must be handled, could you confirm (since it's an edge case which should result in 1 rather than 0 or infinite loop as a couple of answers do) — Jonathan Allan12 mins ago
that moment when I'm working on an answer in nasm, and I keep getting a segfault, then I realise the program is actually working, it just segfaults after outputting the answer
Stegonography: Hide A Stegosaurus with Steganography!
cops-and-robbers steganography ascii-art
Cops
Devise a method for hiding this ASCII stegosaurus in any BMP image.
. .
/ `. .' "
.---. < > < > .---.
...
Stack Exchange is not an issue tracker
I haven't voted on this since it was posted, because I wasn't really sure how I feel about it, but now that the Pyth question has been posted, I don't think PPCG is the right place for posts like this.
Posting a question along the lines of "I want to make ...