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
[ | |
{ | |
"interval": { | |
"start": 1503100800, | |
"end": 1503187200 | |
}, | |
"games": { | |
"bullet": { | |
"win": 0, | |
"loss": 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
CREATE OR REPLACE FUNCTION t_visits_death() RETURNS "trigger" AS $_$ | |
DECLARE | |
r record; | |
BEGIN | |
SELECT INTO r | |
MAX(t_stamp) AS last_action, | |
COUNT(pageview_id) > 1 AS interested, | |
MAX(CASE WHEN p.type = 1 THEN 1 ELSE 0 END) = 1 AS has_product, | |
EXISTS (SELECT 1 FROM public.carts c WHERE c.visit_id = v.visit_id AND c.total_revenue > 0) AS has_cart, | |
EXISTS (SELECT 1 FROM public.orders o WHERE o.visit_id = v.visit_id) AS has_order |
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
//onHover sur les videos | |
$(function() { | |
$(".video_home").hover(function(){ | |
$(this).find("> a > img").attr("src","") ; | |
}); | |
}); | |
<div class="video_home" id="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
public function editAction($id) | |
{ | |
$em = $this->getDoctrine()->getEntityManager(); | |
$entity = $em->getRepository('LapaperieFocusBundle:Focus')->find($id); | |
if (!$entity) { | |
throw $this->createNotFoundException('Unable to find Focus entity.'); | |
} |
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
" Insert current namespace and opens php and create empty class, based on the file name | |
nmap <F9> ggO<?php<CR><CR><ESC>"%PdF/r;:s#/#\\#g<CR>Inamespace <ESC>d/[A-Z]<CR>Goclass <C-R>=expand("%:t:r")<CR><CR>{<CR> |
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 someSynchronouseCall() { | |
var data = null; | |
someAsynchronousCall(function(response) { | |
data = response.data; | |
}); | |
// is there some way to wait for the above callback before returning 'data' ? | |
return data; | |
} |