text:
i love yOu i lOve you i love yOu!
XKCD #99, with the title "Binary Heart" shows a simple image of ones and zeros, with some digits colored red.

The red heart is visible to the naked eye, but the message hidden in the binary sequence is not. If you remove all the spaces and newlines and interpret the binary sequence as 8 bit ASCII-code, you'll end up with the message:
iloveyOuilOveyouiloveyOuilOveyOuiloveyouilOveyouilOveyOuilOv

Cute right?
Pssst... The string isn't a pure string repetition.

Your challenge is to create this binary image with 21 digits across, and 23 digits down. There should be exactly one space between each digit in each row, and one newline for each new row. Note that the last bits are only the beginning of the letter e, since 21*23 isn't divisible by 8. You need those bits correct too.
The function or program should not take any input. Leading and trailing spaces and newlines are accepted.
The result of your code should look like this:
0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1
1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1
1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0
1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 0 0
1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0
1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1 1 0 1
0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1
0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1
0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0
1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1
0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0
1 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1
0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0
1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1
0 1 0 1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1
1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0
0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0
1 0 1 0 1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1
1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0
0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0
0 1 0 1 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0
1 1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1
0 0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1

This is code golf, so the shortest answer (in bytes) wins.

Leaderboard

var QUESTION_ID=94699,OVERRIDE_USER=31516;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

I want you to know right now I'll find a way somehow?

I will give a bounty to the shortest code which colours the output using red and black to make the heart

I'm even more curious to know what the hidden message is in the capitalized Os from the ASCII output string!

There is no message, or at least none has been discovered by explainxkcd.com who say "The mixture of upper-case and lower-case "O"s is presumed intentional to avoid a repeating pattern."

@BetaDecay the bounty is out! Now you can give it a go too! :)

@WeeingIfFirst Haha, you overestimate my programming skill :). I'll award the winner with a 100 rep bounty as well, when I can

Using Shakespeare for this challenge results in extra romance!

Jelly, 36 33 32 bytes
“ḅUɗaṚPXṙ’Bṁ484¬“½:J⁺ȤṾ‘Ḥ¤¦Ḋs21G

Thanks to @JonathanAllan for golfing off 3 bytes!
Try it online!
How it works
The main link
“ḅUɗaṚPXṙ’Bṁ484¬“½:J⁺ȤṾ‘Ḥ¤¦Ḋs21G

is executed niladically (i.e., without any arguments) when the program is run. Its return value will be printed implicitly.
“ḅUɗaṚPXṙ’

find the indices of the quoted characters in Jelly's code page and interprets them as digits of a bijective base 250 number. This yields the integer 13021639057551959994.
          B

converts the generated integer to binary. This yields the bit array 1011010010110110001001111011101100110010101111001010011110111010 which corresponds to the UTF-8 encoding of the string ilOveyOu, shifted one bit to the left.
Shifting is necessary because B cannot return a bit array with a leading 0. Other options include negating the binary digits or computing the square in reverse, but this approach saves one byte.
            ṁ484

molds the generated array like the range from 1 to 484, i.e., it repeats the contents of the array as many times as necessary to achieve a length of 484.
This is one more bit than we need, to account for the shift. We could remove the first bit now, but doing so later means that all bits that have to get swapped lie at even indices, which allows us to save the aforementioned byte.
                 “½:J⁺ȤṾ‘Ḥ¤

takes the code points of the characters between “ and ‘ ([10, 58, 74, 138, 154, 186]), then "unhalves" them, i.e., multiples them by 2 ([20, 116, 148, 276, 308, 372]).
                ¬           ¦

conditionally negates the bits at those indices. This corresponds to the O/o variations in the original pattern.
Finally,
                             Ḋs21G

dequeues the bit array (removing the first bit), splits the remaining array into rows of 21 elements and prints the resulting matrix as a grid.

You can save 3 more bytes by having uppercase O as the default, I think this does it: “ỊḂr×C)ḃȯ’B¬ṁ483¬“Œ\ ° @‘+\¤¦s21G`

Right, there are more uppercase O's than lowercase ones. Thanks!

So this is what black magic looks like..

@BassdropCumberwubwubwub Now there should be effort to turn it into red and black magic

Jelly, 41 40 35 33 bytes
Thanks to @Dennis for making the end ṖṖCG! (complement C = 1-x in place of logical not ¬ )
“ƝƓỊ⁹Ȥ⁶Ị⁺‘ẋ8_“¤ÐŒ#'/‘¦32BFs21ṖṖCG

TryItOnline
How?
“ƝƓỊ⁹Ȥ⁶Ị⁺‘ẋ8_“¤ÐŒ#'/‘¦32BFs21ṖṖCG - Main link: no arguments
“ƝƓỊ⁹Ȥ⁶Ị⁺‘                        - code page indexes [150,147,176,137,154,134,176,138]
                                        (bitwise negated values of ordinals of "ilOveyOu")
          ẋ8                      - repeat eight times
            _                     - subtract
                     ¦            - apply to indexes
             “¤ÐŒ#'/‘             - code page indexes [3,15,19,35,39,47]
                                        (the indexes of the lowercase Os)
                      32          - literal 32 (subtracting 32 from the bitwise negated
                                                'O's makes them bitwise negated 'o's)
                        B         - binary (all are 8 bits, hence the negation)
                         F        - flatten list
                          s21     - split into slices of length 21
                             ṖṖ   - pop (remove the last two slices)
                               C  - complement (transform the bits to what they should be)
                                G - format as a grid
                                        (inserts both the spaces and line feeds)

"Colour" version, 77 bytes
“¤Ɓ¥J¬ ¥ƲėNėR½5ðḃḍCṬ’b19‘“Y^‘jĖŒṙḂ
“ƝƓỊ⁹Ȥ⁶Ị⁺‘ẋ8_“¤ÐŒ#'/‘¦32BFż¢Ḅị“¹0°1”s21ṖṖG

TryItOnline
Jelly has no colour output, but this is much easier for me to see anyway (I am colour blind)...
° ¹ ¹ ° ¹ ° ° ¹ ° ¹ ¹ ° ¹ ¹ ° ° ° ¹ ¹ ° ¹
¹ ¹ ¹ ° ¹ ¹ ¹ ° ¹ ¹ ° ° ¹ ¹ ° ° ¹ ° ¹ ° ¹
¹ ¹ ¹ ° ° ¹ ° ¹ ° ° ¹ ¹ ¹ ¹ ° ¹ ¹ ¹ ° ¹ °
¹ ° ¹ ¹ ° ¹ ° ° ¹ ° ¹ ¹ ° ¹ ¹ ° ° ° ¹ ° °
¹ ¹ ¹ ¹ ° 1 1 1 ° ¹ ¹ ° ° 1 1 0 ° ¹ ° ¹ °
¹ ¹ ¹ 1 0 0 1 0 1 1 ° 1 1 1 1 0 1 1 ¹ ° ¹
° ¹ ° 1 1 0 1 0 0 1 ° 1 1 0 1 1 0 0 ° ¹ ¹
° ¹ ¹ 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 ° ¹
° ¹ 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 ¹ °
¹ ° 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 ° ¹
° ° ¹ 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 ¹ °
¹ ° ¹ 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 ¹ ¹ ¹
° ¹ ° ¹ 0 1 1 0 1 0 0 1 0 1 1 0 ¹ ¹ ° ° °
¹ ¹ ° ¹ ¹ 1 1 0 1 1 1 0 1 1 0 0 ¹ ¹ ° ° ¹
° ¹ ° ¹ ¹ ¹ 1 0 0 1 0 1 1 0 1 ¹ ¹ ¹ ° ¹ ¹
¹ ° ¹ ° ¹ ° ¹ 1 0 1 0 0 1 0 ¹ ¹ ° ¹ ¹ ° °
° ¹ ° ° ¹ ¹ ¹ ¹ 0 1 1 1 0 ¹ ¹ ° ° ¹ ¹ ° °
¹ ° ¹ ° ¹ ¹ ¹ ¹ ° 0 1 0 ¹ ¹ ° ¹ ¹ ¹ ¹ ° ¹
¹ ¹ ° ¹ ° ¹ ° ¹ ¹ ° 1 ° ° ¹ ° ¹ ¹ ° ¹ ¹ °
° ° ¹ ° ° ¹ ¹ ¹ ¹ ° ¹ ¹ ¹ ° ¹ ¹ ° ° ¹ ¹ °
° ¹ ° ¹ ° ¹ ¹ ¹ ¹ ° ° ¹ ° ¹ ° ° ¹ ¹ ¹ ¹ °
¹ ¹ ¹ ° ¹ ° ¹ ° ¹ ¹ ° ¹ ° ° ¹ ° ¹ ¹ ° ¹ ¹
° ° ° ¹ ° ° ¹ ¹ ¹ ¹ ° ¹ ¹ ¹ ° ¹ ¹ ° ° ¹ ¹

How?
“¤Ɓ¥J¬ ¥ƲėNėR½5ðḃḍCṬ’b19‘“Y^‘jĖŒṙḂ - Link 1: no arguments
“¤Ɓ¥J¬ ¥ƲėNėR½5ðḃḍCṬ’              - base 250 of a big number
                     b19           - convert to base 19, yields a list of integers
                        ‘          - increment those numbers
                         “Y^‘      - get code page indexes [89,94]
                             j     - join: [89,3,5,3,8, ... ,3,19,1,94]
                                         - {left-right, top-bottom} runs of colours
                              Ė    - enumerate [[1,89],[2,3],[3,5],[4,3],[5,8], ...]
                               Œṙ  - run-length decode [89 1s, 3 2s, 5 3s, 3 4s, 8 5s, ...]
                                 Ḃ - mod 2

“ƝƓỊ⁹Ȥ⁶Ị⁺‘ẋ8_“¤ÐŒ#'/‘¦32BFż¢Ḅị“¹0°1”s21ṖṖG - Main link: no arguments
“ƝƓỊ⁹Ȥ⁶Ị⁺‘ẋ8_“¤ÐŒ#'/‘¦32BF                 - same as the original to get 1s and 0s
                          ż                - zip with
                           ¢               - last link (1) as a nilad
                            Ḅ              - binary to integer (vectorises)
                             ị             - index into
                              “¹0°1”       - string "¹0°1"
                                    s21    - split into length 21 slices
                                       ṖṖ  - pop last two unused slices
                                         G - format as a grid

If you remove the¬ , the last four bytes can become ṖṖCG. :)

Oh wow, of course - that just has to be done!

Pardon my pedantry; perhaps the proper term is complement?

@Sherlock9, yep; fixed & thanks - I can't spell all that well, so will often get words wrong if spellchecking gives no flag!

@WeeingIfFirst - I didn't check, but hope this is still good enough to be considered coloured.

If you are outputting to a POSIX-compatible terminal, you can use ANSI escape codes to get the color.

@Mego No idea - I'm using TIO in Firefox on Windows.

@JonathanAllan You can simply say that the output is to go to a POSIX-compatible terminal (like mintty), and use the ANSI escape codes to get the correct colors. It won't work on TIO, but anyone who tries it in a terminal will see it correctly.

@Mego - I imagine it will mess up with G, as Jelly would make all the spacing enough for the text of the widest column; and since my track record with nix-style systems is so poor I don't think I'll try to get cygwin working and then to get a Jelly program to run in it any time soon.

@JonathanAllan, I don't think I can call this "colored". Very nice submission though :) I think that changing the symbols is a lot easier than changing the color in most languages.

@WeeingIfFirst Agreed. Although at a guess if there was colour it would probably only add two bytes for the (probable two-atom dyad like œC) to instruct to colour a character and two to four to specify a colour to use as a string encoded value (two maybe using a single byte colour value and a byte for the single character string identifier Jelly uses elsewhere, ” but probably three since we'd probably map for both colours using the two character string identifier, ⁾), as one would still be just mapping into.

You answered first, but Dennis' answer was the first to reach 33 bytes, so I accepted his, but this was a very nice answer too :)

he he - no problem, but you know I golfed it down to 33, right?

Actually, 58 bytes
73*8╙:13542├`≈"÷≥"E`M"«%s₧ªn%s6û"7*%"♠n≥6û"+¿├`' +`M╪♂Σ♂Ri

