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
const express = require('express'); | |
const app = express(); | |
const port = 3000; | |
app.get("/*", (req, res)=>{ | |
console.log(req.originalUrl, req._parsedUrl); | |
res.send(req.originalUrl); | |
}); | |
app.listen(port, console.log.bind(console, "server started")); | |
setTimeout(()=>{ |
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
SELECT nspname || '.' || relname AS "Таблиц_20_больших", | |
pg_size_pretty(pg_relation_size(C.oid)) AS "Размер", | |
reltuples | |
FROM pg_class C | |
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
ORDER BY pg_relation_size(C.oid) DESC | |
LIMIT 20 | |
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> | |
#include <vector> | |
#include <unordered_map> | |
#include <string> | |
using namespace std; | |
unordered_map<string, int> cacheMaxPrices; | |
int maxPrice(vector<int> &prices, int start, int end){ |
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
var beetwen = function(point, bords){ | |
let [x, y] = point | |
let [xmin, ymin, xmax, ymax] = bords | |
return xmin < x && x < xmax && ymin < y && y < ymax | |
} | |
/** | |
* @param {number[][]} matrix | |
* @return {number[]} | |
*/ |
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
template <class T> | |
class Links{ | |
public: | |
list<T*> childs; | |
T *parent; | |
}; | |
class Node{ | |
public: | |
Links<Node> rights; |
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
FROM ubuntu | |
RUN apt-get update -y | |
RUN apt-get upgrade -y | |
RUN apt-get install -y build-essential cmake gfortran git pkg-config | |
RUN apt-get install -y python-dev software-properties-common wget vim | |
RUN apt-get autoremove -y | |
RUN apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler libopencv-dev |
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
[ | |
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,2,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,2,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,2,0,2,0,4,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,4,0,0,0,4,0,0,0,2,0,2,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,8,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,8,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,8,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,8,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,8,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,8,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,8,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,8,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,8,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,8,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,8,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,8,0,0,0,0,0,0,0,2,0,2,0,0, |
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
class BinaryNode(object): | |
def __init__(self): | |
self.right_node = False | |
self.left_node = False | |
def to_brackets_string(self): | |
result = "(" | |
if self.left_node is not False: | |
result += self.left_node.to_brackets_string() | |
result += ")" |
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
import math | |
class SequencePermutation(object): | |
def __init__(self, plenty_object, count_item): | |
self.plenty_object = list(plenty_object) | |
self.count_item = count_item | |
self.power_plenty = len(plenty_object) | |
@staticmethod |
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
using System; | |
using System.Net; | |
using System.Text; | |
using System.Threading; | |
namespace ExampleSimpleWebserver | |
{ | |
class HttpAsyncServer | |
{ |
NewerOlder