[Question]
  [
The task is to generate all the strings from 'a' to '999' including upper case characters like so:
```
'a', 'b', 'c' ... 'y', 'z', 'A', 'B', 'C' ... 'Y', 'Z', '0', '1', 2' ... 
'8', '9', 'aa', 'ab', 'ac' ... 'az', 'aA', 'aB' ... 'aZ', 'a0' ... 'a9', 'ba'
```
and so on (filling in the gaps), optionally starting with the empty string.
**Input:**
* The amount of consecutive characters the program has to print up to.
**Output:**
* An array containing each string *OR* one string per line
**Clarifications:**
* The order doesn't matter, you can print uppercase or lowercase letters first if you want.
* The output can return any type of enumerable, doesn't have to be an array specifically, although I doubt printing all the combinations won't be the easiest way to go.
* An input of `3` would print all the string from `'a'` (or `''`) to `'999'`‚Äö an input of `5` up to `'99999'` and so on.
  
[Answer]
# [Jelly](http://github.com/DennisMitchell/jelly), 7 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
√òW·πñ·πóR;/
```
This is a monadic link that accepts an integer as input and returns an array of strings.
[Try it online!](http://jelly.tryitonline.net/#code=w5hX4bmW4bmXUjsvCsOHauKBtw&input=&args=Mg)
### How it works
```
√òW·πñ·πóR;/  Main link. Argument: n
√òW       Yield 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_'.
  ·πñ      Remove the last element (underscore).
    R    Range; yield [1, ..., n].
   ·πó     Cartesian product. For each k in the range, this yields the arrays of all
         strings of alphanumeric characters.
     ;/  Concatenate the arrays of strings of each length.
```
[Answer]
## Haskell, 65 bytes
```
a#b=[a..b]
k n=mapM id.('a'#'z'++'A'#'Z'++'0'#'9'<$)=<<(1#)<$>1#n
```
Usage example: `k 3` -> `["a","b","c",....,"997","998","999"]`.
How it works
```
a#b = [a..b]        -- helper function that builds a list from a to b
        (1#n)<$>    -- map the function (1#), i.e. "build the list from 1 up to" 
                1#n -- on the list from 1 to n
                    -- now we have [[1],[1,2],[1,2,3]]
              =<<   -- map over this list (and combine results in a single list)
  (        <$)      -- a function that makes length of input copies of
 'a'#'z'++ ... '9'  -- all characters we need
                    -- now we have [["a..9"],["a..9","a..9"],["a..9","a..9","a..9"]]
mapM id.            -- and make the cartesian product of each sublist 
```
[Answer]
## Python, 86 bytes
```
f=lambda n:n*[1]and[x+chr(y)for x in['']+f(n-1)for y in range(128)if chr(y).isalnum()]
```
Outputs a list of non-empty strings. Recursively prepends each alphanumeric character to each output for `n-1` and empty string.
[Answer]
# [05AB1E](http://github.com/Adriandmen/05AB1E), ~~9~~ 8 bytes
Code:
```
∆í≈æj¬®N√£‚Ç¨,
```
Explanation:
```
∆í          # For N in range(0, input + 1), do:
 ≈æj        #   Push predefined literal [a-zA-Z0-9_]
   ¬®       #   Remove the last character (the underscore)
    N      #   Push N
     √£     #   Take the Cartesian product, with N repetitions.
      ‚Ç¨,   #   For each element in the array, print with a newline
```
Uses **CP-1252** encoding. [Try it online!](http://05ab1e.tryitonline.net/#code=xpLFvmrCqE7Do-KCrCw&input=Mg).
[Answer]
## JavaScript (Firefox 30-57), 108 bytes
```
f=n=>n?[for(s of['',...f(n-1)])for(c of(t='abcdefghijklmnopqrstuvwxyz')+t.toUpperCase()+'0123456789')s+c]:[]
```
Saved 3 bytes by using toUpperCase. Computing the 62 characters takes me an extra 10 bytes.
[Answer]
# Cinnamon Gum, 15 bytes
```
0000000: 689b b718 05be a345 9c4b c283 d077 de    h......E.K...w.
```
Not short enough, despite this being the exact kind of challenge Cinnamon Gum was made for :(
Compressed by converting from bijective base 96 to base 256. [Try it online.](http://cinnamon-gum.tryitonline.net/#code=MDAwMDAwMDogNjg5YiBiNzE4IDA1YmUgYTM0NSA5YzRiIGMyODMgZDA3NyBkZSAgICBoLi4uLi4uRS5LLi4udy4&input=IjIi) Inputs greater than 2 will cause problems on TIO.
## Explanation
This decompresses to the regex `[a-zA-Z0-9]{1,%s}`. The `h` mode then substitutes the input in to `%s` and outputs all strings matching the regex.
[Answer]
# Ruby, 82 bytes
Constructs cartesian products of the character set up to the given length. The character set is generated by grabbing all characters between `0` and `z` and filtering out non-word characters and also `_`.
```
->n{a=(?0..?z).grep(/\w/)-[?_];r=[]
n.times{|i|r+=a.product(*[a]*i).map &:join};r}
```
[Answer]
# Python 2.7, ~~136~~ 134 bytes
*Thanks to Maltysen and NonlinearFruit for saving 2 bytes*
```
from itertools import*;from string import*;f=lambda n:[''.join(a) for i in range(1,n+1) for a in product(ascii_letters+digits,repeat=i)]
```
Takes `ascii_letters` and `digits` from the string module and uses the Cartesian Product as `product` from itertools to compute all the combinations.
# Output
```
out = f(3)
print out[:10]
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
print out[100:110]
['aM', 'aN', 'aO', 'aP', 'aQ', 'aR', 'aS', 'aT', 'aU', 'aV']
print out[-10:]
['990', '991', '992', '993', '994', '995', '996', '997', '998', '999']
```
[Answer]
# Pyth - ~~13~~ 12 bytes
*1 bytes saved thanks to @Jakube.*
```
sm^s+rBG1UTh
```
[Try it online here](http://pyth.herokuapp.com/?code=sm%5Es%2BrBG1UTh&input=2&debug=0).
```
s                    Add up the lists of different lengths  
 m          (Q)      Map implicitly over input
  ^     h(d)         Cartesian product of string to implicit lambda var + 1
   s                 Add up list
    ++               Concat up three things
     G               Alphabet
     rG1             Uppercase alphabet
     UT              All digits
    
```
[Answer]
# Python 2, ~~106~~ 97 bytes
```
from string import*
f=lambda n,r=['']:n and r+f(n-1,[x+y for x in r for y in letters+digits])or r
```
Try it on [Ideone](http://ideone.com/iVKlGa).
[Answer]
# [MATL](https://github.com/lmendo/MATL), 12 bytes
```
:"3Y24Y2h@Z^
```
This takes a number as input.
[**Try it online!**](http://matl.tryitonline.net/#code=OiIzWTI0WTJoQFpe&input=Mg)
### Explanation
```
:       % Implicitly take input, say N. Generate range [1 2... N]
"       % For each number in that range
  3Y2   %   Predefined literal: string with all letters, uppercase and lowercase
  4Y2   %   Predefined literal: string with all digits
  h     %   Concatenate horizontally
  @     %   Push number of characters corresponding to current iteration
  Z^    %   Cartesian power. Each result is a row 
        % End for each. Implicitly display
```
[Answer]
# [ùîºùïäùïÑùïöùïü](http://github.com/molarmanful/ESMin), 21 chars / 27 bytes
```
‚í∂√Ø‚ìú·µñ…±ƒ¨‚ü¶·∂õ+·∂ê+‚©§9‚®ù],‚ß∫_)ƒó)
```
`[Try it here (Firefox only).](http://molarmanful.github.io/ESMin/interpreter3.html?eval=true&input=3&code=%E2%92%B6%C3%AF%E2%93%9C%E1%B5%96%C9%B1%C4%AC%E2%9F%A6%E1%B6%9B%2B%E1%B6%90%2B%E2%A9%A49%E2%A8%9D%5D%2C%E2%A7%BA_%29%C4%97%29)`
Nope. Nope. Nope.
# Explanation
```
‚í∂√Ø‚ìú·µñ…±ƒ¨‚ü¶·∂õ+·∂ê+‚©§9‚®ù],‚ß∫_)ƒó) // implicit: 
‚í∂√Ø‚ìú                    // [...Array(input)].map(($,_)=>...)
    ·µñ                   // push to stack:
     …±ƒ¨‚ü¶·∂õ+·∂ê+‚©§9‚®ù],‚ß∫_)   // list of n-digit numbers in [a-zA-Z0-9]-ary
                     ƒó) // formatted into a matrix (no spaces)
                        // implicit stack output, newline-separated
```
[Answer]
# Perl, 113 bytes + whitespace
```
@r="";
for (1..shift) {
  @r = sub {
    map { $c=$_; map $c.$_, @{$_[1]} } @{$_[0]}
  }->(\@r, [0..9, "a".."z", "A".."Z"])
}
map say($_), @r
```
Use "perl -E" on the above, with an argument that's a number. I could probably decently have not counted the last "map say" in the chars count.
[Answer]
# J, 50 bytes
```
62&(('0123456789',~(,toupper)u:97+i.26){~#~#:i.@^)
```
Half of the bytes, 25 to be exact, are spent generating the letters and digits needed.
[Answer]
## APL, 38 37 bytes
```
{‚äÉ{‚çµ,,‚ç∫‚àò.,‚çµ}/‚çµ‚ç¥‚äÇ,¬®‚éïa,‚éïd,‚ç®‚éïucs 96+‚ç≥26}
```
[Answer]
# Bash + GNU utilities, 90
```
printf -vs %$1s
eval printf '%s\\n' ${s// /{=,{a..z\},{A..Z\},{0..9\}\}}|sed s/^=*//\;/=/d
```
Input as a command-line parameter. Output is a whitespace-separated list.
Works for inputs upt and including 3. Run out of memory with 4 - the `eval printf` takes an the entire set of 63n elements of the bash expansion.
[Answer]
# Bash + GNU utils, 66
Different (and I think slightly novel) approach to [my other answer](https://codegolf.stackexchange.com/a/79416/11259):
```
dc -e"64 $1^[d2 48^r-P1-d0<m]dsmx"|base64 -w8|sed s_^/*__\;/[+/]/d
```
* `dc` counts down from 248-1 to 248-64n and `P`rints each resulting number as a bytestream (i.e. base 256). If the input is between 1 and 4 inclusive, this is guaranteed to be exactly 6 bytes per number.
* `base64` converts this to base64 output and thus 8 bytes per base64 digit, one per line.
* `sed` strips off leading `/` (base64 digit 63), and then removes any lines containing `+` or `/` (base64 digits 62 and 63). This leaves the required sequence.
[Answer]
# [R](https://www.r-project.org/), 73 bytes
```
y='';x=c(letters,LETTERS,0:9);for(i in 1:scan())cat(y<-outer(y,x,paste0))
```
`y` starts off as empty string, `x` as the base case `'a','b','c',...,'8','9'`. `outer` takes each of its input arguments, and applies the function `paste0` to each combination of elements in `y` and `x` which concatenates the strings. `y` saves the result, `cat` prints it, and it iterates through STDIN number of times of doing this.
[Try it online!](https://tio.run/##K/r/v9JWXd26wjZZIye1pCS1qFjHxzUkxDUoWMfAylLTOi2/SCNTITNPwdCqODkxT0NTMzmxRKPSRje/FKhYo1KnQqcgsbgk1UBT87/xfwA "R ‚Äì Try It Online")
[Answer]
# [Jq 1.5](https://stedolan.github.io/jq/), 97 bytes
```
range(.)as$n|[[range(97;123),range(65;91),range(48;58)]|implode/""|combinations($n+1)]|map(add)[]
```
Expanded
```
  range(.) as $n           # for each n-digit sequence
| [
      [                    # build array of ordinals for
        range(97;123),     #   a-z
        range(65;91),      #   A-Z
        range(48;58)       #   0-9
      ]
    | implode/""           # make into array of strings
    | combinations($n+1)   # generate array of n-element combinations
  ]
| map(add)[]               # convert to sequence of strings
```
[Try it online!](https://tio.run/##NclBDsIgEADAvzQ9QBQN1WobnkJ6WKUxGFiwhXjh7a7ExuNkni/qCi2Aj5kdOKwtFq03jlcluxPfb7r0apR/nAfVD3wq1kcXzHxsmnIP/mYRkg24shZ3sraHyMAYrieiT4i/IyEwOycsxpwqFniLkFPFFw "jq ‚Äì Try It Online")
]