Try it online!
Explanation
There are three main parts here, so I'm going to break it down accordingly.
Part 1: Constructing the base-256 string
We're actually going to construct the binary string reversed, to take advantage of Actually's stack-based (LIFO) structure and to avoid complications with leading zeros in the binary string. Thus, the target binary string is 110011011101111001000110110100101101010111011110010100111101010011001101110111100100011011010010110101011101111011010011110101001100110111011110010001101101001011010101110111101101001111010100110011011101111011000110110100101101010111011110010100111101010011001101110111100100011011010010110101011101111001010011110101001100110111011110110001101101001011010101110111101101001111010100110011011101111001000110110100101101010111011110010100111101010011001101110111101100011011010010110, which is equivalent to 20083405242288679348048842451418880256193335738939042905519679590571514414673488599852759703515507690399267425671627412178904636115120346432419478 in decimal. In base-256 (using the CP437 character table for conversion), the corresponding string is ♠n≥6û«≥₧ªn≥6û«÷₧ªn≥6û«÷₧ªn÷6û«≥₧ªn≥6û«≥₧ªn÷6û«÷₧ªn≥6û«≥₧ªn÷6û. To construct the original binary string, we construct the base-256 string (taking advantage of the pattern in it), and perform base conversions to decimal and binary.
The base-256 string has the following format (spaces and newlines added for clarity):
♠n≥6û
« (either ≥ or ÷) ₧ªn (either ≥ or ÷) 6û
  (7 times)

Thus, each of the 7 middle sections can be formed by using the scaffold «%s₧ªn%s6û and replacing the %s parts with either ≥ or ÷.
The specific sequence of ≥s and ÷s we need is ≥≥÷≥÷÷≥≥≥÷÷≥≥÷. Since we need this as a list of length-1 strings, the naïve way of representing this would be "≥≥÷≥÷÷≥≥≥÷÷≥≥÷"# (push the string, make it into a list). However, we can do slightly better. By interpreting that string as a binary number (where ≥ represents 1 and ÷ represents 0), we get 13542 in decimal. By converting this back to binary (using the traditional 1s and 0s), and indexing into a length-2 string, we can get the list using one less byte than the naïve method.
:13542├`≈"÷≥"E`M"«%s₧ªn%s6û"7*%"♠n≥6û"+
:13542├                                  push 13542, convert to binary
       `≈"÷≥"E`M                         for each bit:
        ≈                                  convert to integer (from string)
         "÷≥"E                             index into "÷≥"
                "«%s₧ªn%s6û"7*           push the scaffold for the middle section
                              %          old-style Python string formatting to fill in the scaffold
                               "♠n≥6û"+  prepend the beginning piece

Part 2: Converting to binary
This part is much more straightforward. If Actually had the capability to directly convert base-256 to binary, we'd use that. Unfortunately, it doesn't, so we'll have to use decimal as an intermediary format.
The , in the following code represents the code from Part 1 - for explanatory purposes, I've replaced the Part 1 code with , to read the output from Part 1 from STDIN. It is not part of the actual final code.
8╙,¿├
  ,    Part 1 result
8╙ ¿   convert from base-256 to decimal
    ├  convert to binary

Part 3: Formatting
If the challenge was to merely output the binary string as-is, we'd be done. However, we still have some formatting to do to get the binary string into a 21 x 23 rectangle.
As in Part 2, the , represents the output from the previous part, and is not part of the actual code.
73*,`' +`M╪♂Σ♂Ri
   ,              output from Part 2
    `' o`M        insert a space after every character
73*       ╪       chunk into 21 pieces
           ♂Σ     concatenate each piece
             ♂R   reverse each piece
               i  flatten
                  (implicitly print)

For those keeping track at home, this is the equivalent Python 3 code (481 bytes):
print('\n'.join([''.join(' '+c for c in bin(sum('\x00☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñÑªº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■\xa0'.index(c)*256**i for i,c in enumerate(("♠n≥6û"+("«%s₧ªn%s6û"*7)%tuple("÷≥"[int(b)]for b in bin(13542)[2:]))[::-1])))[2:])[i*42:-~i*42][::-1]for i in range(23)][::-1]))

You know, it's programming like this that makes me believe the Egyptians where actually very advanced and successful programmers and hieroglyphics was simply their language of choice. +1

What language was this? Also, is this answer compiled?

@Jack This is Actually. No compilation involved.

@Mego :0 You are a BOSS then for writing this code

What happens if you need the digit 34 in a base 256 number? (the string enclosing character)

@JonathanAllan It would have to be inserted into the string manually, using string formatting commands.

Ah, OK makes sense (or by actually using another number and transforming it afterwards I suppose).

@JonathanAllan That also would work.

JavaScript (ES6), 169 ... 136 135 bytes

let f =

_=>"0213021203131214".replace(x=/./g,v=>0+[a=1768714102,a-8192,a-=66265089,a+8192,3][v].toString(2)).replace(x,(c,i)=>`
`[+!(i%21)]+c)

console.log(f());

Saved 2 bytes thanks to Andrakis
Saved 4 bytes thanks to Hedi
Saved 3 5 bytes thanks to Neil
Colored version, 249 bytes (237 bytes of JS + 12 bytes of CSS)
The JS code outputs the ASCII art with bold tags for the heart. 12 bytes of CSS are required to colorize in red. (Is that byte count fair?)

let f =

_=>"0213021203131214".replace(x=/./g,v=>0+[a=1768714102,a-8192,a-=66265089,a+8192,3][v].toString(2)).replace(x,(c,i)=>`
`[+!(y=i/21|0,x=i%21)]+([57568,a=261112,a,b=524280,b+4,b+4,b,a+1024,65520][y-4]&1<<x|y>12&x>y-9&x<29-y?c.bold():c))

document.getElementById("o").innerHTML = f();
b{color:red}

You can save some bytes by replacing your replace: s=>s.replace(/./g,'$& '). I've been working on a pretty much identical solution.

Couldn't s.replace(/./g,'$& ') be replaced by s.split\`.join` ``?

[...s].join\ ``

I think replace(/./g,(c,i)=>c+=++i%21?' ':'\n') (obviously using a literal newline there) saves a further byte. There may well be an even better way of expressing that idea.

05AB1E, 77 54 53 44 43 41 bytes
Uses CP-1252 encoding.
’i„Î€î’8×•1žä¿*•S·£™J¦'iìÇb0ìJ011JSðý42ô»

Explanation
’i„Î€î’   # the string "iloveyou"
8×        # repeated 8 times
•1žä¿*•   # the number 3262264221 encoded in base 214
S·        # split to list and multiplied by 2, gives [6, 4, 12, 4, 4, 12, 8, 4, 4, 2]
£         # split the "iloveyou..." string into chunks of these lengths
™J        # title-case the chunks and join, giving the string with capitalized O's
¦'iì      # replace the faulty capitalized "I" in the beginning with a lower case "i"
Ç         # convert to list of ascii values
b0ì       # convert each to binary and prepend a 0 to each binary string
J011J     # join the strings and append "011"
Sðý       # add a space between each digit
42ô       # split in pieces of 42 (21 digits, 21 spaces)
»         # merge on newline

Try it online!

You seem to have a relevant profile picture

@tomsmeding: Indeed! He drew me a hat guy when we met a couple of years ago, so that's who I am now :)

I know it's been 2.5 years, but you can golf the Sðý42ô» to S21ô», since » joins inner lists by spaces implicitly (and the •1žä¿*• should now be •Å¾$6•, since integers are encoded in base-255 now instead of base-214).

CJam, 48 bytes
19560Yb"Oo"f="uilvey"8*3/.\s:i2fb0a*7>21/W<Sf*N*

Collaboration with @MartinEnder, who took off a tricky 3 bytes with the "uilvey"3/ string. Online interpreter.
19560Yb        Convert 19560 to base 2
"Oo"f=         Index each bit into the string "Oo" to give "ooooOOooOOOooOoOOO"
"uilvey"8*3/   Repeat the string "uilvey" 8 times then split into chunks of 3
.\s            Vectorised swap (insert the Os into the right places) then stringify
:i2fb          Convert each char to int then take base 2
0a*            Join with 0s
7>             Remove the first 7 bits
21/            Split into chunks of length 21
W<             Drop the last row
Sf*            Join each row with spaces
N*             Join the rows with newlines

Javascript ES6 REPL, 124 121 119 113 bytes
Saved 6 bytes thanks to @ETHproductions
This is a full program which can be pasted in the REPL/console to produce the correct result.
for(i=r='';i<483;)r+=(`il${"Oo"[21>>i/64&1]}vey${"oO"[77>>i/64&1]}u`.charCodeAt(i/8%8)>>7-i%8&1)+(++i%21?` `:`
`)

f=

_=>{for(i=0,r='';i<483;)r+=(`il${"Oo"[21>>(a=i/64)&1]}vey${"oO"[77>>a&1]}u`.charCodeAt(i/8%8)>>7-i%8&1)+(++i%21==0?`
`:` `);return r}

a.innerHTML = f()

More verbose
for (i=0, r='';                         // r == the result
     i < 483;)                          // 483 == 21 * 23
r+= (                                   // construct "iloveyou"
        `il${                           // il
            "Oo"[21 >> (a = i/64) & 1]  // position in the loop defines the o or O
         }vey${                         // vey
            "oO"[77 >> a & 1]           // position in the loop defines the o or O
         }u`                            // u
        .charCodeAt(                    // "i" == 105 == 01101001
            i / 8 % 8                   // find the correct bit to append
        ) >> 7-i%8 & 1                  // shift it to select 1 or 0
    )
+                                       // add a space or newline
    (
        ++i%21 == 0 ? `
` : ` `                                 // every 21 characters add a new line,
                                           otherwise a space
    )
;                                       // Javascript implicitly returns the last value
                                           edited in a for loop

Coloured JavaScript only heart, 281 bytes
for(i=z=r='',h=[],g=[90,...[...'353871767176G4H4H5G5F7CABB9D7F5H3J1'].map(n=>parseInt(n,20)),-1];i<483;)r+=`%c`+(`il${"Oo"[21>>i/64&1]}vey${"oO"[77>>i/64&1]}u`.charCodeAt(i/8%8,--g[+z]||z++,h[i]=z%2)>>7-i%8&1)+(++i%21?` `:`
`);console.log(r,...h.map(H=>`color:${H?'red':'black'}`))

This works by switching colours every n bits and makes use of the console.log ability to log colours
Coloured CSS Heart, 229+12 bytes
If using css is allowed, the coloured heart can be reduced even further to 229 bytes of JavaScript code and 12 bytes of CSS
for(i=z=r='',g=[90,...[...'353871767176G4H4H5G5F7CABB9D7F5H3J1'].map(n=>parseInt(n,20)),-1];C=`il${"Oo"[21>>i/64&1]}vey${"oO"[77>>i/64&1]}u`.charCodeAt(i/8%8,--g[+z]||z++)>>7-i%8&1,i++<483;)r+=(z%2?(''+C).bold():C)+(i%21?` `:`
`)

let f =

    _=>{for(i=z=r='',g=[90,...[...'353871767176G4H4H5G5F7CABB9D7F5H3J1'].map(n=>parseInt(n,20)),-1];C=`il${"Oo"[21>>i/64&1]}vey${"oO"[77>>i/64&1]}u`.charCodeAt(i/8%8,--g[+z]||z++)>>7-i%8&1,i++<483;)r+=(z%2?(''+C).bold():C)+(i%21?` `:`
`);return r}

document.getElementById("b").innerHTML = f();
b{color:red}

Reason I did it this way is because this can be considered a full program. There are no hardcoded variables which should be changed by the user, instead this can be copy pasted and it works as is. I call it a snippet but it might as well be a full program. Thoughts?

It relies on REPL behavior, which means the language is "Javascript ES6 REPL" (source).

@Mego Thanks, edited my answer accordingly

I'm pretty sure you can get rid of a and just use num>>i/64&1 in both places, saving 1 byte. Also, ++i%21==0?newline:space is the same as ++i%21?space:newline.

Another tip: change i=0,r='' to i=r=''; '' is automatically coerced to 0.

@ETHproductions thanks! The a was a variable from an old version and could indeed be removed :)

I knew you were a fellow Brit with a pseudonym like that. And He said "Let it drop", and it did drop; proper like.

MATL, 56 55 bytes
'!?u<TgGU*lB7SE1q3s.?Su(q6)iM'F'eilovyOu'Za8&B!FTTv21e!

