# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import sys import warnings from collections import namedtuple from pyspark import since from pyspark.sql.dataframe import DataFrame from pyspark.sql.types import StructType Database = namedtuple("Database", "name description locationUri") Table = namedtuple("Table", "name database description tableType isTemporary") Column = namedtuple("Column", "name description dataType nullable isPartition isBucket") Function = namedtuple("Function", "name description className isTemporary") [docs]class Catalog(object): """User-facing catalog API, accessible through `SparkSession.catalog`. This is a thin wrapper around its Scala implementation org.apache.spark.sql.catalog.Catalog. """ def __init__(self, sparkSession): """Create a new Catalog that wraps the underlying JVM object.""" self._sparkSession = sparkSession self._jsparkSession = sparkSession._jsparkSession self._jcatalog = sparkSession._jsparkSession.catalog() [docs] @since(2.0) def currentDatabase(self): """Returns the current default database in this session.""" return self._jcatalog.currentDatabase() [docs] @since(2.0) def setCurrentDatabase(self, dbName): """Sets the current default database in this session.""" return self._jcatalog.setCurrentDatabase(dbName) [docs] @since(2.0) def listDatabases(self): """Returns a list of databases available across all sessions.""" iter = self._jcatalog.listDatabases().toLocalIterator() databases = [] while iter.hasNext(): jdb = iter.next() databases.append(Database( name=jdb.name(), description=jdb.description(), locationUri=jdb.locationUri())) return databases [docs] @since(2.0) def listTables(self, dbName=None): """Returns a list of tables/views in the specified database. If no database is specified, the current database is used. This includes all temporary views. """ if dbName is None: dbName = self.currentDatabase() iter = self._jcatalog.listTables(dbName).toLocalIterator() tables = [] while iter.hasNext(): jtable = iter.next() tables.append(Table( name=jtable.name(), database=jtable.database(), description=jtable.description(), tableType=jtable.tableType(), isTemporary=jtable.isTemporary())) return tables [docs] @since(2.0) def listFunctions(self, dbName=None): """Returns a list of functions registered in the specified database. If no database is specified, the current database is used. This includes all temporary functions. """ if dbName is None: dbName = self.currentDatabase() iter = self._jcatalog.listFunctions(dbName).toLocalIterator() functions = [] while iter.hasNext(): jfunction = iter.next() functions.append(Function( name=jfunction.name(), description=jfunction.description(), className=jfunction.className(), isTemporary=jfunction.isTemporary())) return functions [docs] def listColumns(self, tableName, dbName=None): """Returns a list of columns for the given table/view in the specified database. If no database is specified, the current database is used. .. versionadded:: 2.0.0 Notes ----- the order of arguments here is different from that of its JVM counterpart because Python does not support method overloading. """ if dbName is None: dbName = self.currentDatabase() iter = self._jcatalog.listColumns(dbName, tableName).toLocalIterator() columns = [] while iter.hasNext(): jcolumn = iter.next() columns.append(Column( name=jcolumn.name(), description=jcolumn.description(), dataType=jcolumn.dataType(), nullable=jcolumn.nullable(), isPartition=jcolumn.isPartition(), isBucket=jcolumn.isBucket())) return columns [docs] def createExternalTable(self, tableName, path=None, source=None, schema=None, **options): """Creates a table based on the dataset in a data source. It returns the DataFrame associated with the external table. The data source is specified by the ``source`` and a set of ``options``. If ``source`` is not specified, the default data source configured by ``spark.sql.sources.default`` will be used. Optionally, a schema can be provided as the schema of the returned :class:`DataFrame` and created external table. .. versionadded:: 2.0.0 Returns ------- :class:`DataFrame` """ warnings.warn( "createExternalTable is deprecated since Spark 2.2, please use createTable instead.", FutureWarning ) return self.createTable(tableName, path, source, schema, **options) [docs] def createTable( self, tableName, path=None, source=None, schema=None, description=None, **options): """Creates a table based on the dataset in a data source. It returns the DataFrame associated with the table. The data source is specified by the ``source`` and a set of ``options``. If ``source`` is not specified, the default data source configured by ``spark.sql.sources.default`` will be used. When ``path`` is specified, an external table is created from the data at the given path. Otherwise a managed table is created. Optionally, a schema can be provided as the schema of the returned :class:`DataFrame` and created table. .. versionadded:: 2.2.0 Returns ------- :class:`DataFrame` .. versionchanged:: 3.1 Added the ``description`` parameter. """ if path is not None: options["path"] = path if source is None: source = self._sparkSession._wrapped._conf.defaultDataSourceName() if description is None: description = "" if schema is None: df = self._jcatalog.createTable(tableName, source, description, options) else: if not isinstance(schema, StructType): raise TypeError("schema should be StructType") scala_datatype = self._jsparkSession.parseDataType(schema.json()) df = self._jcatalog.createTable( tableName, source, scala_datatype, description, options) return DataFrame(df, self._sparkSession._wrapped) [docs] def dropTempView(self, viewName): """Drops the local temporary view with the given view name in the catalog. If the view has been cached before, then it will also be uncached. Returns true if this view is dropped successfully, false otherwise. .. versionadded:: 2.0.0 Notes ----- The return type of this method was None in Spark 2.0, but changed to Boolean in Spark 2.1. Examples -------- >>> spark.createDataFrame([(1, 1)]).createTempView("my_table") >>> spark.table("my_table").collect() [Row(_1=1, _2=1)] >>> spark.catalog.dropTempView("my_table") >>> spark.table("my_table") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... AnalysisException: ... """ self._jcatalog.dropTempView(viewName) [docs] def dropGlobalTempView(self, viewName): """Drops the global temporary view with the given view name in the catalog. If the view has been cached before, then it will also be uncached. Returns true if this view is dropped successfully, false otherwise. .. versionadded:: 2.1.0 Examples -------- >>> spark.createDataFrame([(1, 1)]).createGlobalTempView("my_table") >>> spark.table("global_temp.my_table").collect() [Row(_1=1, _2=1)] >>> spark.catalog.dropGlobalTempView("my_table") >>> spark.table("global_temp.my_table") # doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... AnalysisException: ... """ self._jcatalog.dropGlobalTempView(viewName) [docs] def registerFunction(self, name, f, returnType=None): """An alias for :func:`spark.udf.register`. See :meth:`pyspark.sql.UDFRegistration.register`. .. versionadded:: 2.0.0 .. deprecated:: 2.3.0 Use :func:`spark.udf.register` instead. """ warnings.warn( "Deprecated in 2.3.0. Use spark.udf.register instead.", FutureWarning ) return self._sparkSession.udf.register(name, f, returnType) [docs] @since(2.0) def isCached(self, tableName): """Returns true if the table is currently cached in-memory.""" return self._jcatalog.isCached(tableName) [docs] @since(2.0) def cacheTable(self, tableName): """Caches the specified table in-memory.""" self._jcatalog.cacheTable(tableName) [docs] @since(2.0) def uncacheTable(self, tableName): """Removes the specified table from the in-memory cache.""" self._jcatalog.uncacheTable(tableName) [docs] @since(2.0) def clearCache(self): """Removes all cached tables from the in-memory cache.""" self._jcatalog.clearCache() [docs] @since(2.0) def refreshTable(self, tableName): """Invalidates and refreshes all the cached data and metadata of the given table.""" self._jcatalog.refreshTable(tableName) [docs] @since('2.1.1') def recoverPartitions(self, tableName): """Recovers all the partitions of the given table and update the catalog. Only works with a partitioned table, and not a view. """ self._jcatalog.recoverPartitions(tableName) [docs] @since('2.2.0') def refreshByPath(self, path): """Invalidates and refreshes all the cached data (and the associated metadata) for any DataFrame that contains the given data source path. """ self._jcatalog.refreshByPath(path) def _reset(self): """(Internal use only) Drop all existing databases (except "default"), tables, partitions and functions, and set the current database to "default". This is mainly used for tests. """ self._jsparkSession.sessionState().catalog().reset() def _test(): import os import doctest from pyspark.sql import SparkSession import pyspark.sql.catalog os.chdir(os.environ["SPARK_HOME"]) globs = pyspark.sql.catalog.__dict__.copy() spark = SparkSession.builder\ .master("local[4]")\ .appName("sql.catalog tests")\ .getOrCreate() globs['sc'] = spark.sparkContext globs['spark'] = spark (failure_count, test_count) = doctest.testmod( pyspark.sql.catalog, globs=globs, optionflags=doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE) spark.stop() if failure_count: sys.exit(-1) if __name__ == "__main__": _test()


Solstice Interactive is a startup focusing on bringing solar energy for urban areas or to people unable to put solar panels on their property. This design concept came from an idea hack where part of the challenge is creating an engaging app. Through the visualization of energy data the app allows the user to see their positive impact on the environment as an individual and as a member of a community. The app also has a gamification element that allows the user to be further engaged with Solstice Interactive. The app itself can be a very basic view of the energy and money saved. However, here you can see how much further the app can go and potentially further engage the user.
The first few panels show the simple interface which depicts in various visual ways the amount of energy and money saved by the customer. The user can easily also see the impact of their community of Solstice Interactive customers, and even the whole state of Massachusetts.
The gamification comes into play with the growing trees which as the customer saves more energy he or she will see the trees grow and join a forest on the bottom of the screen. As the forest grows the user can earn badges which they can then share with other fellow Solstice Interactive customers or their friends on social media.


Computes and visualizes empirical joint distribution of multivariate data with optimized algorithms and multi-thread computation. There is a faster algorithm using dynamic programming to compute the whole empirical joint distribution of a bivariate data. There are optimized algorithms for computing empirical joint CDF function values for other multivariate data. Visualization is focused on bivariate data. Levelplots and wireframes are included.
| Version: | 0.1.2 |
| Depends: | R (≥ 3.2.5), lattice |
| Imports: | Rcpp (≥ 0.12.8), methods |
| LinkingTo: | Rcpp |
| Published: | 2018-01-13 |
| Author: | En-shuo Hsu, Jeffrey C. Miecznikowski |
| Maintainer: | En-shuo Hsu <daviden1013 at gmail.com> |
| License: | GPL-3 |
| NeedsCompilation: | yes |
| SystemRequirements: | C++11 |
| CRAN checks: | Emcdf results |
| Reference manual: | Emcdf.pdf |
| Package source: | Emcdf_0.1.2.tar.gz |
| Windows binaries: | r-devel: Emcdf_0.1.2.zip, r-release: Emcdf_0.1.2.zip, r-oldrel: Emcdf_0.1.2.zip |
| OS X binaries: | r-release: Emcdf_0.1.2.tgz, r-oldrel: Emcdf_0.1.2.tgz |
| Old sources: | Emcdf archive |
Please use the canonical form https://CRAN.R-project.org/package=Emcdf to link to this page.


