This file contains hidden or 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
CREATE OR replace FUNCTION "SC_Tag".server_partition_function ( ) | |
RETURNS TRIGGER AS $body$ DECLARE _new_time timestamp; | |
_id INTEGER; | |
_tablename text; | |
_startdate text; | |
_month text; | |
_enddate text; | |
_result record; | |
BEGIN | |
--Takes the CURRENT inbound "time" VALUE AND determines WHEN midnight IS FOR the given date |
This file contains hidden or 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# python 2 | |
# https://wiki.postgresql.org/wiki/Psycopg | |
import os | |
from datetime import datetime, time, timedelta, date | |
import psycopg2 | |
import sys | |
conn = None |
This file contains hidden or 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
#!/usr/bin/python | |
import os | |
from datetime import datetime, time, timedelta, date | |
import syslog | |
DB_HOST = 'localhost' | |
DB_USER = 'DB_USER' | |
DB_NAME = 'DB_NAME' | |
BACKUP_PATH = '/backups/' |
This file contains hidden or 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
F:\OpenServer\domains\localhost\composer>cd F:\OpenServer\domains\localhost\composer\advanced | |
F:\OpenServer\domains\localhost\composer\advanced>php init | |
Yii Application Initialization Tool v1.0 | |
Which environment do you want the application to be initialized in? | |
[0] Development | |
[1] Production |
This file contains hidden or 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
Microsoft Windows [Version 6.1.7601] | |
(c) Корпорация Майкрософт (Microsoft Corp.), 2009. Все права защищены. | |
f:\openserver>cd F:\OpenServer\domains\localhost\composer | |
F:\OpenServer\domains\localhost\composer>composer create-project laravel/laravel {directory} 4.2 --prefer-dist | |
Installing laravel/laravel (v4.2.0) | |
- Installing laravel/laravel (v4.2.0) | |
Downloading: 100% |
This file contains hidden or 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
<?php | |
///D:\open\OpenServer\domains\yii2-start\frontend\modules\main\views\mytree\index.php | |
use yii\helpers\Html; | |
use yii\grid\GridView; | |
/* @var $this yii\web\View */ | |
/* @var $searchModel app\modules\main\models\MytreeSearch */ | |
/* @var $dataProvider yii\data\ActiveDataProvider */ | |
This file contains hidden or 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
$(document).ready(function () { | |
//console.log(array); | |
var path = '<?php echo $path; ?>'; //путь к контролеру | |
for (var i = 0; i < array.length; i++) { | |
var elem = array[i]; | |
var url = path + "ajaxAll?val=" + encodeURIComponent(elem); | |
//console.log(elem, url); | |
(function (elem) { | |
$.ajax({ | |
type: "POST", |
This file contains hidden or 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
(function (elem, datename, date, j, deferreds) { | |
deferreds.push( $.ajax({ | |
type: "POST", | |
url: url, | |
dataType: "json", | |
success: function (data) { | |
date[datename][j] = data; | |
} | |
}) ); |
This file contains hidden or 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
public void XMLReader() | |
{ | |
try | |
{ | |
xml.Load("server_info.xml"); | |
foreach (XmlNode n in xml.SelectNodes("/server_info")) | |
{ | |
string Server = n.SelectSingleNode("server").InnerText; | |
string Port = n.SelectSingleNode("port").InnerText; | |
} |
This file contains hidden or 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
if ($authUser) | |
{ | |
if ($this->getUser()) /*проверяем есть ли*/ | |
/*вносите узнанного пользователя в базу*/ | |
$connection->createCommand()->insert('user', [ | |
'login' => $this->username, | |
'role' => 1, | |
])->execute(); | |
return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0); |
OlderNewer