Package com.shaft.validation
Class Assertions
java.lang.Object
com.shaft.validation.Assertions
public class Assertions
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Assertions.AssertionComparisonType
static class
Assertions.AssertionType
static class
Assertions.ComparativeRelationType
static class
Assertions.VisualValidationEngine
-
Method Summary
Modifier and Type Method Description static void
assertBrowserAttribute(org.openqa.selenium.WebDriver driver, java.lang.String browserAttribute, java.lang.String expectedValue, Assertions.AssertionComparisonType assertionComparisonType, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)
Asserts browser attribute equals expectedValue if AssertionType is POSITIVE, or does not equal expectedValue if AssertionType is NEGATIVE.static void
assertBrowserAttribute(org.openqa.selenium.WebDriver driver, java.lang.String browserAttribute, java.lang.String expectedValue, java.lang.String... customLogMessage)
Asserts browser attribute equals expectedValue.static void
assertComparativeRelation(java.lang.Number expectedValue, java.lang.Number actualValue, Assertions.ComparativeRelationType comparativeRelationType, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)
Asserts that the expectedValue is related to the actualValue using the desired comparativeRelationType if AssertionType is POSITIVE, or not related if AssertionType is NEGATIVE.static void
assertComparativeRelation(java.lang.Number expectedValue, java.lang.Number actualValue, Assertions.ComparativeRelationType comparativeRelationType, java.lang.String... customLogMessage)
Asserts that the expectedValue is related to the actualValue using the desired comparativeRelationType.static void
assertElementAttribute(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, java.lang.String elementAttribute, java.lang.String expectedValue, Assertions.AssertionComparisonType assertionComparisonType, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)
Asserts webElement attribute equals expectedValue if AssertionType is POSITIVE, or does not equal expectedValue if AssertionType is NEGATIVE.static void
assertElementAttribute(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, java.lang.String elementAttribute, java.lang.String expectedValue, java.lang.String... customLogMessage)
Asserts webElement attribute equals expectedValue.static void
assertElementCSSProperty(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, java.lang.String propertyName, java.lang.String expectedValue, Assertions.AssertionComparisonType assertionComparisonType, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)
Asserts webElement CSSProperty equals expectedValue if AssertionType is POSITIVE, or does not equal expectedValue if AssertionType is NEGATIVE.static void
assertElementCSSProperty(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, java.lang.String propertyName, java.lang.String expectedValue, java.lang.String... customLogMessage)
Asserts webElement CSSProperty equals expectedValue.static void
assertElementExists(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)
Asserts that the webElement found using the provided driver and locator exists if AssertionType is POSITIVE, or does not exist if AssertionType is NEGATIVE.static void
assertElementExists(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, java.lang.String... customLogMessage)
Asserts that the webElement found using the provided driver and locator exists.static void
assertElementMatches(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)
Asserts that the current image of the target element matches the expected reference image if AssertionType is POSITIVE, or doesn't match it if AssertionType is NEGATIVE.static void
assertElementMatches(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, Assertions.VisualValidationEngine visualValidationEngine, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)
Asserts that the current image of the target element matches the expected reference image using the desired VisualValidationEngine if AssertionType is POSITIVE, or doesn't match it if AssertionType is NEGATIVE.static void
assertElementMatches(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, Assertions.VisualValidationEngine visualValidationEngine, java.lang.String... customLogMessage)
Asserts that the current image of the target element matches the expected reference image using the desired VisualValidationEngine.static void
assertElementMatches(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, java.lang.String... customLogMessage)
Asserts that the current image of the target element matches the expected reference image.static void
assertEquals(java.lang.Object expectedValue, java.lang.Object actualValue, Assertions.AssertionComparisonType assertionComparisonType, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)
Asserts that two objects are equal if AssertionType is POSITIVE, or not equal if AssertionType is NEGATIVE.static void
assertEquals(java.lang.Object expectedValue, java.lang.Object actualValue, java.lang.String... customLogMessage)
Asserts that two objects are equal.static void
assertFail(java.lang.String... customLogMessage)
Force fail the current test.static void
assertFileExists(java.lang.String fileFolderName, java.lang.String fileName, int numberOfRetries, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)
Asserts that a certain file exists if AssertionType is POSITIVE, or doesn't exist if AssertionType is NEGATIVE.static void
assertFileExists(java.lang.String fileFolderName, java.lang.String fileName, int numberOfRetries, java.lang.String... customLogMessage)
Asserts that a certain file exists.static void
assertFileExists(java.lang.String fileFolderName, java.lang.String fileName, java.lang.String... customLogMessage)
Asserts that a certain file exists.static void
assertJSONFileContent(io.restassured.response.Response response, java.lang.String referenceJsonFilePath, RestActions.ComparisonType comparisonType, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)
Asserts that the API Response object matches the expected referenceJsonFile if AssertionType is POSITIVE, or doesn't match it if AssertionType is NEGATIVE.static void
assertJSONFileContent(io.restassured.response.Response response, java.lang.String referenceJsonFilePath, RestActions.ComparisonType comparisonType, java.lang.String... customLogMessage)
Asserts that the API Response object matches the expected referenceJsonFile.static void
assertJSONFileContent(io.restassured.response.Response response, java.lang.String referenceJsonFilePath, RestActions.ComparisonType comparisonType, java.lang.String jsonPathToTargetArray, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)
Asserts that the target array extracted by parsing the API Response object matches the expected referenceJsonFile if AssertionType is POSITIVE, or doesn't match it if AssertionType is NEGATIVE.static void
assertJSONFileContent(io.restassured.response.Response response, java.lang.String referenceJsonFilePath, RestActions.ComparisonType comparisonType, java.lang.String jsonPathToTargetArray, java.lang.String... customLogMessage)
Asserts that the target array extracted by parsing the API Response object matches the expected referenceJsonFile.static void
assertJSONFileContent(io.restassured.response.Response response, java.lang.String referenceJsonFilePath, java.lang.String... customLogMessage)
Asserts that the API Response object matches the expected referenceJsonFile.static void
assertNull(java.lang.Object object, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)
Asserts that the object is null if AssertionType is POSITIVE, or is not null if AssertionType is NEGATIVE.static void
assertNull(java.lang.Object object, java.lang.String... customLogMessage)
Asserts that the object is null.static void
assertTrue(java.lang.Boolean conditionalStatement, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)
Asserts that the provided conditional statement evaluates to true if AssertionType is POSITIVE, or to false if AssertionType is NEGATIVE.static void
assertTrue(java.lang.Boolean conditionalStatement, java.lang.String... customLogMessage)
Asserts that the provided conditional statement evaluates to true.
-
Method Details
-
assertFail
public static void assertFail(java.lang.String... customLogMessage)Force fail the current test.- Parameters:
customLogMessage
- a custom message that will appended to this step in the execution report
-
assertEquals
public static void assertEquals(java.lang.Object expectedValue, java.lang.Object actualValue, java.lang.String... customLogMessage)Asserts that two objects are equal.- Parameters:
expectedValue
- the expected value (test data) of this assertionactualValue
- the actual value (calculated data) of this assertioncustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertEquals
public static void assertEquals(java.lang.Object expectedValue, java.lang.Object actualValue, Assertions.AssertionComparisonType assertionComparisonType, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)Asserts that two objects are equal if AssertionType is POSITIVE, or not equal if AssertionType is NEGATIVE.- Parameters:
expectedValue
- the expected value (test data) of this assertionactualValue
- the actual value (calculated data) of this assertionassertionComparisonType
- AssertionComparisonType.LITERAL, CONTAINS, REGEX, CASE_INSENSITIVEassertionType
- AssertionType.POSITIVE, NEGATIVEcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertNull
public static void assertNull(java.lang.Object object, java.lang.String... customLogMessage)Asserts that the object is null.- Parameters:
object
- the object under testcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertNull
public static void assertNull(java.lang.Object object, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)Asserts that the object is null if AssertionType is POSITIVE, or is not null if AssertionType is NEGATIVE.- Parameters:
object
- the object under testassertionType
- AssertionType.POSITIVE, NEGATIVEcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertElementExists
public static void assertElementExists(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, java.lang.String... customLogMessage)Asserts that the webElement found using the provided driver and locator exists.- Parameters:
driver
- the current instance of Selenium webdriverelementLocator
- the locator of the webElement under test (By xpath, id, selector, name ...etc)customLogMessage
- a custom message that will appended to this step in the execution report
-
assertElementExists
public static void assertElementExists(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)Asserts that the webElement found using the provided driver and locator exists if AssertionType is POSITIVE, or does not exist if AssertionType is NEGATIVE.- Parameters:
driver
- the current instance of Selenium webdriverelementLocator
- the locator of the webElement under test (By xpath, id, selector, name ...etc)assertionType
- AssertionType.POSITIVE, NEGATIVEcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertElementAttribute
public static void assertElementAttribute(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, java.lang.String elementAttribute, java.lang.String expectedValue, java.lang.String... customLogMessage)Asserts webElement attribute equals expectedValue.- Parameters:
driver
- the current instance of Selenium webdriverelementLocator
- the locator of the webElement under test (By xpath, id, selector, name ...etc)elementAttribute
- the desired attribute of the webElement under testexpectedValue
- the expected value (test data) of this assertioncustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertElementAttribute
public static void assertElementAttribute(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, java.lang.String elementAttribute, java.lang.String expectedValue, Assertions.AssertionComparisonType assertionComparisonType, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)Asserts webElement attribute equals expectedValue if AssertionType is POSITIVE, or does not equal expectedValue if AssertionType is NEGATIVE. Supports Text, TagName, Size, Other Attributes- Parameters:
driver
- the current instance of Selenium webdriverelementLocator
- the locator of the webElement under test (By xpath, id, selector, name ...etc)elementAttribute
- the desired attribute of the webElement under testexpectedValue
- the expected value (test data) of this assertionassertionComparisonType
- AssertionComparisonType.LITERAL, CONTAINS, REGEX, CASE_INSENSITIVEassertionType
- AssertionType.POSITIVE, NEGATIVEcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertElementCSSProperty
public static void assertElementCSSProperty(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, java.lang.String propertyName, java.lang.String expectedValue, java.lang.String... customLogMessage)Asserts webElement CSSProperty equals expectedValue.- Parameters:
driver
- the current instance of Selenium webdriverelementLocator
- the locator of the webElement under test (By xpath, id, selector, name ...etc)propertyName
- the target CSS property of the webElement under testexpectedValue
- the expected value (test data) of this assertioncustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertElementCSSProperty
public static void assertElementCSSProperty(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, java.lang.String propertyName, java.lang.String expectedValue, Assertions.AssertionComparisonType assertionComparisonType, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)Asserts webElement CSSProperty equals expectedValue if AssertionType is POSITIVE, or does not equal expectedValue if AssertionType is NEGATIVE.- Parameters:
driver
- the current instance of Selenium webdriverelementLocator
- the locator of the webElement under test (By xpath, id, selector, name ...etc)propertyName
- the target CSS property of the webElement under testexpectedValue
- the expected value (test data) of this assertionassertionComparisonType
- AssertionComparisonType.LITERAL, CONTAINS, REGEX, CASE_INSENSITIVEassertionType
- AssertionType.POSITIVE, NEGATIVEcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertBrowserAttribute
public static void assertBrowserAttribute(org.openqa.selenium.WebDriver driver, java.lang.String browserAttribute, java.lang.String expectedValue, java.lang.String... customLogMessage)Asserts browser attribute equals expectedValue. Supports CurrentUrl, PageSource, Title, WindowHandle, WindowPosition, WindowSize- Parameters:
driver
- the current instance of Selenium webdriverbrowserAttribute
- the desired attribute of the browser window under testexpectedValue
- the expected value (test data) of this assertioncustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertBrowserAttribute
public static void assertBrowserAttribute(org.openqa.selenium.WebDriver driver, java.lang.String browserAttribute, java.lang.String expectedValue, Assertions.AssertionComparisonType assertionComparisonType, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)Asserts browser attribute equals expectedValue if AssertionType is POSITIVE, or does not equal expectedValue if AssertionType is NEGATIVE. Supports CurrentUrl, PageSource, Title, WindowHandle, WindowPosition, WindowSize- Parameters:
driver
- the current instance of Selenium webdriverbrowserAttribute
- the desired attribute of the browser window under testexpectedValue
- the expected value (test data) of this assertionassertionComparisonType
- AssertionComparisonType.LITERAL, CONTAINS, REGEX, CASE_INSENSITIVEassertionType
- AssertionType.POSITIVE, NEGATIVEcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertComparativeRelation
public static void assertComparativeRelation(java.lang.Number expectedValue, java.lang.Number actualValue, Assertions.ComparativeRelationType comparativeRelationType, java.lang.String... customLogMessage)Asserts that the expectedValue is related to the actualValue using the desired comparativeRelationType.- Parameters:
expectedValue
- the expected value (test data) of this assertionactualValue
- the actual value (calculated data) of this assertioncomparativeRelationType
- assertComparativeRelation.GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, EQUALScustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertComparativeRelation
public static void assertComparativeRelation(java.lang.Number expectedValue, java.lang.Number actualValue, Assertions.ComparativeRelationType comparativeRelationType, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)Asserts that the expectedValue is related to the actualValue using the desired comparativeRelationType if AssertionType is POSITIVE, or not related if AssertionType is NEGATIVE.- Parameters:
expectedValue
- the expected value (test data) of this assertionactualValue
- the actual value (calculated data) of this assertioncomparativeRelationType
- assertComparativeRelation.GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, EQUALSassertionType
- AssertionType.POSITIVE, NEGATIVEcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertFileExists
public static void assertFileExists(java.lang.String fileFolderName, java.lang.String fileName, java.lang.String... customLogMessage)Asserts that a certain file exists. Attempts to find the file only once.- Parameters:
fileFolderName
- The location of the folder that contains the target file, relative to the project's root folder, ending with a /fileName
- The name of the target file (including its extension if any)customLogMessage
- a custom message that will appended to this step in the execution report
-
assertFileExists
public static void assertFileExists(java.lang.String fileFolderName, java.lang.String fileName, int numberOfRetries, java.lang.String... customLogMessage)Asserts that a certain file exists. Attempts to find the file for the desired NumberOfRetries.- Parameters:
fileFolderName
- The location of the folder that contains the target file, relative to the project's root folder, ending with a /fileName
- The name of the target file (including its extension if any)numberOfRetries
- number of times to try to find the file, given that each retry is separated by a 500 millisecond wait timecustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertFileExists
public static void assertFileExists(java.lang.String fileFolderName, java.lang.String fileName, int numberOfRetries, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)Asserts that a certain file exists if AssertionType is POSITIVE, or doesn't exist if AssertionType is NEGATIVE. Attempts to find the file for the desired NumberOfRetries.- Parameters:
fileFolderName
- The location of the folder that contains the target file, relative to the project's root folder, ending with a /fileName
- The name of the target file (including its extension if any)numberOfRetries
- number of times to try to find the file, given that each retry is separated by a 500 millisecond wait timeassertionType
- AssertionType.POSITIVE, NEGATIVEcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertTrue
public static void assertTrue(java.lang.Boolean conditionalStatement, java.lang.String... customLogMessage)Asserts that the provided conditional statement evaluates to true.- Parameters:
conditionalStatement
- the statement that will be evaluated to see if it matches the expected resultcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertTrue
public static void assertTrue(java.lang.Boolean conditionalStatement, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)Asserts that the provided conditional statement evaluates to true if AssertionType is POSITIVE, or to false if AssertionType is NEGATIVE.- Parameters:
conditionalStatement
- the statement that will be evaluated to see if it matches the expected resultassertionType
- AssertionType.POSITIVE, NEGATIVEcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertJSONFileContent
public static void assertJSONFileContent(io.restassured.response.Response response, java.lang.String referenceJsonFilePath, java.lang.String... customLogMessage)Asserts that the API Response object matches the expected referenceJsonFile.- Parameters:
response
- the full response object returned by performRequest method.referenceJsonFilePath
- the full absolute path to the test data file that will be used as a reference for this comparisoncustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertJSONFileContent
public static void assertJSONFileContent(io.restassured.response.Response response, java.lang.String referenceJsonFilePath, RestActions.ComparisonType comparisonType, java.lang.String... customLogMessage)Asserts that the API Response object matches the expected referenceJsonFile.- Parameters:
response
- the full response object returned by performRequest method.referenceJsonFilePath
- the full absolute path to the test data file that will be used as a reference for this comparisoncomparisonType
- ComparisonType.EQUALS, CONTAINS, MATCHES, EQUALS_STRICT; Note that MATCHES ignores the content ordering inside the JSONcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertJSONFileContent
public static void assertJSONFileContent(io.restassured.response.Response response, java.lang.String referenceJsonFilePath, RestActions.ComparisonType comparisonType, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)Asserts that the API Response object matches the expected referenceJsonFile if AssertionType is POSITIVE, or doesn't match it if AssertionType is NEGATIVE.- Parameters:
response
- the full response object returned by performRequest method.referenceJsonFilePath
- the full absolute path to the test data file that will be used as a reference for this comparisoncomparisonType
- ComparisonType.EQUALS, CONTAINS, MATCHES, EQUALS_STRICT; Note that MATCHES ignores the content ordering inside the JSONassertionType
- AssertionType.POSITIVE, NEGATIVEcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertJSONFileContent
public static void assertJSONFileContent(io.restassured.response.Response response, java.lang.String referenceJsonFilePath, RestActions.ComparisonType comparisonType, java.lang.String jsonPathToTargetArray, java.lang.String... customLogMessage)Asserts that the target array extracted by parsing the API Response object matches the expected referenceJsonFile.- Parameters:
response
- the full response object returned by performRequest method.referenceJsonFilePath
- the full absolute path to the test data file that will be used as a reference for this comparisoncomparisonType
- ComparisonType.EQUALS, CONTAINS, MATCHES, EQUALS_STRICT; Note that MATCHES ignores the content ordering inside the JSONjsonPathToTargetArray
- a jsonpath that will be parsed to point to the target JSON ArraycustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertJSONFileContent
public static void assertJSONFileContent(io.restassured.response.Response response, java.lang.String referenceJsonFilePath, RestActions.ComparisonType comparisonType, java.lang.String jsonPathToTargetArray, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)Asserts that the target array extracted by parsing the API Response object matches the expected referenceJsonFile if AssertionType is POSITIVE, or doesn't match it if AssertionType is NEGATIVE.- Parameters:
response
- the full response object returned by performRequest method.referenceJsonFilePath
- the full absolute path to the test data file that will be used as a reference for this comparisoncomparisonType
- ComparisonType.EQUALS, CONTAINS, MATCHES, EQUALS_STRICT; Note that MATCHES ignores the content ordering inside the JSONjsonPathToTargetArray
- a jsonpath that will be parsed to point to the target JSON ArrayassertionType
- AssertionType.POSITIVE, NEGATIVEcustomLogMessage
- a custom message that will appended to this step in the execution report
-
assertElementMatches
public static void assertElementMatches(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, java.lang.String... customLogMessage)Asserts that the current image of the target element matches the expected reference image. Uses OpenCV natively.- Parameters:
driver
- the current instance of Selenium webdriverelementLocator
- the locator of the webElement under test (By xpath, id, selector, name ...etc)customLogMessage
- a custom message that will appended to this step in * the execution report
-
assertElementMatches
public static void assertElementMatches(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)Asserts that the current image of the target element matches the expected reference image if AssertionType is POSITIVE, or doesn't match it if AssertionType is NEGATIVE. Uses OpenCV natively.- Parameters:
driver
- the current instance of Selenium webdriverelementLocator
- the locator of the webElement under test (By xpath, id, selector, name ...etc)assertionType
- AssertionType.POSITIVE, NEGATIVEcustomLogMessage
- a custom message that will appended to this step in * the execution report
-
assertElementMatches
public static void assertElementMatches(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, Assertions.VisualValidationEngine visualValidationEngine, java.lang.String... customLogMessage)Asserts that the current image of the target element matches the expected reference image using the desired VisualValidationEngine. Supports OpenCV natively, and Applitools Eyes. To use Eyes you need to configure your applitoolsApiKey in the path.properties file- Parameters:
driver
- the current instance of Selenium webdriverelementLocator
- the locator of the webElement under test (By xpath, id, selector, name ...etc)visualValidationEngine
- VisualValidationEngine.EXACT_OPENCV, EXACT_EYES, STRICT_EYES, CONTENT_EYES, LAYOUT_EYEScustomLogMessage
- a custom message that will appended to this step in * the execution report
-
assertElementMatches
public static void assertElementMatches(org.openqa.selenium.WebDriver driver, org.openqa.selenium.By elementLocator, Assertions.VisualValidationEngine visualValidationEngine, Assertions.AssertionType assertionType, java.lang.String... customLogMessage)Asserts that the current image of the target element matches the expected reference image using the desired VisualValidationEngine if AssertionType is POSITIVE, or doesn't match it if AssertionType is NEGATIVE. Supports OpenCV natively, and Applitools Eyes. To use Eyes you need to configure your applitoolsApiKey in the path.properties file- Parameters:
driver
- the current instance of Selenium webdriverelementLocator
- the locator of the webElement under test (By xpath, id, selector, name ...etc)visualValidationEngine
- VisualValidationEngine.EXACT_OPENCV, EXACT_EYES, STRICT_EYES, CONTENT_EYES, LAYOUT_EYESassertionType
- AssertionType.POSITIVE, NEGATIVEcustomLogMessage
- a custom message that will appended to this step in * the execution report
-


