Library MetatheoryAtom
Require Import Coq.Arith.Arith.
Require Import Coq.Arith.Max.
Require Import Coq.Classes.EquivDec.
Require Import Coq.Lists.List.
Require Import Coq.Logic.DecidableTypeEx.
Require Import CoqFSetDecide.
Require Import CoqListFacts.
Require Import FSetExtra.
Require Import FSetWeakNotin.
Require Import LibTactics.
Atoms are structureless objects such that we can always generate
one fresh from a finite collection. Equality on atoms is eq and
decidable. We use Coq's module system to make abstract the
implementation of atoms.
Module Type ATOM.
Parameter atom : Set.
Parameter eq_atom_dec : forall x y : atom, {x = y} + {x <> y}.
Parameter atom_fresh_for_list :
forall (xs : list atom), {x : atom | ~ List.In x xs}.
Hint Resolve eq_atom_dec.
End ATOM.
The implementation of the above interface is hidden for
documentation purposes.
We make atom, eq_atom_dec, and atom_fresh_for_list available
without qualification.
Export AtomImpl.
It is trivial to implement the DecidableType interface with atom.
Module AtomDT <: UsualDecidableType with Definition t := atom.
Definition t := atom.
Definition eq := @eq t.
Definition eq_refl := @refl_equal t.
Definition eq_sym := @sym_eq t.
Definition eq_trans := @trans_eq t.
Definition eq_dec := eq_atom_dec.
End AtomDT.
It is trivial to declare an instance of EqDec for atom.
We use our implementation of atoms to obtain an implementation of
finite sets of atoms. We give the resulting type an intuitive
name, as well as import names of set operations for use within
this library. In order to avoid polluting Coq's namespace, we do
not use Module Export.
Module Import AtomSetImpl : FSetExtra.WSfun AtomDT :=
FSetExtra.Make AtomDT.
Notation atoms :=
AtomSetImpl.t.
The AtomSetDecide module provides the fsetdec tactic for
solving facts about finite sets of atoms.
The AtomSetNotin module provides the destruct_notin and
solve_notin for reasoning about non-membership in finite sets of
atoms, as well as a variety of lemmas about non-membership.
Given the fsetdec tactic, we typically do not need to refer to
specific lemmas about finite sets. However, instantiating
functors from the FSets library makes a number of setoid rewrites
available. These rewrites are crucial to developments since they
allow us to replace a set with an extensionally equal set (see the
Equal relation on finite sets) in propositions about finite
sets.
Module AtomSetFacts := FSetFacts.WFacts_fun AtomDT AtomSetImpl.
Module AtomSetProperties := FSetProperties.WProperties_fun AtomDT AtomSetImpl.
For any given finite set of atoms, we can generate an atom fresh
for it.
gather_atoms_with F returns the union of all the finite sets
F x where x is a variable from the context such that F x
type checks.
Ltac gather_atoms_with F :=
let apply_arg x :=
match type of F with
| _ -> _ -> _ -> _ => constr:(@F _ _ x)
| _ -> _ -> _ => constr:(@F _ x)
| _ -> _ => constr:(@F x)
end in
let rec gather V :=
match goal with
| H : _ |- _ =>
let FH := apply_arg H in
match V with
| context [FH] => fail 1
| _ => gather (union FH V)
end
| _ => V
end in
let L := gather empty in eval simpl in L.
beautify_fset V assumes that V is built as a union of finite
sets and returns the same set cleaned up: empty sets are removed
and items are laid out in a nicely parenthesized way.
Ltac beautify_fset V :=
let rec go Acc E :=
match E with
| union ?E1 ?E2 => let Acc2 := go Acc E2 in go Acc2 E1
| empty => Acc
| ?E1 => match Acc with
| empty => E1
| _ => constr:(union E1 Acc)
end
end
in go empty V.
The tactic pick fresh Y for L takes a finite set of atoms L
and a fresh name Y, and adds to the context an atom with name
Y and a proof that ~ In Y L, i.e., that Y is fresh for L.
The tactic will fail if Y is already declared in the context.
The variant pick fresh Y is similar, except that Y is fresh for "all atoms in the context." This version depends on the tactic gather_atoms, which is responsible for returning the set of "all atoms in the context." By default, it returns the empty set, but users are free (and expected) to redefine it.
The variant pick fresh Y is similar, except that Y is fresh for "all atoms in the context." This version depends on the tactic gather_atoms, which is responsible for returning the set of "all atoms in the context." By default, it returns the empty set, but users are free (and expected) to redefine it.
Ltac gather_atoms :=
constr:empty.
Tactic Notation "pick" "fresh" ident(Y) "for" constr(L) :=
let Fr := fresh "Fr" in
let L := beautify_fset L in
(destruct (atom_fresh L) as [Y Fr]).
Tactic Notation "pick" "fresh" ident(Y) :=
let L := gather_atoms in
pick fresh Y for L.
Ltac pick_fresh y :=
pick fresh y.
Example: We can redefine gather_atoms to return all the
"obvious" atoms in the context using the gather_atoms_with thus
giving us a "useful" version of the "pick fresh" tactic.
Ltac gather_atoms ::=
let A := gather_atoms_with (fun x : atoms => x) in
let B := gather_atoms_with (fun x : atom => singleton x) in
constr:(union A B).
Lemma example_pick_fresh_use : forall (x y z : atom) (L1 L2 L3: atoms), True.
Proof.
intros x y z L1 L2 L3.
pick fresh k.
At this point in the proof, we have a new atom k and a
hypothesis Fr that k is fresh for x, y, z, L1, L2,
and L3.
trivial.
Qed.
This page has been generated by coqdoc


Microsoft Container Registry
Tag Listing
dotnet/framework/samples
- aspnetapp
- aspnetapp-windowsservercore-1709
- aspnetapp-windowsservercore-1803
- aspnetapp-windowsservercore-1903
- aspnetapp-windowsservercore-1909
- aspnetapp-windowsservercore-2004
- aspnetapp-windowsservercore-2009
- aspnetapp-windowsservercore-20H2
- aspnetapp-windowsservercore-ltsc2016
- aspnetapp-windowsservercore-ltsc2019
- aspnetapp-windowsservercore-ltsc2022
- dotnetapp
- dotnetapp-windowsservercore-1709
- dotnetapp-windowsservercore-1803
- dotnetapp-windowsservercore-1903
- dotnetapp-windowsservercore-1909
- dotnetapp-windowsservercore-2004
- dotnetapp-windowsservercore-2009
- dotnetapp-windowsservercore-20H2
- dotnetapp-windowsservercore-ltsc2016
- dotnetapp-windowsservercore-ltsc2019
- dotnetapp-windowsservercore-ltsc2022
- latest
- wcfclient
- wcfclient-windowsservercore-1709
- wcfclient-windowsservercore-1803
- wcfclient-windowsservercore-1903
- wcfclient-windowsservercore-1909
- wcfclient-windowsservercore-2004
- wcfclient-windowsservercore-2009
- wcfclient-windowsservercore-20H2
- wcfclient-windowsservercore-ltsc2016
- wcfclient-windowsservercore-ltsc2019
- wcfclient-windowsservercore-ltsc2022
- wcfservice
- wcfservice-windowsservercore-1709
- wcfservice-windowsservercore-1803
- wcfservice-windowsservercore-1903
- wcfservice-windowsservercore-1909
- wcfservice-windowsservercore-2004
- wcfservice-windowsservercore-2009
- wcfservice-windowsservercore-20H2
- wcfservice-windowsservercore-ltsc2016
- wcfservice-windowsservercore-ltsc2019
- wcfservice-windowsservercore-ltsc2022


