--- layout: toolkit title: Basics of CC ---
Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit.
What is Creative Commons and what are the CC licenses? Get basic info to share the importance of CC with others.
What is Creative Commons and what are the CC licenses? Get basic info to share the importance of CC with others.
What is Creative Commons and what are the CC licenses? Get basic info to share the importance of CC with others.
Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit.
What is Creative Commons and what are the CC licenses? Get basic info to share the importance of CC with others.
What is Creative Commons and what are the CC licenses? Get basic info to share the importance of CC with others.
What is Creative Commons and what are the CC licenses? Get basic info to share the importance of CC with others.


-
Disposable Cars
-
-
app.js: Load the data asynchronously and the loading animation
-
calculate.js: Query the data in one iteration
-
graph.js: Plot the cars and animate them, the timeline and event hooks, updating the timestamps
-
lib.js: Type modifications and utilities
-
scripts.js: Generate the map object, the
onload
function


Hi, I'm Huesitos
Thank you for visiting my personal website! Content is still not quite ready, but... For now, please enjoy this video about cute and funny cats! (^w^)
Thank you for visiting my personal website! Content is still not quite ready, but... For now, please enjoy this video about cute and funny cats! (^w^)


Create a location object - particularly useful for server-side rendering
locationDefaults
)
:
A location as defined by rackt/history with sane defaults
location
:
a complete location object as defined by rackt/history
ServerHistory
// server-side
import express from 'express'
import {run} from '@cycle/core'
import {
makeHistoryDriver,
createServerHistory,
createLocation
} from '@cycle/history'
import {makeHTMLDriver} from '@cycle/dom'
const app = express()
app.use((res, req) => {
...
const history = createServerHistory()
const {sources} = run(main, {
history: makeHistoryDriver(history),
html: makeHTMLDriver(),
})
history.push(createLocation(req.url))
sources.html.subscribe(html => res.end(html))
...
})
app.listen(3000)
The history driver used by run()
The output returned from your main()
function. This can be a URL string, any valid Location object, or an object
with a type key to execute a particular history function like goBack(),
goForward(). When using type: 'go' a value
key is expected to have an
integer with how many locations to go back or forward.
Observable
.<
location
>
:
An Observable containing the current location you have navigated to.
return { history: Observable.just({type: 'go', value: -2}) }
return { history: Observable.just('/some/path')} }
return { history: Observable.just({pathname: '/some/path', state: {some: 'state'}}) }
Default parameters for createLocation; Same structure used by rackt/history
Instantiates an new history driver function using a valid history object.
a valid history instance as defined by
ractk/history. Should have createLocation()
, createHref()
, listen()
,
and push()
methods.
options object - currently accepts a boolean
for
the parameter capture
. capture
will automatically capture link clicks.
historyDriver
:
The history driver function
import {run} from '@cycle/core'
import {makeHistoryDriver} from '@cycle/history'
import {useQueries, createHashHistory} form 'history'
function main(sources) {...}
const history = createHashHistory()
run(main, {
history: makeHistoryDriver(history),
})
a way to listen for location changes (used internally)
a way to push new locations to listeners. Can be used to push url changes on the server-side.
a way to replace the current location - effectively the same as push() in this instance. (used internally)
creates an HREF (used internally)
Function that returns whether or not the current environment supports the HistoryAPI
Boolean
:
Returns true if the current environment supports the History API; false if it does not.
import {run} from '@cycle/core'
import {makeHistoryDriver, supportsHistory} from '@cycle/history'
import {createHashHistory, createHistory} from 'history'
function main(sources) {...}
const history = supportsHistory() ?
createHistory() : createHashHistory()
run(main, {
history: makeHistoryDriver(history)
})


