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> | |
<meta charset="utf-8"> | |
<style> | |
svg { | |
font: 10px sans-serif; | |
} | |
.bar rect { | |
fill: steelblue; | |
shape-rendering: crispEdges; | |
} |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 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
Distance | |
2.4059769174850905 | |
2.7600000000000002 | |
3.8217080187144488 | |
2.3899284588203313 | |
3.7264403738739054 | |
7.63 | |
3.16 | |
3.1600000000000006 | |
3.160000000000001 |
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> | |
<meta charset="utf-8"> | |
<style> | |
svg { | |
font: 10px sans-serif; | |
} | |
.bar rect { | |
fill: steelblue; | |
shape-rendering: crispEdges; | |
} |
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
<?php | |
//This demo doesn't cover case of network connectivity issues (failure to send HTTP POST to Textbelt) | |
//One could just wrap the request around try/catch exception handling for that | |
//Move the demo function into a separate file to make this into a wrapper library you can require/include and then call from a script | |
// A simple wrapper function to send SMS via Textbelt using curl in PHP | |
function sendSmsToTextbelt($number, $message, $locale="USA"){ | |
//determine the Textbelt URL to POST to... |
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"?> | |
<!-- note that this is somefile.pom not pom.xml, and may not be the same data as in pom.xml --> | |
<project> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.java-websocket</groupId> | |
<artifactId>Java-WebSocket</artifactId> | |
<packaging>jar</packaging> | |
<name>Java WebSocket</name> | |
<version>1.3.1-SNAPSHOT</version> | |
<description>A barebones WebSocket client and server implementation written in 100% Java</description> |
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
body { | |
white-space: pre; | |
font-family: consolas; | |
color: white; | |
background: black; | |
} | |
.property { | |
color: orange; | |
font-weight: bold; |
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
BridgeTalk.prototype.sendSynch = function(timeout) { | |
var self = this; | |
self.onResult = function(res) { | |
this.result = res.body; | |
this.complete = true; | |
} | |
self.complete = false; | |
self.send(); | |
if (timeout) { |
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 static org.junit.Assert.*; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.openqa.selenium.*; | |
import org.openqa.selenium.remote.*; | |
import java.net.URL; |
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
// snippet written for and relates to: | |
// http://autumnator.wordpress.com/2014/09/23/selenium-page-objects-beyond-pages-like-a-cart-object/ | |
/** | |
* Cart item implementation as a data structure | |
* containing a related set of WebElements to work with | |
* | |
* These cart items reside in and can be extracted from | |
* shopping cart page object to then be worked with. | |
**/ |
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
/* Safari workaround below simply constructs the required HTTP POST data | |
* as key/value pairs (e.g. param1=value1¶m2=value2, etc.) | |
* then makes an HTTP POST request with that data, then check the received | |
* HTTP response returned (e.g. status code 200 OK, or response body content contains what you expect) | |
* Example below currently skips checking response as that part is handled by the CustomHttpClient | |
* (implementation not shown). Making actual HTTP POST request is same thing. For details on that, | |
* see this for reference: | |
* http://stackoverflow.com/questions/2793150/how-to-use-java-net-urlconnection-to-fire-and-handle-http-requests | |
* http://stackoverflow.com/questions/9129766/urlconnection-is-not-allowing-me-to-access-data-on-http-errors-404-500-etc | |
* |