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 ApexMetadataUtility { | |
/** | |
* Call apex controller method fetch metadata | |
* @param | |
* @return void | |
*/ | |
@AuraEnabled | |
public static list<SobjectMetadataWrapper> getSobjectMetadata(String[] sobjectarray){ | |
list<SobjectMetadataWrapper> lstsobjectMetadata = new list<SobjectMetadataWrapper>(); |
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 StandardDeviationComputation { | |
public static decimal getStandardDeviation(Integer precision){ | |
AggregateResult[] groupedResults = [SELECT COUNT(Id),SUM(DistanceSquare__c) FROM Survey__c GROUP BY Standard_Deviation__c ]; | |
decimal sumOfDistanceSquare = (decimal)groupedResults[0].get('expr1'); | |
integer count = (integer)groupedResults[0].get('expr0'); | |
if(count > 0){ | |
return system.Math.sqrt(sumOfDistanceSquare/count).setScale(precision);//Scale is kept at 3 currently | |
}else{ | |
return 0; | |
} |
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
({ | |
fetchContactList : function(component, event, helper) { | |
var action = component.get("c.getContacts"); | |
action.setCallback(this, function(response) { | |
var state = response.getState(); | |
if (component.isValid() && state === "SUCCESS") { | |
component.set("v.contacts", response.getReturnValue()); | |
} | |
}); | |
$A.enqueueAction(action); |
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 AccountTest{ | |
@AuraEnabled | |
public static list<AccountWrapper> getlstacc(){ | |
list<AccountWrapper> lstWrapper = new list<AccountWrapper>(); | |
for(Account acc :[Select Id , Name , NumberofLocations__c from Account order by NumberofLocations__c limit 10]){ | |
AccountWrapper accWrap = new AccountWrapper(); | |
accWrap.Name = acc.Name; | |
accWrap.noOfLocations = integer.valueof(acc.NumberofLocations__c); | |
lstWrapper.add(accWrap); |
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 AccountTest{ | |
@AuraEnabled | |
public static list<Account> getlstacc(){ | |
return [Select Id , Name , NumberofLocations__c from Account order by NumberofLocations__c limit 10]; | |
} | |
} |
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 DataWrapper { | |
public integer zoomLevel {get;set;} | |
public decimal scale {get;set;} | |
public string title {get;set;} | |
public decimal latitude {get;set;} | |
public decimal longitude {get;set;} | |
public string url {get;set;} | |
public DataWrapper (integer zoomLevel,decimal scale, |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<% include ../partials/ldOut %> | |
</head> | |
<body class="slds"> | |
<header> | |
</header> | |
<main> | |
<div > |
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
ar nforce = require('nforce'); | |
var express = require('express'); | |
var port = process.env.PORT || 3000; | |
var org = nforce.createConnection({ | |
clientId: '3MVG9uudbyLbNPZMk0vYn7ICarLW4qV5bLdL.KqYws.i1.oN99y14Skth6utXg0nwCuPpSMtr9lB7HIOx6M65', | |
clientSecret: '6326007125179395206', | |
redirectUri: 'https://protected-fortress-46904.herokuapp.com/oauth/_callback', | |
apiVersion: 'v34.0', // optional, defaults to current salesforce API version | |
environment: 'production', // optional, salesforce 'sandbox' or 'production', production default |
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
<aura:component implements="forceCommunity:availableForAllPageTypes"> | |
<aura:attribute name="supportURL" type="string" default="/s/contactsupport"/> | |
<ui:button aura:id="button" buttonTitle="Contact Support" label="Contact Support" press="{!c.navigate}" class="uiButton forceCommunityAskCommunity"/> | |
</aura:component> |