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
$('input#filtersearch').bind('keyup change', function () { | |
if ($(this).val().trim().length != 0) { | |
$('#list li').show().hide().each(function () { | |
if ($(this).is(':icontains(' + $('input#filtersearch').val() + ')')) | |
$(this).show(); | |
}); | |
} | |
else { | |
$('#list li').show().hide().each(function () { |
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 | |
function mssql_insert_id() { | |
$id = 0; | |
$res = mssql_query("SELECT @@identity AS id"); | |
if ($row = mssql_fetch_array($res)) { | |
$id = $row["id"]; | |
} | |
return $id; | |
} |
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
<!-- | |
Just add this inside <div class='post-footer'> | |
--> | |
<!-- Po.st start--> | |
<div class="sharebtn"> | |
<div class="pw-widget pw_copypaste_true pw-size-medium pw_counter_true"> | |
<a class="pw-button-facebook"></a> | |
<a class="pw-button-twitter"></a> |
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 | |
$number = '3.8'; | |
if ((int) $number == $number) { | |
//it is an integer | |
}else{ | |
//it is a float |
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 | |
class JErrors{ | |
private $filename = ''; | |
/* | |
@param filename | |
*/ | |
function __construct($file) { |
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 | |
class pointLocation { | |
var $pointOnVertex = true; // Check if the point sits exactly on one of the vertices | |
function pointLocation() { | |
} | |
function pointInPolygon($point, $polygon, $pointOnVertex = true) { |
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 | |
function convertMinsToHours($time, $format = '%d:%s') { | |
settype($time, 'integer'); | |
if ($time < 0 || $time >= 1440) { | |
return; | |
} | |
$hours = floor($time/60); | |
$minutes = $time%60; | |
if ($minutes < 10) { |
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
<button id="switch">Toggle</button><br/> | |
<div id="panel" style="height:400px;width:400px;background-image:url('http://farm4.static.flickr.com/3550/3367798587_c24c797f0f.jpg');color:white;font-weight:bold;">This is a demonstration</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
<?php | |
/*Add this code to | |
functions.php | |
From: http://premium.wpmudev.org/forums/topic/audio-preview-in-product-excerpt#post-280140 | |
*/ | |
function add_audio_to_excerpt( $excerpt ){ |
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 addslashes (str) { | |
// http://kevin.vanzonneveld.net | |
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) | |
// + improved by: Ates Goral (http://magnetiq.com) | |
// + improved by: marrtins | |
// + improved by: Nate | |
// + improved by: Onno Marsman | |
// + input by: Denny Wardhana | |
// + improved by: Brett Zamir (http://brett-zamir.me) | |
// + improved by: Oskar Larsson Högfeldt (http://oskar-lh.name/) |
OlderNewer