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 declination(a, b, c, s) { | |
var words = [a, b, c]; | |
var index = s % 100; | |
if (index >=11 && index <= 14) { index = 0; } | |
else { index = (index %= 10) < 5 ? (index > 2 ? 2 : index): 0; } | |
return(words[index]); | |
} |
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
ol { counter-reset: item } | |
li { display: block } | |
li:before { content: counters(item, ".") ". "; counter-increment: item } |
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
$(selector).keydown(function(event) { | |
// Allow: backspace, delete, tab, escape, and enter | |
if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || event.keyCode == 13 || | |
// Allow: Ctrl+A | |
(event.keyCode == 65 && event.ctrlKey === true) || | |
// Allow: home, end, left, right | |
(event.keyCode >= 35 && event.keyCode <= 39)) { | |
// let it happen, don't do anything | |
return; | |
} |
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
set SUBSONIC_HOME=d:\subsonic |
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
<style> | |
.b-map-popup { | |
position: relative; | |
background: #fefefe; | |
border: 1px solid #fefefe; | |
-webkit-border-radius:4px; | |
border-radius:4px; | |
-webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.3); | |
box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.3); | |
z-index:100; |
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
<div class="accordion" id="accordion2"> | |
<?php | |
//get all children of category "General", then display posts in each cat | |
$taxonomy = 'category'; | |
$param_type = 'category__in'; | |
$cat_id = get_cat_ID('General'); | |
$term_args=array( | |
'orderby' => 'name', | |
'order' => 'ASC', |
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
/* Методы jQuery .bind(), .live(), и .delegate() пишутся с использованием введеного в jQuery 1.7 метода .on() */ | |
// Bind | |
$( "#members li a" ).on( "click", function( e ) {} ); | |
$( "#members li a" ).bind( "click", function( e ) {} ); | |
// Live | |
$( document ).on( "click", "#members li a", function( e ) {} ); | |
$( "#members li a" ).live( "click", function( e ) {} ); |
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
digitHelper: function(digit) { | |
return digit.toString().replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1 '); | |
} |
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
/* Comment */ | |
.highlight .err { | |
color: #960050; | |
background-color: #1e0010; | |
} | |
/* Error */ | |
.highlight .k { | |
color: #66d9ef; | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer