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
(new WebDriverWait(driver, TIMEOUT)).until(new ExpectedCondition<Boolean>() { | |
public Boolean apply(WebDriver d) { | |
return driver.findElement(By.xpath("myXPathExpression")).isDisplayed(); | |
} | |
}); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:util="http://www.springframework.org/schema/util" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"> | |
<bean id="systemProps" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> | |
<property name="targetObject" value="#{@systemProperties}" /> | |
<property name="targetMethod" value="putAll" /> |
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
ClientConfig config = new DefaultClientConfig(); | |
Client client = Client.create(config); | |
WebResource service = client.resource(getBaseURI()); | |
MultivaluedMap<String, String> formData = new MultivaluedMapImpl(); | |
formData.add("parameter1", "value1"); | |
formData.add("parameter2", "value2"); | |
ClientResponse response = service.path("resource").accept(MediaType.APPLICATION_JSON).post(ClientResponse.class, formData); |
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
HttpClient client = new HttpClient(); | |
String url = "url destination"; | |
PostMethod method = new PostMethod(url); | |
method.setParameter("param1", "value1"); | |
method.addParameter("param2", "value2"); | |
client.executeMethod(method); | |
InputStream response = method.getResponseBodyAsStream(); |
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
cd compat-wireless-2012-02-28-p/ | |
./scripts/driver-select alx | |
make | |
sudo make install | |
sudo modprobe alx |
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
gem install eventmachine -- --with-ssl-dir=/usr/bin/openssl | |
gem install em-http-request | |
gem install json |
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 hml> | |
<html> | |
<head> | |
<title>Hello World!</title> | |
</head> | |
<body> | |
<p> | |
Welcome {{username}} | |
<p> | |
<ul> |
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> | |
<head> | |
<title>Fruit selection confirmation</title> | |
</head> | |
<body> | |
<p> | |
<p> | |
Your favorite fruit is {{fruit}} | |
</body> |
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 hml> | |
<html> | |
<head> | |
<title>Hello World!</title> | |
</head> | |
<body> | |
<p> | |
Welcome {{username}} | |
<p> | |
<ul> |
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
import bottle | |
import pymongo | |
import gridfs | |
from bottle import response | |
# this is the handler for the default path of the web server | |
@bottle.route('/img/<filename>') | |
def show_img(filename): |
OlderNewer