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
| <taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${basedir}/ant-contrib-1.0b3.jar"/> |
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
| <project name="Retrieve and Deploy SFDC metadata" default="sfdcDetails" basedir="." xmlns:sf="antlib:com.salesforce"> | |
| <property file="${basedir}/environments/${environment}.properties"/> | |
| <condition property="sf.username" value=""> <not> <isset property="sf.username"/> </not> </condition> | |
| <condition property="sf.password" value=""> <not> <isset property="sf.password"/> </not> </condition> | |
| <condition property="sf.sessionId" value=""> <not> <isset property="sf.sessionId"/> </not> </condition> | |
| <taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${basedir}/ant-contrib-1.0b3.jar"/> | |
| <taskdef resource="com/salesforce/antlib.xml" uri="antlib:com.salesforce"> | |
| <classpath> | |
| <pathelement location="${basedir}/ant-salesforce.jar" /> | |
| </classpath> |
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
| .background(EmptyView().sheet(isPresented: $showAdd){ | |
| Text("Add Page") | |
| }) | |
| .background(EmptyView().sheet(isPresented: $showSettings){ | |
| Text("Settings Page") | |
| }) |
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
| <lightning:input aura:id="Bank_Account_Name__c" label="Bank Account Name" value="{!v.request.Bank_Account_Name__c}" required="true"/> |
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
| ({ | |
| init: function (component, event, helper) { | |
| //helper.fetchData(component, helper); | |
| }, | |
| submitRequestBtn: function(component, event, helper) { | |
| var bankName = component.find("Bank_Account_Name__c"); | |
| bankName.reportValidity(); | |
| var bankNo = component.find("Bank_Account_Number__c"); | |
| bankNo.reportValidity(); | |
| bankNo.setCustomValidity("Invalid Bank No format. Should be in the following format 00-1234-1234567-000"); |
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 description="SetDirectDebitComponent" implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global"> | |
| <aura:attribute name="bankList" type="String[]" default="['ANZ Bank','ASB Bank Limited','Bank of New Zealand','Credit Union','HSBC','Kiwibank Limited','The Co-operative Bank','TSB Bank Limited','Westpac','Other']"/> | |
| <aura:attribute name="selectedBank" type="String"/> | |
| <aura:attribute name="request" type="Account" | |
| default="{ 'sobjectType': 'Account', | |
| 'Bank_Account_Name__c' : '', | |
| 'Bank_Account_Number__c' : '', | |
| }" access="global"/> | |
| <!-- handlers--> | |
| <aura:handler name="init" value="{! this }" action="{! c.init }"/> |
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
| from urllib.request import urlopen | |
| from bs4 import BeautifulSoup | |
| import re | |
| def crawl_url(pageUrl): | |
| main_url = "http://books.toscrape.com/" | |
| url = main_url + pageUrl | |
| html = urlopen(url) | |
| soup = BeautifulSoup(html, "html.parser") | |
| try: |
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 RegexApexSample { | |
| //Removes whitespaces not found in quotes | |
| private String removeWhiteSpace(String strSample) { | |
| String regexpStr = '\\s+(?=([^"]*"[^"]*")*[^"]*$)'; | |
| try { | |
| Pattern myPattern = Pattern.compile(regexp); | |
| strSample = myPattern.matcher(strSample).replaceAll(''); | |
| } catch (Exception e){ | |
| system.debug('## regex pattern =>' + regexpStr + ' - '+ e.getMessage()+' ' e.getStackTraceString()); | |
| } |
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 void execute(QueueableContext context) { | |
| // Awesome processing logic here | |
| // Chain this job to next job by submitting the next job | |
| System.enqueueJob(new SecondJob()); | |
| } |
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
| // find all accounts in ‘NY’ | |
| List accounts = [select id from account where billingstate = ‘NY’]; | |
| // find a specific parent account for all records | |
| Id parentId = [select id from account where name = 'ACME Corp'][0].Id; | |
| // instantiate a new instance of the Queueable class | |
| MyQueueableClass accountUpdateJob = new MyQueueableClass(accounts, parentId); | |
| // enqueue the job for processing | |
| ID jobID = System.enqueueJob(accountUpdateJob); |