TeamsUserActivityUserDetail extends Entity
TeamsUserActivityUserDetail class
Tags
Table of Contents
- $_propDict : array<string|int, mixed>
- The array of properties available to the model
- __construct() : mixed
- Construct a new Entity
- getAdHocMeetingsAttendedCount() : int|null
- Gets the adHocMeetingsAttendedCount The number of ad hoc meetings a user participated in.
- getAdHocMeetingsOrganizedCount() : int|null
- Gets the adHocMeetingsOrganizedCount The number of ad hoc meetings a user organized.
- getAssignedProducts() : string|null
- Gets the assignedProducts Products the user assigned with.
- getAudioDuration() : Duration|null
- Gets the audioDuration Audio duration the user participated in.
- getCallCount() : int|null
- Gets the callCount The number of 1:1 calls that the user participated in.
- getDeletedDate() : DateTime|null
- Gets the deletedDate The date when the delete operation happened. Default value is 'null' when the user has not been deleted.
- getHasOtherAction() : bool|null
- Gets the hasOtherAction The User is active but has performed other activities than exposed action types offered in the report (sending or replying to channel messages and chat messages, scheduling or participating in 1:1 calls and meetings). Examples actions are when a user changes the Teams status or the Teams status message or opens a Channel Message post but does not reply.
- getId() : string|null
- Gets the id Read-only.
- getIsDeleted() : bool|null
- Gets the isDeleted Whether this user has been deleted or soft deleted.
- getIsLicensed() : bool|null
- Gets the isLicensed Whether the user has been assigned a Teams license.
- getLastActivityDate() : DateTime|null
- Gets the lastActivityDate The last date that the user participated in a Microsoft Teams activity.
- getMeetingCount() : int|null
- Gets the meetingCount The number of online meetings that the user participated in.
- getMeetingsAttendedCount() : int|null
- Gets the meetingsAttendedCount The sum of the one-time scheduled, recurring, ad hoc and unclassified meetings a user participated in.
- getMeetingsOrganizedCount() : int|null
- Gets the meetingsOrganizedCount The sum of one-time scheduled, Recurring, ad hoc and unclassified meetings a user organized.
- getODataType() : string|null
- Gets the ODataType
- getPrivateChatMessageCount() : int|null
- Gets the privateChatMessageCount The number of unique messages that the user posted in a private chat.
- getProperties() : array<string|int, mixed>
- Gets the property dictionary of the Entity
- getReportPeriod() : string|null
- Gets the reportPeriod The number of days the report covers.
- getReportRefreshDate() : DateTime|null
- Gets the reportRefreshDate The latest date of the content.
- getScheduledOneTimeMeetingsAttendedCount() : int|null
- Gets the scheduledOneTimeMeetingsAttendedCount The number of the one-time scheduled meetings a user participated in.
- getScheduledOneTimeMeetingsOrganizedCount() : int|null
- Gets the scheduledOneTimeMeetingsOrganizedCount The number of one-time scheduled meetings a user organized.
- getScheduledRecurringMeetingsAttendedCount() : int|null
- Gets the scheduledRecurringMeetingsAttendedCount The number of the recurring meetings a user participated in.
- getScheduledRecurringMeetingsOrganizedCount() : int|null
- Gets the scheduledRecurringMeetingsOrganizedCount The number of recurring meetings a user organized.
- getScreenShareDuration() : Duration|null
- Gets the screenShareDuration Screen sharing duration the user participated in.
- getTeamChatMessageCount() : int|null
- Gets the teamChatMessageCount The number of unique messages that the user posted in a team chat.
- getUserPrincipalName() : string|null
- Gets the userPrincipalName The user principal name (UPN) of the user. The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant’s collection of verified domains. This property is required when a user is created.
- getVideoDuration() : Duration|null
- Gets the videoDuration Video duration the user participated in.
- jsonSerialize() : array<string|int, mixed>
- Serializes the object by property array Manually serialize DateTime into RFC3339 format
- setAdHocMeetingsAttendedCount() : TeamsUserActivityUserDetail
- Sets the adHocMeetingsAttendedCount The number of ad hoc meetings a user participated in.
- setAdHocMeetingsOrganizedCount() : TeamsUserActivityUserDetail
- Sets the adHocMeetingsOrganizedCount The number of ad hoc meetings a user organized.
- setAssignedProducts() : TeamsUserActivityUserDetail
- Sets the assignedProducts Products the user assigned with.
- setAudioDuration() : TeamsUserActivityUserDetail
- Sets the audioDuration Audio duration the user participated in.
- setCallCount() : TeamsUserActivityUserDetail
- Sets the callCount The number of 1:1 calls that the user participated in.
- setDeletedDate() : TeamsUserActivityUserDetail
- Sets the deletedDate The date when the delete operation happened. Default value is 'null' when the user has not been deleted.
- setHasOtherAction() : TeamsUserActivityUserDetail
- Sets the hasOtherAction The User is active but has performed other activities than exposed action types offered in the report (sending or replying to channel messages and chat messages, scheduling or participating in 1:1 calls and meetings). Examples actions are when a user changes the Teams status or the Teams status message or opens a Channel Message post but does not reply.
- setId() : Entity
- Sets the id Read-only.
- setIsDeleted() : TeamsUserActivityUserDetail
- Sets the isDeleted Whether this user has been deleted or soft deleted.
- setIsLicensed() : TeamsUserActivityUserDetail
- Sets the isLicensed Whether the user has been assigned a Teams license.
- setLastActivityDate() : TeamsUserActivityUserDetail
- Sets the lastActivityDate The last date that the user participated in a Microsoft Teams activity.
- setMeetingCount() : TeamsUserActivityUserDetail
- Sets the meetingCount The number of online meetings that the user participated in.
- setMeetingsAttendedCount() : TeamsUserActivityUserDetail
- Sets the meetingsAttendedCount The sum of the one-time scheduled, recurring, ad hoc and unclassified meetings a user participated in.
- setMeetingsOrganizedCount() : TeamsUserActivityUserDetail
- Sets the meetingsOrganizedCount The sum of one-time scheduled, Recurring, ad hoc and unclassified meetings a user organized.
- setODataType() : Entity
- Sets the ODataType
- setPrivateChatMessageCount() : TeamsUserActivityUserDetail
- Sets the privateChatMessageCount The number of unique messages that the user posted in a private chat.
- setReportPeriod() : TeamsUserActivityUserDetail
- Sets the reportPeriod The number of days the report covers.
- setReportRefreshDate() : TeamsUserActivityUserDetail
- Sets the reportRefreshDate The latest date of the content.
- setScheduledOneTimeMeetingsAttendedCount() : TeamsUserActivityUserDetail
- Sets the scheduledOneTimeMeetingsAttendedCount The number of the one-time scheduled meetings a user participated in.
- setScheduledOneTimeMeetingsOrganizedCount() : TeamsUserActivityUserDetail
- Sets the scheduledOneTimeMeetingsOrganizedCount The number of one-time scheduled meetings a user organized.
- setScheduledRecurringMeetingsAttendedCount() : TeamsUserActivityUserDetail
- Sets the scheduledRecurringMeetingsAttendedCount The number of the recurring meetings a user participated in.
- setScheduledRecurringMeetingsOrganizedCount() : TeamsUserActivityUserDetail
- Sets the scheduledRecurringMeetingsOrganizedCount The number of recurring meetings a user organized.
- setScreenShareDuration() : TeamsUserActivityUserDetail
- Sets the screenShareDuration Screen sharing duration the user participated in.
- setTeamChatMessageCount() : TeamsUserActivityUserDetail
- Sets the teamChatMessageCount The number of unique messages that the user posted in a team chat.
- setUserPrincipalName() : TeamsUserActivityUserDetail
- Sets the userPrincipalName The user principal name (UPN) of the user. The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant’s collection of verified domains. This property is required when a user is created.
- setVideoDuration() : TeamsUserActivityUserDetail
- Sets the videoDuration Video duration the user participated in.
Properties
$_propDict
The array of properties available to the model
protected
array<string|int, mixed>
$_propDict
Methods
__construct()
Construct a new Entity
public
__construct([array<string|int, mixed> $propDict = array() ]) : mixed
Parameters
- $propDict : array<string|int, mixed> = array()
-
A list of properties to set
Return values
mixed —getAdHocMeetingsAttendedCount()
Gets the adHocMeetingsAttendedCount The number of ad hoc meetings a user participated in.
public
getAdHocMeetingsAttendedCount() : int|null
Return values
int|null —The adHocMeetingsAttendedCount
getAdHocMeetingsOrganizedCount()
Gets the adHocMeetingsOrganizedCount The number of ad hoc meetings a user organized.
public
getAdHocMeetingsOrganizedCount() : int|null
Return values
int|null —The adHocMeetingsOrganizedCount
getAssignedProducts()
Gets the assignedProducts Products the user assigned with.
public
getAssignedProducts() : string|null
Return values
string|null —The assignedProducts
getAudioDuration()
Gets the audioDuration Audio duration the user participated in.
public
getAudioDuration() : Duration|null
Return values
Duration|null —The audioDuration
getCallCount()
Gets the callCount The number of 1:1 calls that the user participated in.
public
getCallCount() : int|null
Return values
int|null —The callCount
getDeletedDate()
Gets the deletedDate The date when the delete operation happened. Default value is 'null' when the user has not been deleted.
public
getDeletedDate() : DateTime|null
Return values
DateTime|null —The deletedDate
getHasOtherAction()
Gets the hasOtherAction The User is active but has performed other activities than exposed action types offered in the report (sending or replying to channel messages and chat messages, scheduling or participating in 1:1 calls and meetings). Examples actions are when a user changes the Teams status or the Teams status message or opens a Channel Message post but does not reply.
public
getHasOtherAction() : bool|null
Return values
bool|null —The hasOtherAction
getId()
Gets the id Read-only.
public
getId() : string|null
Return values
string|null —The id
getIsDeleted()
Gets the isDeleted Whether this user has been deleted or soft deleted.
public
getIsDeleted() : bool|null
Return values
bool|null —The isDeleted
getIsLicensed()
Gets the isLicensed Whether the user has been assigned a Teams license.
public
getIsLicensed() : bool|null
Return values
bool|null —The isLicensed
getLastActivityDate()
Gets the lastActivityDate The last date that the user participated in a Microsoft Teams activity.
public
getLastActivityDate() : DateTime|null
Return values
DateTime|null —The lastActivityDate
getMeetingCount()
Gets the meetingCount The number of online meetings that the user participated in.
public
getMeetingCount() : int|null
Return values
int|null —The meetingCount
getMeetingsAttendedCount()
Gets the meetingsAttendedCount The sum of the one-time scheduled, recurring, ad hoc and unclassified meetings a user participated in.
public
getMeetingsAttendedCount() : int|null
Return values
int|null —The meetingsAttendedCount
getMeetingsOrganizedCount()
Gets the meetingsOrganizedCount The sum of one-time scheduled, Recurring, ad hoc and unclassified meetings a user organized.
public
getMeetingsOrganizedCount() : int|null
Return values
int|null —The meetingsOrganizedCount
getODataType()
Gets the ODataType
public
getODataType() : string|null
Return values
string|null —The ODataType
getPrivateChatMessageCount()
Gets the privateChatMessageCount The number of unique messages that the user posted in a private chat.
public
getPrivateChatMessageCount() : int|null
Return values
int|null —The privateChatMessageCount
getProperties()
Gets the property dictionary of the Entity
public
getProperties() : array<string|int, mixed>
Return values
array<string|int, mixed> —The list of properties
getReportPeriod()
Gets the reportPeriod The number of days the report covers.
public
getReportPeriod() : string|null
Return values
string|null —The reportPeriod
getReportRefreshDate()
Gets the reportRefreshDate The latest date of the content.
public
getReportRefreshDate() : DateTime|null
Return values
DateTime|null —The reportRefreshDate
getScheduledOneTimeMeetingsAttendedCount()
Gets the scheduledOneTimeMeetingsAttendedCount The number of the one-time scheduled meetings a user participated in.
public
getScheduledOneTimeMeetingsAttendedCount() : int|null
Return values
int|null —The scheduledOneTimeMeetingsAttendedCount
getScheduledOneTimeMeetingsOrganizedCount()
Gets the scheduledOneTimeMeetingsOrganizedCount The number of one-time scheduled meetings a user organized.
public
getScheduledOneTimeMeetingsOrganizedCount() : int|null
Return values
int|null —The scheduledOneTimeMeetingsOrganizedCount
getScheduledRecurringMeetingsAttendedCount()
Gets the scheduledRecurringMeetingsAttendedCount The number of the recurring meetings a user participated in.
public
getScheduledRecurringMeetingsAttendedCount() : int|null
Return values
int|null —The scheduledRecurringMeetingsAttendedCount
getScheduledRecurringMeetingsOrganizedCount()
Gets the scheduledRecurringMeetingsOrganizedCount The number of recurring meetings a user organized.
public
getScheduledRecurringMeetingsOrganizedCount() : int|null
Return values
int|null —The scheduledRecurringMeetingsOrganizedCount
getScreenShareDuration()
Gets the screenShareDuration Screen sharing duration the user participated in.
public
getScreenShareDuration() : Duration|null
Return values
Duration|null —The screenShareDuration
getTeamChatMessageCount()
Gets the teamChatMessageCount The number of unique messages that the user posted in a team chat.
public
getTeamChatMessageCount() : int|null
Return values
int|null —The teamChatMessageCount
getUserPrincipalName()
Gets the userPrincipalName The user principal name (UPN) of the user. The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant’s collection of verified domains. This property is required when a user is created.
public
getUserPrincipalName() : string|null
Return values
string|null —The userPrincipalName
getVideoDuration()
Gets the videoDuration Video duration the user participated in.
public
getVideoDuration() : Duration|null
Return values
Duration|null —The videoDuration
jsonSerialize()
Serializes the object by property array Manually serialize DateTime into RFC3339 format
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed> —The list of properties
setAdHocMeetingsAttendedCount()
Sets the adHocMeetingsAttendedCount The number of ad hoc meetings a user participated in.
public
setAdHocMeetingsAttendedCount(int $val) : TeamsUserActivityUserDetail
Parameters
- $val : int
-
The adHocMeetingsAttendedCount
Return values
TeamsUserActivityUserDetail —setAdHocMeetingsOrganizedCount()
Sets the adHocMeetingsOrganizedCount The number of ad hoc meetings a user organized.
public
setAdHocMeetingsOrganizedCount(int $val) : TeamsUserActivityUserDetail
Parameters
- $val : int
-
The adHocMeetingsOrganizedCount
Return values
TeamsUserActivityUserDetail —setAssignedProducts()
Sets the assignedProducts Products the user assigned with.
public
setAssignedProducts(string $val) : TeamsUserActivityUserDetail
Parameters
- $val : string
-
The assignedProducts
Return values
TeamsUserActivityUserDetail —setAudioDuration()
Sets the audioDuration Audio duration the user participated in.
public
setAudioDuration(Duration $val) : TeamsUserActivityUserDetail
Parameters
- $val : Duration
-
The audioDuration
Return values
TeamsUserActivityUserDetail —setCallCount()
Sets the callCount The number of 1:1 calls that the user participated in.
public
setCallCount(int $val) : TeamsUserActivityUserDetail
Parameters
- $val : int
-
The callCount
Return values
TeamsUserActivityUserDetail —setDeletedDate()
Sets the deletedDate The date when the delete operation happened. Default value is 'null' when the user has not been deleted.
public
setDeletedDate(DateTime $val) : TeamsUserActivityUserDetail
Parameters
- $val : DateTime
-
The deletedDate
Return values
TeamsUserActivityUserDetail —setHasOtherAction()
Sets the hasOtherAction The User is active but has performed other activities than exposed action types offered in the report (sending or replying to channel messages and chat messages, scheduling or participating in 1:1 calls and meetings). Examples actions are when a user changes the Teams status or the Teams status message or opens a Channel Message post but does not reply.
public
setHasOtherAction(bool $val) : TeamsUserActivityUserDetail
Parameters
- $val : bool
-
The hasOtherAction
Return values
TeamsUserActivityUserDetail —setId()
Sets the id Read-only.
public
setId(string $val) : Entity
Parameters
- $val : string
-
The id
Return values
Entity —setIsDeleted()
Sets the isDeleted Whether this user has been deleted or soft deleted.
public
setIsDeleted(bool $val) : TeamsUserActivityUserDetail
Parameters
- $val : bool
-
The isDeleted
Return values
TeamsUserActivityUserDetail —setIsLicensed()
Sets the isLicensed Whether the user has been assigned a Teams license.
public
setIsLicensed(bool $val) : TeamsUserActivityUserDetail
Parameters
- $val : bool
-
The isLicensed
Return values
TeamsUserActivityUserDetail —setLastActivityDate()
Sets the lastActivityDate The last date that the user participated in a Microsoft Teams activity.
public
setLastActivityDate(DateTime $val) : TeamsUserActivityUserDetail
Parameters
- $val : DateTime
-
The lastActivityDate
Return values
TeamsUserActivityUserDetail —setMeetingCount()
Sets the meetingCount The number of online meetings that the user participated in.
public
setMeetingCount(int $val) : TeamsUserActivityUserDetail
Parameters
- $val : int
-
The meetingCount
Return values
TeamsUserActivityUserDetail —setMeetingsAttendedCount()
Sets the meetingsAttendedCount The sum of the one-time scheduled, recurring, ad hoc and unclassified meetings a user participated in.
public
setMeetingsAttendedCount(int $val) : TeamsUserActivityUserDetail
Parameters
- $val : int
-
The meetingsAttendedCount
Return values
TeamsUserActivityUserDetail —setMeetingsOrganizedCount()
Sets the meetingsOrganizedCount The sum of one-time scheduled, Recurring, ad hoc and unclassified meetings a user organized.
public
setMeetingsOrganizedCount(int $val) : TeamsUserActivityUserDetail
Parameters
- $val : int
-
The meetingsOrganizedCount
Return values
TeamsUserActivityUserDetail —setODataType()
Sets the ODataType
public
setODataType(string $val) : Entity
Parameters
- $val : string
-
The ODataType
Return values
Entity —setPrivateChatMessageCount()
Sets the privateChatMessageCount The number of unique messages that the user posted in a private chat.
public
setPrivateChatMessageCount(int $val) : TeamsUserActivityUserDetail
Parameters
- $val : int
-
The privateChatMessageCount
Return values
TeamsUserActivityUserDetail —setReportPeriod()
Sets the reportPeriod The number of days the report covers.
public
setReportPeriod(string $val) : TeamsUserActivityUserDetail
Parameters
- $val : string
-
The reportPeriod
Return values
TeamsUserActivityUserDetail —setReportRefreshDate()
Sets the reportRefreshDate The latest date of the content.
public
setReportRefreshDate(DateTime $val) : TeamsUserActivityUserDetail
Parameters
- $val : DateTime
-
The reportRefreshDate
Return values
TeamsUserActivityUserDetail —setScheduledOneTimeMeetingsAttendedCount()
Sets the scheduledOneTimeMeetingsAttendedCount The number of the one-time scheduled meetings a user participated in.
public
setScheduledOneTimeMeetingsAttendedCount(int $val) : TeamsUserActivityUserDetail
Parameters
- $val : int
-
The scheduledOneTimeMeetingsAttendedCount
Return values
TeamsUserActivityUserDetail —setScheduledOneTimeMeetingsOrganizedCount()
Sets the scheduledOneTimeMeetingsOrganizedCount The number of one-time scheduled meetings a user organized.
public
setScheduledOneTimeMeetingsOrganizedCount(int $val) : TeamsUserActivityUserDetail
Parameters
- $val : int
-
The scheduledOneTimeMeetingsOrganizedCount
Return values
TeamsUserActivityUserDetail —setScheduledRecurringMeetingsAttendedCount()
Sets the scheduledRecurringMeetingsAttendedCount The number of the recurring meetings a user participated in.
public
setScheduledRecurringMeetingsAttendedCount(int $val) : TeamsUserActivityUserDetail
Parameters
- $val : int
-
The scheduledRecurringMeetingsAttendedCount
Return values
TeamsUserActivityUserDetail —setScheduledRecurringMeetingsOrganizedCount()
Sets the scheduledRecurringMeetingsOrganizedCount The number of recurring meetings a user organized.
public
setScheduledRecurringMeetingsOrganizedCount(int $val) : TeamsUserActivityUserDetail
Parameters
- $val : int
-
The scheduledRecurringMeetingsOrganizedCount
Return values
TeamsUserActivityUserDetail —setScreenShareDuration()
Sets the screenShareDuration Screen sharing duration the user participated in.
public
setScreenShareDuration(Duration $val) : TeamsUserActivityUserDetail
Parameters
- $val : Duration
-
The screenShareDuration
Return values
TeamsUserActivityUserDetail —setTeamChatMessageCount()
Sets the teamChatMessageCount The number of unique messages that the user posted in a team chat.
public
setTeamChatMessageCount(int $val) : TeamsUserActivityUserDetail
Parameters
- $val : int
-
The teamChatMessageCount
Return values
TeamsUserActivityUserDetail —setUserPrincipalName()
Sets the userPrincipalName The user principal name (UPN) of the user. The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant’s collection of verified domains. This property is required when a user is created.
public
setUserPrincipalName(string $val) : TeamsUserActivityUserDetail
Parameters
- $val : string
-
The userPrincipalName
Return values
TeamsUserActivityUserDetail —setVideoDuration()
Sets the videoDuration Video duration the user participated in.
public
setVideoDuration(Duration $val) : TeamsUserActivityUserDetail
Parameters
- $val : Duration
-
The videoDuration


