using only the for <timeout> clause, it is possible to get an unconditional wait that lasts for a specific duration. This is not synthesizable (no real hardware can perform this behaviour so simply), but is frequently used for scheduling events and generating clocks within a testbench.
This e...
Alfresco Share is one of the one part of the Alfresco as product- it's user interface on the Alfresco repository (platform), by default it is avaiable on <host>:<port>/share.
It is built on the Surf framework. The Surf framework was developed by Alfresco, but in
2009 Alfresco began wor...
Docker has announced following editions:
-Docker-ee (Enterprise Edition) along with Docker-ce(Community Edition) and Docker (Commercial Support)
This document will help you with installation steps of Docker-ee and Docker-ce edition in CentOS
Docker-ce Installation
Following are steps to instal...
Build an app.js with a simple data store:
app.get("/bookstore", function (req, res, next) {
// Your route data
var bookStore = [
{
title: "Templating with Pug",
author: "Winston Smith",
pages: 143,
y...
WebDriverException is a base Selenium-WebDriver exception that could be used to catch all other Selenium-WebDriver exceptions
To be able to catch exception it should be imported first:
from selenium.common.exceptions import WebDriverException as WDE
and then:
try:
element = driver.find_el...
all errors and exceptions, both custom and default, are handled by the Handler class in app/Exceptions/Handler.php with the help of two methods.
report()
render()
public function render($request, Exception $e)
{
//check if exception is an instance of ModelNotFoundException.
if ($e in...
Note: These instructions are targeted at .NET Core 1.0.4 & 1.1.1 SDK 1.0.1 and higher.
When using binary archives to install, we recommend the contents be extracted to /opt/dotnet and a symbolic link created for dotnet. If an earlier release of .NET Core is already installed, the directory and ...
An anonymous, inlined function defined with lambda. The parameters of the lambda are defined to the left of the colon. The function body is defined to the right of the colon. The result of running the function body is (implicitly) returned.
s=lambda x:x*x
s(2) =>4
Map takes a function and a collection of items. It makes a new, empty collection, runs the function on each item in the original collection and inserts each return value into the new collection. It returns the new collection.
This is a simple map that takes a list of names and returns a list of the...
Reduce takes a function and a collection of items. It returns a value that is created by combining the items.
This is a simple reduce. It returns the sum of all the items in the collection.
total = reduce(lambda a, x: a + x, [0, 1, 2, 3, 4])
print(total) =>10
Filter takes a function and a collection. It returns a collection of every item for which the function returned True.
arr=[1,2,3,4,5,6]
[i for i in filter(lambda x:x>4,arr)] # outputs[5,6]
Processing Field collection items with Rules is fun, really! Have a look at this Rule (in Rules export format):
{ "rules_calculate_sum_of_prices_in_all_field_collection_items" : {
"LABEL" : "Calculate sum of prices in all field collection items",
"PLUGIN...
Keychain allows to save items with special SecAccessControl attribute which will allow to get item from Keychain only after user will be authenticated with Touch ID (or passcode if such fallback is allowed). App is only notified whether the authentication was successful or not, whole UI is managed b...
It's possible to pass variables from your server into Pug for dynamic content or script generation. Pug templates can access variables passed to the res.render function in Express (or pug.renderFile if you are not using Express, the arguments are identical).
index.js
let colors = ["Red",...
Content interpolated with bracket syntax will be evaluated for code, the output of which is included in your HTML output.
title follows the basic pattern for evaluating a template local, but the code in between #{and } is evaluated, escaped, and the result buffered into the output of the template...
Interpolating values is helpful if you need to pass a server-side variable to client-side JavaScript (or other languages that require it).
In the case of variables, numbers, strings, and the like, you can pass these types of variables directly into your JavaScript with bracket syntax plus an explan...
It may be necessary to nest HTML tags inside of each other. Element interpolation is done in a syntax similar to variable interpolation; square brackets instead of curly braces are used here. The syntax of interpolated HTML elements is identical to the implementation of normal HTML elements.
index....