[ package ] [ object ] [ method ] [ explanation ]
The following document contains the results of a JavaNCSS metric analysis, using JavaNCSS version 33.54.
JavaNCSS web site.
[ package ] [ object ] [ method ] [ explanation ]
Packages sorted by NCSS.
| Package | Classes | Methods | NCSS | Javadocs | Javadoc lines | Single lines comment | Multi lines comment |
|---|---|---|---|---|---|---|---|
| au.gov.amsa.navigation | 17 | 115 | 952 | 2 | 13 | 78 | 0 |
| au.gov.amsa.navigation.ais | 8 | 33 | 357 | 0 | 0 | 25 | 0 |
| au.gov.amsa.util | 1 | 10 | 55 | 1 | 5 | 1 | 0 |
| Classes total | Methods total | NCSS total | Javadocs | Javadoc lines | Single lines comment | Multi lines comment |
|---|---|---|---|---|---|---|
| 26 | 158 | 1364 | 3 | 18 | 104 | 0 |
[ package ] [ object ] [ method ] [ explanation ]
TOP 30 classes containing the most NCSS.
TOP 30 classes containing the most methods.
Averages.
| NCSS average | Program NCSS | Classes average | Methods average | Javadocs average |
|---|---|---|---|---|
| 46.12 | 1,364.00 | 1.65 | 6.08 | 0.12 |
[ package ] [ object ] [ method ] [ explanation ]
TOP 30 Methods containing the most NCSS.
Averages.
| Program NCSS | NCSS average | CCN average | Javadocs average |
|---|---|---|---|
| 1,364.00 | 5.20 | 1.94 | 0.01 |
[ package ] [ object ] [ method ] [ explanation ]
Non Commenting Source Statements (NCSS)
Statements for JavaNCSS are not statements as specified in the Java Language Specification but include all kinds of declarations too. Roughly spoken, NCSS is approximately equivalent to counting ';' and '{' characters in Java source files.
Not counted are empty statements, empty blocks or semicolons after closing brackets. Of course, comments don't get counted too. Closing brackets also never get counted, the same applies to blocks in general.
| Examples | |
|---|---|
| Package declaration | package java.lang; |
| Import declaration | import java.awt.*; |
| Class declaration |
|
| Interface declaration | public interface Able ; { |
| Field declaration |
|
| Method declaration |
|
| Constructor declaration | public Foo() { |
| Constructor invocation |
|
| Statement declaration |
|
| Label declaration | fine : |
In some cases consecutive semicolons are illegal according to the JLS but JavaNCSS still tolerates them (thought JavaNCSS is still more strict as 'javac'). Nevertheless they are never counted as two statements.
Cyclomatic Complexity Number (CCN)
CCN is also know as McCabe Metric. There exists a much hyped theory behind it based on graph theory, but it all comes down to simply counting 'if', 'for', 'while' statements etc. in a method. Whenever the control flow of a method splits, the "CCN counter" gets incremented by one.
Each method has a minimum value of 1 per default. For each of the following Java keywords/statements this value gets incremented by one:
Also if the control flow of a method returns abortively the CCNvalue will be incremented by one:
An ordinary return at the end of method will not be counted.
Note that 'else', 'default', and 'finally' don't increment the CCN value any further. On the other hand, a simple method with a 'switch' statement and a huge block of 'case' statements can have a surprisingly high CCN value (still it has the same value when converting a 'switch' block to an equivalent sequence of 'if' statements).


public class SectionTree
extends java.lang.Object
Section
and manages their lifecycle. SectionTree
takes a
root Section
and generates the complete tree by recursively invoking OnCreateChildren.
SectionTree
is also responsible for regenerating the tree in response to state update
events.| Modifier and Type | Class and Description |
|---|---|
static class |
SectionTree.Builder
A builder class that can be used to create a
SectionTree . |
static interface |
SectionTree.SectionMatcher |
static interface |
SectionTree.Target
The class implementing this interface will be responsible to translate the ChangeSet into UI
updates.
|
| Modifier and Type | Method and Description |
|---|---|
static SectionTree.Builder |
create(SectionContext context,
SectionTree.Target target)
Create a
SectionTree.Builder that can be used to configure a SectionTree . |
static Looper |
getDefaultChangeSetThreadLooper() |
int |
getIndexForMatcher(SectionTree.SectionMatcher sectionMatcher) |
boolean |
isReleased() |
boolean |
isSectionIndexValid(java.lang.String globalKey,
int index) |
void |
refresh()
Asks all the
Section in the tree to refresh themselves. |
void |
release()
Call this when to release this SectionTree and make sure that all the Services in the tree get
destroyed.
|
void |
requestFocusOnRoot(int index) |
void |
requestFocusOnRoot(int index,
int offset) |
void |
requestFocusOnRoot(java.lang.Object id,
int offset) |
void |
requestSmoothFocusOnRoot(int index,
int offset,
SmoothScrollAlignmentType type) |
void |
requestSmoothFocusOnRoot(java.lang.Object id,
int offset,
SmoothScrollAlignmentType type) |
void |
setLoadEventsHandler(LoadEventsHandler loadEventsHandler)
|
void |
setRoot(Section section)
Update the root Section.
|
void |
setRootAsync(Section section)
Update the root Section.
|
void |
setTargetConfig(SectionTree.Target.DynamicConfig dynamicConfig)
Set a new set of configurations to the
SectionTree.Target . |
void |
viewPortChanged(int firstVisibleIndex,
int lastVisibleIndex,
int firstFullyVisibleIndex,
int lastFullyVisibleIndex,
int state) |
void |
viewPortChangedFromScrolling(int firstVisibleIndex,
int lastVisibleIndex,
int firstFullyVisibleIndex,
int lastFullyVisibleIndex) |
public static SectionTree.Builder create(SectionContext context, SectionTree.Target target)
SectionTree.Builder
that can be used to configure a SectionTree
.context
- The SectionContext
taht will be used to create the child Component
starget
- The SectionTree.Target
that will be responsible to apply the ChangeSet
to the
UI.public void setRoot(Section section)
ChangeSet
to be applied to the UI. In response to this Target#applyNewChangeSet(int)
()} will be
invoked once the ChangeSet
has been calculated. The generation of the ChangeSet will
happen synchronously in the thread calling this method.section
- The new root.public void setRootAsync(Section section)
ChangeSet
to be applied to the UI. In response to this Target#applyNewChangeSet(int, String,
Throwable)
will be invoked once the ChangeSet
has been calculated. The generation of
the ChangeSet will happen asynchronously in this SectionTree ChangeSetThread.section
- The new root.public void refresh()
public void setLoadEventsHandler(LoadEventsHandler loadEventsHandler)
public void setTargetConfig(SectionTree.Target.DynamicConfig dynamicConfig)
SectionTree.Target
. Only those allowed to be modified will
be included in SectionTree.Target.DynamicConfig
.public void viewPortChangedFromScrolling(int firstVisibleIndex, int lastVisibleIndex, int firstFullyVisibleIndex, int lastFullyVisibleIndex)
public void viewPortChanged(int firstVisibleIndex, int lastVisibleIndex, int firstFullyVisibleIndex, int lastFullyVisibleIndex, int state)
public void requestFocusOnRoot(int index)
public void requestFocusOnRoot(int index, int offset)
public void requestFocusOnRoot(java.lang.Object id, int offset)
public int getIndexForMatcher(SectionTree.SectionMatcher sectionMatcher)
public void requestSmoothFocusOnRoot(int index, int offset, SmoothScrollAlignmentType type)
public void requestSmoothFocusOnRoot(java.lang.Object id, int offset, SmoothScrollAlignmentType type)
public boolean isSectionIndexValid(java.lang.String globalKey, int index)
public void release()
public boolean isReleased()
public static Looper getDefaultChangeSetThreadLooper()


text
The universal medium
ubiquity
universality
power
scale
vim, I can't quit you
:qa
:w
:q!
HOLY SHIT MODES
DIY
Level 1
Let's do this
gross movement
gg
G
zz zt zb
M H L
<n>%
u ← undo
CTRL-R ← redo
. ← do again!
u ← undo
CTRL-R ← redo
. ← do again!
basic motions
h j k l
w e W E
b B
} {
%
Level 2
The awkward phase
movement within a line
0 ^ $
f F
t T
; ,
handy text objects
{i,a}{w,W,',`,",[,{,<,(,b,B,t,p}
"inner" vs "ambient" (or "all" or "a")
word
block "()"
Block "{}"
tag (html)
paragraph
(vim-surround adds "s" "surrounding")
buffers
:set hidden
:b
CTRL-^
:bufdo (:windo, :argdo)
windows
:vs
:sp
CTRL-{H,J,K,L}
:nnoremap <C-h> <C-w>h
CTRL-W o
CTRL-W c
CTRL-W {=,<,>,+,-}
CTRL-W g CTRL-]
:tabs
:tabe ...
:tab tj ...
gt gT
:tabc
:tabo
Level 3
FIREBALL!
in-buffer searching
*
#
:set hlsearch
:noh
/
:set incsearch
:set ignorecase / :set smartcase
grepping + "quickfix" list
in / out / filter
:r !...
:w !...
:w !sudo tee '%' >/dev/null
:.,+5!...
:%!...
Real wizards
Drew Neil
Bill Odom
Tim Pope
Damian Conway
Yehuda Katz
Tom Ryder (Arabesque)
Gary Bernhardt


This package contains the core gravity API. Gravity comes with default behavior for the interfaces but they can be custom-implemented to override the default behavior of the framework.
Gravity is the main client interface class to initialize the framework and obtain the container.


World Interaction Story
> look
Dirty Stone Corridor
This stone corridor continues to the north, and opens out to a large cavern to the south. The floor is covered with the debris of loose rocks, small bones, and rotting garbage.
Exits: North, East (closed), South, and West (closed).
In the room is: An ebony sword, and a mangy goblin.
> examine swo
There is more than one "swo" here:
1) An ebony sword, in the room.