Before Change
def _load_stop_words(language):
stop_words = set()
if STOP_WORDS in RESOURCE_INDEX[language]:
stop_words_file_path = os.path.join(
get_resources_path(language),
RESOURCE_INDEX[language][STOP_WORDS])
with io.open(stop_words_file_path, encoding="utf8") as f:
lines = (normalize(l) for l in f)
stop_words = set(l for l in lines if l)
return stop_words
def get_stop_words(language):
After Change
def _load_stop_words(stop_words_path):
if not os.path.exists(stop_words_path):
return None
with io.open(stop_words_path, encoding="utf8") as f:
lines = (normalize(l) for l in f)
stop_words = set(l for l in lines if l)
return stop_words


Remember me on this computer
Forgot your password? Click here to reset it.
New York City Transit
Miami-Dade County Transit
Boston Transit
Los Angeles California Transit
Washington Metropolitan Area Transit
Chicago Transit


DDS Signal Generator
A signal generator for a home lab:
- Frequency range: 20Hz - 30MHz
- AD9951 DDS
- 100MHz external crystal clock generator with 4x internal multiplication
- PIC16F886 microcontroller
- Rotary encoder
- 16x2 LCD panel
- Fs low-pass output filter
Note: all these projects are in progress, parts have been ordered, requirements can change.


