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 startCollisionChecker() { | |
intervalId = setInterval(checkCollision, 100); | |
} | |
function reset() { | |
parseInt(jQuery("#points").html("-1")); | |
} | |
function startGame() { | |
$("#start").hide(); |
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
/** | |
* Trigger to display a message | |
* in HipChat when a new Case is | |
* created. | |
* | |
* @author Shruti Sridharan | |
* @since 23/02/2016 | |
* @version 1.0 | |
*/ | |
trigger newCaseNotifierTrigger on Case ( after insert ) { |
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
/** | |
* This class exposes a method | |
* to send a message to Hip Chat in a | |
* specific Room named Hip Chat | |
* API Exploration. | |
* | |
* @author Shruti Sridharan | |
* @since 23/02/2016 | |
* @version 1.0 | |
*/ |
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
@RestResource( urlMapping = '/tesselservices/*' ) | |
global class TesselServices { | |
public static final String MODEL_ID = 'INSERT MODEL ID HERE'; | |
@HttpPost | |
global static String upload() { | |
RestRequest req = RestContext.request; | |
RestResponse res = Restcontext.response; | |
Blob picture = req.requestBody; |
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
<aura:component implements="lightning:availableForFlowScreens,flexipage:availableForRecordHome,force:hasRecordId" access="global"> | |
<aura:attribute name="objectApiName" type="String" access="public" /> | |
<aura:attribute name="fieldLabel" type="String" access="public" /> | |
<aura:attribute name="fieldName" type="String" access="public" /> | |
<aura:attribute name="selectedRecordId" type="String" access="public" /> | |
<lightning:recordEditForm objectApiName="{!v.objectApiName}"> | |
<label class="fieldLabel">{!v.fieldLabel}</label> | |
<lightning:inputField fieldName="{!v.fieldName}" onchange="{!c.handleOnChange}" /> | |
</lightning:recordEditForm> |
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
.THIS label.slds-form-element__label { | |
display: none; | |
} | |
.THIS .fieldLabel { | |
font-size: .75rem; | |
} |
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
<design:component> | |
<design:attribute name="objectApiName" /> | |
<design:attribute name="fieldLabel" /> | |
<design:attribute name="fieldName" /> | |
<design:attribute name="selectedRecordId" /> | |
</design:component> |
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
({ | |
handleOnChange : function(component, event, helper) { | |
component.set( "v.selectedRecordId", event.getParams( "fields" ).value ); | |
} | |
}) |
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
({ | |
getGiphyImage : function( emotion, callback ) { | |
var xhr = new XMLHttpRequest(); | |
xhr.open( "GET", "https://api.giphy.com/v1/gifs/search?api_key=B9pfrx9wtMXmdLnVaJ6vllAW7uTqaHvO&q=" + emotion + "&limit=1", false ) | |
xhr.onreadystatechange = function() { | |
if( this.readyState === 4 ) { | |
var jsonResp = JSON.parse( this.response ); | |
var gifUrl = jsonResp.data[0].images.downsized.url; | |
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
({ | |
showEmotion : function(component, event, helper) { | |
var toneAnalyzeResponse = component.get( "v.toneAnalyzeResponse" ); | |
var standardTones = [ "joy", "sadness", "anger", "fear" ]; | |
var emotion; | |
for( var i = 0; i <= standardTones.length - 1; i++ ) { | |
if( toneAnalyzeResponse.indexOf( standardTones[i] ) !== -1 ) { | |
emotion = standardTones[i]; |
NewerOlder