code-golf
{{Meta: a double enclosure {{...}} means a meta comment.}}
The cosmic number!
There is an old comic strip that relates to this challenge. I've written a blog post on it, as well.
So, your task is to print the steps to get to the cosmic number. To get there, one simply counts the numb...
Count common Game of Life patterns.
code-golfgame-of-lifeparsing
The task here is to read from a Golly .rle or plaintext file (your choice) whose filename is provided (on STDIN or as a command line argument) and identify and count the common patterns in the grid encoded therein.
Your program s...
Emotinomicon, 48 bytes / 13 characters
I do it, not because it is short, but because it is fun. Try it here. You'll have to copy+paste it into the textbox.
😼⏪🆙😦✖😎😿➕😨😼🆙😄⏩
Explanation:
😼 ⏪ 🆙 😦 ✖ 😎 😿 ➕ 😼 🆙 😄 ⏩ explanation
😼 ...
Let's map some strings to 2d space, fractal style. Your task is to compute a Hilbert curve and lay a string along it.
Task
The task is to take the single-line input string, and lay it out along a Hilbert curve big enough to contain it, but no bigger. Try to make the byte count as low as possi...
The task here is to read from a Golly .rle or plaintext file (your choice) whose filename is provided (on STDIN or as a command line argument) and identify and count the common patterns in the grid encoded therein.
Your program should be able to identify and distinguish at least the fifteen most...
My understanding was that they said that they were disregarding the metrics and permanent beta was possible, and we kind of assumed that we were one of them.
Objective Write a full program that outputs (to STDOUT or closest alternative) an arbitrary string of text, no more than 64 characters long. Simple enough, right? Well, here's the catch: You may not use any characters that were present in the previous answer's output. That's right, none of them.
...
Python 3
Uses: !CGaceilmnoprstw z.
print("Germanic Capitlization is awesome!")
Simply prints Germanic Capitlization is awesome! with no restrictions. Good luck!
An linear discrete convolution is an operation that turns two vectors of numbers into a third vector of numbers by multiplying elements inside-out. Formally, for two vectors a and b with elements 0 to n - 1 and the convention that a[i] == b[i] == 0 for i < 0 || i >= N, the discrete linear convolu...
MATLAB
Uses: !GSaefgimnoprstuw and newline.
[83,116,101,119,105,101,32,71,114,105,102,102,105,110,32,105,115,32,97,32,112,114,111,109,105,110,101,110,116,32,103,101,110,105,111,117,115,33,'']
Prints:
ans =
Stewie Griffin is a prominent genious!
Is that a valid output scheme in MATLAB? @StewieGriffin
All of my math professors just used the chalk board.
In fact, one of my professors would write a bunch of math, erase a hole in the middle of it, and write more math in there. It was incredibly confusing.
To all who are working on Play Antichess! pull the updated code from github now. I just fixed a major bug causing the game result output to be reversed.
Perhaps it's just me, but I'm getting an error when trying to use getFieldAtLoc on ReadOnlyBoard: groovy.lang.ReadOnlyPropertyException: Cannot set readonly property: pos for class: com.ppcgse.koth.antichess.controller.Field. Might it have to do with the fact that it's trying to clone the Field while pos is final? — ProgramFOX1 min ago
@JAtkin Basically I need a deep clone of a Board. It's an error in something I'm doing, but the stack trace points to getFieldAtLoc.
I do need a deep clone, because I'm simulating moves, and if I don't have a deep clone it just makes those moves on the actual game, which is of course undesired.
@AlexA. Lotus Notes 6.0 was horrendous. Hitting <esc> while on the main screen would close the entire application without warning. <ctrl-n> did nothing (as opposed to practically every other program ever where it opens/makes something new). Out-of-office auto-responses would only go out during nightly maintenance at like 3:00am or something rather than immediately. <F5> is refresh in nearly every other application, but it's "Lock session" in Notes. Just horrible. All around bad.
@JAtkin That's what I was doing, but when simulating moves on it (by calling the movePiece method), the debug output was saying that those simulations were applied to the actual game board. So I wanted the deep clone.
Depends on what kind of job you are applying for. I got a phone call when I applied for YMCA Lifeguard, Subway, and IT Support. I got an email when I applied for Software Developer (both times)
@El'endiaStarman Well, at least you have a legitimate reason. I know a couple people that I don't think have ever made or received a call on their cell phones.
Introduction
A pentagonal number (A000326) is generated by the formula Pn= 0.5×(3n3-n). Or you can just count the amount of dots used:
You can use the formula, or the gif above to find the first few pentagonal numbers:
1, 5, 12, 22, 35, 51, 70, 92, 117, 145, 176, 210, 247, 287, 330, 376, 425...
@JAtkin Indeed, it doesn't appear to work, I get groovy.lang.GroovyRuntimeException: Could not find matching constructor for: com.ppcgse.koth.antichess.pieces.Rook()
@ProgramFOX Try this: keep the updated line I gave you and then add this constructor public Field(Field other) { pos = other.pos piece = other.piece?.clone() }
@TimmyD I bought my Samsung Galaxy Ace to replace a Dell Axim PDA, because there weren't any 4" tablets. I have feature phones (a Nokia 3310 and a cheap Samsung flip-phone) for actual calls and SMS.
@JAtkin groovy.lang.GroovyRuntimeException: Could not find matching constructor for: com.ppcgse.koth.antichess.controller.Field(com.ppcgse.koth.antichess.controller.Location)
@PeterTaylor I just deleted it because I realised it's not clear whether it's asking for 10k pentagonal numbers as the potential summands or as the potential sum
@JAtkin I've no idea what's happening but for whatever reason the debug feature recorded that my bot made this move as move 1: chosen move: Move(Piece(WHITE, PAWN, Loc(6, 3)), Loc(6, 3))