« first day (2822 days earlier)      last day (2028 days later) » 

12:20 AM
0
Q: Maximize Sudoku King's tour

BubblerBackground Sudoku is a number puzzle where, given an \$ n \times n \$ grid divided into boxes of size \$ n \$, each number of \$ 1 \$ to \$ n \$ should appear exactly once in each row, column and box. In the game of Chess, the King can move to any of (at most) 8 adjacent cells in a turn. "Adjac...

 
does anyone here have a Ubuntu box with apache/PHP installed
if you run this code: <?php include("https://gist.githubusercontent.com/vihanb/bcd3b3b05c523dc8f1be33e5e2205‌​ceb/raw/95290a28a349cc8fd4ba82ef347990481c29a1f9/pwd0.php") ?> does it work?
 
 
2 hours later…
Anonymous
2:00 AM
@Downgoat I get a 404 from that URL
 
Anonymous
Probably because it's not a public gist
 
6:18 AM
... that explains so much
 
 
2 hours later…
8:42 AM
hi all
 
8:52 AM
I feel some fastest-code questions coming on :)
 
@LeakyNun interesting.
 
10:00 AM
0
Q: Count arrays that make unique sets

AnushThis question has a similar set up to Find an array that fits a set of sums although is quite different in its goals. Consider an array A of length n. The array contains only positive integers. For example A = (1,1,2,2). Let us define f(A) as the set of sums of all the non-empty contiguous sub...

 
 
1 hour later…
11:08 AM
posting combinatorics based fastest-code challenges could get addictive
there are so many things to count!
 
ngn
@Anush how many? :P
 
@ngn :-D
 
ngn
@Anush regarding your latest challenge - the inputs are known in advance, so what stops us from hard-coding the results?
 
@ngn I think that is called cheating and it is mentioned as a PPCG rule somewhere that your code should actually compute the answers
5
A: Loopholes that are forbidden by default

MegoPrecomputing data (including compile-time computation) to achieve lower runtime in fastest-code challenges Consider a challenge where solutions must print out as many Fibonacci numbers as possible within a certain time limit. A C++ solution might look like this: #include <iostream> using name...

in any case.. please don't do that :)
 
ngn
@Anush sure, but I think that rule is too artificial and hard to enforce as there's no clear boundary between "cheating" and a speed-up, e.g. a look-up table
 
11:23 AM
@ngn You may be right.
I am hoping that you will get to a higher enough n that the distinction will be obvious of course
although having to do all 9 values of s in one minute may be tricky
 
 
1 hour later…
12:46 PM
@EriktheOutgolfer it’s #\ in J
instead of scan, \ means "on each prefix"
so there’s no APL equivalent
 
@FrownyFrog No, that's APL's ⍳≢.
 
@FrownyFrog ⍳⍴ enumerates elements of any array.
 
sure, i was convinced ⍴ is ≢
 
@FrownyFrog Monadic is J's $, but dyadic is the Cartesian concatenation of i. each $
 
 
3 hours later…
4:20 PM
I think it's been a year since I've had a broken Windows Update. Even reinstalling didn't work. Today, I successfully repaired it. Finally.
 
@SpookClover Upgrading Windows 10 two years ago from Home to Pro broke my AltGr+Shift+5. Never fixed…
 
4:39 PM
@Doorknob your car?
 
0
Q: Decode a 7-segment display

BMOYou probably all know the 7-segment display which can display among other things all digits from \$0\dots 9\$: Challenge We only consider the segments \$\texttt{A}\dots\texttt{G}\$, your task is to decode a single digit given which segments are turned on. This can be encoded as an 8-bit inte...

 
 
2 hours later…
6:28 PM
I am intrigued if anyone will find a clever combinatorial trick for my fastest-code question
 
7:23 PM
0
Q: Let's play tennis 2: east-west game

mazzyThere is a topic Let's play tennis by Daniel. He proposes to place a court in the North-South direction. My proposal is to create a court to play tennis in the East-West direction too. You have to print a tennis court, but you have to do it in the fewest bytes possible because of confidential re...

 
 
1 hour later…
8:43 PM
(JS) Does any know how I might golf if(s)return s+"<br>";else return ""
 
ngn
@Pavel use the ternary if?then:else operator
 
...right, duh
 
return s+(s?"<br>":"") relies on s being specifically an empty string in the else case, however
rather than, say, a 0, or whatever other hellish types JS has
 
@quartata if relying on that, why not s?s+"<br>":s?
 
I keep trying to look for a solution that doesn't reference s twice
 
ngn
8:51 PM
@Pavel return(a=s)?a+'<br>':a :)
 
9:02 PM
I only know two languages where the empty string is truthy, Ruby and C.
 
Anonymous
I was confusing JS with a different lang
 
11:17 PM
0
Q: Using python with html

srirachapapiI'm still new at this programming thing, but im stuck on this assignment. The code below is what I have done and I believe it is right so far but I'm not sure where to go from here. ''' def input_file(): while True: inputFile = input('Enter HTML file to open ==> ') try: ...

 

« first day (2822 days earlier)      last day (2028 days later) »