Skip to content

Instantly share code, notes, and snippets.

Avatar

Yevhenii Velizhenkov tapkain

View GitHub Profile
View flut.dart
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
View gist:64ec90281c9467027e5fbb5a37f9d74d
Nested Loop Left Join (cost=5443.37..5703.59 rows=58 width=537) (actual time=724.379..740.430 rows=100 loops=1)
-> Nested Loop Left Join (cost=5443.09..5581.19 rows=58 width=225) (actual time=724.322..737.715 rows=100 loops=1)
-> Limit (cost=5442.51..5449.18 rows=58 width=48) (actual time=724.291..736.657 rows=100 loops=1)
-> Gather Merge (cost=5442.51..5449.18 rows=58 width=48) (actual time=724.290..736.637 rows=100 loops=1)
Workers Planned: 1
Workers Launched: 1
-> Sort (cost=4442.50..4442.65 rows=58 width=48) (actual time=714.791..714.805 rows=84 loops=2)
Sort Key: post.scheduled_date DESC
Sort Method: top-N heapsort Memory: 44kB
Worker 0: Sort Method: top-N heapsort Memory: 50kB
View gist:9b28826c6c1eff86fee141a2c9e14de7
Nested Loop Left Join (cost=6191.69..6584.42 rows=97 width=537) (actual time=542.848..720.503 rows=2092 loops=1)
-> Nested Loop Left Join (cost=6191.41..6392.32 rows=97 width=225) (actual time=542.819..639.048 rows=2092 loops=1)
-> Sort (cost=6190.83..6191.07 rows=97 width=48) (actual time=542.760..543.326 rows=2078 loops=1)
Sort Key: post.scheduled_date DESC
Sort Method: quicksort Memory: 384kB
-> Nested Loop (cost=2930.79..6187.63 rows=97 width=48) (actual time=443.701..521.780 rows=2078 loops=1)
-> Hash Join (cost=2930.50..6097.66 rows=238 width=52) (actual time=443.642..482.235 rows=2079 loops=1)
Hash Cond: (vote.post_id = post.id)
-> Bitmap Heap Scan on vote (cost=1701.53..4859.49 rows=3505 width=4) (actual time=158.607..172.574 rows=5127 loops=1)
Recheck Cond: (((user_id)::text = ANY ('{IBS7ftMAytR3HpMCtk3jzixnuIk1,78c4CKECYWSVt3RmOIgA0U6
View gist:9b68938b37b1323590c50c523b43e5dd
Nested Loop Left Join (cost=5983.86..6366.71 rows=94 width=537) (actual time=761.201..782.318 rows=100 loops=1)
-> Nested Loop Left Join (cost=5983.57..6179.51 rows=94 width=225) (actual time=761.169..762.363 rows=100 loops=1)
-> Limit (cost=5983.00..5983.23 rows=94 width=48) (actual time=761.129..761.179 rows=100 loops=1)
-> Sort (cost=5983.00..5983.23 rows=94 width=48) (actual time=761.127..761.160 rows=100 loops=1)
Sort Key: post.scheduled_date DESC
Sort Method: top-N heapsort Memory: 49kB
-> Nested Loop (cost=2849.86..5979.92 rows=94 width=48) (actual time=597.822..760.361 rows=2156 loops=1)
-> Hash Join (cost=2849.57..5891.80 rows=235 width=52) (actual time=597.749..685.998 rows=2157 loops=1)
Hash Cond: (vote.post_id = post.id)
-> Bitmap Heap Scan on vote (cost=1632.07..4665.51 rows=3350 width=4) (actual time=190.731..2
View query.sql
SELECT *
FROM (SELECT post.created_at AS post_created_at, post.id AS post_id, post.user_id AS post_user_id, post.parent_post_id AS post_parent_post_id, post.scheduled_date AS post_scheduled_date
FROM post JOIN vote ON post.id = vote.post_id JOIN content_post AS content_post_1 ON post.id = content_post_1.post_id
WHERE vote.user_id IN ('IBS7ftMAytR3HpMCtk3jzixnuIk1', '78c4CKECYWSVt3RmOIgA0U6x7Z12', 'fjHvzaoyr2OvW2SoWQeB3w5tGQB2') AND vote.vote > 15 AND post.user_id NOT IN (SELECT blocked_user.blocked_user_id AS blocked_user_blocked_user_id
FROM blocked_user
WHERE blocked_user.user_id ='snaildragon' OR blocked_user.user_id IN ('IBS7ftMAytR3HpMCtk3jzixnuIk1', '78c4CKECYWSVt3RmOIgA0U6x7Z12', 'fjHvzaoyr2OvW2SoWQeB3w5tGQB2')) AND post.parent_post_id IS NULL AND post.scheduled_date <='2019-06-19' ORDER BY post.scheduled_date DESC
LIMIT 100 OFFSET 0) AS anon_1 LEFT OUTER JOIN "user" AS user_1 ON user_1.id = anon_1.post_user_id LEFT OUTER JOIN (content_post AS content_post_2 JOIN content AS content_1 ON content_1.id
View schema.sql
CREATE TABLE "public"."user" (
"id" Character Varying( 128 ) NOT NULL,
PRIMARY KEY ( "id" )
);
CREATE TABLE "public"."post" (
"created_at" Timestamp Without Time Zone,
"id" SERIAL,
"user_id" Character Varying( 128 ) COLLATE "pg_catalog"."default" NOT NULL,
"parent_post_id" Integer,
View .cpp
#include <windows.h>
#include <cmath>
#include <iostream>
#include <fstream>
HWND button;
HHOOK hhkLowLevelKybd = NULL;
HWND window = NULL;
bool shift = false;
You can’t perform that action at this time.