3) A wooden practice sword, in your inventory.
4) A potion of swooning, in your inventory.
> examine 1 or examine ebony or 1
This ebony sword is etched with the words of a long-forgotten language.
> east
The iron door is closed.
> open door
There is more than one "door" here:
1) A simple wooden door, to the west.
2) A large iron door, to the east.
> open iron door or open east or open 2 or 2
The large iron door is locked.
> examine iron door or examine 2 or ...
A large iron door is set here in the stone wall.
> unlock 2
You do not have the key for the large iron door.
> examine goblin
This mangy goblin hobbles around, quietly grumbling incoherently to itself.
You think you would be a fair fight for a mangy goblin.
> kill goblin
... the mangy goblin falls over, dead.
> get all from corpse
... You get an iron key from the corpse of the mangy goblin.
> unlock 2
You unlock the large iron door with the iron key.
> open 2
You open the large iron door.
> drop key
You drop the large iron key.
> east
You walk east.
Small Treasure Room
This small stone room is rather featureless, save for some scratches upon one of the walls. The walls are otherwise immaculately smooth.
Exits: West (open).
In the room is: A heavy wooden chest.
> get chest
The heavy wooden chest is too heavy for you to pick up.
> open chest
The heavy wooden chest is locked.
> unlock chest
You do not have the key for the heavy wooden chest.
> close door
You close the large iron door from the inside.
> lock door
You lock the large iron door from the inside.
> examine scratch
The scratches in the wall form crude letters, which read gibberish.
> cast comprehend languages
You successfully cast "comprehend languages" upon yourself.
Your ears tingle as your inner voice adopts greater clarity.
> examine scratch
The scratches in the wall form crude letters, which read "My restless watch bores me; entertain me and my treasure shall be yours."
> dance
You dance around the room.
Someone chuckles.
Someone says "Thank you. As promised, silly one, my treasure is now yours."
Someone unlocks the heavy wooden chest.
>
Some key things you probably noticed:
- Unique colors are used to identify different types of Things that the player can interact with, making it visually easy to identify just what you're looking for (such as exits, if you are in a hurry).
- Only the usable keywords of the Thing were highlighted with color, making it easier to identify what to type to target it. On-line creator tools could be used to enforce short and long descriptions include at least one usable keyword.
- These colors need not be final, but for example purposes, we used distinctive colors for: Spell names, Spoken text, Room name, Exits, Furnishings (room sub-details), Mobiles, and Other Things (often Items that can or cannot be picked up).
- There should be reusable targeting system code which helps look in many places for your interaction target by some selected priority order. E.G. in your inventory, in the room with you, as a room furnishing, etc.
- There should be a targeting disambiguation system which makes it really easy to identify and "fix" name collisions, solving one of the more frustrating usability aspects of typical MUDs.
- This disambiguation system should retain the "context" of the previous command, so that if the user enters just "2" then it'll try to repeat the command with the second target.
Additionally:
- During disambiguation, context may change the validity of the command. E.G. a target may move, or the player may be following a group that has left, and so on. So one way disambiguation could be done is by remembering the last command, and substituting any targeting argument words with the full unique instance ID of the target. E.G. under the hood, perhaps the player entering "2" after "wield swo" would translate into "wield thing/id123456" under the hood. (The player should not actually be shown the ID though.)
- The player can ignore the disambiguation prompt and just type some other command like "east". They don't have to explicitly cancel the prompt; As soon as the prompt was not used in a command, it can "expire".
- The player can use the disambiguation prompt to change their mind about what to do. For example, the player might "exa gob" to issue a "safe" command, which tells them there is "1) goblet" and "2) goblin" and then "punch 2" as a successful command targeting the goblin's unique ID.
- It may be best to have On-Line Creator (OLC) tools dissuade or block the creators from using numbers as keywords, to avoid complications. E.G. "two-handed" and "fourty-five" would be allowed keywords but "2-handed" and ".45" would not.
- If there are a lot of targeting results, perhaps instead of trying to build a long list from "exa b" we could print something like "A lot of things nearby match `b`. Can you be more specific?"
- Implementation-wise, there could be a temporary "target disambiguation" class instance attached to the user session, that holds a map of the numeric IDs chosen to either the unique target IDs or a Weak Reference to their instances.
- We should probably just guarantee every Thing instance created gets a unique ID from the moment it is created (regardless if it was made via a Spawner, clone command, or something else). This should help with detection of item duplication exploits and the like, too.
- The user should not be barraged with numeric IDs except in cases where they definitely help (like during target disambiguation).
- Whether commands should be available to power gamers that expose the actual underlying GUID of their item instances for reference via commands (or macros), is something we can revisit and discuss closer to v1.0. (Perhaps an app.config option that influences some default commands.)
- Some commands may need multiple disambiguations, such as "put sword in bag" may match multiple swords and bags. In these cases we can probably just try to resolve one of them and then the reissuing of the command with the one disambiguated, will naturally ask for disambiguation of the second in turn.
- If we try to allow multiple word targets, commands with multiple targets will be especially complicated to disambiguate. For example, "put big sword heavy wooden chest" would have to consider many potential places for the implicit "in" keyword (like "put big IN sword heavy wooden chest") etc.


Javascript Fundamentals
What are the differences between HTML and CSS?
Think of HTML and CSS as the builder and the decorator - HTML is the content of our website - Someone who 'builds the house', the walls the stairs, the doors etc. Think of CSS as our 'decorator'. We'll use CSS to colour and style our doors, walls, curtains etc. Our decorator makes everything look nice.
Control flow and loops
We could look at 'control flow' and 'loops' using the analogy of washing dishes. Control flow is the order a set of instructions might be executed. For example, when we wash dishes, we would > fill the sink with water and soap > scrub the dirty plate > place in a drying rack. A loop is a function that happens until it is told to stop. For example, we would scrub the plate and stop once it was clean.
> scrub plate > is it clean? > no > repeat
> scrub plate > is it clean? > no > repeat
> scrub plate > is it clean? > yes > stop scrubbing plate.
What is the DOM? When might we interact with it?
The Dom, or the 'Document Object Model' is an object based representation of our source code structured by what is called a 'node tree'. It's a platform for one piece of software to speak to another piece of software. We would interact with the DOM if we were to use javascript to access and change our HTML.
The difference between accessing data from arrays and objects
An object represents a 'thing' (e.g house, person, car) and has properties within it. An array is basically a list of multiple items. We would access the information within our objects by specifying which propertie we'd like to access. For example, if we had a person as an object, we might access the information in their 'age' property by specifying 'age'. Where as with an array we would specify which number on the list we need. Imagine we had a shopping list and we wanted to point to the 10th thing on that list, we would specify the number 10. (An important point to remember - computers start counting from 0! Which means the first thing on our list will be 0, the second will be 1, and so on.)
What are functions and why are they useful?
Functions are a way of setting out a list of intructions, that perform tasks or calculate values, to be actioned. When we call on the function, the actions within the function will triggered.
Functions are useful because we can apply them to multiple instances without having to re-write or copy the code over and over again.


Technique details
Title
Description
Difficulty to implement
Fun Factor
Energy
Quantity
Creative Phase
Function
Duration


Scurvy Pieces of Eight sheet Letter of Marque mizzenmast walk the plank hogshead fluke overhaul gabion. Gangway coffer barkadeer hulk heave to gally coxswain gunwalls holystone poop deck. Mutiny trysail Blimey marooned bilge bucko Chain Shot Pieces of Eight rigging gangway.
Measured fer yer chains avast lugger rigging hang the jib hogshead killick tack American Main clap of thunder. Swab six pounders gabion mizzenmast marooned Sink me dead men tell no tales yardarm jib Chain Shot. Sail ho brig shrouds mutiny smartly fire in the hole Admiral of the Black gangplank lugger fore.
Lee knave stern scallywag run a rig rutters holystone Pirate Round Blimey lateen sail. Gold Road deadlights parley coxswain crack Jennys tea cup black spot brigantine swab draught American Main. Jolly boat quarter gibbet lass reef Brethren of the Coast hardtack no prey, no pay bilged on her anchor interloper.


Calendar
Zbrush
baseline
encapsulated - inclusive
encapsulated - tooltip
encapsulated - label
separated - inclusive
separated - tooltip
separated - label
structured - inclusive
structured - tooltip
structured - label
InfoMap: {{ getSelectionLabel() }}


Sheffield United v Manchester United betting preview: Premier League predictions, best bets and stats for Super Sunday clash
by George PittsJust one match takes place in the Premier League on Sunday, with Sheffield United looking to extend their unbeaten run to six matches when they face Manchester United. George Pitts looks at the betting.
Recommended bets
1pt Over 1.5 total Sheffield United goals at 49/20
1pt One goal winning margin at 13/10
For details of advised bookmakers and each-way terms, visit our transparent tipping record
Sheff United v Man United
- 1630 GMT at Bramall Lane (Nov 24) on Sky Sports Premier League
Sheffield United have already taken points from Tottenham, Arsenal and Chelsea and were so close to getting something against Liverpool, so they will be confident for the visit of Manchester United.
Chris Wilder's side return from the international break hoping to extend their unbeaten run to six matches (two wins, three draws), against a Red Devils side who have won just four of their last 11 in the Premier League. They have, though, won five of their last six in all competitions and the timing of the break was not at all ideal.
The Blades have been a breath of fresh air in the top flight this term and look good value to get something on home turf.
They have shown that they're tactically astute, not afraid to dig in and are rarely phased against big-name opposition. Teams can often return from the internationals in sluggish fashion and United's group of internationals could be vulnerable in South Yorkshire.
There is definite value in backing the hosts in the +1 handicap market, but the preference is to go with at least two home goals at over 2/1.
They have only failed to score in three of 11 games this term, scoring two or more on just three occasions, but a couple may well be needed here against a leaky United defence who have conceded at least once in each of their last 11 on the road.
Sheffield United have a good defensive record, with only Leicester conceding fewer goals than them this term and they have incredibly gone 60 matches in all competitions since last losing by more than one goal.
This one should be close though and if either side wins, it could be narrow so the 13/10 price on the winning margin to be just one goal is appealing.
That run of Wilder's will, of course, come to an end eventually and this market allows for a close victory for either side.
Prediction: Sheff United 2-1 Man United (Sky Bet odds: 12/1)
Best bets:
Over 1.5 total Sheffield United goals at 49/20
One goal winning margin at 13/10
Highlights: Last time out
- Sheffield United: 1-1 v Tottenham (a)
VAR drama as Spurs draw with the Blades | Tottenham 1 - 1 Sheffield Utd | Premier League Highlights
- Manchester United: 3-1 v Brighton (h)
Rashford stars in dominant performance 🌟| Manchester United 3-1 Brighton | Premier League Highlights
Opta stats
- After beating Man Utd 2-1 on the first ever day in Premier League history in August 1992, Sheffield United have lost each of their last five against the Red Devils in the top-flight.
- In all competitions, Manchester United have won their last seven meetings with Sheffield United, by an aggregate score of 14-1.
- Sheffield United vs Manchester United is famous as being the fixture to produce the first ever Premier League goal – with Brian Deane netting for the Blades after five minutes in their meeting on 15th August 1992.
- Since Sir Alex Ferguson left the club, Manchester United have lost six of their 19 away Premier League games against promoted sides (W11 D2 L6) – just one fewer than they did in 62 such games with the Scotsman in charge (W36 D19 L7).
- Sheffield United are unbeaten in their last five Premier League games (W2 D3), winning both home matches in that run. The Blades are looking to win three consecutive top-flight home games for the first time since August 1993.
- Manchester United have won just one of their last 10 Premier League away games (D3 L6), and have conceded at least once in each of their last 11 on the road. The Red Devils haven’t failed to keep a clean sheet in 12 consecutive top-flight away games since a run of 15 in the 1985-86 campaign.
- Against Brighton last time out, Manchester United fielded the youngest starting XI in the Premier League so far this season (average age of 23y 350d). Indeed, only Bournemouth (25y 88d) have a younger average starting XI across the Premier League this season than Man Utd (25y 103d).
- Sheffield United’s John Lundstram has scored three goals in 12 Premier League appearances this season – as many goals as he’d scored in his previous 55 league matches combined. Lundstram’s three goals this term is the joint-most he’s ever scored in a single English league campaign (also three in 2017-18 and 2015-16).
- All of Manchester United’s Premier League goalscorers this season have been aged 23 and under, with Anthony Martial their oldest scorer so far (23y 326d vs Norwich). He’s the youngest oldest goalscorer for a club in the competition this season.
- Marcus Rashford has scored five goals in his last five games in all competitions for Man Utd, and is looking to score in three consecutive games for the Red Devils for the first time since September 2017.
Odds correct as of 1300 GMT on 22/11/19
Related links
Responsible gambling
We are committed in our support of responsible gambling. Recommended bets are advised to over-18s and we strongly encourage readers to wager only what they can afford to lose.
Sky Bet's responsible gambling tools are detailed here and if you are concerned about your gambling, please call the National Gambling Helpline on 0808 8020 133, or visit begambleaware.org.