Custom Social Media Marketing & Website Design. Never a Cookie Cutter Approach.
Let us improve your online presence!
Social Media Marketing
Are you looking for more potential customers for your business? If so, you came to the right place! Enjoy the
Website, explore our options, and get ready to join the movement.
Is your business in need of Web Development or Design? We have an in-house Developer that specializes in responsive,
semantic design, that can meet your needs.
Graphic Design
Graphic Design is a way to show the uniqueness of your company. Let our experience in design and business give
an opportunity to outshine your competition's design!
Social Media Marketing is one of the most important aspects of business today. Often overlooked, this could be a critical
mistake to the future of your organization. Whether a start-up, small business, or Fortune 500, Social Media is key
to your success.
Social Media Packages
person_add
Basic Package:
$250 per Month
1 Post per Day, 5 Days a Week
1 Post per Week
This is one of our most popular options.
group
Increase Instagram Followers:
$200 per Month
We will ncrease Instagram followers quickly and organically on a monthly basis.
public
Optimized Business Package:
$350 per Month
2 Post per Day, 5 Days a Week.
1 Post per Day, 5 Days a Week.
location_city
Instagram Business Influencer:
$450 per Month
1 Post per Day, 5 Days per Week.
We can help increased your Instagram followers, this is a great option for individuals or businesses.
mood
Premium Business Package:
$500 per Month
2 Post per Day, 5 Days a Week.
2 Posts per Day, 5 Days a Week.
2 Posts per Week
Ideal for the busy business owner that needs help with socail media.
notifications_active
Well Rounded Campaing:
$750 per Month
2 Posts per Day, 5 Days a Week.
2 Posts per Day, 5 Days a Week.
3 Posts per Week
3 Posts per Week
whatshot
Custom Package:
$TBD
You tell us what your exact needs and budget are and we create a social media strategy to meet
your business objectives.
Social Media Marketing Created just for yoy
Select the Media for you.
sentiment_satisfied
DIY Package:
$150 per Month
Receive a monthly subscription to our email tips and tricks newsletter to ensure that you have
the knowledge to launch your own strategy for using all social media.
Learn from the Best!
Use Social Media the Correct Way.
Become an Expert!
Web Design Packages
computer
Option 1: $900
Up to 5 Pages
Bootstrap 4
Materialize CSS
WordPress Sites Available
tablet
Option 2: $1500
Option 1 Features Plus:
Up to 10 Pages
e-Commerce
SEO
Sass
node.js
website
Option 3: $2500
Option 2 Features Plus:
Up to 15 Pages
MySQL Database
Google Analytics
Google Tag Manager
Custom WordPress Themes
All websites are built using front-end frameworks Bootstrap 4 or Materialize CSS. Bootstrap is an open source toolkit
that is responsive, mobile-first for developing with HTML, CSS, and JS. We build your entire website with Sass
variables and mixins, responsive grid system, and powerful plugins built on jQuery. Materialize CSS is another
modern front-end framework, creating website and UI that are next level using the Materialize CSS framework which
is based on Google's Material Design scheme. WordPress sites are available upon request. Using semantically written
HTML 5, CSS3, and JavaScript HTML provides the formatting and structure of sites. CSS is used to control presentation,
formatting, and layout. JavaScript is used to control the behavior of different elements. PHP is a powerful and
widely-used open source server-side scripting language to write dynamically generated web pages.
Graphic Design
The Social Movement offers a wide variety of Graphic Design. Suited for any size company with a huge idea. Let us help
in your design needs. Contact our design team today!
303.557.2399
Social Media Packages
Basic Package:
$250 per Month
1 Post per Day, 5 Days a Week
1 Post per Week
This is one of our most popular options.
Increase Instagram Followers:
$200 per Month
We will ncrease Instagram followers quickly and organically on a monthly basis.
Optimized Business Package:
$350 per Month
2 Post per Day, 5 Days a Week.
1 Post per Day, 5 Days a Week.
Instagram Business Influencer:
$450 per Month
1 Post per Day, 5 Days per Week.
We can help increased your Instagram followers, this is a great option for individuals or businesses.


MINUS()
MINUS(array1, array2, ... arrayN) → newArray
Return the difference of all arrays specified.
- arrays (array, repeatable): an arbitrary number of arrays as multiple
arguments (at least 2)
- returns newArray (array): an array of values that occur in the first array,
but not in any of the subsequent arrays. The order of the result array is undefined
and should not be relied on. Duplicates will be removed.
Example
RETURN MINUS( [1,2,3,4], [3,4,5,6], [5,6,7,8] )


Theoretical performance curve showing the effect of temperature on performance. T opt is the optimum temperature to maximize performance; P max is the maximal performance; breadth is the performance breadth, which is the range of temperature over which performance is above a specified percentage of maximal performance.


public interface ICacheStore
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Allows for cleanup of a cache implementation.
|
ICacheable |
get(String name)
Return a cached object with the given name.
|
Iterator<String> |
getObjectNames()
Return iterator over the names of all already loaded objects in the storage.
|
Iterator<SoftReference<? extends ICacheable>> |
getObjects()
Return iterator over the already loaded objects in the storage.
|
boolean |
offer(String name,
Object obj)
Offer an object to the cache with an associated key.
|
void |
put(String name,
Object obj)
Puts an object in the cache with the associated key.
|
boolean |
remove(ICacheable obj)
Delete the passed cached object.
|
boolean |
remove(String name)
Delete the cached object with the given name.
|
void |
setMaxEntries(int max)
Sets the maximum number of entries for the cache.
|
boolean offer(String name, Object obj)
name
- string name representing the objectobj
- cacheable objectvoid put(String name, Object obj)
name
- string name representing the objectobj
- cacheable objectICacheable get(String name)
name
- the name of the object to returnnull
if no such object was foundboolean remove(ICacheable obj)
obj
- the object to deleteboolean remove(String name)
name
- the name of the object to deleteIterator<String> getObjectNames()
Iterator<SoftReference<? extends ICacheable>> getObjects()
void setMaxEntries(int max)
max
- upper-limit of the cachevoid destroy()
Copyright © 2005–2016 Red5. All rights reserved.


welcome to our page , please choose a photo
you have 25 attempts
At the end , it will show you how many times you vote and shown imges


