Skip to content

Instantly share code, notes, and snippets.

View JitendraZaa's full-sized avatar

Jitendra Zaa JitendraZaa

View GitHub Profile
/**
* @Author : Jitendra Zaa
* @Date : 25-March-2017
* @Desc : Classes to implement BPM (Business Process Management ) rule engine
*
* @Known Issue : 1. String values cannot have spaces
* : 3. All operators should have spaces , before and after, else it would raise an error.
* : There is no code written yet to auto format expression.
* */
@isTest
//Define set of all allowed operators
//Mostly we don't need to change this, it can be added in setup method
Operations opObj = Operations.getInstance();
opObj.registerOperation(OperationFactory.getInstance('&&'));
opObj.registerOperation(OperationFactory.getInstance('=='));
opObj.registerOperation(OperationFactory.getInstance('!='));
opObj.registerOperation(OperationFactory.getInstance('||'));
opObj.registerOperation(OperationFactory.getInstance('('));
opObj.registerOperation(OperationFactory.getInstance(')'));
opObj.registerOperation(OperationFactory.getInstance('<'));
<aura:component >
<aura:attribute name="title" type="String" required="true"/>
<div class="demo-only" style="height: 100%;">
<section class="slds-modal slds-fade-in-open">
<div class="slds-modal__container">
<header class="slds-modal__header">
<button class="slds-button slds-modal__close" title="Close"
onclick="{!c.closeMe}">
<aura:application extends="force:slds" >
<aura:attribute name="modalMessage" type="String" default="Default Message"/>
<aura:attribute name="modalTitle" type="String" default="Header Message"/>
<aura:dependency resource="markup://c:ModalWindow" />
<div class="slds">
<div class="slds-form-element slds-size--1-of-2 slds-m-around--xx-large">
<ui:inputText label="Title for Modal Dialog" value="{!v.modalTitle}" class="slds-input"/>
</div>
({
openWindow : function(component, event, helper) {
helper.openWindow(component, event, helper);
}
})
@JitendraZaa
JitendraZaa / build.properties
Created August 27, 2017 22:51
How to Retrieve and Deploy Custom Metadata Types using ANT
# build.properties
sfSandbox.serverurl = https://test.salesforce.com
sfPRO.serverurl = https://login.salesforce.com
sfdc.Org2.username=Org2@gmail.com
sfdc.Org2.password=Org2Pwd
sfdc.Org2.retrieveTarget=Org2\\src
sfdc.Org2.unpackaged=Org2\\src\\package.xml
sfdc.Org2.retrieveMessage= Script to retrieve metadata from Org2
@JitendraZaa
JitendraZaa / DriverFactory.java
Created August 28, 2017 02:20
Parallel execution of browsers in Selenium with the help of TestNG and determining maximum operating capacity of custom code in Salesforce
package com.jitendrazaa;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class DriverFactory
{
private DriverFactory()
{
@JitendraZaa
JitendraZaa / ConcurrentApexError.java
Created August 28, 2017 02:22
Sample Project showing how to perform load testing in Salesforce with the help of Selenium and TestNG Parallel execution http://JitendraZaa.com/blog
package com.jitendrazaa;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.testng.AssertJUnit;
import org.testng.annotations.Test;
public class ConcurrentApexError extends TestBase{
@JitendraZaa
JitendraZaa / ContactVFForLexAndClassic.xml
Created August 29, 2017 19:35
Use Visualforce in Classic and Lightning Experience - http://www.jitendrazaa.com/blog
<apex:page standardController="Contact" recordSetVar="contacts" standardStylesheets="false" applyBodyTag="false">
<apex:variable var="lightningDesktop" value="{! $User.UIThemeDisplayed == 'Theme4d'}" />
<div class="slds-scope">
<apex:outputPanel rendered="{! !lightningDesktop}">
<link class="user" href="/sCSS/38.0/sprites/1245343872000/Theme3/default/elements.css" rel="stylesheet" type="text/css" />
<link href="/sCSS/38.0/sprites/1251310209000/Theme3/dStandard.css" rel="stylesheet" type="text/css" />
<apex:form >
<apex:pageBlock title="Contacts List" id="contacts_list">
<apex:outputLabel value="Filter: " for="filterList" />
<apex:selectList value="{! filterId }" size="1" id="filterList">