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
void main() { | |
var item = "12345678911234567891"; | |
print(prettyBankCode(item)); // 1234 5678 9112 3456 7891 | |
} | |
prettyBankCode(item){ | |
if(item != null && item.length == 20){ | |
var code = item.substring(0,4); | |
code = code + ' ' + item.substring(4,8); | |
code = code + ' ' + item.substring(8,12); |
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
// SOFTWARE developer ----> Software Developer | |
String capitalizeAllWord(String val) { | |
var value = val.toLowerCase(); | |
var result = value[0].toUpperCase(); | |
for (int i = 1; i < value.length; i++) { | |
if (value[i - 1] == " ") { | |
result = result + value[i].toUpperCase(); | |
} else { | |
result = result + value[i]; | |
} |
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 | |
// Developer: Bekzod | |
$crm_api_entity_search = isset($_REQUEST['action']) && $_REQUEST['action'] == 'crm.api.entity.search' ? true : false; | |
if($crm_api_entity_search) | |
{ | |
$request = $_REQUEST; | |
if(isset($request['options']['types'][0]) && $request['options']['types'][0] == 'CONTACT') | |
{ |
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
cd ~/www | |
find . -type d -exec chmod 775 {} \; | |
find . -type f -exec chmod 664 {} \; | |
find . -type d -exec chown bitrix:bitrix {} \; | |
find . -type f -exec chown bitrix:bitrix {} \; |
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 | |
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php"); | |
$user = new CUser; | |
$arFields = Array( | |
"NAME" => "Micros", | |
"LAST_NAME" => "Developement", | |
"EMAIL" => "[email protected]", | |
"LOGIN" => "micros", | |
"LID" => "ru", | |
"ACTIVE" => "Y", |
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
Убрать сообщение "Срок работы пробной версии продукта истек" Битрикс | |
Расшаренный текст: | |
Для того, чтобы временно убрать сообщение о завершении пробного периода для разработки проекта на cms битрикс, | |
необходимо закомментировать строку с кодом: | |
echo GetMessage("expire_mess1"); в строке ~67 в файле: | |
\bitrix\modules\main\include\prolog_after.php | |
Это не решает проблему с завершением срока, а только временно убирает сообщение, через 2 недели ваш сайт перестанет работать. | |
Source: |
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 | |
# filter function | |
function filterArray($columns , $list, $filterData) | |
{ | |
foreach($columns as $column) | |
{ | |
$filteredArray = $filteredArray ?: $list; | |
$key = $column['name']; |
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 isDoubleClicked(element) | |
{ | |
//if already clicked return TRUE to indicate this click is not allowed | |
if (element.data("isclicked")) return true; | |
//mark as clicked for 1 second | |
element.data("isclicked", true); | |
setTimeout(function () { | |
element.removeData("isclicked"); |