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
<template> | |
<template if:true={showTom}> | |
<img src="https://vignette.wikia.nocookie.net/tomandjerry/images/3/33/Tom_cat.png/revision/latest?cb=20111113021359"/> | |
</template> | |
<template if:false={showTom}> | |
<img src="http://pngimg.com/uploads/tom_and_jerry/tom_and_jerry_PNG56.png"/> | |
</template> | |
</template> |
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
<template> | |
<div style="background: white;padding: 20px;border-radius: 6px;"> | |
<div style="font-size: 20px;text-align:center;">{timeVal}</div> | |
<template if:true={showStartBtn}> | |
<lightning-button label="Start" onclick={start} style="margin-left: 145px;"></lightning-button> | |
</template> | |
<template if:false={showStartBtn}> | |
<lightning-button label="Stop" onclick={stop} style="margin-left: 145px;"></lightning-button> | |
</template> |
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
.container { | |
padding: 10px; | |
margin: 0 auto; | |
position: fixed; | |
} | |
.balloon { | |
width: 738px; | |
margin: 0 auto; |
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
({ | |
doInit : function(cmp, event, helper) { | |
var action = cmp.get("c.wishTheBirthDay"); | |
action.setCallback(this, function(response) { | |
var state = response.getState(); | |
if (state === "SUCCESS") { | |
cmp.set("v.showBalloons", response.getReturnValue()); | |
} | |
else if (state === "ERROR") { | |
var errors = response.getError(); |
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 controller="BirthDayWishesController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" > | |
<!--Including Css File--> | |
<ltng:require styles="{!$Resource.BirthDayWishes}"/> | |
<!--Boolean attribute--> | |
<aura:attribute name="showBalloons" type="boolean" default="false"/> | |
<!--Init handler to call the method on load of lightning component--> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
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 class BirthDayWishesController { | |
//This method check for birthday with today's date. If condition get matched then it retues the true. | |
@AuraEnabled | |
public static boolean wishTheBirthDay(){ | |
User currentLoggedinUser = [Select id,Date_of_Birth__c from User Where Id =: UserInfo.getUserId() ]; | |
if( currentLoggedinUser.Date_of_Birth__c != null ){ | |
if( Date.today().Day() == currentLoggedinUser.Date_of_Birth__c.Day() && | |
Date.today().Month() == currentLoggedinUser.Date_of_Birth__c.Month()){ | |
return true; |
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
/* | |
Speed Test - Which One is Fast to Compare String from ==, equals and equalsIgnoreCase | |
Author: 0to1Code.Com | |
*/ | |
public class ApexSpeedExperiment_3{ | |
//Experiment 1 : Using == | |
public static void runExperiment1(){ | |
system.debug('CPU Limit Consumption Start: '+Limits.getCPUtime()); |
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
<div id="trailblazerWidget" trailblazerid="YOUR_TRAILBLAZER_ID"> | |
<script src="https://rawgit.com/vishnuvaishnav/TrailheadWidget/master/Trailblazer.js" type="text/javascript"></script> | |
</div> |
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
/* | |
Speed Test - Does System.Debug() cost CPU limit? | |
Author: 0to1Code.Com | |
*/ | |
public class ApexSpeedExperiment_1{ | |
//Experiment 1 : Without Debugs | |
public static void runExperiment1(){ | |
List<Lead> leadLst = [select id,name,company, Address, Industry, AnnualRevenue from lead limit 2000]; | |
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
https://wa.me/{!Contact.Phone}?text={!JSENCODE("Hi "& Contact.Name &", We are from XYZ Corp. Want to connect with you regarding a new offering.")} |