Try it Online
Explanation
'!?u<TgGU*lB7SE1q3s.?Su(q6)iM'      % Previously compressed version of the string
F'eilovyOu'Za                       % Decompress this string
8&B                                 % Convert each char to 8-bit binary number
!                                   % Transpose the result
FTTv                                % Append [0 1 1] to the end to take care of
                                    % the partial "e" bits
21e!                                % Reshape it into the appropriate shape
                                    % Implicitly display the result

PowerShell v2+, (UTF-16) 300 bytes
Corrected erroneous byte count thanks to @Mego
'ږƍ໬ƕ๓ƺ֥˄ϝӊ༭ǝ֥ţϝɥޔǮ૒ƱϝĲ˲ӷʴ˘ͻ֙ץŻ઴Ŭɻˌʼֽ͖ҶɻŦʼʞݖɛĽƳ'-split'(..)'-ne''|%{(-join($_[0,1]|%{[convert]::ToString(+$_,2)})).PadLeft(21,'0')-replace'(.)','$1 '}

Not the shortest, but a different approach. I manually took each line and sliced them into pairs each (roughly) 9-11 significant bits in length. Converted each of those binary values to a char (Note: PowerShell uses UTF-16 by default, not UTF-8), and mushed that into a string. That's the '...' at the beginning.
We then -split that into strings of length 2, and loop through each pair. Those pairs are split into a char-array via $_[0,1], and each of those are cast as an int +$_, and [convert]ed into a binary (,2) String. That's -joined together into a single string, then PadLeft'd to get the proper length, then each element is -replaced with itself and a space '$1 '.
Those strings are all left on the pipeline, and output is implicit, with the default Write-Output sticking a newline between elements.
PS C:\Tools\Scripts\golfing> 'ږƍ໬ƕ๓ƺ֥˄ϝӊ༭ǝ֥ţϝɥޔǮ૒ƱϝĲ˲ӷʴ˘ͻ֙ץŻ઴Ŭɻˌʼֽ͖ҶɻŦʼʞݖɛĽƳ'-split'(..)'-ne''|%{(-join($_[0,1]|%{[convert]::ToString(+$_,2)})).PadLeft(21,'0')-replace'(.)','$1 '}
0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1
1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1
1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0
1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 0 0
1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0
1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1 1 0 1
0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1
0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1
0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0
1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1
0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0
1 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1
0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0
1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1
0 1 0 1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1
1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0
0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0
1 0 1 0 1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1
1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0
0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0
0 1 0 1 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0
1 1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1
0 0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1

I count 300 UTF-16 bytes. Python 3: len("'ږƍ໬ƕ๓ƺ֥˄ϝӊ༭ǝ֥ţϝɥޔǮ૒ƱϝĲ˲ӷʴ˘ͻ֙ץŻ઴Ŭɻˌʼֽ͖ҶɻŦʼʞݖɛĽƳ'-split'(..)'-ne''|%{(-join($_[0,1]|%{[convert]::ToString(+$_,2)})).PadLeft(21,'0')-replace'(.)','$1 '}".encode('utf-16be'))

@Mego Oh, durr. Just because I'm counting UTF-16 for the string doesn't mean I get to magically count UTF-8 for the rest of the code. Hah. Thanks for the assist.

Glad to help :)

If it didn't look so intimidating, I would actually open a PowerShell terminal and run it.

///, 237 bytes
/2/\/\///3/0 24/1 25/0
26/1
27/4428/3329/772A/432B/A732C/937A782D/B48B72E/8A4892F/98B93/373A3A737837367A7A7878AA674E37A45D83A5C78A45F7A63D83463C78A639E3745AD8368C7845A9E3763AD8573C7863AF46AAD35348C735AAF673AD5848C753AA9E57AAB48B468348C41

Try it online!

Python 3, 147 144 bytes
lambda i=0:exec("print(' '.join(''.join('0'+bin(ord(chr(j+30)in' ,0@DL'and'o'or c))[2:]for j,c in enumerate('ilOveyOu'*8))[i:i+21]));i+=21;"*23)

Test it at ideone
Initialises i to 0 in the function declaration, then repeats this 23 times:
makes the whole binary string without spaces (see below);
slices a row from within using [i:i+21];
inserts the spaces with ' '.join(...);
prints; and
increments i by 21 with i+=21
To make the whole binary string:
it repeats "ilOveyOu" eight times;
replaces O with o where necessary (at indexes [2,14,18,34,38,46]);
- - - this is achieved with chr(j+30)in' ,0@DL' to save 3 bytes
converts each char to it's ordinal;
casts each ordinal to a binary string ('0bxxxxxxx');
removes the leading '0b' from each using [2:];
prepends each with a '0'; and
joins the whole thing up with ''.join(...)

You don't need a lambda. Do i=0\nexec(...) or i=0;exec(...) for 137 bytes.

Unless you really need Python 3, you can use Python 2 to change exec("...") to exec"..." and print(...) to print...

Powershell, 110 bytes
'uil','vey'*8|%{$s+=$_+'oOOooOOOooOoOOO'[$i++]}
-join(8..490|%{(+$s[$_-shr3]-shr(7-$_%8))%2
'
'[!(++$j%21)]})

Explanation:
The first line of the script takes the substrings and inserts a letter O between them. The result is the string uiloveyOuilOveyouiloveyOuilOveyOuiloveyouilOveyouilOveyOuilOvey. Note that the first and last characters are redundant.
The loop outputs all the necessary (8..490) bits from the characters of the string, as well as a space or a line feed.
The riddle of the recipient of the valentine letter
It can be seen that small and large symbol O themselves make up the bit encoding. There are 15 symbols (bits). There is only one partition on the bits to get ASCII characters: oOOooOOO+ooOoOOO[o]. We had to add a small o instead of 0 at the end. This ASCII symbols are: g.
Who is this mysterious g.?

PHP+HTML+CSS, 173 Bytes Colored 367 Bytes
CLI only PHP 173 Bytes
$o=2841;for($i=0;$i<16;)$t.=il.Oo[$o>>$i++&1].vey.Oo[$o>>$i++&1].u;foreach(str_split($t)as$c)$x.="0".decbin(ord($c));for($i=0;$i<504;$i++){$i%21?:print"\n";echo$x[$i]." ";}}

conform to the bounty spec content type text/html
<?=gzinflate(base64_decode("jVNbDoIwELwKJ9Ctn9hwF9HGmFQwiB+GeHcRd7ezvDQEAmWmMzuT+nv7jKG4dddDc75UOW124foqu0OM+aO6h3Z/rGPd5E04vfz2C/a3gjLXXzTcxG/pSem7xzr4hxhn2BZLZvfpDjRg/3FBjBWuL78fflsWAOVl0uWk8rmG3yDCMNnMLMsshHpq0jLVQLKj6RrIbHBCYoq6WclPHHJ+PNdqjEZlpLNgbaTy2xoTHAQ3kBasKZyg3/XUDAVV5urVcDE5mQXsGWugIJqikibVmcZTJIrL0Bq3NKdgjxhak2q5ukmpWuXS+QJPEBVi52vE025VJy7Yw18u3g==");

b{all:unset;color:red} instead of b{all:unset;color:#911;background:red} in the first version
PHP+HTML+CSS, 392 Bytes
heart red +black which looks more pretty
Maybe call the color number in the CSS Part
<?=gzinflate(base64_decode("jVTLDoIwELyb+A8m3nXrzdrwL7xijAgG8GAI/67WdpktD00DoWWmMztLMU37LPLo3t3i+nwpNe0O+a1Purgo9KNs8vaUVkVV6+1RqVMSp9dzXT3KTNd51pv9l7xemXtEG/UeZC9yT8OdhrlFK3iLKCX4IZqEwngPcuh/vBCjPd8k34nZJxGA3TLxMip9hgWAkAP67cTyUBOhJluVXDYxWIKsBWgyRE9jEntayNL75CxdfYuRBkqB1ozBkdJvg46iRIiWNmOQCSQ6vpygIEmlqYZz1LAN1AQmhUFQUfBBhjVzbWE1SFIbNOi6NqUSHkI06JvtmjlqMzR37gSCMxEboicbG/wVpPbICzv5y8sL"));

add this before it looks nicer

Output first version it is the ugliest HTML Code in my live
red-black heart

0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1

1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1

1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0

1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 0 0

1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0

1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1 1 0 1

0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1

0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1

0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0

1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1

0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0

1 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1

0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0

1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1

0 1 0 1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1

1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0

0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0

1 0 1 0 1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1

1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0

0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0

0 1 0 1 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0

1 1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1

0 0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1

0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1

1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1

1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0

1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 0 0

1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0

1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1 1 0 1

0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1

0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1

0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0

1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1

0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0

1 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1

0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0

1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1

0 1 0 1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1

1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0

0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0

1 0 1 0 1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1

1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0

0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0

0 1 0 1 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0

1 1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1

0 0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1

375 Bytes for create the HTML Page with PHP directly
<?$o=2841;for(;$i<16;)$t.=il.Oo[$o>>$i++&1].vey.Oo[$o>>$i++&1].u;foreach(str_split($t)as$c)$x.="0".decbin(ord($c));$a=[1,9,20,28,41,49,62,82,103,125,146,168,190,212,234,256,278,300];$z=[3,11,26,34,47,55,77,98,119,140,160,179,200,220,240,260,280,300];for($i=0;$i<483;$i++)echo $i%21?"":"
",in_array($i-88,$a)?"":"",$x[$i],in_array($i-88,$z)?"":""," ";

Just replacing color:#911;background:red with color:red; makes it conform to the bounty spec as well as saving a few bytes.

q/kdb+, 107 93 85 55 53 bytes
Solution:
23 21#0 1(,/)0b vs'@[61#"ilOveyOu";0x020e1222262e;_:]

Example:
q)23 21#0 1(,/)0b vs'@[61#"ilOveyOu";0x020e1222262e;_:]
0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 1
1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1
1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 1 0
1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 0 0
1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1 0
1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1 1 0 1
0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1
0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0 1
0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0
1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1
0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1 0
1 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0 1 1 1
0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0
1 1 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 1
0 1 0 1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1 1
1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0
0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0
1 0 1 0 1 1 1 1 0 0 1 0 1 1 0 1 1 1 1 0 1
1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1 0
0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0
0 1 0 1 0 1 1 1 1 0 0 1 0 1 0 0 1 1 1 1 0
1 1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 1
0 0 0 1 0 0 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1

Explanation:
23 21#0 1(,/)0b vs'@[61#"ilOveyOu";0x020e1222262e;_:] / the solution
                   @[             ;              ;  ] / apply[input;indices;function]
                                                  _:  / lowercase
                                   0x020e1222262e     / 2 14 18 34 38 46 represented in hex
                    61#"ilOveyOu"                     / 61 take "ilOveyOu" (wraps around)
             0b vs'                                   / convert into 8-bit representation
         (,/)                                         / flatten
      0 1                                             / index into 0 / 1 (convert from booleans)
23 21#                                                / reshape

Notes:

-2 bytes thanks to ngn!

C (gcc), 102 bytes
f(i){for(i=0;i<483;)printf("\n%2d"+!!(i++%21),(i/8%4^2|35609>>i/32&1?"iloveyou"[i/8%8]:79)>>7-i%8&1);}

Rundown
f(i){
for(i=0;i<483;)         Loop through bits.
printf("\n%2d"
+!!(i++%21),            Decide if newline in format string should be skipped.
(i/8%4^2|               Are we at a non-'o' letter?
                        (They occur every 4th letter, starting at index 2.)
35609>>i/32&1?          Check with magic number if the 'o' should be capital.
"iloveyou"[i/8%8]:      If not-'o' or not capital, use current letter.
79)                     Otherwise, use the letter 'O'.
>>7-i%8&1               Extract bit to write.
);}

Try it online!

PHP, 121 bytes
for($n=5682;$i++<60;)for($b=8;$b;)$p.=(1&ord(~$i&3||($n/=2)&1?uiloveyo[$i%8]:O)>>--$b)." ";echo wordwrap($p."0 1 1",42);

breakdown
$n=2*bindec("000101100011001"); // where to NOT replace o with O
for($i=1;$i<61;$i++)            // loop $i from 1 to 60
{
    $c=
        ~$i&3                       // $i%4!=3
        ||
        ($n/=2)&1                   // or (1. shift $n, 2. test bit 0)
        ? "uiloveyo"[$i%8]          // yes: character from string
        : "O"                       // no: uppercase "O"
    ;
    for($b=8;$b--;)                 // run from bit 7 to bit 0
        $p.=(1 & ord($c)>>$b). " ";     // append 1 or 0 plus space
}
$p.="0 1 1";                    // append the missing three bits
echo wordwrap($p,42);           // wrap at column 42 (actually 41; 42 is space -> gets cut)

K (oK), 50 48 bytes
Solution:
23 21#,/(8#2)\'@[61#"ilOveyOu";0x020e1222262e;_]

Try it online!
Explanation:
Port of my Q/KDB+ solution.
Notes:

-2 bytes thanks to ngn!

2 14 18 34 38 46 -> 0x020e1222262e

Python 3, 199 Bytes:
z='01111011101'
a='011010010110110001'
b=z+'10011001010111100101'
[print(' '.join(''.join([a+i[0]+b+i[1]+z+'01'for i in'10 01 10 00 11 01 00'.split()])+a+'0'+b[:16])[i:i+41])for i in range(0,966,42)]

Python 3, 170 bytes
from textwrap import*
print('\n'.join(' '.join(list(i))for i in wrap(''.join(bin(ord(i)+256)[3:]for i in (7*"il%svey%su")%(tuple("oOOooOOOooOoOO"))+"ilOv"),21))+" 0 1 1")

makes a string repetition of "Il%svey%su", repeats it the required number of times, then uses a tuple to sub all the o's in. it then converts it to binary, uses the textwrap module, converts each item of the new list to list, joins with space, then appends 0 1 1 because that seems to be a stub or something

Mathematica, 123 bytes (275 with color)
I'm not sure if using Grid instead of outputting a string is OK (if not then this is a non-competing entry).
B/W
Grid@Partition[ReplacePart[PadLeft[{},483,IntegerDigits[36^^nz4sp78k5qyb,2,64]],
Thread[51+32{0,1,4,5,6,9,11,12,13}->0]],21]

Color
Grid[Partition[ReplacePart[PadLeft[{},483,IntegerDigits[36^^nz4sp78k5qyb,2,64]],
Thread[51+32{0,1,4,5,6,9,11,12,13}->0]],21],ItemStyle->{{},{},Thread[Join@@MapIndexed[
Thread@{Range@@#,2+First@#2}&,Thread[Partition[IntegerDigits[36^^k32b741shmsoiwed4vnakt],
17]+{0,10}]]->Red]}]

Is it possible to copy/paste the result from grid in plain text and paste it into notepad? What does it look like? Space separated (single space) with newlines, as the figure shows?

Ruby 142 Bytes
(('iloveyOuilOveyouiloveyOuilOveyOuiloveyouilOveyouilOveyOuilOv'.unpack('B*')[0]+'011').split(/(.{21})/)-['']).map{|i|puts(i.chars.join(' '))}

(Slightly more) legibly:
(('iloveyOuilOveyouiloveyOuilOveyOuiloveyouilOveyouilOveyOuilOv'.unpack('B*')[0]+'011')
  # unpack turns it into a binary string, [0] takes the first element, and then we add on the trailing 011
.split(/(.{21})/) -[''])
  # split it every group of 21 characters and remove the empty strings that are also included
.map { |i| puts(i.chars.join(' ')) }
  # take each string of 21 characters, get its chars and join them with an empty string for formatting (puts takes care of the newlines)

I have not yet found a way to condense the original text into a more succinct form in Ruby - it has some great String manipulation functions, but all of the ways I've tried use more characters than the string itself. Any pointers appreciated, this is my first Code Golf on StackOverflow!

Welcome to Programming Puzzles and Code Golf Stack Exchange! Have you tried setting the string to a variable (e.g. a), then doing a+a+a...? Even better, if Ruby supports multiplication of strings, a*count!

@wizzwizz4, the string isn't pure string repetition. :) (There are likely better ways to do this though, but I don't think a+a+a is the way)