#include <data_flow_ops.h>
Dequeues n
tuples of one or more tensors from the given queue.
This operation is not supported by all queues. If a queue does not support DequeueUpTo, then an Unimplemented error is returned.
If the queue is closed and there are more than 0 but less than n
elements remaining, then instead of returning an OutOfRange error like QueueDequeueMany, less than n
elements are returned immediately. If the queue is closed and there are 0 elements left in the queue, then an OutOfRange error is returned just like in QueueDequeueMany. Otherwise the behavior is identical to QueueDequeueMany:
This operation concatenates queue-element component tensors along the 0th dimension to make a single component tensor. All of the components in the dequeued tuple will have size n in the 0th dimension.
This operation has k
outputs, where k
is the number of components in the tuples stored in the given queue, and output i
is the ith component of the dequeued tuple.
Arguments:
Optional attributes (see Attrs
):
Returns:
OutputList
: One or more tensors that were dequeued as a tuple.
Constructors and Destructors |
|
|---|---|
QueueDequeueUpTo(const ::tensorflow::Scope & scope, ::tensorflow::Input handle, ::tensorflow::Input n, const DataTypeSlice & component_types)
|
|
QueueDequeueUpTo(const ::tensorflow::Scope & scope, ::tensorflow::Input handle, ::tensorflow::Input n, const DataTypeSlice & component_types, const QueueDequeueUpTo::Attrs & attrs)
|
Public attributes |
|
|---|---|
components
|
|
operation
|
Public functions |
|
|---|---|
operator[](size_t index) const
|
Public static functions |
|
|---|---|
TimeoutMs(int64 x)
|
Structs |
|
|---|---|
|
tensorflow:: |
Optional attribute setters for QueueDequeueUpTo. |
::tensorflow::OutputList components
Operation operation
QueueDequeueUpTo( const ::tensorflow::Scope & scope, ::tensorflow::Input handle, ::tensorflow::Input n, const DataTypeSlice & component_types )
QueueDequeueUpTo( const ::tensorflow::Scope & scope, ::tensorflow::Input handle, ::tensorflow::Input n, const DataTypeSlice & component_types, const QueueDequeueUpTo::Attrs & attrs )
::tensorflow::Output operator[]( size_t index ) const
Attrs TimeoutMs( int64 x )


ANC youth task team satisfied with urgent handling of member's murder case
by Canny MaphangaThe ANC national youth task team (NYTT) says it is satisfied with the urgent handling of a case involving the murder of one of its members, Lethabo Nkoana.
This after the man accused of Nkoana's murder made his first appearance in the Temba Magistrate's Court on Monday. He is facing charges of murder, attempted murder as well as the possession of an unlicenced firearm and ammunition.
"The ANC NYTT is satisfied with the work of the police so far in attending this matter with the urgency it deserves," its convener, Tandi Mahambehlala, said in a statement on Monday.
"These charges are directly in relation with the events that occurred at the Tshwane youth assembly, which led to the subsequent murder of comrade Lethabo Nkoana," Mahambehlala added.
Nkoana, 25, was shot and killed at a gathering of ANC Youth League (ANCYL) members at Temba Stadium in Hammanskraal last Saturday, News24 reported.
Gauteng police spokesperson Brigadier Mathapelo Peters previously told News24 that preliminary findings suggested there was an argument between delegates at the rally before the shooting.
"It was reported that the deceased was trying to defuse the fight when an unknown man emerged from the crowd and fired shots at him, fatally wounding the 25-year old victim," she said.
READ: ANC's y outh t ask t eam visits family of member shot dead at rally
"The NYTT is determined to expose those who seek to handle vulnerable members of the ANCYL and create disorder and chaos.
"Our movement has been infiltrated by thugs and we seek to uproot any nefarious behaviour whenever it raises its head," Mahambehlala added.
The NYTT said it was also hopeful the murder case would assist in achieving this.
The accused, who has not yet been named, will return to court on November 25 for a formal bail application.


The Best Chocolate Chip Cookies
Recipe by: My Grandma
Prep Time: 45 Min
INGREDIENTS
1 1/2 cup (3 sticks) softened butter
1 cup brown sugar
1 cup granulated sugar
1 Tbl vanilla instant pudding powder
2 Tbl milk
2 Tbl vanilla extract
2 eggs
4 cups all purpose flour
2 tsp baking soda
1/2 tsp salt
4 cups chocolate chipsv
1 cup chopped walnuts or pecans(optional)
Preheat oven to 350 degrees
Beat butter and sugars together until light and fluffy.
Stir in pudding mix milk and vanilla extract.
Beat in eggs.
Add dry ingredients and stir until combined.
Stir in chocolate chips and nuts.

Bake 8-10 minutes or until golden brown
Nutrition Information
Probably bad for you, but who cares. MMMMMM COOKIES!!!! nom nom nom
So, in case you didn't know, your grandma didn't actually make this recipe, it was altered from Open Source Recipe "http://www.opensourcefood.com/people/Amanori/recipes/mamas-recipe-the-best-chocolate-chip-cookies"
Sorry to break the news.


Kmom04
Fyra pelare
- Samarbet
- Sammhörighet
- Verktyg
- Skalning
What are tools?
Version Control
- Create and fork repos
- Contribute back to repository
- Defining process for contributing
- Sharing commit rights
Artefact Management
Output from anything in the development process.
Automation tools
Reduce labor and energy used with a goal of imporing quality, prevision and accuracy of outcomes
Server installation
Tools for installing and configuring servers
Infrastructure automation (IaC)
Tools for provisionings servers
- Configuration drif
- MTTR
- Snowflake server
Testning
- Smoke testing
- Regression testing
- Usability testing
- A/B testing
- Blue-green deployment
- Canary process
Monitoring
Metrics
Quantative and qualitative measurments
Logging
Process of generating, filtering, collecting and analysing events
Right tool for the problem
Tools should improve the way we work
Tools don't matter
- Tools aren't engouh for a deopvs culture to exist
- Tools don't fix broken cultures
Open source
A "community-based company"
We are mindful, transparent and humane business
We plan and build for the long term.
We value craftsmanship in all we make
We believe fun should be part of everything we do
We keep it real always
Case study: Etsy
A culture of compassion
A culture of blamelessness
Remote-friendly
Tools enforcing practice
Buy or Build
"Choose boring technology"
"Generosity of spirit"
Measuring success
“measure anything, measure everything”
Summary
Clearly defined values that guide choice of tooling
No universally right or wrong tool
Cultur change and tooling doen't happen overnight
Tool is not seperate from the other three pillars


Before Change
return initBlank(rootName)
//reading from url - mainFile is where the data should go and resource is the url
else:
try:
if validators.url(resource):
readURL(resource,destination)
self.mainFile=destination
self.resource=resource
else:
self.mainFile=resource
return readCSD(self.mainFile)
except:
log.error("Resource %s is not a valid .csd object"%resource)
//checking if the data and metadata are in correct format
//stops the program if the integrity is not ok
def _checkIntegrity(self,error=True):
if not hasattr(self,"metadata") or not hasattr(self,"data"):
log.error("computational sequence is blank (data or metadata is missing)")
log.status("Checking the integrity of the <%s> computational sequence ..."%self.metadata["root name"])
After Change
// try:
if validators.url(resource):
//user would like to store to the current directory
if destination is None or destination == "":
destination=os.path.join("./",resource.split("/")[-1])
//user has chosen a different directory
elif ".csd" not in destination:
destination=os.path.join(destination,resource.split("/")[-1])
readURL(resource,destination)
self.mainFile=destination
self.resource=resource
else:


Select a velocity pressure (VP) calculation from the dropdown list which is composed of all saved VP calculations in the same folder as current saved WL_DA calculation.
If you
the DDL would be empty.
Note: disabled for visiting users.
ti: design ice thickness
tiz: the factored thickness of radial glaze ice at height z.
Enter a design ice thickness here and with selected VP calculation, the app will auto calculated the factored ice thickness for each appurtenances at specified elevations.
Alternatively, users like visitors can enter factored ice thickness for each appurtenance in the table.
A simplified input will hide certain input cells and has less input cells.


--- layout: post status: publish published: true title: Addison Russell! - Episode 7.13 author: display_name: Corey Fineran login: Corey email<EMAIL_ADDRESS>url: '' author_login: Corey author_email<EMAIL_ADDRESS>wordpress_id: 11162 wordpress_url: http://ivyenvy.com/?p=11162 date: '2015-04-22 22:53:50 +0000' date_gmt: '2015-04-23 03:53:50 +0000' categories: - Podcast tags: - Addison Russell comments: - id: 18199 author: Dawn Strand author_email: '' author_url: '' date: '2015-04-23 09:28:32 +0000' date_gmt: '2015-04-23 14:28:32 +0000' content: Just listened to the podcast and wanted to comment regarding David Ross. I heard an interview with Rizzo where he was asked if there was a guy in the clubhouse that everyone looked up to. Rizzo said, without a doubt, it was David Ross. He said if Ross was talking, everyone was listening. Makes me feel better to remember that every time he comes to the plate. - id: 18200 author: Ivy Envy author_email: '' author_url: '' date: '2015-04-23 09:30:28 +0000' date_gmt: '2015-04-23 14:30:28 +0000' content: Spread the word, Kurt hates David Ross. - id: 18267 author: Painless_Dave author_email: '' author_url: '' date: '2015-04-25 21:31:52 +0000' date_gmt: '2015-04-26 02:31:52 +0000' content: I really enjoy your podcast. I'd like to hear an epidode dedicated to the minors and future moves you think will happen especially post draft. How long until Schwarber and Vogelbach are in Iowa? Who gets moved/traded? With so much focus on hitters, what is the status of the arms in the system? You guys give great opinions and I really enjoy your fan approach. ---
In just a matter of a few days, the Cubs have called up their top two prospects. Late last week, it was Kris Bryant and then late on Monday, the Cubs called up Addison Russell to join the club on Tuesday.
On this episode, we'll talk about how bad we've been at predicting when the front office will call up prospects.
We look at how this team will line up defensively and how the pieces will fit together. We also take the opportunity to (again) evaluate this team and reconsider our expectations for the 2015 Cubs.
Though there is no official Scary Stat of the Week, we do share a few stats that are pretty scary in showing us how far the Cubs have come, and how bad things were.


The Alterdot Browser Extension allows you to connect to our BDNS (Blockchain Domain Name
System). For full decentralization host locally both an Alterdot node and an IPFS gateway. You
can also rely on our servers for easy access without hosting those two.
Alterdot Network
IPFS Network
Intercepted Search