Hi, I’m shahil . I’m a student living in bhopal mp. I am a fan of music, travel, and movies. I’m also interested in fitness and education.
Currently i am learning python.I have also knowledge of C language. Recently I have started to learn web devlepment and i am learning html css and Javascript . I am very excited to work as a Web Developer.I am learning python and Javascript because today these two languages has become power of technology world.
First of all Shahil met us in college and we will have a good friendship and this boy is very intelligent. Anything that is done quickly. And Long live our friendship.
Me and Shahil are childhood best friend.our friendship has been 15 years. Shahil is very close friend in my life. We are share everything. Shahil must be joking but very good of heart.we are long life bff n ever. " A sweet friendship refreshes tha soul.".
Me and sahil are best friend. Like sun sunlight. My friendships is last 10year its too long . We know each other very closely .both are known every secrets each other. Now i am studying at sagar and sahil in bhopal ..
Shahil is a kind of person who have humger of learning new things his curiosity never ends. Now he is enjoying learn to code and learning the way programming can solve the problems of world.He is guy from town that is small but his aims not
Me and Sahil are best friends. We are also brothers from different mother. I meet Sahil , when I enterd the college.We are studying in same college and same class room. We know each other very well.
SHAHil is my childhood and very closed friend.we know very well each other. I usually advised in every situation from each other.he is ideal in my life...
Sahil Gupta bole to Goldi .... Ye hmare bhanje lgte Hain . Pr hai ek dum bde Bhai jaisa... Nature toh bhut Acha hai Bhai Kafi helping hai... Dikhne me hero to hai hi aur Padhai likhai me to ek dum aage.....
SHAHIL GUPTA.