I know! Make an all lower-case short version, repeat it, then replace the nth o with a capital O!

Rust, 195 bytes
||for(c,i)in"iloveyOuilOveyouiloveyOuilOveyOuiloveyouilOveyouilOveyOuilOve".bytes().fold(String::new(),|a,c|format!("{}0{:b}",a,c)).chars().zip(1..484){print!("{}{}",c,if i%21!=0{' '}else{'\n'})}

Ungolfed:
fn main(){
    // convert bytes of the string to binary numerals.
    let s = "iloveyOuilOveyouiloveyOuilOveyOuiloveyouilOveyouilOveyOuilOve"
        .bytes()
        .fold(String::new(),|a,c|format!("{}0{:b}",a,c));

    // print them over the range with newlines/spaces as appropriate
    for(c,i) in s.chars().zip(1..484) {
        print!("{}{}",c,if i%21!=0{' '}else{'\n'})
    }
}

Pyth, 47 bytes
jPcjdsm+0.BCdtPs.i*8c"uil vey"dmr\o!djC\䱨2 42

Try it online here.
jPcjdsm+0.BCdtPs.i*8c"uil vey"dmr\o!djC\䱨2 42   Implicit: d=" "
                    c"uil vey"d                  Chop "uil vey" on spaces, to yield ["uil" "vey"]
                  *8                             Repeat the above 8 times - {1}
                                      C\䱨       Character code of 䱨, yields 19560
                                     j    2      Convert the above to base 2
                               m                 Map the digits of the above, as d, using:
                                r\o!d            If d is 0, yield "O", otherwise "o" - {2}
                .i                               Interleave {1} with {2}
               s                                 Concatenate into a string
                                                   This yields "uiloveyOuilOveyouiloveyOuilOveyOuiloveyouilOveyouilOveyOuilOvey"
             tP                                  Remove first and last characters of the above
      m                                          Map each character, as d, using:
           Cd                                      Get character code
         .B                                        Convert to binary string
       +0                                          Prepend 0 (all binary strings will be length 7, so this pads to length 8)
     s                                           Flatten the result of the map
   jd                                            Join on spaces
  c                                        42    Chop into strings of length 42
 P                                               Discard the last, partial, string
j                                                Join on newlines, implicit print

///, 220 bytes
/H/2E//G/CBDCC//F/ABC2C//E/AC//D/2B//C/A2//A/33//B/32//2/0 //3/1 /2G22C3
ABFDB3
ABDBHABB
BG2D2
EFDB
EDCEAB3
DG22A
HFD3
HDBHAB
BBG223
2HFD
BEDBHA3
DBG22
CEF23
DEDCEA
BBBG2
DHF2
BBEDCE3
CBBG
2DHF
DBEDBH
ABBBCBDCA
22DHABC2A

Try it online!

