Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.advocacy > #412723
| Path | csiph.com!xmission!news.alt.net!not-for-mail |
|---|---|
| From | owl <owl@rooftop.invalid> |
| Newsgroups | comp.os.linux.advocacy |
| Subject | Re: Tiny "algorithm" challenge |
| Date | Wed, 3 May 2017 16:57:05 +0000 (UTC) |
| Organization | O.W.L. |
| Lines | 30 |
| Message-ID | <sav03.aby@rooftop.invalid> (permalink) |
| References | <oeclh3$tll$4@dont-email.me> <xcv903.yyah@rooftop.invalid> <oecn7m$64a$2@dont-email.me> <f6e9f417-689d-4169-a71b-474249dafc6b@googlegroups.com> |
| NNTP-Posting-Host | boom.rooftop.invalid |
| X-Face | $BHf)vM$6p_?9L`jmOQ54JeNyL+%MZGGRfH8&grb[Y%-jU`MCPAQN=/SVDa{<KrBxl"%XcV >(/67bP(YB}rjV^h><g$kPGE_caHX,aa}4A1~sto7YJo#ob/SgNiMsoaMMXiOX9%DjyJM_-=$`F5b' JM,?/R/;V1RI%|eClL6ymI}LbZERB=q+"pJ)uI{ngj1DRF1;E5[r$f[4mgt9=7Pw@vl8@I%eYs6KWJ e%LU3#U@M[X^YBp2VY]-'1*reGDbk%#n1ve'*RffQ3j,(TCYivjb*M`qmuC5rHgbN)nSsx)697q/vt //''?=gM'C.salgG^f)>cUh |
| User-Agent | tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (Linux/3.16.0-4-amd64 (x86_64)) |
| Xref | csiph.com comp.os.linux.advocacy:412723 |
Show key headers only | View raw
Incubus <incubus9536612@gmail.com> wrote: > On Wednesday, May 3, 2017 at 1:54:03 PM UTC, DFS wrote: >> On 5/3/2017 9:37 AM, owl wrote: >> > DFS <nospam@dfs.com> wrote: >> >> * if the value entered on screen isn't a Sunday, get the date of the >> >> next/upcoming Sunday. >> >> >> >> My 1-line VB solution using immediate if: >> >> >> >> reportDt = IIf(Weekday(screenDt) > 1, screenDt + (7 - Weekday(screenDt) >> >> + 1), screenDt) >> >> >> >> >> >> The VB Weekday() function by default returns 1 for Sunday, 2 for Monday, >> >> etc. >> >> >> >> >> >> Beat it or be pwned. >> > >> > anon@lowtide:~$ date -d Sunday >> > Sun May 7 00:00:00 EDT 2017 >> > anon@lowtide:~$ >> >> >> That's not an algorithm; that's a cheat. > > It's code reuse as is DFS' 'solution'. Neither are a valid algorithm. The algorithm was specified. Those are implementations.
Back to comp.os.linux.advocacy | Previous | Next — Previous in thread | Next in thread | Find similar
Tiny "algorithm" challenge DFS <nospam@dfs.com> - 2017-05-03 09:24 -0400
Re: Tiny "algorithm" challenge owl <owl@rooftop.invalid> - 2017-05-03 13:37 +0000
Re: Tiny "algorithm" challenge DFS <nospam@dfs.com> - 2017-05-03 09:53 -0400
Re: Tiny "algorithm" challenge owl <owl@rooftop.invalid> - 2017-05-03 14:16 +0000
Re: Tiny "algorithm" challenge chrisv <chrisv@nospam.invalid> - 2017-05-03 10:18 -0500
Re: Tiny "algorithm" challenge Incubus <incubus9536612@gmail.com> - 2017-05-03 07:34 -0700
Re: Tiny "algorithm" challenge DFS <nospam@dfs.com> - 2017-05-03 11:33 -0400
Re: Tiny "algorithm" challenge owl <owl@rooftop.invalid> - 2017-05-03 16:57 +0000
Re: Tiny "algorithm" challenge Sandman <mr@sandman.net> - 2017-05-03 16:25 +0000
Re: Tiny "algorithm" challenge DFS <nospam@dfs.com> - 2017-05-03 20:34 -0400
Re: Tiny "algorithm" challenge Snit <usenet@gallopinginsanity.com> - 2017-05-03 10:41 -0700
csiph-web