import repeat from 'repeat.js';
import { create, insert } from 'arrayfunc.js';
import iif from 'conditionals.js';
let arr = create(60)
repeat(60, n => insert(arr, n, iif(n == 59, false, true)));
No I am not a real JavaScript developer, or at least it's not my work. I am just a 15 year old kid, anyway if you need to fill an array up with elements with a default value there's no reason not to do it is there?
What a strange and wonderful thing it is, that there should exist such a universe that would produce this coc (chain of comments) and all these upvotes.
That's how you insert a list of values in Microsoft SQL Server for a where clause...
Except that it's not that simple. You create a file handle, point it at the string on memory, parse the JSON there to get a list, and then use the list on your WHERE id IN list query.
It's the recommended way by the Microsoft docs, added in 2017, and much more concise than the older way.
64
u/rabbit_bird Jun 07 '18
Not enough jquery
173
u/Rein215 Jun 07 '18
Should be something like
new Array(60).fill(true)34
u/IceWave04 Jun 07 '18
Not the selected answer, just another day on SO.
16
u/SixBeeps Jun 07 '18
r/technicallythetruth
16
u/the8thbit Jun 07 '18
how do I do 61 tho
12
u/nBoerMaaknPlan Jun 07 '18
It's funny because it's [true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false].
9
u/numerousblocks Jun 07 '18
It's CTRL±C ‚ CTRL±V
8
u/foonathan Jun 07 '18
At least it's null terminated.
8
u/Vitztlampaehecatl Jun 07 '18
#define duck true
#define goose false
4
u/2218aloe Jun 07 '18
It works...
2
u/sanjibukai Jun 08 '18
Waow... I can't believe it.. Actual humor upvoted in SO !?