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 with sharing class CanvasVoteController { | |
public String ideaId {get;set;} | |
public CanvasVoteController() { | |
System.debug(ApexPages.CurrentPage().getParameters()); | |
String signed_request = ApexPages.CurrentPage().getParameters().get('signed_request'); | |
system.debug(signed_request); | |
if(String.isNotBlank(signed_request)){ | |
String jsonData = EncodingUtil.base64Decode(signed_request.replace('.',':').split(':')[1]).toString(); | |
system.debug(jsonData); |
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 showHeader="false" standardStylesheets="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0" controller="CustomDashboardController"> | |
<html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<head> | |
<title>Salesforce Lightning Design System Trailhead Module</title> | |
<apex:stylesheet value="{!URLFOR($Resource.SLDS, 'assets/styles/salesforce-lightning-design-system-vf.css')}" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1"/> | |
<style> | |
.reportCharts img, .reportCharts .analyticsEmbeddedReportChart, .reportCharts .outerbound, .reportCharts .asOfDateContainer, .reportCharts .refreshButtonContainer{ |
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 With Sharing class CustomDashboardController { | |
private static final String folderName = 'ESH Community Reports'; | |
private Map<String, Report> reportsMap = new Map<String, Report>(); | |
public Report report{get;set;} | |
public String reportId{ | |
get; | |
set{ | |
reportId = value; |
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 controller="DetectWifiSignalController"> | |
<style> | |
body{ | |
text-align:center; | |
} | |
h1{ | |
font-size : 20px | |
} | |
#status-section{ | |
font-size : 18px; |
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 class NamedCredentailsExample { | |
public static String oAuth_flow(){ | |
return makeCallout('OAuth_flow_Demo/services/apexrest/namedcredentials/demo','GET', null,null); | |
} | |
public static String oAuth_flow_Post(String body){ | |
return makeCallout('OAuth_flow_Demo/services/apexrest/namedcredentials/demo','POST', null,body); | |
} | |
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
angular.module('app.directives') | |
.directive('arrowKeysIndex', function() { | |
return { | |
restrict: 'A', | |
require: '^ngModel', | |
link: function (scope, element, attrs) { | |
element.on('keydown', function(event) { | |
let currentIndex = attrs.arrowKeysIndex; | |
let nextIndex; |
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
angular.module('app.directives') | |
.directive('focusElement', ['$timeout', function($timeout) { | |
return { | |
link: function(scope, element, attrs) { | |
scope.$watch(attrs.focusElement, function(value) { | |
if(value === true) { | |
$timeout(function () { | |
element[0].focus(); | |
}); |
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
String csvLine = 'Test,Check,[email protected], "19, Link road, A1SH10, India", companyName, "companyStreet, CompanyCity, CompanyCountry"'; | |
String prevLine = csvLine; | |
Integer startIndex; | |
Integer endIndex; | |
while(csvLine.indexOf('"') > -1){ | |
if(startIndex == null){ | |
startIndex = csvLine.indexOf('"'); | |
csvLine = csvLine.substring(0, startIndex) + ':quotes:' + csvLine.substring(startIndex+1, csvLine.length()); |
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
(function() { | |
'use strict'; | |
angular | |
.module('app.directives') | |
/** | |
* @ngdoc filter | |
* @name filter:formattedDate | |
* @description |