Trip Wishlist
A Simple Trip Planner.
Hotels • Dining • Museums
Create an account:
Error:
This email is already tied to an account. Please log in.
Sign Up
Already have an account?
Log in.


binary_negate<AdaptableBinaryPredicate>
|
|
|
|
| Categories: functors, adaptors |
Component type: type |
Description
Binary_negate is a function object adaptor: it is an
Adaptable Binary Predicate that represents the logical negation
of some other Adaptable Binary Predicate. That is: if f is an
object of class binary_negate<AdaptableBinaryPredicate>, then
there exists an object pred of class AdaptableBinaryPredicate
such that f(x,y) always returns the same value as !pred(x,y).
There is rarely any reason to construct a binary_negate
directly; it is almost always easier to use the helper function not2.
Example
Finds the first character in a string that is neither
' ' nor '\n'.
char str[MAXLEN];
...
const char* wptr = find_if(str, str + MAXLEN,
compose2(not2(logical_or<bool>()),
bind2nd(equal_to<char>(), ' '),
bind2nd(equal_to<char>(), '\n')));
assert(wptr == str + MAXLEN || !(*wptr == ' ' || *wptr == '\n'));
Definition
Defined in function.h.
Template parameters
|
Parameter
|
Description
|
Default
|
|
AdaptableBinaryPredicate
|
The type of the function object that this binary_negate is the logical
negation of.
|
|
Model of
Adaptable Binary Predicate
Type requirements
AdaptableBinaryPredicate must be a model of Adaptable Binary Predicate.
Public base classes
binary_function<AdaptableBinaryPredicate::first_argument_type,
AdaptableBinaryPredicate::second_argument_type,
bool>
Members
New members
These members are not defined in the
Adaptable Binary Predicate
requirements, but are specific to
binary_negate.
|
Member
|
Description
|
binary_negate(const AdaptableBinaryPredicate& pred)
|
The constructor. Creates a binary_negate<AdaptableBinaryPredicate>
whose underlying predicate is pred.
|
template <class AdaptableBinaryPredicate>
binary_negate<AdaptableBinaryPredicate>
not2(const AdaptableBinaryPredicate& pred);
|
If p is of type AdaptableBinaryPredicate then
not2(p) is equivalent to binary_negate<AdaptableBinaryPredicate>(p),
but more convenient. This is a global function, not a member function.
|
Notes
See also
The function object overview, AdaptablePredicate, Predicate,
unary_negate, unary_compose, binary_compose
Copyright © 1996 Silicon Graphics, Inc.
|


Trump says name of whistleblower in impeachment inquiry should be revealed
WASHINGTON (Reuters) - U.S. President Donald Trump on Sunday said the name of the whistleblower whose concerns prompted an impeachment inquiry should be revealed because that individual had given false information.
Trump, without giving evidence, suggested the whistleblower could potentially be guilty of fraud.
“The whistleblower should be revealed because the whistleblower gave false information,” Trump told reporters at the White House. “He made up a story.”


phpstorm path/to/directory
phpstorm path/to/file
phpstorm --line line_number path/to/file
phpstorm diff path/to/left_file path/to/right_file


404 Error
The requested file was not found on the server. Please check the URL for errors.
You may want to visit:
The Main Page
The Description Page


Simulator Build Instructions
This document provides instructions on building the simulator and assets from source using the Unity Editor.
Note: When a terminal is mentioned, it refers to cmd.exe
on Windows and Terminal
on Ubuntu.
Table of Contents
Installing the Unity Editor top#
-
Download and Install Unity Hub
- Ubuntu: You may need to allow the downloaded AppImage to be run as an executable
- Right-click the AppImage
- Select
Properties
- Go to the
Permissions
tab - Check
Allow executing file as program
- Alternatively, in the terminal run
sudo chmod +x UnityHub.AppImage
- Ubuntu: You may need to allow the downloaded AppImage to be run as an executable
-
Download and Install Unity 2019.4.18f1 from the Unity Download Archive:
- Click the Unity Hub button to have Unity Hub start the installation process
- If the installation process fails to start on Ubuntu:
- Right click the Unity Hub button and select Copy Link Address
- In a terminal, type
<PATH_TO_UNITY_HUB> <COPIED_LINK>
- The copied link will be in the form
unityhub://Unity-VERSION/XXXXXX
(e.g.unityhub://2019.4.18f1/3310a4d4f880
) - Thus, if the Unity Hub application is in the current directory, type
./UnityHub.AppImage unityhub://2019.4.18f1/3310a4d4f880
- The copied link will be in the form
- Unity Hub will open and guide you through the installation of Unity Editor
- If the installation process fails to start on Ubuntu:
- IMPORTANT include the Windows Build Support (Mono) for both Windows and Linux when installing Unity
- (Optional) include support for Visual Studio for easier debugging
- Verify installation
- Under the Installs tab of Unity Hub there should be the expected version shown. In the bottom-left corner of the version, there should be an icon of the other OS (e.g. on a Linux computer, the Windows logo will be shown)
- Click the Unity Hub button to have Unity Hub start the installation process
Installing Git LFS top#
Make sure you have git-lfs installed before cloning the Simulator repository.
- Instructions for installation are here
- Verify installation
- In a terminal enter
git lfs install
> Git LFS initialized.
should print out
- In a terminal enter
Building a standalone executable top#
-
Clone simulator from GitHub (open-source) release branch.
- Open a terminal and navigate to where you want the Simulator to be downloaded to
- If you want the Simulator in your
Documents
folder, usecd
in the terminal so that the input for the terminal is similar to/Documents$
- If you want the Simulator in your
- Open-source user:
git clone https://github.com/lgsvl/simulator.git
- Verify download
- Above clone will create a
Simulator
folder - Open a File Explorer and navigate to where the
Simulator
folder is - Navigate to
Simulator/Assets/Materials/EnvironmentMaterials/
- There should be a
EnvironmentDamageAlbedo.png
in this folder - Open the image, it should look like the image below
- If the image cannot be opened,
Git LFS
was not installed before cloning the repository- Install
Git LFS
following step 4 - In a terminal, navigate to the
Simulator
folder so that the terminal is similar to/Simulator$
git lfs pull
- Check the image again
- Install
- Above clone will create a
- Open a terminal and navigate to where you want the Simulator to be downloaded to
-
Run Unity Hub
-
In the Projects tab, click Add and select the
Simulator
folder that was created bygit clone
in Step 5 -
In the Projects tab, verify that the Simulator is using Unity Version 2019.4.18f1 from the dropdown
-
Double-click the name of the project to launch Unity Editor
-
-
Open the Simulator menu from the top toolbar and select Build... to open the build window (shown below with a red outline)
-
Select the target OS for the build using the Executable Platform dropdown menu
-
Verify Build Simulator is checked for the Simulator to be built
-
Select a folder that the simulator will be built in
-
(Optional) Check Development Build to create a Development Build that includes debug symbols and enables the Profiler
-
Click Build
Once the build process is complete a simulator executable will be available at the specified location.
Testing the simulator build top#
Follow these steps for a quick test of the simulator build. For a more complete guide please see the tutorial on running the simulator.
-
(Ubuntu) Install the Vulkan userspace library
sudo apt-get install libvulkan1
-
Double-click the Simulator.exe that was built
-
Click Open Browser, and login to the Web UI (you may need to sign up)
-
You may be prompted to create a cluster for local simulations
-
In the Store choose any maps and click Add to My Library
- ex. the BorregasAve map
-
Back in the Store choose one of the default vehicles such as the Lincoln2017Mkz and click Add to My Library
-
In the Simulations tab, Add New simulation with the added map and the newly cloned vehicle:
- Enter Simulation Name and Select Cluster then click Next.
- Select the Random Traffic runtime template, choose the map from your library and select the Lincoln2017MKZ vehicle with the Keyboard Control sensor configuration then click Next.
- Click Next on the Autopilot page and click Publish to create the simulation.
-
Press the Run simulation button
-
The Unity window should now show a vehicle in the built environment
Building assets top#
The simulator build tools allow developers to build assets as well as standalone simulator binaries. Assets refer to maps, vehicles, sensors, controllables, and bridges. Asset bundles are built without needing to rebuild the entire simulator.
Note: AssetBundles built with one version of the simulator are NOT guaranteed to work with other versions of the simulator.
Follow these steps to build assets:
-
Place the source code for the asset the correct directory under
Simulator/Assets/External
for it to be discovered by the build tool. Based on the category the asset falls under it should be placed inside on of these subdirectories:Environments
Vehicles
NPCs
Sensors
Controllables
Bridges
For example, to build the CubeTown map we would clone the repository into the
Environments
subdirectory. -
Press Ctrl + R to refresh assets (only needed if auto-refresh is disabled in the editor). The asset should now be detected and displayed in the build tool. In the case of this example, CubeTown will show up under Environments.
-
Check the box next to any asset you wish to build and click the Build button at the bottom of the tool.
-
Once the asset is built it will be available under the
Simulator/AssetBundles
in a subdirectory named after the category of the asset that was built. For this example, CubeTown will be atSimulator/AssetBundles/Environments/environment_CubeTown
.
Using custom assets with the simulator binary top#
To use built assets with the simulator binary they must first be uploaded to the cloud. For more information on this see the Library guide.
Testing custom assets with the Unity editor top#
Custom assets can be tested with the Unity Editor by using the Developer Settings panel accessible from the Simulator menu located in the top toolbar. Only local assets are supported and JSON must be manually added so Developer Settings can look up sensor data.
Users can toggle Sensor Debug in Simulator drop down menu to load local sensors at runtime to be able to access break point functionality. Be sure to toggle off when finished debugging.


