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 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 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 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 > | |
<!-- USE YOUR OWN BUTTON & DEPLOYMENT CODE HERE --> | |
<!-- button code --> | |
<img id="liveagent_button_online_573280000008OUC" style="display: none; border: 0px none; cursor: pointer" onclick="liveagent.startChatWithWindow('573280000008OUC', 'chat-window')" src="https://lakshay37demo-developer-edition.ap2.force.com/resource/1430373426000/Online_Chat_Button" /><img id="liveagent_button_offline_573280000008OUC" style="display: none; border: 0px none; " src="https://lakshay37demo-developer-edition.ap2.force.com/resource/1430373447000/Offline_Chat_Button" /> | |
<script type="text/javascript"> | |
if (!window._laq) { window._laq = []; } | |
window._laq.push(function(){liveagent.showWhenOnline('573280000008OUC', document.getElementById('liveagent_button_online_573280000008OUC')); | |
liveagent.showWhenOffline('573280000008OUC', document.getElementById('liveagent_button_offline_573280000008OUC')); | |
}); |
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
/********************************************************************************* | |
@description : method to make https callouts | |
@param : url, method, body , headers | |
@return : HttpResponse | |
**********************************************************************************/ | |
public static HttpResponse makeCallout(String url, String method, String body, Map<String,String> headers){ | |
HttpRequest req = new HttpRequest(); | |
HTTPResponse res = new HTTPResponse(); | |
Http http = new Http(); |
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
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
//Prior 32.0v | |
String comment = 'Click to vote/demote this idea'; | |
// Create feed item input | |
ConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput(); | |
feedItemInput.body = new ConnectApi.MessageBodyInput(); | |
// Create text segment to hold the message body | |
List<ConnectApi.MessageSegmentInput> segments = new List<ConnectApi.MessageSegmentInput>(); | |
ConnectApi.TextSegmentInput textSegment = new ConnectApi.TextSegmentInput(); |
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 Boolean checkValidUsername(String emailAddress){ | |
String emailRegex = '([a-zA-Z0-9_\\-\\.]+)@((\\[a-z]{1,3}\\.[a-z]{1,3}\\.[a-z]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})'; | |
Pattern MyPattern = Pattern.compile(emailRegex); | |
Matcher MyMatcher = MyPattern.matcher(emailAddress); | |
if(MyMatcher.matches()){ | |
return true; | |
}else{ | |
return false; |