C++11, Non-competing, 726 687 636 bytes (*NIX or W10 threshold 2 required)
#include <iostream>
#include <string>
#ifdef  _WIN32
#include <Windows.h>
#endif
using namespace std;int main() {
#ifdef  _WIN32
HANDLE h=GetStdHandle(-11);DWORD m;GetConsoleMode(h,&m);SetConsoleMode(h,m|0x04);
#endif
cout<<"\033[47m\033[30m";string d("4fup8y8hihjyl9g1ifh9wpc4f52l5a8giosim2isj80xff814db9wmf958x4zlbl58x4zlbl6zxgjt9whbcz4mu91r0j5c4kfq48uxw53w1zvpdshv6ylrnl3t38qyiteyw0lphs3kx59vf4ezay145thrt7lkb80w83nz10ih27f77p0820wzr9");for(int s=0;s!=184;s+=8){unsigned long long n=stoull(d.substr(s,8),NULL,36),i=3;for(int p=40;p!=-2;p-=2){int r=(n&(i<
>p;printf(r>1?"\033[31m %d\033[30m":" %d",r>1?r-2:r);}puts("");}return 0;}

I know this can be golfed way better. I want to see a short c++ answer damnit!
I also probably made a few mistakes when I was encoding the heart section.
Output (colors fixed):

I assumed that only the heart section contained the message, so I encoded the whole thing. Needless to say I felt like an idiot when I reread the challenge and tested the first few lines of the output in ascii.

Python, 473 bytes
Colored!
r=str.replace;print r(r(r(r(r(r(r(r("""
jh0k1k1k0jk1
ikik1kjk0h1
ik0hjikih
k1h0k1k1k00k0
i1ksi1ejk0s1ke0h
i1sk0kie0si1kiek1
0ks1hje0s1k1k0ej1
j1s1kik1kjkjej
jsik0hjikiek
ksk1h0k1k1k0ej
0jsikik1kjk0ek
k1sik0hjikei1
0k1sjh0k1ke1k00
1kis1kik1k0e1kj
0ki1sk0k1k1eiki
hk1sh0ke1k1k0
0kji1sj1ke1kjk0
hi1ks0ke1ki1k1
1hk1ks1e00k1k1k
00kjikik1kjk
0hi1k0hjik
ihk1h0k1ki
000kjikik1kj1
""",'h','1010'),'i','11'),'j','01'),'k','10'),'1','1 '),'0','0 '),'s','\x1b[0;40;31m'),'e','\x1b[0m')

str.translate might be a better choice

FEU, 360 bytes
m/a/0 1 /b/1 0 /c/1 1 /d/0 0 /e/0 /f/1 /g
__DATA__
afaeaafabeab1
cfacababaae1
cbaaeacfaca0
fafaeaafabeae0
ccacababaa0
cfbaafacfafb1
aafaeaafabea1
acfacababae1
acbaaeacfac0
faafaeaafabd1
eacfacababa0
facbaaeacfaf1
aaafaeaafabe0
cacfacababe1
aacbaafacfa1
faaafaeaafab0
aeacfacabab0
faacbaafacb1
caaafaeaafaf0
eaeacfacabaf0
aaacbaaeacf0
cfaaafaeaafa1
daeacfacaba1

Just stupid compression

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
The Solitude of Prime Numbers
Recently I read the novel "The Solitude of Prime Numbers" where the main characters are somewhat compared to twin prime numbers ("always together, but never touching").

A twin prime is a prime number that is either \$\require{cancel}2\$ less or \$2\$ more than another prime number —for example, the twin prime pair \$(41, 43)\$. In other words, a twin prime is a prime that has a prime gap of two. Sometimes the term twin prime is used for a pair of twin primes; an alternative name for this is prime twin or prime pair. Wikipedia

Although I didn't like much the depressing novel, and since I have fallen into PPCG lately, that raised a question in my mind...
Task:
Given a positive integer number \$N > 4\$, find the lonely prime numbers (AKA isolated prime numbers) between the closest couples of twin primes.
Please note that in this case with the term lonely prime numbers, I mean all the prime numbers that are not twin primes and between couples of twin primes. That's why \$N > 4\$ because the first two couples of prime numbers are \$(3, 5)\$ and \$(5, 7)\$.
Example:

\$N = 90\$.
Find the first two couples of twin primes \$< N\$ and \$> N\$. They are: \$(71, 73)\$ and \$(101, 103)\$.
Find the lonely primes in the range \$> 73\$ and \$< 101\$.
They are: \$79, 83, 89, 97\$.

Special cases:
- If N is in between two twin prime numbers, find the closest couples of twin primes \$> N+1\$ and \$< N-1\$. Example: \$N=72\$, find the closest couples of twin primes \$> 73\$ and \$< 71\$ then exclude from the list \$71\$ and \$73\$ because they are not *lonely primes*. So for \$N = 72\$ the expected result is:  \$67, \cancel{71}, \cancel{73}, 79, 83, 89, 97\$
- If N belongs to a couple of twin primes, for example \$N = 73\$, the closest couples of twin primes are \$(71, 73)\$ and \$(101, 103)\$. If \$N = 71\$, the closest couples of twin primes are \$(59, 61)\$ and \$(71, 73)\$.
Test cases:
N = 70   >  Lonely primes are:  67
N = 71   >  Lonely primes are:  67
N = 72   >  Lonely primes are:  67, 79, 83, 89, 97 (not the twins 71 and 73)
N = 73   >  Lonely primes are:  79, 83, 89, 97
N = 90   >  Lonely primes are:  79, 83, 89, 97
N = 201  >  Lonely primes are:  211, 223
N = 499  >  Lonely primes are:  467, 479, 487, 491, 499, 503, 509

Rules:

Write a full program or function that will take the number N from standard input.
Output the list of lonely primes in a readable format as csv, list, array, etc.
Shortest code wins.
Please include (when possible) a testable online fiddle.

What is the expected output for inputs like 71, 72 or 73?

Lonely Prime AKA Isolated Prime

@MartinEnder I extended my question with special cases. Thanks for the clarification.

@DigitalTrauma I used Lonely Prime (in italics) on purpose to follow the novel's title. I added anyway the proposed specification.

I find the special cases spoil the challenge a little (and were added when some answers had already been posted)

@JonathanAllan Yes you can consider N > 4 because the first two couples of twin prime numbers are (3, 5) and (5, 7). I addedd the specification to make it clear to everyone.

@LuisMendo I added the special cases as clarification for the expected results, expecially in the case when N is in between a couple of twin primes.

Note: There are no prime triplets or quadruplets without an uneven non-prime between them. Triplets always have a number divisble by 3 between them, and Quadruplets always a number divisible by 15.

What is the expected result for N=5?

@Titus for N=5 the result is empty output because between the first two couples of twin primes there are no lonely primes.

5 is twin to 3 and 7 ... until now it was undefined which twin should count. Apparently 7. Thanks; this renders regarding 5 as even more special obsolete.

Do the printed primes need to be in any particular order?

@TimmyD no particular order just a list of them

Actually, 47 bytes
This solution deals with the case where n is between two twin primes, by checking if the lower bound is the larger of a pair of twin primes (eliminating the twin prime to the left of us from being our lower bound) and if the upper bound is the smaller of a pair of twin primes (eliminating the twin prime to the right of us from being our upper bound). To prevent the twin primes from being included in our range once we have the lower and upper bounds, we need to remove primes p where p-2 OR p+2 are prime, hence the logical OR and negate in the code.
This is a little long and can probably be golfed further. Golfing suggestions welcome. Try it online!
╗1`╜+;⌐p@p&`╓F╜+1`╜-;¬p@p&`╓F╜-x`;;¬p@⌐p|Y@p&`░

Ungolfing
╗         Store implicit input n in register 0.

1`...`╓   Get the first value x for which the following function f returns a truthy value.
  ╜         Push n from register 0.
  +         Add x to n.
  ;⌐        Duplicate n+x and add 2 to a copy of n+x.
  p         Check if n+x+2 is prime.
  @p        Swap n+x to TOS and check if n+x is prime.
  &         Logical AND the two results.
F         Push the first (and only) result of previous filtering
╜+        Add that result to n to get the upper bound for our solitude.

1`...`╓   Get the first value x for which the following function f returns a truthy value.
  ╜         Push n from register 0.
  -         Subtract x from n.
  ;¬        Duplicate n-x and subtract 2 from a copy of n-x.
  p         Check if n-x-2 is prime.
  @p        Swap n-x to TOS and check if n-x is prime.
  &         Logical AND the two results.
F         Push the first (and only) result of previous filtering.
╜-        Subtract that result from n to get the lower bound for our solitude.

x`...`░   Push values of the range [a...b] where f returns a truthy value. Variable m.
  ;;        Duplicate m twice.
  ¬p        Check if m-2 is prime.
  @⌐p       Check if m+2 is prime.
  |Y        Logical OR the results and negate.
             This eliminates any numbers with neighboring primes.
  @p        Check if m is prime.
  &         Logical AND primality_check(m) and the previous negation.
             This keeps every other prime number in the range.

I don't get expected output 23 when input 24 is given. The twin prime bounds should be 17 / 19 and 29 / 31, and 23 is an isolated prime in the range 19 .. 29.

@TimmyD Oh for the love of esolangs. Either the bug where p says 25 is prime hasn't been fixed yet, or Dennis hasn't pulled Actually since the bug fix. Let me go check.

@TimmyD As the bug fix was already completed, this answer is still valid as the main interpreter worked. It was just that the online interpreter, Try It Online, had not been updated yet. It has since been updated and TIO should work now.

Yep - thanks for the explanation!

PowerShell v2+, 237 149 147 231 216 181 174 169 166 bytes
param($n)filter f($a){'1'*$a-match'^(?!(..+)\1+$)..'}for($i=$n;!((f $i)-and(f($i+2)))){$i++}for(){if(f(--$i)){if((f($i-2))-or(f($i+2))){if($i-lt$n-1){exit}}else{$i}}}

Takes input $n. Defines a new function f as the regex prime function (here returning a Boolean if the input is a prime or not).
The next part sets $i to be equal to $n, then loops upward until we find the bottom half of our twin prime pair upper bound. E.g., for input 90, this stops at $i=101.
Then, we loop from the upper bound downward. I know, it looks like an infinite loop, but it'll eventually end.
If the current number is a prime (f(--$i)), but its +/- 2 isn't a prime, we add $i to the pipeline. However, if its +/- 2 is a prime, we check whether we're lower than $n-1 (i.e., to account for the situation when it's inside a twin prime pair), at which point we exit. At program completion, the pipeline is printed to screen via implicit Write-Output.
NB - Due to the looping structure, prints the primes in descending order. OP has clarified that's OK.
Examples
Output here is space-separated, as that's the default stringification method for an array.
PS C:\Tools\Scripts\golfing> 70,71,72,73,90,201,499,982|%{"$_ --> "+(.\the-solitude-of-prime-numbers.ps1 $_)}
70 --> 67
71 --> 67
72 --> 97 89 83 79 67
73 --> 97 89 83 79
90 --> 97 89 83 79
201 --> 223 211
499 --> 509 503 499 491 487 479 467
982 --> 1013 1009 997 991 983 977 971 967 953 947 941 937 929 919 911 907 887

Haskell, 105 bytes
p x=all((>0).mod x)[2..x-1]
a%x=until(\z->p z&&p(z+2*a))(+a)x
f n=[x|x<-[(-1)%n+1..1%n-1],p x,1%x>x,(-1)%x<x]

Try it Online

JavaScript, 186 183 168 158 Bytes

// solution:
function d(d){function p(n){for(i=n;n%--i;);return!--i}u=d;for(;!p(d--)||!p(--d););for(;!p(u++)||!p(++u););for(;++d<u;)if(p(d)&&!p(d-2)&&!p(d+2))console.log(d)}

// runnable test cases:
console.info('Test ' + 70);
d(70);
console.info('Test ' + 71);
d(71);
console.info('Test ' + 72);
d(72);
console.info('Test ' + 73);
d(73);
console.info('Test ' + 90);
d(90);
console.info('Test ' + 201);
d(201);
console.info('Test ' + 499);
d(499);

Welcome to PPCG! Nice first answer.

Jelly, 29 27 bytes
ÆRf+¥2ṪæRÆn+2Ẓ¬Ɗ¿ð_;+ẒẸµÐḟ2

Try it online!
-2 bytes thanks to Unrelated String
How it works
ÆRf+¥2ṪæRÆn+2Ẓ¬Ɗ¿ð_;+ẒẸµÐḟ2 - Main link. Takes N on the left
ÆR                          - Yield all primes ≤ N; Z
    ¥2                      - Group the previous 2 links into a dyad f(Z, 2):
   +                        -   Add 2 to each element in Z
  f                         -   Keep all elements in both Z and Z+2
      Ṫ                     - Take the last number
                                 This is the largest twin prime < N, T

                ¿           - While loop:
               Ɗ            -   Condition f(X):
           +2               -     X+2
              ¬             -     Is not:
             Ẓ              -     Prime
         Æn                 -   Body: X is the next prime after X

       æR                   - Prime range; Yield a list of primes T ≤ P ≤ X

                 ð     µ  2 - Define a dyadic chain f(P, 2):
                  _         -   P-2
                    +       -   P+2
                   ;        -   [P-2, P+2]
                     Ẓ      -   Test if each is prime
                      Ẹ     -   Are either true?
                        Ðḟ  - Filter the range T ≤ P ≤ X, keeping those for which f(P, 2) is false

You can golf ÆRṖ+2ẒƇ to ÆRf+¥2, and +2Ẓ×ẒƲ1#Ḣ to Æn+2Ẓ¬Ɗ¿. I'd post my own solution, if I could think of a way around the bit at the end...

PHP, 207 bytes
47 54 bytes for the is_prime function that PHP does not have.
I´d beat Mathematica without that. :-D
function p($n){for($i=$n>1?$n:4;$n%--$i;);return$i<2;}if(p($n=$argv[1])&p($n+2)|$z=p($n-1)&p($n+1))$n-=2;for($n|=1;!p($n)|!p($n-2);$n--);for($z++;$z--;$n+=2)for(;$n+=2;)if(p($n)){if(p($n+2))break;echo"$n,";}

run with -r. prints a trailing comma.
breakdown
// is_prime function:
// loops from $n-1 down to 1, breaks if it finds a divisor.
// returns true if divisor is <2 (==1)
// special case $n==1: initialize $i=4 to prevent warnings
function p($n){for($i=$n>1?$n:4;$n%--$i;);return$i<2;}

// is $n between primes?
if($z=p(1+$n=$argv[1])&p($n-1)) // set $z to go to the _second_ twin pair above
    $n-=2;
// no:
else
    if(p($n)&p($n+2))$n-=2;     // $n is part of the upper pair
    // p($n)&p($n-2):           // $n is part of the lower pair
    // else:                    // this is a lonely (isolated) prime

// 1. find closest twins <=$n
for($n|=1;!p($n)|!p($n-2);$n--);

// 2. list primes until the next twin primes
L:
for(;$n+=2;)if(p($n))
    if(p($n+2))break;       // next twin primes found: break loop
    else echo"$n,";         // isolated prime: print

// 3. if ($z) repeat (once)
$n+=2;  // skip twin pair
if($z--)goto L;

Note:
The is_prime function actually returns true for $n<2; but at least it doesn´t produce a warning.
Insert $n= before $n>1 to fix.

http://php.net/manual/en/function.gmp-nextprime.php could this library help?

@JörgHülsermann: If would give at least 11 bytes, if gmp would be in the standard install. Try it.

Mathematica, 169 157 bytes
Select[PrimeQ]@Sort@Flatten@{If[q@#,0,#],Most@NestWhileList[i-=2;#+i&,#,!q@#&]&/@(i=3;q=PrimeQ@#&&Or@@PrimeQ[{2,-2}+#]&;#+{1,-1}(1+Boole@PrimeQ[{1,-1}+#]))}&

Racket 245 bytes
(λ(n)(let((pl(reverse(let lp((n n)(t 0)(ol '()))(set! t(prev-prime n))(if(and(>(length ol)0)
(= 2(-(car ol)t)))(cdr ol)(lp t 0(cons t ol)))))))(let lq((n n)(t 0)(ol pl))(set! t(next-prime n))
(if(= 2(- t(car ol)))(cdr ol)(lq t 0(cons t ol))))))

Ungolfed version:
(require math)
(define f
  (lambda(n)
    (let ((pl
           (reverse
            (let loop ((n n) (t 0) (ol '()))
              (set! t (prev-prime n))
              (if (and
                   (> (length ol) 0)
                   (= 2 (- (car ol) t)))
                  (cdr ol)
                  (loop t 0 (cons t ol)))))))
      (let loop2 ((n n) (t 0) (ol pl))
        (set! t (next-prime n))
        (if (= 2 (- t (car ol)))
            (cdr ol)
            (loop2 t 0 (cons t ol))))))
  )

(f 90)

Output:
'(97 89 83 79)

Racket 228 bytes
(λ(n)(let*((t 0)(lr(λ(l i)(list-ref l i)))(pl(drop(reverse(for/list((i(in-naturals))#:when(prime? i)#:final(and(> i n)
(= 2(- i t))))(set! t i)i))2)))(for/list((i(length pl))#:break(= 2(-(lr pl i)(lr pl(add1 i)))))(lr pl i))))

Disadvantage of this version is that it finds all prime numbers till N and not just those around N.
Ungolfed version:
(define (f n)
  (let* ((t 0)
         (lr (λ(l i) (list-ref l i)))
         (pl (drop(reverse
                   (for/list ((i (in-naturals))
                              #:when (prime? i)
                              #:final (and
                                       (> i n)
                                       (= 2 (- i t))))
                     (set! t i)
                     i)) 2)))
    (for/list ((i (length pl))
               #:break (= 2 (- (lr pl i) (lr pl (add1 i)))) )
      (lr pl i)))
)

Testing:
(f 90)

Output:
'(97 89 83 79)

Python 2.7: 160 bytes
t=lambda n:all(n%d for d in range(2,n))
def l(n):
 i=n
 while t(i)*t(i+2)-1:i+=1
 while t(n)*t(n-2)-1:n-=1
 print[x for x in range(n,i)if t(x)&~(t(x-2)|t(x+2))]

suggestions are welcome :)

source: Stack Exchange

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Perform Dempster's Rule of Combination
Crash Course on DST
Dempster–Shafer theory (DST) provides a method to combine various sources of evidence to form a belief.  Given a list of possible statement (one of which is the true answer), each possible combination of statements is assigned a "mass" indicating the degree of supporting evidence.  The total mass of all combinations is always equal to 1.
From these mass assignments, we can create a reasonable lower bound (belief) and upper bound (plausibility) on the truth of that combination.  The belief bel(X) of any set X is the sum of the masses of all of X's subsets (including itself).  The plausibility pl(X) of any set X is "1 - the sum of the masses of all sets disjoint to X". The diagram below illustrates how belief and plausibility are related to uncertainty.

For example, let's say that there is a traffic light that could be one of either Green, Yellow, or Red.  The list of options and a possible mass assignment is shown below:
binary    interpretation    m(X)    bel(X)  pl(x)
000       null              0       0       0
001       R                 0.2     0.2     0.7
010       Y                 0.1     0.1     0.3
011       Y||R              0.05    0.35    0.8
100       G                 0.2     0.2     0.65
101       G||R              0.3     0.7     0.9
110       G||Y              0       0.3     0.8
111       G||Y||R           0.15    1       1

These masses can be notated by an array [0, 0.2, 0.1, 0.05, 0.2, 0.3, 0, 0.15].
Now the question is, how do we decide what the masses are?  Let's say that we had a sensor looking at the light, and this sensor indicates that the light not green; however, we know that there's a 20% chance that the sensor sent a random, spurious signal.  This piece of evidence can be described by the mass distribution [0, 0, 0, 0.8, 0, 0, 0, 0.2] where {Y,R} has a mass of 0.8 and {G,Y,R} has a mass of 0.2.
Similarly, let's say that some second sensor indicates that the light is not red, but we also know that there's a 30% chance the sensor is wrong and the light is actually red.  This piece of evidence can be describe by [0, 0.3, 0, 0, 0, 0, 0.7, 0] where {G,Y} has a mass of 0.7 and {R} has a mass of 0.3.
To assimilate these two pieces of evidence to form a single mass distribution, we can use Dempster's Rule of Combination.
Dempster's Rule of Combination
Two mass assignment m1 and m2 can be combined to form m1,2 using the following formulas, where A, B and C represent possible combinations (rows of the table above).

where K is a measure of "conflict," used for renormalization, and is calculated by:

It is also possible to describe this process geometrically, as in the image below.  If A = 011 (Yellow or Red) and B = 101 (Green or Red), then the value of m1(A) * m2(B) contributes to (is added to) the value of m1,2(001) (Red).  This process is repeated for all possible combinations of A and B where A&B != 0.  Finally, the array is renormalized so that the values add up to a total of 1.

Here is a simple Java method that combines two arrays following Dempster's rule:
public static double[] combine(double[] a, double[] b) {
  double[] res = new double[a.length];
  for (int i = 0; i < a.length; i++) {
    for (int j = 0; j < b.length; j++) {
      res[i & j] += a[i] * b[j];
    }
  }
  for (int i = 1; i < res.length; i++) {
    res[i] /= 1 - res[0];
  }
  res[0] = 0;
  return res;
}

To see how this works in practice, consider the traffic light sensors above, which independently give the masses [0, 0, 0, 0.8, 0, 0, 0, 0.2] and [0, 0.3, 0, 0, 0, 0, 0.7, 0].  After performing Dempster's rule, the resulting joint mass is [0, 0.3, 0.56, 0, 0, 0, 0.14, 0].  The majority of mass is assigned to "Yellow", which makes intuitive sense given that the two sensors returned "not green" and "not red" respectively.  The other two masses (0.3 for "Red" and 0.14 for "Green or Yellow") are due to the uncertainty of the measurements.
The Challenge
Write a program that takes two lists of real numbers and outputs the result of applying Dempster's rule to the two input lists.  The lengths of the two input lists will equal, and that length will be a power of 2, and will be at least 4.  For each list, the first value will always be 0 and the remaining values will all be non-negative and add up to 1.
Output should be a list with the same length as the input lists.  You can assume that a solution exists (it is possible for a solution to not exist when there is total conflict between evidence and thus K=1).  To place a minimum requirement on precision, your program must be able to produce results that are accurate when rounded to four decimal places.
Example I/O
in:
[0, 0, 0, 0.8, 0, 0, 0, 0.2]
[0, 0.3, 0, 0, 0, 0, 0.7, 0]
out:
[0.0, 0.3, 0.56, 0.0, 0.0, 0.0, 0.14, 0.0]

in:
[0.0, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.4]
[0.0, 0.2, 0.0, 0.2, 0.0, 0.2, 0.0, 0.4]
out:
[0.0, 0.2889, 0.0889, 0.1556, 0.0889, 0.1556, 0.0444, 0.1778]

in:
[0.0, 0.0, 0.5, 0.5]
[0.0, 0.7, 0.1, 0.2]
out:
[0.0, 0.53846, 0.30769, 0.15385]

in:
[0.0, 0.055, 0.042, 0.098, 0.0, 0.152, 0.0, 0.038, 0.031, 0.13, 0.027, 0.172, 0.016, 0.114, 0.058, 0.067]
[0.0, 0.125, 0.013, 0.001, 0.012, 0.004, 0.161, 0.037, 0.009, 0.15, 0.016, 0.047, 0.096, 0.016, 0.227, 0.086]
out: (doesn't have to be this precise)
[0.0, 0.20448589713416732, 0.11767361551134202, 0.028496524069011694, 0.11809792349331062, 0.0310457664246791, 0.041882026540181416, 0.008093533320057205, 0.12095719354780314, 0.11306959103499466, 0.06412594818690368, 0.02944697394862137, 0.06398564368086611, 0.014369896989336852, 0.03774983253978312, 0.006519633578941643]

in:
[0.0, 0.0, 0.1, 0.1, 0.0, 0.0, 0.0, 0.1, 0.1, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.1, 0.0, 0.1, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0]
[0.0, 0.0, 0.1, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.1, 0.1, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.1, 0.0, 0.0, 0.1, 0.0, 0.1, 0.0]
out:
[0.0, 0.09090909090909094, 0.23376623376623382, 0.0, 0.07792207792207795, 0.025974025974026, 0.03896103896103895, 0.0, 0.10389610389610393, 0.05194805194805199, 0.02597402597402597, 0.0, 0.012987012987012984, 0.012987012987012993, 0.012987012987012984, 0.0, 0.09090909090909094, 0.038961038961038995, 0.06493506493506492, 0.0, 0.07792207792207796, 0.0, 0.0, 0.0, 0.012987012987012984, 0.012987012987013, 0.012987012987012984, 0.0, 0.0, 0.0, 0.0, 0.0]

Some things I wanted to post in the sandbox, but didn't get the chance:
I think that most questions should be written so that anyone profecient in algebra could understand them.. here are a few things that I think should be clarified: What is m(x)? what is a disjoint set? how do you get from 20% to a set of masses? why do you need to convert masses to another set of masses? what does the theta represent in your first equation? what do A B and C represent? Why include DST if the challenge is solely based on DRC? no need to confuse people.

@trichoplax I added a minimum precision requirement (accurate when rounded to 4 decimal places).

Perl, 68 bytes
Includes +2 for -an
Give the first set as row and the second as a column on STDIN
perl -M5.010 dempster.pl
0.0  0.0  0.5  0.5
0.0
0.7
0.1
0.2
^D
^D

dempster.pl:
#!/usr/bin/perl -an
/$/,map$H[$m%@F&$m++/@F]+=$_*$`,@F for<>;say$%++&&$_/(1-"@H")for@H

A pretty standard golf solution. Doesn't work if I replace @H by @;

Nice one. About the "doesn't work with @;" : see http://stackoverflow.com/questions/39521060/why-are-etc-not-interpolated-in-strings

@Dada That stack overflow answer was very useful. I vaguely knew these variables don't interpolate but never understood the reason. And it saves me a byte in Praming Puzles & Colf: Condense a String

Before your edit, you wrote "somehow", so in case you didn't know why, well it's kind of an undocumented choice in the implementation... The "doesn't work with @;" is because of the "@H" right? (If not then my bad, never mind my comment)

Yes, because of the @H After I made the post I did a bit more experimenting and saw the problem was the string interpolation so I removed the "somehow" because at least the direct reason was clear. But until you referred me to that article I still didn't know WHY that kind of interpolation doesn't work. Now I realize it's a conscious choice by the developers so users will get surprised less often by unexpected array interpolation since most users are not very aware of the punctuation variables.

Oh sorry, I misread your previous comment : I read "wasn't very useful" instead of "was very useful". Well we agree then!

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Match the Stack Exchange URLs
Prologue
After installing an anti-XSS browser extension, Stack Snippets suddenly stopped working all across the Stack Exchange network. I could no longer learn from Stack Overflow, see working demos on User Experience and, worst of all, could not test JavaScript answers on Programming Puzzles and Code Golf! Desperately I searched for a remedy, and found a small input box in the settings, in which could place a single regex. I couldn't fit all of the Stack Exchange sites in this one, small box, so I asked for help. This is that question.
Task
Your task is to create a regular expression that matches all of the Stack Exchange website URLs, without matching any domains not owned by Stack Overflow Inc..
Your regular expression must match all URLs with the following parts:

protocol: this will either be http:// or https://.
domain: this will be an item from this list:
stackoverflow.com
www.stackoverflow.com
facebook.stackoverflow.com
serverfault.com
superuser.com
meta.stackexchange.com
webapps.stackexchange.com
nothingtoinstall.com
meta.webapps.stackexchange.com
meta.nothingtoinstall.com
gaming.stackexchange.com
arqade.com
thearqade.com
meta.gaming.stackexchange.com
meta.arqade.com
meta.thearqade.com
webmasters.stackexchange.com
webmaster.stackexchange.com
meta.webmasters.stackexchange.com
meta.webmaster.stackexchange.com
cooking.stackexchange.com
seasonedadvice.com
meta.cooking.stackexchange.com
meta.seasonedadvice.com
gamedev.stackexchange.com
meta.gamedev.stackexchange.com
photo.stackexchange.com
photography.stackexchange.com
photos.stackexchange.com
meta.photo.stackexchange.com
meta.photography.stackexchange.com
meta.photos.stackexchange.com
stats.stackexchange.com
statistics.stackexchange.com
crossvalidated.com
meta.stats.stackexchange.com
meta.statistics.stackexchange.com
math.stackexchange.com
maths.stackexchange.com
mathematics.stackexchange.com
meta.math.stackexchange.com
diy.stackexchange.com
meta.diy.stackexchange.com
meta.superuser.com
meta.serverfault.com
gis.stackexchange.com
meta.gis.stackexchange.com
tex.stackexchange.com
meta.tex.stackexchange.com
askubuntu.com
ubuntu.stackexchange.com
meta.askubuntu.com
meta.ubuntu.stackexchange.com
money.stackexchange.com
basicallymoney.com
www.basicallymoney.com
meta.money.stackexchange.com
english.stackexchange.com
elu.stackexchange.com
meta.english.stackexchange.com
stackapps.com
ux.stackexchange.com
ui.stackexchange.com
meta.ux.stackexchange.com
meta.ui.stackexchange.com
unix.stackexchange.com
linux.stackexchange.com
meta.unix.stackexchange.com
meta.linux.stackexchange.com
wordpress.stackexchange.com
meta.wordpress.stackexchange.com
cstheory.stackexchange.com
meta.cstheory.stackexchange.com
apple.stackexchange.com
askdifferent.com
meta.apple.stackexchange.com
rpg.stackexchange.com
meta.rpg.stackexchange.com
bicycles.stackexchange.com
bicycle.stackexchange.com
cycling.stackexchange.com
bikes.stackexchange.com
meta.bicycles.stackexchange.com
meta.bicycle.stackexchange.com
programmers.stackexchange.com
programmer.stackexchange.com
meta.programmers.stackexchange.com
electronics.stackexchange.com
chiphacker.com
www.chiphacker.com
meta.electronics.stackexchange.com
android.stackexchange.com
meta.android.stackexchange.com
boardgames.stackexchange.com
boardgame.stackexchange.com
meta.boardgames.stackexchange.com
physics.stackexchange.com
meta.physics.stackexchange.com
homebrew.stackexchange.com
homebrewing.stackexchange.com
brewadvice.com
meta.homebrew.stackexchange.com
meta.homebrewing.stackexchange.com
security.stackexchange.com
itsecurity.stackexchange.com
meta.security.stackexchange.com
meta.itsecurity.stackexchange.com
writers.stackexchange.com
writer.stackexchange.com
writing.stackexchange.com
meta.writers.stackexchange.com
video.stackexchange.com
avp.stackexchange.com
meta.video.stackexchange.com
meta.avp.stackexchange.com
graphicdesign.stackexchange.com
graphicsdesign.stackexchange.com
graphicdesigns.stackexchange.com
meta.graphicdesign.stackexchange.com
dba.stackexchange.com
meta.dba.stackexchange.com
scifi.stackexchange.com
sciencefiction.stackexchange.com
fantasy.stackexchange.com
meta.scifi.stackexchange.com
codereview.stackexchange.com
meta.codereview.stackexchange.com
codegolf.stackexchange.com
meta.codegolf.stackexchange.com
quant.stackexchange.com
meta.quant.stackexchange.com
pm.stackexchange.com
meta.pm.stackexchange.com
skeptics.stackexchange.com
skeptic.stackexchange.com
skepticexchange.com
meta.skeptics.stackexchange.com
fitness.stackexchange.com
meta.fitness.stackexchange.com
drupal.stackexchange.com
meta.drupal.stackexchange.com
mechanics.stackexchange.com
garage.stackexchange.com
meta.mechanics.stackexchange.com
meta.garage.stackexchange.com
parenting.stackexchange.com
meta.parenting.stackexchange.com
sharepoint.stackexchange.com
sharepointoverflow.com
www.sharepointoverflow.com
meta.sharepoint.stackexchange.com
music.stackexchange.com
guitars.stackexchange.com
guitar.stackexchange.com
meta.music.stackexchange.com
sqa.stackexchange.com
meta.sqa.stackexchange.com
judaism.stackexchange.com
mi.yodeya.com
yodeya.com
yodeya.stackexchange.com
miyodeya.com
meta.judaism.stackexchange.com
german.stackexchange.com
deutsch.stackexchange.com
meta.german.stackexchange.com
japanese.stackexchange.com
meta.japanese.stackexchange.com
philosophy.stackexchange.com
meta.philosophy.stackexchange.com
gardening.stackexchange.com
landscaping.stackexchange.com
meta.gardening.stackexchange.com
travel.stackexchange.com
meta.travel.stackexchange.com
productivity.stackexchange.com
meta.productivity.stackexchange.com
crypto.stackexchange.com
cryptography.stackexchange.com
meta.crypto.stackexchange.com
meta.cryptography.stackexchange.com
dsp.stackexchange.com
signals.stackexchange.com
meta.dsp.stackexchange.com
french.stackexchange.com
meta.french.stackexchange.com
christianity.stackexchange.com
meta.christianity.stackexchange.com
bitcoin.stackexchange.com
meta.bitcoin.stackexchange.com
linguistics.stackexchange.com
linguist.stackexchange.com
meta.linguistics.stackexchange.com
hermeneutics.stackexchange.com
meta.hermeneutics.stackexchange.com
history.stackexchange.com
meta.history.stackexchange.com
bricks.stackexchange.com
meta.bricks.stackexchange.com
spanish.stackexchange.com
espanol.stackexchange.com
meta.spanish.stackexchange.com
scicomp.stackexchange.com
meta.scicomp.stackexchange.com
movies.stackexchange.com
meta.movies.stackexchange.com
chinese.stackexchange.com
meta.chinese.stackexchange.com
biology.stackexchange.com
meta.biology.stackexchange.com
poker.stackexchange.com
meta.poker.stackexchange.com
mathematica.stackexchange.com
meta.mathematica.stackexchange.com
cogsci.stackexchange.com
meta.cogsci.stackexchange.com
outdoors.stackexchange.com
meta.outdoors.stackexchange.com
martialarts.stackexchange.com
meta.martialarts.stackexchange.com
sports.stackexchange.com
meta.sports.stackexchange.com
academia.stackexchange.com
academics.stackexchange.com
meta.academia.stackexchange.com
cs.stackexchange.com
computerscience.stackexchange.com
meta.cs.stackexchange.com
workplace.stackexchange.com
meta.workplace.stackexchange.com
windowsphone.stackexchange.com
meta.windowsphone.stackexchange.com
chemistry.stackexchange.com
meta.chemistry.stackexchange.com
chess.stackexchange.com
meta.chess.stackexchange.com
raspberrypi.stackexchange.com
meta.raspberrypi.stackexchange.com
russian.stackexchange.com
meta.russian.stackexchange.com
islam.stackexchange.com
meta.islam.stackexchange.com
salesforce.stackexchange.com
meta.salesforce.stackexchange.com
patents.stackexchange.com
askpatents.com
askpatents.stackexchange.com
meta.patents.stackexchange.com
meta.askpatents.com
meta.askpatents.stackexchange.com
genealogy.stackexchange.com
meta.genealogy.stackexchange.com
robotics.stackexchange.com
meta.robotics.stackexchange.com
expressionengine.stackexchange.com
meta.expressionengine.stackexchange.com
politics.stackexchange.com
meta.politics.stackexchange.com
anime.stackexchange.com
meta.anime.stackexchange.com
magento.stackexchange.com
meta.magento.stackexchange.com
ell.stackexchange.com
meta.ell.stackexchange.com
sustainability.stackexchange.com
meta.sustainability.stackexchange.com
tridion.stackexchange.com
meta.tridion.stackexchange.com
reverseengineering.stackexchange.com
meta.reverseengineering.stackexchange.com
networkengineering.stackexchange.com
meta.networkengineering.stackexchange.com
opendata.stackexchange.com
meta.opendata.stackexchange.com
freelancing.stackexchange.com
meta.freelancing.stackexchange.com
blender.stackexchange.com
meta.blender.stackexchange.com
mathoverflow.net
mathoverflow.stackexchange.com
mathoverflow.com
meta.mathoverflow.net
space.stackexchange.com
thefinalfrontier.stackexchange.com
meta.space.stackexchange.com
sound.stackexchange.com
socialsounddesign.com
sounddesign.stackexchange.com
meta.sound.stackexchange.com
astronomy.stackexchange.com
meta.astronomy.stackexchange.com
tor.stackexchange.com
meta.tor.stackexchange.com
pets.stackexchange.com
meta.pets.stackexchange.com
ham.stackexchange.com
meta.ham.stackexchange.com
italian.stackexchange.com
meta.italian.stackexchange.com
pt.stackoverflow.com
br.stackoverflow.com
stackoverflow.com.br
meta.pt.stackoverflow.com
meta.br.stackoverflow.com
aviation.stackexchange.com
meta.aviation.stackexchange.com
ebooks.stackexchange.com
meta.ebooks.stackexchange.com
alcohol.stackexchange.com
beer.stackexchange.com
dranks.stackexchange.com
meta.alcohol.stackexchange.com
meta.beer.stackexchange.com
softwarerecs.stackexchange.com
meta.softwarerecs.stackexchange.com
arduino.stackexchange.com
meta.arduino.stackexchange.com
cs50.stackexchange.com
meta.cs50.stackexchange.com
expatriates.stackexchange.com
expats.stackexchange.com
meta.expatriates.stackexchange.com
matheducators.stackexchange.com
meta.matheducators.stackexchange.com
meta.stackoverflow.com
earthscience.stackexchange.com
meta.earthscience.stackexchange.com
joomla.stackexchange.com
meta.joomla.stackexchange.com
datascience.stackexchange.com
meta.datascience.stackexchange.com
puzzling.stackexchange.com
meta.puzzling.stackexchange.com
craftcms.stackexchange.com
meta.craftcms.stackexchange.com
buddhism.stackexchange.com
meta.buddhism.stackexchange.com
hinduism.stackexchange.com
meta.hinduism.stackexchange.com
communitybuilding.stackexchange.com
moderator.stackexchange.com
moderators.stackexchange.com
meta.communitybuilding.stackexchange.com
meta.moderators.stackexchange.com
startups.stackexchange.com
meta.startups.stackexchange.com
worldbuilding.stackexchange.com
meta.worldbuilding.stackexchange.com
ja.stackoverflow.com
jp.stackoverflow.com
meta.ja.stackoverflow.com
emacs.stackexchange.com
meta.emacs.stackexchange.com
hsm.stackexchange.com
meta.hsm.stackexchange.com
economics.stackexchange.com
meta.economics.stackexchange.com
lifehacks.stackexchange.com
meta.lifehacks.stackexchange.com
engineering.stackexchange.com
meta.engineering.stackexchange.com
coffee.stackexchange.com
meta.coffee.stackexchange.com
vi.stackexchange.com
vim.stackexchange.com
meta.vi.stackexchange.com
musicfans.stackexchange.com
meta.musicfans.stackexchange.com
woodworking.stackexchange.com
meta.woodworking.stackexchange.com
civicrm.stackexchange.com
meta.civicrm.stackexchange.com
health.stackexchange.com
meta.health.stackexchange.com
ru.stackoverflow.com
hashcode.ru
stackoverflow.ru
meta.ru.stackoverflow.com
meta.hashcode.ru
rus.stackexchange.com
russ.hashcode.ru
russ.stackexchange.com
meta.rus.stackexchange.com
mythology.stackexchange.com
meta.mythology.stackexchange.com
law.stackexchange.com
meta.law.stackexchange.com
opensource.stackexchange.com
meta.opensource.stackexchange.com
elementaryos.stackexchange.com
meta.elementaryos.stackexchange.com
portuguese.stackexchange.com
meta.portuguese.stackexchange.com
computergraphics.stackexchange.com
meta.computergraphics.stackexchange.com
hardwarerecs.stackexchange.com
meta.hardwarerecs.stackexchange.com
es.stackoverflow.com
meta.es.stackoverflow.com
3dprinting.stackexchange.com
threedprinting.stackexchange.com
meta.3dprinting.stackexchange.com
ethereum.stackexchange.com
meta.ethereum.stackexchange.com
latin.stackexchange.com
meta.latin.stackexchange.com
languagelearning.stackexchange.com
meta.languagelearning.stackexchange.com
retrocomputing.stackexchange.com
meta.retrocomputing.stackexchange.com
crafts.stackexchange.com
meta.crafts.stackexchange.com
korean.stackexchange.com
meta.korean.stackexchange.com
monero.stackexchange.com
meta.monero.stackexchange.com
ai.stackexchange.com
meta.ai.stackexchange.com
esperanto.stackexchange.com
meta.esperanto.stackexchange.com
sitecore.stackexchange.com
meta.sitecore.stackexchange.com

page: this will either be the empty string, / or / followed by any string

The url will be the string created by appending protocol, domain and page to each other, in that order.
Testcases
Your regex must match:
https://codegolf.stackexchange.com/
http://retrocomputing.stackexchange.com
https://facebook.stackoverflow.com/questions/1234
http://meta.nothingtoinstall.com/thisisa404.php?file=command.com

Your regex must not match:
http//codegolf.stackexchange.com/
https://meta.stackoverflow.com.fakesite.dodgy/cgi-bin/virus.cgi?vector=apt
file://www.stackoverflow.com/
http://ripoff.com/stackoverflow.com/q/1234/

Your regex may match:
http://panda.stackexchange.com/
https://www.meta.codegolf.stackexchange.com
http://alpha.beta.charlie.delta.chiphacker.com
https://stackexchange.com/sites/

because these are owned by Stack Exchange Inc. and so will not be vulnerable to XSS attacks.
This is a code-golf challenge, so the shortest regular expression wins!

What do you mean 'may match'? Shouldn't those also be in 'must match'? We generally do not take kindly to 'bonus objectives' here, as in a code golf context they'll virtually always be skipped to save bytes.

@orlp I see this as more like ASCII-art challenges that say, "Your program may output any amount of trailing whitespace as long as the output looks like the example." In other words, these are some cases that the programmer doesn't have to worry about explicitly disallowing. If they fail, fine; if they match, fine.

@orlp I added them because, for most implementation techniques, they save bytes.

337 336 333 327 bytes
^https?://([^/]+\.)*(stackoverflow\.(com(\.br)?|ru)|mathoverflow\.(com|net)|hashcode\.ru|((the)?arqade|chiphacker|(mi)?yodeya|ask(ubuntu|different|patents)|(seasoned|brew)advice|s(erverfault|(tack|keptic)exchange|uperuser|tackapps|harepointoverflow|ocialsounddesign)|nothingtoinstall|crossvalidated|basicallymoney)\.com)(/.*)?$

Doesn't use any fancy regex features, so it should work in any regex flavour.

@TimmyD When I tried it, it matched one of the optional ones too... regexr

@wizzwizz4 I forgot stackexchange and start/end markers.

@oflp It doesn't match anything now... Maybe start/end markers don't work in regexr? regexr

@wizzwizz4 No clue, I never use regexr. Try inputting one string at a time rather than a full text.

@wizzwizz4 You need to enable the multi line flag (upper right corner) else it matches start/end of the entire text, rather than start/end of the line.

You can can save a few bytes by combining seasonedadvice with brewadvice instead of with the other s words.

I was going to post an answer but I realised it was essentially identical to yours except for using (\w+\.) at the beginning.

359 348 bytes
https?:\/\/(([^/]+\.)*((stack(overflow|apps|exchange)|ask(ubuntu|different|patents)|(the)?arqade|serverfault|superuser|nothingtoinstall|(seasoned|brew)advice|crossvalidated|basicallymoney|chiphacker|skepticexchange|(sharepoint|math)overflow|(mi)?yodea|socialsounddesign)\.com)|(stackoverflow(\.com\.br|\.ru)|hashcode\.ru|mathoverflow\.net))(\/.*)?$

Test it out on regexr

This came super handy for my personal CSS to apply on all SE sites :)

2179 2092 1966 bytes
https?:\/\/((((www|facebook|jp|(meta\.?)?(es|ru|ja|pt|br)?)\.)?stackoverflow\.com)|(stackoverflow\.(ru|com\.br))|(((russ|meta)\.)?hashcode\.ru)|(crossvalidated|socialsounddesign|mathoverflow|(mi\.?)?yodeya|(www\.)?(sharepointoverflow|basicallymoney)|skepticexchange|brewadvice|(www\.)?chiphacker|ask(different|ubuntu)|stackapps|(meta\.)?(nothingtoinstall|arqade|thearqade|seasonedadvice|superuser|serverfault|ask(ubuntu|patents)))\.com|((meta\.)?mathoverflow\.net)|(((meta\.)?((3|three)dprinting|(ask)?patents|(community|world)building|(econo|acade)mics|(it)?security|(reverse|network)?engineering|a(cademia|i|lcohol|ndroid|nime|pple|rduino|stronomy|viation|vp)|b((e|lend)er|i(cycles?|kes|ology|tcoin)|oardgames?|ricks|uddhism)|c(h(emistry|ess|inese|ristianity)|ivicrm|o(de(review|golf)|ffee|gsci|mputer(science|graphics)|oking)|r(aftcms|afts|ypto(graphy)?)|s(50)?|stheory)|d(ba|eutsch|iy|ranks|rupal|sp)|(earth|data)science|e(books|l(ectronics|ementaryos|l|u)|macs|nglish|spanol|speranto|thereum|xp(at(s|riates)|ressionengine))|f(antasy|itness|re(elancing|nch))|g(a(medev|ming|rage|rdening)|erman|enealogy|is|raphics?designs?|uitars?)|h(am|ealth|ermeneutics|induism|istory|omebrew(ing)?|sm)|(hard|soft)warerecs|islam|italian|j(apanese|oomla|udaism)|korean|l(a((ndscap|nguagelearn)ing|tin|w)|i(fehacks|nguist(ics)?|nux|))|m(a(gento|rtialarts|th(educators|ematica|ematics|s|overflow)?)|eta|echanics|o(derators?|nero|ney|vies)|usic(fans)?|ythology)|o(pen(data|source)|utdoors)|(cycl|parent|retrocomput)ing|p(ets|h(ilosophy|oto(graphy|s)?|ysics)|m|o(ker|litics|rtuguese)|roductivity|rogrammers?|uzzling)|quant|r(aspberrypi|obotics|pg|us(s|sian)?)|s(alesforce|ci(comp|encefiction|fi)|harepoint|ignals|itecore|keptics?|ound(design)?|p(ace|anish|orts)|qa|tartups|tat(s|istics)|ustainability)|t(ex|hefinalfrontier|or|ravel|ridion)|u(buntu|i|nix|x)|vi(deo|m)?|w(eb(apps|masters?)|indowsphone|o(odworking|rdpress|rkplace)|rit(ers?|ing))|(yodeya)))\.stackexchange\.com))(\/|$)

Matches exactly the domains listed and nothing else. I did most of the compressing by hand. I'm a bit embarrassed that I spent this much time on it.

Is there any more .com compressing you can do?

@wizzwizz4 I'm sure I could compress a lot more. I might come back to this later.

All subdomains are considered safe, so you don't need to list any of them.

@curiousdannii I know, but I wanted to see how small I could make it and only match the given subdomains.

142 140 334 bytes
#^https?:\/\/([^\/]*\.)?(hashcode\.ru|mathoverflow\.(com|net)|stackoverflow\.(ru|com(\.br)?)|((stack|skeptic)exchange|stackapps|ask(different|patents|ubuntu)|(brew|seasoned)advice|(the)?arqade|basicallymoney|chiphacker|crossvalidated|nothingtoinstall|serverfault|sharepointoverflow|socialsounddesign|superuser|(mi)?yodeya)\.com)(/|$)#

matches everything on the specified second level domains, path or no path
uses # as delimiter so / needs no escaping (saved two bytes)
compressed manually


text:
How many electrons are in each shell?
Given a atomic number, print how many electrons are in each shell of the element that the atomic number corresponds to.
Expected input/output:
Input -> Output
1 -> 1
2 -> 2
3 -> 2, 1
4 -> 2, 2
5 -> 2, 3
6 -> 2, 4
7 -> 2, 5
8 -> 2, 6
9 -> 2, 7
10 -> 2, 8
11 -> 2, 8, 1
12 -> 2, 8, 2
13 -> 2, 8, 3
14 -> 2, 8, 4
15 -> 2, 8, 5
16 -> 2, 8, 6
17 -> 2, 8, 7
18 -> 2, 8, 8
19 -> 2, 8, 8, 1
20 -> 2, 8, 8, 2
21 -> 2, 8, 9, 2
22 -> 2, 8, 10, 2
23 -> 2, 8, 11, 2
24 -> 2, 8, 13, 1
25 -> 2, 8, 13, 2
26 -> 2, 8, 14, 2
27 -> 2, 8, 15, 2
28 -> 2, 8, 16, 2
29 -> 2, 8, 18, 1
30 -> 2, 8, 18, 2
31 -> 2, 8, 18, 3
32 -> 2, 8, 18, 4
33 -> 2, 8, 18, 5
34 -> 2, 8, 18, 6
35 -> 2, 8, 18, 7
36 -> 2, 8, 18, 8
37 -> 2, 8, 18, 8, 1
38 -> 2, 8, 18, 8, 2
39 -> 2, 8, 18, 9, 2
40 -> 2, 8, 18, 10, 2
41 -> 2, 8, 18, 12, 1
42 -> 2, 8, 18, 13, 1
43 -> 2, 8, 18, 13, 2
44 -> 2, 8, 18, 15, 1
45 -> 2, 8, 18, 16, 1
46 -> 2, 8, 18, 18
47 -> 2, 8, 18, 18, 1
48 -> 2, 8, 18, 18, 2
49 -> 2, 8, 18, 18, 3
50 -> 2, 8, 18, 18, 4
51 -> 2, 8, 18, 18, 5
52 -> 2, 8, 18, 18, 6
53 -> 2, 8, 18, 18, 7
54 -> 2, 8, 18, 18, 8
55 -> 2, 8, 18, 18, 8, 1
56 -> 2, 8, 18, 18, 8, 2
57 -> 2, 8, 18, 18, 9, 2
58 -> 2, 8, 18, 19, 9, 2
59 -> 2, 8, 18, 21, 8, 2
60 -> 2, 8, 18, 22, 8, 2
61 -> 2, 8, 18, 23, 8, 2
62 -> 2, 8, 18, 24, 8, 2
63 -> 2, 8, 18, 25, 8, 2
64 -> 2, 8, 18, 25, 9, 2
65 -> 2, 8, 18, 27, 8, 2
66 -> 2, 8, 18, 28, 8, 2
67 -> 2, 8, 18, 29, 8, 2
68 -> 2, 8, 18, 30, 8, 2
69 -> 2, 8, 18, 31, 8, 2
70 -> 2, 8, 18, 32, 8, 2
71 -> 2, 8, 18, 32, 9, 2
72 -> 2, 8, 18, 32, 10, 2
73 -> 2, 8, 18, 32, 11, 2
74 -> 2, 8, 18, 32, 12, 2
75 -> 2, 8, 18, 32, 13, 2
76 -> 2, 8, 18, 32, 14, 2
77 -> 2, 8, 18, 32, 15, 2
78 -> 2, 8, 18, 32, 17, 1
79 -> 2, 8, 18, 32, 18, 1
80 -> 2, 8, 18, 32, 18, 2
81 -> 2, 8, 18, 32, 18, 3
82 -> 2, 8, 18, 32, 18, 4
83 -> 2, 8, 18, 32, 18, 5
84 -> 2, 8, 18, 32, 18, 6
85 -> 2, 8, 18, 32, 18, 7
86 -> 2, 8, 18, 32, 18, 8
87 -> 2, 8, 18, 32, 18, 8, 1
88 -> 2, 8, 18, 32, 18, 8, 2
89 -> 2, 8, 18, 32, 18, 9, 2
90 -> 2, 8, 18, 32, 18, 10, 2
91 -> 2, 8, 18, 32, 20, 9, 2
92 -> 2, 8, 18, 32, 21, 9, 2
93 -> 2, 8, 18, 32, 22, 9, 2
94 -> 2, 8, 18, 32, 24, 8, 2
95 -> 2, 8, 18, 32, 25, 8, 2
96 -> 2, 8, 18, 32, 25, 9, 2
97 -> 2, 8, 18, 32, 27, 8, 2
98 -> 2, 8, 18, 32, 28, 8, 2
99 -> 2, 8, 18, 32, 29, 8, 2
100 -> 2, 8, 18, 32, 30, 8, 2
101 -> 2, 8, 18, 32, 31, 8, 2
102 -> 2, 8, 18, 32, 32, 8, 2
103 -> 2, 8, 18, 32, 32, 8, 3
104 -> 2, 8, 18, 32, 32, 10, 2
105 -> 2, 8, 18, 32, 32, 11, 2
106 -> 2, 8, 18, 32, 32, 12, 2
107 -> 2, 8, 18, 32, 32, 13, 2
108 -> 2, 8, 18, 32, 32, 14, 2
109 -> 2, 8, 18, 32, 32, 15, 2
110 -> 2, 8, 18, 32, 32, 16, 3
111 -> 2, 8, 18, 32, 32, 17, 2
112 -> 2, 8, 18, 32, 32, 18, 2
113 -> 2, 8, 18, 32, 32, 18, 3
114 -> 2, 8, 18, 32, 32, 18, 4
115 -> 2, 8, 18, 32, 32, 18, 5
116 -> 2, 8, 18, 32, 32, 18, 6
117 -> 2, 8, 18, 32, 32, 18, 7
118 -> 2, 8, 18, 32, 32, 18, 8

Psst... take a closer look at the output, it's not always the last shell incrementing.
Remember, this is code-golf, so the code with the smallest number of bytes wins.
Leaderboards
Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.
To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:
# Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:
# Ruby, <s>104</s> <s>101</s> 96 bytes

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:
# Perl, 43 + 2 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the leaderboard snippet:
# [><>](http://esolangs.org/wiki/Fish), 121 bytes

var QUESTION_ID=94753,OVERRIDE_USER=12537;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

It's been a while since I took chemistry. Could you please remind us what decides where electrons go?

Waiting for the inevitable Mathematica built-in

Actually, this looks to be the exact same as this challenge. You should search for dupes before writing, or at least before posting.

@Suever 42 bytes.

Mathematica, 42 bytes
Tr/@#~ElementData~"ElectronConfiguration"&