Skip to content

Instantly share code, notes, and snippets.

View integrer's full-sized avatar
🏠
Working from home

Bibik Nikita integrer

🏠
Working from home
View GitHub Profile
@integrer
integrer / MakeParentId.sql
Created July 9, 2019 11:08
Создание связей между дочерними и родительскими записями в иерархическом справочнике
USE grnti;
GO
UPDATE cld
SET ParentId = par.Id
FROM [dbo].[Categories] as cld
left join [dbo].[Categories] as par on
( -- Условия для связей 1-2 уровней
par.Num2 is null and par.Num3 is null and -- Условия для родительских записей
par.Num1 = cld.Num1 and -- Условия совпадения
not cld.Num2 is null and cld.Num3 is null -- Условия для дочерних записей
@integrer
integrer / EIP20Interface.sol
Created April 16, 2019 11:06
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.21+commit.dfe3193c.js&optimize=false&gist=
// Abstract contract for the full ERC 20 Token standard
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
pragma solidity ^0.4.21;
contract EIP20Interface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
@integrer
integrer / EIP20Interface.sol
Created April 14, 2019 20:48
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.21+commit.dfe3193c.js&optimize=false&gist=
// Abstract contract for the full ERC 20 Token standard
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
pragma solidity ^0.4.21;
contract EIP20Interface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;