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 x = 50; | |
var y = 50; | |
var x1 = jQuery('#cropper img').width() - 100; | |
var y1 = jQuery('#cropper img').height() - 100; | |
jQuery('#cropper img').Jcrop({ | |
aspectRatio: 1, | |
setSelect: [ x, y, x1, y1 ] | |
}); |
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
// remove hard-coded width/height | |
add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10, 3 ); | |
function remove_thumbnail_dimensions( $html, $post_id, $post_image_id ) { | |
$html = preg_replace( '/(width|height)=\"\d*\"\s/', "", $html ); | |
return $html; | |
} |
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 whichTransitionEvent(){ | |
var t; | |
var el = document.createElement('fakeelement'); | |
var transitions = { | |
'transition':'transitionend', | |
'OTransition':'oTransitionEnd', | |
'MozTransition':'transitionend', | |
'WebkitTransition':'webkitTransitionEnd' | |
} |
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 compressImage($source, $destination, $quality) { | |
$info = getimagesize($source); | |
switch($info['mime']) { | |
case "image/jpeg": | |
$image = imagecreatefromjpeg($source); | |
imagejpeg($image, $destination, $quality); | |
break; | |
case "image/gif": | |
$image = imagecreatefromgif($source); | |
imagegif($image, $destination, $quality); |
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
/** | |
* Determine whether the file loaded from PhoneGap or not | |
*/ | |
function isPhoneGap() { | |
return (cordova || PhoneGap || phonegap) | |
&& /^file:\/{3}[^\/]/i.test(window.location.href) | |
&& /ios|iphone|ipod|ipad|android/i.test(navigator.userAgent); | |
} | |
if ( isPhoneGap() ) { |
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
for (var i = 0; i <= 100; i++) { | |
if (i % 3 == 0) | |
console.log(i + ': fizz'); | |
if (i % 5 == 0) | |
console.log(i + ': buzz'); | |
if ((i % 3 == 0) && (i % 5 == 0)) | |
console.log(i + ': fizzbuzz'); |
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
#region License_Do_Not_Remove | |
/* | |
* Made by TheDarkJoker94. | |
* Check http://thedarkjoker94.cer33.com/ for more C# Tutorials | |
* and also SUBSCRIBE to my Youtube Channel http://www.youtube.com/user/TheDarkJoker094 | |
* GlobalKeyboardHook is licensed under a Creative Commons Attribution 3.0 Unported License.(http://creativecommons.org/licenses/by/3.0/) | |
* This means you can use this Code for whatever you want as long as you credit me! That means... | |
* DO NOT REMOVE THE LINES ABOVE !!! | |
*/ | |
#endregion |
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
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen | |
and (min-width : 321px) { |
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
<sites> | |
<site name="WebSite1" id="1" serverAutoStart="true"> | |
<application path="/"> | |
<virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" /> | |
</application> | |
<bindings> | |
<binding protocol="http" bindingInformation=":8080:localhost" /> | |
</bindings> | |
</site> | |
<site name="BanffCentre.Web" id="2"> |
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
Run command prompt as "admin" and then do this: | |
C:\Windows\System32\inetsrv>appcmd list wp | |
WP "1512" (applicationPool:www) |