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
var original = document.getElementById('forBlur'), | |
wO = original.naturalWidth; |
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
var jcrop_api = $.Jcrop(resizer.$img,{ | |
allowResize : false, | |
bgFade : true, | |
touchSupport : true, | |
minSize : [w*wk,h*hk], | |
maxSize : [w*wk,h*hk], | |
onChange: function() { | |
$check.addClass('active'); | |
}, | |
onSelect: 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
convert 1.jpg -crop 140x300+100+200 -background black -flatten 2.jpg |
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
select *,FlOOR(DATEDIFF(NOW(), `birthdate`) / 365.25) as age FROM users |
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
SELECT * FROM `messages` JOIN (SELECT if(sender_id = 12, receiver_id, sender_id) AS user_id_other, MAX(cdate) as date_time_max FROM `messages` WHERE sender_id = 12 OR receiver_id = 12 GROUP BY IF(sender_id = 12, receiver_id, sender_id)) as t ON if(sender_id = 12, receiver_id, sender_id) = user_id_other AND cdate = date_time_max JOIN `users` ON `users`.id = IF(`messages`.sender_id = 12, `messages`.receiver_id, `messages`.sender_id) WHERE sender_id = 12 OR receiver_id = 12 ORDER BY cdate DESC LIMIT 11 OFFSET 0 | |
PHP | |
public static function getListByUser($user_id, $limit) { | |
$query = "`messages` | |
JOIN (SELECT if(sender_id = {$user_id}, receiver_id, sender_id) AS user_id_other, MAX(cdate) as date_time_max FROM `messages` | |
WHERE sender_id = {$user_id} OR receiver_id = {$user_id} | |
GROUP BY IF(sender_id = {$user_id}, receiver_id, sender_id)) as t ON if(sender_id = {$user_id}, receiver_id, sender_id) = user_id_other |
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
//VIMEO | |
var html = $('<iframe>', { | |
src: $this.attr('href'), | |
width: 490, | |
height: 270, | |
frameborder: 0, | |
webkitAllowFullScreen : '', | |
mozallowfullscreen: '', | |
allowFullScreen : '' | |
}).appendTo(video.$screen); |
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
alert(arguments.callee.caller.toString()); |
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
SELECT * FROM help as t1 left JOIN help as t2 ON t1.parent_id = t2.id WHERE t2.id IS NULL AND t1.isCategory = 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
var imgs = { | |
$wrap : false, | |
$imgs : false, | |
settings : { | |
beforeClass : 'preload', | |
triggerClass : 'visible', | |
excludeClass : '.no-preload' | |
}, | |
init : function() { | |
var set = imgs.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
.post-comm-submit { | |
position: absolute; | |
right: -23px; | |
width: 77px; | |
top: 24px; | |
-webkit-transform: rotate(-90deg) translate3d(0,0,0); | |
-moz-transform: rotate(-90deg); | |
-o-transform: rotate(-90deg); | |
-ms-transform: rotate(-90deg); | |
transform: rotate(-90deg); |
OlderNewer