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
// E.g | |
// let array = ["sudhir", "hello", "test", "sudhir", "a", "a", "a"] | |
//output = sudhir:2, hello:1, test: 1 and a:3 | |
countKey(array){ | |
let obj = {} | |
array.forEach(function(i){ | |
if(obj[i] == undefined){ | |
obj[i] = 0 | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<link rel="stylesheet" href="https://harvesthq.github.io/chosen/chosen.css"> | |
</head> | |
<body> | |
<div style="margin-bottom:10px;display: inline-block;"> | |
<div class="here"> | |
<select data-placeholder="choose Team" class="chosen-select" id="abcd"> | |
<option value=""></option> |
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 toCamelCase(str) { | |
return str.toLowerCase().replace(/(?:(^.)|(\s+.))/g, function(match) { | |
return match.charAt(match.length-1).toUpperCase(); | |
}); | |
} |
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
module.exports = { | |
mode: 'spa', | |
router: { | |
middleware: ['settings'] | |
}, | |
... |
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
global.$s = require('../settings.json') | |
if(!process.server){ | |
Object.defineProperty(Vue.prototype, '$s', { value: $s }) | |
} | |
#uses | |
/*created(){ | |
var a = $s['key'] | |
} | |
or in html |
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
<html><head> | |
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
<style type="text/css"> | |
.wrp{ | |
margin:20px; | |
padding:10px | |
} | |
body{ | |
background-color: transparent; | |
} |
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
Step 1: | |
Go to: C:\Windows\System32\Drivers\etc\hosts | |
And add this to the bottom of the file: | |
============= | |
127.0.0.1 your.domain.com | |
============= | |
Step 2: | |
Go to [your XAMPP directory]/apache/conf/httpd-xampp.conf |
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
how to do the same in php |
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 | |
error_reporting(E_ALL); | |
$from = 'sudhirgupta.456@gmail.com'; | |
$headers = "MIME-Version: 1.0" . PHP_EOL; | |
$headers .= "Content-Type: text/html; charset=UTF-8" . PHP_EOL; | |
$headers .= "From: " . $from . "\r\n"; | |
$headers .= "Reply-To: " . $from . "\r\n"; | |
$headers .= "Return-Path: " . $from . "\r\n"; | |
$headers .= "CC: sudhirgupta500@yahoo.com \r\n"; |