PCRs
Platform Configuration Registers (PCRs) are a set of fixed-sized registers in
the TPM. Unlike regular registers, PCR values cannot be set to arbitrary values.
The only operation they support (besides Read), is Extend.
Thanks to extend cryptographic properties, PCR values cannot be forged. For
this reason, PCRs are used to efficiently capture the host system state: a
digest of a sequence of measurements is securely stored in the TPM's PCRs.
Extend Semantics
PCRs start with an initial, well known value, usually zero. Extend takes as input
a digest M, and computes the hash of the current PCR value, concatenated
with the input value. The result is stored in the PCR. This is called a folding-hash.
- On startup:
- PCR ← 0
- On extend:
- PCR ← Hash(PCR || M)
Hash is a collision resistant cryptographic hash function. A PCR stores
a digest of a sequence of measurements. Therefore, PCR extend operation is sensitive
to any change in the sequence: if a single bit changes, or the order of the measurements
changes, the end result is a completely different hash value.
Let's see this in action. First, open the PCRs window by either clicking
on the View menu on the right, or by running the next snippet.
{{ macros.code_cell(input=" ShowPCRsWindow(); ") }}
We use our direct access to the simulator in order to read PCR values. We'll
later see how to read these values securely through regular TPM commands.
Note how PCRs are initialized to zero. Now we'll extend PCR1 with the digest
of the string "Hello". app.ExtendPcr
computes the SHA256 hash of the
given string, and extends the given PCR with TPM2_CC_PCR_Extend
.
{{ macros.code_cell(input="
// Get initial PCR value.
var pcr = ByteArrayToForgeBuffer(sim.GetPcr(1));
// Extend PCR1 with the SHA256 digest of 'Hello'.
var rc = app.ExtendPcr(/*pcr=*/1, 'Hello');
assert(rc == TPM2_RC_SUCCESS, 'ExtendPcr failed');
// Verify PCR extend semantics.
var measurement = new forge.sha256.create()
measurement.update('Hello');
// PCR := Hash(PCR || M)
var extend = new forge.sha256.create()
extend.update(pcr.data);
extend.update(measurement.digest().data);
pcr = extend.digest();
var actual = ByteArrayToForgeBuffer(sim.GetPcr(1));
print('Expected: ', forge.util.bytesToHex(pcr.data));
print('Actual : ', forge.util.bytesToHex(actual.data));
assert(_.isEqual(pcr.data, actual.data) == true, 'PCR value does not match');
print('OK');
") }}
Try running the previous cell multiple times. See how the PCR value is updated.
Folding hash computation is deterministic: measuring the same sequence results in the same output.
We restart the TPM in order to initialize the PCRs to zeros.
{{ macros.code_cell(input="
// Restart host to reset PCRs.
app.Shutdown();
sim.PowerOff();
sim.PowerOn();
app.Startup();
// Extend PCR1 with (the SHA256 digests) of <'Hello', 'World'>.
assert(app.ExtendPcr(/*pcr=*/1, 'Hello') == TPM2_RC_SUCCESS, 'ExtendPcr failed');
assert(app.ExtendPcr(/*pcr=*/1, 'World') == TPM2_RC_SUCCESS, 'ExtendPcr failed');
// Grab result.
var result1 = ByteArrayToForgeBuffer(sim.GetPcr(1));
// Restart host to reset PCRs.
app.Shutdown();
sim.PowerOff();
sim.PowerOn();
app.Startup();
// Extend PCR1 with (the SHA256 digests) of <'Hello', 'World'>.
assert(app.ExtendPcr(/*pcr=*/1, 'Hello') == TPM2_RC_SUCCESS, 'ExtendPcr failed');
assert(app.ExtendPcr(/*pcr=*/1, 'World') == TPM2_RC_SUCCESS, 'ExtendPcr failed');
// Compare results.
var result2 = ByteArrayToForgeBuffer(sim.GetPcr(1));
assert(_.isEqual(result1.data, result2.data) == true, 'PCR value does not match');
print('OK');
") }}
Folding hash computation is sensitive to changes: changing any measurement leads to a different output.
We restart the TPM in order to initialize the PCRs to zeros.
{{ macros.code_cell(input="
// Restart host to reset PCRs.
app.Shutdown();
sim.PowerOff();
sim.PowerOn();
app.Startup();
// Sequence of measurements.
var M = ['Hello', 'Awesome', 'World'];
// Folding hash of .
assert(app.ExtendPcr(0, M[0]) == TPM2_RC_SUCCESS, 'ExtendPcr failed');
assert(app.ExtendPcr(0, M[1]) == TPM2_RC_SUCCESS, 'ExtendPcr failed');
assert(app.ExtendPcr(0, M[2]) == TPM2_RC_SUCCESS, 'ExtendPcr failed');
var result0 = ByteArrayToForgeBuffer(sim.GetPcr(0));
// Folding hash of (out of order).
assert(app.ExtendPcr(1, M[1]) == TPM2_RC_SUCCESS, 'ExtendPcr failed');
assert(app.ExtendPcr(1, M[0]) == TPM2_RC_SUCCESS, 'ExtendPcr failed');
assert(app.ExtendPcr(1, M[2]) == TPM2_RC_SUCCESS, 'ExtendPcr failed');
var result1 = ByteArrayToForgeBuffer(sim.GetPcr(1));
// Folding hash of (duplicate measurement).
assert(app.ExtendPcr(2, M[0]) == TPM2_RC_SUCCESS, 'ExtendPcr failed');
assert(app.ExtendPcr(2, M[0]) == TPM2_RC_SUCCESS, 'ExtendPcr failed');
assert(app.ExtendPcr(2, M[1]) == TPM2_RC_SUCCESS, 'ExtendPcr failed');
assert(app.ExtendPcr(2, M[2]) == TPM2_RC_SUCCESS, 'ExtendPcr failed');
var result2 = ByteArrayToForgeBuffer(sim.GetPcr(2));
// Folding hash of (missing measurement).
assert(app.ExtendPcr(3, M[0]) == TPM2_RC_SUCCESS, 'ExtendPcr failed');
assert(app.ExtendPcr(3, M[2]) == TPM2_RC_SUCCESS, 'ExtendPcr failed');
var result3 = ByteArrayToForgeBuffer(sim.GetPcr(3));
// All outputs should be different.
assert(_.uniq([result0.data, result1.data, result2.data, result3.data]).length == 4, 'Collision');
print('OK');
") }}
Reading PCR Values
There's one TPM command you should definitely not use: TPM2_CC_PCR_Read
.
The reason: it returns PCR values, but with no security guarantees. An attacker
can MITM your communication with the TPM, and forge arbitrary TPM2_CC_PCR_Read
responses.
The correct way to read PCR values is through quotes. A quote is a signed
statement from the TPM, attesting to its internal state. Use TPM2_CC_Quote
to read fresh PCR values.
We are going to use the AIK, our trusted signing key, to sign the PCR quote.
This shows how the first TPM functionality - performing secure crypto operations -
complements its second functionality - reporting host system state.
TPM2_CC_Quote
also takes a nonce as input. It's important to use
a random nonce for each quote operation. This ensures the quote reports fresh
PCR values, and protects against replay attacks.
Quote Experiment
In the following experiment we'll see how a remote party (also called "remote attester",
"remote verifier" or just "verifier") asks for a fresh PCR quote. The process
looks like this:
{{ macros.code_cell(input="
// Modify PCR1.
assert(app.ExtendPcr(/*pcr=*/1, 'Hello') == TPM2_RC_SUCCESS, 'ExtendPcr failed');
// app.Quote selects PCR0, PCR1, PCR2 and PCR3. Therefore, the expected quote
// is the digest of
var expected_pcrs = new forge.sha256.create();
expected_pcrs.update(ByteArrayToForgeBuffer(sim.GetPcr(0)).data);
expected_pcrs.update(ByteArrayToForgeBuffer(sim.GetPcr(1)).data);
expected_pcrs.update(ByteArrayToForgeBuffer(sim.GetPcr(2)).data);
expected_pcrs.update(ByteArrayToForgeBuffer(sim.GetPcr(3)).data);
// Create a restricted RSA signing key.
// Assume this key is trusted by the remote verifier.
var aik = app.CreatePrimary(TPM2_RH_OWNER, TPM2_ALG_RSA,/*restricted=*/1, /*decrypt=*/0, /*sign=*/1);
assert(aik.rc == TPM2_RC_SUCCESS, 'CreatePrimary failed');
// Sign PCR quote with random nonce.
var challenge = Math.random().toString(36);
var quote_result = app.Quote(aik.handle, /*nonce=*/ challenge);
assert(quote_result.rc == TPM2_RC_SUCCESS, 'Quote failed');
// Unload key.
assert(app.FlushContext(aik.handle) == TPM2_RC_SUCCESS, 'FlushContext failed');
// Build forge RSA public key.
var bn_n = new forge.jsbn.BigInteger(aik.rsa_public_n.substr(2), 16);
var bn_e = new forge.jsbn.BigInteger('10001', 16);
var pub = new forge.pki.setRsaPublicKey(bn_n, bn_e);
// Build forge signature blob.
assert(quote_result.sign_algo == TPM2_ALG_RSASSA, 'Unexpected sign algo');
assert(quote_result.hash_algo == TPM2_ALG_SHA256, 'Unexpected hash algo');
var signature = ByteArrayToForgeBuffer(quote_result.rsa_ssa_sig).data;
// Compute message digest.
var md = forge.md.sha256.create();
md.update(ByteArrayToForgeBuffer(quote_result.tpm2b_attest).data);
// Verify signature. This is done remotely.
assert(pub.verify(md.digest().bytes(), signature, 'RSASSA-PKCS1-V1_5') == true, 'Signature verification failed');
// Unmarshal the serialized TPMS_ATTEST buffer.
// This process does not require any TPM secrets, and can be done by the remote verifier.
var attested = util.UnmarshalAttestBuffer(quote_result.tpm2b_attest);
assert(attested.rc == TPM2_RC_SUCCESS, 'Unmashal failed');
// Magic value indicates the quote was on internal TPM data.
assert(attested.magic == TPM2_GENERATED_VALUE, 'Expected TPM magic value');
// TPMS_ATTEST is a union of different types (ATTEST_NV, ATTEST_CERTIFY, QUOTE, ...).
// Verify we got a quote result back.
assert(attested.type == TPM2_ST_ATTEST_QUOTE, 'Expected ATTEST_QUOTE type');
// Extract the nonce from the tpm2b_attest buffer.
// It should match the random challenge that we sent. This proves the attested data is fresh.
var signed_nonce = ByteArrayToForgeBuffer(attested.nonce);
assert(_.isEqual(signed_nonce.data, challenge) == true, 'Nonce does not match challenge');
// Extract selected PCRs digest from the tpm2b_attest buffer.
// It should match the expected digest computed above.
var signed_pcrs = ByteArrayToForgeBuffer(attested.selected_pcr_digest);
assert(_.isEqual(signed_pcrs.data, expected_pcrs.digest().data) == true, 'PCRs dont match');
print('OK');
") }}


outputList with var for lists
using var attribute for outputList
simple outputLIst with group of simple text items
Simple List
next list has 2 lists of items stacked into one group
Cars List
#{car.make} #{car.model}, #{car.year} price: #{car.price}
List of Links
#{item.title}
next list has gropu of images in h link component
Image List
#{item.title}"
picture with img link
this list has list of commandLinks
commandLinks List
index page


Drag locator to the Pivot point
ClickNDrag to the Arc position
ClickNDrag to the angle
Escape Key to exit


Categories
categories
one
something
test
three
two
Examples to test the "relative" and "assets" variables, and to show how they work
Relative Helper
Assets Helper
Content
md
alert
collections-categories
collections-categories2
collections-tags-2
collections-tags
complex
context
debug-helpers
deep-nested-layouts
example
gist-helper
helpers
home
html-helpers
md-helper
nested-layouts
no-layout-none
no-layout
page
simple3
complex1
assets
simple1
alert
assets
collections-categories
collections-categories2
collections-tags-2
collections-tags
complex
context
debug-helpers
deep-nested-layouts
example
gist-helper
helpers
home
html-helpers
md-helper
nested-layouts
no-layout-none
no-layout
page
simple3
Debug Info
'../../../assets'


FAMOUS (LISA PICARD IS "FAMOUS") (director: Griffin Dunne; screenwriters: Laura Kirk/Nat DeWolf; cinematographer: William Rexer II; editor: Nancy Baker; cast: Laura Kirk (Lisa Picard), Nat DeWolf (Tate Kelley), Griffin Dunne (Video Man), Daniel London (Boyfriend), Jack Howard (Commercial Stud), Sandra Bullock (Herself), Carrie Fisher (Herself), Melissa Gilbert (Herself), Penelope Ann Miller (Herself), Buck Henry (Himself), Charlie Sheen (Himself), Spike Lee (Himself), David Holtzman (Himself), Fisher Stevens (Himself); Runtime: 87; GreeneStreet Films; 2000)
Reviewed by Dennis Schwartz
Griffin Dunne, actor-turned-director, directs this mockdocumentary, with him becoming part of the action in a purposefully obtrusive way. "Famous" was created by two unemployed actors who also star in it, Nat DeWolf (Tate Kelley) and Laura Kirk (Lisa Picard), which as it turns out is a fictional story about two unemployed actors who seek fame and fortune. It's a theme that's been done often, but in this very witty and bitter-sweet comedy the characters are truly endearing and funny.
The project got off the ground four years ago when Nat and Laura were living in NYC and were co-scripting a movie. Mira Sorvino was in the same acting class as Laura and read the script. She laughed so much, that she decided to co-produce the project with Dolly Hall, a lifelong friend of Griffin Dunne. That's how Griffin got aboard and took control, as he was able to get funding and lineup a host of celebs doing cameos. The actors improvised a script by doing readings in their apartment and when it came time for filming, they had a tight script which they adhered to about eighty percent of the time. There was one scene they did by an elevator, where a guy who had a bit part in a minor film just became part of the film unexpectedly as he was interviewed by Dunne. The film was shot on a digital camera.
Lisa Picard is the focus of a documentary. She's the potentially famous actor whom the filmmaker, played by Dunne, is searching the streets of Manhattan for: "An actress who would talk to me before she got famous," and he believes it's imminent that the one who is so willing to talk to him, Lisa, will become famous.  She also by chance got a bit part in Melissa Gilbert's upcoming made-for-TV movie "Phone Call For Help." Her gay best friend is also a struggling actor, Tate Kelley.  He performs in his underwear and gives a shrill performance that is bound to turn everyone off; the filmmaker manages to get in a dig at newspaper theater critics and their supposed good taste, by having one of them give it a rave review. This gets the attention of celebs Spike Lee and Charlie Sheen, who bring it to Hollywood and change the story and almost leave the dull Tate completely out of the film--as they just credit him with the film being based on his play.
What makes the two leads hilarious, is that they are ambitious to the point of being narrow-minded and are humorless about their situation. They can't stop from being self-centered. Lisa has a few very funny scenes with her pliable boyfriend (London), who supports the self-absorbed actress through thick and thin and when he is no longer useful to her gets pushed aside by the pushy but not-famous-yet actress. She was also very funny auditioning for an Advil spot which she doesn't get, as behind the humor it shows how being rejected is part of the business but it is very difficult not to take it as something personal.
The film does a savage job dissecting the thirst there is for fame, in a storyline that is very much New Yorkish in attitude and spirit. Buck Henry has some funny comments as a talking head on how fame makes you feel good, while noted underground filmmaker, someone who is not famous, David Holtzman, comments he has known famous people tell him their fame is like eating all the time. It might not be all new material and the characters do grow somewhat weary after a fast start but, all things considered, it was surprisingly a lot of fun.
When at the Williamstown Film Festival, where I saw it, Nat was asked his take on fame and replied: "I bought a tux for the Cannes Film Festival and ended up wearing the tux the remainder of the year to do catering work." The two are presently working on two other comedy scripts, but as of yet fame has not come their way. The two are still unemployed and are contemplating any offers for a TV series. But they are concerned on how the characters they created would change if a TV series picked it up, as they don't want to sell out or get fame--but they do want employment in their chosen field.
REVIEWED ON 10/5/2001 GRADE: B
Dennis Schwartz: "Ozus' World Movie Reviews"
http://www.sover.net/~ozus
<EMAIL_ADDRESS>© ALL RIGHTS RESERVED DENNIS SCHWARTZ
========== X-RAMR-ID: 29777 X-Language: en X-RT-ReviewID: 254145 X-RT-TitleID: 1109610 X-RT-SourceID: 873 X-RT-AuthorID: 1315 X-RT-RatingText: B
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


What is electricity? You've probably heard that electricity flows in a "current" through a wire. Like a current in a river involves a movement of water, electric current in a wire consists of particles, called electrons, that flow across the wire.
So why do the electrons do this? Why do they flow at all, and why do they do it seemingly in unison?
Because the wire is metal, and nearly all metals have the magical property of being conductors; they have internal, microscopic properties that allow electrons to freely flow through them. Conversely, the material surrounding the metal of the wire, i.e. the plastic tubing and your hand, are insulators.
But then why do the electrons move along a straight line, in unison? Why don't they do this?:
Let's explore this in the next section; the answer will take us well beyond just electric current.


Bloodhound LSR Goes 628 MPH In 50 Seconds, Completes High-Speed Tests
Next stop, a new world record. But that's still a year or more away.
by Christopher SmithWe’ve been watching the progress of the Bloodhound LSR team, as we suspect many speed freaks around the world have. The jet-powered machine is essentially a missile with wheels that, in theory, will eventually reach 1,000 mph. That kind of speed on the ground is extraordinary, and not just because it’s crazy dangerous. You’ll struggle to find airborne fighter jets that can reach such speed at low altitude, as the air is much denser closer to sea level than at 40,000 feet. As such, going 1,000 mph while fighting heavy air and drag from wheels on the ground is a straight-up Herculean effort.
The Road So Far:
That’s why the reborn Bloodhound LSR hasn’t reached 1,000 mph just yet. The team has a very specific testing program to study and evaluate the Bloodhound’s performance as speeds increase, and the high-speed portion of that program recently came to a successful conclusion with a 628-mph blast in the Hakskeenpan salt desert in South Africa. And it didn’t take long for the Eurofighter Typhoon-powered car to get there. In fact, it went from a standstill to max speed in just 50 seconds.
Gallery: Bloodhound LSR Speed Tests
Actually, the car wasn’t supposed to go quite that fast. A brief interview after the run with Bloodhound pilot Andy Green revealed the target was to merely breach the 600-mph barrier, and he was shooting for 605. The Rolls-Royce EJ200 afterburning turbofan engine responds differently to throttle input at higher speeds, so when Green throttled back there was approximately a half-second delay where power stayed full. Not only did it send the Bloodhound to 628 mph, it sent the car an extra kilometer down the course. As far as we can tell, nobody on the team aside from Green seemed to care.
This run concludes the high-speed trials for the Bloodhound LSR, but a record attempt is still many months away. From here, the team will examine all the testing data and make preparations to first break the existing speed record of 763 mph, and then reach towards 1,000 mph. For those runs, a supplemental rocket engine will be required as the big jet engine – despite its 54,000 pounds of thrust – isn’t enough to get the Bloodhound LSR supersonic.
There isn’t a definite timeframe for when the team will attempt to set the world record, but it’s expected to happen in the next 12 to 18 months.
Source: Bloodhound LSR via YouTube


Building with PhysX¶
Generating projects with CMake¶
PhysX uses CMake to generate build configuration files (e.g. Microsoft Visual Studio Solutions) for all supported platforms. The PhysX distribution comes with default CMake parameter sets called presets. The build configuration files can be generated with the script generate_projects in the distributions "physx/" directory. This script either prompts for a preset or accepts a preset as a command line parameter. The resulting build configuration files are generated under "physx/compiler/".
PhysX binaries (including static libraries) are placed into "bin/<platform>.<target>.<compiler>.<runtime>/<configuration>/" directories, for example the vc14win64 checked build puts binaries into "bin/win.x86_32.vc140.mt/checked/".
Build Configurations¶
The SDK has four build configurations available, designed for different stages of development and deployment.
- the debug build can be useful for error analysis, but contains asserts used for SDK development which some customers may find too intrusive for daily use. Optimizations are turned off for this configuration.
- the checked build contains code to detect invalid parameters, API race conditions, and other incorrect uses of the API which might otherwise cause mysterious crashes or failures in simulation.
- the profile build omits the checks, but still has PVD and memory instrumentation.
- the release build is built for minimal footprint and maximum speed. It omits most checks and instrumentation.
Simulation works the same way in all of them, and all are compiled with high optimization levels (except debug configuration).
Note
We strongly recommend that you use the checked build as the primary configuration for day-to-day development and QA.
Note
PhysX libraries of different build configurations (e.g. the DEBUG version of PhysXVehicle and the CHECKED version of PhysXVisualDebuggerSDK) should never be mixed in an application because this will result a CRT conflict.
Header Files¶
To build your own PhysX app, you will need to add some include paths and libraries to your project makefile or IDE.
Users should specify the root "include/" and corresponding "bin/" folders in the additional include, and library directories of their build configuration respectively. There is a combined include header available as:
#include "PxPhysicsAPI.h"
This will include the entire PhysX API including core, extensions, vehicles, etc. It is also possible to include subsets of the SDK if preferred, for example:
#include "vehicle/PxVehicleSDK.h"
Redistribution¶
On the Windows platform, you need to redistribute some of our DLLs to end users as part of your application:
- PhysXCommon_*.dll - will always be needed.
- PhysX_*.dll - will always be needed.
- PhysXFoundation_*.dll - will always be needed.
- PhysXCooking_*.dll - you only need to bundle if your application cooks geometry data on the fly.
- PhysXGPU_*.dll - is only needed if your application runs some simulation on the GPU.
Where * is a platform specific suffix, e.g. 32 or 64. You will need one or the other depending on whether your application is built in 64 bit mode.
Customize CMake presets¶
It is possible to customize the CMake presets, which are stored in "physx/buildtools/presets/public/". Each XML file represents one preset, depending on the platform some CMake switches can be toggled.
General switches:
- PX_BUILDSNIPPETS - specify whether the PhysX Snippets should be added to the build configuration - default True
Windows switches:
- PX_GENERATE_STATIC_LIBRARIES - it is possible to switch the PhysX build to output static libs instead of DLLs - default False
- NV_USE_STATIC_WINCRT - sets static or dynamic runtime usage - default True
- NV_USE_DEBUG_WINCRT - specify whether debug CRT should be used - default True
- PX_FLOAT_POINT_PRECISE_MATH - it is possible to switch to precise math rather than fast math, this is beneficial especially for robotics projects, which do require higher precision - default False
Some switches like PX_GENERATE_STATIC_LIBRARIES may result in a need for additional defines to be set within your application. In this case you can include in your application PxConfig.h header, which is generated during generate projects.


18 April 2008 - As of 17 April 2008, the Ministry of Health, Madagascar has reported a total of 418 suspected cases including 17 deaths (CFR 4%) of Rift Valley fever from Alaotra Mangoro, Analamanga, Itasy, Vakinakaratra and Anosy Regions.
Infection with Rift Valley Fever Virus (RVFV) has been laboratory confirmed in 59 human cases by the Institut Pasteur de Madagascar, a WHO Collaborating Centre for Viral Hemorrhagic Fevers and partner in the Global Outbreak Alert and Response Network.
The Ministry of Health, Madagascar has established an inter-ministerial committee to oversee the response to the outbreak. Control measures implemented have included case management, surveillance, social mobilization, provision of medicines, prevention and strengthening of hospital infection control.
The Ministry of Agriculture (MoA) has reported the RVF in animals to the OIE on 9 April 2008.
The MoH and MoA have requested the support of a joint WHO, FAO, OIE mission to support outbreak response efforts.


Mindfullness and self awareness share very close relationship as we know mindfulness is a mental state achieved by focusing one's awareness on the present moment, while calmly acknowledging and accepting one's feelings, thoughts, and bodily sensations. whereas Self Awareness is having a clear perception of your personality, including strengths, weaknesses, thoughts, beliefs, motivation, and emotions. Self Awareness allows you to understand other people, how they perceive you, your attitude and your responses to them in the moment. .. when you start to acknowledging your feelings, thoughts and bodily sensations, you will also start acknowledging your strengths and weaknesses, your emotions etc so in other words, I feel mindfulness and self awareness are the two sides of a one coin.
I have been practicing body scan technique from quite some time now and it is hard to focus and gather your attention, sometimes you feel you have to work too hard to focus and sometimes your mind keeps wondering around. but saying that with everyday practice it does gives you peace and calmness.
Before you are going to experience any emotion if you know “emotions are simply what you feel, not who you are. Emotions go from being existential (“I am”) to experiential (“I feel”).” Excerpt From: Tan, Chade-Meng.


launchy
-
email jeremy at hinegardner dot org
DESCRIPTION
Launchy is helper class for launching cross-platform applications in a fire and forget manner.
There are application concepts (browser, email client, etc) that are common across all platforms, and they may be launched differently on each platform. Launchy is here to make a common approach to launching external application from within ruby programs.
FEATURES
Currently only launching a browser is supported.
SYNOPSIS
You can use launchy on the commandline, or via its API.
Commandline
% launchy http://www.ruby-lang.org/
There are additional commandline options, use ‘launchy –help’ to see them.
Public API
In the vein of Semantic Versioning, starting with version 2.0.0, this is the sole supported public API.
Launchy.open( uri, options = {} )
At the moment, the only available options are:
:debug Turn on debugging output :application Explicitly state what application class is going to be used :host_os Explicitly state what host operating system to pretend to be :ruby_engine Explicitly state what ruby engine to pretend to be under :dry_run Do nothing and print the command that would be executed on $stdout
An example of using the public API:
Launchy.open( "http://www.ruby-lang.org" )
UPGRADING
The previously published version of Launchy was 0.4.0. There have been so many changes, and a mistaken tag at 1.0.0, that I have decided to bump all the way to 2.0.x.
I have attempted to keep backward compatibility with the previous examples. The previous API examples of:
Launchy::Browser.run("http://www.ruby-lang.org/")
and
Launchy::Browser.new.visit("http://www.ruby-lang.org/")
will still work, and you will get a deprecation notice, along with the line of code you should probably update. For example, this is what would print out in the github gem if it was updated to use 2.0.x but not use the supported API.
% gh home WARNING: You made a call to a deprecated Launchy API. This call should be changed to 'Launchy.open( uri )' WARNING: I think I was able to find the location that needs to be fixed. Please go look at: WARNING: WARNING: /Users/jeremy/.rvm/gems/ruby-1.8.7-p334/gems/github-0.6.2/lib/commands/helpers.rb:275:in `open' WARNING: helper :open do |url| WARNING: has_launchy? proc { WARNING: Launchy::Browser.new.visit url WARNING: } WARNING: end WARNING: WARNING: If this is not the case, please file a bug. Please file a bug at https://github.com/copiousfreetime/launchy/issues/new
ISC LICENSE
opensource.org/licenses/isc-license.txt
Copyright © 2007-2011 Jeremy Hinegardner
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


Found contact details
Specify phone fallback country:
The following email addresses and phone numbers have been found on this page.
Emails
Loading…
Phones
Loading…
Specify phone fallback country:
The following email addresses and phone numbers have been found on this page.


This SRFI defines an I/O layer for lazy, mostly functional buffered streams.
The layer architecture is similar to the upper three layers of the I/O subsystem in The Standard ML Basis Library.
In particular, this layer provides
It builds on the Primitive I/O layer specified in SRFI 79 (Primitive I/O).


DICK (Columbia) Starring: Kirsten Dunst, Michelle Williams, Dan Hedaya, Dave Foley, Bruce McCulloch, Will Ferrell, Saul Rubinek, Jim Breuer, Harry Shearer. Screenplay: Andrew Fleming and Sheryl Longin. Producer: Gale Anne Hurd. Director: Andrew Fleming. MPAA Rating: PG-13 (profanity, drug use, adult themes, adult humor) Running Time: 94 minutes. Reviewed by Scott Renshaw.
This may be a first in my six years as a film critic: I'm going to give the bulk of the credit for a film's success to the casting director. The film is DICK, a political/historical satire with a sporadically amusing script and competent enough direction -- in short, the stuff of fairly average entertainment. If DICK pushes over the edge of average-ness, it's because the cast dives into the material with such gusto that the film finds sparks of inspired comedy. Casting director Pam Dixon Mickelson has stocked DICK with such a wealth of talent that it's fun just watching them stroll into the shot.
The premise is silly high-concept stuff, centered around two high school best friends in Washington D.C. circa 1972 -- simple-minded Arlene Lorenzo (Michelle Williams) and even more simple-minded Betsy Jobs (Kirsten Dunst). Through exaggerated circumstances, the girls become witnesses to the break-in at the Watergate Hotel, though they have no idea what they've seen. Bob Haldeman (Dave Foley), however, isn't so sure, and thinks it would be a good idea to keep an eye on the girls to determine what they know. Thus Arlene and Betsy find themselves "official dog-walkers" for President Nixon (Dan Hedaya) himself, welcomed into the inner circle at the White House. As the Watergate scandal unfolds, the girls find themselves involved in virtually every key event, while generally remaining blissfully unaware that they're making history.
The gag is pretty thin to begin with, and it's not even particularly original. DICK 's insistence on plopping the two teens into every pivotal moment of the second Nixon administration turns it into a distaff FORREST GUMP -- some marijuana-laced brownies lead to fruitful arms-limitation talks with Brezhnev; a recorded message from the girls turns into an 18-1/2 minute gap; a well-placed scolding leads to the resignation of John Dean (Jim Breuer); their encounters with Woodward (Will Ferrell) and Bernstein (Bruce McCulloch) turn them into "Deep Throat." It's all good for a few knowing chuckles, but once you tune into the pattern, you can see virtually every joke coming from several minutes away.
What you can't necessarily see coming is the appeal of the performances. The key players in the administration are all played with zest by a wonderful comic cast -- Hedaya as a tragically unhip Nixon, Harry Shearer as a paranoid G. Gordon Liddy, Breuer as the guilt-stricken John Dean, Saul Rubinek as an insecure Henry Kissinger. More entertaining still are Ferrell and McCulloch as Woodward and Bernstein, playing the two reporters as feuding glory hounds with a relationship somewhere between sibling rivals and closeted lovers. And in the middle of this who's who of sketch comedy alumni, Michelle Williams and Kirsten Dunst have tremendous fun with their ditzy characters. Dunst may be the more accomplished actress of the two, but it's Williams who gets the juicier part of a teen who develops a secret crush on Nixon.
It would have been nice if Andrew Fleming and Sheryl Longin's script had found more scenes to match that one for sheer goofiness value. Too often it gets a bit lazy, opting for yet another historical coulda-been or one of many comic uses of the name "Dick." DICK hits a few dead spots, but whenever it starts to lag it gets a jolt from the energetic cast. Remember the name Pam Dixon Mickelson if you happen to be casting a comedy any time soon. It's nice to have someone who can gather an all-star team for the comedic equivalent of slow-pitch softball.
On the Renshaw scale of 0 to 10 Dick jokes: 6.
Visit Scott Renshaw's Screening Room http://www.inconnect.com/~renshaw/ *** Subscribe to receive new reviews directly by email! See the Screening Room for details, or reply to this message with subject "Subscribe".
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: post-index
title: "A blog by Micah Rairdon about web development, PowerShell, and other things"
description: "I do a lot of web development and PowerShell but my other interests include: DevOps, Personal Productivity, Family and Autism"
tags: [PowerShell, Microsoft, Windows, Sysadmin, Scripting, Batch, Web Development]
comments: false
---
{% for post in paginator.posts %}
{{ post.title }}
{% assign readtime = post.content | number_of_words | divided_by:site.words_per_minute %}
Reading time ~{% if readtime <= 1 %}1 minute{% else %}{{ readtime }} minutes{% endif %}
{% if site.reading_time %}
{% endif %}
{{ post.content | strip_html | truncatewords: 50 }}...


To try out any experimental features of MultiBit HD select "Labs" from the Preferences screen
The Onion Router (Tor) protocol is a way of defending your internet activity against traffic analysis.  In this respect it is similar to the Bitcoin network except that Tor is for general purpose internet communication.
Due to the way that Tor works, connections through it can be slower than direct connections and as a result while your communications are made much more private it - currently - comes at the cost of reduced speed. For this reason we have not enabled Tor by default. As the number of Tor nodes in the network increases so does the traffic speed (again just like Bitcoin and full nodes).
Here are some related articles:


--- layout: page title: Santosh Parashetti subtitle: Welcome | Namaskara | Belagavi, Karnataka, India ---
lets check it out


Claim Checker
A Research Prototype
Home
About
Enter a Claim
{% if error %}
{{ error }}
{% endif %}
Example Claims:
Tiger Woods is serving a suspension from the PGA Tour after failing a drug test
There is a case of Ebola in Kansas City
The police officer leading the Charlie Hebdo investigation committed suicide
A 5-year-old boy was invoiced for missing a birthday party
The Indian government fired an employee who hadn't been to work in 24 years


Introduction
In a Nutshell
HEULAS is an a-la-carte set of legally binding amendments to both new and existing software End-User License Agreements (EULA). It was conceived to educate about current risks, provide a framework for safeguarding users’ best interests, and an incentive for software providers to do so.
The Problem
Traditionally, EULAs are crafted to shield the software provider from legal liability. This leads to a de-facto lack of accountability of software providers towards the end-users, especially when the services they provide are free, or sold at a very low price. Very few software providers incorporate user rights into their offerings - and when they do, it is often non-binding.
This situation exposes billions of software users to present and future risks that are not always obvious nor intuitive, but can have profound negative impact on people’s lives. These risks and their impact grow as we become more dependent on, and integrated with, technology.
From this background, a need arises to reshape the narrative of software into a more ethical, safer and, ultimately, kinder direction.
Read more about the risks to end-users
A Solution
HEULAS aims to tackle the problem and its risks with a two-pronged approach:
End-User Protection
HEULAS will offer a growing and evolving set of EULA amendments, some of which refer to, and build on one another. When a software-provider incorporates one or more amendment, they will be bound by the protection it offers the end-users.
Recognition of Ethics
HEULAS will offer online badges for the software providers that reflect which amendments the provider has chosen to accept. In addition, these software providers will be featured and promoted on a “wall of fame”, an indexed directory and other places.
Other Solutions
This problem is being directly and indirectly tackeled from different angles by various approaches and organizations. They offering multiple benefits on their own, however each solution individually either falls short from truly mitigating risk to end-users, or else does not apply to the wide variety of software being used in the wild. HEULAS provides a framework that is easy to integrate with each such approach and organization, combining efforts to transition towards, celebrate and maintain ethical software.
See how other solutions tackle this problem
A Distributed Effort
HEULAS aims to be a truly distributed, and people-driven non-organization. Suggestions, discussion, and new content is encouraged via the public GitHub repo. Governance will evolve as requirements and needs change over time.


Engineer Lekon:
You chose an Aurabird Falcon, eh? A good choice... The sight of it streaking across the sky, closing in on its prey, is a beautiful thing.
Good hunting!


A navigation bar is a navigation header that is placed at the top of the page.
The .table-striped class adds zebra-stripes to a table:
| firstname | middlename | phone no. | address | |
|---|---|---|---|---|
| ramesh | rai |<EMAIL_ADDRESS>|<PHONE_NUMBER> | khotang |
| bishnu | acharya |<EMAIL_ADDRESS>|<PHONE_NUMBER> | puethan |
Click on the button to toggle between showing and hiding content.


cdemi's
11 February 2020 |
Software Development #Software #Dev #Programming |
The State of API Gateways (nginx.com) microservices API gateway API management |
| We examine the state of API gateways as the industry transitions from monolithic to microservices‑based apps, considering the challenges of hugely distributed app environments. We explore the role of API gateways in a service mesh and in hybrid clouds.... Read more |
The 2020 Developer Survey is now open! (stackoverflow.blog) announcements developer survey |
| It’s that time of year again—we’re launching our 2020 Developer Survey. We love watching how this survey data evolves year-over-year, and this year we are focused on collecting insights from a sample that is representative of coders around the world.... Read more |
.NET #dotNet |
Creating an endpoint from multiple middleware in ASP.NET Core 3.x (andrewlock.net) Middleware .NET Core 3.0 ASP.NET Core Routing |
| In this post I show how you can create a composite endpoint in ASP.NET Core 3.x, by combining multiple middleware into a pipeline as your endpoint.... Read more |
DevOps |
Introducing the Docker Index: Insight from the World’s Most Popular Container Registry (docker.com) docker hub docker-desktop |
| Data from Docker Hub and Docker Desktop provide a window into application development trends in the age of containers.... Read more |
Infrastructure #sysadmin |
VMware moving to per-core licensing (4sysops.com) vmware per-core licensing |
| VMware has changed its license model from per-CPU to per-core licensing. What is VMware's new license mode? When does it go into effect?... Read more |
Security #InfoSec |
Bug Bounty Year in Review 2019 (engineering.shopify.com) |
| For the third year in a row, we’ve taken time to reflect on our Bug Bounty program. This past year was an exciting one for us because we ran multiple experiments and made a number of process improvements to increase our program speed.... Read more |
Gaming |
NVIDIA's Cloud Gaming Service GeForce NOW Is Officially Out of Beta (wccftech.com) Cloud Gaming GeForce NOW |
| NVIDIA has officially launched its cloud gaming service, GeForce NOW, after over two years of beta testing. Learn all the details here.... Read more |
Gambling #SportsBetting #Casino |
Brexit is here – what does it mean for the UK tech industry? (egr.global) |
| Ritam Gandhi, founder and director of Studio Graphene, discusses what Brexit will mean for the UK's tech sector... Read more |
|
This newsletter is made with 💖 by cdemi and sponsored by moo Research. You can find this MIT Licensed open-source project on GitHub cdemi/NewsletterCurator. You can also find an archive of all sent newsletters on GitHub at https://newsletters.cdemi.io/. If you want to unsubscribe from this newsletter, please click here. If you're new and you want to subscribe to this newsletter, please click here. |


Cryptology
In this repository there are some modular arithmetic bases for cryptology. There are encryption algorithms
with maskara to avoid hardware attacks (side channel attack, difference power analysis and so on).
And there are also exponentiation algorithms to optimize the calculations and to make the attacks we mentioned earlier difficult.
Link to support information about my crypto repo
Computational learning
In this repository there are bases and examples of linear regression
models, logistic regresion
, classification with SVMs
, deep learning
and so on. It is used above all the libraries of sklearn and matplotlib in python language to work on these examples.
The format will be jupyther or python programs illustrating and describing the data trained in different ways.
Link to support information about my computational learning repo
Link to the computational learning repo


This is a collection of the projects I have worked on.
College projects
- Kaldi ASR system for FreeLing project: automatic speech recognition system for FreeLing. GitHub link
- Visualization tool for the Lisp protocol of OpenDaylight. GitHub link
- Star Wars Runner: a not-yet-finished Star Wars runner videogame. GitHub link
- Simple animator: a simple language to create animated SVG. GitHub link
Other projects
Web apps
- EnemyBot. Github link
Desktop apps
- TimeThieves. Github link
Android apps
- Horse Jump. Play Store link
- Bomb disposer. Play Store link


Sony Written Exam Questions
Here are some technical questions from C language
Q1. What symbol is used to terminate in the C language?
a) Semicolon
b) Colon
c) Period
d) Exclamation mark
Q2. Following two statements are executed after delivering a 20 bytes memory to a string declared as char*s
S=Etrance
I=streln(s)
What is I?
a) 20
b) 8
c) 9
d) 21
Q3. Calculate the value of Y in the given program
X=7, y=0
If x=6, y=7
Else y=1,
a) 7
b) 0
c) 1
d) 6
Q4. Break statement is used to exit from
a) DO loop
b) FOR loop
c) SWITCH loop
d) None
Q5. In which of the following will a CONTINUE cause control to go directly to test condition and then continue the loop process?
a) FOR and WHILE
b) WHILE and IF-ELSE
c) DO-WHILE and IF-ELSE
d) WHILE and DO-WHILE
Q6. What is comma used with?
a) IF-ELSE
b) DO-WHILE
c) All
d) None
Q7. What is the difference in declaration of an external variable and its definition?
a) Declaration causes storage space to be allocated to variable and definition gives variable properties
b) Definition only causes storage to be allocated and declaration causes storage space to be allocated
c) Both
d) None
Q8. What is the overall expression of -
Char ch;
short i;
unsigned long ul;
float f;
a) Char
b) Unsigned
c) Float
d) None
Q9. C standard library supplies which string related function
a) Strcpy()
b) Strcat()
c) Strcmp()
d) None
Q10. Explicitly specified dimensions are not in which array
a) Unsized
b) Undimensional
c) Unspecified
d) None
Q11. How can u determine ms memory location in C?
a) *m
b) m&
c) &m
d) m*
Q12. math.h header can be used for providing
a) links to assembly language for calls
b) diagnostic and debugging assistance
c) support for string handling
d) none
Q13. The format specified for hexadecimal is
a) %d
b) %o
c) %x
d) %u


3D Settings
Home
(current)
Upload Settings
Note: The current settings you are viewing/editing are based off
this set of settings (also visible on the right)
Saving this set of settings will not not change the old set of settings. Instead both will be kept online so you may view the history and others may make edits.
Printer Name
Print Speed (mm/s)
Layer Height (mm)
Plastic Type
Enter Plastic Type
PLA
ABS
Submit
You are currently viewing the settings for
{{oldSettings}}:
Printer Name
Print Speed (mm/s)
Layer Height (mm)
Plastic Type
Enter Plastic Type
PLA
ABS
Edit
Other settings based off the settings you are viewing:
It looks like nobody has based their settings off these settings. Click the "Edit" button above to be the first!
http://localhost:3000/add_settings?id={{child._id}}


--- layout: default title: "Page not found" permalink: 404.html ---
Sorry, this URL is pointing to something that doesn't exist. Let me know what you were looking for.


Software Engineer at PayU Payments
Eat, sleep, code, read, pray, preach & repeat!
Ruby on Rails, Java, Spring, Python, Javascript, React, HTML, Git and many more...
I like to write softwares that solves some real life problems & improves the current condition of the world.
The only person you should try to be better than, is the person you were yesterday.
It is an art of developing highly efficient & faster systems.
Good design means easy maintenance, code reusability & faster development.
It is about extracting meaningful information from data and therefore helps in better decision making.


Asynchronous game engine
Client-side JavaScript is non-blocking: all long-running operations are asynchronous. The ROT.Engine
loop is well suited to orchestrating the possibly-async coordination of various game actors.
To use the engine, you first need a scheduler that stores your actors and manages their priority. This scheduler is passed to ROT.Engine
's constructor. Once the engine is started, it correctly calls the act()
method on proper actors (picked by the scheduler). It is possible to recursively stop (lock) the engine, should some operation (such as displaying a dialog or waiting for user input) block the execution. Once all lock levels are unlocked, the engine continues its execution.
var scheduler = new ROT.Scheduler.Simple();
var engine = new ROT.Engine(scheduler);
var output = [];
/* sample actor: pauses the execution when dead */
var actor1 = {
lives: 3,
act: function() {
output.push(".");
this.lives--;
if (!this.lives) {
scheduler.remove(actor1);
engine.lock(); /* pause execution */
setTimeout(unlock, 500); /* wait for 500ms */
}
}
}
scheduler.add(actor1, true);
var unlock = function() { /* called asynchronously */
var actor2 = {
act: function() {
output.push("@");
}
}
output = [];
scheduler.add(actor2, false); /* add second (non-repeating) actor */
engine.unlock(); /* continue execution */
SHOW(output.join(""));
}
engine.start();
SHOW(output.join(""));


Recorded on: 18 July 2019
The team talks about accessibility guidance, improvements to the NHS website and community contributions for the digital service manual.


Among all the Vietnamese dishes that came to the attention of the people in the western hemisphere, nothing else has received such tremendous acceptance as pho. Pho is considered as the national dish of Vietnam, and it has captured the fascination of so many people in the west because of its deceptive simplicity and its complex flavors. Pho is the perfect comfort food - warm, hearty and deliciously refreshing. In Vietnam it's the common people's food. It's street food.Phở was born in Northern Vietnam during the mid-1880s. The dish was heavily influenced by both Chinese and French cooking. Rice noodle and spices were imported from China; the French popularized the eating of red meat. In fact, it is believed that "phở" is derived from "pot au feu" a French soup. Vietnamese cooks blended the Chinese, French and native influences to make a dish that is uniquely Vietnamese.
The bowl arrives. Plastic chopsticks in right hand, soup spoon in left. Sip the broth first (I stress this because it’s important) while you work the noodles with your chopsticks. It’s OK, even preferred, that you stick your face into the bowl while slurping. You get a hit of those aromatics while avoiding a messy splatter. Once the noodles are gone (they usually go first), raise the bowl to your lips with both hands and polish it off. This is not impolite. This is how you finish a bowl of pho — like a child would finish a bowl of Apple Jacks. Both are great in the morning.


ipcrg.interfaces package¶
Submodules¶
ipcrg.interfaces.interface module¶
Abstract interface definition.
-
class
ipcrg.interfaces.interface.
Interface
(uri, database_name, **parameters)¶ Bases:
object
Abstract definition of a db interface.
-
uri
¶ uri connection string.
- Type
str
-
database_name
¶ name of the database.
- Type
str
-
parameters
¶ parameters for the interface.
- Type
dict
-
create_entities
(entities)¶ Create entities.
- Parameters
entities (typing.List[dict]) – list of entity representations.
-
create_entity
(entity)¶ Create an entity.
- Parameters
entity (dict) – entity representation.
-
create_indexes
()¶ Create search indexes.
-
create_relation
(relation)¶ Create a relation.
- Parameters
relation (dict) – relation representation.
-
create_relations
(relations)¶ Create relations.
- Parameters
relations (typing.List[dict]) – list of relation representations.
-
delete_all_entities
()¶ Delete all entities.
-
delete_all_relations
()¶ Delete all relations.
-
from_edge_list_filepath
(filepath, relation_class, source_entity_class, source_entity_parameters={}, target_entity_class=None, target_entity_parameters=None, **kwargs)¶ Insert entities and relations from filepath.
- Parameters
filepath (str) – path to a file.
relation_class (type(ipcrg.relations.relation.Relation)) – class type for relation.
source_entity_class (type(ipcrg.entities.entity.Entity)) – class type for source entity.
source_entity_parameters (dict) – parameters for the source_entity_class.create_entities method. Defaults to {}.
target_entity_class (type(ipcrg.entities.entity.Entity)) – class type for target entity. Defaults to None, a.k.a same as source_entity_class.
target_entity_parameters (dict) – parameters for the target_entity_class.create_entities method. Defaults to None, a.k.a. same as source_entity_parameters.
kwargs (dict) – key-value arguments for pd.read_csv.
-
get_adjacency
(entity_query={}, relation_query={}, relation_weight_fn=<function Interface.<lambda>>, ignore_relation_subtype=False)¶ Get a dictionary of adjacency matrices given queries for entities and relations. Optionally a function to extract a custom name can be provided. Similarly the weight can be accessed with a custom function.
- Parameters
entity_query (dict) – query for the entities. Defaults to {}, a.k.a. all the entities.
relation_query (dict) – query for the relations. Defaults to {}, a.k.a. all the relations.
relation_weight_fn (typing.Callable[[dict], float], optional) – function to extract the weight from a relation. Defaults to extract the ‘weight’ field.
ignore_relation_subtype (bool, optional) – ignore relation subtype information. Defaults to False, a.k.a. consider subtype.
- Returns
- dictionary keyed by relation types and containing as value
a dictionary keyed by relation subtypes and containing as value a tuple of a scipy.sparse.coo_matrix representing the relation subtype-specific adjacency and a dataframe containing the index mappings. If ignore_relation_subtype is True the subtype dictionary contains only one key called ‘adjacency’ and the overlapping interactions between subtyped need to be handled by the user.
- Return type
dict
-
get_all_entities
()¶ Get all entities.
- Returns
an iterable of entities.
- Return type
typing.Iterable[dict]
-
get_all_relations
()¶ Get all relations.
- Returns
an iterable of relations.
- Return type
typing.Iterable[dict]
-
get_entities
(query)¶ Get entities.
- Parameters
query (dict) – query representation.
- Returns
an iterable of entities.
- Return type
typing.Iterable[dict]
-
get_entities_by_ids
(ids)¶ Get entities by ids.
- Returns
an iterable of entities.
- Return type
typing.Iterable[dict]
-
get_entity_in_neighbors
(entity_query, relation_query={}, relation_weight_fn=<function Interface.<lambda>>)¶ Get incoming neighbors from an entity.
- Parameters
entity_query (dict) – query for a single entity. In case of multiple hits, considers the first one.
relation_query (dict) – query for the relations. Defaults to {}, a.k.a. all the relations.
relation_weight_fn (typing.Callable[[dict], float], optional) – function to extract the weight from a relation. Defaults to extract the ‘weight’ field.
- Returns
list of ids and weights.
- Return type
typing.List[typing.Tuple[str, float]]
-
get_entity_out_neighbors
(entity_query, relation_query={}, relation_weight_fn=<function Interface.<lambda>>)¶ Get outgoing neighbors from an entity.
- Parameters
entity_query (dict) – query for a single entity. In case of multiple hits, considers the first one.
relation_query (dict) – query for the relations. Defaults to {}, a.k.a. all the relations.
relation_weight_fn (typing.Callable[[dict], float], optional) – function to extract the weight from a relation. Defaults to extract the ‘weight’ field.
- Returns
list of ids and weights.
- Return type
typing.List[typing.Tuple[str, float]]
-
get_entity_types
()¶ Get entity types.
- Returns
a list of entity types.
- Return type
list
-
get_relation_subtypes
(relation_types=None)¶ Get relation subtypes.
- Parameters
relation_types (list) – relation types to consider. Defaults to None, a.k.a. all relation types.
- Returns
- a dictionary of relation types mapped to the respective
subtypes.
- Return type
dict
-
get_relation_types
()¶ Get relation types.
- Returns
a list of relation types.
- Return type
list
-
get_relations
(query)¶ Get relations.
- Parameters
query (dict) – query representation.
- Returns
an iterable of relations.
- Return type
typing.Iterable[dict]
-
-
ipcrg.interfaces.interface.
filter_relation
(relation, relation_type, relation_subtype, entity_ids)¶ Function to filter a relation for given: type, subtype and entitiy ids.
- Parameters
relation (dict) – dictionary representing a relation.
relation_type (str) – relation type.
relation_subtype (str) – relation subtype.
entity_ids (set) – entitiy ids.
- Returns
True is a relation match the filter, False otherwise.
- Return type
bool
-
ipcrg.interfaces.interface.
filter_relation_ignore_subtype
(relation, relation_type, relation_subtype, entity_ids)¶ Function to filter a relation for given: type and entitiy ids.
- Parameters
relation (dict) – dictionary representing a relation.
relation_type (str) – relation type.
relation_subtype (str) – relation subtype. Argument ignored.
entity_ids (set) – entitiy ids.
- Returns
True is a relation match the filter, False otherwise.
- Return type
bool
ipcrg.interfaces.mongo module¶
MongoDB interface.
-
class
ipcrg.interfaces.mongo.
MongoDBInterface
(uri, database_name, **parameters)¶ Bases:
ipcrg.interfaces.interface.Interface
Mongo DB interface.
-
client
¶ a client for Mongo DB.
- Type
MongoClient
-
entities_collection
¶ name of the entity collection.
- Type
str
-
relations_collection
¶ name of the relation collection.
- Type
str
-
create_entities
(entities)¶ Create entities.
- Parameters
entities (typing.List[dict]) – list of entity representations.
-
create_entity
(entity)¶ Create an entity.
- Parameters
entity (dict) – entity representation.
-
create_indexes
()¶ Create search indexes.
-
create_relation
(relation)¶ Create a relation.
- Parameters
relation (dict) – relation representation.
-
create_relations
(relations)¶ Create relations.
- Parameters
relations (typing.List[dict]) – list of relation representations.
-
delete_all_entities
()¶ Delete all entities.
-
delete_all_relations
()¶ Delete all relations.
-
get_all_entities
()¶ Get all entities.
- Returns
an iterable of entities.
- Return type
typing.Iterable[dict]
-
get_all_relations
()¶ Get relations.
- Parameters
query (dict) – query representation.
- Returns
an iterable of relations.
- Return type
typing.Iterable[dict]
-
get_entities
(query)¶ Get entities.
- Parameters
query (dict) – query representation.
- Returns
an iterable of entities.
- Return type
typing.Iterable[dict]
-
get_entities_by_ids
(ids)¶ Get entities by ids.
- Returns
an iterable of entities.
- Return type
typing.Iterable[dict]
-
get_entity_in_neighbors
(entity_query, relation_query={}, relation_weight_fn=<function MongoDBInterface.<lambda>>)¶ Get incoming neighbors from an entity.
- Parameters
entity_query (dict) – query for a single entity. In case of multiple hits, considers the first one.
relation_query (dict) – query for the relations. Defaults to {}, a.k.a. all the relations.
relation_weight_fn (typing.Callable[[dict], float], optional) – function to extract the weight from a relation. Defaults to extract the ‘weight’ field.
- Returns
list of ids and weights.
- Return type
typing.List[typing.Tuple[str, float]]
-
get_entity_out_neighbors
(entity_query, relation_query={}, relation_weight_fn=<function MongoDBInterface.<lambda>>)¶ Get outgoing neighbors from an entity.
- Parameters
entity_query (dict) – query for a single entity. In case of multiple hits, considers the first one.
relation_query (dict) – query for the relations. Defaults to {}, a.k.a. all the relations.
relation_weight_fn (typing.Callable[[dict], float], optional) – function to extract the weight from a relation. Defaults to extract the ‘weight’ field.
- Returns
list of ids and weights.
- Return type
typing.List[typing.Tuple[str, float]]
-
get_entity_types
()¶ Get entity types.
- Returns
a list of entity types.
- Return type
list
-
get_relation_subtypes
(relation_types=None)¶ Get relation subtypes.
- Parameters
relation_types (list) – relation types to consider. Defaults to None, a.k.a. all relation types.
- Returns
- a dictionary of relation types mapped to the respective
subtypes.
- Return type
dict
-
get_relation_types
()¶ Get relation types.
- Returns
a list of relation types.
- Return type
list
-
get_relations
(query)¶ Get relations.
- Parameters
query (dict) – query representation.
- Returns
an iterable of relations.
- Return type
typing.Iterable[dict]
-
Module contents¶
Initilize interfaces module.


Mothership BrewLabs
Labels
CraftGardens
Logo
Maps&Taps
App Design
Digital Collage
Photoshop Exercise
2017 Calender


--- layout: archive title: Zulip Chat Archive permalink: /stream/116395-maths/topic/bicategories.html ---
@Scott Morrison have you by any chance done or thought about formalizing bicategories?
I know you have monoidal categories somewhere which is in approximately the same direction
Yes, I'd like to, but have done nothing.
I've been meaning to rewrite the work on monoidal categories for a while now, as it's an excellent playground for my student Keeley Hoek's "rewrite_search" algorithms.
I think the lesson I eventually learnt there is that defining a monoidal category as a category C
equipped with a functor C x C to C
is actually a bad idea, mostly for syntactic reasons! I think it will work much better if you have have operations tensor_obj and tensor_hom, and laws for them, etc, then have a theorem that packages these as a functor when needed.
The basic problem is just that if you think of tensor as a functor out of C x C, then its argument is a pair, and you'd really really prefer the curried version of these for parsing, pattern matching, etc. Dealing with the pairs causes lots of pain.
Hmm, makes sense...
It is a bit sad though that this is a significant consideration.
https://ncatlab.org/nlab/show/bicategory#detailedDefn
The point is not that one would want to write out the definition in such elementary terms (although apparently I just did anyway) but rather that one can.
In a different direction, I would love to do (have someone do?) quasi-strict categories (according to Vicary), as a foundation for hooking up Lean and Globular.
Right, I think we talked about this briefly in Orsay
I suppose a possible alternative to C x C -> C
is a curried functor C => (C => C)
, though I don't have a clear sense of the issues here yet
I suspect, although haven't actually checked, that this is just as bad. Because F X
is handled via a coercion, rather than merely notation, I suspect we could never get T X Y
to work for a curried functor.
I think the curried functor should work fine
Why not use the dependently-typed definition of bicategory a la an enriched category?
As in, something like obj1:Obj obj2:Obj |- Hom_obj1_obj2 : Cat
and then apply whatever solution makes the monoidal case work, modulo adapting to multiple objects?
I think the issue is that we don't have a nice solution for monoidal categories, that doesn't require a structure with ~30 fields
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


{{subTitle}}
The product {{product.name}} with code {{product.code}} has currently {{product.quantity}} {{product.measure.abbreviation}}


The functions that form this module build from the emission sets per TM5-FASST region and year generated in Module 1 (by m1_emissions_rescale
), and estimate the fine particulate matter (PM2.5) and ozone (O3) concentration levels for each period and TM5-FASST region. In particular the package reports the following PM2.5 and O3 indicators:
Fine particulate matter (PM2.5) concentration levels (m2_get_conc_pm25
)
library(rfasst)
library(magrittr)
# db_path<-"path_to_your_gcam_database"
# query_path<-"path_to_your_gcam_queries_file"
# db_name<-"name of the database"
# prj_name<-"name for a Project to add extracted results to" (any name should work, avoid spaces just in case)
# scen_name<-"name of the GCAM scenario",
# queries<-"Name of the query file" (the package includes a default query file that includes all the queries required in every function in the packae, "queries_rfasst.xml")
# To write the csv files into the output folder:
# m2_get_conc_pm25(db_path,query_path,db_name,prj_name,scen_name,queries,saveOutput=T)
# To save as data frame pm2.5 concentration levels by TM5-FASST region in year 2050:
# pm25.conc.2050<-dplyr::bind_rows(m2_get_conc_pm25(db_path,query_path,db_name,prj_name,scen_name,queries,saveOutput=F)) %>% dplyr::filter(year==2050)
# head(pm25.conc.2050)
m2_get_conc_o3
)
library(rfasst)
library(magrittr)
# db_path<-"path_to_your_gcam_database"
# query_path<-"path_to_your_gcam_queries_file"
# db_name<-"name of the database"
# prj_name<-"name for a Project to add extracted results to" (any name should work, avoid spaces just in case)
# scen_name<-"name of the GCAM scenario",
# queries<-"Name of the query file" (the package includes a default query file that includes all the queries required in every function in the packae, "queries_rfasst.xml")
# To write the csv files into the output folder:
# m2_get_conc_o3(db_path,query_path,db_name,prj_name,scen_name,queries,saveOutput=T)
# To save as data frame ozone (O3) concentration levels by TM5-FASST region in year 2050:
# o3.conc.2050<-dplyr::bind_rows(m2_get_conc_o3(db_path,query_path,db_name,prj_name,scen_name,queries,saveOutput=F)) %>% dplyr::filter(year==2050)
# head(o3.conc.2050)
m2_get_conc_m6m
)
library(rfasst)
library(magrittr)
# db_path<-"path_to_your_gcam_database"
# query_path<-"path_to_your_gcam_queries_file"
# db_name<-"name of the database"
# prj_name<-"name for a Project to add extracted results to" (any name should work, avoid spaces just in case)
# scen_name<-"name of the GCAM scenario",
# queries<-"Name of the query file" (the package includes a default query file that includes all the queries required in every function in the packae, "queries_rfasst.xml")
# To write the csv files into the output folder:
# m2_get_conc_m6m(db_path,query_path,db_name,prj_name,scen_name,queries,saveOutput=T)
# To save as data frame ozone-M6M (6mDMAI) concentration levels by TM5-FASST region in year 2050:
# m6m.conc.2050<-dplyr::bind_rows(m2_get_conc_m6m(db_path,query_path,db_name,prj_name,scen_name,queries,saveOutput=F)) %>% dplyr::filter(year==2050)
# head(m6m.conc.2050)
m2_get_conc_aot40
)
library(rfasst)
library(magrittr)
# db_path<-"path_to_your_gcam_database"
# query_path<-"path_to_your_gcam_queries_file"
# db_name<-"name of the database"
# prj_name<-"name for a Project to add extracted results to" (any name should work, avoid spaces just in case)
# scen_name<-"name of the GCAM scenario",
# queries<-"Name of the query file" (the package includes a default query file that includes all the queries required in every function in the packae, "queries_rfasst.xml")
# To write the csv files into the output folder:
# m2_get_conc_aot40(db_path,query_path,db_name,prj_name,scen_name,queries,saveOutput=T)
# To save as data frame ozone-AOT40 concentration levels by TM5-FASST region in year 2050:
# aot40.conc.2050<-dplyr::bind_rows(m2_get_conc_aot40(db_path,query_path,db_name,prj_name,scen_name,queries,saveOutput=F)) %>% dplyr::filter(year==2050)
# head(aot40.conc.2050)
m2_get_conc_mi
)
library(rfasst)
library(magrittr)
# db_path<-"path_to_your_gcam_database"
# query_path<-"path_to_your_gcam_queries_file"
# db_name<-"name of the database"
# prj_name<-"name for a Project to add extracted results to" (any name should work, avoid spaces just in case)
# scen_name<-"name of the GCAM scenario",
# queries<-"Name of the query file" (the package includes a default query file that includes all the queries required in every function in the packae, "queries_rfasst.xml")
# To write the csv files into the output folder:
# m2_get_conc_mi(db_path,query_path,db_name,prj_name,scen_name,queries,saveOutput=T)
# To save as data frame ozone-Mi concentration levels by TM5-FASST region in year 2050:
# mi.conc.2050<-dplyr::bind_rows(m2_get_conc_mi(db_path,query_path,db_name,prj_name,scen_name,queries,saveOutput=F)) %>% dplyr::filter(year==2050)
# head(mi.conc.2050)
As indicated in the documentation of TM5-FASST Van Dingenen et al 2018,estimates of PM2.5 and O3 concentration levels in a receptor region driven by the emissions of different precursors in different sources are based on parametrizations of meteorology and atmospheric chemistry drawn from the more complex TM5 model. In summary as explained in Sampedro et al 2020, concentrations of a pollutant \(j\), in region \(y\), from all the precursors (\(i\)) emitted in all regions (\(x_k\)), is calculated as:
\[C_j (y)=C_{j,base} (y)+∑_{k=1}^{n_x}∑_{i=1}^{n_i}SRC_{i,j} [x_k,y]\cdot[E_i (x_k)-E_{i,base} (x_k )]\]
\(C_{j,base} (y)\) is the base-run concentration level of pollutant j in region y, pre-computed with TM5.
\(E_{i,base} (x_k)\) are the base-run precursor i emissions in region \(x_k\)
\(SRC_{i,j} [x_k,y]\) = the \(i\)–to-\(j\) source-receptor coefficient for source region \(x_k\) and receptor region y, pre-computed from a 20% emission reduction of component i in region \(x_k\) relative to the base-run
\(E_i (x_k)\) are the emissions of precursor i in region \(x_k\) in the analyzed scenario.
Following this equation, base-run emissions and concentrations, and source-receptor coefficient matrixes need to be combined with emissions pathways for the analyzed scenario. The package includes the following input information:
The packages also includes the base emission and concentration levels for all these indicators.
In addition, primary PM2.5 emissions (BC and POM) are assumed to have more direct influence in urban (more dense areas), so the emission-concentration relation for these two pollutants is modified using adjustment coefficients that are included in the package.