Some updates for the club fair:
-
The club list now shows a random selection of club videos (but only those
that are on YouTube).
-
Clubs added to your list now have a Join link in the schedule so you can
quickly join the provided Zoom meeting link.
- Fixed the "Add to my clubs" button not showing.
The club list will be updated regularly maybe until they rectify the spelling
of the "Competative Programming Club."


Nudges For DISC: How To Sustain The Impact Of Behavior Profiles
by Kevin KruseEach year, thousands of companies around the world use the DISC tool to determine if their employees have dominant behavioral style of Dominance, Influence, Steadiness, or Conscientiousness (or some combination of the four). Typically offered during new hire orientation, or as part of a leadership or team building workshop, the simplicity of the DISC assessment has made it one of the most popular personality profiles in the world. Similar tools include Insights Discovery, Myers-Briggs Type Indicator, Herrmann Brain Dominance Index, and using a strengths-based approach, the Gallup CliftonStrengths assessment.
People love to learn about themselves, and although DISC activities are always very popular in the workshop itself, how long do people remember their results?
And how many managers remember the DISC results of their team members?
Most importantly, how often do people actually apply their DISC style to improve their communication, conflict resolution, and overall effectiveness?
DISC And The Knowing-Doing Gap
The huge chasm between what we know and what we actually apply back on the job has been called the “Knowing-Doing Gap”. It’s estimated that 40-85% of all training becomes “scrap learning”, relegated to knowledge forgotten or never applied.
There are many potential reasons why people don’t apply DISC results over the long-term, but it doesn’t take a research study to see that we are all so “crazy busy” that we generally operate with short-term thinking in task-mode. It’s hard to remember our own style, others’ styles, and to take the pause—the long deep breath—to think and modulate our approach.
Traditional methods of reminding people of their DISC results include stickers or pins to use during the workshop, placards to be placed on one’s desk, or encouragement to declare your style in the footer of your email.
Scale and Sustain DISC With Nudges
But what if you had a DISC coach who could remind you every week of your profile and how to leverage it?
What if your always present DISC coach could remind you of your team members’ dominant styles?
What if your DISC coach could remind you to modulate your approach to different team members?
These little reminders are examples of behavioral nudges. And nudges can make a dramatic difference in human behavior, and can substantially close the Knowing-Doing Gap.
What Is A Behavioral Nudge?
A nudge is an indirect suggestion or subtle reminder intended to influence people’s behavior.
Officially, the term “nudge” was defined and popularized by two huge professors of economics, Richard Thaler and Cass Sunstein. In their 2009 book, Nudge: Improving Decisions About Health, Wealth, and Happiness, they define a nudge as:
A nudge, as we will use the term, is any aspect of the choice architecture that alters people's behavior in a predictable way without forbidding any options or significantly changing their economic incentives. To count as a mere nudge, the intervention must be easy and cheap to avoid. Nudges are not mandates. Putting fruit at eye level counts as a nudge. Banning junk food does not.
Practically speaking, nudges can take the form of a sign posted in a public place, a message sent in the mail or email, or even just in the design of a process, or placement of objects that are intended to result in positive choices (e.g., move fruit cups to the front of the buffet line and fries further back, and people will eat more fruit).
Today, HR professionals and trainers now have access to digital tools that make sending nudges far easier than ever before. Soon it will be rare for a behavioral profile not to be coupled with a nudge system tailored for the specific job.
Your Nudge Strategy
If you think tactics from behavioral science may be a good supplement to the training and development programs you are already offering, here are some questions to consider:
- Who should get the nudges? Everyone who takes the DISC or only managers?
- How often should the nudges be delivered? Daily? Weekly?
- How long should the nudge reinforcement strategy be used? Ninety days after the training so ingrain the habit? One full year to reinforce the learning? Forever, because people’s teams change.
- How will you deliver the nudges? Via email or as notifications on mobile phones?
- How will you inform employees that their DISC profile will be known by colleagues? How do you inform them of that now?
Reinforcing DISC
Leadership is about behaviors, and even motivated managers struggle to move from task-orientation to people-focused behaviors. While there is no silver bullet, we know that more training and more stickers and buttons probably aren’t the answer. With today’s digital technologies—from email to messaging to audio messages—it’s easier than ever before to add behavioral nudge campaigns to DISC assessments, and to defeat the knowing-doing gap.
—


{% extends "errors/base.html" %} {% set seotitle = "400 Bad request" %} {% block container %}
Your HTTP request is not valid!
Errors


