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
What is closure in JavaScript and how does it work? | |
Answer: Closure is a feature in JavaScript where a function has access to its outer scope even after the outer function has returned. It is created when a function is defined inside another function, and the inner function retains access to the variables in the outer function's scope. | |
Can you explain hoisting in JavaScript? | |
Answer: Hoisting is a behavior in JavaScript where variable and function declarations are moved to the top of their scope, regardless of where they are declared in the code. This means that variables and functions can be called before they are declared, but the value of variables will be undefined until they are assigned a value. | |
What is the difference between == and === in JavaScript? |
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
``` | |
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION; | |
CREATE USER 'username'@'%' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' WITH GRANT OPTION; | |
FLUSH PRIVILEGES; |
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
https://segmentfault.com/a/1190000041225133/en |
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
https://dev.to/paulvermeer2021/turn-any-form-into-a-stepper-form-wizard-with-ui-hooks-context-react-hook-form-and-yup-56j6 | |
https://codesandbox.io/s/cranky-monad-52bh5w | |
https://blog.logrocket.com/building-multi-step-wizards-with-formik-and-react-query/ | |
https://codesandbox.io/s/wizard-form-with-formik-forked-n7uxd9?file=/package.json | |
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
$this->load->helper(array('url','file','download')); | |
$this->load->library('zip'); | |
$website = $this->load->database('website', TRUE); // the TRUE paramater tells CI that you'd like to return the database object. | |
$DBUSER=$website->username; | |
$DBPASSWD=$website->password; | |
$DATABASE=$website->database; | |
$HOSTNAME=$website->hostname; |
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
system\database\drivers\mysqli\mysqli_utility.php | |
``` | |
/** | |
* MySQLi Export | |
* | |
* @access private | |
* @param array Preferences | |
* @return mixed | |
* @source https://stackoverflow.com/a/44667873 | |
*/ |
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
source: | |
1. https://medium.com/@sheniff/using-shell-to-rename-files-in-bulk-ee657f1a06 | |
2. https://gist.github.com/mustafaturan/32df16bb4c49fbd837f777000f4b9aa2?permalink_comment_id=3837386#gistcomment-3837386 | |
How to: | |
1. Create file, ex: renamejstojsx.sh copy paste from source:#1 | |
2. In your project open bash or Cmder as Terminal execution | |
3. Run ```bash renamejstojsx.sh``` | |
4. Done, sruput coffe again. |
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
https://stackoverflow.com/a/1296398/1852097 | |
https://stackoverflow.com/a/67553979/1852097 | |
```javascript | |
var dateOffset = (24*60*60*1000) * 12775; //5 days | |
var myDate = new Date(); | |
console.log(dateOffset); | |
``` | |
https://unitconverter.io/years/days/35 |
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
const schema = yup.object().shape({ | |
filelamaran: yup.mixed().test('fileSize', "File Lamaran terlalu besar bro.. kurang dari < 500Kb ya!", val => validasiSizeFile(val) === true).test('fileType',"File harus PDF bro.. Ukuran PDF < 500Kb ya!", val => validasiTipeFile(val) === true).nullable(), | |
filefoto: yup.mixed().test('fileSize', "File Foto terlalu besar bro.. kurang dari < 500Kb ya!", val => validasiSizeFile(val) === true).test('fileType',"File harus PDF bro.. Ukuran PDF < 500Kb ya!", val => validasiTipeFile(val) === true).nullable(), | |
fileriwayat: yup.mixed().test('fileSize', "File Riwayat terlalu besar bro.. kurang dari < 500Kb ya!", val => validasiSizeFile(val) === true).test('fileType',"File harus PDF bro.. Ukuran PDF < 500Kb ya!", val => validasiTipeFile(val) === true).nullable(), | |
fileijazah: yup.mixed().test('fileSize', "File Ijazah terlalu besar bro.. kurang dari < 500Kb ya!", val => validasiSizeFile(val) === true).test('fileType',"File harus PDF bro.. Ukuran PDF < 500 |
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
# source: https://stackoverflow.com/a/33919648 | |
# using for php < 5.4 if server using > 5.5 please, use array_columnt instead | |
if (!function_exists('arr_kolom')) { | |
function arr_kolom(array $array, $columnKey, $indexKey = null) | |
{ | |
$result = array(); | |
foreach ($array as $subArray) { | |
if (!is_array($subArray)) { | |
continue; | |
} elseif (is_null($indexKey) && array_key_exists($columnKey, $subArray)) { |