What's this about?
If you already know what the issue with serializing circular structures is, proceed to the next section
Games, and other kind of frontend JavaScript apps, often have complex structures of linked objects in memory that you'd eventually want to serialize for persistence, be it to save the game, or to keep complex user preferences, or whatnot.
Modern browsers have the JSON.stringify and JSON.parse methods, and they work great for simple objects, but the moment you want to use them for a complex object you'll get...
The reason for this is that once the stringify method detects an object has a reference to another object it has already stringified, it will panic since processing it risks ending up in an infinite process, given that that object might then indirectly reference the object that's currently being stringified!
CircularJS allows you to circumvent this issue by generating a table of references and flattening the objects so that they only keep a reference to that table, then you can safely serialize the base object and the table, and use that data to deserialize it back!
Real life scenario
Consider this simple scenario, you have a Game object you'd want to persist, and it has two attributes: One for the current Level of the game, and another one for the Player. At the same time, the Player Object contains a reference to his current level.
Let's recreate it quickly in JavaScript.
function Game(){
this.currentLevel = null;
this.player = null;
}
function Level(){}
function Player(){
this.currentLevel = null;
}
var game = new Game();
var level = new Level();
var player = new Player();
game.currentLevel = level;
game.player = player;
player.currentLevel = level;
So, let's say you want to serialize your game object so that you can later resume the game, this should be simple right? let's just do:
var serializedGame = JSON.stringify(game);
localStorage.setItem('game', serializedGame);
...and then, to restore, we could just do....
var serializedGame = localStorage.getItem('game');
var gameObject = JSON.parse(serializedGame);
But this won't work! JSON.stringify will complain the moment you try to serialize the game object, because it finds a circular reference to the Level object, the panick!
CircularJS to the rescue!
You can overcome this issue using circularJS! solution is as simple as:
var serializedGame = circular.serialize(game);
localStorage.setItem('game', serializedGame);
And then, when you have to load the game
var serializedGame = localStorage.getItem('game');
var gameObject = circular.parse(serializedGame);
For this to work however, you'll need to add a small bit to your classes initialization:
function Game(){
this._c = circular.register('Game');
this.currentLevel = null;
this.player = null;
}
function Level(){
this._c = circular.register('Level');
}
function Player(){
this._c = circular.register('Player');
this.currentLevel = null;
}
The register function adds required metadata to your JavaScript objects, basically assigning an uniqueId to each object, as well as keeping track of what class it's an instance of.
Using this metadata, circularJS is able to fully recreate the object, including the class (or rather function) it was an instance of!
Revivers and transient fields
The past section should cover most of the scenarios you'll need, but when it comes to real life, you might need to fine tune the process.
Consider now that there are some fields you'd rather NOT serialize, but you need them to be reset when restoring the object state. That's when revivers and transient fields come to play.
Continuing with our example, let's pretend that the Player object has a Sprite attribute, which is his graphical representation, the sprite depends on the Race of the player. We don't want to save it, since sprites are set up by our engine on initialization.
function Game(){
this._c = circular.register('Game');
this.currentLevel = null;
this.player = null;
}
function Level(){
this._c = circular.register('Level');
}
function Player(){
this._c = circular.register('Player');
this.currentLevel = null;
this.race = null;
this.sprite = null;
}
For this example we will also have at hand a SpriteCreator object, which is in charge of creating the sprites on runtime, it has a createSprite method which takes a spriteId, and can create sprites for the different races.
What we need to do here is register the Player class on circularJS, defining the transient methods and the reviver function:
circular.registerClass('Player', Player, {
transients: {
sprite: true
},
reviver: function(player, spriteCreator){
player.sprite = spriteCreator.createSprite(player.race);
}
}
This affects the behaviour of circular in two ways: it won't (try to) save the sprite when serializing the player object, and when deserializing it it will recreate the sprite object at runtime. To do this, you'll need to send the sprite creator object to the parse method:
var serializedGame = localStorage.getItem('game');
var gameObject = circular.parse(serializedGame, theSpriteCreator);
"Safe" objects
Finally, in order to save memory and processing time while parsing / serializing, you might want to declare a class to be "safe"; this means that circularJS will keep it off the reference management process and will just serialize it directly. You can use this for simple objects that do not reference other objects (just native values), or plain objects that are not meant to represent instances of classes. Be warned tho! if you add a reference to an object marked as safe, it may generate a circular structure and circularJS will fail!
To mark an object as safe, use the circular.setSafe method, i.e.
function Player(name, x, y){
var location = {
_c: circular.setSafe(),
x: x,
y: y
};
var name = name;
}
Circular will then understand the location object won't need to be checked for circular references, but it's YOUR responsability to keep objects from being assigned to it! :)


Preparation time
less than 30 mins
Cooking time
30 mins to 1 hour
Serves
Serves 4
Quail has great flavour, and is low in fat. Here it’s flattened and cooked on skewers over the barbecue, served with pearl barley.
Put the quail into a bowl, sprinkle with the oil and rosemary, cover with cling film and marinate in the fridge for 20 minutes.
Meanwhile, in a pan, melt the butter. Add the leek and cook gently until soft, without browning. Add the pearl barley and stir to cover with the butter. Add enough stock to cover the barley and bring to the boil.
Keep cooking and adding stock for 25-30 minutes, until the barley is soft and plump but with a little bite. Season to taste with salt and pepper.
Preheat a barbecue or heat a grill to high. Thread the quail onto metal skewers and season with salt and pepper. Cook it on the barbecue or under the grill for about five minutes on each side, or until cooked through.
Serve the quail skewers with the pearl barley and salad.