|
FC4SC
1.0
|
Base class for coverpoints and crosses. More...
#include <fc_base.hpp>
Public Member Functions | |
| virtual | ~cvp_base () |
| virtual void | set_strings (const string &name, const string &p_name, const string &expr) |
| virtual void | to_xml (ostream &stream) const =0 |
| Function to print a bin to UCIS XML. More... | |
Coverage API | |
API for getting and controlling coverage collection at run time | |
| virtual double | get_inst_coverage ()=0 |
| Returns the coverage associated with this instance. More... | |
| virtual double | get_inst_coverage (int &hit, int &total)=0 |
| Returns the coverage associated with this instance. More... | |
| virtual void | set_inst_name (const string &new_name) |
| Changes the name of the instance. More... | |
| virtual void | start ()=0 |
| Enables sampling on this instance. | |
| virtual void | stop ()=0 |
| Stops sampling on this instance. | |
Public Attributes | |
| string | name |
| string | expr_str |
| string | p_name |
| bool | init = false |
| cvp_option | option |
| cvp_type_option | type_option |
Friends | |
| ostream & | operator<< (ostream &stream, const cvp_base &inst) |
Base class for coverpoints and crosses.
Basic interface to work with untemplated coverpoints and crosses
|
inlinevirtual |
Destructor
|
pure virtual |
Returns the coverage associated with this instance.
Implemented in fc4sc::cross< Args >, fc4sc::coverpoint< T >, and fc4sc::covergroup.
|
pure virtual |
Returns the coverage associated with this instance.
| hit | Number of hit bins in this instance |
| total | Total number of bins in this instance |
Implemented in fc4sc::cross< Args >, fc4sc::coverpoint< T >, and fc4sc::covergroup.
|
inlinevirtual |
Changes the name of the instance.
| new_name | The new name of the instance |
Reimplemented in fc4sc::cross< Args >, fc4sc::coverpoint< T >, and fc4sc::covergroup.
|
inlinevirtual |
Sets string members to given values
| name | Name of the coverpoint (if another isn't already assigned) |
| p_name | Name of the enclosing covergroup |
| expr | Name of the arguments given to sample |
|
pure virtual |
Function to print a bin to UCIS XML.
| stream | Where to print |
Implemented in fc4sc::cross< Args >, fc4sc::cvg_base, fc4sc::coverpoint< T >, and fc4sc::covergroup.
|
friend |
Stream operator. Calls the format dependent implementation (which should be declared in base classes)
| string fc4sc::cvp_base::expr_str |
The sampled expression stringified
| bool fc4sc::cvp_base::init = false |
If strings have been initialized
| string fc4sc::cvp_base::name |
Name of the coverpoint
| cvp_option fc4sc::cvp_base::option |
Instance specific options
| string fc4sc::cvp_base::p_name |
Name of the enclosing covergroup
| cvp_type_option fc4sc::cvp_base::type_option |
Type specific options


There are many ways of getting started with Hadoop. If you don’t want to get your hands dirty - the quickest way is to download a quickstart VM from Cloudera or Hortonworks and get going. But if you want to get into the nitty gritty details and want to have the satisfaction of installing Hadoop from scratch - this tutorial is for you.
In order to Install Hadoop, we need to have a Linux operating system. So we cannot install Hadoop on Windows or MAC systems. The work around for that is we need to install a virtualization software and then install Linux on that. There are many virtualization software’s available like VMWare Fusion but it only comes as a 30 day trial version. So I prefer using Oracle VirtualBox.
In this tutorial, I will be sharing step by step instructions of installing Ubuntu on VirtualBox.
Step 1 - Download VirtualBox
You can download virtual box from here (https://www.virtualbox.org/wiki/Downloads). You can select the OS X version. Once you download it, you will see a file similar file in your download folder - VirtualBox-5.0.20-106931-OSX.dmg
Step 2 - Begin installation of VirtualBox
Double click the dmg file which will open a similar window as shown below. Double click on VirtualBox.pkg icon.
Step 3 - Install VirtualBox
Click on “continue”.
Step 4 - Installation successful
In the next step it will show you the space it will take on your system and give you an option to change the install location. I’ve gone ahead with the default location. Click on “Install” to proceed. This will complete the installation of VirtualBox.
Step 5 - Launch VirtualBox
Go to your applications and launch VirtualBox. The first screen will look like below.
Step 6 - Specify name and Operating system
Click on “New” and specify any name for the Virtual machine. Since I am going to be using it for Hadoop purpose - I’m specifying “HadoopVM”.
Next we need to select an operating system. Select Type as “Linux” and version as “Ubuntu (64-bit)”.
Click on “Continue”.
Step 7 - Specify Memory Size
It is recommended to allocate 1GB RAM. So I am going to specify 1024 MB. Click on “Continue”.
Step 8 - Hard disk
We are going to create a new virtual hard disk. So select that option and click on “Create”.
Step 9 - Hard disk file type
On the next screen, we need to select the file type. Select the default option of VDI (VirtualBox Disk Image) and click on “Continue”.
Step 10 - Fixed or dynamically allocated hard disk
In this step, we need to specify if we want the hard disk to grow dynamically or if we want to create it with a fixed size. We are going to select the “Dynamically allocation” option here.
Step 11 - Size of hard disk
Here specify 20 GB as maximum hard disk allocation.
Step 12 - Virtual machine created
Tada !! Thats it - your virtual machine is ready. This was the easy part. Next we need to install the Ubuntu operation system on this virtual machine.
Step 13 - Network Settings
Before we install Ubuntu - we need to make the following network settings.
- Click on “Settings”
- Click on “Network”
- Select “Adapter 1”
- Make sure “Enable Network Adapter” is checked
- For Attached to - Select “Bridged Adapter”
- Click “OK”.
Maybe there is a different way - but the reason I do this is so I can connect to this virtual machine from my MAC’s terminal. Its much easier to work on the Terminal as it allows copy/paste etc. You will see that as we move on.
Step 14 - Download and select Ubuntu
Next we need to install Ubuntu on this Virtual machine. Follow these steps.
- First download Ubuntu operating system from here
- Then back on VirtualBox - click on Settings
- Click on Storage
- Click on Empty
-
Click on the small disk next to IDE Secondary Master and select “Choose Virtual Optical Disk File”
- Browse to the folder where you downloaded the Ubuntu operating system and select the iso file - ubuntu-12.04.3-server-i386.iso
- Click on Open.
- Select “OK”.
Step 15 - Install Ubuntu
Back on the main VirtualBox screen - its time to power the Virtual machine on. Click on the “Start” button. You will be asked to select “Language”. To continue with “English” press “Enter”. Here your mouse will not work - so use the keyboard arrows and enter to take actions.
Step 16 - Install Ubuntu Server
Here the default selected option is “Install Ubuntu Server”. Press “Enter” to continue.
Step 17 - Select Language
It will ask for language again. Select the language and press “Enter” to continue.
Step 18 - Select Country
Select the country and press “Enter” to continue.
Step 19 - Detect keyboard
For Detect keyboard layout - select “No” and press “Enter” to continue.
Step 20 - Keyboard language
Select the language and press “Enter” to continue.
Step 21 - Keyboard layout
Select the language and press “Enter” to continue. This will begin the installation.
Step 22 - Enter Hostname
Here you can specify any Hostname you like. Since I am using this for Hadoop - I am going to enter Hostname as “hadoop”. Press tab which will select “Continue” option - then press “Enter”.
Step 23 - Enter name for user
It will ask you to enter name for the new user. Again I am using “hadoop”. Press tab and then hit “Enter”.
Step 24 - Enter username
It will ask you to enter username for the new user. Again I am using “hadoop”. Press tab and then hit “Enter”.
Step 25 - Enter Password
On the next screen - it will ask you to enter a password for this user. Enter the password of your choice - hit tab and press enter to continue.
Step 26 - Re Enter password
The next screen will ask you to confirm the password - re enter the same password and continue.
Step 27 - Encrypt Home Directory
The next step will ask if you want to encrypt your home directory - we dont need that here - so will select “No”.
Step 28 - Select Time Zone
Based on your location, it will automatically get your time zone. If it is correct - just press “Enter” and continue.
Step 29 - Partition Disks
Here we need to select a partitioning method. Select the first option “Guided - use entire disk” and press Enter
Step 30 - Select disk to partition
It will show only one disk - just press Enter.
Step 31 - Write changes to disk
Here it will ask you to confirm if you want to write the changes to disk. Select “Yes” and press “Enter”
Step 32 - Install base system
Step 33 - HTTP proxy information
Leave this empty and continue.
Step 34 - Managing upgrades
Just select the default option “No Automatic Updates” and continue.
Step 35 - Software Selection
Here we need to select what software we want to install. For the time being just select OpenSSH server. To select press “Space bar” - then hit tab and press “Enter” to continue.
Step 36 - Install Grub boot loader
Select “Yes” to install Grub boot loader.
Step 37 - Finish Installation
Finally - the Ubuntu installation is complete. Select Continue to proceed.
Step 38 - Login Prompt
Once the installation process completes - the login prompt will come. Enter the username and password we created at the time of installation to login. I had created the user “hadoop” - so I am using that to login.
Step 39 - Successful Login Screen
Once you login - you will see this screen.
Step 40 - Update Ubuntu OS
Next step is to update the Ubuntu OS. You need to be connected to internet to do this update. Type in this command
sudo apt-get update
Step 41 - Ubuntu update complete
Once Ubuntu is updated - you will see a screen similar to the one below.
Hola ! That brings us to the end of this tutorial. We have successfully installed Ubuntu on VirtualBox. This is the first step required for installing Hadoop.
In the next tutorial - we will start with installing Hadoop on this Virtual machine.


“Nadanti evaṁ sappaññā,
sīhāva girigabbhare;
Vīrā vijitasaṅgāmā,
jetvā māraṁ savāhiniṁ.
This is how the wise roar:
like lions in mountain caves,
heroes, triumphant in battle,
having vanquished Māra and his mount.
Satthā ca pariciṇṇo me,
dhammo saṅgho ca pūjito;
Ahañca vitto sumano,
puttaṁ disvā anāsavan”ti.
… Bhāradvājo thero ….
I’ve served the teacher;
I’ve honored the Dhamma and the Saṅgha;
I’m happy and joyful,
because I’ve seen my son free of defilements.


STUDNENT FORM
First Nmae
Last Name
min 3 chars.
Max 10 chars.
DoB
Gender
Male
Female
Training Type:
Online
OnSite
Subjects
Maths
Physics
Chemistry


The Bumblebee in an English country garden
Crickets belong to the order Othoptera
Flower Fly feeds mainly on nectar and pollen
The Common Blue Damselfly eat insects they snatch from vegetation
The Honey Bee are social insects that produce honey


nisp-debug - Debugging targets for NISP
build [DEBUGTARGET [DEBUGTARGET2 ...]]
Since both the NISP database and the DocBook sources are ordinary XML files, it is relatively easy to make mistakes. Although syntax errors are identified, when using a syntax driven editor, an number of other semantic errors might go unoticed. A number of build targets for debugging purposes have therefore been defined.
The debugging targets will query the database and the documents and create views designed to identify certain typical errors.
debug
deb-overview
Create a table listing all standards and profiles in the NISP database. The purpose solves a nummer of issues. 1) Gives a complete overview of all standards and profiles. 2) All rows marked with a red background are deleted standards/profiles and 3) all cells with a yellow background illustrates information misinng in the database.
The generated file is named build/debug/overview.html
deb-dates
List all event elements belonging to a standard or profile sorted in decending order. When the list of the sorted event are generated, a row spanning all columns with a blue background color is inserted before each event element, if the previous event element do have a different version number. This have the effect, that if there are two blue rows with the same version number, then there is a bug in one or more event record before or after the blue line.
The generated file is named build/debug/dates.html
deb-family
Create DB parent/child relationship list. The main purpose is to identify any failure in the parent/child relationsship between standards and parents. What we specifically are looking for is if a parent standard/profile links to a child standard/profile, that have been deleted from the database.
The generated file is named build/debug/family.html
deb-upcoming
Create list of upcoming/fading standards/profiles
The generated file is named build/debug/upcoming.html
deb-info
Show all meta data in all volumes and and the similar information the the document.xml file. The document also list a rasterized version of all figures in each document.in each documentinfomation about all documents
The generated file is named build/debug/info.html
deb-figures
Show all figures in NISP in a PDF document. Since the PDF document can map the SVG element into similar PDF constructs, we are able to see how each figure scale.
The generated file is named build/debug/figures.pdf
nisp-build, nisp-standard and nisp-standard-schema.
Last updated on August 30, 2007


PyCon, the gathering for the community using and developing the open-source Python programming language. During PyCon Pune, the community will meet for two days of talks and work on upstream projects in two days of dev sprint.
PyCon Pune is a community event and is volunteer-driven. People from the community come forward to volunteer and help make the conference better. Anybody attending PyCon Pune is welcome to volunteer, but you must be registered to volunteer.
If you are looking to volunteer, drop us an email.
PyCon Pune is entirely driven by volunteers. Sponsoring the event helps to sustain, grow the conference along with the community. Sponsors help to make the conference affordable for community, and maintaining the inventory for the conference.
Looking to become a sponsor?
Become a Sponsor
Feel free to email us at pyconpune@python.org


COMING SOON
LIVE TELETHON
MONDAY JUNE 15
Singing in The Rain
Telethon Event
Monday June 15th 6:00 pm
Those with special needs are always singing in the rain, they endure tough times constantly. They breakthrough the darkness, pain and struggles to spread happiness and sunshine to the world. But NOW these precious children need us more than ever! Donate in their honor, BE THE SUNSHINE!
$1000
Raised
Days
Hours
Minutes
Our Friends
Name Surname
$1,234 raised of $23.456
Name Surname
$1,234 raised of $23.456
Name Surname
$1,234 raised of $23.456
Name Surname
$1,234 raised of $23.456
Name Surname
$1,234 raised of $23.456
Name Surname
$1,234 raised of $23.456
Our Teams
Team Name
$1,234 raised of $23.456
Team Name
$1,234 raised of $23.456
Team Name
$1,234 raised of $23.456
Team Name
$1,234 raised of $23.456
Team Name
$1,234 raised of $23.456
Team Name
$1,234 raised of $23.456
Get in touch
We are happy to hear your feedback, comments and suggestions.


