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
/** | |
* Finds the smallest positive integer which does not exist in an array. | |
* | |
* @param array $a | |
* The array to check. | |
* | |
* @return int | |
* The smallest positive integer not found in $a. | |
*/ | |
function solution2(array $a) { |
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
Reference: https://superuser.com/a/258103 | |
Add this to the bottom of the file: | |
[www] | |
comment = another share | |
path = /var/www | |
guest ok = yes | |
browseable = yes | |
read only = no |
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
/** | |
* Convert human readable strings to machine names. | |
* | |
* @param string $str | |
* The string to convert. | |
* | |
* @return string | |
* The converted string. | |
*/ | |
function machine_readable( $str ) { |
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="c-forms w50"> | |
<div class="row no-gutters"> | |
<div class="col-md-6 col-xl-4 pad-by-location"> | |
<div> | |
<label> Full Name* [text* full_name placeholder "Full Name"] </label> | |
</div> | |
</div> | |
<div class="col-md-6 col-xl-4 pad-by-location"> | |
<div> | |
<label> Company Name* [text* company_name placeholder "Company Name"] </label> |
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
/** | |
* Wrap each letter of text in the given element in a span tag. | |
*/ | |
$.fn.lettering = function () { | |
this.each(function (index) { | |
var elem = $(this), | |
characters = elem.text().split(""); | |
elem.empty(); |
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
((general).*?(override)) |
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
if (history.pushState) { //IE10+ | |
var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + decodeURIComponent(window.location.search); | |
window.history.pushState({path:newurl},'',newurl); | |
} |
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 queryString = {}; | |
location.search.substr(1).split("&").forEach(function (pair) { | |
if (pair.length) { | |
var parts = pair.split("="); | |
queryString[parts[0]] = decodeURIComponent(parts[1].replace(/\+/g, " ")); | |
} | |
}); | |
console.log(queryString); |
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 get_custom_post_types_and_page_templates() { | |
global $wp_post_types; | |
// Public custom post types. | |
$args = [ | |
'public' => true, | |
'_builtin' => false, | |
]; | |
// Get the lists and add a suffix which denotes the type, Page or Post. |
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
http://jsfiddle.net/ianclark001/rkocah23/ |
OlderNewer