This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
func main() { | |
cfg := config{} | |
if err := env.Parse(&cfg); err != nil { | |
log.Fatal(err.Error()) | |
} | |
ctx, cancelFunc := context.WithCancel(context.Background()) | |
ctx = log.ContextWithAttributes(ctx, log.Attributes{"serverPort": cfg.ServerPort}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[]fixture.RawMessage{ | |
fixture.RawMessage{ | |
Key:"1da698dc-568b-438d-abac-b63373acc6aa~~~d6a76684-f53b-491e-9e16-9f2ab51a952a", | |
Value:"^{"before":{.+}$", | |
Topic:"user-device-metadata-table" | |
}, | |
fixture.RawMessage{ | |
Key:"1da698dc-568b-438d-abac-b63373acc6aa~~~263098cb-75b9-4548-b60d-2814158f0422", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | fonts.googleapis.com | 10 | |
---|---|---|---|
2 | facebook.com | 10 | |
3 | twitter.com | 10 | |
4 | google.com | 10 | |
5 | youtube.com | 10 | |
6 | s.w.org | 10 | |
7 | instagram.com | 10 | |
8 | googletagmanager.com | 10 | |
9 | linkedin.com | 10 | |
10 | ajax.googleapis.com | 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"testing" | |
) | |
type Response struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> //std::cout | |
#include <vector> //std::vector | |
#include <algorithm> //std::find | |
#include <ctime> //std::time | |
#include <random> //std::mt19937 | |
#include <functional> //std::bind | |
// в задании не указано какой массив использовать и можно ли вообще использовать стандартные библиотеки C++ , так что для удобности и простоты я использую массив std::vector и алгоритм std::find | |
int same_elements_1(const std::vector<int> &, const std::vector<int> &); |