Living with range anxiety: Two weeks with the Jaguar I-Pace
We tested the I-Pace in the dead of winter and the heat of summer.
by Eric BangemanThe Jaguar I-Pace is a brilliant car. The first battery electric vehicle from Jaguar-Land Rover, the I-Pace starts at about $70,000 and goes up from there.
My colleague, Ars Automotive Editor Jonathan Gitlin, drove the I-Pace when it launched and came away raving about it—and for good reason. Not only did it win the World Green Car award, but it also won World Car of the Year.
Jonathan covered the I-Pace in great detail, so I won't spend much time talking about the driving experience. But, put simply, the I-Pace is a blast to drive. It accelerates briskly, it's incredibly comfortable, sight lines are good, handling is impeccable, it's roomy for its size, it has some modest off-road skills, and Jaguar-Land Rover's infotainment system, Touch Duo Pro, is well-thought-out, even if slightly laggy at times. Beyond that, JLR fixed one of the major complaints Jonathan had about the I-Pace as it entered production: the regenerative-braking settings are no longer buried under layers of menus.
In short, there's very little to dislike and much to love where driving the I-Pace is concerned. And at the risk of setting off a storm in the comments, I prefer driving an I-Pace to the Tesla Model S I drove for a few days last year.
But for many people, BEVs are an unknown. One frequent question I get when I talk BEVs is range anxiety—"don't you worry about running out of juice?" Range anxiety is real. Sure, most of us have had the experience of running on fumes as we pulled in to refuel, and even if you run out of gas, you can make the walk of shame to the nearest gas station. It's not the same with a BEV. Charging stations aren't ubiquitous like their fossil-fuel counterparts, and you can't trudge back to your Nissan Leaf or Tesla Model S with a can of electrons for your dead vehicle. And even with a full charge, you can see your eventual stall point approaching as you head down the highway.
To see what living with range anxiety is like, we talked Jaguar into letting us drive an I-Pace for two weeks: one in January and one in June. The goal was not only to see what using a BEV as our daily driver was like, but to understand more about how temperature extremes affect range. That's an important consideration for those of us who live where there are four real seasons.
Our first I-Pace was a preproduction model that had occasional issues charging at some public charging stations, apparently due to a problem with the charging port that has since been corrected on the production models. During that loan, temperatures got as low as 9°F (-13°C). The second I-Pace, a fully loaded HSE, saw temperatures ranging from 69-94°F (21-34°C). At both extremes, the car saw almost a 20% drop in range.
For each drive, we recorded the starting and ending range, mileage driven, and outside air temperature. Charging took place primarily in an unattached garage with a 120V hookup, although we did take advantage of public chargers—and DC fast chargers—when available.
Dead of winter
Last winter was brutal here in Chicago, with temperatures bottoming out at -13°F (-30˚C) one January morning. It didn't get that cold while I had the I-Pace, but it was chilly enough to see the impact temperature can have on range.
The car I drove was a preproduction model with a charging cable that said "PROTOTYPE" in big, block letters. It unfortunately did not play nicely with every charging station, an issue that I did not encounter with the production car I drove this summer.
January 15: First drive
The I-Pace arrived on an overcast January day. Upon powering it up for my usual 63-mile (101km) test drive, I noticed that the range was 179 miles, which the car said was 90% of capacity, making the full range around 200 miles (321km). My review route is about 35 miles (56km) of interstate driving combined with all seven miles (11km) of winding, hilly roads in the northwest suburbs of Chicago; the rest is "generic" suburban driving.
I ended up driving 63 miles while using 69 miles (111km) of range on a 34°F (1˚C) day. We're used to seeing higher EPA mileage estimates with highway driving, but the opposite is true for BEVs: the faster you go, the quicker you'll drain the battery.
January 16: 120V charging
A 69-mile drive used up just over a third of the available range, leaving me with a nagging feeling that I should plug it in. Production model I-Paces can take advantage of 100kW DC fast chargers. Alas, all I have in my garage is a 120V outlet and the charger that came with the Jaguar. I ended up putting another 12 miles (19km) on the car the first day. Combined with a two-hour mid-afternoon charge, I ended the day with 101 miles (163km) of range.
I left the car plugged in overnight in my unheated garage on a night where temps bottomed out at 31°F (-1˚C), and 12 hours later, I had gained 28 miles (45km) of range—a paltry 2.33 miles (3.7km) of range per hour.
That's an important point when considering a BEV: you'll need regular access to a 240V charger, whether at home or elsewhere, to keep your batteries topped off. Putting 30 or so miles per day on the car and charging at home wasn't going to cut it.
January 17: 240V charging
Having more voltage makes a big difference. I headed over to the local Whole Foods to spend my morning working from the in-store café, as there are two parking places reserved for EVs. Power is also free, provided by Volta. You'll notice that I gained 34 miles of range from around four hours of charging on a relatively balmy 34° Chicago day.
January 21: Imminent polar vortex
As my time with the I-Pace was coming to an end, the polar vortex was beginning its southward march upon the upper Midwest. On a 9°F (-23˚C) frigid January morning, I was almost startled when I turned on the I-Pace and saw that my range was 100 miles (161km) and that the car was 52% charged. Doing the math results in a number significantly lower than the 234 miles (377km) advertised by Jaguar (max range was 191 miles (307km) at that point), but it highlights an important fact about BEVs: the car's range is heavily influenced by the ambient temperature.
And getting the interior of the car comfortable on a cold morning carries a cost as well. The good thing about the I-Pace is that you can get warm air from the vents very quickly; the flip side is that the heat isn't a byproduct of burning fossil fuels. You need to expend electrons to create heat and still more to blow the heat into the cabin.
Mediterranean climates are the sweet spots for BEVs. The relatively narrow band of temperatures—compared to continental climates—means a BEV should usually be in its sweet spot for maximum range. If you live somewhere with wide annual temperature swings, it's going to affect how far your electric vehicle can go on a full charge.
January 21: DC fast charging
I wanted to ensure the I-Pace had enough juice to make it back to the press fleet manager, so I found an EVgo Level 2 fast charging station at a Whole Foods about five miles away. I downloaded the EVgo app, created an account, and headed over for a quick charge. At $1.50 per hour, EVgo is reasonably priced, and I gained almost 40 miles (64km) of range in a little over a half hour.
Dog days of summer
The second I-Pace arrived at the end of June, where average high temperatures in Chicago reach into the low- to mid-80s (27-32˚C) and can jump into the 90s (>32˚C) for days at a time. By this time, the I-Pace had been in production and on sale for a few months, and the production version gave me no problems over the week I had it.
June 26: Where did all of the miles go?
My first trip was a grocery run. The I-Pace had been sitting in a hot garage, so I was very surprised to see 250 miles (402km) in the center of the instrument cluster—especially for a car that has an advertised range of 234 miles. Once I started driving, the range dropped quickly, and the ending numbers were in line with what I expected from the I-Pace.
This happened a couple of other times: the starting range seemed too optimistic, only to recalibrate itself within a minute or so of starting the car.
June 29: Sitting in the sun
The I-Pace had charged overnight for 11 hours, gaining 26 miles of range, before we headed out. It was a hot, humid morning with four people in the car, so the air conditioning and seat ventilation were turned up. Turning the fan up or down resulted in an immediate loss or gain of range on the instrument panel—in some cases as many as seven miles.
We parked the I-Pace in a shade-free lot, and we returned to a car with even more diminished range—we'd lost 21 miles (33km) just by parking for a couple of hours! Once we got going, and the car was able to direct some energy toward cooling the battery pack, things looked normal again. We ended our trip with 126 miles (203km) of range, using 12 miles (19km) of battery while driving twice that.
Key takeaway: park in the shade.
July 1: Preconditioning
One nice feature of BEVs is the ability to precondition the car before departure. You can tell the I-Pace what time you want to leave and the car will prepare itself for departure by cooling or heating the battery for optimal range and performance. As a bonus, it will do the same to the cabin so you're not sitting down in a sauna or icebox, depending on the time of year.
With the weather calling for temperatures in the mid-90s and my son having rugby sevens training in the late afternoon, I had the opportunity to see how well it worked. We waded through the humid July air and stifling garage to be greeted by a pleasantly cool interior—no need to max out the AC.
If you look at the starting percentage, you'll note that the max range works out to about 203 miles (327km), which was the lowest I saw during my summer driving. I noticed the range dropping the most when the temperatures got to around 90°, so if you live in a climate where that kind of heat is an infrequent visitor, you shouldn't see much impact with a BEV.
July 1: 100kW DC fast charging
Jaguar built in support for 100kW DC fast charging with the I-Pace, so after dropping my son off at practice, I headed over to the nearest ChargePoint station (at a Jaguar-Land Rover dealership) to drink from a 100kW firehose. I had planned to spend an hour and a half there to see how close I would come to a full charge, but a squall line moved through, forcing an early end to rugby practice.
Still, I was able to charge at a rate of over a mile a minute. And Jaguar claims that at a 100kW charging station, the battery can grab an 80% charge in 40 minutes.
Takeaways
I came away from my two weeks driving the I-Pace with a clearer understanding of what's involved with owning a BEV. First, there's no escaping the range indicator. It's always going to be prominently displayed in the instrument cluster. But that doesn't mean you'll always be fretting over how long before the car runs out of juice. With every trip I made, there really was a zero percent chance that I'd do enough driving to bottom out the battery. Once I truly understood that, I stopped caring so much about that number.
Second, driving choices matter. The I-Pace keeps a nice running scorecard of your driving efficiency, scoring your braking, speed, and accessory use (heat and air conditioning, mostly), and over time, it adjusts the projected range based on your driving style.
It's also important to remember that the car's range is going to be affected by circumstances outside of your control—most often the weather. Driving on very hot or cold days will take a bite out of your range, and you will see some unexpected—and sometimes alarming—range drops. I didn't have the chance to do a real road trip with the I-Pace, but I would approach a 200-mile trip in the middle of the summer with trepidation. At the very least, I would make sure there was a charger or two on my route. Tesla has done an outstanding job providing a robust charging infrastructure for its customers. But the rest of the world is catching up, and I noticed more stations nearby in July than I had in January.
Like every other buying decision, deciding whether to ditch fossil fuels for electrons comes down to your circumstances. If you can install a 240V outlet in your garage or charge your car at work, you'll have no problem keeping your battery topped off. If you live in a medium-size metropolitan area, there should be no shortage of chargers for when you're out and about. And after decades of grabbing my wallet every time I pull into a gas station, it felt like cheating to charge for free at the Whole Foods. And electricity is cheaper than gas. I pay in the neighborhood of $3.00 per gallon for gas, but my rate for electricity is 6.9¢/kWh. If I had a 240V charger in my garage, I could fully charge an I-Pace with its 90kWh battery for under $7!
Tesla deservedly gets most of the attention when the conversation turns to electric vehicles. But it's not the only game in town. At 234 miles, the I-Pace falls well short of the 370 miles (595km) of the latest Tesla Model S. If that's your sole criteria, the choice is clear, but mileage tradeoffs are necessary with gas burners, as well. With the I-Pace, Jaguar had taken its decades of experience in building fast, beautiful cars and created a zero-emission SUV that is truly a Jaguar and a joy to drive.
Selected trip data
| Date | Temperature (F) | Starting range (miles) | Ending range (miles) | Miles driven/charge time |
|---|---|---|---|---|
| 1/15 | 34° | 179 | 110 | 63mi |
| 1/16 | 31° | 101 | 129 | 12 hours |
| 1/17 | 34° | 143 | 177 | 4 hours |
| 1/21 | 9° | 100 | 79 | 15.5mi |
| 1/21 | 16° | 63 | 102 | 35 minutes |
| 6/26 | 85° | 250 (100% charged) | 232 (93%) | 1.4mi |
| 6/26 | 85° | 250 (100% charged) | 231 (97%) | 1.4mi |
| 6/29 | 86° | 199 (86% charged) | 159 (73%) | 23.2mi |
| 6/29 | 88° | 138 (73% charged) | 126 (60%) | 24.7mi |
| 7/1 | 94° | 148 (73%) | 125 (61%) | 19.8mi |
| 7/1 | 94° | 125 | 167 | 40 minutes |