The definition of an NVS function table that contains the required set of functions to control a specific NVS driver implementation. More...
#include <NVS.h>
The definition of an NVS function table that contains the required set of functions to control a specific NVS driver implementation.
| NVS_CloseFxn NVS_FxnTable::closeFxn |
Function to close the specified NVS region
| NVS_ControlFxn NVS_FxnTable::controlFxn |
Function to apply control command to the specified NVS region
| NVS_EraseFxn NVS_FxnTable::eraseFxn |
Function to erase a portion of the specified NVS region
| NVS_GetAttrsFxn NVS_FxnTable::getAttrsFxn |
Function to get the NVS device-specific attributes
| NVS_InitFxn NVS_FxnTable::initFxn |
Function to initialize the NVS module
| NVS_LockFxn NVS_FxnTable::lockFxn |
Function to lock the specified NVS flash region
| NVS_OpenFxn NVS_FxnTable::openFxn |
Function to open an NVS region
| NVS_ReadFxn NVS_FxnTable::readFxn |
Function to read from the specified NVS region
| NVS_UnlockFxn NVS_FxnTable::unlockFxn |
Function to unlock the specified NVS flash region
| NVS_WriteFxn NVS_FxnTable::writeFxn |
Function to write to the specified NVS region


Contains functions and constants used in multiple classes.
More...
Contains functions and constants used in multiple classes.
| static float RVO.RVOMath.abs |
( |
Vector2 |
vector | ) |
|
|
inlinestatic |
Computes the length of a specified two-dimensional vector.
- Parameters
-
| vector | The two-dimensional vector whose length is to be computed. |
- Returns
- The length of the two-dimensional vector.
| static float RVO.RVOMath.absSq |
( |
Vector2 |
vector | ) |
|
|
inlinestatic |
Computes the squared length of a specified two-dimensional vector.
- Returns
- The squared length of the two-dimensional vector.
- Parameters
-
| vector | The two-dimensional vector whose squared length is to be computed. |
Computes the normalization of the specified two-dimensional vector.
- Returns
- The normalization of the two-dimensional vector.
- Parameters
-
| vector | The two-dimensional vector whose normalization is to be computed. |
The documentation for this struct was generated from the following file:


The central class in SimpleCV is the Image() class, which wrappers OpenCV’s iplImage (bitmap) and cvMat (matrix) classes and provides basic manipulation functions.
To load an image, specify the file path in the constructor:
my_image = Image("path/to/image.jpg")
To save the image, use the save method. It will automatically use the file you loaded the image from:
my_image.save()
You can also specify a new file to save to, similar to a “Save As...”, and future calls to save() will save to this new file:
my_image.save("path/to/new_image.jpg")
#...do some stuff...
my_image.save() #saves to path/to/new_image.jpg
You can scale images using the “scale” function, so for instance to create a thumbnail. Note that this will distort perspective if you change the width and height ratios:
thumbnail = my_image.scale(90, 90)
You can also look at individual pixels:
r, g, b = my_image[25, 45] #get the color trio for pixel at x = 25, y = 45
If you use python slices, you can extract a portion of the image. This section is returned as an Image object:
my_section = myimage[25:50, 45:70] #grab a 25x25 rectangle starting at x = 25, y = 45
my_section.save("path/to/new_cropped_image.jpg")
You can also assign using direct pixel addressing, and draw on the image using this method:
black = 0.0, 0.0, 0.0 #create a black color tuple
my_image[25,45] = black #set the pixel at x = 25, y = 45 to black
my_image[25:50, 45] = black #draw 1px wide line
my_image[25:50, 45:70] = black #create a 25x25 black rectange starting at x = 25, y = 45
Addressing your [OpenCV supported webcam](http://opencv.willowgarage.com/wiki/Welcome/OS) is extremely easy:
mycam = Camera()
img = mycam.getImage()
If you install the [OpenKinect](http://openkinect.org/wiki/Getting_Started) library and python wrapper, you can use your Xbox Kinect to get a depth map:
k = Kinect()
img = k.getImage() #normal, full color webcam
depth = k.getDepth() #greyscale depth map
###Multiple Cameras And you can even use multiple cameras, at different resolutions:
mylaptopcam = Camera(0, {"width": 640, "height": 480}) #you can also control brightness, hue, gain, etc
myusbcam = Camera(1, {"width": 1280, "height": 720})
mylaptopcam.getImage().save("okaypicture.jpg")
myusbcam.getImage().save("nicepicture.jpg")
You can also initialize VirtualCameras from static data files:
imgcam = VirtualCamera("apples.jpg", "image")
vidcam = VirtualCamera("bananas.mpg", "video")
imgcam.getImage().save("copy_of_apples.jpg")
imgcam.getImage().save("frame_1_of_bananas.jpg")
You can also split channels, if you are interested in only processing a single color:
(red, green, blue) = Camera().getImage().channels()
red.save("redcam.jpg")
green.save("greencam.jpg")
blue.save("bluecam.jpg")
The Image class has a builtin [Histogram](http://en.wikipedia.org/wiki/Image_histogram) function, thanks to [Numpy](http://numpy.scipy.org/). Histograms can show you the distribution of brightness or color in an image:
hist = Camera().getImage().histogram(20)
brightpixels = 0
darkpixels = 0
i = 0
while i < length(hist):
if (i < 10):
darkpixels = darkpixels + hist[i]
else:
brightpixels = brightpixels + hist[i]
i = i + 1
if (brightpixels > darkpixels):
print "your room is bright"
else:
print "your room is dark"
SimpleCV has advanced feature-detection functions, which can let you find different types of features. These are returned in FeatureSets which can be addressed as a group, or filtered:
img = Camera.getImage()
lines = img.findLines()
corners = img.findCorners()
lines.draw((255,0,0)) #outline the line segments in red
corners.draw((0,0,255)) #outline corners detected in blue
left_side_corners = corners.filter(corners.x() < img.width / 2)
#only look at corners on the left half of the image
longest_line = lines.sortLength()[0]
#get the longest line returned
If you load the experimental [cvblob-python](https://github.com/oostendo/cvblob-python) library, you can also use SimpleCV to detect blobs:
#find the green ball
green_channel = Camera().getImage().splitChannels[1]
green_blobs = green_channel.findBlobs()
#blobs are returned in order of area, largest first
print "largest green blob at " + str(green_blobs[0].x) + ", " + str( green_blobs[0].y)
If you load the [python-zxing](https://github.com/oostendo/python-zxing) library, you can use [Zebra Crossing](http://code.google.com/p/zxing) to detect 2D and 1D barcodes in a number of various formats. Note that you will need to specify the location of the library either through the ZXING_LIBRARY %ENV variable, or as a parameter to findBarcode():
i = Camera().getImage()
barcode = i.findBarcode("/var/opt/zxing")
barcode.draw((0, 255, 0)) #draw the outline of the barcode in green
i.save("barcode_found.png")
print barcode.data
You can do Haar Cascade face detection with SimpleCV, but you will need to find your own [Haar Cascade File](http://www.google.com/search?q=haarcascade_frontalface_alt.xml):
i = Camera().getImage()
faces = i.findHaarFeatures("/path/to/haarcascade_frontalface_alt.xml")
#print locations
for f in faces:
print "I found a face at " + str(f.coordinates())
green = (0, 255, 0)
#outline who was drinking last night (or at least has the greenest pallor)
faces.sortColorDistance(green)[0].draw(green)
i.save("greenest_face_detected.png")
Rather than use GUI-based display of processed images, SimpleCV has an integrated HTTP-based JPEG streamer. It will use the old-school multipart/replace content type to continuously feed jpgs to your browser. To send the data, you just save the image to the js.framebuffer location:
import time
c = Camera()
js = JpegStreamer() #starts up an http server (defaults to port 8080)
while(1)
c.getImage().save(js.framebuffer)
time.sleep(0.1)
You can also use a JpegStreamCamera to grab frames from an external source (such as an IP Cam, the “IP Webcam” android application, or another SimpleCV JpegStream.
jc = JpegStreamCamera(“http://localhost:8080/“) jc.getImage().save(“seeyou.jpg”)


Create Directory Structure¶ ↑
We follow the RubyGems convention to organize a Ruby project. We create a directory structure as follows.
syclink | |--LICENSE |--README.md |--bin |
|--command-line-file-goes-here |--lib | |-syclink |
|--application-files-go-here | |--spec | |--syclink |
|--test-files-go-here |--templates | |--syclink.html.erb |
|--stylesheets | |--style.css.scss | |--style.css |--.rspec
|--.gitignore
Organize the source code with Git¶ ↑
To organize our source we use Git and have to do an initialize like so
$ git init
Then we have to create a repository at Github and push our project to Github
$ git commit -m "first commit" $ git remote add origin git@github.com:sugaryourcoffee/syclink.git $ git push -u origin master
Create addtional basic files¶ ↑
We should add a README to describe our application and decide upon a license we want to distribute it. We will use the MIT License. Also a .gitignore file should be created to exclude i.e. temp-files from the repository.
Select the Ruby version¶ ↑
For a new project we want to use the newst Ruby version. At this writing it is verison 2.2.1. Suppose we use RVM. If not already installed we install it with
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 $ \curl -sSL https://get.rvm.io | bash -s stable $ rvm install 2.2.1 $ rvm use 2.2.1
Install RSpec¶ ↑
For tests we want to use RSpec. To install RSpec issue this command
$ gem install rspec
This will install the latest version. To see results of RSpec in color add following line to .rspec in the application's root directory
--color
Install Sass¶ ↑
As we will create a html file with links we need to style with CSS. But instead of using plain CSS we will use Scss. For that we need to install Sass
$ gem install sass
Then we can write stylesheets in the sassy style and when done compile them to CSS with
$ sass templates/stylesheets/style.scss:templates/stylesheets/style.css
Distribution¶ ↑
To distribute the application we need the gemspec and a Rakefile with the 'rubygems/package_task'.
From the command line we call
$ rake package
This will create a gem package we can distribute with
$ gem push pkg/syclink-0.0.1.gem Enter your RubyGems.org credentials. Don't have an account yet? Create one at https://rubygems.org/sign_up Email<EMAIL_ADDRESS>Password: Signed in. Pushing gem to https://rubygems.org... Successfully registered gem: syclink (0.0.1)


{% extends "template.html" %} {% block head %} {% endblock %} {% block content %}
{{ session['condition'] }}In this study you will be shown two kinds of data visualizations : Chord Diagrams and Parallel Plots.
You will be asked to use these visualizations to answer questions about 5 different datasets including a sample dataset in the practice round.
To get started with the practice round, click the button below.


Title
Description
Genre Choose genre Abstract Baroque Gothic Renaissance
Subject Choose subject Animals Landscape People
Medium
Year
Museum


//
Why Minecraft?
“What kind of blockhead (heh) puts a Minecraft build in their portfolio?” Good question, dear reader, and I’m glad you asked. Minecraft is a game. Pop culture
defines games as toys for children instead of the vessels for creativity that they’ve become in the decades since their inception. Public opinion of games as a
medium for art is negative. But games have the power to teach creativity in ways that have never been possible. Minecraft doesn’t need to be for children. Sure,
a cobbled-together house takes little design dexterity. But constructing massive, complex builds take time, effort, and skills. Skills in aesthetic design.
Skills in planning. Skills in level creation. Skills in math. And skills in design in general. So yes, reader, this is a Minecraft build in a portfolio.
But it is a culmination of thousands of hours of learning and innovating and building my own knowledge. So I urge you to not immediately pass this off as irrelevant.
I’ve paid people as Minecraft designers during my 4 years as a megaserver owner. I assure you it is not easy. I believe it is an art form. A weird, blocky,
3D, user-explorable art form. And like any art form, it takes years of practice to become a master.
The Majesties Castle took up my entire winter break of the 2014-2015 school year. It is by far and away the most complex Minecraft build I have done to date.
I initially started this for a build contest. A server (The Lords of Minecraft) was running a build competition, and I decided to enter. The build took me
into the realms of visual design and symmetry. 200+ hours of work and a masterpiece was born.
//
The Castle
I had quite a challenge with the exterior. A size limitation was part of the contest, so I needed to make the exterior dimensions as large as possible while still maintaining
a non-sqaure shape. By scattering a few towers around and curving a few walls, I achieved a non-uniform looking castle that is still quite large. The detailing needed to look
visually interesting without becoming repetitive. That is a huge task for a castle of this scale. Detailing the outside of a building is never easy. I'm extremely pleased with
the end result.
This next image is the throne room. I threw around a LOT of different design ideas into this one, but decided on this one. The cathedral-styled arched wood ceilings mix nicely with
the marble throne. Lighting a room like this is especially tricky. Fill it with lights and it becomes overbearing. Everything from the window to the floor has patterned and thought-out
extra detail.
The Lord's Table. This was part of the challenge commission as well. The realm has a bunch of Lords, and a lot of the politics and roleplay between them is done at the table. It had to
be fancy and fit in with the theme. It has a very open connection to the throne room, and a high-arched ceiling.
One of many hallways in the castle. The floor patterning here took a long time to get right. Pay special attention to the subtle gothic support arches and the large windows.
The dungeons. A gargantuan hollowed out cavern below the castle. Towering cobblestone support pillars form the foundation of the large castle above. Hanging cells over
a river of lava, with countless worn down jail cells and iron bridges.
The massive dining hall overlooks the throne room. Members of the kingdom can eat at while watching the king and queen manage their kingdom. The long tables and huge arched
ceiling give this entire room a medieval and classic feel.
The library is a massive part of the castle, spanning 4 individual floors. This is a picture of the basement, but it is much more interesting in-person. Look at the full image tour or
simply download the minecraft world to see it for yourself.
Here are just two of the 10+ lord bedrooms in the castle. The roleplay server has Lords that reside over different districts, each with a unique theme. Each room is built to fit those
lord-specific themes. The full image tour shows the rest. A lot of thought and creativity went into each and every one of these. I had to build with an intensely limited resource pallete if I wanted
to stick to each lord's theme. It was certainly a challenging building restriction, and I had a lot of fun with it.
Almost all of the roof is covered with a stunning garden. None of the trees are normal minecraft trees, but rather, custom trees that look more natural. Winding pathways and rooftop pools
come together to not only make a tranquil spot for players to enjoy, but to also add a bit of green to the color pallete of the castle. This turned out immensely well. The green mixes
perfectly with the aqua roof colors.
Another requirement for the contest - A movie theater. No castle is complete without a movie theater, and this theater is quite unique. A lot of lighting design went into this one. The
lights needed to be dim enough to keep a theater feel, but bright enough for players to see inside. A massive projector can be turned on or off, dimming the lights when it happens.
The final build commission was an observatory as the castle capstone. I'm a big fan of astronomy, so I wanted to make this one fairly accurate. I modeled it after how real-life observatories
work. A rotating dome and telescope with a hatch to block rain. It is fantastic and one of my favorite parts of the castle.
Copyright © 2016 Daniel Timko


Hello! My name is Victor Kilel, and I am a student at Moringa School. I hope to pursue a double-major in Computer Science and Physics once I am through with Moringa School, and furthur hone my programming skills. I love inter-disciplinary approach to education, and I believe coding is a vital skill that everyone should have regardless of their career field.
I decided to take programming classes at Moringa School because I believe technology can better human lives immensely. I have always wanted to be a better community member and I want to better situations around me by fostering technological progress in my community.


;
@startuml
Car : drive()
Dog : bark()
@enduml
# plantuml file.uml && open file.png
Classes
- http://plantuml.sourceforge.net/classes.html
Methods
Car : drive()
Methods (alt)
class Car {
String make
year : Integer
void drive()
-private()
#protected()
~package private()
+public()
{static} String id
{abstract} void methods()
}
Lines
class Car {
These are separated by lines.
The next line is a dotted line
..
Next is a double-stroke
==
Next is a plain line
--
Next is a strong line
__
You can make headers with it
.. header ..
}
Associations
Car <|-- SmallCar # extension
Car *-- Engine # composition
Cars o-- Car # aggregation
Car <|.. SmallCar # dotted line (use .. instead of --)
Car <|--* Car
-left->
-right->
Relations
Driver - Car : drives >
Car -- Owner : < owns
Car *-- Wheel : has 4 >
Notes
class Car {
}
note left: Something something
note top of Car : This is a car.
Namespaces
namespace Client {
class Driver {
}
}
Car -- Client.Driver : owns >
Activities
(*) --> "First Activity"
-->[You can put also labels] "Second Activity"
--> (*)


DATA Animate
Data Closest
left
left
right
right
up
up
down
down
shrink
shrink
grow
grow
Data Target
left
right
up
down
shrink
grow


AP source: Peat has surgery on broken arm, out about 6 weeks
by BRETT MARTELNEW ORLEANS (AP) - A person familiar with the situation says New Orleans Saints starting left guard Andrus Peat has had surgery to repair a broken arm and is expected to be sidelined about six weeks.
The person spoke to The Associated Press Wednesday on condition of anonymity because the extent of Peat’s injury and his surgery has not been announced. ESPN first reported details of the surgery.
The 2018 Pro Bowl selection was injured during the first half of Sunday’s loss to Atlanta.
Peat was New Orleans’ first-round draft choice in 2015 and has started 59 of the 64 career games he’s played.
The former Stanford offensive tackle has played both at guard and tackle for New Orleans. His primary role has been as starting left guard since 2016, but he also has slid over to play tackle when there have been injuries at that position.
More AP NFL: https://apnews.com/NFL and https://twitter.com/AP_NFL
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


OOAOM - Order Of Appearance Of Modifiers
Checks for correct ordering of modifiers.
For classes:
visibility (public, protected or private), abstract, static, final.
For attributes:
visibility (public, protected or private), static, final, transient, volatile.
For operations:
visibility (public, protected or private), abstract, static, final, synchronized, native
Wrong
public static final int attr1;
static public int attr2;
}
Tip: Change the order of modifiers
Right
public static final int attr1;
public static int attr2;
}


| Class | Description |
|---|---|
| SequentialIds |
SequentialIds
generates sequential IDs based on unix time and a counter
generates up to 100 million unique IDs per second
throws an exception on collision (collision resistant)
generates unique IDs only per-instance
works well until year 4857
uses JAVA Long (19 digits)
11 digits for unix time and 8 digits for counter
e.g.:<PHONE_NUMBER>100000017
--> unix time =<PHONE_NUMBER> and counter = 17
NOTE: this class depends on system time, a change in the system time
affects the generated ids and can potentially result in
out-of-sequence ids for a period of time
|
| SnowFlake |
SnowFlake was developed by twitter as a way to have distributed universal
sequential ID generation - thanks twitter
SnowFlake is a way to generate universally unique sequential IDs represented
by 64-bit positive numbers (JAVA long)
The ID's 64-bits are divided as follows
- 41 bits for time stamp (works well till 2080) (millisecond precision)
- 10 bits for machine ID (machine's mac address) (up to 1024 instances)
- 12 bits for sequence (for IDs generated within the same time stamp)
(allows for 4096 IDs per millisecond per instance)
Can be distributed on multiple machines with the following constrains:
a) one instance per machine (using machine's mac address as instance ID,
otherwise modify the way the instance's ID is set to allow for
multiple instances per machine)
b) all machines running SnowFlake must use the same NTP time server so
that the time stamp part in IDs stays in sync
Collision resistant.
|
| UuidOperationsInl |
UuidOperationsInl is for inline static methods uuid-related
|


Hawaii island man turns in ‘monster’ pet Nile tilapia to state DLNR | Honolulu Star-Advertiser
The delivery of a dead “monster” Nile tilapia — that weighed in at 16 pounds and stretched more than two feet long — has state officials thinking of new ways to encourage fishermen to try to hook the invasive species.
Typically, Nile tilapia are about 8 inches long and weigh two to five pounds, Dan Dennison, spokesman for the state Department of Land and Natural Resources, told the Honolulu Star-Advertiser today.
A Hawaii island man brought his dead, pet Nile tilapia to state aquatic biologist Troy Sakihara on Nov.7 after Sakihara had been featured in news reports about an invasion of Nile tilapia in the Wailoa and Waiakea waters of Hawaii Island, Dennison said.
A previous “invasion” of black-chin tilapia also occurred on Kaua‘i’s north shore, Dennison said.
Sakihara said the Nile tilapia he was given represented the biggest he had ever seen.
Sakihara’s boss, Brian Neilson, the administrator of DLNR’s Division of Aquatic Resources said in a statement today that:
“I was amazed, as a fisherman myself, but also a little freaked out by how big these fish can actually get. Especially when you think about how devastating tilapia can be to some of our native organisms, a two-foot-long, 16-pound fish can become a major predator. It’s a little scary.
“It’s great to see the public awareness and support and people bringing in tilapia, as they’re hearing the important message that invasive species don’t need to be in our waterways,” Neilson said in his statement. “You look at the size of the fish that was recently brought in and it’s not a stretch to imagine how they can gobble up all the food for native species and they’re actually eating fish like ‘ama‘ama or ‘o‘opu.”
Sakihara is now forming a working group to work with DLNR’s Division of Aquatic Resources to develop strategies to address the effects of tilapia on Hawai‘i waterways and will seek input from the fishing community.
The Division of Aquatic Resources wants fishermen to catch as many tilapia as they want and is considering hosting a community fishing tournament early next year “as one component, of a multitude of steps to try and eliminate them from wild, native, waters,” Dennison said in a statement.


InvocationHandler
that do not proxy standard
Object
methods like hashCode()
, equals()
, and toString()
.
Failing to handle these methods might cause unexpected problems upon calling them on a proxy instance.
Example:
InvocationHandler myHandler = (proxy, method, params) -> {
System.out.println("Hello World!");
return null;
};
Runnable myProxy = (Runnable) Proxy.newProxyInstance(
Thread.currentThread().getContextClassLoader(),
new Class[] {Runnable.class}, myHandler
);
This code snippet is designed to only proxy the Runnable.run()
method.
However, calls to any Object
methods, like hashCode()
, are proxied as well.
This can lead to problems like a NullPointerException
, for example, when adding myProxy
to a HashSet
.
New in 2020.2


Reports calls to JUnit assertEquals() which have the expected argument and the actual argument in the wrong order.
For JUnit the correct order is (expected, actual)
.
Such calls will behave fine for assertions which pass, but may give confusing error reports on failure.


EDD has encountered an error and cannot show this page. The site administrators have been notified of the problem, please check back later.
EDD has encountered an error and cannot show this page. The site administrators have been notified of the problem, please check back later.


{% extends "base-documentation.html" %} {% block documentation %}
The easier way to interact with Liftpass API and manage/configure application content is using the dashboard. The Dashboard can be built using the build.py
script which also genereates the documentation for Liftpass. The dashboard will be generated and placed into the folder liftpass/site/build/dashboard/
To run the dashboard, the easiest way is to start Python's native HTTP server from within the built site document folder:
{% highlight 'bash' %} cd build python -m http.server {% endhighlight %}From your browser you can then navigate to the URL http://<IP_ADDRESS>:8000/dashboard/.
{% endblock %}


Before Change
except (httpclient.HTTPError, RuntimeError) as e:
// Basically if not on EC2 do a hack and try to connect to
// internet and see what the local ip is.
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("<IP_ADDRESS>", 53))
ips.append(s.getsockname()[0])
s.close()
finally:
if http_client is not None:
http_client.close()
After Change
if external_ip:
LOGGER.debug(f"proxy.externalIP set to {external_ip}")
else:
print("proxy.externalIP not set, attempting autodetect of external IP")
http_client = None
try:
http_client = httpclient.HTTPClient()


Representative immunohistochemical (IHC) staining (A) and semiquantitative analysis (B) of Ki67, KRT17 and CRISP2 during carcinogenesis. Bar scale: 50 μm. IHC results are presented with IOD value/area in different groups. The Kruskal–Wallis rank test was performed on the IHC results and p < 0.05 was regarded as statistically significant


1.0.9
Method to know the size (the number of elements) of our list. O(1)
number
:
size, with size >= 0.
Returns the first element in the list that returns true in the condition passed through the anonimus function. O(n)
(function)
an anonimus function with one argument that
must return a boolean, true if the element is
the desire element, false otherwise.
Object
:
the element found or null if no element returned true in
the condition.
var l = new List();
var item = {
x:1,
y:3
}
l.add(item);
console.log(l.findOne(e=>e.y==3));
Returns all the elements in the list that returns true in the condition passed through the anonimus function. O(n)
(function)
an anonimus function with one argument that
must return a boolean, true if the element is
the desire element, false otherwise.
Array
:
an array with all the elements found that returned true on
the condition.
var l = new List();
var item = {
x:1,
y:3
}
l.add(item);
var item2 = {
x:19,
y:3
}
l.add(item2);
console.log(l.find(e=>e.y==3));
Extends List
(Array
= []
)
the list is instantiated with an empty list unless
an Array is passed as parameter.
Returns the first element in the list that returns true in the condition passed through the anonimus function. O(n)
(function)
an anonimus function with one argument that
must return a boolean, true if the element is
the desire element, false otherwise.
Object
:
the element found or null if no element returned true in
the condition.
var l = new List();
var item = {
x:1,
y:3
}
l.add(item);
console.log(l.findOne(e=>e.y==3));
Returns all the elements in the list that returns true in the condition passed through the anonimus function. O(n)
(function)
an anonimus function with one argument that
must return a boolean, true if the element is
the desire element, false otherwise.
Array
:
an array with all the elements found that returned true on
the condition.
var l = new List();
var item = {
x:1,
y:3
}
l.add(item);
var item2 = {
x:19,
y:3
}
l.add(item2);
console.log(l.find(e=>e.y==3));
(Array
= []
)
the tree is instantiated with an empty tree unless
an Array is passed as parameter.
(function
= (a,b)=>a==b?0:a>b?1:-1
)
the function
that will be used.
Method to know the size (the number of elements) of our tree. O(1)
number
:
size, with size >= 0.
forEach implementation for tree, it can go through the tree in bfs or dfs but it will do it in dfs inorder if there is no argument, ie the tree will be travel in order from lower to higer. O(n)
Goes through the tree in dfs in preorder. O(n)
Returns an array with the elements in order (lower to higher). O(n)
any
:
an array with the elements.
Removes all elements from the tree. O(1)
Returns a copy which is a different instance from the original tree. O(n^2)
Extends BinaryTree
(Array
= []
)
the tree is instantiated with an empty unless an
Array is passed as parameter.
(function
= (a,b)=>a==b?0:a>b?1:-1
)
the function
that will be used.
Extends BinaryTree
(function
= (a,b)=>a==b?0:a>b?1:-1
)
the function
that will be used.
Adds an couple of key and value. There are no repeated keys, if two elements have the same keys the value will be updated. Since this is a tree the elements will be order using the keys. O(n)
Returns a copy which is a different instance from the original tree. O(n^2)
Extends AVLTree
(function
= (a,b)=>a==b?0:a>b?1:-1
)
the function
that will be used.
Adds an couple of key and value. There are no repeated keys, if two elements have the same keys the value will be updated. Since this is a tree the elements will be order using the keys. O(log n)
Returns a copy which is a different instance from the original tree. O(n)


Senshu International Marathon
Izumisano JPN
Race Winners
(24 runnings)
17 Feb
2008 18 Feb
2007
19 Feb
2006
20
Feb
2005
15 Feb
2004
16 Feb
2003
17 Feb
2002
18 Feb
2001
20
Feb
2000
21 Feb
1999
1998
1997
18 Feb
1996
1995
13
Feb 1994
21 Feb
1993
Notes: 1993 was the inaugural year. This race was known as the
Senshu Chigiri Marathon for 1993. The venue for
the 1993-94 races was Sakai; the venue for the 1996 (and possibly other years)
was Kishiwada.
19 Feb
2017
2:22:53
Mitsutaka Imura (JPN)
2:44:21
Mitsuko Ino (JPN)
21 Feb
2016
2:25:49
Satoshi Osaki (JPN)
2:57:12
Yumiko Tanaka (JPN)
15 Feb
2015
2:17:52
Sora Tsukada (JPN)
2:37:43
Madoka Nakano-2
16 Feb
2014
2:27:42
Masato Ando (JPN)
2:40:00
Madoka Nakano (JPN)
17 Feb
2013
2:22:25
Yuki Marubayashi-2
2:38:54
Yuki Ino (JPN)
19 Feb
2012
2:20:18
Yuki Marubayashi (JPN)
2:40:45
Chihiro Tanaka-3
20 Feb
2011
2:21:20
Koji Harada (JPN)
2:38:07
Chihiro Tanaka-2
21 Feb
2010
2:19:52
Toyokazu Yoshimura (JPN)
2:41:12
Chihiro Tanaka (JPN)
15 Feb
2009
2:18:33
Takashi Toyoda (JPN)
2:47:52
Roxie Fraser (AUS)
2:19:49
Koji Inagaki (JPN)
2:39:25
Akemi Ozaki (JPN)
2:18:43
Koichi Haraguchi (JPN)
2:42:45
Shigeko Yanagida (JPN)
2:21:23
Shingo Shiozuka (JPN)
2:52:54
Helen Stanton (AUS)
2:18:13
Kazuya Nakamori (JPN)
2:44:21
Kaori Shinjo (JPN)
2:19:50
Seiji Kushibe (JPN)
2:45:18
Ai Sugihara-2
2:16:43
Motoyasu Hattori (JPN)
---
n/a
2:16:50
Hiromitsu Fukuhara (JPN)
2:48:47
Harumi Matsumoto (JPN)
---
n/a
2:39:02
Ai Sugihara (JPN)
2:15:24
Kazunari Kamagome (JPN)
2:29:09
Tomoe Abe (JPN)
2:20:07
Vladimir Kotov (BLR)
2:44:45
Mari Tanigawa (JPN)
---
n/a
---
n/a
2:21:39
Isami Sennai (JPN)
---
n/a
2:17:28
Takeyuki Nakayama (JPN)
2:43:08
Yoko Kako (JPN)
---
cancelled due to Hanshin earthquake
---
cancelled due to
Hanshin earthquake
2:19:05
Kazuo Kuwahara (JPN)
---
n/a
2:23:33
Toshiro Kashihara (JPN)
2:56:14
Kumi Fujiwara (JPN)
Most Wins
(1993/date)
Men 2 3
Yuki Marubayashi (JPN)
2012-13
Women
Chihiro Tanaka
(JPN)
2010-12
Prize Money
(ADR qualified runners)
Prize money is generally not permitted in Japanese road races.
Race Time Bias
(sec/km)
Insufficient data to calculate the race time bias.
Competitive Level (1990-date)
Insufficient data to calculate the competitive level.
Quality Performances
Men <2:16 1 <2:17 4 <2:18 7 <2:19 13 <2:20 19 Women <2:30 1 <2:32 1 <2:34 1 <2:36 2 <2:38 3 <2:40 8 <2:42 14 <2:44 20 <2:46 26 <2:48 29 <2:50 35
Last Updated on
19 Feb 2017
Contributors: Shigenobu Ota (34), Brett Larner (14), Klaas Loonstra (2)


// Instantiate history to use the address bar for state. var h = new goog.History(); goog.events.listen(h, goog.History.EventType.NAVIGATE, navCallback); h.setEnabled(true); // Any changes to the location hash will call the following function. function navCallback(e) { alert('Navigated to state "' + e.token + '"'); } // The history token can also be set from code directly. h.setToken('foo');
|
opt_invisible
: boolean=
True to use hidden history states instead of the user-visible location hash.
|
|
opt_blankPageUrl
: string=
A URL to a blank page on the same server. Required if opt_invisible is true. This URL is also used as the src for the iframe used to track history state in IE (if not specified the iframe is not given a src attribute). Access is Denied error may occur in IE7 if the window's URL's scheme is https, and this URL is not specified.
|
|
opt_input
: HTMLInputElement=
The hidden input element to be used to store the history token. If not provided, a hidden input element will be created using document.write.
|
|
opt_iframe
: HTMLIFrameElement=
The hidden iframe that will be used by IE for pushing history state changes, or by all browsers if opt_invisible is true. If not provided, a hidden iframe element will be created using document.write.
|
|
check_()
Checks the state of the document fragment and the iframe title to detect
navigation changes. If
goog.History.HAS_ONHASHCHANGE is
false , then this runs approximately twenty times per second.
|
code » | ||||
|
disposeInternal()
No description.
|
code » | ||||
|
getIframeToken_()
⇒
Return the current state string from the hidden iframe. On internet explorer,
this is stored as a string in the document body. Other browsers use the
location hash of the hidden iframe.
Older versions of webkit cannot access the iframe location, so always return
null in that case.
Returns:
The state token saved in the iframe (possibly null if the iframe has never loaded.).
|
code » | ||||
|
getLocationFragment_(win)
⇒
Gets the location fragment for the current URL. We don't use location.hash
directly as the browser helpfully urlDecodes the string for us which can
corrupt the tokens. For example, if we want to store: label/%2Froot it would
be returned as label//root.
|
code » | ||||
|
getToken()
⇒
No description.
Returns:
The current token.
|
code » | ||||
|
onDocumentLoaded()
Callback for the window onload event in IE. This is necessary to read the
value of the hidden input after restoring a history session. The value of
input elements is not viewable until after window onload for some reason (the
iframe state is similarly unavailable during the loading phase.) If
setEnabled is called before the iframe has completed loading, the history
object will actually be enabled at this point.
|
code » | ||||
|
onHashChange_(e)
Handles HTML5 onhashchange events on browsers where it is supported.
This is very similar to #check_, except that it is not executed
continuously. It is only used when
goog.History.HAS_ONHASHCHANGE is
true.
Arguments:
|
code » | ||||
|
onShow_(e)
Handler for the Gecko pageshow event. Restarts the history object so that the
correct state can be restored in the hash or iframe.
Arguments:
|
code » | ||||
|
operaDefibrillator_()
Opera cancels all outstanding timeouts and intervals after any rapid
succession of navigation events, including the interval used to detect
navigation events. This function restarts the interval so that navigation can
continue. Ideally, only events which would be likely to cause a navigation
change (mousedown and keydown) would be bound to this function. Since Opera
seems to ignore keydown events while the alt key is pressed (such as
alt-left or right arrow), this function is also bound to the much more
frequent mousemove event. This way, when the update loop freezes, it will
unstick itself as the user wiggles the mouse in frustration.
|
code » | ||||
|
replaceToken(token, opt_title)
Replaces the current history state without affecting the rest of the history
stack.
Arguments:
|
code » | ||||
|
setEnabled(enable)
Starts or stops the History polling loop. When enabled, the History object
will immediately fire an event for the current location. The caller can set
up event listeners between the call to the constructor and the call to
setEnabled.
On IE, actual startup may be delayed until the iframe and hidden input
element have been loaded and can be polled. This behavior is transparent to
the caller.
Arguments:
|
code » | ||||
|
setHash_(hash, opt_replace)
Sets or replaces the URL fragment. The token does not need to be URL encoded
according to the URL specification, though certain characters (like newline)
are automatically stripped.
If opt_replace is not set, non-IE browsers will append a new entry to the
history list. Setting the hash does not affect the history stack in IE
(unless there is a pre-existing named anchor for that hash.)
Older versions of Webkit cannot query the location hash, but it still can be
set. If we detect one of these versions, always replace instead of creating
new history entries.
window.location.replace replaces the current state from the history stack.
http://www.whatwg.org/specs/web-apps/current-work/#dom-location-replace
http://www.whatwg.org/specs/web-apps/current-work/#replacement-enabled
Arguments:
|
code » | ||||
|
setHistoryState_(token, replace, opt_title)
Sets the history state. When user visible states are used, the URL fragment
will be set to the provided token. Setting opt_replace to true will cause the
navigation to occur, but will replace the current history entry without
affecting the length of the stack.
|
code » | ||||
|
setIframeToken_(token, opt_replace, opt_title)
Sets the hidden iframe state. On IE, this is accomplished by writing a new
document into the iframe. In Firefox, the iframe's URL fragment stores the
state instead.
Older versions of webkit cannot set the iframe, so ignore those browsers.
Arguments:
|
code » | ||||
|
setLongerPolling_(longerPolling)
Sets if the history oject should use longer intervals when polling.
Arguments:
|
code » | ||||
|
setToken(token, opt_title)
Sets the history state. When user visible states are used, the URL fragment
will be set to the provided token. Sometimes it is necessary to set the
history token before the document title has changed, in this case IE's
history drop down can be out of sync with the token. To get around this
problem, the app can pass in a title to use with the hidden iframe.
Arguments:
|
code » | ||||
|
update_(token)
Updates the current history state with a given token. Called after a change
to the location or the iframe state is detected by poll_.
Arguments:
|
code » |
|
addEventListener(type, handler, opt_capture, opt_handlerScope)
Adds an event listener to the event target. The same handler can only be
added once per the type. Even if you add the same handler multiple times
using the same type then it will only be called once when the event is
dispatched.
Supported for legacy but use goog.events.listen(src, type, handler) instead.
Arguments:
|
code » | |||||
|
dispatchEvent(e)
⇒
Dispatches an event (or event like object) and calls all listeners
listening for events of this type. The type of the event is decided by the
type property on the event object.
If any of the listeners returns false OR calls preventDefault then this
function will return false. If one of the capture listeners calls
stopPropagation, then the bubble listeners won't fire.
Arguments:
Returns:
If anyone called preventDefault on the event object (or if any of the handlers returns false this will also return false.
|
code » | |||||
|
disposeInternal()
Unattach listeners from this object. Classes that extend EventTarget may
need to override this method in order to remove references to DOM Elements
and additional listeners, it should be something like this:
MyClass.prototype.disposeInternal = function() { MyClass.superClass_.disposeInternal.call(this); // Dispose logic for MyClass }; |
code » | |||||
|
getParentEventTarget()
⇒
Returns the parent of this event target to use for bubbling.
Returns:
The parent EventTarget or null if there is no parent.
|
code » | |||||
|
removeEventListener(type, handler, opt_capture, opt_handlerScope)
Removes an event listener from the event target. The handler must be the
same object as the one added. If the handler has not been added then
nothing is done.
Arguments:
|
code » | |||||
|
setParentEventTarget(parent)
Sets the parent of this event target to use for bubbling.
Arguments:
|
code » |
|
dispose()
No description.
|
code » | |
|
disposeInternal()
Deletes or nulls out any references to COM objects, DOM nodes, or other
disposable objects. Classes that extend
goog.Disposable should
override this method. For example:
mypackage.MyClass = function() { goog.Disposable.call(this); // Constructor logic specific to MyClass. ... }; goog.inherits(mypackage.MyClass, goog.Disposable); mypackage.MyClass.prototype.disposeInternal = function() { mypackage.MyClass.superClass_.disposeInternal.call(this); // Dispose logic specific to MyClass. ... }; |
code » | |
|
getDisposed()
⇒
No description.
Returns:
Whether the object has been disposed of.
|
code » | |
|
isDisposed()
⇒
No description.
Returns:
Whether the object has been disposed of.
|
code » |
|
enabled_
:
Status of when the object is active and dispatching events.
|
Code » | |
|
lastToken_
:
The last token set by the history object, used to poll for changes.
|
Code » | |
|
lockedToken_
:
If not null, polling in the user invisible mode will be disabled until this
token is seen. This is used to prevent a race condition where the iframe
hangs temporarily while the location is changed.
|
Code » | |
|
longerPolling_
:
Whether the object is performing polling with longer intervals. This can
occur for instance when setting the location of the iframe when in invisible
mode and the server that is hosting the blank html page is down. In FF, this
will cause the location of the iframe to no longer be accessible, with
permision denied exceptions being thrown on every access of the history
token. When this occurs, the polling interval is elongated. This causes
exceptions to be thrown at a lesser rate while allowing for the history
object to resurrect itself when the html page becomes accessible.
|
Code » |
|
Whether the browser supports HTML5 history management.
{@link http://www.w3.org/TR/html5/history.html}.
|
Code » | |
|
Minimal HTML page used to populate the iframe in Internet Explorer. The title
is visible in the history dropdown menu, the iframe state is stored as the
body innerHTML.
|
Code » | |
|
HTML template for an invisible iframe.
|
Code » | |
|
List of user input event types registered in Opera to restart the history
timer (@see goog.History#operaDefibrillator_).
|
Code » | |
|
HTML template for an invisible named input element.
|
Code » | |
|
Counter for the number of goog.History objects that have been instantiated.
Used to create unique IDs.
|
Code » |


--- layout: post title: How to broadcast live video stream on Internet for free permalink: how-to-broadcast-live-video-stream-on-internet-for-free/ date: 2013-05-10 06:45:31.000000000 +08:00 categories: - howto - social networking tags: - how to broadcast video online - live streaming of video - publish video on internet - real time video online - show video on real time - stream video online - video streaming status: publish type: post published: true meta: _edit_last: '2' _thumbnail_id: '995' _wpas_done_all: '1' dsq_thread_id: '3045237282' cleaned: true ---
Are you currently shooting a live video that you want other people to see in real-time?
Whether you are attending some festivities or party that you want to publish on Internet at real time or you are a celebrity singer who has legions of fans waiting for you to sing in front of your computer, there is no other easy way to do that aside from live streaming via Internet.
Of course you can do Skype, Facetime of Google Hangout to do some video-conference. But that is more of private within a particular group of people. When you say "broadcasting", you are publishing your video to the whole general public, most often, you don't care who is viewing online, probably hundreds or even million viewers around the world.
For this purpose, there are two prominent free web-based services to assist you.
1. Twitcam
This tool requires no software to be installed in your computer, all you need to have is a working webcam and that's it. You also need an active Twitter account, you can chat with your followers while they are viewing you online.
2. UStream
This is another great tool for more serious type of broadcasting. It has a pro version which offers more advanced way of streaming video online.
Try those out and let me know what you think! :-)


PingPong
Let's play!
Rules:
Ping Pong will count up to your number from 1 with the following exceptions:
Numbers divisible by 3 become "Ping"
Numbers divisible by 5 become "Pong"
Numbers divisible by 3 and 5 become "Pingpong"
Enter your number here:
Ping Pong!


Our research has discovered atomically thin materials that dramatically change their crystal structure and electrical properties when they are deformed. This result creates new opportunities for information and energy storage, and could have applications in flexible devices, or more generally in transparent, wearable and low-power electronics.
A side view of two differing crystal structures of the 2D Mo- and W-dichalcogenides. The most commonly occuring 2H structure is an electrical semiconductor, whereas the alternative 1T' structure is metallic. Our research has discovered that phase transitions between these structures are possible by virtue of tension.
Imagine an experiment where you separate a piece of paper along its thickness into two thin sheets. Now image splitting the resulting sheets over and over again, until you are left with films that are just a few atoms thick. You might think that in reality your sheets would disintegrate long before they are atomically thin. You would be right in most cases, but it turns out that there are a few special materials that can really be reduced to a thickness of just a few atoms. The resulting atomically thin layers are called two-dimensional (2D) materials.
The most famous 2D material is graphene: one layer of carbon atoms. Early research on graphene showed that 2D materials have many exotic properties that exist only in the ultra-thin limit. These materials' desirable electronic properties, very high mechanical strength and extreme surface-to-volume ratio have gained much attention from researchers in fields as diverse as electronics, catalysis, batteries and composites.
To be able to build ultralow-power electronic devices using two-dimensional materials, an extra ingredient is needed: the capacity for the same 2D material to exist in more than one crystal structure. Alternate 2D crystal structures can be used for energy and nonvolatile information storage. To find a 2D material with this desirable feature, we need to look beyond graphene.
A strain-driven structural phase transition between 2H-MoTe2 and 1T'-MoTe2.
Our research team has discovered 2D materials can exhibit phase transitions between crystal structures, with each structure having distinct properties. One crystal structure is a 2D semiconductor, whereas the other is a 2D metal. We have discovered that mechanical tension is the key to achieving a transition from one crystal structure to the other. This process is illustrated in the image above, where a 2D material's atoms rearrange into a lower-free energy crystal structure when you apply a tensile deformation. The fact that mechanical tension switches a material between two very different 2D phases is very fertile ground for technological applications including energy storage, sensors and nonvolatile digital memory.
Using density functional theory (DFT) calculations, we subjected a set of 2D compounds to the same question: what is the phase diagram as a function of strain? In some cases, we found that tensile strains on the order of 1% are enough to switch thermodynamic stability from the semiconducting to metallic crystal structure, or vice versa. Since these materials are extremely strong, such deformations are easily attainable without causing damage, perhaps using flexible-substrate methods. Our research team's calculations find that MoTe2, a newly emerging 2D material, is the most promising for phase-change applications.
DFT-calculated trajectory of MoTe2's lattice strain and crystal structure under uniaxial and isotropic stress. This calculation includes the effect of quasiharmonic room temperature phonon free energy. Under uniaxial stress, a 2H-1T' phase transition is predicted at around 1% strain.
Publication:
Duerloo, K.-A. N., Li, Y., Reed, E. J., Structural Phase Transitions in Two-Dimensional Mo- and W- Dichalcogenide Monolayers. Nature Communications, doi:10.1038/ncomms5214 (2014).
News coverage:
Stanford engineers envision an electronic switch just three atoms thick. Stanford Report, July 1, 2014
Three-Atom Thick Material Switches Between a Conductor and an Insulator When Tugged. IEEE Spectrum, July 1, 2014


Rebelo\SaftPt\AuditFile\AuditFile
Class representing AuditFile <xs:element name="AuditFile">
Synopsis
class AuditFile
extends AAuditFile
{
- // constants
- const N_AUDITFILE = "AuditFile";
- // Inherited constants from AAuditFile
- const DESCONHECIDO = "Desconhecido";
- const CONSUMIDOR_FINAL_TAX_ID = "999999990";
- const CONSUMIDOR_FINAL = "Consumidor final";
- const CONSUMIDOR_FINAL_ID = "CONSUMIDOR_FINAL";
- // members
- protected Header $header;
- protected MasterFiles $masterFiles;
- protected GeneralLedgerEntries $generalLedgerEntries = NULL;
- protected SourceDocuments|null $sourceDocuments = NULL;
- public static string|null $log4phpConfigFilePath = NULL;
- // Inherited members from AAuditFile
- protected static AI18n $i18n;
- protected ErrorRegister $errorRegister;
- protected array $error;
- protected array $warning;
- // methods
- public void __construct()
- public Header getHeader()
- public bool issetHeader()
- public MasterFiles getMasterFiles()
- public bool issetMasterFiles()
- public GeneralLedgerEntries getGeneralLedgerEntries()
- public ?SourceDocuments getSourceDocuments()
- public SimpleXMLElement createXmlNode()
- public void parseXmlNode()
- public SimpleXMLElement createRootElement()
- public string toXmlString()
- public string toXmlStringWindows1252()
- public int toFile()
- public static AuditFile loadFile()
- public bool validate()
- // Inherited methods from AAuditFile
- public bool __isset()
- public void __construct()
- public abstract SimpleXMLElement createXmlNode()
- public abstract void parseXmlNode()
- public void __clone()
- public static string valTextMandMaxCar()
- public static bool valPortugueseVatNumber()
- public static bool validateMod11auxFunction()
- public string floatFormat()
- public static string replaceHexUtf()
- public static void setI18n()
- public static AI18n getI18n()
- public ErrorRegister getErrorRegistor()
- public array getError()
- public array getWarning()
- public void addError()
- public void addWarning()
- public static bool validateDocNumber()
- public static int calcPeriod()
Hierarchy
Tasks
| Line | Task |
|---|---|
| 429 | test async in a machine with pcntl and posix, special if in |
Constants
| Name | Value |
|---|---|
| N_AUDITFILE | "AuditFile" |
| DESCONHECIDO | "Desconhecido" |
| CONSUMIDOR_FINAL_TAX_ID | "999999990" |
| CONSUMIDOR_FINAL | "Consumidor final" |
| CONSUMIDOR_FINAL_ID | "CONSUMIDOR_FINAL" |
Members
protected
- $error
—
array
To registe particular validation and errors of documents or tables, the key must be the field name - $errorRegister
—
\Rebelo\SaftPt\AuditFile\ErrorRegister
Error Register, to register global validation and errors - $generalLedgerEntries
—
\Rebelo\SaftPt\AuditFile\GeneralLedgerEntries\GeneralLedgerEntries
<xs:element ref="GeneralLedgerEntries" minOccurs="0"/> - $header
—
\Rebelo\SaftPt\AuditFile\Header
<xs:element ref="Header" minOccurs="1"/> - $i18n — \Rebelo\SaftPt\AuditFile\i18n\AI18n
- $masterFiles
—
\Rebelo\SaftPt\AuditFile\MasterFiles\MasterFiles
<xs:element name="MasterFiles"> - $sourceDocuments
—
\Rebelo\SaftPt\AuditFile\SourceDocuments\SourceDocuments|null
<xs:element ref="SourceDocuments" minOccurs="0"/> - $warning
—
array
To regist particular warnings of documents or tables
public
- $log4phpConfigFilePath
—
Rebelo\SaftPt\AuditFile\string|null
The Log file configuration file
Methods
public
- __construct() — <xs:element name="AuditFile">
- createRootElement() — Create the AuditFile Xml Root element
- createXmlNode() — Create the XML node
- getGeneralLedgerEntries() — Gets as generalLedgerEntries
 <xs:element ref="GeneralLedgerEntries" minOccurs="0"/>
- getHeader() — Gets as header
 The item Header contains the general information regarding the taxpayer, whom the SAF-T (PT) refers to.
 This get will create the Header instance
 <xs:element ref="Header" minOccurs="1"/>
- getMasterFiles() — Gets as masterFiles
 This get will create the MasterFiles instance
 <xs:element name="MasterFiles">
- getSourceDocuments() — Gets as sourceDocuments
 SourceDocuments
 Lines in documents without fiscal relevance must not be exported, in particular technical descriptions, installation instructions and guarantee conditions. The internal code of the document type cannot be used in different document types, regardless of the table in which it is to be exported.
 <xs:element ref="SourceDocuments" minOccurs="0"/>
 This get will create the SourceDocuments instance if $generate is true
- issetHeader() — Get if is set Header
- issetMasterFiles() — Get if is set MasterFiles
- loadFile() — Load and parse a SAFT-PT file, afeter load and before parsing the will be done a validation against the XSD, you can check if has any error in the ErrorRegistor of the AuditFile instance, and you can make the data validation using the validateData method
- parseXmlNode() — Parse the complete XML saft file
- toFile() — Write the XML to a file
 By the Portuguese Tax law, the ERP must generate the saft even if has errors, because of that rule when there are errors instead of throws an exception the error is registed in the ErrorRegister instance of the AuditFile instance, only in severe condition where is not possible to catch the exception or error that a \Exception or \Error will be throw. To know if there are errors access to the ErrorRegister instance of the AuditFile instance. Some validation to check for errors are done on the setter methods, when write the AuditFile a file, other validation is done, the xml string structure is validated, but other validations can be done using the validation classes, however that validations in very big AuditFiles could have a time consume very hight, is recomended to use in test envoirment, in producion envoirment should be evaluated if is necessary.
- toXmlString() — Get the saft as a xml string.
 By the Portuguese Tax law, the ERP must generate the saft even if has errors, because of that rule when there are errors instead of throws an exception the error is registed in the ErrorRegister instance of the AuditFile instance, only in severe condition where is not possible to catch the exception or error that a \Exception or \Error will be throw. To know if there are errors access to the ErrorRegister instance of the AuditFile instance. Some validation to check for errors are done on the setter methods, when get the AuditFile as a xml string, no validation is done, validations can be done using the validation classes, however that validations in very big AuditFiles could have a time consume very height, is recommended to use in test environment, in production environment should be evaluated if is necessary.
- toXmlStringWindows1252() — Return the toXmlString method but the xml string converted to "Windows-1252"
- validate() — Validate the SAFT-PT audit file.
Inherited from Rebelo\SaftPt\AuditFile\AAuditFile
public
- __clone() — Force to clone all object properties
- __isset() — Invoke the isset to the propertie name
- addError() — Add a particular error
- addWarning() — Add a particular warning
- calcPeriod() — Calc the document period based on the fiscal year start month
- createXmlNode() — Create the xml node for the object
- floatFormat() — Format a float with grouped thousands
- getError() — Get all particular error
- getErrorRegistor() — Get the ErrorRegistor instance
- getI18n() — Get i18n class
- getWarning() — Get all particular warning
- parseXmlNode() — Create the xml node for the object
- replaceHexUtf() — Convert the encoded caracters encoded by SimpleXmlElment
- setI18n() — Set the language to translate
- valPortugueseVatNumber() — Validate Portuguese VAT Number
- valTextMandMaxCar() — Validate the string if length is zero throws AuditFileException, if greater than $lentgh will return a truncated string
- validateDocNumber() — Validate documents number <xs:simpleType> <xs:restriction base="xs:string"> <xs:pattern value="[^ ]+ [^/^ ]+/[0-9]+"/> <xs:minLength value="1"/> <xs:maxLength value="60"/> </xs:restriction> </xs:simpleType>
- validateMod11auxFunction() — validate Mod11 numbers (true whene the remaining of the division per 11 is 0) number % 11 === 0