Skip to content

Instantly share code, notes, and snippets.

using System.Collections.Generic;
using UnityEngine;
namespace faunlily
{
[CreateAssetMenu]
public class GameEvent : ScriptableObject
{
private List<GameEventListener> listeners = new List<GameEventListener>();
public object data;
using UnityEngine;
using System.Collections;
using System.IO;
using BeardedManStudios.Forge.Networking.Generated;
using BeardedManStudios.Forge.Networking;
using System;
using BeardedManStudios.Forge.Networking.Unity;
using UnityEngine.SceneManagement;
using System.Collections.Generic;
public class AssignLeadsUsingAssignmentRules
{
@InvocableMethod
public static void LeadAssign(List<Id> LeadIds)
{
Database.DMLOptions dmo = new Database.DMLOptions();
dmo.assignmentRuleHeader.useDefaultRule= true;
Lead Leads=[select id from lead where lead.id in :LeadIds];
Leads.setOptions(dmo);
update Leads;
public class AssignLeadsUsingAssignmentRules
{
@InvocableMethod
public static void LeadAssign(List<Id> LeadIds)
{
Database.DMLOptions dmo = new Database.DMLOptions();
dmo.assignmentRuleHeader.useDefaultRule= true;
List<Lead> Leads = [select id from lead where lead.id in :LeadIds];
for(Lead ld: Leads){
@theWill
theWill / gist:dbf72174486a5ca9a809
Created December 24, 2015 18:57
detect salesforce lightning experience - add stylesheet dynamically
if( isLightningExperienceOrSalesforce1() ) {
//add the lightning stylesheet to the header
link = document.createElement( "link" );
link.href = "{!URLFOR($Resource.SLDS0121, 'assets/styles/salesforce-lightning-design-system-vf.css')}"
link.type = "text/css";
link.rel = "stylesheet";
link.media = "all";
document.getElementsByTagName("head")[0].appendChild(link);
}
else {
testing 123
456
BLARG
789
build@ip-10-179-39-147 -> ant -f move.xml package-topcoder
Buildfile: move.xml
package-topcoder:
[delete] Deleting directory /home/build/prod_push/web/build
[exec] At revision 85469.
[exec] At revision 85469.
[exec] At revision 85469.
[exec] At revision 85469.
[exec] At revision 85469.
@theWill
theWill / gist:06563090705b680d919b
Created October 21, 2014 22:39
get_srm_or_marathon_statistics_distribution
SELECT NVL(sum(case when rating between 0000 and 0099 then 1 else 0 end), 0) as range_0000_0099
,NVL(sum(case when rating between 0100 and 0199 then 1 else 0 end), 0) as range_0100_0199
,NVL(sum(case when rating between 0200 and 0299 then 1 else 0 end), 0) as range_0200_0299
,NVL(sum(case when rating between 0300 and 0399 then 1 else 0 end), 0) as range_0300_0399
,NVL(sum(case when rating between 0400 and 0499 then 1 else 0 end), 0) as range_0400_0499
,NVL(sum(case when rating between 0500 and 0599 then 1 else 0 end), 0) as range_0500_0599
,NVL(sum(case when rating between 0600 and 0699 then 1 else 0 end), 0) as range_0600_0699
,NVL(sum(case when rating between 0700 and 0799 then 1 else 0 end), 0) as range_0700_0799
,NVL(sum(case when rating between 0800 and 0899 then 1 else 0 end), 0) as range_0800_0899
,NVL(sum(case when rating between 0900 and 0999 then 1 else 0 end), 0) as range_0900_0999
@theWill
theWill / gist:33eaee6113d1c9a89cc9
Created October 21, 2014 22:38
get_member_marathon_statistics_history
SELECT
rr.round_id AS challenge_id
, r.short_name AS challenge_name
, to_char(cal.date, '%Y.%m.%d') AS date
, NVL(rr.new_rating, rr.old_rating) AS rating
, crh.rank AS placement
, TRIM(NVL(crh.percentile, 'N/A')) AS percentile
FROM round r
, calendar cal
, long_comp_result rr
@theWill
theWill / gist:779f7f79b1743592042e
Created October 21, 2014 22:36
get_member_marathon_statistics
select c.handle
, ar.rating
, ar.num_competitions as competitions
, ROUND((select avg(lcr.placed) from long_comp_result lcr where lcr.coder_id = c.coder_id and attended='Y'),2) as avg_rank
, ROUND((select avg(lcr.num_submissions) from long_comp_result lcr where lcr.coder_id = c.coder_id and attended='Y'),2) as avg_num_submissions
, (select min(placed) from long_comp_result where placed > 0 and coder_id = c.coder_id) as best_rank
, (select count(*) from long_comp_result where placed =1 and coder_id = c.coder_id) as wins
, (select count(*) from long_comp_result where placed between 1 and 5 and coder_id = c.coder_id) as top_five_finishes
, (select count(*) from long_comp_result where placed between 1 and 10 and coder_id = c.coder_id) as top_ten_finishes
, cr.rank