SPORTS
TECHNOLOGY
ENTERTAINMENT
Select Channel
ABC news
BBC news
BBC sport
ESPN
BUSINESS INSEDER
BUZZFEED
CNBC
CNN
Search
Top Channels
Top News
Head Lines Of Top Channels


|
STM8S Standard Peripheral Libary
2.2.0
|
Functions | |
| void | WWDG_Init (uint8_t Counter, uint8_t WindowValue) |
| Initializes the WWDG peripheral. This function set Window Register = WindowValue, Counter Register according to Counter and ENABLE WWDG. More... | |
| void | WWDG_SetCounter (uint8_t Counter) |
| Refreshes the WWDG peripheral. More... | |
| uint8_t | WWDG_GetCounter (void) |
| Gets the WWDG Counter Value. This value could be used to check if WWDG is in the window, where refresh is allowed. More... | |
| void | WWDG_SWReset (void) |
| Generates immediate WWDG RESET. More... | |
| void | WWDG_SetWindowValue (uint8_t WindowValue) |
| Sets the WWDG window value. More... | |
|
inline |
Gets the WWDG Counter Value. This value could be used to check if WWDG is in the window, where refresh is allowed.
| None |
| WWDG | Counter Value |
Definition at line 137 of file stm8s_wwdg.h.
|
inline |
Initializes the WWDG peripheral. This function set Window Register = WindowValue, Counter Register according to Counter and ENABLE WWDG.
| Counter | : WWDG counter value |
| WindowValue | : specifies the WWDG Window Register, range is 0x00 to 0x7F. |
| None |
Definition at line 104 of file stm8s_wwdg.h.
|
inline |
Refreshes the WWDG peripheral.
| Counter | : WWDG Counter Value This parameter must be a number between 0x40 and 0x7F. |
| None |
Definition at line 120 of file stm8s_wwdg.h.
|
inline |
Sets the WWDG window value.
| WindowValue | specifies the window value to be compared to the downcounter. This parameter value must be lower than 0x80. |
| None |
Definition at line 159 of file stm8s_wwdg.h.
|
inline |
Generates immediate WWDG RESET.
| None |
| None |
Definition at line 147 of file stm8s_wwdg.h.


U2.W5. Technical Blog Entry
Covering: Classes (When, Why, How?)
Sunday, January 25, 2015
Classes are an intersting concept, and they are actually incredibly helpful. It's kind of hard to understand why classes are necessary when you're first starting to learn code, because most of the programs we are writing are pretty simple, and dont have to do to much; but classes will really come into play when there are expanses of code that do a ton of different things, and use a multitude of data. The simplest way to think of classes is to think of them as containers.
I say that you should think of classes as containers, because all methods that you write within a class are contingent on the class that they are a part of. The class can be any problem that you're trying to solve. You then create methods within the class to "solve" your problem. Then you can create "instances" of your classes and run the methods on each of the instances that you create. It's a little bit easier to understand when you actually see it in practice, so here is an example of a class, it's methods, and creating an instance of the class:
class GuessingGame def initialize(answer) @answer = answer end def guess(guess) @guess = guess if @guess > @answer p :high elsif @guess < @answer p :low else @guess = @answer p :correct end end def solved? if @guess == @answer p true else p false end end end #drivertests game = GuessingGame.new(89) game.solved? game.guess(7) game.guess(100) game.solved? game.guess(89) game.solved?
The example of above shows a class GuessingGame which is the "problem" that's trying to be solved. The methods guess and solved? are created to solve the problem of the guessing game. The driver test shows how those methods interact with the class. So you create an instance of the class using a new variable (game in this case). Then you can run the define methods on this instance of class to solve Guessing game.


Meet our leaders, who were the first members of this study group, they are dedicated to provide content and tools for our team to finish our challenge:
{% set members = site.query('/team') %}
{% for member in members %}
{{ member.name }} {{ member.last_name }}
{% endfor %}
Members
These are the women who have joined us and constantly make a difference in our team.
Mentors
These are our mentors, they have vast experience working in different IT applications such as web development, python packaging...
{% set mentors = site.query('/mentors') %}
{% for mentor in mentors %}


Use CSS to style elements with the class name "city";
London is the capital of England.
Paris is the capital of France.
Tokyo is the capital of Japan.


--- title: Speaking layout: page ---
I love talking about myself! Or online dating, or data science. Just shoot me a message at speaking at dalemarkowitz.com. You can see me telling a story live for The Story Collider here.


