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
const useFocus = () => { | |
const htmlElRef = useRef(null) | |
const setFocus = () => {htmlElRef.current && htmlElRef.current.focus()} | |
return [ htmlElRef, setFocus ] | |
} | |
const FocusDemo = () => { | |
const [inputRef, setInputFocus] = useFocus() |
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
3 ways: | |
1. node_modules -> react-scripts -> scripts | |
2. npm run eject | |
3. use 'react-app-rewired' |
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
let a = "13788656456456456"; | |
alert(a.replace(/(\d{1,3})(?=((\d{3})*([^\d]|$)))/g, " $1 ")); |
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
[[!pdoPage? | |
&sortby=`{"menuindex":"ASC"}` | |
&showHidden=`1` | |
&tpl=`poleznoArticles` <!-- ΡΠ°Π±Π»ΠΎΠ½ Π²ΡΠ²ΠΎΠ΄Π° ΡΠ»Π΅ΠΌΠ΅Π½ΡΠΎΠ² --> | |
&limit=`9` | |
&includeContent=`1` | |
&includeTVs=`polezno_image_list` <!-- TV name: 'polezno_image_list' --> | |
&processTVs=`1` | |
&parents=`76` | |
&hideContainers=`1` |
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 vardump($var) { | |
echo '<pre>'; | |
var_dump($var); | |
echo '</pre>'; | |
} |
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
var mh = 0; | |
$(".block").each(function () { | |
var h_block = parseInt($(this).height()); | |
if(h_block > mh) { | |
mh = h_block; | |
}; | |
}); | |
$(".block").height(mh); |
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 | |
function reArrayFiles(&$file_post) { | |
$file_ary = array(); | |
$file_count = count($file_post['name']); | |
$file_keys = array_keys($file_post); | |
for ($i=0; $i<$file_count; $i++) { | |
foreach ($file_keys as $key) { |
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
<div class="wrapper"> | |
<div class="menu"> | |
<a href="#" class="menu-btn">Menu</a> | |
<nav> | |
<a href="#" class="menu-item">Home</a> | |
<a href="#" class="menu-item">About</a> | |
<a href="#" class="menu-item">Team</a> | |
<a href="#" class="menu-item">Contacts</a> | |
<a href="#" class="menu-item">Portfolio</a> | |
</nav> |
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
git config --global mergetool.kdiff3.cmd '"C:\Program Files\KDiff3\kdiff3.exe" $BASE $LOCAL $REMOTE -o $MERGED' | |
git mergetool |
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
git config --global core.editor "'C:\Program Files (x86)\Notepad++\notepad++.exe' -multiInst -notabbar -nosession -noPlugin" | |
git commit |
NewerOlder