# -*- coding: utf-8 -*-
#
# 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.
#
"""
This module contains a sqoop 1.x hook
"""
import subprocess
from airflow.exceptions import AirflowException
from airflow.hooks.base_hook import BaseHook
from airflow.utils.log.logging_mixin import LoggingMixin
from copy import deepcopy
[docs]class SqoopHook(BaseHook, LoggingMixin):
"""
This hook is a wrapper around the sqoop 1 binary. To be able to use the hook
it is required that "sqoop" is in the PATH.
Additional arguments that can be passed via the 'extra' JSON field of the
sqoop connection:
* job_tracker: Job tracker local|jobtracker:port.
* namenode: Namenode.
* lib_jars: Comma separated jar files to include in the classpath.
* files: Comma separated files to be copied to the map reduce cluster.
* archives: Comma separated archives to be unarchived on the compute
machines.
* password_file: Path to file containing the password.
:param conn_id: Reference to the sqoop connection.
:type conn_id: str
:param verbose: Set sqoop to verbose.
:type verbose: bool
:param num_mappers: Number of map tasks to import in parallel.
:type num_mappers: int
:param properties: Properties to set via the -D argument
:type properties: dict
"""
def __init__(self, conn_id='sqoop_default', verbose=False,
num_mappers=None, hcatalog_database=None,
hcatalog_table=None, properties=None):
# No mutable types in the default parameters
self.conn = self.get_connection(conn_id)
connection_parameters = self.conn.extra_dejson
self.job_tracker = connection_parameters.get('job_tracker', None)
self.namenode = connection_parameters.get('namenode', None)
self.libjars = connection_parameters.get('libjars', None)
self.files = connection_parameters.get('files', None)
self.archives = connection_parameters.get('archives', None)
self.password_file = connection_parameters.get('password_file', None)
self.hcatalog_database = hcatalog_database
self.hcatalog_table = hcatalog_table
self.verbose = verbose
self.num_mappers = num_mappers
self.properties = properties or {}
self.log.info(
"Using connection to: {}:{}/{}".format(
self.conn.host, self.conn.port, self.conn.schema
)
)
def get_conn(self):
return self.conn
def cmd_mask_password(self, cmd_orig):
cmd = deepcopy(cmd_orig)
try:
password_index = cmd.index('--password')
cmd[password_index + 1] = 'MASKED'
except ValueError:
self.log.debug("No password in sqoop cmd")
return cmd
[docs] def Popen(self, cmd, **kwargs):
"""
Remote Popen
:param cmd: command to remotely execute
:param kwargs: extra arguments to Popen (see subprocess.Popen)
:return: handle to subprocess
"""
masked_cmd = ' '.join(self.cmd_mask_password(cmd))
self.log.info("Executing command: {}".format(masked_cmd))
self.sp = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
**kwargs)
for line in iter(self.sp.stdout):
self.log.info(line.strip())
self.sp.wait()
self.log.info("Command exited with return code %s", self.sp.returncode)
if self.sp.returncode:
raise AirflowException("Sqoop command failed: {}".format(masked_cmd))
def _prepare_command(self, export=False):
sqoop_cmd_type = "export" if export else "import"
connection_cmd = ["sqoop", sqoop_cmd_type]
for key, value in self.properties.items():
connection_cmd += ["-D", "{}={}".format(key, value)]
if self.namenode:
connection_cmd += ["-fs", self.namenode]
if self.job_tracker:
connection_cmd += ["-jt", self.job_tracker]
if self.libjars:
connection_cmd += ["-libjars", self.libjars]
if self.files:
connection_cmd += ["-files", self.files]
if self.archives:
connection_cmd += ["-archives", self.archives]
if self.conn.login:
connection_cmd += ["--username", self.conn.login]
if self.conn.password:
connection_cmd += ["--password", self.conn.password]
if self.password_file:
connection_cmd += ["--password-file", self.password_file]
if self.verbose:
connection_cmd += ["--verbose"]
if self.num_mappers:
connection_cmd += ["--num-mappers", str(self.num_mappers)]
if self.hcatalog_database:
connection_cmd += ["--hcatalog-database", self.hcatalog_database]
if self.hcatalog_table:
connection_cmd += ["--hcatalog-table", self.hcatalog_table]
connection_cmd += ["--connect", "{}:{}/{}".format(
self.conn.host,
self.conn.port,
self.conn.schema
)]
return connection_cmd
@staticmethod
def _get_export_format_argument(file_type='text'):
if file_type == "avro":
return ["--as-avrodatafile"]
elif file_type == "sequence":
return ["--as-sequencefile"]
elif file_type == "parquet":
return ["--as-parquetfile"]
elif file_type == "text":
return ["--as-textfile"]
else:
raise AirflowException("Argument file_type should be 'avro', "
"'sequence', 'parquet' or 'text'.")
def _import_cmd(self, target_dir, append, file_type, split_by, direct,
driver, extra_import_options):
cmd = self._prepare_command(export=False)
if target_dir:
cmd += ["--target-dir", target_dir]
if append:
cmd += ["--append"]
cmd += self._get_export_format_argument(file_type)
if split_by:
cmd += ["--split-by", split_by]
if direct:
cmd += ["--direct"]
if driver:
cmd += ["--driver", driver]
if extra_import_options:
for key, value in extra_import_options.items():
cmd += ['--{}'.format(key)]
if value:
cmd += [value]
return cmd
[docs] def import_table(self, table, target_dir=None, append=False, file_type="text",
columns=None, split_by=None, where=None, direct=False,
driver=None, extra_import_options=None):
"""
Imports table from remote location to target dir. Arguments are
copies of direct sqoop command line arguments
:param table: Table to read
:param target_dir: HDFS destination dir
:param append: Append data to an existing dataset in HDFS
:param file_type: "avro", "sequence", "text" or "parquet".
Imports data to into the specified format. Defaults to text.
:param columns: <col,col,col…> Columns to import from table
:param split_by: Column of the table used to split work units
:param where: WHERE clause to use during import
:param direct: Use direct connector if exists for the database
:param driver: Manually specify JDBC driver class to use
:param extra_import_options: Extra import options to pass as dict.
If a key doesn't have a value, just pass an empty string to it.
Don't include prefix of -- for sqoop options.
"""
cmd = self._import_cmd(target_dir, append, file_type, split_by, direct,
driver, extra_import_options)
cmd += ["--table", table]
if columns:
cmd += ["--columns", columns]
if where:
cmd += ["--where", where]
self.Popen(cmd)
[docs] def import_query(self, query, target_dir, append=False, file_type="text",
split_by=None, direct=None, driver=None, extra_import_options=None):
"""
Imports a specific query from the rdbms to hdfs
:param query: Free format query to run
:param target_dir: HDFS destination dir
:param append: Append data to an existing dataset in HDFS
:param file_type: "avro", "sequence", "text" or "parquet"
Imports data to hdfs into the specified format. Defaults to text.
:param split_by: Column of the table used to split work units
:param direct: Use direct import fast path
:param driver: Manually specify JDBC driver class to use
:param extra_import_options: Extra import options to pass as dict.
If a key doesn't have a value, just pass an empty string to it.
Don't include prefix of -- for sqoop options.
"""
cmd = self._import_cmd(target_dir, append, file_type, split_by, direct,
driver, extra_import_options)
cmd += ["--query", query]
self.Popen(cmd)
def _export_cmd(self, table, export_dir, input_null_string,
input_null_non_string, staging_table, clear_staging_table,
enclosed_by, escaped_by, input_fields_terminated_by,
input_lines_terminated_by, input_optionally_enclosed_by,
batch, relaxed_isolation, extra_export_options):
cmd = self._prepare_command(export=True)
if input_null_string:
cmd += ["--input-null-string", input_null_string]
if input_null_non_string:
cmd += ["--input-null-non-string", input_null_non_string]
if staging_table:
cmd += ["--staging-table", staging_table]
if clear_staging_table:
cmd += ["--clear-staging-table"]
if enclosed_by:
cmd += ["--enclosed-by", enclosed_by]
if escaped_by:
cmd += ["--escaped-by", escaped_by]
if input_fields_terminated_by:
cmd += ["--input-fields-terminated-by", input_fields_terminated_by]
if input_lines_terminated_by:
cmd += ["--input-lines-terminated-by", input_lines_terminated_by]
if input_optionally_enclosed_by:
cmd += ["--input-optionally-enclosed-by",
input_optionally_enclosed_by]
if batch:
cmd += ["--batch"]
if relaxed_isolation:
cmd += ["--relaxed-isolation"]
if export_dir:
cmd += ["--export-dir", export_dir]
if extra_export_options:
for key, value in extra_export_options.items():
cmd += ['--{}'.format(key)]
if value:
cmd += [value]
# The required option
cmd += ["--table", table]
return cmd
[docs] def export_table(self, table, export_dir, input_null_string,
input_null_non_string, staging_table,
clear_staging_table, enclosed_by,
escaped_by, input_fields_terminated_by,
input_lines_terminated_by,
input_optionally_enclosed_by, batch,
relaxed_isolation, extra_export_options=None):
"""
Exports Hive table to remote location. Arguments are copies of direct
sqoop command line Arguments
:param table: Table remote destination
:param export_dir: Hive table to export
:param input_null_string: The string to be interpreted as null for
string columns
:param input_null_non_string: The string to be interpreted as null
for non-string columns
:param staging_table: The table in which data will be staged before
being inserted into the destination table
:param clear_staging_table: Indicate that any data present in the
staging table can be deleted
:param enclosed_by: Sets a required field enclosing character
:param escaped_by: Sets the escape character
:param input_fields_terminated_by: Sets the field separator character
:param input_lines_terminated_by: Sets the end-of-line character
:param input_optionally_enclosed_by: Sets a field enclosing character
:param batch: Use batch mode for underlying statement execution
:param relaxed_isolation: Transaction isolation to read uncommitted
for the mappers
:param extra_export_options: Extra export options to pass as dict.
If a key doesn't have a value, just pass an empty string to it.
Don't include prefix of -- for sqoop options.
"""
cmd = self._export_cmd(table, export_dir, input_null_string,
input_null_non_string, staging_table,
clear_staging_table, enclosed_by, escaped_by,
input_fields_terminated_by,
input_lines_terminated_by,
input_optionally_enclosed_by, batch,
relaxed_isolation, extra_export_options)
self.Popen(cmd)


