Skip to content

Instantly share code, notes, and snippets.

View silavsale's full-sized avatar
😇
_yo

Sergiy Rudenko silavsale

😇
_yo
  • Canada
  • 11:12 (UTC -04:00)
View GitHub Profile
import java.util.Scanner;
public class UmovnyiOperator {
public static void main(String[]args)
{
System.out.println("Введіть свій номер:");
Scanner scan = new Scanner(System.in);
int id = scan.nextInt();
double tsina = 0.0;
import java.util.Scanner;
public class UmovnyiOperator {
//тернарний
public static void main(String[]args)
{
System.out.println("Введіть свій номер:");
Scanner scan = new Scanner(System.in);
int id = scan.nextInt();
@silavsale
silavsale / TypeConvert
Created October 25, 2016 21:35
TypeConvert перетворення типів даних
public class TypeConvert {
public static void main(String[] args) {
System.out.println("Значення byte Від " + Byte.MIN_VALUE + " До " +Byte.MAX_VALUE);
System.out.println("Значення short Від " + Short.MIN_VALUE + " До " + Short.MAX_VALUE);
System.out.println("Значення int Від " + Integer.MIN_VALUE + " До " + Integer.MAX_VALUE);
System.out.println("Значення long Від " + Long.MIN_VALUE + " До " + Long.MAX_VALUE);
System.out.println("---------------------------------------------------------------");
@silavsale
silavsale / gist:51b5622464404bb5e97cd26fc8e6c7fa
Created May 11, 2018 17:36 — forked from andyyou/gist:3052671
C# Controls abbreviation
btn Button chk CheckBox ckl CheckedListBox
cmb ComboBox dtp DateTimePicker lbl Label
llb LinkLabel lst ListBox lvw ListView
mtx MaskedTextBox cdr MonthCalendar icn NotifyIcon
nud NumeircUpDown pic PictureBox prg ProgressBar
rdo RadioButton rtx RichTextBox txt TextBox
tip ToolTip tvw TreeView wbs WebBrowser
容器
flp FlowLayoutPanel grp GroupBox pnl Panel
@silavsale
silavsale / node.js
Created June 3, 2019 03:28
DB to HTML
const express = require('express');
const morgan = require('morgan');
const fs = require("fs");
const {Pool, Client} = require('pg');
const bodyParser = require('body-parser');
const contents = fs.readFileSync("user.json");
const jsonContent = JSON.parse(contents);
const app = express();
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"airbnb"
],
"globals": {
"Atomics": "readonly",
@silavsale
silavsale / vscode_shortcuts.md
Created November 16, 2019 18:08 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@silavsale
silavsale / ERRORS.md
Created December 12, 2019 18:35 — forked from desigens/ERRORS.md

Доклад «Снова ошибки»

3 августа 2017, RamblerFront& meetup #2, Москва

В коде начинающих программистов обычно много ошибок. Постепенно мы набираемся опыта, код становится надежнее, покрывается тестами, и нам кажется, что ошибки в нашем коде практически исключены.

Но фронтенд — это неконтролируемая среда и произойти может что угодно. Доклад о том, как начать использовать ошибки в свою пользу.

@silavsale
silavsale / multiple-deploy-keys-multiple-private-repos-github-ssh-config.md
Created December 14, 2019 23:30 — forked from gubatron/multiple-deploy-keys-multiple-private-repos-github-ssh-config.md
How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

Let's say alice is a github.com user, with 2 or more private repositories repoN. For this example we'll work with just two repositories named repo1 and repo2

https://github.com/alice/repo1

https://github.com/alice/repo2

You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers. You want to perform git pull origin master for example, and you want this to happen without asking for a password.

var reverse = function(x) {
let i;
let y = '';
let numLen = x.toString().length;
let firstNum = x.toString().slice(0, 1);
if (firstNum === '-'){
y = '-';
x = x.toString().slice(1, numLen);
}
for(i = numLen; i > 0 ; i--){