tags-widget Class
Allow the user to view and manage tags. See TaggableMixin for controller actions that can be used with this component.
For more information on configuration options, see documentation for jquery-tags-input.
{{tags-widget
addATag=(action 'addATag' model)
removeATag=(action 'removeATag' model)
tags=model.tags}}
Item Index
Methods
- $
- _isVisibleDidChange
- _lazyInjections
- _onLookup
- _scheduledDestroy
- addObserver
- append
- appendTo
- beginPropertyChanges
- cacheFor
- decrementProperty
- destroy
- didReceiveAttrs
- didRender
- didUpdate
- didUpdateAttrs
- endPropertyChanges
- findElementInParentElement
- get
- getProperties
- getViewBoundingClientRect
- getViewClientRects
- getViewRange
- getWithDefault
- handleEvent
- has
- hasObserverFor
- incrementProperty
- init
- nearestOfType deprecated
- nearestWithProperty deprecated
- notifyPropertyChange
- off
- on
- one
- propertyDidChange
- propertyWillChange
- readDOMAttr
- removeChild
- removeObserver
- renderToElement
- reopen
- reopenClass
- replaceIn
- rerender
- send
- sendAction
- set
- setProperties
- toggleProperty
- toString
- trigger
- willDestroy
- willRender
- willUpdate
Properties
Methods
$
(
JQuery
public
-
[selector]
Returns a jQuery object for this view's element. If you pass in a selector
string, this method will return a jQuery object, using the current element
as its buffer.
For example, calling
view.$('li')
will return a jQuery object containing
all of the li
elements inside the DOM element of this view.
Parameters:
-
[selector]
String optionala jQuery-compatible selector string
Returns:
JQuery:
the jQuery object for the DOM node
_isVisibleDidChange
()
private
When the view's
isVisible
property changes, toggle the visibility
element of the actual DOM element.
_lazyInjections
()
Object
private
Returns a hash of property names and container names that injected
properties will lookup on the container lazily.
Returns:
Object:
Hash of all lazy injected property keys to container names
_onLookup
()
private
Provides lookup-time type validation for injected properties.
_scheduledDestroy
()
private
Invoked by the run loop to actually destroy the object. This is
scheduled for execution by the
destroy
method.
addObserver
(
public
-
key
-
target
-
method
Adds an observer on a property.
This is the core method used to register an observer for a property.
Once you call this method, any time the key's value is set, your observer
will be notified. Note that the observers are triggered any time the
value is set, regardless of whether it has actually changed. Your
observer should be prepared to handle that.
You can also pass an optional context parameter to this method. The
context will be passed to your observer method whenever it is triggered.
Note that if you add the same target/method pair on a key multiple times
with different context parameters, your observer will only be called once
with the last context you passed.
### Observer Methods
Observer methods you pass should generally have the following signature if
you do not pass a
context
parameter:
`
javascript
fooDidChange: function(sender, key, value, rev) { };
`
The sender is the object that changed. The key is the property that
changes. The value property is currently reserved and unused. The rev
is the last property revision of the object when it changed, which you can
use to detect if the key value has really changed or not.
If you pass a context
parameter, the context will be passed before the
revision like so:
`
javascript
fooDidChange: function(sender, key, value, context, rev) { };
`
Usually you will not need the value, context or revision parameters at
the end. In this case, it is common to write observer methods that take
only a sender and key value as parameters or, if you aren't interested in
any of these values, to write an observer that has no parameters at all.
append
()
Ember.View
private
Appends the view's element to the document body. If the view does
not have an HTML representation yet
the element will be generated automatically.
If your application uses the
rootElement
property, you must append
the view within that element. Rendering views outside of the rootElement
is not supported.
Note that this method just schedules the view to be appended; the DOM
element will not be appended to the document body until all bindings have
finished synchronizing.
Returns:
Ember.View:
receiver
appendTo
(
Ember.View
private
-
A
Appends the view's element to the specified parent element.
Note that this method just schedules the view to be appended; the DOM
element will not be appended to the given element until all bindings have
finished synchronizing.
This is not typically a function that you will need to call directly when
building your application. If you do need to use
appendTo
, be sure that
the target element you are providing is associated with an Ember.Application
and does not have an ancestor element that is associated with an Ember view.
Parameters:
-
A
String | DOMElement | JQueryselector, element, HTML string, or jQuery object
Returns:
Ember.View:
receiver
beginPropertyChanges
()
Ember.Observable
private
Begins a grouping of property changes.
You can use this method to group property changes so that notifications
will not be sent until the changes are finished. If you plan to make a
large number of changes to an object at one time, you should call this
method at the beginning of the changes to begin deferring change
notifications. When you are done making changes, call
endPropertyChanges()
to deliver the deferred change notifications and end
deferring.
Returns:
cacheFor
(
Object
public
-
keyName
Returns the cached value of a computed property, if it exists.
This allows you to inspect the value of a computed property
without accidentally invoking it if it is intended to be
generated lazily.
Parameters:
-
keyName
String
Returns:
Object:
The cached value of the computed property, if any
decrementProperty
(
Number
public
-
keyName
-
decrement
Set the value of a property to the current value minus some amount.
`
javascript
player.decrementProperty('lives');
orc.decrementProperty('health', 5);
`
Parameters:
Returns:
Number:
The new property value
destroy
()
private
You must call
destroy
on a view to destroy the view (and all of its
child views). This will remove the view from any parent node, then make
sure that the DOM element managed by the view can be released by the
memory manager.
didReceiveAttrs
()
public
Called when the attributes passed into the component have been updated.
Called both during the initial render of a container and during a rerender.
Can be used in place of an observer; code placed here will be executed
every time any attribute updates.
didRender
()
public
Called after a component has been rendered, both on initial render and
in subsequent rerenders.
didUpdate
()
public
Called when the component has updated and rerendered itself.
Called only during a rerender, not during an initial render.
didUpdateAttrs
()
public
Called when the attributes passed into the component have been changed.
Called only during a rerender, not during an initial render.
endPropertyChanges
()
Ember.Observable
private
Ends a grouping of property changes.
You can use this method to group property changes so that notifications
will not be sent until the changes are finished. If you plan to make a
large number of changes to an object at one time, you should call
beginPropertyChanges()
at the beginning of the changes to defer change
notifications. When you are done making changes, call this method to
deliver the deferred change notifications and end deferring.
Returns:
findElementInParentElement
(
DOMElement
private
-
parentElement
Attempts to discover the element in the parent element. The default
implementation looks for an element with an ID of
elementId
(or the
view's guid if elementId
is null). You can override this method to
provide your own form of lookup. For example, if you want to discover your
element using a CSS class name instead of an ID.
Parameters:
-
parentElement
DOMElementThe parent's DOM element
Returns:
DOMElement:
The discovered element
get
(
Object
public
-
keyName
Retrieves the value of a property from the object.
This method is usually similar to using
object[keyName]
or object.keyName
,
however it supports both computed properties and the unknownProperty
handler.
Because get
unifies the syntax for accessing all these kinds
of properties, it can make many refactorings easier, such as replacing a
simple property with a computed property, or vice versa.
### Computed Properties
Computed properties are methods defined with the property
modifier
declared at the end, such as:
`
javascript
fullName: function() {
return this.get('firstName') + ' ' + this.get('lastName');
}.property('firstName', 'lastName')
`
When you call get
on a computed property, the function will be
called and the return value will be returned instead of the function
itself.
### Unknown Properties
Likewise, if you try to call get
on a property whose value is
undefined
, the unknownProperty()
method will be called on the object.
If this method returns any value other than undefined
, it will be returned
instead. This allows you to implement "virtual" properties that are
not defined upfront.
Parameters:
-
keyName
StringThe property to retrieve
Returns:
Object:
The property value or undefined.
getProperties
(
Object
public
-
list
To get the values of multiple properties at once, call
getProperties
with a list of strings or an array:
`
javascript
record.getProperties('firstName', 'lastName', 'zipCode');
// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }
`
is equivalent to:
`
javascript
record.getProperties(['firstName', 'lastName', 'zipCode']);
// { firstName: 'John', lastName: 'Doe', zipCode: '10011' }
`
Parameters:
-
list
String... | Arrayof keys to get
Returns:
getViewBoundingClientRect
(
private
-
view
getViewBoundingClientRect
provides information about the position of the
bounding border box edges of a view relative to the viewport.
It is only intended to be used by development tools like the Ember Inpsector
and may not work on older browsers.
Parameters:
-
view
Ember.View
getViewClientRects
(
private
-
view
getViewClientRects
provides information about the position of the border
box edges of a view relative to the viewport.
It is only intended to be used by development tools like the Ember Inspector
and may not work on older browsers.
Parameters:
-
view
Ember.View
getWithDefault
(
Object
public
-
keyName
-
defaultValue
Retrieves the value of a property, or a default value in the case that the
property returns
undefined
.
`
javascript
person.getWithDefault('lastName', 'Doe');
`
Parameters:
Returns:
Object:
The property value or the defaultValue.
handleEvent
(
private
-
eventName
-
evt
Handle events from
Ember.EventDispatcher
has
(
Boolean
public
-
name
Checks to see if object has any subscriptions for named event.
Parameters:
-
name
StringThe name of the event
Returns:
Boolean:
does the object have a subscription for event
hasObserverFor
(
Boolean
private
-
key
Returns
true
if the object currently has observers registered for a
particular key. You can use this method to potentially defer performing
an expensive action until someone begins observing a particular property
on the object.
Parameters:
-
key
StringKey to check
Returns:
incrementProperty
(
Number
public
-
keyName
-
increment
Set the value of a property to the current value plus some amount.
`
javascript
person.incrementProperty('age');
team.incrementProperty('score', 2);
`
Parameters:
Returns:
Number:
The new property value
init
()
private
Setup a view, but do not finish waking it up.
* configure
childViews
* register the view with the global views hash, which is used for event
dispatch
nearestOfType
(
deprecated
private
-
klass
Return the nearest ancestor that is an instance of the provided
class or mixin.
Parameters:
-
klass
Class,MixinSubclass of Ember.View (or Ember.View itself), or an instance of Ember.Mixin.
Returns:
Ember.View
nearestWithProperty
(
deprecated
private
-
property
Return the nearest ancestor that has a given property.
Parameters:
-
property
StringA property name
Returns:
Ember.View
notifyPropertyChange
(
Ember.Observable
public
-
keyName
Convenience method to call
propertyWillChange
and propertyDidChange
in
succession.
Parameters:
-
keyName
StringThe property key to be notified about.
Returns:
off
(
public
-
name
-
target
-
method
Cancels subscription for given name, target, and method.
Parameters:
Returns:
this
on
(
public
-
name
-
[target]
-
method
Subscribes to a named event with given function.
`
javascript
person.on('didLoad', function() {
// fired once the person has loaded
});
`
An optional target can be passed in as the 2nd argument that will
be set as the "this" for the callback. This is a good way to give your
function access to the object triggering the event. When the target
parameter is used the callback becomes the third argument.
Parameters:
Returns:
this
one
(
public
-
name
-
[target]
-
method
Subscribes a function to a named event and then cancels the subscription
after the first time the event is triggered. It is good to use
`one
` when
you only care about the first time an event has taken place.
This function takes an optional 2nd argument that will become the "this"
value for the callback. If this argument is passed then the 3rd argument
becomes the function.
Parameters:
Returns:
this
propertyDidChange
(
Ember.Observable
private
-
keyName
Notify the observer system that a property has just changed.
Sometimes you need to change a value directly or indirectly without
actually calling
get()
or set()
on it. In this case, you can use this
method and propertyWillChange()
instead. Calling these two methods
together will notify all observers that the property has potentially
changed value.
Note that you must always call propertyWillChange
and propertyDidChange
as a pair. If you do not, it may get the property change groups out of
order and cause notifications to be delivered more often than you would
like.
Parameters:
-
keyName
StringThe property key that has just changed.
Returns:
propertyWillChange
(
Ember.Observable
private
-
keyName
Notify the observer system that a property is about to change.
Sometimes you need to change a value directly or indirectly without
actually calling
get()
or set()
on it. In this case, you can use this
method and propertyDidChange()
instead. Calling these two methods
together will notify all observers that the property has potentially
changed value.
Note that you must always call propertyWillChange
and propertyDidChange
as a pair. If you do not, it may get the property change groups out of
order and cause notifications to be delivered more often than you would
like.
Parameters:
-
keyName
StringThe property key that is about to change.
Returns:
readDOMAttr
(
public
-
name
Normally, Ember's component model is "write-only". The component takes a
bunch of attributes that it got passed in, and uses them to render its
template.
One nice thing about this model is that if you try to set a value to the
same thing as last time, Ember (through HTMLBars) will avoid doing any
work on the DOM.
This is not just a performance optimization. If an attribute has not
changed, it is important not to clobber the element's "hidden state".
For example, if you set an input's
value
to the same value as before,
it will clobber selection state and cursor position. In other words,
setting an attribute is not **always** idempotent.
This method provides a way to read an element's attribute and also
update the last value Ember knows about at the same time. This makes
setting an attribute idempotent.
In particular, what this means is that if you get an <input>
element's
value
attribute and then re-render the template with the same value,
it will avoid clobbering the cursor and selection position.
Since most attribute sets are idempotent in the browser, you typically
can get away with reading attributes using jQuery, but the most reliable
way to do so is through this method.
Parameters:
-
name
Stringthe name of the attribute
Returns:
String
removeChild
(
Ember.View
private
-
view
Removes the child view from the parent view.
Parameters:
-
view
Ember.View
Returns:
Ember.View:
receiver
removeObserver
(
public
-
key
-
target
-
method
Remove an observer you have previously registered on this object. Pass
the same key, target, and method you passed to
addObserver()
and your
target will no longer receive notifications.
renderToElement
(
HTMLBodyElement
private
-
tagName
Creates a new DOM element, renders the view into it, then returns the
element.
By default, the element created and rendered into will be a
BODY
element,
since this is the default context that views are rendered into when being
inserted directly into the DOM.
`
js
let element = view.renderToElement();
element.tagName; // => "BODY"
`
You can override the kind of element rendered into and returned by
specifying an optional tag name as the first argument.
`
js
let element = view.renderToElement('table');
element.tagName; // => "TABLE"
`
This method is useful if you want to render the view into an element that
is not in the document's body. Instead, a new body
element, detached from
the DOM is returned. FastBoot uses this to serialize the rendered view into
a string for transmission over the network.
`
js
app.visit('/').then(function(instance) {
let element;
Ember.run(function() {
element = renderToElement(instance);
});
res.send(serialize(element));
});
`
Parameters:
-
tagName
StringThe tag of the element to create and render into. Defaults to "body".
Returns:
HTMLBodyElement:
element
reopen
()
public
Augments a constructor's prototype with additional
properties and functions:
`
javascript
MyObject = Ember.Object.extend({
name: 'an object'
});
o = MyObject.create();
o.get('name'); // 'an object'
MyObject.reopen({
say: function(msg){
console.log(msg);
}
})
o2 = MyObject.create();
o2.say("hello"); // logs "hello"
o.say("goodbye"); // logs "goodbye"
`
To add functions and properties to the constructor itself,
see reopenClass
reopenClass
()
public
Augments a constructor's own properties and functions:
`
javascript
MyObject = Ember.Object.extend({
name: 'an object'
});
MyObject.reopenClass({
canBuild: false
});
MyObject.canBuild; // false
o = MyObject.create();
`
In other words, this creates static properties and functions for the class.
These are only available on the class and not on any instance of that class.
`
javascript
App.Person = Ember.Object.extend({
name : "",
sayHello : function() {
alert("Hello. My name is " + this.get('name'));
}
});
App.Person.reopenClass({
species : "Homo sapiens",
createPerson: function(newPersonsName){
return App.Person.create({
name:newPersonsName
});
}
});
var tom = App.Person.create({
name : "Tom Dale"
});
var yehuda = App.Person.createPerson("Yehuda Katz");
tom.sayHello(); // "Hello. My name is Tom Dale"
yehuda.sayHello(); // "Hello. My name is Yehuda Katz"
alert(App.Person.species); // "Homo sapiens"
`
Note that species
and createPerson
are *not* valid on the tom
and yehuda
variables. They are only valid on App.Person
.
To add functions and properties to instances of
a constructor by extending the constructor's prototype
see reopen
replaceIn
(
Ember.View
private
-
target
Replaces the content of the specified parent element with this view's
element. If the view does not have an HTML representation yet,
the element will be generated automatically.
Note that this method just schedules the view to be appended; the DOM
element will not be appended to the given element until all bindings have
finished synchronizing
Parameters:
-
target
String | DOMElement | JQueryA selector, element, HTML string, or jQuery object
Returns:
Ember.View:
received
rerender
()
public
Renders the view again. This will work regardless of whether the
view is already in the DOM or not. If the view is in the DOM, the
rendering process will be deferred to give bindings a chance
to synchronize.
If children were added during the rendering process using
appendChild
,
rerender
will remove them, because they will be added again
if needed by the next render
.
In general, if the display of your view changes, you should modify
the DOM element directly instead of manually calling rerender
, which can
be slow.
send
(
public
-
actionName
-
context
Triggers a named action on the
ActionHandler
. Any parameters
supplied after the actionName
string will be passed as arguments
to the action target function.
If the ActionHandler
has its target
property set, actions may
bubble to the target
. Bubbling happens when an actionName
can
not be found in the ActionHandler
's actions
hash or if the
action target function returns true
.
Example
`
js
App.WelcomeRoute = Ember.Route.extend({
actions: {
playTheme() {
this.send('playMusic', 'theme.mp3');
},
playMusic(track) {
// ...
}
}
});
`
Parameters:
-
actionName
StringThe action to trigger -
context
a context to send with the action
sendAction
(
public
-
[action]
-
[params]
Calls an action passed to a component.
For example a component for playing or pausing music may translate click events
into action notifications of "play" or "stop" depending on some internal state
of the component:
`
javascript
// app/components/play-button.js
export default Ember.Component.extend({
click() {
if (this.get('isPlaying')) {
this.sendAction('play');
} else {
this.sendAction('stop');
}
}
});
`
The actions "play" and "stop" must be passed to this play-button
component:
`
handlebars
{{! app/templates/application.hbs }}
{{play-button play=(action "musicStarted") stop=(action "musicStopped")}}
`
When the component receives a browser click
event it translate this
interaction into application-specific semantics ("play" or "stop") and
calls the specified action.
`
javascript
// app/controller/application.js
export default Ember.Controller.extend({
actions: {
musicStarted() {
// called when the play button is clicked
// and the music started playing
},
musicStopped() {
// called when the play button is clicked
// and the music stopped playing
}
}
});
`
If no action is passed to sendAction
a default name of "action"
is assumed.
`
javascript
// app/components/next-button.js
export default Ember.Component.extend({
click() {
this.sendAction();
}
});
`
`
handlebars
{{! app/templates/application.hbs }}
{{next-button action=(action "playNextSongInAlbum")}}
`
`
javascript
// app/controllers/application.js
App.ApplicationController = Ember.Controller.extend({
actions: {
playNextSongInAlbum() {
...
}
}
});
`
Parameters:
-
[action]
String optionalthe action to call -
[params]
optionalarguments for the action
set
(
Object
public
-
keyName
-
value
Sets the provided key or path to the value.
This method is generally very similar to calling
object[key] = value
or
object.key = value
, except that it provides support for computed
properties, the setUnknownProperty()
method and property observers.
### Computed Properties
If you try to set a value on a key that has a computed property handler
defined (see the get()
method for an example), then set()
will call
that method, passing both the value and key instead of simply changing
the value itself. This is useful for those times when you need to
implement a property that is composed of one or more member
properties.
### Unknown Properties
If you try to set a value on a key that is undefined in the target
object, then the setUnknownProperty()
handler will be called instead. This
gives you an opportunity to implement complex "virtual" properties that
are not predefined on the object. If setUnknownProperty()
returns
undefined, then set()
will simply set the value on the object.
### Property Observers
In addition to changing the property, set()
will also register a property
change with the object. Unless you have placed this call inside of a
beginPropertyChanges()
and endPropertyChanges(),
any "local" observers
(i.e. observer methods declared on the same object), will be called
immediately. Any "remote" observers (i.e. observer methods declared on
another object) will be placed in a queue and called at a later time in a
coalesced manner.
Returns:
Object:
The passed value
setProperties
(
Object
public
-
hash
Sets a list of properties at once. These properties are set inside
a single
beginPropertyChanges
and endPropertyChanges
batch, so
observers will be buffered.
`
javascript
record.setProperties({ firstName: 'Charles', lastName: 'Jolley' });
`
Parameters:
-
hash
Objectthe hash of keys and values to set
Returns:
Object:
The passed in hash
toggleProperty
(
Boolean
public
-
keyName
Set the value of a boolean property to the opposite of its
current value.
`
javascript
starship.toggleProperty('warpDriveEngaged');
`
Parameters:
-
keyName
StringThe name of the property to toggle
Returns:
Boolean:
The new property value
toString
()
String
public
Returns a string representation which attempts to provide more information
than Javascript's "
"
toString
typically does, in a generic way for all Ember
objects.
`
javascript
App.Person = Em.Object.extend()
person = App.Person.create()
person.toString() //=> "`
If the object's class is not defined on an Ember namespace, it will
indicate it is a subclass of the registered superclass:
`
javascript
Student = App.Person.extend()
student = Student.create()
student.toString() //=> "<(subclass of App.Person):ember1025>"
`
If the method toStringExtension
is defined, its return value will be
included in the output.
`
javascript
App.Teacher = App.Person.extend({
toStringExtension: function() {
return this.get('fullName');
}
});
teacher = App.Teacher.create()
teacher.toString(); //=> "`
Returns:
String:
string representation
trigger
(
private
-
name
Override the default event firing from
Ember.Evented
to
also call methods with the given name.
Parameters:
-
name
String
willDestroy
()
public
Override to implement teardown.
willRender
()
public
Called before a component has been rendered, both on initial render and
in subsequent rerenders.
willUpdate
()
public
Called when the component is about to update and rerender itself.
Called only during a rerender, not during an initial render.
Properties
actionContext
Unknown
private
actions
Object
public
The collection of functions, keyed by name, available on this
ActionHandler
as action targets.
These functions will be invoked when a matching {{action}}
is triggered
from within a template and the application's current route is this route.
Actions can also be invoked from other parts of your application
via ActionHandler#send
.
The actions
hash will inherit action handlers from
the actions
hash defined on extended parent classes
or mixins rather than just replace the entire hash, e.g.:
`
js
App.CanDisplayBanner = Ember.Mixin.create({
actions: {
displayBanner(msg) {
// ...
}
}
});
App.WelcomeRoute = Ember.Route.extend(App.CanDisplayBanner, {
actions: {
playMusic() {
// ...
}
}
});
// WelcomeRoute
, when active, will be able to respond
// to both actions, since the actions hash is merged rather
// then replaced when extending mixins / parent classes.
this.send('displayBanner');
this.send('playMusic');
`
Within a Controller, Route, View or Component's action handler,
the value of the this
context is the Controller, Route, View or
Component object:
`
js
App.SongRoute = Ember.Route.extend({
actions: {
myAction() {
this.controllerFor("song");
this.transitionTo("other.route");
...
}
}
});
`
It is also possible to call this._super(...arguments)
from within an
action handler if it overrides a handler defined on a parent
class or mixin:
Take for example the following routes:
`
js
App.DebugRoute = Ember.Mixin.create({
actions: {
debugRouteInformation() {
console.debug("trololo");
}
}
});
App.AnnoyingDebugRoute = Ember.Route.extend(App.DebugRoute, {
actions: {
debugRouteInformation() {
// also call the debugRouteInformation of mixed in App.DebugRoute
this._super(...arguments);
// show additional annoyance
window.alert(...);
}
}
});
`
## Bubbling
By default, an action will stop bubbling once a handler defined
on the actions
hash handles it. To continue bubbling the action,
you must return true
from the handler:
`
js
App.Router.map(function() {
this.route("album", function() {
this.route("song");
});
});
App.AlbumRoute = Ember.Route.extend({
actions: {
startPlaying: function() {
}
}
});
App.AlbumSongRoute = Ember.Route.extend({
actions: {
startPlaying() {
// ...
if (actionShouldAlsoBeTriggeredOnParentRoute) {
return true;
}
}
}
});
`
Default: null
ariaRole
String
public
The WAI-ARIA role of the control represented by this view. For example, a
button may have a role of type 'button', or a pane may have a role of
type 'alertdialog'. This property is used by assistive software to help
visually challenged users navigate rich web applications.
The full list of valid WAI-ARIA roles is available at:
[http://www.w3.org/TR/wai-aria/roles#roles_categorization](http://www.w3.org/TR/wai-aria/roles#roles_categorization)
Default: null
childViews
Array
private
Array of child views. You should never edit this array directly.
Default: []
classNameBindings
Array
public
A list of properties of the view to apply as class names. If the property
is a string value, the value of that string will be applied as a class
name.
`
javascript
// Applies the 'high' class to the view element
Ember.View.extend({
classNameBindings: ['priority'],
priority: 'high'
});
`
If the value of the property is a Boolean, the name of that property is
added as a dasherized class name.
`
javascript
// Applies the 'is-urgent' class to the view element
Ember.View.extend({
classNameBindings: ['isUrgent'],
isUrgent: true
});
`
If you would prefer to use a custom value instead of the dasherized
property name, you can pass a binding like this:
`
javascript
// Applies the 'urgent' class to the view element
Ember.View.extend({
classNameBindings: ['isUrgent:urgent'],
isUrgent: true
});
`
This list of properties is inherited from the view's superclasses as well.
Default: []
classNames
Array
public
Standard CSS class names to apply to the view's outer element. This
property automatically inherits any class names defined by the view's
superclasses as well.
Default: ['ember-view']
concatenatedProperties
Array
public
Defines the properties that will be concatenated from the superclass
(instead of overridden).
By default, when you extend an Ember class a property defined in
the subclass overrides a property with the same name that is defined
in the superclass. However, there are some cases where it is preferable
to build up a property's value by combining the superclass' property
value with the subclass' value. An example of this in use within Ember
is the
classNames
property of Ember.View
.
Here is some sample code showing the difference between a concatenated
property and a normal one:
`
javascript
App.BarView = Ember.View.extend({
someNonConcatenatedProperty: ['bar'],
classNames: ['bar']
});
App.FooBarView = App.BarView.extend({
someNonConcatenatedProperty: ['foo'],
classNames: ['foo']
});
var fooBarView = App.FooBarView.create();
fooBarView.get('someNonConcatenatedProperty'); // ['foo']
fooBarView.get('classNames'); // ['ember-view', 'bar', 'foo']
`
This behavior extends to object creation as well. Continuing the
above example:
`
javascript
var view = App.FooBarView.create({
someNonConcatenatedProperty: ['baz'],
classNames: ['baz']
})
view.get('someNonConcatenatedProperty'); // ['baz']
view.get('classNames'); // ['ember-view', 'bar', 'foo', 'baz']
`
Adding a single property that is not an array will just add it in the array:
`
javascript
var view = App.FooBarView.create({
classNames: 'baz'
})
view.get('classNames'); // ['ember-view', 'bar', 'foo', 'baz']
`
Using the concatenatedProperties
property, we can tell Ember to mix the
content of the properties.
In Ember.View
the classNameBindings
and attributeBindings
properties
are also concatenated, in addition to classNames
.
This feature is available for you to use throughout the Ember object model,
although typical app developers are likely to use it infrequently. Since
it changes expectations about behavior of properties, you should properly
document its usage in each individual concatenated property (to not
mislead your users to think they can override the property in a subclass).
Default: null
element
DOMElement
public
Returns the current DOM element for the view.
elementId
String
public
The HTML
id
of the view's element in the DOM. You can provide this
value yourself but it must be unique (just as in HTML):
`
handlebars
{{my-component elementId="a-really-cool-id"}}
`
If not manually set a default value will be provided by the framework.
Once rendered an element's elementId
is considered immutable and you
should never change it. If you need to compute a dynamic value for the
elementId
, you should do this when the component or element is being
instantiated:
`
javascript
export default Ember.Component.extend({
setElementId: Ember.on('init', function() {
let index = this.get('index');
this.set('elementId', 'component-id' + index);
})
});
`
hasBlock
Unknown
public
Returns true when the component was invoked with a block template.
Example (
hasBlock
will be false
):
`
hbs
{{! templates/application.hbs }}
{{foo-bar}}
{{! templates/components/foo-bar.hbs }}
{{#if hasBlock}}
This will not be printed, because no block was provided
{{/if}}
`
Example (hasBlock
will be true
):
`
hbs
{{! templates/application.hbs }}
{{#foo-bar}}
Hi!
{{/foo-bar}}
{{! templates/components/foo-bar.hbs }}
{{#if hasBlock}}
This will be printed because a block was provided
{{yield}}
{{/if}}
`
This helper accepts an argument with the name of the block we want to check the presence of.
This is useful for checking for the presence of the optional inverse block in components.
`
hbs
{{! templates/application.hbs }}
{{#foo-bar}}
Hi!
{{else}}
What's up?
{{/foo-bar}}
{{! templates/components/foo-bar.hbs }}
{{yield}}
{{#if (hasBlock "inverse")}}
{{yield to="inverse"}}
{{else}}
How are you?
{{/if}}
`
Sub-properties:
-
[blockName="default"]
String optionalThe name of the block to check presence of.
hasBlockParams
Unknown
public
Returns true when the component was invoked with a block parameter
supplied.
Example (
hasBlockParams
will be false
):
`
hbs
{{! templates/application.hbs }}
{{#foo-bar}}
No block parameter.
{{/foo-bar}}
{{! templates/components/foo-bar.hbs }}
{{#if hasBlockParams}}
This will not be printed, because no block was provided
{{yield this}}
{{/if}}
`
Example (hasBlockParams
will be true
):
`
hbs
{{! templates/application.hbs }}
{{#foo-bar as |foo|}}
Hi!
{{/foo-bar}}
{{! templates/components/foo-bar.hbs }}
{{#if hasBlockParams}}
This will be printed because a block was provided
{{yield this}}
{{/if}}
`
isDestroyed
Unknown
public
Destroyed object property flag.
if this property is
true
the observers and bindings were already
removed by the effect of calling the destroy()
method.
Default: false
isDestroying
Unknown
public
Destruction scheduled flag. The
destroy()
method has been called.
The object stays intact until the end of the run loop at which point
the isDestroyed
flag is set.
Default: false
mergedProperties
Array
public
Defines the properties that will be merged from the superclass
(instead of overridden).
By default, when you extend an Ember class a property defined in
the subclass overrides a property with the same name that is defined
in the superclass. However, there are some cases where it is preferable
to build up a property's value by merging the superclass property value
with the subclass property's value. An example of this in use within Ember
is the
queryParams
property of routes.
Here is some sample code showing the difference between a merged
property and a normal one:
`
javascript
App.BarRoute = Ember.Route.extend({
someNonMergedProperty: {
nonMerged: 'superclass value of nonMerged'
},
queryParams: {
page: {replace: false},
limit: {replace: true}
}
});
App.FooBarRoute = App.BarRoute.extend({
someNonMergedProperty: {
completelyNonMerged: 'subclass value of nonMerged'
},
queryParams: {
limit: {replace: false}
}
});
var fooBarRoute = App.FooBarRoute.create();
fooBarRoute.get('someNonMergedProperty');
// => { completelyNonMerged: 'subclass value of nonMerged' }
//
// Note the entire object, including the nonMerged property of
// the superclass object, has been replaced
fooBarRoute.get('queryParams');
// => {
// page: {replace: false},
// limit: {replace: false}
// }
//
// Note the page remains from the superclass, and the
// limit
property's value of false
has been merged from
// the subclass.
`
This behavior is not available during object create
calls. It is only
available at extend
time.
This feature is available for you to use throughout the Ember object model,
although typical app developers are likely to use it infrequently. Since
it changes expectations about behavior of properties, you should properly
document its usage in each individual merged property (to not
mislead your users to think they can override the property in a subclass).
Default: null
parentView
Ember.View
private
If the view is currently inserted into the DOM of a parent view, this
property will point to the parent of the view.
Default: null
tagName
String
public
Tag name for the view's outer element. The tag name is only used when an
element is first created. If you change the
tagName
for an element, you
must destroy and recreate the view element.
By default, the render buffer will use a <div>
tag for views.
Default: null
target
Unknown
private
Events
didInsertElement
public
Called when the element of the view has been inserted into the DOM
or after the view was re-rendered. Override this function to do any
set up that requires an element in the document body.
When a view has children, didInsertElement will be called on the
child view(s) first, bubbling upwards through the hierarchy.
didReceiveAttrs
public
Called when the attributes passed into the component have been updated.
Called both during the initial render of a container and during a rerender.
Can be used in place of an observer; code placed here will be executed
every time any attribute updates.
didRender
public
Called after a component has been rendered, both on initial render and
in subsequent rerenders.
didUpdate
public
Called when the component has updated and rerendered itself.
Called only during a rerender, not during an initial render.
didUpdateAttrs
public
Called when the attributes passed into the component have been changed.
Called only during a rerender, not during an initial render.
parentViewDidChange
private
Called when the parentView property has changed.
willClearRender
public
Called when the view is about to rerender, but before anything has
been torn down. This is a good opportunity to tear down any manual
observers you have installed based on the DOM state
willDestroyElement
public
Called when the element of the view is going to be destroyed. Override
this function to do any teardown that requires an element, like removing
event listeners.
Please note: any property changes made during this event will have no
effect on object observers.
willInsertElement
public
Called when a view is going to insert an element into the DOM.
willRender
public
Called before a component has been rendered, both on initial render and
in subsequent rerenders.
willUpdate
public
Called when the component is about to update and rerender itself.
Called only during a rerender, not during an initial render.


{% extends "layout.html" %} {% block title %}Predictive Modeling{% endblock %} {% block navlist %}
Machine learning can be used to build a predictive model for the work-life balance metrics. Here we use a combination of Linear Ridge regression and a Random Forest regressor to predict the scores for the continuous metrics and a Random Forest classifier for the categorical metrics.
The inputs to the models are 16 demographic indicators such as age, occupation, location, household information etc.


Flex Grid
fusionCSS works off a 12 column fluid grid and supports a variable number of columns per row.
Column spans are available in 4 device widths, tiny, small, medium and large.
|
Tiny |
Small |
Medium |
Large |
| Device Width |
< 768px |
≥ 768px |
≥ 992px |
≥ 1200px |
| CSS Class |
.span-tn |
.span-sn |
.span-mn |
.span-ln |
* Where n is the number of columns to span.
Selecting a span-s6 will use 6 columns for small, medium and large devices, while on tiny devices the grid will revert to a single column.
fusionCSS supports nesting of spans as well as out of order rendering of columns.
The Grid
The column widths are specified with the span class, span classes range from span1 through to span12. span1 is 1/12 of the width of the containing row width while span6 is 6/12 of the width and span12 is the full width.
The sum of all columns in a row should add up to 12.
span-s3
span-s3
span-s3
span-s3

span-s6

span-s6

span-s3

span-s3

span-s3

span-s3

span-s8

span-s4

Nested Grids
The grid can be nested as required by adding rows within the outer spans.

span-s6

span-s6

span-s6

span-s6

span-s6

Offsets
In some cases you do not need a column to be present but rather you need a gap. The offset class which ranges from offset-t1 through to offset-t11 allows you to specify the number of columns to leave to the left of the selected span.

span-s6

span-s6

span-s3 / t6

span-s3

span-s4

Justify Content
justifty-content-* classes change the alignment of items in a row.

span-s3

span-s3

span-s3

span-s3

span-s3

span-s3

span-s3

span-s3

span-s3

span-s3

Align Items
align-items-* classes change the vertical alignment of items in a row.

span-s3

span-s3

span-s3

span-s3

span-s3

span-s3

span-s3

span-s3

span-s3

span-s3

Out of Order Columns
By default columns appear left to right in the order that they are defined within the HTML, however the order-dn classes allow the display order to be adjusted.
Where d is the device width and n is the number of columns to span.
The column order can be change based on device width as the 3rd row demonstrates.

1st in HTML

2nd in HTML

1st

2nd

3rd

1st

2nd

3rd

Variable Column Widths
The column widths can be changed to match the device width, e.g. on a small device a 2 column layout may be chosen which adjusts to 4 column on a large device.
fusionCSS has a .75rem gutter on column spans, this can be removed with the no-gutter, no-left-gutter and no-right-gutter classes, this is useful for having span contents butt up against each other.
t12 / s3 / m6
t6 / s3 / m6
t6 / s3 / m6
t12 / s3 / m6

t12 / s3 / m6

t6 / s3 / m6

t6 / s3 / m6

t12 / s3 / m6

Gutters
The gutters can be enabled or disabled depending on the width.


Binary Tree¶
-
class
Balanced_binary_tree.
BalancedSearchTree
(size=16)¶ Balanced Search Tree usage: bs.BalancedSearchTree
call bs.insert to add int to tree call bs.insertlist to add a whole list to treeTodo: create a better print function for displaying tree -
balance
(tree=[])¶ Description: balance makes use of the fact we are using a list to store our tree. It sorts the list first, then uses the built in insert function to reapply the values in a more balanced order. Parameters: tree (list) – list that holds the values of self.tree Returns: none
-
extend
()¶ Description: extends the size of the list when a value will not fit in current tree Returns: none
-
find
(key)¶ Parameters: key (int) – the value to be found Returns: if the key was found or not Return type: bool
-
insert
(val)¶ Parameters: val (int) – value to insert into tree Returns: none
-
insertlist
(inlist=[])¶ Parameters: inlist (list) – the list to be inserted if no value is given assumes an empty list Returns: none
-
leftchild
(i)¶
-
rightchild
(i)¶
-


Home
Change Password
Password must be at least 10 characters long
Your password and confirmation must match exactly
New password:
Confirm new password:


Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
IN THE HIGH COURT OF JUDICATURE AT PATNA CRIMINAL MISCELLANEOUS No.23433 of 2019 Arising Out of PS. Case No.-45 Year-2019 Thana- BARUN District- Aurangabad ====================================================== NIJAM ANSARI @ MD. NIJAM ANSARI @ NIJAL ANSARI Son of Salauddin Ansari Resident of Village- Dhamani Barun, P.S.- Barun, District- Aurangabad. ... ... Petitioner/s Versus The State of Bihar ... ... Opposite Party/s ====================================================== Appearance : For the Petitioner/s : Mr.Sanjay Kumar For the Opposite Party/s : Mr.Bharat Lal ====================================================== CORAM: HONOURABLE MR. JUSTICE VINOD KUMAR SINHA ORAL ORDER
4 24-06-2019 Heard the parties.
This application is for grant of regular bail in connection with Barun P.S.Case No.45 of 2019 for the offences under Sections 379, 411, 420/34 of the Indian Penal Code and 4/40 BMMCR and 15 of Pollution Act.
Allegation against the petitioner is of carrying sands without having licence of challan.
Submission of the learned counsel for the petitioner is that the allegation is false and concocted, he has no criminal antecedent and other co-accused persons have been granted privilege of anticipatory bail.
Heard learned A.P.P. also.
Having heard both sides and in view of the facts Patna High Court CR. MISC. No.23433 of 2019(4) dt.24-06-2019 2/2 and circumstances, as stated above, I am not inclined to grant bail to the petitioner at this stage, however, the petitioner is directed to surrender before the learned court below and make prayer for regular bail, which will be considered on its own merit without being prejudiced by the order of this Court and if possible to be disposed of on the same day.
With the above direction, this application is dismissed.
(Vinod Kumar Sinha, J) chn/-
U T


This page was created as a native QuickBase alternative to Postman. The intent is to provide a user with the ability to easily select and adjust parameters to automatically generate an AJAX API call and provide a response. The User can then copy and paste this request straight into his or her code.
This page uses JSON inputs which it then converts into XML. This is to better align with QuickBase's upcoming changes to it's API.
Future improvements include allowing the user to select XML or JSON as a response.
This page is copyrighted under the standard MIT License. For more information, visit this page's GitHub Repo


Deprecated.This no longer is used, xml parameter files are now translated
through XSLT to the normal parameter file format and read in
through the ParameterReader.
convert x, y points to a LatLonPoint
this is really a conversion from the x,y location used to display a point on the display
to the that LatLonPoint on the display


Interface StreamingRecognitionResultOrBuilder (2.0.0)
public interface StreamingRecognitionResultOrBuilder extends MessageOrBuilder
Implements
MessageOrBuilderMethods
getAlternatives(int index)
public abstract SpeechRecognitionAlternative getAlternatives(int index)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
| Name | Description |
| index | int |
| Type | Description |
| SpeechRecognitionAlternative |
getAlternativesCount()
public abstract int getAlternativesCount()
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
| Type | Description |
| int |
getAlternativesList()
public abstract List<SpeechRecognitionAlternative> getAlternativesList()
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
| Type | Description |
| List<SpeechRecognitionAlternative> |
getAlternativesOrBuilder(int index)
public abstract SpeechRecognitionAlternativeOrBuilder getAlternativesOrBuilder(int index)
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
| Name | Description |
| index | int |
| Type | Description |
| SpeechRecognitionAlternativeOrBuilder |
getAlternativesOrBuilderList()
public abstract List<? extends SpeechRecognitionAlternativeOrBuilder> getAlternativesOrBuilderList()
Output-only May contain one or more recognition hypotheses (up to the
maximum specified in max_alternatives
).
repeated .google.cloud.speech.v1beta1.SpeechRecognitionAlternative alternatives = 1;
| Type | Description |
| List<? extends com.google.cloud.speech.v1beta1.SpeechRecognitionAlternativeOrBuilder> |
getIsFinal()
public abstract boolean getIsFinal()
Output-only If false
, this StreamingRecognitionResult
represents an
interim result that may change. If true
, this is the final time the
speech service will return this particular StreamingRecognitionResult
,
the recognizer will not return any further hypotheses for this portion of
the transcript and corresponding audio.
bool is_final = 2;
| Type | Description |
| boolean |
getStability()
public abstract float getStability()
Output-only An estimate of the likelihood that the recognizer will not
change its guess about this interim result. Values range from 0.0
(completely unstable) to 1.0 (completely stable).
This field is only provided for interim results (is_final=false
).
The default of 0.0 is a sentinel value indicating stability
was not set.
float stability = 3;
| Type | Description |
| float |


The viewer’s location is tracked by a depth sensor, and visuals are generated and projected on the ground, merging into the viewer’s own shadow. The visuals are programmed in Processing, using a physics engine library.
This is a half-semester long project. Final installation is shown in the interface show at the end of the semester. The work sheet helps me to plan ahead and keep orginized.
The project invovles using physics libray, kinnect sensor, and working with computer vision, which were new to me. I make small sketches to test the algrithums and eventually managed put everything toghether.
Lots of unexpected things happened during the setup. A lot of code adjustments. The size is quite limited because of the space(height of the wall determines size of the projection). Overall it's a good experience and practice. Here is a short video showing it working


--- layout: page title: About header-img: "img/about-bg.png" ---
A modern day Renaissance woman, I love to learn. I am a wife, mother, nurse, hobby photographer, and post grad. Always being a "techy", I am excited and ready to deep dive into software engineering.


Key: Depth of knowledge, contribution for past project, explain how these topics furthered company growth in a data product
Overall goal: ...
Project 1: xxx
Project 2: xxx
Key: Avoid talkingi about issues with specific people; could dislike how the organization is not placing data science at the center of its strategy
Key: how good are you at defending your position, and ability to engender change (quantifiable in its impact) within the team, communication \& leadership


Node settings
Id:
Name:
Description:
Server:
Arguments:
Executable:
Architecture:
OS:
RAM:
Disk:
CPU time:
Input file:
Input file:
URL:
Output file:
STD out:
STD err:
gmlog:
Network settings
syn
notsyn
Data transfer size:
Time/speed:


Validator
Constructor Summary
| Public Constructor | ||
| public |
constructor(set: *) |
Member Summary
| Public Members | ||
| public |
Ex1: * |
|
| public |
Ex2: * |
|
| public |
Ex3: * |
|
| public |
Ex4: * |
|
| public |
|
|
| public |
|
|
| public |
session: * |
|
| public |
set: * Class parameters |
|
| public |
|
|
| public |
validFinalSet: *[] |
|
| public get |
validSet: * Getter for final valid set for exercise generator |
|
| public get |
validSize: * Getter for final valid size of the generated bookmarks |
Method Summary
| Public Methods | ||
| public |
The function caches imports in local scope for later to be referenced as a string |
|
| public |
enoughBookmarks(set: *): * number of bookmarks >= requested number simply generate exercises Assumes the given set has valid minimal sizes for exercises |
|
| public |
getBookmarks(totalSize: *): * Ajax get request to the Zeeguu API to get new bookmarks |
|
| public |
getValidBookMarks(args: *): * |
|
| public |
isProperEx(exNum,: int, exSize,: int): * Compares the minimum requirement for the given ex and the assigned amount |
|
| public |
Number of bookmarks == 0 then show no bookmarks page Signals the generator to terminate, load no bookmark page |
|
| public |
notEnoughBookmarks(bookmarkLength: *, set: *): Array Number of bookmarks < requested number, generate exercises that fit |
|
| public |
validateSet(totalSetLength: *, data: *): Array Given the set and the bookmarks create a new set for generator Three possibilities: number of bookmarks == 0 then show no bookmarks page number of bookmarks < requested number then generate exercises that fit number of bookmarks >= requested number simply generate exercises |
Public Constructors
public constructor(set: *) source
Params:
| Name | Type | Attribute | Description |
| set | * |
Public Members
public Ex1: * source
public Ex2: * source
public Ex3: * source
public Ex4: * source
public loadingAnimation: * source
public session: * source
public validFinalSet: *[] source
Public Methods
public cacheExerciseImports() source
The function caches imports in local scope for later to be referenced as a string
public enoughBookmarks(set: *): * source
number of bookmarks >= requested number simply generate exercises Assumes the given set has valid minimal sizes for exercises
Params:
| Name | Type | Attribute | Description |
| set | * |
Return:
| * |
public getBookmarks(totalSize: *): * source
Ajax get request to the Zeeguu API to get new bookmarks
Params:
| Name | Type | Attribute | Description |
| totalSize | * |
Return:
| * |
public getValidBookMarks(args: *): * source
Params:
| Name | Type | Attribute | Description |
| args | * | is matrix of exercise name and number of bookmarks, example: [[1,3],[2,4]] 3 bookmarks for ex1 and 4 bookmarks for ex2 |
Return:
| * | matrix of exercises similar to its input |
public isProperEx(exNum,: int, exSize,: int): * source
Compares the minimum requirement for the given ex and the assigned amount
Params:
| Name | Type | Attribute | Description |
| exNum, | int | the id of the ex |
|
| exSize, | int | the amount the ex is generated |
Return:
| * | {boolean}, true if the minReq >= givenAmount, else false |
Example:
this.isProperEx(1,2), Ex1 2 times
public noBookmarkPage(): Array source
Number of bookmarks == 0 then show no bookmarks page Signals the generator to terminate, load no bookmark page
public notEnoughBookmarks(bookmarkLength: *, set: *): Array source
Number of bookmarks < requested number, generate exercises that fit
Params:
| Name | Type | Attribute | Description |
| bookmarkLength | * | ||
| set | * |
public validateSet(totalSetLength: *, data: *): Array source
Given the set and the bookmarks create a new set for generator Three possibilities: number of bookmarks == 0 then show no bookmarks page number of bookmarks < requested number then generate exercises that fit number of bookmarks >= requested number simply generate exercises
Params:
| Name | Type | Attribute | Description |
| totalSetLength | * | ||
| data | * |


Development Incomplete
Please come back later
Quit snooping!
Your browser does not support the audio tag.


Let's do this! Week 1 has been very exciting for me. Up until now, my coding instruction has come from online tutorials and exercises. Learning to actually manipulate my computer's folders and files using the Command Line (CLI) has been completely new - and confidence inspiring. Our focus so far has been on setting up our computers (I'm a Mac gal), becoming familiar with the command line, and learning about the capabilities of git, a Version Control System.
The benefits of version control are amazing. Being able to revert back to previous versions of your work (in the case that you've accidentally introduced a bug or you're just dissatisfied with the direction your code has taken) can save a lot of time and frustration. It also allows multiple people to work on a file at the same time, which is where git comes into play.
Using git, you can track where a file is in the workflow. It's 1) being worked on, 2) waiting to be saved, or 3) changes have been saved or committed. When ready to send your changes to the main file, you "push" it to another person on your team. This allows them to see what changes have been made and go over your code one more time before they merge it with what everyone else has been working on. It's kind of like being assigned to work on the first two chapters of a book, while the rest of the chapters have been assigned to multiple other people. When your chapters are ready, you send it to one person that looks them over and decides if they are ready to become a permanent part of the overall book. When working with a group of people, this just makes sense.
GitHub is a way to store our code online and share it with others. It allows for feedback from fellow developers and your files are available remotely to be accessed by anyone, rather than just on your computer.


SplDoublyLinkedList::bottom
(PHP 5 >= 5.3.0, PHP 7)
SplDoublyLinkedList::bottom — Peeks at the node from the beginning of the
doubly linked list
说明
public mixed SplDoublyLinkedList::bottom ( void )
参数
此函数没有参数。
返回值
The value of the first node.
错误／异常
Throws RuntimeException when the data-structure is empty.
User Contributed Notes 2 notes
===============================================================================
A note on top() and bottom():
Picture the doubly-linked list (or queue) in the same way that you would a
stack.
Say you started with an empty queue, and added five values:
$myList = new SplDoublyLinkedList
$mylist->push(1)
$mylist->push(2)
$mylist->push(3)
$mylist->push(4)
$mylist->push(5)
$mylist->top()
-> 5
$mylist->bottom()
-> 1
===============================================================================
isEmpty())
{
echo "Adding nodes to Linked List
";
$obj->push(2);
$obj->push(3);
echo "Adding the node at beginning of doubly linked list
";
$obj->unshift(10);
}
echo "
Our Linked List:";
print_r($obj);
echo "
Pick the node from beginning of doubly linked list";
echo $obj->bottom();
?>


Click here to go to the corresponding page for the latest version of DIALS
dials.algorithms.symmetry¶
Methods for symmetry determination.
This module provides a base class for symmetry determination algorithms.
-
class
dials.algorithms.symmetry.
symmetry_base
(intensities, normalisation='ml_aniso', lattice_symmetry_max_delta=2.0, d_min=<libtbx.AutoType object>, min_i_mean_over_sigma_mean=4, min_cc_half=0.6, relative_length_tolerance=None, absolute_angle_tolerance=None)[source]¶ Bases:
object
Base class for symmetry analysis.
-
static
kernel_normalisation
(intensities)[source]¶ Kernel normalisation of the input intensities.
Parameters: intensities (cctbx.miller.array) – The intensities to be normalised. Returns: The normalised intensities. Return type: cctbx.miller.array
-
static
ml_aniso_normalisation
(intensities)[source]¶ Anisotropic maximum-likelihood normalisation of the input intensities.
Parameters: intensities (cctbx.miller.array) – The intensities to be normalised. Returns: The normalised intensities. Return type: cctbx.miller.array
-
static
ml_iso_normalisation
(intensities)[source]¶ Isotropic maximum-likelihood normalisation of the input intensities.
Parameters: intensities (cctbx.miller.array) – The intensities to be normalised. Returns: The normalised intensities. Return type: cctbx.miller.array
-
static
quasi_normalisation
(intensities)[source]¶ Quasi-normalisation of the input intensities.
Parameters: intensities (cctbx.miller.array) – The intensities to be normalised. Returns: The normalised intensities. Return type: cctbx.miller.array
-
static
Algorithms for determination of Laue group symmetry.
-
class
dials.algorithms.symmetry.determine_space_group.
CorrelationCoefficientAccumulator
(x=None, y=None)[source]¶ Bases:
object
Class for incremental computation of correlation coefficients.
- Uses the single-pass formula for Pearson correlation coefficient:
- https://en.wikipedia.org/wiki/Pearson_correlation_coefficient#For_a_sample
-
accumulate
(x, y)[source]¶ Accumulate the x and y values provided.
Parameters: - x (list) – The list of x values to accumulate.
- y (list) – The list of y values to accumulate.
-
coefficient
()[source]¶ Calculate the correlation coefficient.
Returns: The correlation coefficient. Return type: float
-
denominator
()[source]¶ “Calculate the denominator of the correlation coefficient formula.
\[\sqrt{n \sum{x^2} - \sum{x}^2} \sqrt{n \sum{y^2} - \sum{y}^2}\]Returns: The value of the denominator. Return type: float
-
class
dials.algorithms.symmetry.determine_space_group.
ScoreSubGroup
(subgroup, sym_op_scores)[source]¶ Bases:
object
Score the probability of a given subgroup being the true subgroup.
- Calculates the combined correlation coefficients for symmetry operations present/absent from the subgroup.
- Calculates overall Zcc scores for symmetry elements present/absent from the subgroup.
- Calculates the overall likelihood for this subgroup.
See appendix A2 of Evans, P. R. (2011). Acta Cryst. D67, 282-292.
-
as_dict
()[source]¶ Return a dictionary representation of the subgroup scoring.
- The dictionary will contain the following keys:
- patterson_group: The current subgroup
- likelihood: The likelihood of the subgroup being correct
- confidence: The confidence of the subgroup being correct
- z_cc_for: The combined Z-scores for all symmetry elements present in the subgroup
- z_cc_against: The combined Z-scores for all symmetry elements present in the lattice group but not in the subgroup
- z_cc_net: The net Z-score, i.e. z_cc_for - z_cc_against
- cc_for: The overall correlation coefficient for all symmetry elements present in the subgroup
- cc_against: The overall correlation coefficient for all symmetry elements present in the lattice group but not in the subgroup
- max_angular_difference: The maximum angular difference between the symmetrised unit cell and the P1 unit cell.
- cb_op: The change of basis operation from the input unit cell to the ‘best’ unit cell.
Returns: Return type: dict
-
class
dials.algorithms.symmetry.determine_space_group.
ScoreSymmetryElement
(intensities, sym_op, cc_true, cc_sig_fac)[source]¶ Bases:
object
Analyse intensities for presence of a given symmetry operation.
- Calculate the correlation coefficient, CC, for the given sym op.
- Calculate the probability of observing this CC if the sym op is present, p(CC; S), modelled by a Cauchy distribution centred on cc_true and width gamma = sigma_cc.
- Calculate the probability of observing this CC if the sym op is NOT present, p(CC; !S).
- Calculate the likelihood of symmetry element being present, p(S; CC) = p(CC; S) / (p(CC; S) + p(CC; !S))
See appendix A1 of Evans, P. R. (2011). Acta Cryst. D67, 282-292.
-
as_dict
()[source]¶ Return a dictionary representation of the symmetry element scoring.
- The dictionary will contain the following keys:
- likelihood: The likelihood of the symmetry element being present
- z_cc: The Z-score for the correlation coefficent
- cc: The correlation coefficient for the symmetry element
- n_ref: The number of reflections contributing to the correlation coefficient
- operator: The xyz representation of the symmetry element
Returns: Return type: dict
-
class
dials.algorithms.symmetry.determine_space_group.
determine_space_group
(intensities, normalisation='ml_aniso', lattice_symmetry_max_delta=2.0, d_min=<libtbx.AutoType object>, min_i_mean_over_sigma_mean=4, min_cc_half=0.6, relative_length_tolerance=None, absolute_angle_tolerance=None)[source]¶ Bases:
dials.algorithms.symmetry.symmetry_base
Determination of Laue group symmetry using algorithms similar to POINTLESS.
See also
Evans, P. (2006). Acta Cryst. D62, 72-82 and Evans, P. R. (2011). Acta Cryst. D67, 282-292.
-
dials.algorithms.symmetry.determine_space_group.
trunccauchy_pdf
(x, a, b, loc=0, scale=1)[source]¶ Calculate a truncated Cauchy probability density function.
Parameters: - x (float) – The point at which to calculate the PDF.
- a (float) – The lower bound of the truncated distribution.
- b (float) – The upper bound of the truncated distribution.
- loc (float) – The location parameter for the Cauchy distribution.
- scale (float) – The scale parameter for the Cauchy distribution.
Returns: The value of the probability density function.
Return type:
Functions to help with reindexing against a reference dataset.
-
dials.algorithms.symmetry.reindex_to_reference.
determine_reindex_operator_against_reference
(test_miller_set, reference_miller_set)[source]¶ Reindex a miller set to match a reference miller set.
This function takes two miller arrays, a reference and a test array. The space group is checked to see if any reindexing may be required to give consistent indexing between both datasets. If possible twin operators exist, the different indexing options are tested against the reference set, using the correlation between datasets as the test.
Parameters: - test_miller_set (cctbx.miller.array) – The input miller set to be reindexed.
- reference_miller_set (cctbx.miller.array) – The reference miller set.
Returns: The change of basis operator which should be applied to the test dataset to give consistent indexing with the reference.
Return type: cctbx.sgtbx.change_of_basis_op
dials.algorithms.symmetry.cosym¶
Methods for symmetry determination from partial datasets.
This module implements the methods of Gildea, R. J. & Winter, G. (2018). Acta Cryst. D74, 405-410 for determination of Patterson group symmetry from sparse multi-crystal data sets in the presence of an indexing ambiguity.
-
class
dials.algorithms.symmetry.cosym.
analyse_datasets
(intensities, params)[source]¶ Bases:
dials.algorithms.symmetry.symmetry_base
Peform cosym analysis.
Peform cosym analysis on the input intensities using the methods of Gildea, R. J. & Winter, G. (2018). Acta Cryst. D74, 405-410 for determination of Patterson group symmetry from sparse multi-crystal data sets in the presence of an indexing ambiguity.
-
dials.algorithms.symmetry.cosym.
plot_dendrogram
(linkage_matrix, file_name, labels=None, color_threshold=0.05)[source]¶ Plot dendrogram from a linkage matrix.
Parameters: - linkage_matrix (numpy.ndarray) – The hierarchical clustering of centroids of
the initial clustering as produced by
scipy.cluster.hierarchy.linkage()
. - file_name (str) – The output file name.
- labels (list) – Optional labels for the leaves of the dendrogram.
- color_threshold (float) – The color threshold passed to the :func:scipy.cluster.hierarchy.dendrogram` function.
- linkage_matrix (numpy.ndarray) – The hierarchical clustering of centroids of
the initial clustering as produced by
-
dials.algorithms.symmetry.cosym.
plot_matrix
(correlation_matrix, linkage_matrix, file_name, labels=None, color_threshold=0.05)[source]¶ Plot correlation and linkage matrices.
Parameters: - correlation_matrix (numpy.ndarray) – The distance matrix used to generate
the
linkage_matrix
. - linkage_matrix (numpy.ndarray) – The hierarchical clustering of centroids of
the initial clustering as produced by
scipy.cluster.hierarchy.linkage()
. - file_name (str) – The output file name.
- labels (list) – Optional labels for the leaves of the dendrogram.
- color_threshold (float) – The color threshold passed to the :func:scipy.cluster.hierarchy.dendrogram` function.
- correlation_matrix (numpy.ndarray) – The distance matrix used to generate
the
Target function for cosym analysis.
-
class
dials.algorithms.symmetry.cosym.target.
Target
(intensities, lattice_ids, weights=None, min_pairs=None, lattice_group=None, dimensions=None, nproc=1)[source]¶ Bases:
object
Target function for cosym analysis.
-
dim
¶ int – The number of dimensions used in the analysis.
-
compute_functional
(x)[source]¶ Compute the target function at coordinates x.
Parameters: x (scitbx.array_family.flex.double) – a flattened list of the N-dimensional vectors, i.e. coordinates in the first dimension are stored first, followed by the coordinates in the second dimension, etc. Returns: The value of the target function at coordinates x. Return type: f (float)
-
compute_functional_and_gradients
(x)[source]¶ Compute the target function and gradients at coordinates x.
Parameters: x (scitbx.array_family.flex.double) – a flattened list of the N-dimensional vectors, i.e. coordinates in the first dimension are stored first, followed by the coordinates in the second dimension, etc. Returns: f: The value of the target function at coordinates x. grad: The gradients of the target function with respect to the parameters. Return type: Tuple[float, scitbx.array_family.flex.double]
-
compute_gradients_fd
(x, eps=1e-06)[source]¶ Compute the gradients at coordinates x using finite differences.
Parameters: - x (scitbx.array_family.flex.double) – a flattened list of the N-dimensional vectors, i.e. coordinates in the first dimension are stored first, followed by the coordinates in the second dimension, etc.
- eps (float) – The value of epsilon to use in finite difference calculations.
Returns: The gradients of the target function with respect to the parameters.
Return type:
-
curvatures
(x)[source]¶ Compute the curvature of the target function.
Parameters: x (scitbx.array_family.flex.double) – a flattened list of the N-dimensional vectors, i.e. coordinates in the first dimension are stored first, followed by the coordinates in the second dimension, etc. Returns: The curvature of the target function with respect to the parameters. Return type: curvs (scitbx.array_family.flex.double)
-
curvatures_fd
(x, eps=1e-06)[source]¶ Compute the curvatures at coordinates x using finite differences.
Parameters: - x (scitbx.array_family.flex.double) – a flattened list of the N-dimensional vectors, i.e. coordinates in the first dimension are stored first, followed by the coordinates in the second dimension, etc.
- eps (float) – The value of epsilon to use in finite difference calculations.
Returns: The curvature of the target function with respect to the parameters.
Return type: curvs (scitbx.array_family.flex.double)
-
get_sym_ops
()[source]¶ Get the list of symmetry operations used in the analysis.
Returns: The list of symmetry operations. Return type: List[cctbx.sgtbx.rt_mx]
-
plot_rij_cumulative_frequency
(plot_name=None)[source]¶ Plot the cumulative frequency of the rij values.
Parameters: plot_name (str) – The file name to save the plot to. If this is not defined then the plot is displayed in interactive mode.
-
plot_rij_histogram
(plot_name=None)[source]¶ Plot a histogram of the rij values.
Parameters: plot_name (str) – The file name to save the plot to. If this is not defined then the plot is displayed in interactive mode.
-
plot_rij_matrix
(plot_name=None)[source]¶ Plot the matrix of rij values.
Parameters: plot_name (str) – The file name to save the plot to. If this is not defined then the plot is displayed in interactive mode.
-
plot_wij_cumulative_frequency
(plot_name=None)[source]¶ Plot the cumulative frequency of the wij values.
Parameters: plot_name (str) – The file name to save the plot to. If this is not defined then the plot is displayed in interactive mode.
-
plot_wij_histogram
(plot_name=None)[source]¶ Plot a histogram of the wij values.
Parameters: plot_name (str) – The file name to save the plot to. If this is not defined then the plot is displayed in interactive mode.
-
LBFGS refinement engine for cosym analysis.
-
class
dials.algorithms.symmetry.cosym.engine.
lbfgs_with_curvs
(target, coords, use_curvatures=True, termination_params=None)[source]¶ Bases:
object
Minimise a target function using the LBFGS minimiser.
Implementation of an LBFGS minimiser using curvature information, according to the interface defined by
scitbx.lbfgs
.-
callback_after_step
(minimizer)[source]¶ Log progress after each successful step of the minimisation.
-
compute_functional_and_gradients
()[source]¶ Compute the functional and gradients.
Returns: A tuple of the functional and gradients. Return type: tuple
-
compute_functional_gradients_and_curvatures
()[source]¶ Compute the functional, gradients and curvatures.
Returns: A tuple of the functional, gradients and curvatures. Return type: tuple
-
Seed clustering method for cosym analysis.
-
class
dials.algorithms.symmetry.cosym.seed_clustering.
seed_clustering
(coordinates, n_datasets, n_sym_ops, min_silhouette_score, n_clusters=<libtbx.AutoType object>, plot_prefix=None)[source]¶ Bases:
object
Perform seed clustering of coordinates.
Labels points into clusters such that cluster contains exactly one copy of each dataset, then performs silhouettete analysis on the resulting clusters to determine the true number of clusters present, under the constraint that only equal-sized clusterings are valid, i.e. each dataset should appear an equal number of times in each cluster.
See also
https://en.wikipedia.org/wiki/Silhouette_(clustering) http://scikit-learn.org/stable/auto_examples/cluster/plot_kmeans_silhouette_analysis.html
-
cluster_labels
¶ scitbx.array_family.flex.int – A label for each coordinate.
-


#include <CNode.hpp>
◆ CNode()
◆ addCallback()
| void st::CNode::addCallback |
( |
string |
name, |
|
|
void(*)() |
function |
|
) |
| |
|
inline |
◆ addChild()
| void st::CNode::addChild |
( |
string |
name, |
|
|
shared_ptr< CNode > |
child |
|
) |
| |
|
inline |
◆ get()
| Widget* st::CNode::get |
( |
| ) |
|
|
inline |
◆ setBoxLayout()
| void st::CNode::setBoxLayout |
( |
string |
str_orientation, |
|
|
string |
str_alignment, |
|
|
int |
margin, |
|
|
int |
spacing |
|
) |
| |
|
inline |
◆ setGroupLayout()
| void st::CNode::setGroupLayout |
( |
| ) |
|
|
inline |
◆ callbacks
| map< string, void(*)() > st::CNode::callbacks |
|
protected |
◆ children
| map< string, shared_ptr < CNode > > st::CNode::children |
|
private |
◆ parent
| shared_ptr< CNode > st::CNode::parent |
|
protected |
◆ widget
| Widget* st::CNode::widget |
|
protected |
The documentation for this class was generated from the following file:
- D:/GitKraken/ShaderTool/ShaderTool/src/data/CNode.hpp


{% extends 'base.html' %} {% block bodyblock %}
Face is one of the most important biometric traits. By analyzing the face we get a lot of information such as age, gender, ethnicity, identity, expression, etc.A gender classification system uses face of a person from a given image to tell the gender (male/female) of the given person. A successful gender classification approach can boost the performance of many other applications including face recognition and smart human-computer interface.


↓
“It’s actually funny because I just got to get coffee with someone I love who I haven’t seen in a while. Thinking about love especially on this sunny day is nice”
"I love my dog. he’s my best friend in the world. I’m getting giddy just talking about him.
"They show up in my dreams sometimes, and I’m like ‘I love you so much’ but you’ll never know cause you can’t cause you're lost in a sea of people and you’re lost in the sea of yourself"
"I love my mom… She came from Taiwan and she didn’t go to college so I’m actually first generation. I always worry about trying to meet her expectations, but she’s always saying just do whatever you want and have fun in college. But I can’t because I feel like I need to make her proud."
"She's very resilient... but you'd never know it just talking to her. She has had so many issues throughout her life that I've had the fortune to hear about because she has trusted me with them."
"I love her because I think she’s turning into a really good person, and i’m proud to be her older brother."


--- layout: default title: Founded in 1914 ---
The Regiment`s lineage dates back to the Kensington Volunteers of 1798 raised to protect Kensington in case of invasion by Napoleon the first. The Haldane reforms of 1908 disbanded the old Volunteer units and thus the 13th County of London Regiment was formed. In the same year HRH Princess Louise who resided at Kensington Palace gave her consent to the use of her name to the new Regiment. The Regiment went on to distinguish itself during both World Wars and in the Post War / Cold War era. Over the past 100 years the Regiment has fulfilled many roles from a front-line infantry regiment in the Great War 1914-18, to a Machine Gun Regiment in the Second World War 1939-45. In 1947 the Regiment was re-badged into the Royal Corps of Signals as a Phantom Signal Regiment The Regiment is currently titled as 31 (Mx Yeo and PLK) Signal Squadron within the Royal Corps of Signals as part of a High – Tech Signals and Communications Regiment. In this role it continues to support the regular army and our country`s commitment to NATO.


Developed by Microsoft, the Windows Presentation Foundation (or WPF) is a computer-software graphical subsystem for rendering user interfaces in Windows-based applications. WPF, previously known as "Avalon", was initially released as part of .NET Framework 3.0. Rather than relying on the older GDI subsystem, WPF uses DirectX. WPF attempts to provide a consistent programming model for building applications and separates the user interface from business logic. It resembles similar XML-oriented object models, such as those implemented in XUL and SVG.
WPF applications can also be deployed as standalone desktop programs, or hosted as an embedded object in a website. WPF aims to unify a number of common user interface elements, such as 2D/3D rendering, fixed and adaptive documents, typography, vector graphics, runtime animation, and pre-rendered media. These elements can then be linked and manipulated based on various events, user interactions, and data bindings.


## Exploring Graph Data with Neo4j and Spring Boot ### Java Vienna Meetup April 2018
### Bio ![daja pic](daja.jpg) - Daniel Jahre (* 1977) - Linux and Open Source User since 1997 - Software Developer in Vienna - Part of ***Linuxwochen*** Organizing Team since 2008 - Joined ***Java Vienna*** in 2014
### Agenda - Why modelling Data as Graphs? - Neo4j - Cypher Query Language - Exploring Pet Clinic Example from Spring - Integrate everything into Spring Boot
# Why?
![whiteboard](whiteboard1.jpg)
![whiteboard clipart](Tableau-blanc-300px.png)
![network graph](Network-Management-Model.svg)
### Why? - Graphs are everywhere - We draw relations all the time - We have all sorts of diagrams
### Joe's Network ![Joe's Network](joes_network.png)
### Real World Examples - Facebook, Twitter, all social media - Routing problems - Recommendation Engines (e.g. Amazon) - [Analyzing the Panama Paper Leak (dzone)](https://dzone.com/articles/analyzing-the-panama-papers-with-Neo4j-data-models) - [The Story behind Russian Twitter Trolls](https://neo4j.com/blog/story-behind-russian-twitter-trolls/)
### Basics - A Graph is a ***set of vertices and edges*** - We use a directed property Graph - We call vertices ***nodes*** and edges ***relations*** - We put ***labels*** on nodes to identify special kind of nodes
![Neo4j Logo](neo4j_logo.png)
### Neo4j - built in 2007 on top of ***MySQL*** - rebuilt now with own backend to handle the graph models better - index-free adjacency (traveling neighbouring nodes is cheap) - ACID
### Neo4j - Licensing - Community Edition * GPLv3 - Enterprise Edition * AGPL or Commercial Licensing * Features clustering and load balancing etc.
### Neo4j - Installing - Packages for various platforms including instructions - Docker images - Cloud deployments
### Trying it out online - Neo4j Sandboxes https://neo4j.com/sandbox-v2/ - Small Cloud Hosting for free https://www.graphenedb.com/pricing.html
# CYPHER
### CYPHER - Query Language developed for ***Neo4j*** - Optimized to be human readable - Looks a bit like ascii art - ***openCYPHER*** project to open the Language to other databases
### CYPHER - Nodes, Relations and Connections - (node) - [:relation] - (node1)-[:related_to]->(node2)
### CYPHER - Adding data - ***CREATE*** * to create ***nodes*** and ***relations*** - ***MERGE*** * adds new ***nodes*** and ***relations*** if they not are already existing
### CYPHER - adding Joe and John ```CYPHER CREATE (joe:PERSON {firstname: "Joe", age: 42}) CREATE (john:PERSON {firstname: "John", age: 32}) CREATE (joe)-[:FRIEND_OF]->(john) CREATE (joe)-[:COLLEAGUE_OF]->(john) ```
### CYPHER - Query data - ***MATCH*** - ***WHERE*** (optional) - ***RETURN***
### CYPHER - querying Joe ```CYPHER MATCH (joe:PERSON) WHERE joe.firstname = "Joe" RETURN joe ```
### CYPHER - querying Joe's friends ```CYPHER MATCH (joe:PERSON) WHERE joe.firstname = "Joe" WITH joe MATCH (joe)-[:FRIEND_OF]->(fJoe:PERSON) RETURN fJoe, joe ```
### CYPHER - querying John's friends - by ignoring the direction of the relation ```CYPHER MATCH (john:PERSON) WHERE john.firstname = "John" WITH john MATCH (john)-[:FRIEND_OF]-(fJohn:PERSON) RETURN fJohn ```
### CYPHER - shorting last query ```CYPHER MATCH(john:PERSON {firstname: "John"})-[:FRIEND_OF]-() RETURN * ```
### Learning CYPHER ![Graph Databases book](graph_databases.png)
### Learning CYPHER - [Neo4j Website](https://Neo4j.com/docs/) - [CYPHER Refcard](https://Neo4j.com/docs/cypher-refcard/current/) - Learning Neo4j 3.x by Jérôme Baton (Pakt) - YouTube presentations
# PetClinic ![blue cat](Blue-Cat-300px.png)
### PetClinic - well known example for Spring - uses relational databases - We will port that model to Neo4j
### PetClinic - relational model ![PetClinic relational model](petclinic_relational.png)
### PetClinic - Listing Vets with Professions ```SQL SELECT v.FIRST_NAME, v.LAST_NAME, s.NAME from VETS v, SPECIALTIES s, VET_SPECIALTIES vs WHERE s.ID = vs.SPECIALTY_ID and v.ID = vs.VET_ID and s.NAME = 'surgery'; ```
### PetClinic - Vet Result ![Vet Results](result_sql_surgery.png)
### PetClinic - Insert Vets with CYPHER ```CYPHER CREATE(linda:Vet:Surgeon:Dentist {firstname: "Linda", lastname: "Douglas"}) CREATE(raf:Vet:Surgeon {firstname: "Rafael", lastname: "Ortega"}) CREATE(helen:Vet:Radiologist {firstname: "Helen", lastname: "Leary"}) CREATE(henry:Vet:Radiologist {firstname: "Henry", lastname: "Stevens"}) CREATE(sharon:Vet {firstname: "Sharon", lastname: "Jenkins"}) CREATE(james:Vet {firstname: "James", lastname: "Carter"}) ```
### PetClinic - List all Surgeons again ```CYPHER MATCH (n:Surgeon) RETURN n; ```
### Small Changes to the model - renamed Owners to Person - Created Cities as extra nodes instead of a property of Person - added MEDICATED_ON relation between Vets and Visits
### PetClinic - A marketing question - salesman calling - they invented a new dog food - they want to know in which area the most dogs live, so that they start their campaign there
### PetClinic - Query to get that answer ``` MATCH (c:City)-[*2]-(d:Dog) RETURN c, count(d) as count ORDER BY count DESC ```
# Neo4j and Spring Boot
### Basics - Neo4j OGM (Object Graph Mapper) - Spring Data on top of it - Spring Boot and the Spring Boot Starter for Neo4j
### The pom file ```
org.springframework.boot
spring-boot-starter-data-neo4j
org.springframework.data
spring-data-neo4j
org.neo4j
neo4j-ogm
```
### The configuration ``` @Configuration @EnableTransactionManagement @ComponentScan("org.springframework.samples.petclinic") @EnableNeo4jRepositories("org.springframework.samples.petclinic.repository") public class PersistenceContext { @Bean public SessionFactory getSessionFactory() { return new SessionFactory(configuration(), "org.springframework.samples.petclinic.model"); } @Bean public Neo4jTransactionManager transactionManager() throws Exception { return new Neo4jTransactionManager(getSessionFactory()); } @Bean public org.neo4j.ogm.config.Configuration configuration() { ConfigurationSource properties = new ClasspathConfigurationSource("db.properties"); return new org.neo4j.ogm.config.Configuration.Builder(properties).build(); } } ```
### Entity types - Node Entities - Relationship Entities (only needed for rich relationships) - PetClinic example only uses Node Entities
### BaseEntity ``` public class BaseEntity { @Id @GeneratedValue protected Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } } ```
### Vet Entity ``` @NodeEntity public class Vet extends BaseEntity{ @Labels private List
labels = new ArrayList<>(); @Property(name = "firstname") private String firstName; @Property(name = "lastname") private String lastName; ... public String getSpecialties() { return StringUtils.join(labels, ", "); } ```
### Person Entity ``` @NodeEntity public class Person extends BaseEntity{ @Property(name = "firstname") String firstName; @Property(name = "lastname") String lastName; String address; String telephone; @Relationship(type="OWNS") Set
pets = new HashSet<>(); @Relationship(type="LIVES_IN") City city; ```
### Pet Entity ``` @NodeEntity public class Pet extends BaseEntity { @JsonIgnore @Labels List
labels = new ArrayList<>(); String name; @Property(name = "birthdate") LocalDate birthDate; @JsonIgnore @Relationship(type="OWNS", direction = Relationship.INCOMING) private Person owner; @Relationship(type = "WAS_ON") private Set
visits = new HashSet<>(); ```
### Example Relationship Entity ``` @RelationshipEntity(type="PLAYED_IN") public class Role { @Id @GeneratedValue private Long relationshipId; @Property private String title; @StartNode private Actor actor; @EndNode private Movie movie; } ```
### City Repository ``` public interface CityRepository extends Neo4jRepository
{ City findByName(String name); } ```
### Pet Repository ``` public interface PetRepository extends Neo4jRepository
{ /** * Retrieve all Pet types from the data store. * @return a Collection of pet types. */ @Query("MATCH (n:Pet) return distinct labels(n)") List
> getPetTypes(); Pet findById(long id); Pet save(Pet pet); } ```
### ClinicService ``` public Collection
getPetTypes() throws DataAccessException { HashMap
petTypes = new HashMap(); for (Collection
c : petRepository.getPetTypes()) { for (String entry : c) { if("BaseEntity".equals(entry) || "Pet".equals(entry)) { continue; } petTypes.put(entry, new PetType(entry)); } } return petTypes.values(); } ```
# Demo
### There is more (APOC) - A Package Of Components - Awesome Procedures On Cypher - Can be called from CYPHER queries - e.g. PageRank, Dijkstra, etc.
### There is more (GraphQL) - Query language for the API - database agnostic - used by Facebook, GitHub, Pinterest and others - can be combined with REST - http://graphql.org/
### How to convince your managers? ![manager](maninoffice-dictate-300px-2.png)
### How to convince your managers? - import data from csv or existing data source into Neo4j - try to adopt the model to your questions - integrate it into a spring boot application if that is your platform of choice - commercial support is available - you do not lose anything, but you can gain new insights
### Links - https://github.com/daja77/spring-petclinic-angularjs - https://github.com/daja77/neo4j-talk-2018 - https://neo4j.com/developer/graph-db-vs-rdbms/
# Thank you!


Zero or more environment variables that are set within the docker container. This is a multi-line text field. Each line must be of the form key=value and specify one variable name and its value.
Note that quotes are not interpreted.
e.g. will result in the quotes being part of foo's value.
Note also that whitespace is easily broken.
Editing this field this without first expanding the box to its multi-line form
will cause any whitespace within a line to be turned into end of line codes,
breaking up the line and thus changing its meaning.
e.g. The single setting:
can be (accidentally) turned into three separate settings:
thus preventing the configuration from working as was intended.


here is a tip to attation user what kind of txt should type in.
あいうえお
かきくけこ
さしすせそ
sa
たちつてと
なにぬねの
はひふへほ
まみむめも
や う よ
らりるれろ
かみさま


Feed Validator Web Service API
The W3C Feed Validator exposes its Web service as a SOAP 1.2 interface, which you can use in your own applications.
Table of Contents
Terms of Use
- When processing batch of documents, You MUST wait at least 1 second between each request.
- Authentification for W3C Markup Validation service is NOT REQUIRED.
Validation Request Format
Below is a table of the parameter you can use to send a query to the W3C Feed Validator.
If you want to use W3c's public validation server, use the parameters below
in conjunction with the following base URI:
http://validator.w3.org/feed/check.cgi .
Note
- replace with the address of your own server if you want to call a private instance of the validator
- The Web Service can not be used on the feedvalidator.org service
Note: If you wish to call the validator programmatically for a batch of documents,
please make sure that your script will sleep
for at least 1 second
between requests. The Feed Validation service is a free, public service for all, your respect
is appreciated. thanks.
| Parameter | Description | Default value |
|---|---|---|
| url | The URL of the document to validate | None, but either this parameter, or uploaded_file ,
or fragment must be given. |
| rawdata | The source of the document to validate. Full documents only. At the moment, will only work if data is sent with the UTF-8 encoding. | None, but either this parameter, or uri
must be given. You should also set parameter manual to 1 to use direct input validation.
|
| output | triggers the various outputs formats of the validator. If unset, the usual
Web format will be sent. If set to soap12 , the SOAP1.2 interface will
be triggered. See below for the SOAP 1.2 response format description. |
unset |
SOAP format description
When called with parameter output=soap12
, the validator will switch
to its SOAP 1.2 interface (experimental for now). Below is a sample response, as well as
a description of the most important elements of the response.
sample SOAP 1.2 validation response
IMPORTANT: this output is still new, and may be changed in the future. Should this happen, this documentation will be updated and the changes listed below.
A SOAP response for the validation of a document (invalid) will look like this:
<?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> <env:Body> <m:feedvalidationresponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding" xmlns:m="http://www.w3.org/2005/10/feed-validator"> <m:uri>http://www.w3.org/QA/news.rss</m:uri> <m:checkedby>http://qa-dev.w3.org/feed/check.cgi</m:checkedby> <m:date>2005-11-11T11:48:24.491627</m:date> <m:validity>false</m:validity> <m:errors> <m:errorcount>2</m:errorcount> <m:errorlist> <error> <level>error</level> <type>MissingDescription</type> <line>23</line> <column>0</column> <text>Missing channel element: description</text> <msgcount>1</msgcount> <backupcolumn>0</backupcolumn> <backupline>23</backupline> <element>description</element> <parent>channel</parent> </error> </m:errorlist> </m:errors> <m:warnings> <m:warningcount>0</m:warningcount> <m:warninglist></m:warninglist> </m:warnings> <m:informations> <m:infocount>0</m:infocount> <m:infolist></m:infolist> </m:informations> </m:feedvalidationresponse> </env:Body> </env:Envelope>
SOAP1.2 response format reference
| element | description |
|---|---|
| markupvalidationresponse | The main element of the validation response. Encloses all other information about the validation results. |
| uri | the address of the document validated. Will (likely?) be upload://Form Submission if an uploaded document or fragment was validated. In EARL terms, this is the TestSubject. |
| checkedby | Location of the service which provided the validation result. In EARL terms, this is the Assertor. |
| doctype | Detected (or forced) Document Type for the validated document |
| charset | Detected (or forced) Character Encoding for the validated document |
| validity | Whether or not the document validated passed or not formal validation |
| errors | Encapsulates all data about errors encountered through the validation process |
| errorcount | a child of errors, counts the number of errors listed |
| errorlist | a child of errors, contains the list of errors (surprise!) |
| error | a child of errorlist, contains the information on a single validation error. |
Note: warnings
, warningcount
,
warninglist
and warning
,
as well as
informations
, infocount
,
infolist
and info
are similar to, respectively,
errors
,
errorcount
,
errorlist
and
error
.
SOAP1.2 atomic message (error or warning) format reference
As seen as the example above, the children of the error
element, but also the warning
element are line
, col
and
message
, defined below:
| element | description |
|---|---|
| line | Within the source code of the validated document, refers to the line where the error was detected. |
| col | Within the source code of the validated document, refers to the line where the column was detected. |
| text | The actual error/warning/info message |
| msgcount | How many times this message was encountered |
| element | element in the feed where the message was triggered |
| parent | In the feed, parent of the element |
| value | if applicable the value of the element, attribute or content which triggered the message |
Code Libraries
Another way to access this Web Service is through code libraries. At this moment, there are already two libraries created to access this service:
- in perl: WebService::Validator::Feed::W3C,
- in ruby: FeedValidator for Ruby and Rails
If you have built a library for another language, send a message to the www-validator public mailing-list, and we will add it to the list here.


This page is intended a an easy to use template to set up a webpage ga-tracking. We will start off very simple and move to a bit more advanced methods after a while.


All,
We recently conducted an internal email phishing campaign in preparation for the inevitable rise in cyber attacks during the holiday season. Attached is an encrypted spreadsheet containing the results of the assessment. Please download the files and view the results. Do not share this document outside the organization.
Successful phishing messages often look like what you would expect to get from institutions you trust. Messages used in phishing scams often are identical from those used by the banks, schools, and merchants you deal with. However, you should never trust email or pop up messages that ask you to confirm, validate, or update your information by responding to the email or by following a link. The {{ client.company_name }} community is not immune to Phishing attempts. {{ client.company_name }} will never send a message to you asking you to validate, confirm, or update your personal information and passwords.


Paganel is a open source, no pricing and ad-free solution to inject full-text search functionality to your blog, personal site, wiki page etc. Paganel can be used as service (just install search box on your site) or can be easily setup on your server for private ussage.
We are very gratefull to all people who share own thoughts, knoweledge, expirience and even very subjective opinion over blogs, personal sites, online magazines, wikies etc. You are amazing! You do the internet!
Our mission here is providing lightweight and useful custom serach functionality. Free from ads, free from branding and free from pricing...
Call to Action »Enable custom search for your site in few simple steps...
Open source lightweight engine designed to be easy bla bla bla
Not supported yet. bla bla blabla bla blabla bla blabla bla bla