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
## ------------------ | |
## General Settings | |
## ------------------ | |
# make tmux display things in 256 colors | |
set -g default-terminal "screen-256color" | |
# set scrollback history to 10000 (10k) | |
set -g history-limit 10000 | |
# set ` as the default prefix key combination |
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
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' | |
" Install vim-plug if not found | |
if empty(glob(data_dir . '/autoload/plug.vim')) | |
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' | |
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
endif | |
" Run PlugInstall if there are missing plugins | |
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) |
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 styled from "styled-components"; | |
import React, { useRef, useLayoutEffect, useState } from "react"; | |
import ReactDOM from "react-dom"; | |
import shortid from "shortid"; | |
// https://stackoverflow.com/a/42337722/4132182 | |
function getNodeIndex(element: Element) { | |
if (!element.parentNode) { | |
throw Error("parent node not found"); | |
} |
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
USE TSql | |
GO | |
/*1 Create a database with two tables: Persons(Id(PK), FirstName, LastName, SSN) | |
and Accounts(Id(PK), PersonId(FK), Balance). Insert few records for testing. | |
Write a stored procedure that selects the full names of all persons.*/ | |
CREATE TABLE Persons | |
( | |
[Id] INT IDENTITY, |
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
USE TelerikAcademy | |
--1. names and salaries of the employees that take the minimal salary | |
--use nested SELECT | |
SELECT FirstName, Salary FROM Employees | |
GROUP BY FirstName, Salary | |
HAVING Salary = (SELECT MIN(Salary) FROM Employees); | |
--2. find the names and salaries of the employees that have a salary | |
--that is up to 10% higher than the minimal salary for the company. |
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
USE TelerikAcademy | |
SELECT *FROM Employees | |
SELECT FirstName + '.' + LastName + '@telerik.com' AS [Full Email Adress] FROM Employees | |
SELECT DISTINCT Salary FROM Employees | |
SELECT FirstName, JobTitle FROM Employees | |
WHERE JobTitle = 'Sales Representative' |