This file contains 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
@echo off | |
set imageBase="C:\Users\%USERNAME%\Pictures" | |
for /f "tokens=* delims= " %%G in ('dir /b/od "%imageBase%\*.jpg", | |
"%imageBase%\*.jpeg", | |
"%imageBase%\*.gif", | |
"%imageBase%\*.png"') DO ( set newest=%%G ) | |
FOR %%p IN ("%APPDATA%\Microsoft\Windows\Themes\CachedFiles\*") DO ( | |
Copy "%imageBase%\%newest%" %%p |
This file contains 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 triggerChangeEvent(element){ | |
if ("createEvent" in document) { | |
var evt = document.createEvent("HTMLEvents"); | |
evt.initEvent("change", false, true); | |
element.dispatchEvent(evt); | |
} | |
else | |
element.fireEvent("onchange"); | |
This file contains 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
Account firstAccount = new Account(Name='Test 5'); | |
Account secondAccount = new Account(Name='Test 6'); | |
Account thirdAccount = new Account(Name='Test 7'); | |
List<Account> accountList = new List<Account>{null, firstAccount, null, secondAccount, null, null , thirdAccount, null }; | |
List<Sobject> clean(List<SObject> inputSobjectList){ | |
Integer listSize = inputSobjectList.size(); | |
for(Integer index=0;index < listSize; ++index){ | |
if( inputSobjectList[index] == null ){ |
This file contains 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
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.openqa.selenium.support.FindBy; | |
import org.openqa.selenium.WebElement; | |
import com.github.webdriverextensions.junitrunner.WebDriverRunner; | |
import com.github.webdriverextensions.junitrunner.annotations.*; | |
import static com.github.webdriverextensions.Bot.*; | |
import static java.util.concurrent.TimeUnit.SECONDS; |
This file contains 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
<html> | |
<body> | |
</body> | |
<script> | |
var currentUrl = document.referrer; | |
document.write('currentUrl : '+ getJsonFromUrl(currentUrl).conid ); | |
function getJsonFromUrl(query) { | |
var regex = /[?&]([^=#]+)=([^&#]*)/g, | |
url = query, | |
params = {}, |
This file contains 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
package com.eternussolutions; | |
import java.io.OutputStreamWriter; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
// Simple page object model class | |
public class AdditionPageObjectModel extends PageObjectModel { | |
//constants |
This file contains 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
package com.eternussolutions; | |
import org.openqa.selenium.By; | |
import java.util.HashMap; | |
public class ElementData { | |
public String value; | |
public By selector; | |
public HashMap<String,By> selectors; | |
public String triggerEvent; |
This file contains 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
/*Embed this method in your test class*/ | |
private WebDriver getWebdriver(String browser){ | |
WebDriver driver = null; | |
// If the browser is Firefox, then do this | |
if(browser.equalsIgnoreCase("firefox")) { | |
System.setProperty("webdriver.gecko.driver", "drivers\\geckodriver.exe"); | |
driver = new FirefoxDriver(); | |
// If browser is IE, then do this | |
} else if (browser.equalsIgnoreCase("chrome")){ | |
System.setProperty("webdriver.chrome.driver", "drivers\\chromedriver.exe"); |
This file contains 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 > | |
<script src="{!URLFOR($Resource.recaptcha_wc, 'webcomponentsjs/webcomponents-lite.min.js')}"></script> | |
<link rel="import" href="{!URLFOR($Resource.recaptcha_wc, 're-captcha/re-captcha.html')}"/> | |
<re-captcha sitekey="6LdAph4UAAAAAFMj2Qk6huZS27MppjnrkYlEeYNE"></re-captcha> | |
</apex:page> |
This file contains 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:component controller="FormattedLongTextController" > | |
<apex:attribute name="inputValue" assignTo="{!longText}" description="input long text field" type="String" required="true"/> | |
<apex:outputText escape="false" value="{!formattedLongText}" /> | |
</apex:component> |