|
F.M.B. for Dolphin Smalltalk |
||||||||||||||||||
|
F.M.B. |
FMB (the Filtering Method Browser) is a simple hack to provide a more flexible kind of method browser. In essence, it just shows a list of all the methods in the system, reduced by applying one or more “filters” to select methods. Since the list of filters can be changed interactively, it provides a way of browsing for methods using more sophisticated selection criteria than is easy to do with the standard browsing tools. The FMB is a normal method browser enhanced with a filter panel. This panel holds a list of filter objects that determine which of the methods are be displayed. A picture will probably help show what I mean, so here is one:
In this case, the filters are set to show all the methods on Set that are in the Dolphin package, but not in the virtual method category “*-overriden” (that category is one of my extensions, you won't find it in the standard image, but it is a category of all methods that are overriden in some subclass). The effect is to show that there are only 10 methods on Set that are not overriden. By the way, I've scrunched everthing up in that example to make the picture smaller – I normally use a much bigger window for the FMB. FiltersThe concept of the filters is actually slightly blurry – what the filter panel holds is actually just a list of Objects and it's up to each object to decide what methods are “relevant” to it. You can add to the list of filters by using drag and drop from any of the system browsers that support it. You can also add objects to the list by using the filters menu – you can add an arbitrary object by evaluating an expression, or there's a handfull of prepackaged options that you can use. I trust the menu is self-explanatory enough…
Objects indicate how they are relevant to methods by implementing the
Filter Modes and “All” and “Any” ModesThe FMB uses modes (I'm afraid – I couldn't think of a way of providing the power I needed without making the UI slightly modal). The modes are controlled from the filter menu, or from the toolbar: Each filter can be in one of three states: normal, inverted, or disabled (indicated by a green tick, an inverted red tick, or a dash, respectively). Inverting a filter changes its sense, so that instead of selecting methods that are relevant to the object, it selects methods that are not relevant. Disabling a filter just turns it off temporarily without removing it from the list. There is also a global mode, the FMB operates either in “All” mode or in “Any” mode. In All mode, the FMB displays the methods that pass all of the filters; in Any mode, it displays the methods that pass at least one of the filters. (The icons, by the way, are taken from the standard logic symbols; logicians use an upside-down A, “∀”, to mean that all objects have some propery, and a backwards E, “∃”, to mean that at least one object has the property.) Using itShould be straightforward. I hope. It installs itself as an “extra tool” in the Dolphin system folder. You can start it from there or from the Tools⇒Additional tools menu of any Dolphin window. When it comes up, it is in “All” mode, and there are no filters, so (since every method in the system passes all of the filters) it shows a list of all the methods there are. You can add filters to the list by drag-and-drop, or by using the filter menu. Filters are initially disabled (for perfomance reasons; I may make this configurable one day). You can enable them using the filter menu, or the toolbar, or they cycle through their three states if you double-click on them. A word about performance. Since the FMB is displaying a list filtered down from all the methods in the system, there is obviously going to be scope for it to be slow. On my machine (a 650Mz P3) with some 37000 methods in the system, changing simple filters takes less than a second, which I find reasonably acceptable. It may not be OK at all on slower machines (or for people with less patience than me). Some filters are (as I mentioned earlier) quite slow, so I advise putting them low on the list of filters, so that faster filters will have reduced the number of methods they have to process. The tool's a bit clunky in places, I admit, but I find it useful. Please let me know if you have any suggestions or problems. Packages
|
Copyright © Chris Uppal, 2003-2005


Wolves move up to fifth after impressive victory away at Bournemouth
by Tom PrentkiOn the day Jose Mourinho returned to the Premier League, Wolves fans were left singing ‘Nuno’s the Special One’ as their own Portuguese manager masterminded an impressive victory of his own.
It lifts Wolves into fifth place as Raul Jimenez scored his fourteenth goal of the season, a tally that leaves him level with Raheem Sterling.
Santo’s classy side had eased into a two goal lead in half an hour as Bournemouth struggled to match their movement and tenacity in the early stages.
It was a nightmare 45 minutes for Howe’s men as captain Simon Francis was sent off ten minutes before half time for two bookings. He was starting his first game in the Premier League since December following a cruciate knee ligament injury.
Francis picked up his first booking as he scythed down Diogo Jota just outside the penalty area as Wolves raced down the left.
Joao Moutinho punished the mistake but curling a brilliant free-kick into the top right-hand corner leavning Aaron Ramsdale stranded in the Bournemouth goal.
Ten minutes later they had a second, this time exploiting space on the other flank.
Moutinho was once again integral, initiating a quick free-kick to release Adam Traore who centred for Raul Jimenez to score from close range.
Howe brought on Jefferson Lerma and Arnaut Danjuma at the break and the Cherries found a lifeline.
It came just before the hour mark when Steve Cook rose to meet Ryan Fraser’s free kick at the near post and glance it into the far corner.
Wolves continued to look dangerous on the break and Jota might have won it when he broke clear only to be denied by Ramsdale.
Bournemouth then went close as Nathan Ake struck a fierce volley which Rui Patricio beat away.
It proved just a momentary glimmer of hope for Bournemouth as Wolves once again seized control in the closing stages.
Howe’s side have struggled for consistency, winning only once in their past seven games, at home to Manchester United.
Danjuma might have found an equaliser here but blazed over with the last kick of the game to give Wolves the victory they they’d earned.


s6-networking
Software
skarnet.org
libsbearssl is a support library for the s6-tlsc and s6-tlsd executables when they're built against the BearSSL backend. Among other things, it offers interfaces to read private keys and certificates from a Unix filesystem, which BearSSL does not provide on its own.
BearSSL provides engines to decode PEM objects and X.509 certificates, and to run a TLS/SSL connection. However, it does not store such objects: it never allocates memory, and does not interact with the filesystem. sbearssl provides functions to address this.
When reading an object into memory, sbearssl stores all the bytes of the object in a stralloc, and the sbearssl_* structures contain indices of bytes in that stralloc. That allows the structures to remain valid even when the stralloc contents get reallocated and move to some other place in the heap. After you have finished adding data to the stralloc and are sure its contents will not move again, you can use the sbearssl_*_to functions to convert sbearssl_* structures to the corresponding br_* structures (native BearSSL), which contain pointers to memory.
BearSSL handles two types of private keys: RSA keys and EC keys (i.e. points on an elliptic curve). sbearssl adds some generic functions to handle keys no matter their type.
int sbearssl_rsa_skey_from (sbearssl_rsa_skey *l, br_rsa_private_key const *k, stralloc *sa)
Converts the RSA private key from BearSSL format (reading from a structure pointed to by k) to sbearssl format (writing to a structure pointed to by l). The data from *k's contents are copied into the stralloc in *sa. The function returns 1 on success and 0 (and sets errno) on failure.
void sbearssl_rsa_skey_to (sbearssl_rsa_skey const *l, br_rsa_private_key *k, char *s)
Converts the RSA private key from sbearssl format (reading from a structure pointed to by l) to BearSSL format (writing to a structure pointed to by k). The indices in l must refer to data stored in the string s.
int sbearssl_ec_skey_from (sbearssl_ec_skey *l, br_ec_private_key const *k, stralloc *sa)
Converts the EC private key from BearSSL format (reading from a structure pointed to by k) to sbearssl format (writing to a structure pointed to by l). The data from *k's contents are copied into the stralloc in *sa. The function returns 1 on success and 0 (and sets errno) on failure.
void sbearssl_ec_skey_to (sbearssl_ec_skey const *l, br_ec_private_key *k, char *s)
Converts the EC private key from sbearssl format (reading from a structure pointed to by l) to BearSSL format (writing to a structure pointed to by k). The indices in l must refer to data stored in the string s.
int sbearssl_skey_from (sbearssl_skey *l, br_skey const *k, stralloc *sa)
Converts the private key from BearSSL format (reading from a structure pointed to by k) to sbearssl format (writing to a structure pointed to by l). The data from *k's contents are copied into the stralloc in *sa. The function returns 1 on success and 0 (and sets errno) on failure.
void sbearssl_skey_to (sbearssl_skey const *l, br_skey *k, char *s)
Converts the private key from sbearssl format (reading from a structure pointed to by l) to BearSSL format (writing to a structure pointed to by k). The indices in l must refer to data stored in the string s.
int sbearssl_skey_readfile (char const *fn, sbearssl_skey *key, stralloc *sa)
Reads a private key from the file named fn and stores it in sbearssl format into the structure in *key, the bytes of the key being added to the stralloc in *sa.
The private key in fn can be either DER-encoded (binary format) or PEM-encoded (text format).
The function returns 0 on success. It returns a negative value in case of a system error, in which case errno identifies the error. It returns a positive value in case of an error returned by a BearSSL decoder, in which case an appropriate message can be obtained with the sbearssl_error_str() function.
BearSSL handles two types of public keys: RSA keys and EC keys (i.e. points on an elliptic curve). sbearssl adds some generic functions to handle keys no matter their type.
You normally should not handle public keys directly; you should handle x509 certificate chains instead.
int sbearssl_rsa_pkey_from (sbearssl_rsa_pkey *l, br_rsa_public_key const *k, stralloc *sa)
Converts the RSA public key from BearSSL format (reading from a structure pointed to by k) to sbearssl format (writing to a structure pointed to by l). The data from *k's contents are copied into the stralloc in *sa. The function returns 1 on success and 0 (and sets errno) on failure.
void sbearssl_rsa_pkey_to (sbearssl_rsa_pkey const *l, br_rsa_public_key *k, char *s)
Converts the RSA public key from sbearssl format (reading from a structure pointed to by l) to BearSSL format (writing to a structure pointed to by k). The indices in l must refer to data stored in the string s.
int sbearssl_ec_pkey_from (sbearssl_ec_skey *l, br_ec_public_key const *k, stralloc *sa)
Converts the EC public key from BearSSL format (reading from a structure pointed to by k) to sbearssl format (writing to a structure pointed to by l). The data from *k's contents are copied into the stralloc in *sa. The function returns 1 on success and 0 (and sets errno) on failure.
void sbearssl_ec_pkey_to (sbearssl_ec_pkey const *l, br_ec_public_key *k, char *s)
Converts the EC public key from sbearssl format (reading from a structure pointed to by l) to BearSSL format (writing to a structure pointed to by k). The indices in l must refer to data stored in the string s.
int sbearssl_pkey_from (sbearssl_pkey *l, br_x509_pkey const *k, stralloc *sa)
Converts the public key from BearSSL format (reading from a structure pointed to by k) to sbearssl format (writing to a structure pointed to by l). The data from *k's contents are copied into the stralloc in *sa. The function returns 1 on success and 0 (and sets errno) on failure.
void sbearssl_pkey_to (sbearssl_pkey const *l, br_x509_pkey *k, char *s)
Converts the public key from sbearssl format (reading from a structure pointed to by l) to BearSSL format (writing to a structure pointed to by k). The indices in l must refer to data stored in the string s.
You normally should not have to call these functions directly. Instead, you should use the higher-level functions for private keys, X509 certificate chains and trust anchors, which will perform the PEM decoding for you.
int sbearssl_pem_decode_from_buffer (buffer *b, genalloc *list, stralloc *sa)
Decodes a PEM object, reading from the buffer in *b. The decoded bytes are appended to *sa. list points to a genalloc containing objects of type sbearssl_pemobject. One sbearssl_pemobject is appended to the genalloc per PEM entity decoded from the byte stream read from the buffer.
The function returns 0 on success. It returns a negative value in case of a system error, in which case errno identifies the error. It returns a positive value in case of an error returned by a BearSSL decoder, in which case an appropriate message can be obtained with the sbearssl_error_str() function.
int sbearssl_pem_decode_from_string (char const *s, size_t len, genalloc *list, stralloc *sa)
Decodes a PEM object from the len bytes pointed to by s. The decoded bytes are appended to *sa. list points to a genalloc containing objects of type sbearssl_pemobject. One sbearssl_pemobject is appended to the genalloc per PEM entity found in the bytes in s.
The function returns 0 on success. It returns a negative value in case of a system error, in which case errno identifies the error. It returns a positive value in case of an error returned by a BearSSL decoder, in which case an appropriate message can be obtained with the sbearssl_error_str() function.
int sbearssl_cert_from (sbearssl_cert *l, br_x509_certificate const *k, stralloc *sa)
Converts a certificate from BearSSL format (reading from a structure pointed to by k) to sbearssl format (writing to a structure pointed to by l). The data from *k's contents are copied into the stralloc in *sa. The function returns 1 on success and 0 (and sets errno) on failure.
void sbearssl_cert_to (sbearssl_cert const *l, br_x509_certificate *k, char *s)
Converts a certificate from sbearssl format (reading from a structure pointed to by l) to BearSSL format (writing to a structure pointed to by k). The indices in l must refer to data stored in the string s.
int sbearssl_cert_readfile (char const *fn, genalloc *list, stralloc *sa)
Reads one or more certificates from the file named fn and appends them to the genalloc in *list, which is a dynamically growing list of sbearssl_cert structures. The bytes of the (maybe PEM-decoded, but still DER-encoded) certificate are appended to the stralloc in *sa.
The fn file can be either DER-encoded (binary format) or PEM-encoded (text format). If it is DER-encoded, it must contain exactly one X.509 certificate. If it is PEM-encoded, it may contain a chain of certificates as long as the PEM file fits within the size limits.
fn must not be bigger than SBEARSSL_MAXCERTFILESIZE, which is 8 kB. This function is meant to read individual certificates, not files containing large certificate chains or sets of trust anchors. To do that, use sbearssl_cert_readbigpem() instead.
The function returns 0 on success. It returns a negative value in case of a system error, in which case errno identifies the error. It returns a positive value in case of an error returned by a BearSSL decoder, in which case an appropriate message can be obtained with the sbearssl_error_str() function.
int sbearssl_cert_readbigpem (char const *fn, genalloc *, stralloc *sa)
Reads one or more PEM-encoded certificates from the file named fn and appends them to the genalloc in *list, which is a dynamically growing list of sbearssl_cert structures. The bytes of the PEM-decoded (but still DER-encoded) certificates are appended to the stralloc in *sa.
The function will refuse to read a file that is not valid PEM. Inside the file, It will ignore PEM objects that are not X.509 certificates.
The function returns 0 on success. It returns a negative value in case of a system error, in which case errno identifies the error. It returns a positive value in case of an error returned by a BearSSL decoder, in which case an appropriate message can be obtained with the sbearssl_error_str() function.
BearSSL clients do not use X.509-encoded certificates, they use sets of trust anchors, i.e. structures decoded from certificates representing (intermediate or) root CAs.
int sbearssl_ta_from (sbearssl_ta *l, br_x509_trust_anchor const *k, stralloc *sa)
Converts a trust anchor from BearSSL format (reading from a structure pointed to by k) to sbearssl format (writing to a structure pointed to by l). The data from *k's contents are copied into the stralloc in *sa. The function returns 1 on success and 0 (and sets errno) on failure.
void sbearssl_ta_to (sbearssl_ta const *l, br_x509_trust_anchor *k, char *s)
Converts a trust anchor from sbearssl format (reading from a structure pointed to by l) to BearSSL format (writing to a structure pointed to by k). The indices in l must refer to data stored in the string s.
int sbearssl_ta_readfile (char const *fn, genalloc *list, stralloc *sa)
Reads a set of trust anchors from a PEM file named fn which must contain a list of (intermediate or) root CA certificates. The trust anchors are appended to the genalloc in *list, which is a dynamically growing list of sbearssl_ta structures. The contents of the trust anchors are appended to *sa, which is a stralloc used for storage.
The function returns 0 on success. It returns a negative value in case of a system error, in which case errno identifies the error. It returns a positive value in case of an error returned by a BearSSL decoder, in which case an appropriate message can be obtained with the sbearssl_error_str() function.
int sbearssl_ta_readdir (char const *dir, genalloc *list, stralloc *sa)
Reads a set of trust anchors from a directory named dir, which must contain a list of (intermediate or) root CA certificates stored as individual DER- or PEM-encoded files. The trust anchors are appended to the genalloc in *list, which is a dynamically growing list of sbearssl_ta structures. The contents of the trust anchors are appended to *sa, which is a stralloc used for storage.
The function ignores files that do not contain valid DER or PEM objects containing X.509 certificates representing certification authorities.
The function returns 0 on success. It returns a negative value in case of a system error, in which case errno identifies the error. It returns a positive value in case of an error returned by a BearSSL decoder, in which case an appropriate message can be obtained with the sbearssl_error_str() function.
You probably shouldn't need to call any of these functions directly, except for the first one.
char const *sbearssl_error_str (int err)
Returns a fixed string containing an error message corresponding to the err code, which must be non-negative. The return value from a few sbearssl functions, if positive, can be interpreted via this function.
int sbearssl_isder (unsigned char const *s, size_t len)
Tests whether the array of len bytes pointed to by s looks like a DER-encoded object. Returns 1 if it does and 0 otherwise.
int sbearssl_x509_minimal_set_tai (br_x509_minimal_context *ctx, tai_t t)
Sets the validation time for the X.509 context in *ctx to the absolute time contained in *t, which is a tai_t. Returns 1 if it succeeds, or 0 if it fails - probably because *t does not represent a valid time.
int sbearssl_x509_minimal_set_tain (br_x509_minimal_context *ctx, tain_t a)
Same as the above function, except the time is given as a tain_t, i.e. a tai_t plus nanoseconds (which are simply ignored).
void sbearssl_drop ()
If the process is running as root, then this function drops its privileges (else it does nothing). The gid to drop to is read from the TLS_GID environment variable; the uid to drop to is read from the TLS_UID environment variable. If those variables are not given, then the uid, or gid, or both, are not changed. If they contain something else than numerical uid/gids, the process exits 111 with an error message.
int sbearssl_send_environment (br_ssl_engine_context *ctx, int fd)
Writes a series of null-terminated strings of the form key=value to file descriptor fd; the series is terminated with an additional null character. The strings represent information about the TLS connection represented by context ctx; it is only valid to call this function after the handshake has completed. The exact keys used will change over time, but at least SSL_PROTOCOL=value and SSL_CIPHER=value are transmitted. The function returns 1 if it succeeds and 0 if it fails.
void sbearssl_run (br_ssl_engine_context *ctx, int *fds, tain_t const *tto, uint32_t options, unsigned int verbosity, sbearssl_handshake_cb_t_ref cb, sbearssl_handshake_cb_context_t *cbarg)
This function runs a full-duplex TLS/SSL engine, reading/writing clear text from/to two file descriptors, and writing/reading ciphertext to/from two other file descriptors, until the connection is closed both ways (either with a SSL close, or with EOF). It does not return.
sbearssl_run will make the process die with an appropriate error message if it encounters an unrecoverable error. If there were no problems and the SSL/TLS connection closed cleanly, the process exits 0.
void sbearssl_client_init_and_run (int *fds, tain_t const *tto, uint32_t preoptions, uint32_t options, unsigned int verbosity, char const *servername, sbearssl_handshake_cb_t_ref cb, unsigned int notif)
This function initializes a TLS context for a client-side connection, then runs the TLS engine via a call to sbearssl_run(). The function does not return. If the context cannot be initialized, the process exits 96 with an appropriate error message.
If the CADIR environment variable is set, then it must contain the path of a directory containing the hashed names of the public certificates identifying the trust anchors. Else, if the CAFILE environment variable is set, then it must contain the path to a PEM file containing all the certificates for the trust anchors. Else, the process exits 100 with an error message.
The arguments are as follows:
void sbearssl_server_init_and_run (int *fds, tain_t const *tto, uint32_t preoptions, uint32_t options, unsigned int verbosity, sbearssl_handshake_cb_t_ref cb, unsigned int notif)
Same as the previous function, but on the server side. No servername argument is required. The CERTFILE and KEYFILE environment variables are mandatory, they point to the server's certificate and private key. It is only necessary to set CADIR or CAFILE when bit 0 of preoptions is set (this functionality is supported server-side), in which case client authentication will be requested, and a list of trust anchors (read from either the directory in CADIR or the PEM file in CAFILE) will be used to verify the client certificate.


| DOSE: |
|
oral |
2C-P |
(powder / crystals) |
THE EFFECTS:
I begin to ramble and talking is very exciting...  And if I take it with someone else... we both laugh a lot because I think the other person knows exactly what I am thinking.... I find myself narrating everything in my head and saying outloud 'DID I SAY THAT?? OR JUST THINK IT?' Visuals get strong and I might see auras around people... I'll find myself questioning everything I ever thought.
THE EXPERIENCES:
It's been more than a year since I have touched 2c-p... I've done it twice, the first time I thought I was in love with it... everything felt heartbreakingly real, It was like living a vivid dream, and I felt very close to the friend I was with.
The second time I took 2c-p was a nightmare.
We took it around 9 o clock pm. Me and my friends B and J had just left a very boring birthday party and decided to take some and go to B's dorm, hang out and enjoy the visuals. My friend B had never taken it before, had just started smoking weed... she was mostly against drugs. My friend J and I had done it before...
So we get tired of the dorm... B gets paranoid and kicks us out for 'talking too loud' (we were whispering) At first time went slowly. and then hours went by and I found myself outside in the city, lost with my friend J. Now all I can remember is a slide show of night people, cops, and me completely vulnerable. Around 5 am my friend B lets us back in her dorm room briefly and kicks us out again. me and my friend J ended up trying to walk home... getting in a horrible fight in a grave yard unable to make it home.
When I take too much 2c-p their personality becomes intensified. I wanted to stay inside the dorm... where I felt safe, I didn't want to deal with anyone but my friends. My friend B wanted us to be completely quite... which is impossible when I am on 2c-p. My friend J wanted to be out in the nightlife..
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


| 77 | (A) | Titt þay tuke thaym to Tytus for he thaire tonges knewe |
| 75 | (C) | They token hem to tytus for he þe tonge kouthe |
| 76 | (D) | þei toke hem to Tytus for he þe tonge couthe |
| 74 | (E) | they toke hym tho to tytus . for he that tunge cowde . |
| (Ex) | ---- no text ---- | |
| 77 | (L) | þey token hym to titus for he þe tonge couþe |
| 72 | (P) | þai tokyn hym to Titus for he þair tong knewe |
| 75 | (U) | They toke hem to Titus / for he her tunge knewe |
| (V) | ---- no text ---- |


This code is a quick TypeScript port of some JavaScript code I had written for this Android application.
There's nothing particularly scientific or pretty about this module. It uses predetermined tables and uses offsets to determine exposure settings that will be familiar to most photographers and camera models as opposed to generated, but potentially unfamiliar or unsupported values.
The implementation is simple and it won't error out in some areas that it arguably should, e.g you pass a ⅓ stop value to an instance of ExposureCalculator that is using full stops.
Enjoy! Feel free to contribute by opening a PR or Issue. Happy snapping 📷 👍
const Exposure = require('exposure-utility')
import * as Exposure from 'exposure-utility'
// Create an exposure calculator that uses half stop incerments
const calculator = new Exposure.ExposureCalculator(
Exposure.ExposureIncrements.Halves
)
const shutter = calculator.calculateNewShutterFromBaseExposure(
// Our base exposure
{
iso: '1600',
aperture: 'f/2.8',
shutter: '1/4'
},
// The parts of our final exposure, minus the shutter since we
// want that calculated for us
{
aperture: 'f/19',
iso: '200'
}
)
if (typeof shutter === 'string') {
// This shutter speed result can be dialed in, e.g 30"
} else {
// We received a shutter speed as a number of seconds, e.g 91 in this example
// We need to use bulb mode on most cameras and manually time 91 seconds
}
Create an exposure calculator instance. The given instance will operate using the given increments similar to a camera set to use full, half, or third stops.
const Exposure = require('exposure-utility')
const calculator = new Exposure.ExposureCalculator(
Exposure.ExposureIncrements.Thirds
)
Returns all shutter speeds the given calculator supports. Support is determined
by the increments
argument passed to the constructor for ExposureCalculator
.
Similar to calculator.getShutterSpeeds()
but returns apertures.
Similar to calculator.getShutterSpeeds()
but returns ISO values.
Given a base exposure and a partial final exposure calculate the necessary
shutter speed component for the final
exposure.
const base = {
// Our base or test exposure we used to determine composition and exposure
iso: '1600',
aperture: 'f/2.8',
shutter: '1/4'
}
const final = {
// Our final exposure settings, minus the shutter since we need that
// calculated for us to get an equivalent amount of light with our new ISO
// and aperture value
aperture: 'f/19',
iso: '200'
}
// Result will be a number if the resulting shutter speed is greater than 30
// seconds, or a string from ExposureCalculator.getShutterSpeeds() if between
// 1/8000 or 30 seconds
const shutter = calculator.calculateNewShutterFromBaseExposure(
base, final
)
Similar to calculateNewShutterFromBaseExposure
but instead calculates the
required aperture.
Similar to calculateNewShutterFromBaseExposure
but instead calculates the
required ISO.
Determines the stops separating a base value and final value. For example, the number of stops between two shutter speeds:
const increments = calculator.getIncrements()
const baseShutter = '1/200'
const finalShutter = '1/4'
const validShutters = calculator.getShutterSpeeds()
const stops = calculator.getDifferenceInStops(
validShutters,
baseShutter,
finalShutter
)
console.log(`
There is a difference of ${stops} ${increments} stops between
${baseShutter} and ${finalShutter}
`)
// Prints "There is a difference of 17 ⅓ stops between 1/200 and 1/4"
Similar to getShutterSpeeds
but for aperture values.
Similar to getShutterSpeeds
but for ISO values.
A constant that contains all various shutter speeds for all stop/increments. It has the following format:
{
'⅓': [
'30"',
'25"',
'20"',
'15"',
'13"',
// etc...
'1/8000'
]
'½': [
'30"',
'20"',
'15"',
'10"',
'8"',
// etc...
'1/8000'
]
'Full': [
'30"',
'15"',
'8"',
'4"',
'2"',
// etc...
'1/8000'
]
}
Identical structure to shutterValues
, but instead contains apertures.
Identical structure to shutterValues
, but instead contains ISOs.
Generated using TypeDoc