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
private void NextStep() | |
{ | |
switch(PreviousStep()) | |
{ | |
case Status.Pending: | |
IWorkFlowStep = new CreatePeopleCountHit(Release, TurkSource); | |
break; | |
case Status.SentForPeopleCount: | |
IWorkFlowStep = new FetchPeopleCountHitResult(Release, TurkSource); | |
break; |
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
from pyramid.httpexceptions import HTTPBadRequest | |
from scotty import DBSession | |
from scotty.cms.models import CmsContent | |
__author__ = 'Harry' | |
def set_content(params): | |
if not isinstance(params, list): | |
raise HTTPBadRequest("Must submit list of keys as root level.") |
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
if exists(select * from sys.columns | |
where Name = N'seven_day_impressions' and Object_ID = Object_ID(N'pub.article')) | |
begin | |
alter table pub.article | |
drop column seven_day_impressions | |
end | |
go | |
alter table pub.article | |
add seven_day_impressions int |
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 cn_candidate_search(term varchar(255), employer_id uuid) | |
RETURNS table (candidate_id uuid) AS $$ | |
BEGIN | |
if employer_id is not null then |
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
DROP VIEW IF EXISTS public.v_candidate_search; | |
CREATE VIEW public.v_candidate_search | |
AS | |
SELECT | |
c.id, | |
cs.name as status, | |
to_tsvector(cast(c.id AS VARCHAR(34)) || ', ' || | |
c.first_name || ' ' || c.last_name || ', ' || x.skills || ', ' || y.countries | |
|| ', ' || y.cities) AS search_index, |
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
using System.Collections.Generic; | |
using Newtonsoft.Json; | |
namespace FCJobs.StorylineSuggest | |
{ | |
public class ArticleIndex | |
{ | |
[JsonProperty(PropertyName = "name")] | |
public string Name { get; set; } |
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
// ==UserScript== | |
// @name PlacementCode | |
// @grant none | |
// @require http://code.jquery.com/jquery-latest.js | |
// ==/UserScript== | |
function autoPlaceWidget(widget){ | |
var $root = $( '.entry-content,.entry-inner,.entry,#article,.sociable,.post_text,.post-content,.td-post-text-content,#match-report-left,.post-entry,#article_content,.pf-content' ); | |
if(!$root.length){return widget;} |
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 t.impression_date as date, isnull(total_avg_pages, 0) avg_pages_per_session, | |
isnull(wd_avg_pages, 0) wd_avg_pages_per_session, | |
isnull(dwd_avg_pages, 0) dwd_avg_pages_per_session | |
from (select top 90 cast(getutcdate()- n as date) impression_date from pub.tally) t | |
left join ( | |
select avg(cast(y.total_impresions as float)) total_avg_pages, | |
avg(cast(y.wd_impresions as float)) wd_avg_pages, | |
avg(cast(y.dwd_impresions as float)) dwd_avg_pages, | |
y.session_date | |
from ( |
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
if exists ( select * | |
from sys.objects | |
where object_id = object_id('pub.auto_assign_storyline') | |
and type in ( 'p', 'pc' ) | |
) | |
drop proc pub.auto_assign_storyline | |
go | |
create proc pub.auto_assign_storyline | |
@blog_id int, |
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
name: Users | |
connection: data source=psjlbac9vm.database.windows.net,1433;Initial Catalog=dfg;User Id=thefc;Password=sfdg;Encrypt=true;Trusted_Connection=false;" providerName="System.Data.SqlClient" | |
sql: select name, email, created from user where created @from and @to | |
params: | |
- name:created | |
type:DateRange | |
field:created | |
- name:email | |
type:filter | |
field:email |
OlderNewer