Skip to content

Instantly share code, notes, and snippets.

View kuznetsovandrey76's full-sized avatar

Andrey Kuznetsov kuznetsovandrey76

View GitHub Profile
@kuznetsovandrey76
kuznetsovandrey76 / gist:d72b67afe455be99409b630f8b9c9523
Created October 12, 2018 15:02
Справочная система SP-XML
curDate - текущая дата // 12.10.2018 16:30:26
StrLen(str:String) // Integer
Возвращает длину строки в байтах
StrCharCount(str:String) // Integer
Возвращает количество символов в строке
StrEnds(str:String, subStr:String [, ignoreCase:Bool]) // Bool
Проверяет, оканчивается ли строка на другую строку.
@kuznetsovandrey76
kuznetsovandrey76 / home.hbs
Last active October 12, 2018 10:16
SERVER login
<input type="hidden" name="act" id="act" value="login">
<input type="text" name="login" id="login" value="" placeholder="login">
<input type="password" name="pass" id="pass" value="" placeholder="password">
<input type="submit" id="submit" value="Send">
<input type="submit" id="vk" value="vk">
<script>
$(document).ready(function() {
$('#vk').click(function() {
window.location = '/auth/vk'
});
  1. Создаем директорию для repository
    create repository here получаем file:///C:/<your-folder>
  2. Создаем директорию для checkout
    svn checkout...

Основные команды:
svn add *
svn commit -m"<your-message>"
svn log <your-file>

"use strict";
$(document).ready(function(){
function pow(number, power) {
var result = number;
for (var i = 1, max = power; i < max; i++) {
result *= number;
}
return result;
}
@kuznetsovandrey76
kuznetsovandrey76 / ajax.js
Created October 9, 2018 13:15
ajax jQuery
$.ajax({
url: "https://raw.githubusercontent.com/kuznetsovandrey76/uniyar/master/data.json",
beforeSend: function(jqXHR, settings) {
console.log(settings)
},
success: function(data, textStatus, jqXHR){
console.log(JSON.parse(data).articles);
}
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<div class="body">
<input id="button-body" type="button" value="show popup">
<p>text in body</p>
</div>
<div class="popup">
<div class="popup-content">
<input id="button-popup" type="button" value="hide popup">
<p>text in popup</p>
</div>
@kuznetsovandrey76
kuznetsovandrey76 / myPlugin.js
Created October 8, 2018 13:19
jQuery plugin
(function( $ ) {
$.fn.myPlugin = function() {
// Тут пишем функционал нашего плагина
$(this).click(function(){
$(this).css('color', '#ff0000');
})
// ===================================
};
})(jQuery);
node app.js 1 2 // 3
console.log(parseInt(process.argv[2]) + parseInt(process.argv[3]));
or
return parseInt(process.argv[2]) + parseInt(process.argv[3]);
CREATE SEQUENCE public.accounts_id_seq START 100;
CREATE TABLE accounts (
id integer primary key DEFAULT nextval('public.accounts_id_seq'),
firm_id integer,
credit_limit integer
);
CREATE TABLE funny_jokes (
id serial,