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
| <apex:page id="pageId" controller="AccountGeoLocationDemo"> | |
| <head> | |
| <style type="text/css"> | |
| #map-canvas { | |
| height : 512px; | |
| } | |
| </style> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> | |
| <script type="text/javascript" | |
| src="https://maps.googleapis.com/maps/api/js?libraries=places&key=AIzaSyBMFdqVZd9idw-0pYEsWQ9xxM9mNz7f9E4"> |
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
| var performParent = function(){ | |
| //perform 1st async | |
| var promise1 = performAsync('func1',5); | |
| // We want to chain two async operations | |
| promise1.then(function(data){ | |
| console.log('data from 1st async operation',data); | |
| //perform second async operation |
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
| .parent{ | |
| min-height: 400px; | |
| min-width : 400px; | |
| background-color:yellow; | |
| } | |
| .parent .son{ | |
| min-height: 100px; | |
| min-width : 100px; | |
| background-color:red; |
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
| <html> | |
| <header> | |
| <style> | |
| body{color:#333;padding:1.5em} | |
| .responsive-new {border-collapse:collapse;width:100%} | |
| .responsive-new th{background-color:#eee;font-weight:700; } | |
| .responsive-new th,td{border-bottom: 1px solid #ddd; padding:5px; text-align:left} | |
| .fname{width:15%} | |
| .lname{width:15%} |
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 Node{ | |
| Id value; | |
| List<Node> children; | |
| { | |
| children = new List<Node>(); | |
| } | |
| } | |
| parseTree( Map<String,List<Id>> treeMap,String parentId){ |
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://stackoverflow.com/questions/28948383/how-to-implement-debounce-fn-into-jquery-keyup-event | |
| */ | |
| $('input').keyup(debounce(function(){ | |
| var $this=$(this); | |
| //alert( $this.val() ); | |
| var n1 = $this.val(); | |
| var n2 = $('#n2').val(); | |
| var n3 = $('#n3').val(); |
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
| <apex:page standardController="Opportunity" extensions="Pdf_of_Attachment_Extension" renderAs="pdf"> | |
| <apex:pageBlock > | |
| <apex:pageBlockSection columns="1" > | |
| <apex:pageBlockSectionItem >Opportunity Name: {!Opportunity.Name} </apex:pageBlockSectionItem> | |
| <apex:pageBlockSectionItem >CloseDate : {!Opportunity.CloseDate} </apex:pageBlockSectionItem> | |
| <apex:pageBlockSectionItem >StageName : {!Opportunity.StageName} </apex:pageBlockSectionItem> | |
| <apex:pageBlockSectionItem >Probability : {!Opportunity.Probability} </apex:pageBlockSectionItem> | |
| </apex:pageBlockSection> | |
| <apex:repeat var="attachment" value="{!attachments}"> | |
| <apex:image url="/servlet/servlet.FileDownload?file={!attachment.Id}"/><br></br> |
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 final class ClientIpAddress { | |
| // CHECKSTYLE:OFF | |
| // http://stackoverflow.com/a/11327345/131929 | |
| private static Pattern PRIVATE_ADDRESS_PATTERN = Pattern.compile( | |
| "(^127\\.)|(^192\\.168\\.)|(^10\\.)|(^172\\.1[6-9]\\.)|(^172\\.2[0-9]\\.)|(^172\\.3[0-1]\\.)|(^::1$)|(^[fF][cCdD])", | |
| Pattern.CANON_EQ); | |
| // CHECKSTYLE:ON | |
| private ClientIpAddress() { |
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 abstract class AccountTrigger { | |
| public Account[] accountOldList { set; get; } | |
| public Account[] accountNewList { set; get; } | |
| public Map<Id, Account> accountOldListMap = new Map<Id, Account>(); | |
| public Map<Id, Account> accountNewListMap = new Map<Id, Account>(); | |
| public AccountTrigger(Account[] accountOldList, Account[] accountNewList) { | |
| this.accountOldList = accountOldList == null ? new Account[] {} : accountOldList; | |
| this.accountNewList = accountNewList == null ? new Account[] {} : accountNewList; |