this is the first assignment in a while I've been allowed to use ArrayLists and it's glorious
I can map functions to lists using streams! I don't have to worry about my nodes pointing in weird directions! I don't have to handle sentinels/stupid edge cases!
oh stdlib containers how I've missed you
and it's not just ArrayLists I'm allowed to use - it's the whole java stdlib
Task
Given a positive integer n, output the joined compound of circles
The circles are of square of size n+2 but removing the corner edges and the middle
E.g.
2
->
####
####
####
####
->
##
# #
# #
##
->
## ##
# # #
# # #
## ##
Testcases
1
->
#
# #
#
2
->
## ##
# # #
# # #
...
my school's got a fixedish sequence of the mandatory ones based on prerequisites, and everything above them also has various ones of them as prereqs except the professors for those do not give a fuck
i didn't do like a huge survey of international schools but everywhere i looked in the uk, germany, switzerland, and i think singapore required primarily ap scores from applicants from the us with maybe some low sat cutoff as well
The SAT is a standardized test widely used for college admissions in the United States. Since its debut in 1926, its name and scoring have changed several times; originally called the Scholastic Aptitude ...
reasons why I like flask more than tomcat apache: a) flask doesn't compile every single fricking webapp in the webapp directory all at once and run them all at once b) there isn't even a web app directory to put multiple web apps in c) errors appear directly in the terminal rather in a log file d) less verbose e) doesn't require two different powershell windows at once f) doesn't require a special directory for everything
code-golfascii-artstring
Negative of an ASCII photo
Given an binary ascii "photo", return the negative of the photo
Example:
#
# #
# #
# #
#
->
## ##
# # #
###
# # #
## ##
General rules:
This is code-golf, so the shortest answer in bytes wins
Standard rules and default I/O rules ...
anyone know how to get deleted rows from a psql database?
all i could find on SO is a pretty useless link-only answer with no explanation that links to a bunch of pages with also no explanation (stackoverflow.com/questions/6151632/…)
compared to tio i don't like the output being so far down the screen by default and not being cached/automatically run, but the interface for arguments and options is nicer and it's also nice to have timing info separate from stderr
it's also actively maintained
...and i just now realized it updates the url as you type this whole time i've been using the copy for cmc functionality then extracting the link from that
@Pyautogui For that, you need to use a service that comes with an emulated terminal, which is far beyond the scope of TIO or ATO. Maybe you can use Repl.it for that (which happens to support BF).
My only complaint for ATO is that it doesn't work at my work PC because the firewall is crazy and blocks all websocket connections
H Choose a random element of the input
el Take the uppercase alphabet
e Insert "'{&" into this at position the above
l Reverse 4
o, Increment the input
worl Flatten the input
d Take the lowercase alphabet
! Decrement the input
Given a ragged list, e.g.
[ [4, 7], [5, 3, [], [6, [2]]]]
Your challenge is to sort only the numbers in in it. For example, with the above, the result would be
[ [2, 3], [4, 5, [], [6, [7]]]]
The shape of the output should remain the same, only the numeric contents should change.
This is code-g...
@PyGamer0 There is a `forperm` function to loop over all permutations: > forperm(a,p,seq): the sequence is evaluated, p going through permutations of a. But there isn't a easy way to generate all permutations as a vec.
PARI/GP, 73 bytes
f(x)=r=[];forperm(vecsort(x),p,prod(i=2,#p,p[i]-p[i-1])&&r=concat(r,p));r
Attempt This Online!
After a lot of head scratching and asking @alephalpha in chat, here it is.