Experiences
Conducted operational and financial audits of manufacturing subsidiaries. Designed and implemented audit programs to test the efficiency of all aspects of accounting controls. Recommended changes and improvements to corporate and divisional management. (REFER)
Conducted operational and financial audits of manufacturing subsidiaries. Designed and implemented audit programs to test the efficiency of all aspects of accounting controls. Recommended changes and improvements to corporate and divisional management. (REFER)
Projects
Total Introduction
Name - Description
Name - Description


An example of paragraph text to the left of a small image. This image has a caption but no border.
An example of a longer paragraph of text to the right of a larger image. This image has a border as well as a caption.
You don't have to use float but this shows you that it works.
Finally, here is an example of an image that isn't floated left or right.


|
My Project
|
Bare bones capability for treating a file as a raw executable image. More...
Go to the source code of this file.
Classes | |
| class | RawBinaryArchitectureCapability |
| Extension point for building an Architecture that reads in raw images. More... | |
| class | RawBinaryArchitecture |
| Architecture that reads its binary as a raw file. More... | |
Bare bones capability for treating a file as a raw executable image.


My task for this week’s assignment is to create a goal on my User Science Journal that can be tracked in Google Analytics.
Goals in Google Analytics
There are two types of goals: business goals and Google Analytics Goals. Business goals are actions that the web developer wants a user to take on their website. Each time a user completes a business goal, that is called a “conversion.” This could be as simple as signing up for a newsletter or buying a product, but in Google Analytics, there is a feature called “Goals” to track these conversions. After the web developer configures Goals, Analytics will create conversion-related metrics such as total number of conversions, as well as percentage of users that converted. This is referred to as the “conversion rate.”
After a goal is set up in Google Analytics, the web developer can set up a “goal funnel.” This is a data visualization of the different steps needed to complete the goal. This visual helps developers identify where users are dropping out of the conversion process. This is particularly important for Ecommerce businesses such as Amazon or any retailer that has an online presence.
My Goals
My goal this week is to create both a destination goal and Event goal. I would like my users to visit my new Post from this week and hopefully write a compelling enough blog post that they will be curious to click the link to the article referenced above.
To help my users complete my goal, I provided a hyperlink to two articles I found on popsci.com that shows a few data analyses taken from individuals who used Google Maps during the week of Thanksgiving 2017 and Thanksgiving 2016. The trends that are highlighted in the article are broken down into three categories: Google Maps Search Trends, Popular Visit Times (destinations such as cinema, grocery store, shopping center, etc…), and Traffic Patterns.
To preview the data that highlights the habits of most people during the week of Thanksgiving, I recommend you click the link below and read for yourself! Notice if anything changed for your state or major city!
2017 Thanksgiving Google Maps Data 2016 Thanksgiving Google Maps DataSetting up Goals in Analytics and Funnels
I followed Luke Ware’s instructional video to set up the WordPress GA Event’s Plugin. I embedded the links to the two articles that I provided the user to read. I added in specific id to each element such as thanksgiving-2017 click to the article that has Thanksgiving 2017 trends and data then lastly thanksgiving-2016 click to the article that shows Thanksgiving 2016 data and trends. At this point, I went into the Google Analytics Scroll Events Plugin for WordPress and added each id above as a specific event for click tracking.
I attempted to create a funnel for each goal above by following the steps in the Google Analytics documentation How to set up Goals in Google Analytics and attempted to replicate the section that describes how to set up Goal Funnel.
- Select the Admin section in the left hand navigation bar.
- Under "Views," click "Goals"
- Select "New Goal"
- Fill out required information and select destination under type.
- Flip the funnel switch to "on" to add funnel steps.
- Each funnel step represents an action that needs to be taken to complete the goal.


