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
<script>(function() { | |
var _fbq = window._fbq || (window._fbq = []); | |
if (!_fbq.loaded) { | |
var fbds = document.createElement('script'); | |
fbds.async = true; | |
fbds.src = '//connect.facebook.net/en_US/fbds.js'; | |
var s = document.getElementsByTagName('script')[0]; | |
s.parentNode.insertBefore(fbds, s); | |
_fbq.loaded = true; | |
} |
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
- if Rails.env.production? | |
%script | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-15209814-7', 'auto'); | |
ga('send', 'pageview'); | |
%script |
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
class="campaign_stats__value">([0-9,]+)</div> | |
class="js-amount-ordered">([0-9]+)</span> | |
persistent_timer__order_count">([0-9,]+) sold, <span |
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
if (preg_match('~class="campaign_stats__value">([0-9,]+)</div>~Um', $this->crawler->html(), $match)) | |
{ | |
return trim($match[1]); | |
} | |
if(preg_match('~class="js-amount-ordered">([0-9]+)</span>~Uim', $this->crawler->html(), $match)) | |
{ | |
return trim($match[1]); | |
} | |
if(preg_match('~persistent_timer__order_count">([0-9,]+) sold, <span~Um', $this->crawler->html(), $match)) | |
{ |
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
self.num_reserved = order_data.match(/\"ordered\"\:.*\n/)[0].match(/\d+/)[0] |
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
self.num_reserved = order_data.match(/\"str1\"\:.*\n/)[0].match(/\d+/)[0] | |
change to | |
self.num_reserved = order_data.match(/\"str1\"\:.*\n/)[0].match(/\d+/)[0] | |
if(!self.num_reserved) | |
self.num_reserved = order_data.match(/\"str2\"\:.*\n/)[0].match(/\d+/)[0] |
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
public function performSearches() { | |
$str = 'This is a test only.'; | |
$results = []; | |
$search_types = \app\models\SearchType::find()->orderBy('score DESC')->all(); | |
foreach($search_types as $search_type) { | |
if(count($results) >= $this->max_results) { | |
break; | |
} | |
//exact match query | |
if($search_type->type == self::TYPE_EXACT) { |
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
SELECT `keyword`.`keyword`, COUNT(DISTINCT campaign_keyword.campaign_id) AS metric_value | |
FROM `keyword` | |
LEFT JOIN `campaign_keyword` ON campaign_keyword.keyword_id = keyword.id | |
GROUP BY `keyword`.`id` | |
ORDER BY `metric_value` | |
DESC LIMIT 100 |
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
http://api.beachinsoft.com/index.html?url2=ilovemywifevideogames |
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
public function actionTest() | |
{ | |
$n = new \common\models\Campaign; | |
$n->url = 'blargh'; | |
$n->save(false); | |
} |
NewerOlder