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
####DEEP COPY AN OBJECT | |
```js | |
var copiedObj = JSON.parse(JSON.stringify(obj)); | |
``` | |
Explanation: In JavaScript objects, copying an object variable results in copying only the reference to the same object. Hence, any changes to its embedded key-pair values result in changes made to the original object variable as well. | |
```js |
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
#### DEEP COPY AN OBJECT | |
```js | |
var copiedObj = JSON.parse(JSON.stringify(obj)); | |
``` | |
Explanation: In JavaScript objects, copying an object variable results in copying only the reference to the same object. Hence, any changes to its embedded key-pair values result in changes made to the original object variable as well. | |
```js |
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
DOWNLAOD WEBSITE USING WGET | |
If you ever need to download an entire Web site, perhaps for off-line viewing, wget can do the job done. RUn the following commands in terminal. | |
wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ | |
--convert-links \ |
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> | |
$( function() { | |
function changeTab() { | |
var tabName = window.location.hash.substr(1); | |
var tabEl = $('[data-w-tab="' + tabName + '"]'); | |
if (tabEl.length) { | |
tabEl.click(); | |
} | |
} |
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
function organizeFolders() { | |
// Parent Folders | |
var parentA = DriveApp.createFolder('Dad'); | |
var parentB = DriveApp.createFolder('Mom'); | |
// Child folder inside Parent Folder A | |
var child = parentA.createFolder('Child'); | |
// Place Child Folder inside another Parent Folder B | |
parentB.addFolder(child); |
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://blog.coupler.io/filter-function-google-sheets/ |
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
// Copyright 2018 Google LLC | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
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
SHOW password_encryption; | |
SELECT rolpassword from pg_authid where rolname = '{your-db-user-name}'; | |
ALTER USER "{your-db-user-name}" with password '{your-new-db-password}'; | |
SET password_encryption = 'scram-sha-256'; | |
SET password_encryption = 'md6'; | |
SHOW password_encryption; |
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
Add this code as an HTML embed in your footer: | |
<div class="paragraph">© Company Name <script>document.write(new Date().getFullYear())</script>. All Rights Reserved.</div> |
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
regexp_replace('revenue'), '[$K,1]', '') * 100 |
OlderNewer