Here is a collection of my past and current projects.
Amherst College's Women in Computer Science Club
As president of the WiCS Club, I created a website to provide information about our mission and
events throughout the school year. The site also allows those who are interested join our mailing list.
I integrated a Google Calendar plug-in to assure all events are up to date and can be easily edited in an
external Google Calendar for club events and meetings.
During my summer at Google's Computer Science Summer Institute, I worked with two other participants to
create a website that works as a search engine for memes. I designed and developed the internal social
network for users. I also worked in the backend to allow users to register, login, and logout using their
existing Google accounts.
My current and ongoing project is an educational tool that makes it easier for students to speak up about
their comfortability with newly learned topics. A typical scenario would begin with the teacher asking their
students, "Have you understood everything in today's class?" Their students would then press thumbs up or thumbs
down on their devices to reflect their confidence, and the teacher is provided with the anonymous classroom responses.


{% load socialaccount %} {% load crispy_forms_tags %}
My Classes
You haven't added any classes to your schedule yet. Search for the course number or name below.
Login to see your schedule


G. Pape
runit
runit - upgrading from previous versions
2.0.0 to 2.1.2
The chpst program learned a new option -b to run
a program with a different name as the 0th argument.
1.9.0 to 2.0.0
No further action from you is required.
1.8.0 to 1.9.0
The default directory for services is now /service/, and no longer
/var/service/.
To be consistent with the new default location, create a symlink when
upgrading
# ln -s /var/service /
When installing runit on a system that should comply with the Filesystem
Hierarchy Standard (FHS), neither /service/ nor
/var/service/ should be chosen, but /etc/service/.
It is recommended to create a compatibility symlink /service
pointing to /etc/service in this case.
1.7.x to 1.8.0
The runit program, the process no 1, has been
fixed to reap dead processes that re-parented to process no 1 (zombies)
more thoroughly.
Instructions on how to run runit with upstart as init scheme have
been added, svlogd has been changed to use a
new source port for each log message sent through udp, and this release
includes a build fix for AIX.
1.6.0 to 1.7.x
With this version the runsv program starts to
run the ./finish script with two arguments, the exit code and the exit
status of the just finished ./run script.
The timestamp svlogd optionally prepends to log
messages can be specified to be in iso 8601 alike format.
See the man pages for details.
1.5.x to 1.6.0
svlogd has been changed to prepend the optional
timestamp also to log messages sent to the network through UDP, just as it
does for log messages written to a log directory or standard error.
1.4.0 or 1.4.1 to 1.5.x
The svlogd program supports a new configuration
option p to optionally prefix each line written to logs, standard error, or
through UDP with a string, and no longer strips empty lines from the logs.
1.3.x to 1.4.0 or 1.4.1
With this version the runsvctrl, runsvstat,
svwaitdown, and svwaitup programs no longer are being
installed, the functionality of these programs has been incorporated into
the sv program.
The documentation now suggest to put service directories by default into
the /etc/sv/ directory, and a list of frequently asked questions
with answers has been added.
The chpst program understands a new option -d
to limit memory of the data segment per process.
1.2.x to 1.3.x
This release introduces a first test version of the sv
program, which can be used to control the state and query the status of
services monitored by runsv.
Optionally it can be sym-linked into /etc/init.d/ to provide an
interface to LSB init script actions for services controlled by runit.
See the man page for details.
Thanks to Lars Uffmann, instructions on how to run runit under launchd on
MacOSX 10.4 have been added.
1.1.0 to 1.2.x
With this version the runsv program makes
controlling the service through commands normally sent by
runsvctrl configurable;
arbitrary actions through external programs can optionally be specified, and
signalling of the service disabled if desired.
See the man page for details.
runsv now reports the seconds since ./run
has been started when running the ./finish script, instead of the
seconds since ./finish has been started.
It no longer reports immediately failing ./run scripts as ``running''
for up to one second, but as ``down, normally up, want up''.
1.0.x to 1.1.0
The svlogd program now interprets the ``e'' and
``E'' configuration options so that they can be combined to select or
deselect log messages to be written to standard error, similar to the ``+''
and ``-'' options for the rotated log.
It also provides the new ``t'' and ``N'' configuration options, see the
man page for details.
The chpst program supports adjusting the nice
level through the new -n command line option.
Starting with this version, /etc/runit/2 by default runs the
runsvdir program with the -P option.
To adapt edit /etc/runit/2 and change the invocation of
runsvdir accordingly, see
here.
Gerrit Pape <pape@smarden.org>


Description: Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
selector: String A string containing a selector expression to match elements against.
contained: Element A DOM element to match elements against.
Given a jQuery object that represents a set of DOM elements, the .has()
method constructs a new jQuery object from a subset of the matching elements. The supplied selector is tested against the descendants of the matching elements; the element will be included in the result if any of its descendant elements matches the selector.
Consider a page with a nested list as follows:

list item 1

list item 2

list item 2-a

list item 2-b

list item 3

list item 4

We can apply this method to the set of list items as follows:
$('li').has('ul').css('background-color', 'red');
The result of this call is a red background for item 2, as it is the only

that has a

among its descendants.
<!DOCTYPE html>

Does the UL contain an LI?


Notebooks
Story: Words and sentences: given by Piet Lynx
Words and sentences: given by Piet Lynx
Title
Words and sentences: given by Piet Lynx
Collection
Summary
Declensions of various nouns (animals, anatomy, family)
Comments
1) p.61 opp: note about which Korannas use a particular language form, 2) this story is found in Kora Book I-1
Contributors
Date
9 June
Categories
Keywords
Story Pages
58-62