Tenant Tree¶
A Tenant Tree is a flattened representation of the whole hierachy including Tenant, recursive Units and its Managers (User), Unit Tenant and its Managers and Agents which are essentially (Users).
Graphical Tenant Tree Representation¶
..tree:
+ Tenant
|
|---+ Unit (recursive)
| Unit manager(s)
|
|---+ Team
| Team manager(s)
| Agent(s)
Tenant Tree Item Model¶
Represent the Tenant Tree model as flattened hierarchy with read-only properties.
Note
Note that model is used as result of read-only method GET (GetTree).
| Name | Description | Type |
|---|---|---|
id |
Representing Tenan Tree Item identifier. | guid |
| Common properties | ||
treeItemId |
The id of Tenant, Unit, Team or User. | guid |
treeItemType |
The item type. Tenant, Unit, Team or User. | string |
name |
The name of Tenant, Unit, Team or User. | string |
isActive |
Denotes whether the Tenant Tree Item state is active or inactive. | boolean |
isDeleted |
Denotes whether the Tenant Tree Item state is deleted or not. | boolean |
| User specific | ||
recorderUserId |
The User identification of media files within the Recorder. | string |
recorderUserId |
The User identification of media files within the Recorder. | string |
haveRecorder |
Denotes whether the [Recorder](/v1/recorder) is assigned to User. | boolean |
| Manager / Agent specific | ||
managerOrAgentId |
Representing the true identifier of managership/membership not only the userId . |
guid |
| Tenant specific | ||
tenantId |
Sets to each Tenant Tree Item tenantId to denote which Tenant it belongs. |
guid |
Note
The Tenant Tree properties names (Name column) is for default usage by JSON
, for C# Wrapper
usage the Tenant Tree properties are capitalized (eg. Id
, Name
,..)!
Tenant Tree Item Types¶
Currently supported [Tenant Tree](/v1/tree) item types are:
- Tenant
- Unit
- Unit Manager
- Team
- Team Manager
- Agent
Tenant Tree Item¶
The root [Te:ref:tenant-label tree item with recursive items.
Default REST approach¶
GET /api/v1/:tenantCode/tree
Parameters¶
tenantCode
Tenant code, a validinteger
greater or equal to 1000.
Danger
Remember to add API Key as customer*key and API Secret as customer*secret into your Request HTTP Header. See more in Getting Started.
Return value¶
- If there is no error:
JSON
[Tenant Tree Item Model](/v1/tree#tenant-tree-item-model). - If there is an error:
JSON
Client Errors object.
C# Wrapper approach¶
1 | TreeWrapper(int tenantCode, string apiKey, string apiSecret).GetTree();
|
Parameters¶
Return value¶
- If there is no error:
ResaultContent<TenantTreeItem>.Result
object as [Tenant Tree Item Model](/v1/tree#tenant-tree-item-model). - If there is an error:
ResaultContent<TenantTreeItem>.Error
object. See more in Client Errors.
Example usage¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | int tenantCode = 1000;
string key = "ddZXdAZvWefFqxAEH62u";
string secret = "wx6GiQggg9YRH89XT5aKoY2qZLVquYjxARtgZhuGoFQX5w6Lws";
TreeWrapper treeWrapper = new TreeWrapper(tenantCode, key, secret);
ResponseContent<TenantTreeItem> response = treeWrapper.GetTree();
if (response.Result != null)
{
// Use Result as root Tenant Tree Item.
TenantTreeItem rootTenantItem = response.Result;
// Root Units can be invoked
ICollection<TenantTreeItem> rootUnits = rootTenantItem.Items;
// .... use recursion to get full hierarchy for displaying
}
else
{
// TODO: The error handling...
Console.WriteLine(response.Error);
}
|


public abstract class AbstractBulkByScrollRequest<Self extends AbstractBulkByScrollRequest<Self>> extends ActionRequest
TransportRequest.Empty
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
AUTO_SLICES |
static java.lang.String |
AUTO_SLICES_VALUE |
static int |
SIZE_ALL_MATCHES |
| 构造器和说明 |
|---|
AbstractBulkByScrollRequest()
Constructor for deserialization.
|
AbstractBulkByScrollRequest(SearchRequest searchRequest,
boolean setDefaults)
Constructor for actual use.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Task |
createTask(long id,
java.lang.String type,
java.lang.String action,
TaskId parentTaskId)
Returns the task object that should be used to keep track of the processing of the request.
|
protected Self |
doForSlice(Self request,
TaskId slicingTask,
int totalSlices)
Setup a clone of this request with the information needed to process a slice of it.
|
abstract Self |
forSlice(TaskId slicingTask,
SearchRequest slice,
int totalSlices)
Build a new request for a slice of the parent request.
|
java.lang.String |
getDescription()
Returns optional description of the request to be displayed by the task manager
|
int |
getMaxRetries()
Total number of retries attempted for rejections.
|
float |
getRequestsPerSecond()
The throttle for this request in sub-requests per second.
|
TimeValue |
getRetryBackoffInitialTime()
Initial delay after a rejection before retrying request.
|
SearchRequest |
getSearchRequest()
The search request that matches the documents to process.
|
boolean |
getShouldStoreResult()
Should this task store its result after it has finished?
|
int |
getSize()
Maximum number of processed documents.
|
int |
getSlices()
The number of slices this task should be divided into.
|
TimeValue |
getTimeout()
Timeout to wait for the shards on to be available for each bulk request?
|
ActiveShardCount |
getWaitForActiveShards()
The number of shard copies that must be active before proceeding with the write.
|
boolean |
isAbortOnVersionConflict()
Should version conflicts cause aborts?
|
boolean |
isRefresh()
Call refresh on the indexes we've written to after the request ends?
|
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
protected void |
searchToString(java.lang.StringBuilder b)
Append a short description of the search request to a StringBuilder.
|
protected abstract Self |
self()
`this` cast to Self.
|
Self |
setAbortOnVersionConflict(boolean abortOnVersionConflict)
Should version conflicts cause aborts?
|
void |
setConflicts(java.lang.String conflicts)
Sets abortOnVersionConflict based on REST-friendly names.
|
Self |
setMaxRetries(int maxRetries)
Set the total number of retries attempted for rejections.
|
Self |
setRefresh(boolean refresh)
Call refresh on the indexes we've written to after the request ends?
|
Self |
setRequestsPerSecond(float requestsPerSecond)
Set the throttle for this request in sub-requests per second.
|
Self |
setRetryBackoffInitialTime(TimeValue retryBackoffInitialTime)
Set the initial delay after a rejection before retrying request.
|
Self |
setShouldStoreResult(boolean shouldStoreResult)
Should this task store its result after it has finished?
|
Self |
setSize(int size)
Maximum number of processed documents.
|
Self |
setSlices(int slices)
The number of slices this task should be divided into.
|
Self |
setTimeout(TimeValue timeout)
Timeout to wait for the shards on to be available for each bulk request?
|
Self |
setWaitForActiveShards(ActiveShardCount activeShardCount)
Sets the number of shard copies that must be active before proceeding with the write.
|
Self |
setWaitForActiveShards(int waitForActiveShards)
A shortcut for
setWaitForActiveShards(ActiveShardCount) where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount. |
ActionRequestValidationException |
validate() |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
getParentTask, setParentTask
remoteAddress, remoteAddress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setParentTask
public static final int SIZE_ALL_MATCHES
public static final int AUTO_SLICES
public static final java.lang.String AUTO_SLICES_VALUE
public AbstractBulkByScrollRequest()
public AbstractBulkByScrollRequest(SearchRequest searchRequest, boolean setDefaults)
searchRequest
- the search request to execute to get the documents to processsetDefaults
- should this request set the defaults on the search request? Usually set to true but leave it false to support
request slicingprotected abstract Self self()
public ActionRequestValidationException validate()
validate
在类中 ActionRequest
public int getSize()
public Self setSize(int size)
public boolean isAbortOnVersionConflict()
public Self setAbortOnVersionConflict(boolean abortOnVersionConflict)
public void setConflicts(java.lang.String conflicts)
public SearchRequest getSearchRequest()
public boolean isRefresh()
public Self setRefresh(boolean refresh)
public TimeValue getTimeout()
public Self setTimeout(TimeValue timeout)
public ActiveShardCount getWaitForActiveShards()
public Self setWaitForActiveShards(ActiveShardCount activeShardCount)
ReplicationRequest.waitForActiveShards(ActiveShardCount)
for details.public Self setWaitForActiveShards(int waitForActiveShards)
setWaitForActiveShards(ActiveShardCount)
where the numerical
shard count is passed in, instead of having to first call ActiveShardCount.from(int)
to get the ActiveShardCount.public TimeValue getRetryBackoffInitialTime()
public Self setRetryBackoffInitialTime(TimeValue retryBackoffInitialTime)
public int getMaxRetries()
public Self setMaxRetries(int maxRetries)
public float getRequestsPerSecond()
Float.POSITIVE_INFINITY
means set no throttle and that is the
default. Throttling is done between batches, as we start the next scroll requests. That way we can increase the scroll's timeout to
make sure that it contains any time that we might wait.public Self setRequestsPerSecond(float requestsPerSecond)
Float.POSITIVE_INFINITY
means set no throttle and that is the
default. Throttling is done between batches, as we start the next scroll requests. That way we can increase the scroll's timeout to
make sure that it contains any time that we might wait.public Self setShouldStoreResult(boolean shouldStoreResult)
public boolean getShouldStoreResult()
ActionRequest
getShouldStoreResult
在类中 ActionRequest
public Self setSlices(int slices)
public int getSlices()
public abstract Self forSlice(TaskId slicingTask, SearchRequest slice, int totalSlices)
protected Self doForSlice(Self request, TaskId slicingTask, int totalSlices)
public Task createTask(long id, java.lang.String type, java.lang.String action, TaskId parentTaskId)
TaskAwareRequest
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
在接口中 Streamable
readFrom
在类中 ActionRequest
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
在接口中 Streamable
writeTo
在类中 ActionRequest
java.io.IOException
protected void searchToString(java.lang.StringBuilder b)
public java.lang.String getDescription()
TaskAwareRequest


--- layout: default title: Violet Documentation permalink: /documentation/violet/ redirect_from: - /violet/ - /software/violet/documentation/ section: software ---
Welcome to the Violet documentation!


Toggle navigation
Drag/Drop
Drag/Drop a csv to plot
Drag a .csv File, works in Firefox
Drop files here.


The ResultSet instance returned by Titanium.Database.DB.execute
.
A result set represents the results returned by a database query.
The rowCount property identifies the number of
rows in the result set. The ResultSet
object maintains an internal record of the
current row. As shown in the example, you can use the
next method to iterate through the rows in the set.
Use the field or fieldByName methods to query the fields for the current row.
Platform Implementation Notes
Note that fieldCount
is exposed as a method on iOS, but as a property on
Android. This is a known parity issue
(TIMOB-2945).
| fieldCount | [Number] | The number of columns in this result set. | |
| rowCount | [Number] | The number of rows in this result set. | |
| validRow | [Boolean] | Indicates whether the current row is valid. |
Adds the specified callback as an event listener for the named event.
Arguments
| name | [String] | Name of the event. |
| callback | [Callback<Object>] | Callback function to invoke when the event is fired. |
Applies the properties to the proxy.
Arguments
| props | [Dictionary] | A dictionary of properties to apply. |
Closes this result set and release resources. Once closed, the result set must no longer be used.
Retrieves the value for the specified field in the current row, and casts it to the specified type (String, Integer, Float or Double.)
Arguments
| index | [Number] | A zero-based column index. |
| type | [Number] | One of (Titanium.Database.FIELD_TYPE_STRING | Titanium.Database.FIELD_TYPE_INT | Titanium.Database.FIELD_TYPE_FLOAT | Titanium.Database.FIELD_TYPE_DOUBLE) |
Retrieves the value for the specified field in the current row, and casts it to the specified type (String, Integer, Float or Double.)
Arguments
| name | [String] | A column name or alias used in the SQL query. |
| type | [Number] | One of (Titanium.Database.FIELD_TYPE_STRING | Titanium.Database.FIELD_TYPE_INT | Titanium.Database.FIELD_TYPE_FLOAT | Titanium.Database.FIELD_TYPE_DOUBLE) |
Returns the field name for the specified field index.
Arguments
| index | [Number] | A zero-based column index for the field. |
Fires a synthesized event to any registered listeners.
Arguments
| name | [String] | Name of the event. |
| event | [Dictionary] | A dictionary of keys and values to add to the Titanium.Event object sent to the listeners. |
Gets the value of the fieldCount property.
Returns the field name for the specified field index.
Arguments
| index | [Number] | A zero-based column index for the field. |
Gets the value of the rowCount property.
Gets the value of the validRow property.
Advances to the next row in the result set and returns true
if one exists,
or false
otherwise.
Removes the specified callback as an event listener for the named event.
Arguments
| name | [String] | Name of the event. |
| callback | [Callback<Object>] | Callback function to remove. Must be the same function passed to addEventListener. |


Home About Speakers Schedule Sponsors Register Venue Organisers Mini-SeConf Home About Speakers Schedule Sponsors Register Venue Organisers Mini-SeConf Conference Posters Download Download Download If you have any questions don't hesitate to get in touch.


The New Year Sale
60% off for 6 months
Buy Now
Features
Who i'ts for
Resources
Pricing
call sales
1.<PHONE_NUMBER>
contact us
login
Try it Free


 The default PNG "quality" is 75, which means compression level 7 with adaptive PNG filtering, unless the image has a color map, in which case it means compression level 7 with no PNG filtering'
| photo_imagick::rotate |
( |
|
$degrees | ) |
|
| photo_imagick::setDimensions |
( |
| ) |
|
| photo_imagick::supportedTypes |
( |
| ) |
|
The documentation for this class was generated from the following file:


Contains the function CUUimpute() which performs model-based clustering and imputation simultaneously.
| Version: | 1.1 |
| Depends: | Matrix, gtools, MASS, R (≥ 3.2.2) |
| Published: | 2016-02-23 |
| Author: | Brian C. Franczak, Ryan P. Browne and Paul D. McNicholas |
| Maintainer: | Brian C. Franczak <bfrancza at math.mcmaster.ca> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| CRAN checks: | sensory results |
| Reference manual: | sensory.pdf |
| Package source: | sensory_1.1.tar.gz |
| Windows binaries: | r-devel: sensory_1.1.zip, r-release: sensory_1.1.zip, r-oldrel: sensory_1.1.zip |
| OS X binaries: | r-release: sensory_1.1.tgz, r-oldrel: sensory_1.1.tgz |
| Old sources: | sensory archive |
Please use the canonical form https://CRAN.R-project.org/package=sensory to link to this page.


This tutorial will teach you how to use the ActiveSlick library. With ActiveSlick you can easily create Repositories or DAOs, enrich your model classes with basic methods to manage the object lifecyle and implement the Active Record Pattern for mapped classes.
Slick is able to map result sets to case classes or Tuples because of its isomorphism. This is done thanks to built-in Scala features. However, there is no direct link between case class fields and database columns. Everything is done based on isomorphic projections.
As a consequence, Entity management must be done by hand, over and over again. One needs to save a Entity, ask Slick to return the generated ID and assign it explicitly to the case class. The example ManagingIdsByHand.scala demonstrates how this is typically done in a Slick application.
From lines 24 to 28 we can see how Foo is intialised and persisted. Once persisted we must explicitly ask Slick for the generated ID and add it to the case class.
Let's move forward and see how we can reduce this boilerplace.
We will start by having a look on the Identifiable trait.
This trait is provided by ActiveSlick and gives you the possiblity to define a model with a well-known ID.
The next step is to define a model that implements Identifiable.
The Player model is very simple. It defines the player's name and an Id of type Int. It also implements the withId method which is responsible for making a copy of a Player with an assigned Id.
Note that def id:Option[E#Id]
is overwritten as a constructor parameter id:Option[Int]
and has None as its default value. And it's the last parameter in the constructor.
This is very important, because it'll allow us to initialise a Player without passing an Id. For instance,
// not yet persisted Player
val player = Player("Pelé")
ActiveSlick provides some Slick Table extensions that are aware of Entities Ids and versioning (optimistic locking). Those are defined on the Tables trait.
There are basic two tables, the IdTable and the IdVersionTable.
Contrary to the default Slick Table, that only requires one type parameter, the ActiveSlick requires us to define the type of our model (M
) and the type of its Id (I
).
IdTable requires the definition of id:Column[I]
while IdVersionTable requires a id:Column[I]
and a version:Column[Long]
.
Noteworthy is the present of a implicit parameter of BaseColumnType[I].
Slick needs a implicit BaseColumnType for each type used in a Column definition. In our case, since the Id type 'I' is not yet defined we must let the 'door open' so the right BaseColumnType is picked and passed through once we have a concrete type for it.
To map the Player we'll use the EntityTable which is a type alias for models implementing the Identifiable trait.
If our model implements the Identifiable trait, we can chose for the EntityTable instead of IdTable. Basically, EntityTable is a IdTable for Identifiables where the Id type is selected via the type projection Identifiable#Id. Therefore we only have to specify the type of the Identifiable.
The Player's table is defined in the Schema trait.
Once we have our model and table mapping we can define a TableQuery and an Active Record Extension.
Again, ActiveSlick defines different TableQueries that builds on top of Slick's TableQuery and adds some generic functionality.
For the Player Extensions we'll choose IdentifiableTableQuery which is of course a TableQuery for Identifiables.
We also define a implicit class extensions for the Player model that will add methods like a 'save'/'trySave' and 'delete'/'tryDelete' to it.
Once the Player is pimped with the Active Record Extension we can use it as in the code fragment bellow:
// persisting a Player using the ActiveRecord Extension
val playerWithId = Player("Pelé").save
As you probably noticed, ActiveSlick requires us to define our mappings and TableQueries using the Cake Pattern.
The Cake Pattern is specially needed in our case because many of the Slick classes and traits needed to enable the mappings in ActiveSlick are only available when a Profile is defined. Therefore, we most add all our components in a cake and let the the Profile be defined later on.
The ActiveSlickCake is a component that wires everything togehter and define the profile using the play-slick plugin for Play!
We have the following pieces in this cake:
To integrate ActiveSlick with Play! we'll use the play-slick plugin.
The Profile required by the ActiveSlickCake will be provided by the play-slick plugin via play.api.db.slick.Config.driver. The driver is configured in the application.conf as usual (see "Database configuration" configuration section).
The application.conf also contains the necessary configuration to load the DDL into the in-memory DB. (see slick.default property). This will generated the necessary evolutions script directly from the Players table.
As usual, the evolutions script must be applied in order to create the schema. You must first access http://localhost:9000 and click on "Apply this script now!" to have it applied to the in-memory DB.
The PlayerController illustrates how we can use our newly Active Record enabled Slick model in a Play! application.
import components.ActiveSlickCake.cake._


The samp element is used to define sample output from a computer program.
Message from my computer:
File Not Found. Press F1 to continue


All values will be separated by commas. If a text string contains a space or other white space character, it will be enclosed in double quotes. All fields will always be present. NULL strings (“”) or zeros will be used when a field is not applicable. All floating point values will have six digits to the right of the decimal point.
This file contains only initial source and normalization measurements.
The default file name is NCC_perf.dat
Facility code 12 characters
MBA code 4 characters
Inspection year YYYY
Inspection number 12 characters
Measurement date YYYYMMDD
Measurement time HHMMSS
Measurement type 1 character
(S = initial source, N = normalization)
Detector type 11 characters
Detector id 8 characters
Configuration id 2 characters
Electronics id 8 characters
Normalization source id 12 characters
Measurement, total good count time integer
Singles sum integer
R + A sum integer
Reals sum integer
Normalization constant floating point
Ratio expected/measured singles or doubles rate floating point
Ratio expected/measured singles or doubles rate error floating point
Normalization test pass (Y/N) 1 character


A third season of The Young Offenders has been confirmed
They've already shot scenes for the next season
by Kendra BeckerA third season of The Young Offenders has been confirmed.
Fans of the hit series will be delighted to know that Alex Murphy, Chris Walley and Hilary Rose have signed up for yet another season.
Writer and director Peter Foott told Chortle: “We are so grateful to BBC Three and thrilled that they had such faith in the stories and characters of The Young Offenders that they commissioned a third series from us.”
“We can’t wait for everyone to see more of Conor, Jock, Mairéad and all the characters next year in our third series.”
“We’ve been really amazed at the huge reaction to series two so far, and we’re so happy that we can officially announce that there’s more on the way for fans of the show.”
The second season of the hit series, which is currently airing on RTE2 and BBC One, has down a hit with viewers in the UK and Ireland.


Block Heed is a simple way to block access to time-consuming websites (like during the working hours) as you specify in the window below.
Type the sites you would like to block the access to in a format like facebook.com, type them in new line each.
Sites will be blocked on their next attempted visit if enabled. With the same said, you can also enjoy music in the background to increase focus.
Say no to distractions, and pay heed!
Created by Pavel Bucka (penge).
Support project by giving it a star (like) at https://github.com/penge/block-site.
Let me know about your feature requests.


Welcome!
Welcome to The Beast Pet Daycare! We love our...ahem...I mean your beasts, and we can't get enough of them. At Beast Pet Daycare, your pets will be treated to days filled with fun and friends. They'll be running around getting exercise, socializing with other pets and worn out by the time you pick them up at the end of the day. You will love the quality time in the evening with your pet as they cozy up by you for a well-earned night's slumber.
From our Full Service Hospital to our Daycare Club, our plush Boutique Boarding accommodations, our Grooming salon and our Training services, we maintain the highest level of care. Our Veterinary and Daycare Club members enjoy a range of exclusive benefits. Our chauffeur service will even pick up and drop off your pets from home or work!
We love what we do and are sure you will too – so contact us today to get started!


Hi, I have just set up emonCMS on a shared server and all seems to be in order but under feeds I get the Size reporting as NullB and Updated reporting as NaNs ago...... anyone know why this might be and how to fix it?
Cheers.
Archived Forum |
|
Size = NullB & Updated = NaNs ago ?Submitted by robur on Mon, 03/08/2015 - 13:21Hi, I have just set up emonCMS on a shared server and all seems to be in order but under feeds I get the Size reporting as NullB and Updated reporting as NaNs ago...... anyone know why this might be and how to fix it? Cheers. » |
Re: Size = NullB & Updated = NaNs ago ?
Not without more info. What feeds are they? are the inputs updating? were they working and stopped, or have they never worked? It's a shot in the dark but could it be a permissions issue related to the Data Folders on Shared server? issue you had?
Paul
Re: Size = NullB & Updated = NaNs ago ?
Hi Paul,
Sorry.... permissions set to 777 on the data folders, everything else including inputs working good and it has bee like this from the start.
Cheers.
Re: Size = NullB & Updated = NaNs ago ?
What feeds are they? Can you see them update in the input processing list?
Do the php feed files exist for the feeds that are not updating?
Do the files within the directories have the right permissions?
Have you deleted and replaced any feeds from the feeds page and not changed the processlists? All feed referencing is done by feed id not name so if you replace a feed with one of the same name, the processlist will still contain references to the old feed not the new one.
Do you have phpmyadmin to take a look at the mySQL tables? although the feed data isn't stored there, emoncms does use the feeds table to tie the php feeds to the mySQL data.
Paul
Re: Size = NullB & Updated = NaNs ago ?
Thanks Paul - I just checked the data files and they are all there, set the permission to 777 to be sure but I think I broke it so will try a rebuild! Fingers crossed - cheers.
Re: Size = NullB & Updated = NaNs ago ?
Morning, I rebuilt EmonCMS/database from scratch but I'm getting the same problem, the data files are all there and being updated as expected however. What permission should I set for the data files/folders - setting 777 seemed to cause the server some problems which I will try not to repeat! Cheers.
Re: Size = NullB & Updated = NaNs ago ?
I'm struggling to get a handle on your situation, did emoncms put the feed data files there or did you? If the folders are set up correctly with the correct address and permissions etc, when you create a feed via emoncms does it appear in the folder as expected? if so the permissions as set by emoncms should be correct.
Try creating a new feed to confirm the above, but please be sure it is the first in the processlist as if there is a problem with a preceeding feed it will not get updated. With a brand new feed created by emoncms in pole position on a processlist does it update? is it seen in the data feeds folder?
Paul
Re: Size = NullB & Updated = NaNs ago ?
Yip, everything is performing correctly, even the feeds, but they report NullB and NaNs on the FEEDS page.... here is how I went about it:
- Install new emonCMS with new database
- Create data folders in root of the shared server with permission 744.
- Send data to inputs - success
- Create Feeds from inputs - success
- Inputs, Feeds and Dashboard all update correctly
- Inputs show correct update time
- Feeds show NaNs
So, all good - just the Feeds not reporting the update time and size even though they are updating.
Re: Size = NullB & Updated = NaNs ago ?
Which version are you installing?
Have you carried anything over from a previous install? eg settings, data
Have you set a timezone?
Does admin => "update&check" return "no updates required" in green?
Paul
Re: Size = NullB & Updated = NaNs ago ?
Hi,
Version = 8.5.2 - a completely clean install - even settings.php
Timezone set (although not visible in Firefox, only IE)
Update & Check all GREEN and good - 'do nothing' :-)
LOG4PHP INSTALLED: no.... not sure what the significance of this is?
Cheers.
Re: Size = NullB & Updated = NaNs ago ?
Can you use phpmyadmin to check the feeds table? this is where the last updated time and value are stored.
Do you have redis installed? and does the setting in settings.php reflect that? Although stored in SQL tables they are referenced from redis if it's configured as "using redis" but it isn't there ???
Not entirely sure about the redis thing, I'm grasping at straws a little now, sorry I think I may of run out of ideas!!
Paul
PS what results do you get if you use the feeds api from your browser ? you can request a list of all feeds which should include last update value and time and you should also be able to fetch the current value of any feed specifically using the feed id.
Re: Size = NullB & Updated = NaNs ago ?
Not got my head round redid yet and how to install but the settings file is set the FALSE for redis. I just took a look at the SQL tables and as you can see below the time is not being written to FEEDS but it is to INPUTS - I'm using the following to post data:
"POST /emoncms/input/post.json?time=" + NOW + "&node=" + NODE + "&json=" + JSON + "&apikey=" + APIKEY + " HTTP/1.1"
I will try a direct post from the browser and report back.
Re: Size = NullB & Updated = NaNs ago ?
I set up a clean install of 8.5.2 tonight, and had the same thing happen.
When I clicked on the refresh feed size button, the NaNs and NullBs changed to the correct numbers and have worked correctly since.
Bill
Re: Size = NullB & Updated = NaNs ago ?
Hi, Thanks for the replies and sorry for the slow response, been working away for a couple of weeks. The refresh feed size button fixed the feed size reporting but I'm still getting NaNs for the last report time, perhaps I will try version 9 to see if it improves matters. Cheers.
Re: Size = NullB & Updated = NaNs ago ?
I have the same issue on Emoncms cloud with Firefox. With Chrome it shows well. By the way, incognito mode in Firefox works well. Seems to some cache issue.


7.7. Sending Emails¶
Table of contents
Provides the function to send emails.
This function uses a architecture called delayed online process, wherein instead of sending the emails immediately, the email send requests are briefly stored in the database and sent asynchronously using the resident batch.
The reasons for using this architecture are as below.
- The sending of emails can be included as a business transaction in applications that issue email send requests.
- There will be no effect on the application process, even when there is an email send failure due to email server or network failure.
This function provides two functions to implement the architecture mentioned above.
- A function to register the email send requests in the database
- A batch function that sends email based on the email send request
Each time the application issues an email send request, one email send request is created and one email is sent per request.
Tip
This function does not provide an API for sending the emails immediately. In this case, use JavaMail API(External site, English) directly.
7.7.1. Function overview¶
<IP_ADDRESS>. A standard email can be sent using a template.¶
The email send of system has to send many emails such as the registration completion notification email with the same wordings with difference in only some items. Therefore, this function provides the functionality for creating the subject and body by preparing a template and changing the placeholders. For details of the function, see Register an email send request.
Important
From Nablarch 5u13, standard email which uses the template engine is supported.
The standard email function up to 5u12 was also a part of the template engine
and could be used by configuring TinyTemplateEngineMailProcessor
, but the function was limited as given below.
- Placeholders can only be replaced with simple strings and structured objects are not supported.
- Control syntax such as conditional branching and iterations are not supported.
Instead of the existing standard email function, the standard email functions using the following template engine that is more advanced is recommended.
<IP_ADDRESS>. Sending of mass emails such as campaign notifications is not supported¶
This function does not support simultaneous sending of emails such as campaign notifications. The use of a specialized products is recommended when the following is applicable.
- Sending mass emails such as campaign notifications and email newsletters.
- Measure the opening rate of the delivered email and effectiveness of click count.
- The client device (for example, whether it is a feature phone) is identified with the email address and emails sent are switched accordingly.
7.7.2. Module list¶
<dependency>
<groupId>com.nablarch.framework</groupId>
<artifactId>nablarch-mail-sender</artifactId>
</dependency>
<!-- Used for numbering the email send request ID -->
<dependency>
<groupId>com.nablarch.framework</groupId>
<artifactId>nablarch-common-idgenerator</artifactId>
</dependency>
<dependency>
<groupId>com.nablarch.framework</groupId>
<artifactId>nablarch-common-idgenerator-jdbc</artifactId>
</dependency>
7.7.3. How to use¶
<IP_ADDRESS>. Configure settings to use email send¶
This function uses a database to manage the data used for email send. The table layout is as follows.
Request to send email ID PK |
String type | ID that uniquely identifies the email send request |
| Email send pattern ID (optional item) | String type | ID to identify the pattern of email send method. Define while extracting the unsent data that used the pattern.(Refer to Conditions for extracting unsent data） |
| Process ID of email send batch (optional item) | String type | Column used for pessimistic locking of records by each process when executing multiple processes. Define while executing multiple processes.(See Multiple process email send) |
| Subject line | String type | |
| Sender email address | String type | Email address specified in From header of email |
| Default reply email address | String type | Email address specified in Reply-To header of the email |
| Return email address | String type | Email address specified in the Return-Path header of the email |
| Character set | String type | Character set specified in the Content-Type header of the email |
| Status | String type | Code value that indicates the send status of the email (unsent/sent/failed) |
| Request date and time | Timestamp type | |
| Send date and time | Timestamp type | |
| Main text | String type |
Request to send email ID PK |
String type | |
Serial number PK |
Numeric type | Serial number of one email send request |
| Destination category | String type | Code value indicating the recipient classification (TO/CC/BCC) of the email |
| email address | String type |
Request to send email ID PK |
String type | |
Serial number PK |
Numeric type | Serial number of one email send request |
| Name of the attachment file | String type | |
| Content-Type | String type | |
| Attachment files | Byte array type |
Email template ID PK |
String type | |
Language PK |
String type | |
| Subject line | String type | |
| Main text | String type | |
| Character set | String type | Character set specified when sending an email |
Configure the following configuration to use email send
- Common configuration for email send request and email send batch
- Configuration of email send request
- Configuration of email send batch
- Common configuration for email send request and email send batch
In common configuration, configure the following.
- Table schema
Add the following class configuration to the component definition. For details of the configuration items, refer to the linked Javadoc.
- MailRequestTable (Request to send email table)
- MailRecipientTable (Email send recipient table)
- MailAttachedFileTable (Attachment files table)
- MailTemplateTable (Email template table)
The configuration example shown below.
<!-- Schema of email send request table--> <component name="mailRequestTable" class="nablarch.common.mail.MailRequestTable"> <!-- Specify the table name and column name. It is omitted here. --> </component> <!-- Schema of email send recipient table --> <component name="mailRecipientTable" class="nablarch.common.mail.MailRecipientTable"> <!-- Specify the table name and column name. It is omitted here. --> </component> <!-- Schema of attachment file table --> <component name="mailAttachedFileTable" class="nablarch.common.mail.MailAttachedFileTable"> <!-- Specify the table name and column name. It is omitted here. --> </component> <!-- Schema of email template table --> <component name="mailTemplateTable" class="nablarch.common.mail.MailTemplateTable"> <!-- Specify the table name and column name. It is omitted here. --> </component> <!-- Initialization configuration --> <component name="initializer" class="nablarch.core.repository.initialization.BasicApplicationInitializer"> <property name="initializeList"> <list> <!-- Other components are omitted --> <component-ref name="mailRequestTable" /> <component-ref name="mailRecipientTable" /> <component-ref name="mailAttachedFileTable" /> <component-ref name="mailTemplateTable" /> </list> </property> </component>
Tip
The mailSendPatternIdColumnName property and sendProcessIdColumnName property of MailRequestTable are optional items and configured to use the function. For mailSendPatternIdColumnName property, refer to Conditions for extracting unsent data and for sendProcessIdColumnName property, refer to Multiple process email send.
- Code value and message
Configure the code value used while sending email, message ID and failure code. Add the configuration of MailConfig to the component definition. For details of the configuration items, refer to Javadoc of MailConfig.
The configuration example shown below.
<component name="mailConfig" class="nablarch.common.mail.MailConfig"> <!-- Numbering target identification ID of email send request ID --> <property name="mailRequestSbnId" value="MAIL_REQUEST_ID" /> <!-- A code value that indicates the email recipient classification (TO/CC/BCC) --> <property name="recipientTypeTO" value="0" /> <property name="recipientTypeCC" value="1" /> <property name="recipientTypeBCC" value="2" /> <!-- A code value that indicates the email status (unsent/sent/failed) --> <property name="statusUnsent" value="0" /> <property name="statusSent" value="1" /> <property name="statusFailure" value="2" /> <!-- Message ID to output the number of email send requests --> <property name="mailRequestCountMessageId" value="mail.request.count" /> <!-- Message ID for email sent successfully --> <property name="sendSuccessMessageId" value="mail.send.success" /> <!-- Failure code when send fails --> <property name="sendFailureCode" value="mail.send.failure" /> <!-- Exit code when send fails --> <property name="abnormalEndExitCode" value="199" /> </component>
- Configuration of email send request
Add the following class to the component definition. For details of the configuration items, refer to the linked Javadoc.
- MailRequester (component that registers email send requests in the database)
- MailRequestConfig (class that retains the configuration value during email send request)
MailRequester generates a email send request ID using index Numbering when registering the email send request ID in the database. Therefore, separate configuration of Numbering is required.
The configuration example shown below.
- Point
- Since MailRequester is looked up with name,
specify
mailRequester
component name.
- Since MailRequester is looked up with name,
specify
<!-- Email send request component. --> <component name="mailRequester" class="nablarch.common.mail.MailRequester"> <!-- Configuration value during email send request (refer to the component definition below) --> <property name="mailRequestConfig" ref="mailRequestConfig" /> <!-- IdGenerator used for numbering the email send request ID --> <property name="mailRequestIdGenerator" ref="idGenerator" /> <!-- Table schema --> <property name="mailRequestTable" ref="mailRequestTable" /> <property name="mailRecipientTable" ref="mailRecipientTable" /> <property name="mailAttachedFileTable" ref="mailAttachedFileTable" /> <property name="templateEngineMailProcessor"> <component class="nablarch.common.mail.TinyTemplateEngineMailProcessor"> <property name="mailTemplateTable" ref="mailTemplateTable" /> </component> </property> </component> <!-- Configuration value during email send request --> <component name="mailRequestConfig" class="nablarch.common.mail.MailRequestConfig"> <!-- Default reply email address --> <property name="defaultReplyTo"<EMAIL_ADDRESS>/> <!-- Default return email address --> <property name="defaultReturnPath"<EMAIL_ADDRESS>/> <!-- Default character set --> <property name="defaultCharset" value="ISO-2022-JP" /> <!-- Maximum number of recipients --> <property name="maxRecipientCount" value="100" /> <!-- Maximum attached file size (bytes) --> <property name="maxAttachedFileSize" value="2097152" /> </component>
TinyTemplateEngineMailProcessor
is used here only for explanation and it has limited functionality and use template engines such as FreeMarker is recommended.
For details, see A standard email can be sent using a template..
- Configuration of email send batch
Configure the connection information of the SMTP server used by the email send batch. Add the configuration of MailSessionConfig. For details of the configuration items, refer to the linked Javadoc.
The configuration example shown below.
<component name="mailSessionConfig" class="nablarch.common.mail.MailSessionConfig"> <property name="mailSmtpHost" value="localhost" /> <property name="mailHost" value="localhost" /> <property name="mailSmtpPort" value="25" /> <property name="mailSmtpConnectionTimeout" value="100000" /> <property name="mailSmtpTimeout" value="100000" /> </component>
<IP_ADDRESS>. Register an email send request¶
The following class is used to register the email send request.
- MailRequester (register the email send request in the database)
- MailUtil (acquires MailRequester)
- FreeTextMailContext (non-standard email send request)
- TemplateMailContext (standard email send request)
- AttachedFile (Attachment file)
This function supports free-format non-standard emails, and standard emails that use preregistered templates, and creates the email send requests by using the corresponding classes.
An implementation example of a standard email is shown below.
// Create an email send request
TemplateMailContext mailRequest = new TemplateMailContext();
mailRequest.setFrom("from@tis.co.jp");
mailRequest.addTo("to@tis.co.jp");
mailRequest.addCc("cc@tis.co.jp");
mailRequest.addBcc("bcc@tis.co.jp");
mailRequest.setSubject("Subject");
mailRequest.setTemplateId("Template ID");
mailRequest.setLang("ja");
// Configure the value for the template placeholder.
mailRequest.setVariable("name", "Name");
mailRequest.setVariable("address", "Mailing address");
mailRequest.setVariable("tel", "Telephone number");
// When null is configured to the value, it is replaced by an empty string as shown below.
mailRequest.setVariable("option", null);
// Configure the attachment file.
AttachedFile attachedFile = new AttachedFile("text/plain", new File("path/to/file"));
mailRequest.addAttachedFile(attachedFile);
// Register the email send request.
MailRequester requester = MailUtil.getMailRequester();
String mailRequestId = requester.requestToSend(mailRequest);
Important
Note the following points when setting the values for the placeholder template in the standard email.
- An exception is thrown when
null
is specified in the key. - When
null
is specified in the value, replace it with an empty string. - Consistency between the template placeholder and key/value configured for the placeholder is not checked. Therefore, irrespective of whether a placeholder is present in the template, if the value is not set, then the email is sent without changing the placeholder. Conversely, values configured without a corresponding placeholder are simply ignored and the email is sent.
<IP_ADDRESS>. Send the emails (execute the email send batch)¶
Email send batch uses MailSender. MailSender is created as batch action that operates using resident batch.
To not send the same email multiple times when a failure occurs, the following process is followed in email send process. As a result, when an email is sent, the status is updated and sending of the email twice is prevented.
Important
When an exception (for example, exception thrown during database or network failure) occurs while updating the status (change to send failure) during email send failure, the status remains as sent. In this case, a patch is required to be attached to the relevant data (change the status to send failure). A message is added to the exception to prompt patch application.
Tip
As shown in the above figure, the status update process is executed in another transaction.
Therefore, the transaction to be used in these processes is required to be configured.
The component name of this transaction should be registered in the component configuration file as statusUpdateTransaction
.
For details, see Execute SQL in a transaction different from the current transaction.
An execution example is shown below. Refer to Launch the application for the details on execution.
- Point
- Specify MailSender in the requestPath option.
java nablarch.fw.launcher.Main \
-diConfig file:./mail-batch-config.xml \
-requestPath nablarch.common.mail.MailSender/SENDMAIL00 \
-userId mailBatchUser
- Conditions for extracting unsent data
MailSender extracts unsent data from the email send request table and sends the email. The conditions for extracting unsent data can be selected from the following two options.
- Extract unsent data from the entire table
- Extract unsent data from each email send pattern ID
To use email send pattern ID, for example, a system that can handle high priority emails that require the shortest possible time to send the mail and low priority emails which are okay to be sent once every hour can be considered.
To extract the unsent data from every email send pattern ID, start an email send batch process for each email send pattern ID to be monitored. Therefore, at process startup, specify the email send pattern ID (mailSendPatternId) to be processed as the startup argument.
An execution example is shown below.
- Point
- Specify the email send pattern ID in the option with the name
mailSendPatternId
.
- Specify the email send pattern ID in the option with the name
java nablarch.fw.launcher.Main \ -diConfig file:./mail-batch-config.xml \ -requestPath nablarch.common.mail.MailSender/SENDMAIL00 \ -userId mailBatchUser -mailSendPatternId 02
<IP_ADDRESS>. Error process while sending emails¶
When an exception caused by external input data (address or header) or an exception of email send failure occurs, MailSender sets the target email send request status as send failure and processes the next email send. When an exception other than the above occurs, email send request status is set as send failure and retried.
The following table shows the exception types and their error handling.
¶ Exception Processing AddressException of JavaMail when changing the email address of the send request Log output of the address that failed during conversion (log level: ERROR) InvalidCharacterException in Measures against email header injection attacks Log output of header string (log level: ERROR). SendFailureException of JavaMail when email send fails Log output of sent address, unsent address and invalid address (log level: ERROR) Exception other than the above during email send Wraps the exception and throws retry exception.
When update to status send failure fails or when the retry limit has reached, the email send batch is abnormally terminated.
Important
Send failure detection is required to be supported by checking the log file in another process.
To change the log output process or retry process, refer Expansion example.
<IP_ADDRESS>. Multiple process email send¶
Perform pessimistic lock using the process ID column of the email send request table so that multiple processes do not process the same send request when using multiple process for email send (example, when executing on a redundant server). The following configuration is required to use this function.
- Define the process ID column of email send batch in email send request table
- Configure the process ID column name of the email send batch in the property value sendProcessIdColumnName of MailRequestTable and add it to the component definition
- Add the transaction to update the process ID of the email send batch to the component definition with the name
mailMultiProcessTransaction
(refer to Execute SQL in a transaction different from the current transaction for the transaction configuration)Important
If the configuration mentioned in step 2 is not done, then there is a possibility of multiple processes processing a single email send request as there is no exclusive control. However, the email send batch apparently continues to operate, and detecting the omission of this configuration is difficult. Configure the above without fail for multiple processing of email send.
<IP_ADDRESS>. Measures against email header injection attacks¶
The following should be implemented as a fundamental measure against email header injection attacks.
- Use a fixed value for the email header. Do not use the external input values.
- Send email using the standard API of programming language. For Java, use JavaMail API(External site, English) .
- Use a fixed value for the email header. Do not use the external input values.
- This has to be supported in the project. When a fixed value cannot be used, change the line feed code or remove from the project.
- Send email using the standard API of programming language. For Java, use JavaMail API(External site, English) .
This function uses JavaMail API(External site, English) . However, even if JavaMail API(External site, English) is used, there are items that can be sent by email even if some of the items in the email header include a line feed code. Therefore, as a security measure, a check functionality is provided to prevent an email send when a line feed code is included in these items. If line feed code is included, InvalidCharacterException is thrown and log is output (log level: ERROR), and the sending process is handled as a failure for the corresponding email.
This security measure covers the following items that may be vulnerable.
- Subject line
- Return email address
7.7.4. Expansion example¶
<IP_ADDRESS>. Change the email send process such as add digital signature and encryption email body¶
MailSender sends the contents specified in email send request or template without any change. Depending on the application requirements, addition of digital signature or encryption the email body is required.
For such cases, support by creating an inherited class of MailSender in the project. For details, see Javadoc of MailSender.
<IP_ADDRESS>. Change the process when email send fails¶
Error process when an email send fails (for details, refer to Error process while sending emails) may have to be changed based on the requirement of the application such as changing the log level and retry exception, etc.
For such cases, like in the above cases, support by creating an inherited class of MailSender.
<IP_ADDRESS>. Specify the transaction used during email send request¶
When the email send request is to be performed securely even when a business application fails, the transaction executed in the email send request MailRequester and numbering of email send request ID may have to specified independent of the business application transaction.
A configuration example for this case is shown below.
- Point
- Use the same transaction name in the numbering of the email send request and the transaction manager.
<!-- Email send request component --> <component name="mailRequester" class="nablarch.common.mail.MailRequester"> <!-- Specify the transaction used in email send --> <property name="mailTransactionManager" ref="txManager" /> </component> <!-- Transaction manager --> <component name="txManager" class="nablarch.core.db.transaction.SimpleDbTransactionManager"> <property name="dbTransactionName" value="mail-transaction" /> </component> <!-- Email send request ID generator --> <component name="mailRequestIdGenerator" class="nablarch.common.idgenerator.TableIdGenerator"> <!-- Specify the transaction name specified in the transaction manager --> <property name="dbTransactionName" value="mail-transaction" /> </component>


My professional career started in 1994 when I graduated from The Art Institute of Dallas with my Associates of Applied Arts Degree. I wanted to be a Graphic Designer. So that is what I did.
Shortly after that I was able to start a job as a digital printing press operator. Not exactly Graphic design, but it got me in the door. This taught me that I have a knack for fixing things and an understanding how processes work together to make an overall system work. I then moved from running the press to handling pre-press. Finally got to do some design. This taught me the ins and out of prepping files for printing. Fast forward a little and I was managing production, teaching others the skills I had learned, and building my first website before moving on to try my hand at entrepreneurship.
I then spent the next 7 years helping companies with their graphic design needs. Graphic design for print was paying the bills, but I knew I needed to expand. So, I started to learn more about the web. I had a handle on HTML, CSS was new and easy for me to understand, so I focused on PHP and MySQL. I worked to learn it building anything I could think of. Luckily I was also able to find a few clients who needed sites that allowed me to use some of my skills. At this point I am comfortable with Graphic Design and building out basic sites with HTML, CSS, PHP and MySQL.
Personally, during all this time, I got married and had a child. This lead me to the next phase. Working for myself was fun and helped me learn a lot, but was not the most stable financially. I decided to do some temp work through an agency which lead to my next position. They needed someone to build Flash banners for lead generation. The next thing I know 5 years have passed (It was a 2 week contract) and I'm now directing technology for the company. I've learned a great deal about the web, servers, and other technology.
For the last 5 years, I have been with Biscotti, Inc. Biscotti was a fully funded startup which unfortunately ceased operations recently. During my tenure there, I held a Sr. Web Developer title. In addition to performing web development and managing AWS servers, I also handled all the graphic design (Logo, packaging, marketing banners, email design, etc.). Biscotti have me the opportunity to increase my skills as well as adding some new languages to the mix including Node.js & Swift
Now I'm moving on to the next segment of my professional career. If you are in need of someone with my skills, don't hesitate to contact me. I am sure I can help.
If you would like to hire me for freelance work or for a position in your organization give me a call at<PHONE_NUMBER>.
or...


Vastness is bearable only through love Drake Equation corpus callosum invent the universe worldlets Vangelis. Great turbulent clouds courage of our questions cosmic fugue how far away descended from astronomers radio telescope. Descended from astronomers descended from astronomers permanence of the stars rogue encyclopaedia galactica hearts of the stars. Shores of the cosmic ocean emerged into consciousness with pretty stories for which there's little good evidence take root and flourish citizens of distant epochs take root and flourish and billions upon billions upon billions upon billions upon billions upon billions upon billions.