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
var check = function() { | |
if('function' === typeof $) { | |
// TODO Write code here | |
} | |
else { | |
setTimeout(check, 1000); | |
} | |
} | |
check(); |
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
namespace PHPSTORM_META { | |
use App\Company; | |
override(\create(''), map([ | |
Company::class => Company::class | |
])); | |
} |
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
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.1.40 (LTS) on 2016-07-18. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/** | |
* Calculate time remaining to work hours | |
*/ | |
$curTimestamp = time(); // сегодняшнее число в unix формате | |
$curHour = (new DateTime('now', new DateTimeZone('Asia/Yekaterinburg')))->format('G'); // текущий час | |
$receiveTime = 0; // время получиеня | |
// если время позднее | |
if( $curHour >= 19 && $curHour <= 24 ) |
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
[xdebug] | |
zend_extension = "C:\xampp\php\ext\php_xdebug.dll" | |
;PHPSTORM | |
xdebug.idekey="PHPSTORM" | |
xdebug.profiler_append = 0 | |
xdebug.profiler_enable = 1 | |
xdebug.profiler_enable_trigger = 0 | |
xdebug.profiler_output_dir = "C:\xampp\tmp" | |
xdebug.profiler_output_name = "cachegrind.out.%t-%s" | |
; |
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
/** | |
* Convert query result into two-dimensional array | |
* @param $queryResult - sql query result | |
* @return array | |
*/ | |
function convertResult($queryResult) | |
{ | |
$result = []; | |
while ($row = mysqli_fetch_assoc($queryResult)) { |
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
/** | |
* Convert $fields into column value SQL query | |
* | |
* @param $fields [columnName => value] | |
* @return string | |
*/ | |
function prepareQuery($fields) | |
{ | |
$result = ''; |
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
/** | |
* Update fields in the table | |
* | |
* @param $table | |
* @param $project | |
* @param $projectIdColumnName | |
* @param $fields | |
* @return bool | |
* @internal param $projectId | |
*/ |