MySQL: Facing challenge while getting top N rows for each group

I have tried all the methods from This Link, and other similar answers from google, but none worked.

I want get first N rows for each categoryId

Following is Table format:

+-----------------------+-------------------+-----------------------+
| id                    | categoryId        |  title                |
+-----------------------+-------------------+-----------------------+
| 16181504-00000000079  |   1603012000000   |   category-2 prod 2   |
| 16181504-00000000064  |   1603012000000   |   category-2 prod 3   |
| 16181504-00000000027  |   1603012000000   |   category-2 prod 4   |
| 16181504-00000000065  |   1603012000000   |   category-2 prod 5   |
| 16181504-00000000096  |   1603012000000   |   category-2 prod 6   |
| 16181504-00000000028  |   1603012000000   |   category-2 prod 7   |
| 16181504-00000000536  |   1603012000004   |   category-3 prod 1   |
| 16181504-00000000508  |   1603012000004   |   category-3 prod 2   |
| 16181504-00000000512  |   1603012000004   |   category-3 prod 3   |
| 16181504-00000000511  |   1603012000004   |   category-3 prod 4   |
| 16181504-00000000509  |   1603012000004   |   category-3 prod 5   |
| 16181504-00000000510  |   1603012000004   |   category-3 prod 6   |
| 16181504-00000000538  |   1603012000004   |   category-3 prod 7   |
| 16181504-00000000540  |   1603012000004   |   category-3 prod 8   |
| 16181504-00000000915  |   1603012000005   |   category-5 prod 1   |
| 16181504-00000000913  |   1603012000005   |   category-5 prod 2   |
| 16181504-00000000914  |   1603012000005   |   category-5 prod 3   |
| 16181504-00000001148  |   1603012000006   |   category-1 prod 1   |
| 16181504-00000001146  |   1603012000006   |   category-1 prod 2   |
| 16181504-00000001147  |   1603012000006   |   category-1 prod 3   |
| 16181504-00000001922  |   1603012000009   |   category-4 prod 1   |
| 16181504-00000001924  |   1603012000009   |   category-4 prod 2   |
+-----------------------+-------------------+-----------------------+

.well-known/acme-challenge

Пытаюсь получить сертификат с sslforfree.com там надо ссылку вида site.ru/.well-known/acme-challenge/test но у меня ошибка

404 Not Found
nginx/1.10.2

Подскажите как правильно сделать?


в логе:

2018/01/12 22:04:07 [error] 24924#24924: *714345 openat() “/usr/local/mgr5/www/letsencrypt/test” failed (2: No such file or directory), client: 0.0.0.0, server: site.ru, request: “GET /.well-known/acme-challenge/test HTTP/1.1”, host: “site.ru”

Plot challenge: two bar charts next to next with one indicator line

Simple task:
I would like to place two bar charts in a row and have an indicator horizontal line going above the two bar charts.

What I did:

bar1 = BarChart[{100, 75, 100}, ChartLayout -> "Stacked", 
   ChartStyle -> {Blue, Black, Blue}, Frame -> False, Axes -> False, 
   PlotLabel -> "bar1"];
bar2 = BarChart[{100, 38, 15, 38, 85}, ChartLayout -> "Stacked", 
   ChartStyle -> {Blue, Black, White, Black, Blue}, Frame -> False, 
   Axes -> False, PlotLabel -> "bar2"];
indicator = 
  Plot[-65 + 100, {x, 0, 4}, PlotStyle -> Red, 
   PlotLegends -> ToString[65]];

To combine the plots, I tried:

Show[Row[bar1, bar2], indicator]

but the result:

enter image description here

HELP !
The colors need to be the same.

This is how it should look like in the end:
enter image description here

Challenging Problems in Geometry 4-24 challenge

So I have been working on this geometry problem in the book mentioned in the title, and it doesn’t have solutions to all the problems. I’m stuck, any help is appreciated.

Two circles are tangent externally at T. Chord TM in circle O is perpendicular to chord TN in circle Q. Show that MN = $ sqrt{2(R^2+r^2)}$ if the circles are unequal, where R and r are the radii of the two circles.