The aim of this puzzle is to help Bender collect the maximum amount of money in a building before getting out. Each room contains a given amount, and opens to 2 other rooms (or outside). You can pass only one time in each room, but do not have to check if you do so, because the building does not contains cycles. This is a very classic graph problem, searching the longest path in a directed weighted graph, in a special case that makes it easy to solve (positive weights, and acylic). A possible model is to consider rooms as vertices, and connect each room r with the two rooms it opens to, by an edge of weight the amount of money in r. Then you just have to use a queue to explore all vertices starting from room 0, updating the maximum amount of money that can be pocketted on the way to each room.
import java.util.*; class Solution { private static int nbRooms; private static Room[] rooms; /** This class represents a room, which is characterized by * unique id in [0, nbRooms-1], the sum of money in the room * and the ids of the 2 next rooms (nbRoom for an exit) */ class Room { int id; int sum; int[] next; /** Initializes a new room with the 4 fields of line*/ public Room(String line) { String[] fields = line.split(" "); id = Integer.parseInt(fields[0]); sum = Integer.parseInt(fields[1]); next = new int[2]; next[0] = (fields[2].equals("E")) ? nbRooms : Integer.parseInt(fields[2]); next[1] = (fields[3].equals("E")) ? nbRooms : Integer.parseInt(fields[3]); } } public static void main(String args[]) { // Reads input and initializes the array of rooms Scanner in = new Scanner(System.in); nbRooms = in.nextInt(); in.nextLine(); rooms = new Room[nbRooms]; for (int i = 0; i < nbRooms; i++) rooms[i] = new Room(in.nextLine()); /* The array money contains the amount of money pocketted on the "best" path found yet (index nbRooms correspond to a virtual exit room) It is initially filled with zeros*/ int money[] = new int[nbRooms+1]; // Searches the building, updating money when finding a better path LinkedList<Room> q = new LinkedList<Room>(); q.add(rooms[0]); while (q.size() > 0) { Room r = q.remove(); for (int n : r.next) if (money[r.id] + r.sum > money[n]) { money[n] = money[r.id] + r.sum; if (n < nbRooms) q.add(rooms[n]); } } /* At this point, money[nbRooms] is the maximum amount of money pocketted on a path to the exit.*/ System.out.println(money[nbRooms]); } }


A B C D E G H I L M P R S T V
All Classes All Packages
All Classes All Packages
All Classes All Packages
S
- searchBranchWithID(String) - Method in class CargoCompany.Company
-
Search branch with its unique id
- searchBranchWithName(String) - Method in class CargoCompany.Company
-
Search branch with its branch-name
- searchEmployeeWithID(String) - Method in class CargoCompany.Company
-
Search employee with its unique id
- searchShipmentWithTrackingNumber(String) - Method in class CargoCompany.Company
-
Search shipment with its tracking-number.
- setBranchID(String) - Method in class CargoCompany.Branch
-
Set the branch-id.
- setBranchID(String) - Method in class CargoCompany.Employee
-
Set the branch-id of the employee.
- setBranchName(String) - Method in class CargoCompany.Branch
-
Set the branch-name.
- setBranchName(String) - Method in class CargoCompany.Employee
-
Set the branch-name of the employee.
- setCapacity(int) - Method in class CargoCompany.CompanyArray.CommonCollection
-
Set the current capacity of the collection.
- setCompanyName(String) - Method in class CargoCompany.Company
-
Set current company name.
- setCurrentBranch(Branch) - Method in class CargoCompany.Shipment
-
Set the current branch of the shipment.
- setCurrentBranchOfShipment(String, Branch) - Method in class CargoCompany.Employee
-
Set the current branch of the shipment.
- setCurrentStatus(ShipmentStatus) - Method in class CargoCompany.Shipment
-
Set the current status of the shipment.Status type is a enum.
- setCurrentStatusOfShipment(String, ShipmentStatus) - Method in class CargoCompany.Employee
-
Set the current status of shipment.
- setDescription(String) - Method in class CargoCompany.Shipment
-
Set the current-description of the shipment.
- setDescriptionOfShipment(String, String) - Method in class CargoCompany.Employee
-
Set the current description of the shipment.
- setEmployeeID(String) - Method in class CargoCompany.Employee
-
Set employee-id.
- setOrChangeBranch(Branch) - Method in class CargoCompany.Employee
-
Set the branch of the employee.
- setOrChangeForename(String) - Method in class CargoCompany.Person
-
Set forename of the person.
- setOrChangeSurname(String) - Method in class CargoCompany.Person
-
Set surname of the person.
- setReceiverPerson(Person) - Method in class CargoCompany.Shipment
-
Set the current-receiver of the shipment.
- setReceiverPersonOfShipment(String, Person) - Method in class CargoCompany.Employee
-
Set the current receiver-person of the shipment.
- setSenderPerson(Customer) - Method in class CargoCompany.Shipment
-
Set the current-sender of the shipment.
- setSenderPersonOfShipment(String, Customer) - Method in class CargoCompany.Employee
-
Set the current sender-person of the shipment.
- setTrackingNumber(String) - Method in class CargoCompany.Shipment
-
Set the tracking-number of shipment.
- setTrackingNumberOfShipment(String, String) - Method in class CargoCompany.Employee
-
Set the current tracking-number of the shipment.
- Shipment - Class in CargoCompany
-
Shipment Class There is so many shipment properties in it.
- Shipment(String, String, Branch, Customer, Person) - Constructor for class CargoCompany.Shipment
-
Shipment class for creating new shipment.
- shipmentInfo(String) - Method in class CargoCompany.Company
-
Print the shipment-info as an output.
- shipmentInfo(String) - Method in class CargoCompany.Employee
-
Print the shipment-info as an output.
- shipmentInfoForCustomer() - Method in class CargoCompany.Shipment
-
Shipment String representation for customer interface.
- shipmentInfoForCustomer(String) - Method in class CargoCompany.Company
-
Informing customer interface with shipment tracking-number.
- shipmentInfoWithBranch(Branch) - Method in class CargoCompany.Company
-
Print the current branch shipment info to the screen.
- shipmentInfoWithBranchID(String) - Method in class CargoCompany.Company
-
Print the current branch shipment info to the screen.
- ShipmentStatus - Enum in CargoCompany
-
Enum definition , Shipment Status Info.
- size() - Method in class CargoCompany.CompanyArray.CommonCollection
-
Return current used size on the collection.
- size() - Method in class CargoCompany.CompanyArray.GTUContainer
-
Return current used size on the collection.
All Classes All Packages


Kaisei
Account Info
Change
Username
@Model.Username
Email
@Model.Email
Password
***********
Stats
Authorized Apps
@Each.AuthedApps
Loading...
@EndEach
My Apps
Create App
@Each.AuthedApps
Loading...
@EndEach
Window Title
X


VSL // Proof Of Our Existence
* Mmuseumm
today’s Very Short List:
culture 8 Oct 2014
Magali Duzant is a NY-based artist and photographer. Her project Live Streaming Sunset
Subscribe
* The New York Art Book Fair may be over, but Printed Matter’s book launch events
* Trans-Pecos
http://link.nyobserver.com/516ca68465217dc6e1b9a3a61vu10.269k/TvnrKi0WTdwTHwxwCde0f
delightful e-mail that shares
cultural gems from a
different curator every day.
If you have any problems reading this e-mail, click here
http://link.nyobserver.com/516ca68465217dc6e1b9a3a61vu10.269k/UHyHCJsf7NZSKXrPC3c61
Subscribe
Forward
My Account
Unsubscribe
style 6 Oct 2014
Jewelry designer Nora Koganshares some of her style inspiration.
culture 3 Oct 2014
Chris Taillie on some music you have to see to believe.
tech 1 Oct 2014
Ivan Entchevitch on the Sonos Studio experience.
Editorial Policy
Privacy Policy
Contact Us
Press
Terms + Conditions
very fine print: ©2014
Observer VSL LLC.
321 West 44th Street, 6th Floor
New York, NY 10036 USA
All rights reserved.
Questions?<PHONE_NUMBER>.
This message was intended for<EMAIL_ADDRESS>If you believe this has been sent to you in error, please safely unsubscribe


{% extends "global/Base.html" %} {% load staticfiles otree_tags %} {% block title %} Survey {% endblock %} {% block content %}
Please indicate if you have taken college-level coursework in any of the following fields. (Mark all that apply)
| Course | Yes | No |
|---|---|---|
| Microeconomics or game theory | ||
| Marketing or business | ||
| Law |


The root element for the XML data file is PROX3DB
. The PROX3DB
tag must appear immediately
after the document type declaration.
The XML data file ends with the closing
</PROX3DB>
tag.
<PROX3DB>
Attributes None.
Children
OBJECTS |
zero or one | The objects in the database |
LINKS |
zero or one | The links in the database |
ATTRIBUTES |
zero or one | Attributes for objects, links, and containers |
CONTAINERS |
zero or one | Containers and their subgraphs, including subgraph attributes |
Content Model
(OBJECTS?, LINKS?, ATTRIBUTES?, CONTAINERS?)
Example
<PROX3DB> <OBJECTS>...</OBJECTS> <LINKS>...</LINKS> <ATTRIBUTES>...</ATTRIBUTES> <CONTAINERS>...</CONTAINERS> </PROX3DB>


League administrator {{ rearrangement.creator.first_name }} {{ rearrangement.creator.last_name }} ({{ rearrangement.creator.email }}) has rearranged the following fixture.
Fixture: {{ fixture.date }} - {{ fixture.team_a.club.name }} {{ fixture.team_a.name }} vs {{ fixture.team_b.club.name }} {{ fixture.team_b.name }}
New Date: {{ rearrangement.to_fixture.date }}
{% if rearrangement.reason %}The reasoning behind this decision is:
{{ rearrangement.reason }}
{% endif %}The new fixture can be found here


Password must be at least 6 characters long, must have at least one lowercase ('a'-'z') and one digit ('0'-'9')
Use another service to log in.


Outbound link
Outbound link with Class
Local Link
Hash-only Link
JavaScript Protocol Link
File Protocol Link
No
href
Attribute Link
Declarative Attributes
Declarative Attributes


Team Member
Meet the team. We love working as a team and have continued to work together for a long time.


{% extends "payments/base.html" %} {% block title %}Unconfirmed Payments{% endblock %} {% block content %}
| Date & Time | User | Cellphone Number | Amount | Ref/Acc | Transaction | Paynow Reference | Status | |
|---|---|---|---|---|---|---|---|---|
| {{ payment.created|date:"D d M Y" }} - {{ payment.created|time:"H:i:s" }} | {{ payment.user }} | {{ payment.cellphone }} | {{ payment.email }} | ${{ payment.amount }} | {{ payment.details }} | {{ payment.reference }} | {{ payment.paynow_reference }} | {{ payment.status }} |


| ActiveX |
Use of features based on ActiveX controls requires that
Depending on the feature, certain third-party software packages might also be required:
| Feature | Requirement | Additional Hints |
| MS Word XML Merge | client-based installation of MS Word 2000 or newer | Trusted Sites, ActiveX Permissions |
| MS Excel XML Merge | client-based installation of MS Excel 2000 or newer | |
| XML Export to MS Outlook | client-based installation of MS Outlook 2000 or newer | |
| XML Import from MS Outlook | client-based installation of MS Outlook 2000 or newer |
Trusted Sites (Internet Explorer)
For security reasons we do not recommend that you enable ActiveX controls for the Internet Zone. It is better to add the site running openCRX to your Trusted sites zone or to your Local intranet zone (only if the site really is in your Intranet) and then enable ActiveX controls for the respective zone. Below are examples for adding the openCRX demo server (demo.opencrx.org) to your Trusted sites zone and adding a local openCRX server (<IP_ADDRESS>) to the Local intranet zone.
ActiveX Permissions (Internet Explorer)
For security reasons we do not recommend that you enable ActiveX controls for the Internet Zone. It is better to add the site running openCRX to your Trusted sites zone or to your Local intranet zone (only if the site really is in your Intranet) and then enable ActiveX controls for the respective zone as follows:
Where to find your ActiveX security settings:
| Platform | Browser & Version | Find ActiveX Settings in ... | ActiveX enabled (with pop-up warnings) | ActiveX enabled (without pop-up warnings) | |
|
Microsoft Windows |
Internet Explorer |
6.x | Tools > Internet Options > Security ... ... Custom Levels > ActiveX controls and plug-ins |


What is Kyzr?

Our Story
Our project is all about buzzwords. A full-stack implementation of an Android-interfacing application, with industrial grade database software and a software stack that represents how projects are done in the real world. From the beginning we wanted this project to be implemented like an actual application such as Twitter or Facebook. We also wanted to emulate how they do it, and we used (mostly) good git practices such as pull requests and branches, and used an Agile workflow using Trello.
Over time, our project evolved into something we actually cared about. As we continued development, we became more excited by the features that we could add. Through design reviews, we came up with ideas of adding features such as usernames and torch statistics. We also ideated a lot on the User Interface of both the website and the Android app. The combination of these features and updated UI turned the project from something that was simply a class project into something that we were really excited about.
Below is an early representation of our website UI:
After a lot of updating on the UI, our website now looks like this:
As we became more excited, we began implementing more features, as seen through our git commits. The top graph represents the github repository associated with the Android app and the bottom graph represents our server.
How it Works
Implementation information
1. Two NFC-equipped Android phones with Kyzr installed bump each other
2. User 1 taps their screen to swap torches with User 2
3. User 2’s phone now holds its original ID and User 1’s ID
4. User 2’s phone contacts the server, which tells the database that these two phones have switched IDs
5. The server also adds information to each user’s database entry about the transaction such as latitude and longitude
6. User 1 and 2 go to the website and enter their IDs (or usernames!)
7. The server retrieves all of their transactions from the database, and displays it on a map along with statistics about each user’s torch!
On the Server Side
Our server is a full-stack implementation of a LAMP server setup. We are running Debian 7, Apache server, Mongodb and python-Flask.
For mapping the travel of the torch we are using Google Maps API, with on-the-fly javascript creation.
Updating the database is done via POST requests.
Attributions and External Resources
pyMongo
Mongodb
python-Flask
Apache2-server
Google maps API
Google styling (material)
Floating Action Button Library
Class Resources
Documents
The Project Proposal | Design Review 1 | Design Review 1 FeedbackSprint Schedule
- Sprint 1 - 4/1
- Sprint 2 - 4/8
- Sprint 3 - 4/15
- Sprint 4 - 4/22
- Sprint 5 - 4/29


Introduction
POCO Zip adds support for parsing and creating Zip files. It offers the following features:
- decompress from local files
- decompress from network files while they are downloaded
- compress to local files
- compress directly to a network destination
Restrictions
- POCO Zip does not support the DEFLATE64 algorithm.
- encrypted files are not supported
Main Classes
Most users will work with two common classes: Compress and Decompress
Compress
Compress is a helper class that simplifies creation of Zip files. Creating a Zip file is a basically a three-step process:
- Create the Compress object: Specify the output stream and define if it is seekable (set to true for local files, to false for network files)
Compress(std::ostream& out, bool seekableOut);
- Add entries: either add single files or directory entries
void addFile(std::istream& input, const Poco::DateTime& lastModifiedAt, const Poco::Path& fileName, ZipCommon::CompressionMethod cm = ZipCommon::CM_DEFLATE, ZipCommon::CompressionLevel cl = ZipCommon::CL_MAXIMUM); /// Adds a single file to the Zip File. fileName must not be a directory name. void addFile(const Poco::Path& file, const Poco::Path& fileName, ZipCommon::CompressionMethod cm = ZipCommon::CM_DEFLATE, ZipCommon::CompressionLevel cl = ZipCommon::CL_MAXIMUM); /// Adds a single file to the Zip File. fileName must not be a directory name. The file must exist physically! void addDirectory(const Poco::Path& entryName, const Poco::DateTime& lastModifiedAt); /// Adds a directory entry excluding all children to the Zip file, entryName must not be empty. void addRecursive(const Poco::Path& entry, ZipCommon::CompressionLevel cl = ZipCommon::CL_MAXIMUM, bool excludeRoot = true, const Poco::Path& name = Poco::Path()); /// Adds a directory entry recursively to the zip file, set excludeRoot to false to exclude the parent directory. /// The name specifies under which path the entries are added in the Zip file.
Note that one must always define a name when adding a file entry, otherwise the compresser can not decide if the file should be added with an absolute or a relative path. Assume you are adding the file c:\\data\\hello.txt twice to a Zip:
// MUST use binary! std::ofstream out("test.zip", std::ios::binary); Compress c(out, true); Poco::Path aFile("c:\\data\\hello.txt"); c.addFile(theFile, "hello.txt"); c.addFile(theFile, theFile); c.close(); // MUST be done to finalize the Zip file
A Zip file stores entries internally in UNIX path style. The Zip file created above will contain the following entries:
hello.txt data/ data/hello.txt
The directory entry data/ was automatically added.
When adding directories recursively, the same principle applies. You specify the root directory that should be added and an optional path name where entries are added in the Zip file. Assume you have the following directory structure:
data/ run1/ result1.txt run2/ result2.txt
The following call will add all subdirectories and all files of data to the Zip but not the root entry data:
Poco::Path data("data"); data.makeDirectory(); c.addRecursive(data);
Or if you want the files to be added under the directory name 20070401 (you basically rename data to 20070401):
Poco::Path data("data"); Poco::Path name("20070401); data.makeDirectory(); name.makeDirectory(); c.addRecursive(data, ZipCommon::CL_NORMAL, false, name);
Note that makeDirectory does not create a directory, it simply assures that the Path is treated as a directory not as a file. Also using NORMAL compression instead of MAXIMUM (which is the default) has the benefit of improved performance. To get notified about the entries that are added during addRecursive register to the EDone event of the Compress object:
Poco::FIFOEvent<const ZipLocalFileHeader> EDone;
- Closing the Zip file: It is mandatory to manually close Compress objects. This guarantees that the Zip directory is written, thus creating a valid Zip file. It is safe to call close multiple times, only the first call takes effect.
ZipArchive close();
close returns a ZipArchive which describes all entries inside a Zip file.
Decompress
Decompress can be used to decompress all files from a Zip file or to decompress single files only.
Decompress All
The following sample code shows how all entries can be extracted from a Zip file:
std::ifstream inp("test.zip", std::ios::binary); poco_assert (inp); // decompress to current working dir Decompress dec(inp, Poco::Path()); // if an error happens invoke the ZipTest::onDecompressError method dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError); dec.decompressAllFiles(); dec.EError -= Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError);
The onDecompressError method:
void ZipTest::onDecompressError(const void* pSender, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string>& info) { // inform user about error [...] }
Decompressing directly from the net works similar:
Poco::URI uri("http://www.appinf.com/test.zip"); HTTPClientSession session(uri.getHost(), uri.getPort()); HTTPRequest req(HTTPRequest::HTTP_GET, path, HTTPMessage::HTTP_1_1); session.sendRequest(req); HTTPResponse res; std::istream& rs = session.receiveResponse(res); Decompress dec(rs, Poco::Path()); // if an error happens invoke the ZipTest::onDecompressError method dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError); dec.decompressAllFiles(); dec.EError -= Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError);
Furthermore, Decompress supports additional parameters:
Decompress(std::istream& in, const Poco::Path& outputDir, bool flattenDirs = false, bool keepIncompleteFiles = false);
If flattenDirs is set to true no subdirs are extracted, if keepIncompleteFiles is set to true, corrupt files (i.e. wrong CRC, wrong size on disk) will not be deleted.
Decompress Single Files
To decompress single files you must first parse a Zip file, and then decompress the file which happens transparently inside the ZipInputStream:
std::ifstream inp("test.zip", std::ios::binary); poco_assert (inp); ZipArchive arch(inp); ZipArchive::FileHeaders::const_iterator it = arch.findHeader("data/hello.txt"); poco_assert (it != arch.headerEnd()); ZipInputStream zipin (inp, it->second); std::ostringstream out(std::ios::binary); Poco::StreamCopier::copyStream(zipin, out);
Note that this will only work with local files which allow us to seek inside the file. Directly extracting single entries from a network file is currently not possible via the Decompress class.


Namespace SpiceSharpParser.Lexers
Classes
Lexer<TLexerState>
General lexer. It produces tokens from given text.
LexerDynamicRule
LexerException
Exception during lexing.
LexerGrammar<TLexerState>
Lexer grammar. It contains a collection of lexer token rules.
LexerGrammarBuilder<TLexerState>
Builder for LexerGrammar object from lexer rules either of type LexerTokenRole or LexerInternalRule.
LexerInternalRule
Internal rule of lexer. It is use for creating common regular expression to use with LexerTokeRules.
LexerLineNumberProvider
LexerLineRange
LexerRegexRule
Base class for token rules in LexerGrammar<TLexerState>.
LexerResult
LexerState
A base class for lexer state classes. It contains a type of previous token.
LexerTokenRule<TLexerState>
The lexer token rule class. It defines how and when a token will be generated for given regular expression pattern.
LexerValidationResult
StringExtensions
Token
A token produces by Lexer<TLexerState>.
Enums
LexerRuleReturnDecision
Enumeration that specifies whether a matched lexer token rule should return or ignore token.
LexerRuleUseDecision
Enumeration that specifies whether to use a rule or skip to the next rule.


1 - What is a BIOS Hash?
2 - What does BIOS Pass Bypass do?
3 - What will I need?
3.1 - How do I acquire my BIOS Hash?
3.1.1 - Images of BIOS Hashes on different systems
3.2 - Obtaining a password without a hash
In some BIOSes, by default or after entering a wrong password for 3 times, a hash will be displayed, accompanying a message telling the user that the system has been locked. BIOS Pass Bypass can give you a working password using the displayed hash.
BIOS restricts access to a computer using a password in some places, namely:
For old BIOSes with a master password, the only thing you need is the name of the manufacturer of the BIOS. In other cases, you have to obtain the BIOS hash.
You can obtain a BIOS hash, using one of these methods:
Here you can see some instances of BIOS hashes, denoted by a red rectangle:
For old BIOSes that don't provide a hash, you can go to the "Password for hash-less BIOSes" section and after choosing a make and model, see the master passwords for that specific BIOS.
Notice: If there were more than 1 password, try all of them, until you find the correct one.
Notice: In some cases, the algorithm used for obtaining a password from a hash
is case sensitive. For example the passwords obtained for the following two hashes
are different.
8WG0865-959B, 8wg0865-959b


Modern Fusion Bar and Kitchen
Cater With Us
We cater weddings, business lunches, dinners, and more. Call us to discuss how we can be a part of your next event.
Local Cuisine
we refuse to compromise on quality. Our fresh ingredients are local and we are committed to serving fresh cuisine.
Chef Ly
With 20 years of experience cooking in the finest restaurants, Chef Ly is committed to serving fresh food and unique experiences.


Docker Registry storage driver
読む時間の目安: 2 分このページでは、オープンソースである Docker Registry を使って、独自にレジストリを提供する情報を示しています。 Docker Hub はホスト提供込みの Registry であり、さまざまな機能を追加することができます。 たとえばチーム、組織、ウェブフック、自動ビルドなどです。 詳しくは Docker Hub を参照してください。
This document describes the registry storage driver model, implementation, and explains how to contribute new storage drivers.
Provided drivers
This storage driver package comes bundled with several drivers:
- inmemory: A temporary storage driver using a local inmemory map. This exists solely for reference and testing.
- filesystem: A local storage driver configured to use a directory tree in the local filesystem.
- s3: A driver storing objects in an Amazon Simple Storage Service (S3) bucket.
- azure: A driver storing objects in Microsoft Azure Blob Storage.
- swift: A driver storing objects in Openstack Swift.
- oss: A driver storing objects in Aliyun OSS.
- gcs: A driver storing objects in a Google Cloud Storage bucket.
Storage driver API
The storage driver API is designed to model a filesystem-like key/value storage in a manner abstract enough to support a range of drivers from the local filesystem to Amazon S3 or other distributed object storage systems.
Storage drivers are required to implement the storagedriver.StorageDriver
interface provided in storagedriver.go
, which includes methods for reading, writing, and deleting content, as well as listing child objects of a specified prefix key.
Storage drivers are intended to be written in Go, providing compile-time
validation of the storagedriver.StorageDriver
interface.
Driver selection and configuration
The preferred method of selecting a storage driver is using the StorageDriverFactory
interface in the storagedriver/factory
package. These factories provide a common interface for constructing storage drivers with a parameters map. The factory model is based on the Register and Open methods in the builtin database/sql package.
Storage driver factories may be registered by name using the
factory.Register
method, and then later invoked by calling factory.Create
with a driver name and parameters map. If no such storage driver can be found,
factory.Create
returns an InvalidStorageDriverError
.
Driver contribution
Writing new storage drivers
To create a valid storage driver, one must implement the
storagedriver.StorageDriver
interface and make sure to expose this driver
via the factory system.
Registering
Storage drivers should call factory.Register
with their driver name in an init
method, allowing callers of factory.New
to construct instances of this driver without requiring modification of imports throughout the codebase.
Testing
Storage driver test suites are provided in
storagedriver/testsuites/testsuites.go
and may be used for any storage
driver written in Go. Tests can be registered using the RegisterSuite
function, which run the same set of tests for any registered drivers.


Israeli PM appoints new defence minister, boosting Likud party
JERUSALEM: Israeli premier Benjamin Netanyahu said Friday (Nov 8) Naftali Bennett would be appointed defence minister and their parties would unite, as the political system remained deadlocked after two inconclusive elections this year.
Netanyahu, who has so far failed to form a coalition after a Sep 17 poll, had in the past refused to give the security-oriented Bennett this coveted portfolio.
But wary of his main challenger Benny Gantz attempting to collect the support of 61 lawmakers necessary to form a coalition and become prime minister himself, the incumbent has changed course.
In doing so, he effectively locked in the three lawmakers of Bennett's New Right to his ruling Likud party.
A statement by Likud said that Netanyahu had "offered to appoint (Bennett) as defence minister, and Naftali Bennett accepted the offer."
"Bennett agreed that if a new government is formed" without a third election, "a different person will be appointed defence minister," the statement read.
The two also agreed that the New Right - formed by Bennett and former justice minister Ayelet Shaked - would join Likud to become a combined force, the statement said.
They will "commit to act as a joint faction throughout the current parliamentary term," it added.
Bennett did not comment on the move, but Shaked said her party had been offered a choice of the defence ministry on its own, or two portfolios for lesser ministries.
The choices available for the latter were agriculture, diaspora and welfare, Shaked said.
"In a joint decision we agreed that Bennett will be appointed defence minister until a new government is formed," she said on Twitter.
Both Likud and Gantz's Blue and White say they want a unity government, but disagree on how to achieve it.
Likud has been seeking to negotiate based on a compromise proposed by President Reuven Rivlin that takes into account the possibility Netanyahu will be indicted for corruption in the coming weeks.
It could see him remain prime minister for now, but step aside at some point later as he combats the charges.
Gantz would take over as acting premier under such a scenario.
Blue and White says Gantz should be prime minister first under any rotation arrangement since his party won the most seats, finishing with 33 compared to Likud's 32.
Whoever wants to govern needs to find partners with which to control a majority of at least 61 seats in the 120-member Israeli parliament.
Negotiators for Likud and Blue and White, as well as the heads of the two factions, have been meeting since the elections.


Hi all
I'm hoping this will be a fairly easy question for someone on here;
I am planning on setting up the energy monitor to measure 3 currents, voltage, power, power factor, temperature and anything else I can get out of the emonTX. My question is how much storage space will I need on a raspberry pi to store all this data for say a 3 or 4 year period. I will be hosting the data locally off the raspberry rather than uploading it to emonCMS.
What I don't want to do is get a 4GB SD card and get everything working and find in a years time the card is full. I cant see the data being large really but I thought it best to ask you lot before buying anything.
Thanks
Re: raspberry pi memory card size for local data logging
Don't forget SD cards to fail so you are going to want to backup regularly - perhaps to a cloud host?
Re: raspberry pi memory card size for local data logging
Well, I'm just transferring my live db to my localhost for testing .. I've been running since December or so .. I have 25 live feeds, a mixture of power and temperature monitoring ..
root@raspberrypi:/media/external_hdd# du -hs emoncms/
861M emoncms/
37 tables .. 11,429,162 records ....
Re: raspberry pi memory card size for local data logging
25 feeds is a little more than I would I need so lets round you figure down to say 500MB every 6 months so that would be around 3 to 4 GB I would need. I'm thinking an 8 GB card will do the job.
I have also been toying with the idea of getting the raspberry to receive the data from the sensor unit and then send it to my home server which has loads of storage space, backup, raid etc. This would then avoid the need to backup the raspberry. Does anyone know if this has been done?
I presume it will be very similar to sending the data to emonCMS only your using your own server rather than theirs.
Re: raspberry pi memory card size for local data logging
25 feeds is nothing. I have 5 TinyTx each reporting 3 feeds (Temp, humidity and battery). The rest is a single Current Cost monitor with three IAM's posting in. However you decide to interpret the data can add extra feeds.
Personally, the data logging is far heavier than my experience with RRDB .. with that I had per second logging with a known database size for 10 years of logging. It is, however, a PITA when you want to move from one system to another (well .. easy enough .. but more of a PITA than copying). Am pretty sure my db sizes were more in the region of 25MB per feed for a 10 year rolling/per second store.
I've been wondering about doing a reverse of my Current Cost MQTT -> EmonCMS extension .. to get all data from EmonCMS to MQTT ... in fact .. the MQTT->EmonCMS could then be heavily improved. (https://github.com/elyobelyob/mqtt)
For long term logging, I think EmonCMS has some db issues. My issues so far I believe to be due to tablespace scans and other reasons.
So, not sure whether EmonCMS or RRDB is best .. my best idea so far would be to write into MQTT and do both, or more .. e.g. Cosm or remote EmonCMS etc would all be easy enough. MQTT would allow you to add/remove more easily.
Raised earlier is the problem with Pi and SD cards. Be wary .. I had tons of issues with db on Pi. I now use an external HDD for MySQL. I have had no corruption problems since.
1GB is a crazy amount of data for the period I have logged so far.
Re: raspberry pi memory card size for local data logging
Hi MadHatter. I have to agree with Stuart and Elyobelyob. I bought a 32Gb SD card for my Pi to ensure there was enough space. After several weeks, I started having problems with MySQL. The lock file seemed to be getting stuck, causing MySQL to halt. I then rebuilt on a different brand 8Gb SD card. After about five weeks I got the same problem, then the system would not boot at all.
I would strongly recommend that you do not buy a large SD card. From what I can tell from my research on the internet, SD cards are not built for lots of writes. They can be read from frequently, but many writes are likely to cause a card failure akin to a bad sector on a hard disk. I am starting to trial booting the kernel from a 16Mb SD card and then running the root file-system from a USB flash drive. Apparently people running WordPress on R-Pi's have had more success this way. Even more reliable would be an external hard disk.
There is a lack of information around about how poor SD cards are when used as a hard disk. I think this is something the Raspberry Pi foundation should actively warn people about.
I'd be interested if anyone has had positive experiences running MySQL from an SD card on a Raspberry Pi.
Re: raspberry pi memory card size for local data logging
Hi
Regret to advise that I have had a terminal failure of an SD card running emoncms after about 12 weeks. I now back up daily to a usb memory stick. I have an external usb hard drive on order and I hope I can install emoncms on that rather than the SD card.
Being a bit Linux challenged (but learning fast) I shall be looking for step by step instructions on how to set up linux and emoncms to run on the hard drive.
Regards
Ian
Re: raspberry pi memory card size for local data logging
Hi Ian. Raspberry Pi Linux distributions such as Raspian or Arch Linux have two partitions in their images. One is a FAT partition that contains all of the boot files. You can just copy these files onto a standard SD card. They are less than 50Mb in total. You can then write the image as you would do to your SD card to the USB drive. The second partition is the EXT4 root file-system.
All you need to do then is edit the 'cmdline.txt' file on the boot partition (on the SD card) and change the 'root' parameter to something like '/dev/sdb2' depending on how you partition your new hard disk. Your 'cmdline.txt' file should look something like this:
This guidance should probably be added to the installation procedure for emonCMS to prevent other people making the mistake of running their root file-system from the SD card.
Re: raspberry pi memory card size for local data logging
Many thanks.
Will give it a go as soon as the hard disk arrives. I may be back with questions!
Regards
Ian
Re: raspberry pi memory card size for local data logging
Thanks for the replies everyone. I think there are two options for me:
1 send the data from the raspberry to my server
2 Save the data on a USB drive plugged into the raspberry.
Re: raspberry pi memory card size for local data logging
I think your R-Pi should be your server. The chap who runs this site; www.dingleberrypi.com seems to have had a positive experience running his WordPress server from a USB flash disk. I can't vouch for this approach yet, but this is the structure I'm betting on. Fingers crossed!
Re: raspberry pi memory card size for local data logging
Yeh I will try the raspberry as the server first with the data being stored on a USB drive and maybe get it backing up to my main server.
The raspberry arrived today so should hopefully get playing with it soon although I still need to order the bits from here.
Re: raspberry pi memory card size for local data logging
WARNING - Writing to often to the SD Card when data logging will corrupt it.
I have another Pi running pywws (weather station) and a number of us a running into SD card corruptions - the cause seems to be the number of writes to the SD card - so be careful with data logging, pywws was doing a significant number of writes especially with live logging, and all sorts of weird errors were occurring. - A bit of analysis and it's been diagnosed as hitting the the number or writes / rewrites to the SD card - so beware.
Hope that helps.
Re: raspberry pi memory card size for local data logging
I've read elsewhere that SD cards are a bad idea where frequent writes are concerned. As Barry says, only read from the SD, do all the writes to a genuine spinning hard disk.
Re: raspberry pi memory card size for local data logging
Interesting might explain a couple of failures I've had. In cases where the raspi local emoncms install is reporting directly to emoncms.org are there ways of reducing writes to SD to increase longevity? Removing feeds from the local install would reduce mysql writes but would this make a difference or is it all about temp usage?
Re: raspberry pi memory card size for local data logging
Hi Matt. A friend of mine recommends not using a journaling file-system to reduce the number of writes. Try using an ext2 partition instead of ext3 or ext4. I have little faith in flash media anymore, the pile of defunct SD cards and USB disks nearby is a testament to this.