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 | |
namespace common\widgets; | |
/** | |
* Crop fill or fit image with php-gd library | |
* @author Maxim Ishchenko <[email protected]> | |
* @version 1.0* | |
* @uses, @example | |
* @license GPL |
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 | |
/** | |
* | |
*/ | |
class StringOperations | |
{ | |
public function Transliterate($str) { | |
$translit=array( | |
"А"=>"a","Б"=>"b","В"=>"v","Г"=>"g","Д"=>"d","Е"=>"e","Ё"=>"e","Ж"=>"zh","З"=>"z","И"=>"i","Й"=>"y","К"=>"k","Л"=>"l","М"=>"m","Н"=>"n","О"=>"o","П"=>"p","Р"=>"r","С"=>"s","Т"=>"t","У"=>"u","Ф"=>"f","Х"=>"h","Ц"=>"ts","Ч"=>"ch","Ш"=>"sh","Щ"=>"shch","Ъ"=>"","Ы"=>"y","Ь"=>"","Э"=>"e","Ю"=>"yu","Я"=>"ya", |
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 | |
/** | |
* Get Image from Google Maps API by place coordinates and download it. | |
* @author Maxim Ishchenko <[email protected]> | |
* @version 1.0* | |
* @uses | |
* | |
* $map = new GoogleMaps( | |
* array( |
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 | |
/** | |
* Get Preview Image from Youtube video link (not from embeded code) and download it if video exist | |
* @author Maxim Ishchenko <[email protected]> | |
* @version 1.0* | |
* @uses | |
* | |
* $getThumbs = new YoutubeThumbs('https://youtu.be/xxxxxxxxxxx', 'quality', 'directory'); | |
* echo '<img src="'.$getThumbs->getThumbnail().'"/>'; |
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
/** | |
* @author [Maxim Ishchenko <[email protected]>] | |
* @param {[string]} [title] [Набор методов для добавления, удаления, переключения класса элемента] | |
* [classesManipulation содержит набор методов для добавления/удаления классов элемента, в случае его наличия] | |
* @return {[none | false]} [производит указанный набор манипуляций с классами элемента в случае его наличия] | |
* @example | |
* // добавить скрипт на страницу: | |
* script type="text/javascript" src="path/to/this/script" | |
* // объявить класс: | |
* var classesManipulation = new classesManipulation(); |
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
// included script. For example js/gridViewProceedCheckBoxes.js | |
/** | |
* [proceedCheckBoxes description] | |
* @param {[type]} btnID [id of button] | |
* @param {[type]} gridID [id of GridView] | |
* @param {[type]} pjaxID [id of pjax-container] | |
* @param {[type]} emptyAlertText [text for alert "Nothing Checked"] | |
* @param {[type]} confirmAlertText [text for confirmation alert] | |
* @param {[type]} proceedURL [controller action ro proceed] |
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
<script type="text/javascript"> | |
/** | |
* Display image selected in html input widget | |
* @param {string} inputID id of html image input | |
* @param {string} imgFieldID id of html img tag | |
* @return none | |
*/ | |
function previewImageBeforeUpload(inputID, imgFieldID) { |
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
# in DC | |
netdom reset <computerName> /domain <domainName> /Usero <userName> /Passwordo <password> | |
# in Workstation | |
nltest /server:<computerName> /sc_reset:<domainName>\<DCName> | |
# test | |
nltest /query |
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
<div id="target_div_id"></div> | |
<button id='button_id'>Click</button> | |
var button = document.getElementById('button_id'); | |
button.onclick = function() { | |
var div = document.getElementById('target_div_id'); | |
if (div.style.display !== 'none') { | |
div.style.display = 'none'; | |
} |
NewerOlder