Class BO.io.Button
Extends
BO.PhysicalInputBase.
Creates and interface to a physical button. The Button object
dispatches events on state changes such as Pressed, Released and
Sustained Press. The Button object also handles debouncing.
Defined in: Button.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
BO.io.Button(board, pin, buttonMode, sustainedPressInterval)
An object to represent a physical button.
|
| Field Attributes | Field Name and Description |
|---|---|
|
The debounce time interval in milliseconds.
|
|
| <static> |
BO.io.Button.INTERNAL_PULL_UP
|
|
[read-only] The pin number of the pin the button is attached to.
|
|
| <static> <constant> |
BO.io.Button.PULL_DOWN
|
| <static> <constant> |
BO.io.Button.PULL_UP
|
|
The delay time (in milliseconds) the button must be held before a
sustained press event is fired.
|
- Methods borrowed from class BO.PhysicalInputBase:
- addEventListener, dispatchEvent, hasEventListener, removeEventListener
| Event Attributes | Event Name and Description |
|---|---|
|
The longPress event is dispatched once when the button has been held for
the time duration specified by the sustainedPressInterval property.
|
|
|
The pressed event is dispatched when the button is pressed.
|
|
|
The released event is dispatched when the button is released.
|
|
|
The sustainedPress event is dispatched continuously at the rate
specified by the sustainedPressInterval property while the button is
held.
|
Class Detail
BO.io.Button(board, pin, buttonMode, sustainedPressInterval)
An object to represent a physical button. The advantage of using the
Button class over listening for pin change events on a Pin object, is
that the Button class handles debouncing and provides helpful button
events: Pressed, Released, Long Press and Sustained Press
PULL_UP vs PULL_DOWN. If the other end of the resistor connected to the button is connected to ground, configuration is PULL_DOWN, if the resistor is connected to power, then the configuration is PULL_UP.
- Parameters:
- {IOBoard} board
- A reference to the IOBoard instance
- {Pin} pin
- A reference to the Pin the button is connected to.
- {Number} buttonMode
- The mode of the button (either Button.PULL_DOWN or Button.PULL_UP if wired with external resistors or Button.INTERNAL_PULL_UP if using the internal pull-up resistors. Default is PULL_DOWN.
- {Number} sustainedPressInterval
- The delay time in milliseconds before a sustained press event is fired.
Field Detail
{Number}
debounceInterval
The debounce time interval in milliseconds.
<static>
BO.io.Button.INTERNAL_PULL_UP
{Number}
pinNumber
[read-only] The pin number of the pin the button is attached to.
<static> <constant>
BO.io.Button.PULL_DOWN
<static> <constant>
BO.io.Button.PULL_UP
{Number}
sustainedPressInterval
The delay time (in milliseconds) the button must be held before a
sustained press event is fired.
Event Detail
{BO.io.ButtonEvent.LONG_PRESS}
longPress
The longPress event is dispatched once when the button has been held for
the time duration specified by the sustainedPressInterval property.
- This event has the following properties:
- {BO.io.Button} target
- A reference to the Button object
{BO.io.ButtonEvent.PRESS}
pressed
The pressed event is dispatched when the button is pressed.
- This event has the following properties:
- {BO.io.Button} target
- A reference to the Button object
{BO.io.ButtonEvent.RELEASE}
released
The released event is dispatched when the button is released.
- This event has the following properties:
- {BO.io.Button} target
- A reference to the Button object
{BO.io.ButtonEvent.SUSTAINED_PRESS}
sustainedPress
The sustainedPress event is dispatched continuously at the rate
specified by the sustainedPressInterval property while the button is
held.
- This event has the following properties:
- {BO.io.Button} target
- A reference to the Button object


Timers, Bouncing Balls, and Debugging
Abel Sanchez
and
John R. Williams
Basic Timer
Repeating Timer - setTimeout
Repeating Timer - setInterval
SetTimeout I
SetTimeout II
SetInterval I
SetInterval II
SetInterval III
Event Time Example
Task Time
Timer Comparison
Bouncing Ball Exercise
Debugging Exercise
THE END


Squinty, the Comical Pig
by Richard Barnum
Chapter 9: “Squinty’s Balloon Ride”
Additional Information
- Year Published: 1915
- Language: English
- Country of Origin: United States of America
- Source: Barnum, R. (1915). Squinty, the comical pig. New York: Barse and Hopkins.
-
Readability:
- Flesch–Kincaid Level: 3.5
- Word Count: 1,904
- Genre: Fantasy
- Keywords: children's stories
- ✎ Cite This
Downloads
This was the third time Squinty had run away. But not once did he intend to do any wrong; you see he knew no better. He just found his pen door open and walked out—that was all there was to it.
“I wonder what will happen to me this time?” thought the comical little pig, as he hurried along over the ground, toward the woods. “I don’t believe Don, the dog, will find me here, for he must be back on the farm. But some other dog might. I had better be careful, I guess.”
When Squinty thought this he stopped and looked carefully around for any signs of a barking dog. But he saw none. It was very still and quiet, for it was nearly supper time in the big house where Bob lived, and he and his sisters were waiting for the bell to ring to call them to the table.
But Squinty had had his supper, and, for the time, he was not hungry.
“And if I do get hungry again, I may find something in the woods,” he said to himself. “Acorn nuts grow in the woods, and they are very good. I’ll root up some of them.”
Once or twice Squinty looked back toward the pen he had run away from, to see if Bob, his master, were coming after him. But Bob had no idea his little pet had run away. In fact, just then, Bob was wondering what new trick he could teach Squinty the next day.
On and on ran the comical pig. Once he found something round and yellow on the ground.
“Ha! That looks like a yellow apple,” thought Squinty, and he bit it hard with his white teeth.  I don’t like that. Oh, that isn’t an apple at all!”
And it wasn’t—it was a lemon the grocery boy had dropped.
“Oh! How sour!” grunted Squinty. “I’d like a drink of water to take the taste of that out of my mouth.”
Squinty lifted his nose up in the air, and sniffed and snuffed. He wanted to try to smell a spring of water, and he did, just on the edge of the big wood. Over to the spring he ran on his little short legs, and soon he was having a fine drink.
“Now I feel better,” Squinty said. “What will happen next?”
Nothing did for some time, and, when it did it was so strange that Squinty never forgot it as long as he lived. I’ll tell you all about it.
He walked on through the woods, Squinty did, and, before very long, he found some acorns. He ate as many as he wanted and then, as he always felt sleepy after he had eaten, he thought he would lie down and have a nap.
He found a place, near a big stump, where there was a soft bed of dried leaves, nearly as nice as his straw bed in the pen at home. On this he stretched out, and soon he was fast asleep.
When Squinty awoke it was real dark. He jumped up with a little grunt, and said to himself:
“Well, I did not mean to stay away from my pen so long. I guess I had better go back.”
Squinty started to go back the way he had come, but I guess you can imagine what happened. It was so dark he could not find the path. He walked about, stumbling over sticks and stones and stumps, sometimes falling down on soft moss, and again on the hard ground. Finally Squinty thought:
“Well, it is of no use. I can’t get back tonight, that is sure. I shall have to stay here. Oh dear! I hope there are no dogs to bite me!”
Squinty listened carefully. He could hear no barks. He hunted around in the dark until he found another soft bed of leaves, and on that he cuddled himself up to go to sleep for the night. He was a little afraid, but, after all, he was used to sleeping alone, and, even though he was outside of his pen now, he did not worry much.
“In the morning I shall go back to the boy who taught me tricks,” thought Squinty.
But something else happened in the morning.
Squinty was awake when the sun first peeped up from behind the clouds.  Then he stretched first one leg and then the others, and said:
“Ha! Ho! Hum! Uff! Uff! I guess I’ll have some acorns for my breakfast.”
It was a very easy matter for Squinty to get his breakfast. He did not have to wash, or comb his hair, or even dress. Just as he was he got up out of his leaf-bed, and began rooting around in the ground for acorns. He soon found all he wanted, and ate them. Then he felt thirsty, so he looked around until he had found another spring of cool water, where he drank as much as he needed.
“And now to go back home, to the boy who taught me tricks,” said Squinty to himself. “I guess he is wondering where I am.”
And indeed that boy, Bob, and his sisters Mollie and Sallie, were wondering where Squinty was. They saw the open door of the pen, and the boy recalled that he had forgotten to lock it.
“Oh, Squinty is gone!” he cried, and he felt very badly indeed. But I have no time to tell you more of that boy now. I must relate for you the wonderful adventures of Squinty.
Squinty went this way and that through the woods, but he could not find the path that led to his pen. He tried and tried again, but it was of no use.
“Well,” said Squinty, at last, sitting down beside a hollow log, “I guess I am lost. That is all there is to it I am lost in the big woods! Oh dear! I almost wish Don, the dog, or the farmer would come and find me now.”
He waited, but no one came. He listened but he heard nothing.
“Well, I might as well eat and go to sleep again,” said Squinty, “Maybe something will happen then.”
Soon he was asleep again. But he was suddenly awakened. He heard a great crashing in the trees over his head.
“Gracious! I hope that isn’t a dog after me!” cried the little pig.
He looked up, Squinty did. He saw coming down from the sky, through the branches of the trees, a big round thing, like more than ten thousand rubber balls, made into one. Below the round thing hung a square basket, with many ropes, and other things, fast to it. And in the basket were two men. They looked over the edge of the basket. One of them pulled on a rope, and the big thing, which was a balloon, though Squinty did not know it, came to the ground with a bang.
“Well, at last we have made a landing,” said one of the men.
“Yes,” said the other. “And we shall have to throw out some bags of sand to go up again.”
Squinty did not know what this meant. But I’ll explain to you that a “landing” is when a balloon comes down to the ground. And when the men in it want to go up again, they have to toss out some of the bags of sand, or ballast, they carry to make the balloon so light that the gas in it will take it up again.
The men began tossing out the bags of sand. Squinty saw them, but he was not afraid. Why should he be? for no men or boys had ever been cruel to him.
“Uff! Uff!” grunted Squinty, getting up and going over to one of the bags of sand. “Maybe that is good to eat!” he thought. “If it is I will take a bite. I am hungry.”
“Oh, look at that pig!” suddenly called one of the men in the balloon basket.
“Sure enough, it is a pig!” exclaimed the other.  “See the funny way he looks at you.”
At that moment Squinty looked up, as he often did, with one eye partly closed, the other open, and with one ear cocked frontwards, and the other backwards.
“Say, he’s a cute one all right,” said the first man. “Let’s take him along.”
“What for?” asked his friend.  “Maybe he’ll be a mascot for us.”
“Well, if he’s a mascot, all right. Then we’ll take him. We need some good luck on this trip.”
Squinty did not know what a mascot was. Perhaps he thought it was something good to eat. But I might say that a mascot is something which some persons think brings them good luck. Often baseball nines, or football elevens, will have a small boy, or a goat, or a dog whom they call their mascot. They take him along whenever they play games, thinking the mascot helps them to win. Of course it really does not, but there is no harm in a mascot, anyhow.
“Yes, we’ll take him along in the balloon with us,” said the taller of the two men. “See, he doesn’t seem to be a bit afraid.”
“No, and look! He must be a trick pig! Maybe he got away from some circus!” cried the other man. For, at that moment Squinty stood up on his hind legs, as the boy had taught him, and walked over toward the big balloon basket. What he really wanted was something to eat, but the men did not know that.
“He surely is a cute little pig!” cried the tall man. “I’ll lift him in.
The next moment, before he could get out of the man’s grasp if he had wanted to, Squinty felt himself lifted off the ground. He was put down in the bottom of the basket, which held many things, and, a second later, Squinty, the comical pig, felt himself flying upward through the air.
Squinty was off on a trip in a balloon.


US extends protection for 6 nations’ migrants for a year
by The Associated PressTEGUCIGALPA, Honduras (AP) — The U.S. Department of Homeland Security says it’s extending temporary protected status coverage for migrants from El Salvador, Haiti, Honduras, Nepal, Nicaragua and Sudan through Jan. 4, 2021.
The Trump administration has been trying to end TPS for those countries since 2018, but that move has been tied up in court appeals.
The department said Friday the extension was enacted to comply with court injunctions against the move, which it said it’s appealing.
Honduras’ president says TPS status has allowed over 40,000 Hondurans to live and work in the United States since Hurricane Mitch caused widespread damage in Honduras in 1999.
President Juan Orlando Hernandez wrote in his Twitter account that, “We will continue working to find a permanent and humane solution for out Honduran brothers.”
The Associated Press


--- layout: page title: About Me description: This is what I do. background: '/img/bg-about.jpg' ---
- C - JAVA - Python - Javascript - Node.js - Android Studio


Self driving car equiped with a few sensors: Lidar, DepthCam (RealSense R200), WebCam, and an Inertial Measurement Unit (IMU). Compute done on Jetson TX2. Side view of car. Work in progress!


ExtendedConsole
The ExtendedConsole project was created after writing many .Net console applications, and finding myself spending way too much time and effort on doing what should be, in my humble opinion, simple and trivial tasks.
Things like highlighting parts of the output text, validating and parsing user inputs, and creating simple menus - all of these tasks seems to have been, for the lack of a better term, neglected when it comes to console applications.
The ExtendedConsole project is here to provide easy-to-use solutions to these tasks.
The ExtendedConsole project is completely open source and free to use, under the MIT licence.
It's source code is available on GitHub, and it's also available as a Nuget package.
ExtendedConsole provides the following features:
-
Markup support:
ExtendedConsole provides a super simple, xml based markup support for writing text to the Console.
No more breaking up your strings to multiple Console.Write commands just to color parts of your text - With ExtendedConsole it's as easy as
exConsole.Write("<c b='darkRed' f='white'>White text on a dark red background</c>");
-
Menus:
ExtendedConsole provides methods to generate console menus.
Creating a menu with ExtendedConsole is as simple as this:
var selected = exConsole.Menu( new MenuDisplayArgs("What to do next?"), ("
Quit ", null), ("Go here", GoHere), ("Pause", () => exConsole.Pause()), ("Do that", DoThat) ); -
User inputs:
ExtendedConsole provides methods to help you read and parse user input.
It supports int, boolean, DateTime, and custom classes and structs.
For instance, to get a number between 0 and 5 from your users, use this:
var result = exConsole.ReadInt( "Please enter an int between
0 and5 , inclusive.", i => i >= 0 && i <= 5 ); -
Clear lines:
ExtendedConsole provides methods to clear a specific line or lines.
For instance, to clear the last three lines of the console, use this:
exConsole.ClearLastLines(3);
Easily extensible
ExtendedConsole is designed to be as easy to extend as possible.
All you have to do is add whatever extension methods you need.
This is one of the main reasons it's built as a single main class,
and most of it's features are in extension methods - it provides two clear benefits:
- It can be used as a guideline to users on how to add features.
- It makes it easier to maintain, as the classes are relatively small and focused.


dolt
Dolt is an SQL database that you can fork, clone, branch, merge, push and pull just like a Git repository.
Some subcommands such as `dolt commit` have their own usage documentation.
More information: home page
- Execute a dolt subcommand:
dolt subcommand
- List available subcommands:
dolt help


@(Rform : Form[login]) @layout("Login"){
Concerning security issue an authorized officer should create the account for new employees


Hello World!
I don't know about you, but...
I'm pretty hungry right now. Here's a meatloaf recipe, it's whats for supper!
Image courtesy of WikiMedia Commons
FOR LOAF:
- 1 1/2 lbs ground beef
- 1 egg
- 1 minced onion
- 2 minced garlic cloves
- 1 cup milk
- 1 cup crushed cheez-its
- 1 teaspoon salt & pepper
- 1 teaspoon cajun seasoning
FOR SAUCE:
- 1/2 cup ketchup
- 1/2 cup brown sugar
- 1/2 teaspoon ginger
INSTRUCTIONS:
- Preheat oven to 350F
- Thoroughly mix all loaf ingredients in a big bowl
- Form meatloaf mix into a loaf shape in a lightly greased pan
- Mix sauce ingredients in a small bowl and microwave 30 seconds.
- Pour sauce mixture over the meatloaf
- Bake at 350 for roughly 1 hr until 160F
- Enjoy!


if t is a lambda term, and x is a variable, then λx.t is a lambda term (called a lambda abstraction);
if t and s are lambda terms, then (ts) is a lambda term (called an application).
Um, shouldn't there be more?
Nope. That's basically it.
λ-calculus limitations
FP breaks your brain the first time you use it.
No named functions.
No data.
No variables.
No control flow.
No loops.
No effects.
Turing Complete!
Overcoming the λ-calculus limitations has produced a set of core Functional Programming Concepts. See Haskell, ML, and Scheme.
Functional Concepts can be imitated, leveraged, and/or duplicated more easily than the λ-calculus.
The Elements of Functional Programming are those Concepts applied.
Scala is hybrid language, incorporating core Concepts from:
λ-calculus
Functional Programming
Imperative Programming
Object-Oriented Programming
Generic Programming
Every programming language has to find a balance and compromise on features if it draws from multiple styles.
When necessary, Scala trades-off in favor of Imperative and Object-Oriented Programming Concepts.
Not as different as you think...
YOU: There are too many differences, FP concepts don't align at all with Imperative code! The gap is too large.
CLAIM: Imperative code is conceptually close to Functional code.
PROOF: Code without variable re-assignment. Use/write only pure functions.
Core Concepts of Functional Programming
Core Concepts
First-Class Functions
Higher-Order Functions
Pure Functions
Recursive Functions
Effect Tracking
Lazy Evaluation
Immutable Data
Algebraic Data Types
Pattern Matching
Expressive Type Systems
Program Soundness
We will be exploring each Concept, along with:
its Scala representation,
its JVM implementation,
any inherent limitations,
and safe & proper usage.
Part 1
Concepts around Functions
First-Class Functions
Higher-Order Functions
Pure Functions
Recursive Functions
Effect Tracking
First-Class Functions
Functions are Data; Convenient Lambdas and Closures
// Values and Functions occupy the same namespace
val two = 2.0
val square: Double => Double = (i) => Math.pow(i, two)
val four = square(two)
First-Class Functions
Functions are Data; Convenient Lambdas and Closures
// Same syntax for Function and Lambda
val scale = 2.0
val hack: (Double => Double) => Double => Double = f => i => f(i)
// We can declare unnamed functions inline (lambda)
// and close over values in-scope (closure)
hack(d => d*scale)(3)
First-Class Functions
Currying and Partial Application
// Consistent Syntax for defining Curried Functions
val add: Int => Int => Int = i => j => i + j
val five = add(2)(3)
val addTwo = add(2)
val alsoFive = addTwo(3)
// Partial Application is also supported
val mult = (i:Double,j:Double) => i * j
val timesFour: Double => Double = mult(_, 4)
First-Class Functions
Everything is an Expression
// if, for, match are all expressions
val hexDigit = (x:Int) => if (x >= 10) x + 'A' - 10 else x + '0'
Higher-Order Functions
Functions can have parameters that are themselves Functions; Functions can return Functions
// Same syntax for Function and Lambda
val scale = 2.0
val hack: (Double => Double) => Double => Double = f => i => f(i)
// Both ideas in action
val hackScale = hack(d => d*scale)
Higher-Order Functions
Ludicious Speed
// Function Composition
val compose = (f:Int => Int) => (g: Int => Int) => (x:Int) => g(f(x))
val whack = compose(_ + 2)(_ * 3)
val whacked = whack(9)
It would seem that Scala supports First-Class Functions and Higher-Order Functions...
LIES!!

Kingdom of the Nouns
Scala has Functions.
In Scala "everything" is an Object. Scala trades-off in favor of Imperative and Object-Oriented Programming Concepts.
Therefore: Functions are Objects
But Functions are Verbs!
No, Functions are the body of an apply Method in an anonymous Sub-Class.
What you see...
val pow = (i:Double,j:Double) => Math.pow(i, j)
// What you get...
val pow = new Function2[Double,Double,Double] {
def apply(i:Double,j:Double) = Math.pow(i, j)
}
Limitations
Functions != Methods
// Only Methods can have type parameters.
// Or implicit parameters.
def foo[T](a:T)(implicit ev:Show[T]) = ...
// Can convert a method to a function
val fooString = foo[String](_)
// Can kind of work around
class anonfunc[T] extends (T => String) {
def apply(x:T)/*(implicit i:Int)*/ = x.toString.substring(0,4)
}
val f = new anonfunc[String]
assert(f("generic") == "gene") // put gene back in the generic!
Limitations
val f1 = (i:Int) => i + 1
val f2 = (i:Int) => i + 1
assert(f1 == f2) // left to the reader
What happens if a Function throws?
val ft = (i:Int) => throw new RuntimeException("terrible idea")
What does the stacktrace look like?
scala> ft(2)
java.lang.RuntimeException: terrible idea
at $anonfun$1.apply(<console>:11)
at $anonfun$1.apply(<console>:11)
... 42 elided
Best Practice: Never throw in Functions
Pure Functions
A Function is said to be pure if and only if:
its output depends only on the input, and
there are no observable side-effects from evaluating the function.
Pure Functions
You can have Pure Functions in Imperative languages.
But Scala doesn't...
Functions can mutate state.
Functions can throw exceptions.
Functions can perform IO.
Functions can halt the program.
Effect Tracking
Effect Tracking makes explicit the effects of a Function.
Scala does not have Effect Tracking and actually eliminates checked exceptions, which are a form of Effect Tracking.
scala> recursiveFunction((1 to 10000).toList)
java.lang.StackOverflowError
at .recursiveFunction(<console>:12)
at .recursiveFunction(<console>:13)
Recursive Functions
Any recursive function can be re-written as an iterative one. That's what FP languages do.
Haskell doesn't even have a proper call stack. Haskell evaluates a chain of thunks!
Scala has @tailrec. Enforces the rewrite. Opt-in. Limited.
Rewriting is a good idea if and only if you can safely ignore stack frames.
Recursive Functions
But generally Scala is toast...
The JVM doesn't support tail-call optimization.
Stack frames are a crucial implementation detail.
in jdk classes [...] there are a number of security sensitive methods that rely on counting
stack frames between jdk library code and calling code to figure out who's calling them. - Brian Goetz


Keshif
Data Made Explorable
Click on the image to load the interactive Keshif browser
Click to interactively browse the collection!
Keshif lets you explore and understand your data collections, visually & easily.
- Create summaries for the data properties you would like to explore. Keshif will present your data in its simple, effective visual language.
- Discover relations across your summaries using the rapid interaction design. Preview results by quick mouse over. Compare across distributions. Keshif automatically synronizes all that is connected so that you can make observations swiftly.
- Enjoy scalability through design. Many visualization techniques have not been designed to scale gracefully. Keshif is designed to scale. It lets you explore large data collections, as far as data can be loaded to your web browser.
- Enjoy consistency. Keshif solves your exploration needs with a single design. Our visual and interactive approach is cohesive, so it's easy to start exploring.
- Don't worry about picking the right visualization. Keshif does it for you. You will focus on your data and your goals. You will define dimensions that you'd like to explore. Keshif will visualize the characteristics.
- See the overview and the most relevant first. After each step of exploration, the most relevant results and data properties are shown first, as they are dynamically and smoothly re-ordered.
- Load your data in a flexible pipeline. Keshif is ready to load your structured data, whether it be digital collections, books that you have read, contact lists, public data sources, movies, etc. It can automatically import data from Google SpreadSheets and CSV/TEXT files. You can write your own importers in Javascript for JSON, XML, even HTML or BibTeX for publication databases. Check the demo list to find demos using various data resource types.
- Define your browser using its simple API. The API is based on a single function which takes configuration parameters, such as data source, and the descriptions of your data summaries.
Developed By
M. Adil Yalçın, PhD student, Computer Science, University of Maryland
Advised By
Niklas Elmqvist, Associate Professor, iSchool, University of Maryland
Ben Bederson, Professor, Computer Science, University of Maryland
License
Released under
BSD license.
2015 University of Maryland
Contact
- You are invited to contact for feedback and questions.
-
Funded in part by
Huawei (2013-2014).
-
Anne Rose,
Contributor, Faculty Research Assistant, UMIACS, University of Maryland


Summary
We strive to make Open States available to everyone and ensure that it
is as accurate and reliable as possible. That said, we can't provide any
guarantees and use of Open States' tools is contingent upon your acceptance
of that fact.
Additionally, regarding privacy- we take your privacy seriously and aim
to do right by you. Most importantly we will never sell, rent, share, or
distribute your personal information without your consent. We also will
not publish identifiable information about anyone's usage of our services
without express permission.
Our more comprehensive Terms of Service & Privacy Policy follow.
If you have any questions please contact us.
These terms effective September 15, 2021.
Privacy Policy
This page informs you of our policies regarding the collection, use and disclosure of
Personal Information we receive from users of the Services.
We use your Personal Information only for providing and improving the Services. By using the Services, you agree to the collection and use of information in accordance with this policy.
Information Collection And Use
While using our Services, we may ask you to provide us with certain personally identifiable information that can be used to contact or identify you. Personally identifiable information may include, but is not limited to your name, email address, or other contact information ("Personal Information"). Information on who uses our Services and aggregate statistics on usage may be shared with third parties for the purpose of securing funding or otherwise demonstrating the value we provide. Contact information will not be shared with third parties for any reason without your consent.
Log Data
Like many site operators, we collect information that your computer sends whenever you visit our Services ("Log Data"). This Log Data may include information such as your computer's Internet Protocol ("IP") address, browser type, browser version, the pages of our Services that you visit, the time and date of your visit, the time spent on those pages and other statistics. In addition, we may use third party services such as Google Analytics that collect, monitor and analyze this data.
Communications
We may use your Personal Information to contact you with newsletters or other information relevant to the services. You may opt out of these communications at any time, but doing so may limit your ability to use certain features.
Cookies
Cookies are files with small amount of data, which may include an anonymous unique identifier. Cookies are sent to your browser from a web site and stored on your computer's hard drive. Like many sites, we use "cookies" to collect information. You can instruct your browser to refuse all cookies or to indicate when a cookie is being sent. However, if you do not accept cookies, you may not be able to use some portions of our Services.
Security
The security of your Personal Information is important to us, but remember that no method of transmission over the Internet, or method of electronic storage, is 100% secure. While we strive to use commercially acceptable means to protect your Personal Information, we cannot guarantee its absolute security.
Changes
This Privacy Policy is effective as of the date posted at the top of this page and will remain in effect except with respect to any changes in its provisions in the future, which will be in effect immediately after being posted on this page.
We reserve the right to update or change our Privacy Policy at any time and you should check this Privacy Policy periodically. Your continued use of the Service after we post any modifications to the Privacy Policy on this page will constitute your acknowledgment of the modifications and your consent to abide and be bound by the modified Privacy Policy.


{% extends "admin/layout.html" %} {% block title %}{{ _("Delete Comment") }}{% endblock %} {% block contents %}
{% trans comment_author=form.comment.author|e %} Do you really want to delete the comment by {{ comment_author }}? {% endtrans %}


Package org.drip.function.rdtor1
Interface ConvexMultivariate
- All Known Implementing Classes:
AffineBoundMultivariate
,AffineMultivariate
public interface ConvexMultivariate
ConvexMultivariate is a Shell Interface that "typifies" a Convex Rd To R1.
The References are:
- Boyd, S., and L. van den Berghe (2009): Convex Optimization Cambridge University Press Cambridge UK
- Eustaquio, R., E. Karas, and A. Ribeiro (2008): Constraint Qualification for Nonlinear Programming Federal University of Parana
- Karush, A. (1939): Minima of Functions of Several Variables with Inequalities as Side Constraints University of Chicago Chicago IL
- Kuhn, H. W., and A. W. Tucker (1951): Nonlinear Programming Proceedings of the Second Berkeley Symposium University of California Berkeley CA 481-492
- Ruszczynski, A. (2006): Nonlinear Optimization Princeton University Press Princeton NJ
- Module = Computational Core Module
- Library = Numerical Analysis Library
- Project = Rd To Rd Function Analysis
- Package = Built-in Rd To R1 Functions
- Author:
- Lakshmi Krishnamurthy


Set an alarm that wakes you up with beautiful colors.


Top interesting
Unied colors of Benninton
$39.00
New
Unied colors of Benninton
$79.00
$39.00
Unied colors of Benninton
$39.00
Sale
Unied colors of Benninton
$79.00
$39.00
New
Unied colors of Benninton
$39.00


{% extends "email/email_base.html" %} {% block content%} Hi, An event has been created. {{ event.title }} Start Date: {{ event.start_date }} End Date: {{ event.end_date }} {{ event.description }} Please visit this url for reviewing. {% endblock %}


Vegan Sources
Vegan foods are undeniably consumed by everybody,hence it wouldn't be fare to leave them whole out of discussion. Hence, here are the list of items you can add to your daily routine:1.Paneer (Indian homemade)
Macros:
Protein: 21.2g Fat: 28.2gThe whole fat content is saturated so moderation is prefered. One essential fact about fats eating is that it becomes a component of ketonic diet which is very good one
It can be included in diet as:
- Firstly you can have it directly raw with some lemon and little spice of the choice
- you can also include as paneer sandwichs but still care for the stuff you use.
- You can have roasted paneer but customise it (dont use butter or oil). For more methods refer: here
PRECAUTION:Never consume paneer and curd together it is not safe for all to eat.
2.Legumes(dals)
They are the most famous sources of protein in Indian diet.All the legumes are very good source of protein,along with these they have other vitamins (especially vitamin C) also which serve as Natural Fat Cutter.
Macros:
Protein: 29-36%, Fat: 3-5%, Carbs: 68 %(majority is fibre)-
I don't really think I need to tell this one but still:
- No. 1 is the traditional way it is prepared but you can improvise it like consume only boiled ones and no ghee like stuff
- You can also have it after being soaked for overnight with some lemon,chopped vegies of the choice.
- basically you can have these in any form which do not include deep frying in the process.
- Personally my favourite is in form of besan(Laddu,Stuffed rotti).
For more recipes
3.Chickpeas(Kala Chana and White Chana)
It is also amongst the best source of protein.Some might say that it has a lot of carbs also but almost one third is the dietry fiber which is very good for boul motion(better digestion of the food).
Macros:
Protein: 9g, Fat: 2.6g, Carbs: 27g(8g is fibre)both of these should be included in diet for weight loss.Include these as:
- black chana as well as white ones can be consumed boiled form along with some green vegies and sauce(basically its a chat and I believe everybody loves this)
- black ones can be consumed in roasted form also
- use black ones in powdered form in making shakes(to know recipes for some good protein shakes click here)
- Both of these prepared in traditional way also serve as a good source
Moreover, any dish is one or the same so it's upto.
4.Soya Products(soy paneer and soya chunks)
Needless to say why it is here.Nearly 40% of protein in almost every product. But the problem is it raise estrogen level which is NOT good.
Macros:
Protein: 38%, Fat: 18%, Carbs: 30%(14% is fibre)So high care is to be taken in its consumption amounts( once or twice a week is what I use to have)
the ways to include this item in your diet are:
- Soy paneer can be eaten as such in raw form as usual one.
- Soyabeans can be taken as cooked vegetable
- Soy milk is also a form of soy product prefer as pure as you can get from the superstores.
5.Nuts(Dry fruits)
Nuts are a very good source of protein with high percentage of protein roughly 17%.Here also some might say it has lot of fat also but that is all good fat omega fat 3 which is very good for hormonal balance in the body
moreover even other fats are also essential but in very little amounts for the production of various hormones in the body in the body.
These constituete a major part in Indian diet various Nuts can be included in diet like:
Almonds:
One can have them directly but in winters only and that too in limited quantity like 10-20 a day.
Macros:
Protein: 21.3g Fat: 56.7g (Ahh,No worry its all omega-3 fat), Carbs: 6g27g(8g is fibre)- Add them to various dishes like oats,sweet dish, flakes etc.
- Using them in various protein shakes
- Who doesn't love Badam Shake,chilling tasty drink in summers
- Almond Butter(Badam Rogan) is also a very good option to use
Peanuts:
Macros:
Protein: 25.8g(per 100gm) Fat: 48.24g, Carbs: 16.13gmThese are amongst the most affordable dry fruits of all.Loaded of protein and good fats.They cost roughly 100rs per Kg and can be consumed at any time of the day just grab some in your pocket.One altenative to this is Peanut butter and is easily available in the Indian Markets.
One alternative or may be a companion to this is peanut butter.But only problem is it tastes yuck!! So flavoured one can also be used not a big deal.
Walnuts:
Walnuts are considered very good for the brains.Strict moderation is advised in its consumption as they produce lot of heat in the body.
Macros:
Protein: 9%, Fat: 84%, Carbs: 8%As such No dry fruit is harmful to the body but consume in correct proportions
Coming to the method to eat basically all nuts come under the same tree.
6.Dairy and Related Products:
For those who are not lactose intolerant milk is on of the best source of protein with approx 25% protein content Milk is such a common thing in life that it can be included in many no. of ways but still the TIMING is the important part like:
Milk
Macros:
Protein: 15.5g(per 500ml), Fat: 7.5gm, Carbs: 8gm
Loaded with all types of proteins,carbs,fats,vitamins and minerals it is often referred as a complete food.But to have its benefits to the fullest care has to taken for its timing like:- For those who wanna drink it in morning but not that heavy whole milk but the lighter form of it
- The one aiming for the should have it at night.Besides helping in weight loss it also has some other benefits like better sleeping cycles,relaxation of muscles. you can directly consume it or by making some smoothies or shakes(to know my personal favourite Click Here
- Switch from fat to fat-free milk type.
- Make Cheese, yogurt, pancakes and what not.
Curd:
Macros:
Protein: 9g, Fat: 2.6g, Carbs: 27g(8g is fibre)
Who does not love curd ?? Probably hard to find one.It is the one of the best thing milk product.It is great probiotic which makes it good for your gut,also has a moisturizing effect and what not.Better not to use salt or spices in it as it kills all the usefull bacteria in it.you can also have yogurt instead of curd,just use yeast(or Khamir as called in India)and you get even better version of the curd.
- For those who wanna drink it in morning but not that heavy whole milk but the lighter form of it
7.Whey Protein:
Macros:
Protein: 25gm, Fat: 0.5gm, Carbs: 2gmIf you ever have a GYM going friend, then definately heard of this.It is most proteinious(I made that word up!!) thing ever.Totally whey protein for pure mass gain and weight loss. It is natural ,and extracted from milk during the cheese extraction (water left is whey+carbs).
Only thing is how to consume it.So here are the ways:
- Use it in protein shakes (1(30gm) scoop makes almost 30% daily intake)
- Use it in dishes like cakes,protin bars,and other smoothies


This gateway is used for the Clickatell HTTP interface.
This interface requires the following settings in SMSServer's configuration file:
| Option | Description |
| api_id | Clickatell API ID. |
| username | Clickatell Username. |
| password | Clickatell Password. |
| secure | If set to yes, the gateway will use a secure (https) connection. |
| outbound | yes if the gateway should be treaded as an outbound gateway, otherwise no. |
Example:
gateway.0=myClickatell, ClickatellHttp
myClickatell.api_id=1234
myClickatell.username=username
myClickatell.password=password
myClickatell.secure=no
myClickatell.outbound=yes


First name is required.
Last name is required.
Role is required.
Email is required.
Enter valid email


We are deeply committed to serving our student community and helping other young professionals navigate their career development.
As an umbrella organization for 16 other undergraduate business groups,
we work year-round to link students with opportunities to explore different career paths and grow as future business leaders.


| DOSE: |
|
oral |
4-Acetoxy-MiPT |
(powder / crystals) |
This will be a very short report, but I wanted to share the experience.
October 2003
An unknown, but small amount of 4-acetoxy-
N-methyl-
N-isopropyltryptamine hcl
I was transferring some 4-AcO-MiPT sent to me from the baggie it came in, to a glass vial for long-term storage. This material was sticky and very difficult to handle. It kept sticking to the razor and my small spatula that I use to handle and transfer powders, so I licked what I could not get into the vial off of the spatula and the corners of the bag it came in. I also licked a bit off the razor after I managed to get most of the rest into the vial. I know, I know…not the wisest thing to do. But I didn't think such a small amount would do anything. I'd say I took no more than 8mg based on what the 4-AcO-DET freebase goo looks like that I’ve worked with in the past. They seemed to be of similar density.
As said, I didn't think anything would happen. And I went about recording an acoustic guitar part on a song that I had been working on. Then about forty-five minutes later I suddenly reached a very, very mild plus-two after having forgotten I even took something. Obviously, this material had a very smooth onset. At least at the dosage I took. It was enough to notice incredible color enhancement, mild trails, a great tryptamine body-high, some visual movement, some CEVs, but most importantly...an incredible state of introspection and wonderment about everything.
After an hour or so, I smoked a bowl of cannabis and then hopped on my bike to get a good view of the mountains. And that view was simply overwhelming! My mind was incredibly active and imaginative. Colors were so intense. With the sun was setting overhead, I felt as if I were in a painting. Very dream-like at times. This material filled me with a great sense of happiness that lasted the entire ride home, and even the rest of the evening.
After some four-hours or so of effects, the pleasant entheogenic state quickly faded into a warm afterglow. By bedtime, no residue remained and sleep was easy. Easy on, and easy off. I was left in a state of intrigue over this chemical. It seemed to be excellent material, and I was curious how a full dose would compare to my favorite orally-consumed tryptamines, which are psilocybin and iprocin.
Conclusion…
This feels like it has the makings of a great entheogenic tryptamine. No GI problems or other negative body-effects previously noted with a few other synthetic tryptamines I’ve tried. I recall a feeling of being chilled during the onset, but it wasn’t really very annoying. While the mental effects were relatively mild, and I got no higher than a gentle plus-two…there was a lot of 'content' for such a tiny dose. I feel confident 4-AcO-MiPT will be a winner, even after trying it only once at a low level.
I look forward to dosing a known amount of 4-AcO-MiPT sometime this summer. I also look forward to experiments with its free phenol, miprocin (4-Ho-MiPT.) Both molecules seem to have much promise.
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.


Recipe 12.10. Merging Continuous Text Events with a SAX FilterCredit: Uche Ogbuji, James Kew, Peter Cogolo ProblemA SAX parser can report contiguous text using multiple characters events (meaning, in practice, multiple calls to the characters method), and this multiplicity of events for a single text string may give problems to SAX handlers. You want to insert a filter into the SAX handler chain to ensure that each text node in the document is reported as a single SAX characters event (meaning, in practice, that it calls character just once). SolutionModule xml.sax.saxutils in the standard Python library includes a class XMLFilterBase that we can subclass to implement any XML filter we may need: from xml.sax.saxutils import XMLFilterBase class text_normalize_filter(XMLFilterBase): """ SAX filter to ensure that contiguous text nodes are merged into one """ def _ _init_ _(self, upstream, downstream): XMLFilterBase._ _init_ _(self, upstream) self._downstream = downstream self._accumulator = [ ] def _complete_text_node(self): if self._accumulator: self._downstream.characters(''.join(self._accumulator)) self._accumulator = [ ] def characters(self, text): self._accumulator.append(text) def ignorableWhitespace(self, ws): self._accumulator.append(text) def _wrap_complete(method_name): def method(self, *a, **k): self._complete_text_node( ) getattr(self._downstream, method_name)(*a, **k) # 2.4 only: method._ _name_ _ = method_name setattr(text_normalize_filter, method_name, method) for n in '''startElement startElementNS endElement endElementNS processingInstruction comment'''.split( ): _wrap_complete(n) if _ _name_ _ == "_ _main_ _": import sys from xml import sax from xml.sax.saxutils import XMLGenerator parser = sax.make_parser( ) # XMLGenerator is a special predefined SAX handler that merely writes # SAX events back into an XML document downstream_handler = XMLGenerator( ) # upstream, the parser; downstream, the next handler in the chain filter_handler = text_normalize_filter(parser, downstream_handler) # The SAX filter base is designed so that the filter takes on much of the # interface of the parser itself, including the "parse" method filter_handler.parse(sys.argv[1]) DiscussionA SAX parser can report contiguous text using multiple characters events (meaning, in practice, multiple calls to the characters method of the downstream handler). In other words, given an XML document whose content is 'abc', the text could technically be reported as up to three character events: one for the 'a' character, one for the 'b', and a third for the 'c'. Such an extreme case of "fragmentation" of a text string into multiple events is unlikely in real life, but it is not impossible. A typical reason that might cause a parser to report text nodes a bit at a time would be buffering of the XML input source. Most low-level parsers use a buffer of a certain number of characters that are read and parsed at a time. If a text node straddles such a buffer boundary, many parsers will just wrap up the current text event and start a new one to send characters from the next buffer. If you don't account for this behavior in your SAX handlers, you may run into very obscure and hard-to-reproduce bugs. Even if the parser you usually use does combine text nodes for you, you never know when you may want to run your code in a situation where a different parser is selected. You'd need to write logic to accommodate the possibility, which can be rather cumbersome when mixed into typical SAX-style state machine logic. The class text_normalize_filter presented in this recipe ensures that all text events are reported to downstream SAX handlers in the contiguous manner that most developers would expect. In this recipe's example case, the filter would consolidate the three characters events into a single one for the entire text node 'abc'.
Python's XMLGenerator does not do anything with processing instructions, so, if you run the main code presented in this recipe on an XML document that uses them, you'll have a gap in the output, along with other minor deviations between input and output. Comments are similar but worse, because XMLFilterBase does not even filter them; if you do need to get comments, your test_normalize_filter class must multiply inherit from xml.sax.saxlib.LexicalHandler, as well as from xml.sax.saxutils.XMLFilterBase, and it must override the parse method as follows: def parse(self, source): # force connection of self as the lexical handler self._parent.setProperty(property_lexical_handler, self) # Delegate to XMLFilterBase for the rest XMLFilterBase.parse(self, source) This code is hairy enough, using the "internal" attribute self._parent, and the need to deal properly with XML comments is rare enough, to make this addition somewhat doubtful, which is why it is not part of this recipe's Solution. If you need ease of chaining to other filters, you may prefer not to take both upstream and downstream parameters in _ _init_ _. In this case, keep the same signature as XMLFilterBase._ _init_ _: def _ _init_ _(self, parent): XMLFilterBase._ _init_ _(self, parent) self._accumulator = [ ] and change the _wrap_complete factory function so that the wrapper, rather than calling methods on the downstream handler directly, delegates to the default implementations in XMLFilterBase, which in turn call out to handlers that have been set on the filter with such methods as setContentHandler and the like: def _wrap_complete(method_name): def method(self, *a, **k): self._complete_text_node( ) getattr(XMLFilterBase, method_name)(self, *a, **k) # 2.4 only: method._ _name_ _ = method_name setattr(text_normalize_filter, method_name, method) This is slightly less convenient for the typical simple case, but it pays back this inconvenience by letting you easily chain filters: parser = sax.make_parser( ) filtered_parser = text_normalise_filter(some_other_filter(parser)) as well as letting you use a filter in contexts that call the parse method on your behalf: doc = xml.dom.minidom.parse(input_file, parser=filtered_parser) See AlsoLibrary Reference and Python in a Nutshell document the built-in XML support in the Python Standard Library. |


Home and End key modifier for Panic's Nova editor.
Changes the Home and End keys so they can navigate and select text along a single line instead of the top and bottom of a file.


The alignment between business needs and technology is a critical success factor, as most organisations face problems with programs and projects not caused by poor implementation, but by ineffective business or IT processes. That is where our business analysts can help, as we have the experience, knowledge and proven methodologies to promote this alignment and ensure IT teams deliver what brings value to your business.
We help you build bridges between Business and IT with a tailored demand management process. Our methodology promotes the collaboration from all areas of your organisation, since everyone is able to express a business need and request a solution for it. All requests will then be prioritised, analysed and delivered, focusing always on your company's overall vision and strategy.
We help you put into practice a demand management methodology by leveraging internal procedures and policies you already have and making sure it will be measurable, efficient and beneficial to all users. If you use Salesforce, we can implement our demand management tool in your instance, so that no idea is lost and your business needs are clear and structured for everyone.
When there are many different and conflicting needs, it is difficult to understand where to focus your resources. We can help you define a prioritisation framework that guarantees your stakeholders understand the decisions, the criteria behind it and, more importantly, that they work towards providing the relevant information to decide which ideas will have the biggest ROI.
As no process remains efficient, we found a way to adapt the known Lean methodology, used in the manufacturing industries, to IT and process analysis. The results are impressive and it works particularly well with an Agile delivery approach and a tool like Salesforce, enabling to constantly measure efficiency and remove waste.
“Don't jump to conclusions” can also be rephrased to “Don't jump to implementation”. Understand your needs first, your pain points, your biggest opportunities to grow, the “Why” and the “What” before the “How”. You share with us your vision and business goals, and our certified business analysts will help you understand how you can do more and better with less.
We can help you pin point your business problems and opportunities and come up with a strategy to enhance your current business state. This phase is crucial to make sure there is sound motivation and the expected outcomes will benefit your organisation.
We do not assume. We apply our joint knowledge and engage to gather all the relevant inputs. We then use all business analysis tools available to provide you with the solution that will achieve or exceed your expected business results.
Business analysis ultimate goal is not a set of nicely documented business requirements. We monitor implementation and evaluate if it is delivering business benefits as a result. When a problem arises, our tools enable a quick trace back to its origin, making it easier to solve.
Business transformation is a vital and constant activity that organisations entail to grow, lead, remain competitive and stay ahead of their customers, employees and shareholders expectations. While simplification is at the heart of any transformation initiative, the increasing number of internal and external stakeholders to manage, with cross-functional responsibilities and goals makes it hard. We help you bring clarity of your current business state, project the future and revisit your business processes in light of the new business models and technology options available.
When starting a transformation journey, you need to know where to go and where you are coming from. We develop a baseline view of the current state, define the journey together, and identify metrics to correlate and compare to where you are now to see what success looks like.
Organisations define processes and procedures that are often rigid and ingrained into people's lives and systems features, making it hard to change. We unlock the power of technology to automate your business processes, and help you re-engineer them to continuously evolve and embrace change.
There are many interdependencies between business areas in an organisation and, although they share business goals, they may have conflicts when interacting with each other. We help you design cross-functional processes that improve the end-to-end outcome, optimizing collaboration.
Our projects aim at providing solutions that enhance and improve your business processes, cross-team collaboration, and overall results.
Before any implementation we ask you to help us understand your business, your organisation's purpose and most importantly what is your vision and strategy for the future. We make sure our projects are aligned with your goals and success metrics to take you where you want to go.
With the context of your business, we start gathering and clarifying requirements with inputs received from multiple channels to get a complete view of your processes and needs. Every piece of analysis is documented and validated before it is ready to be handed over to the technical teams.
Our business analysts are part of the delivery teams, acting as business proxies and facilitators. They control and monitor the implementation to ensure it is delivered to expectations. At the end of each deliverable, the KPIs set to be achieved are measured to ensure everyone is on track to exceed expectations and adjust where necessary.
A project has a beginning and an end, but not your organisational needs. During the project we configure our business and IT demand tool, through which you can share and prioritise your new needs, ideas and change requests for future enhancements. This process aligns your business and IT teams around a single product backlog.
As companies grow, processes may not formally exist or may be created on top of other processes by different people, leading to non-efficient ways of working. Our team of certified Business Analysts (IIBA-CBAP, PMI-PBA) is able to manage both the process and business analysis methodologies and tools required to generate the value your business is seeking. Therefore, by doing a project with us you can expect:
High levels of stakeholder engagement and contribution.
Clear, meaningful, prioritized and value-generating requirements.
The implementation of processes and tools to tackle future challenges.
Higher return on investment and end-customer satisfaction.
Suspendisse erat metus, rutrum at lobortis a, fringilla nec nunc. Duis quis metus condimentum, rhoncus ante a, pellentesque diam.
start a project with us!


The result reports generated are accurate and with the aim of confidence score as high as possible.
Available on all Android, Windows, OS X and other platforms
User account and details are secured and well-protected.
Users can either insert patient details in the form of text input or upload an image.
Easy to use and view results by users.
Serves as a double verfication/check application for medical professionals.
Lead Designer
Lead Deep Learning Expert and Web Developer
Deep Learning Expert
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut eaque, laboriosam veritatis, quos non quis ad perspiciatis, totam corporis ea, alias ut unde.


Contents:
This class represents an experiment with an arbritary number of models.
Creates a new entitiy. If _id is provided, an already existing remote entity is fetched, otherwise a new one is created.
| Parameters: |
|
|---|
Creates a new model.
| Parameters: | _id – if given, attempts to fetch an already existing model. |
|---|
This class abstracts the models an experiment has.
Returns new Model instance.
| Parameters: |
|
|---|
Adds data point of a measurement with respect to a metric to the model.
| Parameters: |
|
|---|
This class provides the basis for every remote entity. The resource simply specifies its attributes and path, as well as provides setters for the attributes.
It might also provide custom methods as well as a custom initiator. It is mandatory that the inheriting entity calls this class’s init method as well:
ApiBase.__init__(self, api_base, _id=_id)
Checks the API version to guarantee compatibility.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | from pypythia import Experiment
# init experiment
# implies that an instance of Pythia is listening on localhost
exp = Experiment('http://localhost:5667/api/v1/')
exp.name = "some catchy name"
exp.description = "describe the experiment here"
# create a model
model = exp.create_model()
model.name = "2 layers foo bar dropout softmax"
for i in range(NUM_EPOCHS):
for j in range(NUM_EXAMPLES):
# the following two lines are not really valid
train_classifier()
train_accuracy = accuracy(classifier)
# save the measured training accuracy
model.add_measurement(name='train_accuracy',
value=train_accuracy,
step=j,
epoch=i)
|


PLANET SICK-BOY: http://www.sick-boy.com "We Put the SIN in Cinema"
Nobody has ever made a feature-length film based on a Dr. Seuss book, and you'd better believe that nobody has ever been crazy enough to attempt a live-action version of the good doctor's stories. The reason for this becomes painfully evident almost immediately in How the Grinch Stole Christmas. The sets are horrendously cheap-looking. It seems as though the filmmakers were going for a Willy Wonka & the Chocolate Factory effect, but the overall gaudiness of everything smacks of the last two Batman films. And the fact that it took over $120 million to make a film based on a 70-page book is a little alarming as well.
Luckily, Jim Carrey is a strong enough star to overcome the rest of this mess. The Grinch, based on Seuss' 1957 children's classic, will probably be a big commercial hit no matter what any critics think.  At the end of the book, The Grinch sheepishly admits `maybe Christmas doesn't come from a store,' but they're the only place you'll be able to get your official Grinch merchandise.
Carrey (Me, Myself & Irene) stars as the titular Grinch, a green-fur- covered, onion-eating creep with a heart two sizes too small. He lives on the mountain peak that overlooks Whoville, a town full of cheerful people known as Whos (they're all pretty freaky looking in the face, hair and teeth departments). Whoville loves Christmas, as evidenced by its residents shopping up a storm in the film's opening scene. For the holiday, Whoville celebrates something called a Who-biliation, and this year marks the festival's 100th anniversary.
We learn the origin of The Grinch – a funny tale added here to pad the film's running time - but the film's main focus is on the relationship between the cold-hearted Grinch and precocious little Cindy Lou-Who (Taylor Momsen). She seems to be the only person in Who-ville interested in giving the green grump another chance at redeeming his social status in town. Despite the girl's good intentions, The Grinch still raids the town on Christmas Eve, absconding with everything related to the holiday and hauling it up to the top of his mountain.
The Grinch started to get on my nerves after about 30 minutes, but then Carrey's screen time was increased, which jump-started my interest in the film. He really saves the movie when it starts to slip off the tracks. That said, Carrey's rendition of Burl Ives' `You're a Mean One, Mr. Grinch' is a disaster, but the montage of him creating various evil devices are pretty cool despite the song. Momsen's gut-wrenching rendition of the James Horner (Titanic) penned `Christmas, Why Can't I Find You,' is much more enjoyable. The film is at its best when it sticks to the book's original narrative, provided here by Sir Anthony Hopkins (M:I-2).
Although he didn't seem to affect many of the kids at my screening of the film, this Grinch would have scared the crap out of me if I were a little kid (my fear of the Hamburglar almost turned me into a child vegetarian). When was the last time you took your kids to a movie that featured a $20 million star wearing a big, furry codpiece? Plus, The Grinch has piercing yellow eyes (so help me, God, yellow eyes). Anybody who knows anything about decent Christmas films knows this is the sign of pure anti-holiday evil (see A Christmas Story – a real holiday classic).
Like Battlefield Earth, there aren't many shots in The Grinch that aren't off-kilter. The effect is annoying, and makes it look like director Ron Howard (Edtv) and crew were filming during an avalanche. Howard predominately uses the same production team he's worked with on his previous films, but he's never made a picture quite like The Grinch before. The sets looked like they'd collapse under the weight of a wee kitten.
For some reason, Audrey Geisel (Seuss' widow) gave Howard and his production company the okay to make the film after years and years of rebuffing Hollywood's attempt to make her husband's story into a feature-length film (he, apparently, was pleased enough with the cartoon version). Geisel was able to finagle veto power over the film, putting the kibosh on several jokes she referred to as `bathroom humor' (despite signing off on the casting of Carrey) and a scene that sounded pretty anti-Semitic (it involved the Who-Steins…seriously). The offensive material comes from the odious duo of Jeffrey Price and Peter S. Seaman (Wild Wild West).
1:45 – PG for some crude humor
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


--- layout: work title: Smart IT ---
2014-2016
Smart IT is a rethinking of the IT Service Desk. Smart IT helps IT agents—working from an office or on the go—determine the problem a customer is having, research knowledge articles to figure out a fix, and address the issue quickly and accurately.
MY ROLES
Interaction Design, User Research, Prototyping, Product Strategy
COMPANY
BMC
Six months into my time at BMC, I was asked to be part of a vision project to learn about the current state of the art in the IT Service Management (ITSM) industry. BMC had a dominant product, Remedy, that had fallen out of favor due to dwindling innovation and dreadful user experiences.
Out in the field, we discovered teams of IT agents fighting with their tools. Remedy and competing products were seen more of hindrances than assistive tools. Agents—people who had gone into IT to help people solve problems—were constantly distracted from their work by clunky and slow interfaces. Post-it notes with reminders and gotchas were pasted around the bezels of monitors. Binders filled with training materials were piled up on desks, never to be touched by time-strapped agents. And most revealing of all, many agents would start by typing details of customers’ issues on Notepad, only to go to Remedy and log tickets about the work at the very end of the process. Clearly, there were many opportunities for improvement.
We conducted several weeks of contextual inquiries with large and small customers. From this work, we developed three main Service Desk personas as the targets for the first phase of whatever this project would become.
Based on our user research, we also started to see some recurring themes and pain points emerge. Through a series of design workshops, we synthesized these into six design principles.
Contextual: Instead of requiring agents to spend time researching the customer's past history, the system should draw from a rich database and surface contextually relevant information.
Proactive: Instead of depending on direct actions of agents for every issue, the system should provide automations that can take action on behalf of the Service Desk to fix common issues Before they are even reported.
Insightful: Instead of requiring staff to sift through mountains of tickets and data in “free time,” the system should recognize recurring types of issues and provide options for dealing with common known issues based on past successes.
Flexible: Instead of forcing agents to connect using laptops or desktop computers, the system should work across devices and provide mobile solutions for agents on-the-go.
Connected: The system should encourage natural collaborations between Service Desk agents so that they can help one another and inform each other when they need help.
Rewarding: The system should encourage agents to use it through the conveniences of modern user experiences and allow them to build skills profiles that tie into career development goals.
Before & After
Seeing agents type basic information about their customers and their IT issues and later copy all of that into Remedy tickets made it clear that there could be a better solution. ITSM tools are usually form-based, meaning that agents need to match up their thought processes with a rigid series of ticket fields. This process usually led to incomplete or inaccurate inputs and increased the time to resolve issues.
What if agents could just describe the issue and never have to worry about filing tickets? This premise stuck with me and later became the driving spark behind Smart Recorder, an assistive interface that surfaces contextual information about the customer’s past tickets, provides access to knowledge resources from the same screen, and even suggests courses of action for expediently addressing the issue.
Bringing all of this functionality into a simple experience took many iterations to get right. The customer needed to be identified in order to seed all search results, so I designed a flow that first required the customer to be found via search. Another issue was the layout—while we started with a two-column design, this raised many interaction issues and required the agent to toggle between multiple layers. I worked with our engineering team to prototype a new design with three main sections, which ultimately stuck through to the shipping feature.
The customer is first identified via a flexible search of name or email address. Once the customer is identified, his or her contact information, IT assets, and past issue history are displayed below.
Knowledge resources are surfaced based on what the agent has typed into the notepad field. When an article is clicked, the screen slides over to show an inline preview.
Before & After
Despite the limited amount of time for this early design work—just a few weeks’ time—we poured through mountains of ideas for how to present and display ticket information.
A desire to show the chronological history of a ticket morphed into the Activity Stream, a fundamental piece of all tickets that resides in the right column of the layout. Resources were another big part of the product vision, providing the ability to "pin" helpful knowledge articles and similar issue tickets to an incident so that they could be pulled up later, all without having to spawn a popup window or dialog box.
Before & After
We tested multiple concepts for what to show to agents when they first entered Smart IT. Traditionally, ITSM tools would show some kind of dashboard of meaningless charts intended more for executives than the Service Desk. I saw an opportunity to deliver workspaces and tools for each distinct persona, so that a Level 1 Service Agent would see different things from a Field Technician who is always on-the-go. Over time, we whittled the design down to a series of sections to show the health of the Service Desk.
At its height, the Smart IT team included our small design team and over 40 others—product managers, architects, developers, QA engineers, and documentation authors. We had about a month of lead time before R&D began their work implementing our designs.
To better facilitate working together, I pushed for a regular cadence of UX shareout meetings and a collaborative attitude towards the rest of the team. I scheduled working sessions between our designers, architects, product managers, and UI developer leads. These became a hallmark of the Smart IT design and development process.
At the beginning of the project, we settled on using a UX spec document to share annotated mockups, icon libraries, and the design principles. This morphed into a gigantic, 500-page tome that quickly fell out of date. Frustrated by this process, I eventually moved the team over to using Sketch and InVision to share interactive prototypes for each Smart IT user story. This was a significant process improvement that later moved across to other BMC projects.
The development process for Smart IT 1.0 was less than six months. During that time, we designed the experiences for Web browsers, iPads, and Android tablets. The product managers pushed off the translation to smartphones to a subsequent release.
Benchmark testing conducted with the GA version of Smart IT 1.0 showed that when compared side-by-side with the legacy Remedy Incident Management UI, there was a significant decrease in the Mean Time Call Resolution. In the observed cases, Smart IT users were on average 79 seconds faster resolving calls, resulting in a 75% increase in productivity.
At BMC Engage in the fall of 2014, BMC officially launched Smart IT 1.0. The response to the product rollout was overwhelming, with many customers describing their excitement with the "new" BMC and the transformed Service Desk enabled by Smart IT. Smart IT continues to be a flagship offering from BMC and has become the cornerstone of the Remedy 9.0 ITSM suite of products.
-- Smart IT Early Adopter at a Fortune 500 Customer
-- Gartner ITSSM Magic Quadrant, 2015


Why you would use this application
The BC Services Card Self Service application enables you as team member of a BPS agency to have an easy -access point into deploying the BC Services Card as an authentication credential for the your BPS' web application.
We use a two-stepped approach where BPS teams can prototype an integration in our test environment, using fictitious BC Services Card data as a test and, when they are ready for production (go live), prepare and submit their materials to integrate the production BC Services Card system. Please use the Self Assessment below to see if this is a fit for your organization.
Self Assessment:
Are you:
looking to provide high identity assurance the BC Services Card provides for your?
an employee in one of the British Columbia’s Broader Public Sector agencies?
part of an identity and authentication services team with experience in Open ID Connect (OIDC) Protocols
If you’ve answered yes to all the questions, we look forward to working with you. Let’s get started.
If you answered, “no” to any of the questions above, we recommend requesting a consultation through our contact us page. to initiate a conversation around your identity and authentication needs .


|
Files | |
| file | LEGOTMP-driver.h |
RobotC New Temperature Sensor Driver. | |
Defines | |
| #define | LEGOTMP_I2C_ADDR 0x98 |
| #define | LEGOTMP_TEMP 0x00 |
| #define | LEGOTMP_CONFIG 0x01 |
Enumerations | |
| enum | tLEGOTMPAccuracy { A_MIN = 8, A_MEAN1 = 4, A_MEAN2 = 2, A_MAX = 1 } |
Functions | |
| bool | LEGOTMPreadTemp (tSensors link, float &temp) |
| bool | LEGOTMPreadAccuracy (tSensors link, tLEGOTMPAccuracy &accuracy) |
| bool | LEGOTMPsetAccuracy (tSensors link, tLEGOTMPAccuracy accuracy) |
| bool | LEGOTMPsetSingleShot (tSensors link) |
| bool | LEGOTMPsetContinuous (tSensors link) |
| bool | _LEGOTMPreadConfig (tSensors link, ubyte &config) |
| tLEGOTMPAccuracy | _LEGOTMPconvertAccuracy (ubyte config) |
| bool | _LEGOTMPsetConfig (tSensors link, ubyte &config) |
Variables | |
| tByteArray | LEGOTMP_I2CRequest |
| tByteArray | LEGOTMP_I2CReply |
Temperature Sensor
| #define LEGOTMP_CONFIG 0x01 |
Configuration registry (see http://focus.ti.com/lit/ds/symlink/tmp275.pdf)
Definition at line 51 of file LEGOTMP-driver.h.
| #define LEGOTMP_I2C_ADDR 0x98 |
New LEGO Temperature Sensor I2C device address
Definition at line 49 of file LEGOTMP-driver.h.
| #define LEGOTMP_TEMP 0x00 |
Temperature value (return on 2 bytes, 1rst : most significant byte, 2nd byte only half used)
Definition at line 50 of file LEGOTMP-driver.h.
| enum tLEGOTMPAccuracy |
< Command modes definition
Definition at line 57 of file LEGOTMP-driver.h.
| tLEGOTMPAccuracy _LEGOTMPconvertAccuracy | ( | ubyte | config ) |
Retrieve the accuracy level from the config bytes
Note: this is an internal function and should not be called directly.
| config | the contents of the register |
Definition at line 137 of file LEGOTMP-driver.h.
| bool _LEGOTMPreadConfig | ( | tSensors | link, |
| ubyte & | config | ||
| ) |
Read the current configuration register
Note: this is an internal function and should not be called directly.
| link | the LEGO Temp Sensor port number |
| config | the contents of the register |
Definition at line 91 of file LEGOTMP-driver.h.
| bool _LEGOTMPsetConfig | ( | tSensors | link, |
| ubyte & | config | ||
| ) |
Set the configuration register
Note: this is an internal function and should not be called directly.
| link | the LEGO Temp Sensor port number |
| config | the contents of the register |
Definition at line 118 of file LEGOTMP-driver.h.
| bool LEGOTMPreadAccuracy | ( | tSensors | link, |
| tLEGOTMPAccuracy & | accuracy | ||
| ) |
Read the temperature sensor's accuracy
| link | the LEGO Temp Sensor port number, |
| accuracy | the accuracy value to be read |
Definition at line 262 of file LEGOTMP-driver.h.
| bool LEGOTMPreadTemp | ( | tSensors | link, |
| float & | temp | ||
| ) |
Read the temperature.
| link | the LEGO Temp Sensor port number |
| temp | the temperature value, |
128 to have only the most significant bit (9 bits accuracy - 8 (b1) = 1 bit to keep)
64 to have only the 2 most significant bits
32 to have only the 3 most significant bits
16 to have only the 4 most significant bits
Definition at line 175 of file LEGOTMP-driver.h.
| bool LEGOTMPsetAccuracy | ( | tSensors | link, |
| tLEGOTMPAccuracy | accuracy | ||
| ) |
Set the temperature sensor's accuracy
| link | the LEGO Temp Sensor port number |
| accuracy | the accuracy value to be set |
Definition at line 281 of file LEGOTMP-driver.h.
| bool LEGOTMPsetContinuous | ( | tSensors | link ) |
Configure the sensor for Continuous mode
| link | the New LEGO Sensor port number |
Definition at line 358 of file LEGOTMP-driver.h.
| bool LEGOTMPsetSingleShot | ( | tSensors | link ) |
Configure the sensor for Single Shot mode
| link | the New LEGO Sensor port number |
Definition at line 329 of file LEGOTMP-driver.h.
Array to hold I2C reply data
Definition at line 78 of file LEGOTMP-driver.h.
Array to hold I2C command data
Definition at line 77 of file LEGOTMP-driver.h.


{% extends "layout_topics.html" %} {% block title %}Topics{% endblock %} {% block before_accordion %}
Textbook (Kenneth Rosen. Discrete Mathematics, 2019) is in ORTUS. See also the Playlist by Kimberly Brehm.


Please call<PHONE_NUMBER> for more information.
Please make sure to arrive 15 minutes before your scheduled appointment time. This gives you time to grab a cup of our amazing coffee while making sure we still have time to gather all the information required for your visit.
Please make sure to bring your identification, insurance cards, and any prior medical records / imaging with you the day of your appointment. The more information we have, the better we will be able to assist in your treatment.
Please call<PHONE_NUMBER> for more information or to schedule an appointment.
Please call<PHONE_NUMBER> for more information.
Resources List
Please call<PHONE_NUMBER> for more information.
Please make sure to arrive 15 minutes before your scheduled appointment time. This gives you time to grab a cup of our amazing coffee while making sure we still have time to gather all the information required for your visit.
Please make sure to bring your identification, insurance cards, and any prior medical records / imaging with you the day of your appointment. The more information we have, the better we will be able to assist in your treatment.