Cube Portfolio is a jQuery grid plugin that provides powerful portfolio system, beautiful animated filtering, searching, custom captions and it’s perfect for portfolio projects, horizontal slider, images gallery, team members, blog posts or any other ordered grid content.
 If you already have jQuery on your page, don’t include it second time.
For more complex structures please check the templates folder.

As an alternative initialization, the options can be placed as a JSON object in the HTML data attributes for grid container:

There are numerous options that can be added to configure Cube Portfolio behavior. To set an option, you must add it to the initialization block of code.

| Name | Values | Default | Description |
|---|---|---|---|
| filters | string that represent the elements in the document (DOM selector) | '' | Define the wrapper for filters |
| loadMore | - | - | This options is deprecated. Please use plugins.loadMore.element option instead |
| loadMoreAction | - | - | This options is deprecated. Please use plugins.loadMore.action option instead |
| search | string that represent the elements in the document (DOM selector) | '' | Define the search input element |
| layoutMode | 'grid', 'mosaic' or 'slider' | 'grid' | Layout Mode for this plugin |
| sortByDimension | true or false | false | Filter the items by dimension (bigger to smallest) if there are gaps in grid. Option available only for `layoutMode: 'mosaic'` |
| drag | true or false | true | Mouse and touch drag support. Option available only for `layoutMode: 'slider'` |
| auto | true or false | false | Autoplay the slider. Option available only for `layoutMode: 'slider'` |
| autoTimeout | only integers (ex: 1000, 2000, 5000) | 5000 | Autoplay interval timeout. Time is set in milliseconds. 1000 milliseconds equals 1 second. Option available only for `layoutMode: 'slider'` |
| autoPauseOnHover | true or false | true | Stops autoplay when user hover the slider. Option available only for `layoutMode: 'slider'` |
| showNavigation | true or false | true | Show `next` and `prev` buttons for slider. Option available only for `layoutMode: 'slider'` |
| showPagination | true or false | true | Show pagination for slider. Option available only for `layoutMode: 'slider'` |
| rewindNav | true or false | true | Enable slide to first item (last item). Option available only for `layoutMode: 'slider'` |
| scrollByPage | true or false | true | Scroll by page and not by item. This option affect next/prev buttons and drag support. Option available only for `layoutMode: 'slider'` |
| defaultFilter | strings that represent the filter name(e.g. '*', '.logo', '.web-design', '.design') | '*' | Default filter for plugin. Option available only for `layoutMode: 'grid'` |
| filterDeeplinking | true or false | false | Enable / disable the deeplinking feature when you click on filters. Option available only for `layoutMode: 'grid'` |
| animationType |
'fadeOut' 'quicksand' 'bounceLeft' 'bounceTop' 'bounceBottom' 'moveLeft' 'slideLeft' 'fadeOutTop' 'sequentially' 'skew' 'slideDelay' '3d' Flip 'rotateSides' 'flipOutDelay' 'flipOut' 'unfold' 'foldLeft' 'scaleDown' 'scaleSides' 'frontRow' 'flipBottom' 'rotateRoom' |
'fadeOut' | Defines which animation to use for items that will be shown or hidden after a filter has been activated. The plugin uses the best browser features available (CSS3 transitions and transform, GPU acceleration) Option available only for `layoutMode: 'grid'` |
| gridAdjustment |
'default' 'alignCenter' 'responsive' |
'responsive' |
Adjust the layout grid.
- default (no adjustment applied) - alignCenter (align the grid on center of the page) - responsive (use a fluid grid to resize the grid) |
| mediaQueries |
- array of objects of format: [{width: a, cols: d}, {width: b, cols: e}] - you can define as many objects as you want - if this option is `false` Cube Portfolio will adjust the items width automatically (default option for backward compatibility) |
false |
Define `media queries` for columns layout.
Format: [{width: a, cols: d}, {width: b, cols: e}, {width: c, cols: f}], where a, b, c are the grid width and d, e, f are the columns displayed. e.g. [{width: 1440, cols: 5}, {width: 1024, cols: 4}, {width: 768, cols: 3}, {width: 480, cols: 2}, {width: 320, cols: 1}] means: if (gridWidth >= 1440) => show 5 columns, if (gridWidth >= 1024 && gridWidth < 1440) => show 4 columns, if (gridWidth >= 768 && gridWidth < 1024) => show 3 columns, if (gridWidth >= 480 && gridWidth < 768) => show 2 columns, if (gridWidth >= 320 && gridWidth < 480) => show 1 columns, if (gridWidth < 320) => show 1 columns Keep in mind that a > b > c This option is available only when `gridAdjustment: 'responsive'` |
| gapHorizontal | only integers (e.g. 1, 5, 10) | 10 | Horizontal gap between items |
| gapVertical | only integers (e.g. 1, 5, 10) | 10 | Vertical gap between items |
| caption |
'pushTop'
'pushDown' 'revealBottom' 'revealTop' 'revealLeft' 'moveRight' 'overlayBottom' 'overlayBottomPush' 'overlayBottomReveal' 'overlayBottomAlong' 'overlayRightAlong' 'minimal' 'fadeIn' 'zoom' 'opacity' |
'pushTop' | Caption - the overlay that is shown when you put the mouse over an item. NOTE: If you don't want to have captions set this option to an empty string (e.g. caption: '') |
| displayType |
'default'
'bottomToTop' 'fadeIn' 'fadeInToTop' 'sequentially' |
'fadeIn' |
The plugin will display his content based on the following values.
- default (the content will be displayed without any animation) - fadeIn (e.g. lazyLoading) (the plugin will fully preload the images before displaying the items with a fadeIn effect) - fadeInToTop - fadeInToTop (the plugin will fully preload the images before displaying the items with a fadeIn effect from bottom to top) - sequentially (the plugin will fully preload the images before displaying the items with a sequentially effect) - bottomToTop (the plugin will fully preload the images before displaying the items with an animation from bottom to top) |
| displayTypeSpeed | only integers, values in ms (e.g. 200, 300, 500) | 400 | Defines the speed of displaying the items (when displayType: 'default' this option will have no effect) |
| lightboxDelegate | strings that represent the elements in the document (DOM selector) | '.cbp-lightbox' | Define any clickable elements you wish to use to trigger lightbox popup on click. |
| lightboxGallery | true or false | true | Enable / disable gallery mode for lightbox popup |
| lightboxTitleSrc | HTML atributte | 'data-title' | Attribute of the delegate item that contains caption for lightbox |
| lightboxShowCounter | - | - | This options is deprecated. Please use lightboxCounter option instead |
| lightboxCounter | HTML markup code | '
{{current}} of {{total}}
' | Markup of the lightbox counter. To hide the counter for lightbox put this option to an empty string (e.g. '') |
| singlePageDelegate | strings that represent the elements in the document (DOM selector) | '.cbp-singlePage' | Define any clickable elements you wish to use to trigger singlePage popup on click. |
| singlePageDeeplinking | true or false | true | Enable / disable the deeplinking feature for singlePage popup |
| singlePageStickyNavigation | true or false | true | Enable / disable the sticky navigation for singlePage popup |
| singlePageShowCounter | - | - | This options is deprecated. Please use singlePageCounter option instead |
| singlePageCounter | HTML markup code | '
{{current}} of {{total}}
' | Markup of the singlePage counter. To hide the counter for singlePage put this option to an empty string (e.g. '') |
| singlePageAnimation |
'left'
'fade' 'right' |
'left' | Defines which animation to use when singlePage appear |
| singlePageCallback |
function(url, element) { // to update singlePage content use the following method: this.updateSinglePage(yourContent) } |
null | Use this callback to update singlePage content. The callback will trigger after the singlePage popup is open. (@param url = the href attribute of the item clicked, @param element = the item clicked) |
| singlePageInlineDeeplinking | true or false | false | Enable / disable the deeplinking feature for singlePageInline |
| singlePageInlineDelegate | strings that represent the elements in the document (DOM selector) | '.cbp-singlePageInline' | Define any clickable elements you wish to use to trigger singlePageInline popup on click. |
| singlePageInlinePosition |
'above'
'below' 'top' 'bottom' |
'top' | Define the position of singlePage Inline block |
| singlePageInlineInFocus | true or false | true | Push the open panel in focus and at close go back to the former stage |
| singlePageInlineCallback |
function(url, element) { // to update singlePage Inline content use the following method: this.updateSinglePageInline(yourContent) } |
null | Use this callback to update singlePage content. The callback will trigger after the singlePage popup is open. (@param url = the href attribute of the item clicked, @param element = the item clicked) |
| plugins.loadMore.element | string that represent the elements in the document (DOM selector) | '' | Define the wrapper for loadMore |
| plugins.loadMore.action | 'click' or 'auto' | 'click' | How the loadMore functionality should behave. Load on click on the button or automatically when you scroll the page |
| plugins.loadMore.loadItems | only integers (e.g. 2, 3, 10) | 3 | How many items to load when you click on the loadMore button |
Based on your filters Cube Portfolio use jQuery to decide which items to hide, show or re-position. Then applies CSS3 transition and transform to smoothly animate these items to their new locations. The plugin use the best browser features available (CSS3 transition and transform, GPU acceleration).
Filtering happens when public API method filter is triggered. This method (filter) can be trigger from anywhere, so you can use any kind of HTML structure for filters: buttons, links, dropdowns, etc.
The following example use some simple buttons to filter the plugin. For dropdown structure please check templates/03-lightbox-gallery/ folder.

All

Animation

Artwork

Illustration

Photography

Every filter categories should be entered as the "data-filter" attribute.

 All

 Animation

 Artwork

 Illustration

 Photography

You can enable a default filter right from the URL. When you visit the page that has Cube Portfolio implemented on it and want to enable the filter Print you can append to url the string #cbpf=.print and the `Print` filter will be active.
You can add search functionality in the current grid layout so you can find items quickly (please check Blog Posts template for a working version). First, add this snippet in your HTML:

  <input id="js-search-blog-posts" type="text" placeholder="Search by title" data-search=".cbp-l-grid-blog-title" class="cbp-search-input">

To connect the plugin with the HTML snippet you must set the option search: '#js-search-blog-posts' when initialize the plugin.
Cube Portfolio can change the order of item elements based on their text content.

Original sorting

Original sorting

Title

Description

The data-sort attribute is a selector used to retrieve the data from the grid. For the above example, Cube Portfolio gets for every item the text content of .cbp-l-grid-projects-title selector. That text will be used as a sorting data.
The data-sortBy attribute is used to define how the sorting data is processed.

Because Cube Portfolio must know the dimensions of his items before creating the grid you have three approaches on how to load the images:

When an anchor tag (link) is pressed you can choose either to display a cubeportoflio lightbox, open a singlePage popup, or to open a new web page based on the URL of the anchor tag. The lightbox can display images or videos loaded from YouTube, Vimeo, Ted.com or self-hosted videos (use delimiter '|' in href attribute to add the path to other formats for self-hosted videos).
Cube Portfolio use a custom lightbox system that is dependent to the plugin. You can use another lightbox system, but you will not have all of the features included in the Cube Portfolio lightbox. (Please see options section)
To enable lightbox, you must add cbp-lightbox class (or another class that you set in lightboxDelegate options) on the anchor elements that will open the lightbox on click.
Based on the href attribute of the anchor tag the lightbox will open an image or a video.
You can also add sounds from SoundCloud by going on their site, select the share option and click on Embed tab. In there you will find in the input an iframe element, copy the src of the iframe and include it in the .cbp-lightbox href (check the code below of a working example).
Also, Cubeportfolio has support for self-hosted .mp3 audio files. You must add the path your .mp3 file to the href attribute of the lightbox.
For youtube and vimeo videos you can also append custom params to the video link (e.g. &rel=0&autoplay=0&loop=1
Please check youtube and vimeo embedding pages for more info)

To use the lightbox feature add class cbp-lightbox on your link elements.
 external link
To create a gallery add also the data-cbp-lightbox attribute on those links. The value for data-cbp-lightbox attribute can be whatever you want but must be the same for one gallery.
 external link 1   external link 2   external link 3
You can open a custom HTML content by using the singlePage feature. Single Page uses a similar approach to lightbox system and you can use any kind of HTML markup as a content.
You have the option to deep link a singlePage based on the href attribute of anchor tag that opened the singlePage. This means that URL automatically change when you switch to another singlePage and you can easily link to the desired singlePage when Cube Portfolio starts. To do that, you have to enable singlePageDeeplinking in options.
To enable singlePage, you must add a cbp-singlePage class (or another class that you set in singlePageDelegate options) on the anchor elements that will open the singlePage on click.
The content that will be add to singlePage with the callback: singlePageCallback
To update content you must use updateSinglePage method and pass your HTML content as a parameter.

  open singlePage 1

  open singlePage 2

  open singlePage 3

To use singlePage feature add class cbp-singlePage on your link elements.
 external singlePage link
To create a gallery add also the data-cbp-singlePage attribute on those links. The value for data-cbp-singlePage attribute can be whatever you want but must be the same for one gallery.
 external singlePage link 1   external singlePage link 2   external singlePage link 3
NoteIf you run the plugin locally you must know that Chrome, Opera and Internet Explorer deny local AJAX (XMLHttpRequest) requests locally. You must use a web server to test singlePage feature. If you are using a web server and still have this issues please send me a link to your live website.
You can open a custom HTML content by using the singlePageInline feature. Single Page Inline use a similar approach to singlePage, but his content is added directly to the content of the plugin.
To enable singlePageInline, you must add a cbp-singlePageInline class (or another class that you set in singlePageInlineDelegate options) on the anchor elements that will open the singlePageInline on click.
The content that will be add to singlePageInline with the callback: singlePageInlineCallback
To update content you must use updateSinglePageInline method and pass your HTML content as a parameter.

  open singlePageInline 1

  open singlePageInline 2

  open singlePageInline 3

NoteIf you run the plugin locally you must know that Chrome, Opera and Internet Explorer deny local AJAX (XMLHttpRequest) requests locally. You must use a web server to test singlePageInline feature. If you are using a web server and still have this issues please send me a link to your live website.
Cube Portfolio has predefined captions, but it is very simple to add your own HMTL formatted containers inside the entries with your own CSS. You can create captions from almost any static HTML elements.
There are 11 predefined examples for captions in Cube Portfolio:
To activate a particulary caption set that caption in caption options

In your HTML markup you must add cbp-caption class to container that wrap your caption. Also, the default state of caption must be wrap in a cbp-caption-defaultWrap container and the active state of caption must be wrap in another cbp-caption-activeWrap container.

Caption that is active on hover

Cube Portfolio comes with 16 starter templates: Juicy Project, Lightbox Gallery, Meet the Team, Full Width, Masonry, Blog Posts, Slider, Awesome Work, Clients, Tabs, Agency, Testimonials. You will find them in the templates folder.
Every component (filters, grid container, and load more) have different skins that are completely independent of the others), so the skins can be combined. To enable a skin add the correspondent class to desire component container. To change the numbers of columns please refer to the Options area for mediaQueries feature.
If you want to control the height of you item you can define the height for every .cbp-item in your CSS:
.cbp-item { height: 300px; /* your desire value */ }
Cube Portfolio has several public API methods to use for external control. For every callbackFunction this keyword refers to Cube Portfolio instance.
// default init jQuery("#grid-container").cubeportfolio(options); // or jQuery("#grid-container").cubeportfolio('init', options); // with callback function jQuery("#grid-container").cubeportfolio(options, callbackFunction); // or jQuery("#grid-container").cubeportfolio('init', options, callbackFunction);
jQuery("#grid-container").cubeportfolio('destroy'); // with callback function jQuery("#grid-container").cubeportfolio('destroy', callbackFunction);
// filterDataSelector can be (only if you set .cbp-filter-item on filter selectors): jQuery('.cbp-filter-item').data('filter') jQuery("#grid-container").cubeportfolio('filter', filterDataSelector); // with callback function jQuery("#grid-container").cubeportfolio('filter', filterDataSelector, callbackFunction);
// filterSelector can be (only if you set .cbp-filter-item on filter selectors): jQuery('.cbp-filter-item') jQuery("#grid-container").cubeportfolio('showCounter', filterSelector); // with callback function jQuery("#grid-container").cubeportfolio('showCounter', filterSelector, callbackFunction);
Append the htmlContent to the grid, filter the new content, then will rearange all item elements to a properly layout.
// htmlContent - your HTML content jQuery("#grid-container").cubeportfolio('append', htmlContent); // with callback function jQuery("#grid-container").cubeportfolio('append', htmlContent, callbackFunction);
A typical htmlContent can look like this:
var htmlContent = '
my awesome content to append to plugin

my second awesome content to append to plugin
';
Note: Don't forget to add class .cbp-item to your div element
Prepend method works similar with the above append method, the only difference is that the htmlContent is inserted and the start of the grid.
// htmlContent - your HTML content jQuery("#grid-container").cubeportfolio('prepend', htmlContent); // with callback function jQuery("#grid-container").cubeportfolio('prepend', htmlContent, callbackFunction);
// items - jQuery DOM Object of the items you want to remove jQuery("#grid-container").cubeportfolio('remove', items); // with callback function jQuery("#grid-container").cubeportfolio('remove', items, callbackFunction);
To remove the first item in the grid you can use it like this:
var grid = jQuery("#grid-container"); grid.cubeportfolio('remove', grid.find('.cbp-item').first());
jQuery("#grid-container").cubeportfolio('layout'); // with callback function jQuery("#grid-container").cubeportfolio('layout', callbackFunction);
Cube Portfolio emit some events when certain events happens. You can subscribe to them by using jQuery event syntax:
jQuery("#grid-container").on('updateSinglePageComplete.cbp', function() { // your functionality });and unsubscrbe to them by ussing .off method
jQuery("#grid-container").off('updateSinglePageComplete.cbp');
The events supported are:
You can use load more feature using public API method append.
// ... after cubeportfolio initialization // basic load more items using public method `append` jQuery("#grid-container").cubeportfolio('append', '
my awesome content to append to plugin

my second awesome content to append to plugin
');
For more advanced examples please go to templates/juicy-projects/index.html path and check the HTML and JS markup.
If you have any questions that are beyond the scope of this documentation file, please feel free to email via my user page contact form here.


Table Test Instructions
- The component should have dynamically created a HtmlDataTable
-
The 'dynamic creation' code has subtle similarities to the 're-use same component on each row' code within HtmlDataTable. Specifically
if the 'dynamic creation' code is hooking in to 'setParent' then it might get triggered by HtmlDataTable
- Click 'POSTback'. There should be no error


The Genbukan Seika Dojo UK is a martial arts school based in Canterbury, England. We run classes in Genbukan Ninpo Taijutsu (commonly referred to as Ninjutsu or the art of the ninja), a Japanese martial art that has its origins some 1000 years ago. It is renowned for its self-protection techniques and the comprehensive nature of its training which has always emphasised and integrated physical, mental and spiritual elements.
Classes are held in Canterbury, suitable for beginners 18 and older, every Tuesday 7:30 pm - 8:30 pm. For more information please contact Dojo Cho Simon Martin.
Our senior instructor and head of our club is Sensei Simon Martin who has over 25 years experience and currently holds 2nd Dan Ninpo Taijutsu and Shoden Menkyo in Kijin Chosui Ryu. He is a personal student of the Genbukan World Ninpo Bugei Federation Grandmaster Shoto Tanemura.
Seika dojo has a friendly, inclusive environment that caters for beginners right through to advanced levels. The club currently trains from 7:30 pm - 8:30 pm on Tuesdays evenings with private sessions by prior arrangement.
Soke Shoto Tanemura gives names to all official Genbukan dojos and he has chosen Seika Dojo (which means Sacred Fire) as the name for this dojo.
The World Genbukan Ninpo Bugei Federation is an international organisation headed by Grandmaster Shoto Tanemura sensei. The schools are a mix of Ninja (ninjutsu/ninpo) and Samurai traditions dating back over 1000 years that were developed and practiced for combat survival. Due to the nature of the techniques, Genbukan Ninpo Taijutsu is not a sport and there are no competitions.
In the interests of maintaining the integrity of the ancient ninja tradition, Grandmaster Tanemura founded the Genbukan in November 1984. The Genbukan is dedicated to the factual portrayal and teaching of the ninja arts in the traditional Japanese manner. The federations ensure the credibility of instruction and the ranks of all its members. All instructors are personally certified by Grandmaster Tanemura.
The physical training taught by the Genbukan is focused on the use of Tai-sabaki, or the use of refined body movement to facilitate the skilful use of self-protection techniques, as opposed to using techniques which rely solely on muscular strength. Training is usually conducted with students working with partners so that they can develop correct timing, distancing, and body mechanics. Since the training is skill oriented, and not strength oriented, it has proven itself to be highly effective means of handling a confrontation with larger and stronger opponents and while natural speed and strength decline with age constantly practiced skills will improve over time.


{% comment %} This include takes a piece of HTML as its .html parameter and outputs it both as a prettified codeblock and as the preview, unless a separate .preview parameter is passed. If you pass a preview parameter, it can either be a string (in which case that's the HTML that will be output) or it can be false, in which case there is no preview at all. If the preview and the codeblock use the same HTML (i.e. you did not pass a preview parameter), any line that contains the string "PREVIEW ONLY" (this should probably be in an HTML comment) will be rendered only in the preview, but skipped in the codeblock. Conversely, if the line contains "", it will be rendered in the codeblock, but skipped in the preview (with this particular HTML comment removed). Usage: {% capture html %}


Zend\View\Renderer\PhpRenderer “renders” view scripts written in PHP, capturing and returning the output. It composes Variable containers and/or View Models, a helper plugin manager for helpers, and optional filtering of the captured output.
The PhpRenderer is template system agnostic; you may use PHP as your template language, or create instances of other template systems and manipulate them within your view script. Anything you can do with PHP is available to you.
Basic usage consists of instantiating or otherwise obtaining an instance of the PhpRenderer, providing it with a resolver which will resolve templates to PHP view scripts, and then calling its render() method.
Instantiating a renderer is trivial:
1 2 3 | use Zend\View\Renderer\PhpRenderer;
$renderer = new PhpRenderer();
|
Zend Framework ships with several types of “resolvers”, which are used to resolve a template name to a resource a renderer can consume. The ones we will usually use with the PhpRenderer are:
We suggest using the AggregateResolver, as it allows you to create a multi-tiered strategy for resolving template names.
Programmatically, you would then do something like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | use Zend\View\Renderer\PhpRenderer;
use Zend\View\Resolver;
$renderer = new PhpRenderer();
$resolver = new Resolver\AggregateResolver();
$renderer->setResolver($resolver);
$map = new Resolver\TemplateMapResolver(array(
'layout' => __DIR__ . '/view/layout.phtml',
'index/index' => __DIR__ . '/view/index/index.phtml',
));
$stack = new Resolver\TemplatePathStack(array(
'script_paths' => array(
__DIR__ . '/view',
$someOtherPath
)
));
$resolver->attach($map) // this will be consulted first
->attach($stack);
|
You can also specify a specific priority value when registering resolvers, with high, positive integers getting higher priority, and low, negative integers getting low priority, when resolving.
In an MVC application, you can configure this via DI quite easily:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | return array(
'di' => array(
'instance' => array(
'Zend\View\Resolver\AggregateResolver' => array(
'injections' => array(
'Zend\View\Resolver\TemplateMapResolver',
'Zend\View\Resolver\TemplatePathStack',
),
),
'Zend\View\Resolver\TemplateMapResolver' => array(
'parameters' => array(
'map' => array(
'layout' => __DIR__ . '/view/layout.phtml',
'index/index' => __DIR__ . '/view/index/index.phtml',
),
),
),
'Zend\View\Resolver\TemplatePathStack' => array(
'parameters' => array(
'paths' => array(
'application' => __DIR__ . '/view',
'elsewhere' => $someOtherPath,
),
),
),
'Zend\View\Renderer\PhpRenderer' => array(
'parameters' => array(
'resolver' => 'Zend\View\Resolver\AggregateResolver',
),
),
),
),
);
|
Now that we have our PhpRenderer instance, and it can find templates, let’s inject some variables. This can be done in 4 different ways.
Pass an associative array (or ArrayAccess instance, or Zend\View\Variables instance) of items as the second argument to render(): $renderer->render($templateName, array(‘foo’ => ‘bar))
Assign a Zend\View\Variables instance, associative array, or ArrayAccess instance to the setVars() method.
Assign variables as instance properties of the renderer: $renderer->foo = ‘bar’. This essentially proxies to an instance of Variables composed internally in the renderer by default.
Create a ViewModel instance, assign variables to that, and pass the ViewModel to the render() method:
1 2 3 4 5 6 7 8 9 10 11 12 | use Zend\View\Model\ViewModel;
use Zend\View\Renderer\PhpRenderer;
$renderer = new PhpRenderer();
$model = new ViewModel();
$model->setVariable('foo', 'bar');
// or
$model = new ViewModel(array('foo' => 'bar'));
$model->setTemplate($templateName);
$renderer->render($model);
|
Now, let’s render something. As a simple example, let us say you have a list of book data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | // use a model to get the data for book authors and titles.
$data = array(
array(
'author' => 'Hernando de Soto',
'title' => 'The Mystery of Capitalism'
),
array(
'author' => 'Henry Hazlitt',
'title' => 'Economics in One Lesson'
),
array(
'author' => 'Milton Friedman',
'title' => 'Free to Choose'
)
);
// now assign the book data to a renderer instance
$renderer->books = $data;
// and render the template "booklist"
echo $renderer->render('booklist');
|
More often than not, you’ll likely be using the MVC layer. As such, you should be thinking in terms of view models. Let’s consider the following code from within an action method of a controller.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | namespace Bookstore\Controller;
use Zend\Mvc\Controller\AbstractActionController;
class BookController extends AbstractActionController
{
public function listAction()
{
// do some work...
// Assume $data is the list of books from the previous example
$model = new ViewModel(array('books' => $data));
// Optionally specify a template; if we don't, by default it will be
// auto-determined based on the module name, controller name and this action.
// In this example, the template would resolve to "bookstore/book/list",
// and thus the file "bookstore/book/list.phtml"; the following overrides
// that to set the template to "booklist", and thus the file "booklist.phtml"
// (note the lack of directory preceding the filename).
$model->setTemplate('booklist');
return $model
}
}
|
This will then be rendered as if the following were executed:
1 | $renderer->render($model);
|
Now we need the associated view script. At this point, we’ll assume that the template “booklist” resolves to the file booklist.phtml. This is a PHP script like any other, with one exception: it executes inside the scope of the PhpRenderer instance, which means that references to $this point to the PhpRenderer instance properties and methods. Thus, a very basic view script could look like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <?php if ($this->books): ?>

Author
Title

<?php foreach ($this->books as $key => $val): ?>

<?php echo $this->escapeHtml($val['author']) ?>
<?php echo $this->escapeHtml($val['title']) ?>

<?php endforeach; ?>

<?php else: ?>

There are no books to display.

<?php endif;?>
|
Note
Escape Output
The security mantra is “Filter input, escape output.” If you are unsure of the source of a given variable – which is likely most of the time – you should escape it based on which HTML context it is being injected into. The primary contexts to be aware of are HTML Body, HTML Attribute, Javascript, CSS and URI. Each context has a dedicated helper available to apply the escaping strategy most appropriate to each context. You should be aware that escaping does vary significantly between contexts - there is no one single escaping strategy that can be globally applied.
In the example above, there are calls to an escapeHtml() method. The method is actually a helper, a plugin available via method overloading. Additional escape helpers provide the escapeHtmlAttr(), escapeJs(), escapeCss(), and escapeUrl() methods for each of the HTML contexts you are most likely to encounter.
By using the provided helpers and being aware of your variables’ contexts, you will prevent your templates from running afoul of Cross-Site Scripting (XSS) vulnerabilities.
We’ve now toured the basic usage of the PhpRenderer. By now you should know how to instantiate the renderer, provide it with a resolver, assign variables and/or create view models, create view scripts, and render view scripts.
Zend\View\Renderer\PhpRenderer utilizes several collaborators in order to do its work. use the following methods to configure the renderer.
Set the helper plugin manager instance used to load, register, and retrieve helpers.
| Return type: | Zend\View\Renderer\PhpRenderer |
|---|
Set the resolver instance.
| Return type: | Zend\View\Renderer\PhpRenderer |
|---|
Set a filter chain to use as an output filter on rendered content.
| Return type: | Zend\View\Renderer\PhpRenderer |
|---|
Set the variables to use when rendering a view script/template.
| Return type: | mixed |
|---|
Set flag indicating whether or not we should render trees of view models. If set to true, the Zend\View\View instance will not attempt to render children separately, but instead pass the root view model directly to the PhpRenderer. It is then up to the developer to render the children from within the view script. This is typically done using the RenderChildModel helper: $this->renderChildModel(‘child_name’).
| Return type: | Zend\View\Renderer\PhpRenderer |
|---|
Typically, you’ll only ever access variables and helpers within your view scripts or when interacting with the PhpRenderer. However, there are a few additional methods you may be interested in.
Render a template/view model.
If $nameOrModel is a string, it is assumed to be a template name. That template will be resolved using the current resolver, and then rendered. If $values is non-null, those values, and those values only, will be used during rendering, and will replace whatever variable container previously was in the renderer; however, the previous variable container will be reset when done. If $values is empty, the current variables container (see setVars()) will be injected when rendering.
If $nameOrModel is a Model instance, the template name will be retrieved from it and used. Additionally, if the model contains any variables, these will be used when rendering; otherwise, the variables container already present, if any, will be used.
It will return the script output.
| Return type: | string |
|---|
Retrieves the Resolver instance.
| Return type: | string|Zend\View\Resolver\ResolverInterface |
|---|
Retrieve a single variable from the container if a key is provided, otherwise it will return the variables container.
| Return type: | mixed |
|---|
Get a plugin/helper instance. Proxies to the plugin manager’s get() method; as such, any $options you pass will be passed to the plugin’s constructor if this is the first time the plugin has been retrieved. See the section on helpers for more information.
| Return type: | Zend\View\Helper\HelperInterface |
|---|
Add a template to the stack. When used, the next call to render() will loop through all template added using this method, rendering them one by one; the output of the last will be returned.
| Return type: | Zend\View\Renderer\PhpRenderer |
|---|
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.


| DOSE: |
|
smoked |
DMT |
(powder / crystals) |
A few months ago a friend of my brothers was peddling a small amount of DMT he had acquired from an aquaintance. I had wanted to try DMT since reading One River by Wade Davis, and I knew this was my chance.
I had heard about it coming into town before, and I'm sure it's around almost all the time, but the difficulty in finding it has always prevented me from trying it. So I picked up about twice what I was told would get me high. This looked like about a point of a gram of light yellow powder. I was in a hurry to get it over with, as I knew it only lasted a short time,
so I sat down, divided it up, gave about 1/4 to my brother and kept 3/4 for myself. I let my brother go first as I was treating him, I held the glass pipe and lit it, and he inhaled. At first it seemed as though he wasn't getting high at all, but after about a minute I could see he looked confused and he began to describe being disoriented, and feeling a strong vibration in his body and throughout the room. He was disappointed however, but I knew why, he had only taken about half as much as was advised.
I loaded the pipe with the rest, and he held it and lit it for me. As soon as I had taken the first very large pull, and coughed for a bit because of the unexpected awful taste and harsh smoke, I sat back in my chair and the trip began.
The first thing I remember is the buzzing, and instant silence. I could still hear sounds but everything was very distant. The buzzing grew until it overpowered everything, and I began what seemed like a long analysis in my mind of what was happening, after about 2 or 3 minutes I felt as though my consciousness had left my body, I was no longer in a form, but floating slightly above the position my body was sitting in. I told myself several times over that I was me, sitting in my chair, in my home, and that I had a body which was important and had to be looked after.
I slowly (and I mean slowly) began to drift back into my body. At this point I was again viewing the room through my own eyes, and I focused on the TV where a biography of Stanley Kubrick was showing clips from 'The Shining'. That's when it got very very strange.  Her face remained frozen for what seemed like an hour, as symbols spilled out from her mouth in concentric circles until the entire room and in fact everything in my sight had been overlayed with a gigantic mayan sun calendar-esque disc of symbols.The walls seemed to sprout arrows and triangles and circles, all spiralling into Duvall's open mouth.
At this point I became somewhat frightened. I knew I would soon be home free, but I wanted a break, some time out to take in what had already happened. Then our roommate, Catfish, came home. Catfish was not someone I was comfortable taking high doses of hallucinogens around, so I finished the last few minutes of my trip tossing, turning, and grinning on my bed. Amazed at what I had seen and felt. To this day I cannot forget the feeling of having to assure myself that my mind/soul/consciousness belonged inside my body, and must return. My trip was unforgettable, but I do not know if I wish to repeat it.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Mapping INBO color ring data to SOVON format
2020-10-19
1 Intro
This document contains and describes all the steps in mapping INBO color ring data to SOVON format. By running this document in R, it will create all the necessary data files. Settings to access INBO database are necessary.
Load libraries:
library(DBI) # To connect to database
library(odbc) # To connect to database
library(tidyverse) # To do datascience
library(tidylog) # To provide feedback on dplyr functions
library(tidyselect) # To select columns smartly
library(measurements) # To convert measurement units
library(here) # To find files
library(lubridate) # To ease working with dates
The output of the data processing consists of three dataframes saved as comma separated files (csv
) in folder data/processed/
:
crbirding_users
: user data (not loaded to GitHub for privacy reasons)crbirding_birds
: ring datacrbirding_observations
: observation data


/
I'm an unshakable optimist, believing in technology as the key to unlock human greatest potentials. I'm just passionate about everything regarding technology, ranging from VLSI design to Frontend/Backend development, working both at the research and industry level.
I'm currently pursuing a Ph.D. in Electronics at the University of Rome Tor Vergata, working in the Network Programmability Lab, which I've joined in late 2016. Here, I carry System Research at the hardware level, building the next generation Internet trough ad-hoc FPGA-based architectures. As a spin-off, I serve as Chief System Architect at Axbryd, building the next generation datacenter networks.
I love to make available my expertise to startups, helping them build their Minimum Viable Products and offering guidance in the process. I currently serve as Frontend Developer For GenomeUp and as Backend Developer for Docunque.
I also love spreading the verb of technology, serving as Lecturer both at the University of Rome Tor Vergata and at University of Rome La Sapienza.


RxClojure does not implement the Retry operator.
RxCpp implements this operator as retry
:
RxGroovy has two versions of this operator: retry
and retryWhen
.
RxJava has two versions of this operator: retry
and retryWhen
.
RxJS implements this operator as retry
.
retry
is found in the following distributions:
rx.js
rx.all.js
rx.all.compat.js
rx.compat.js
rx.lite.js
rx.lite.compat.js
RxKotlin has two versions of this operator: retry
and retryWhen
.
Rx.NET implements this operator as Retry
.
RxPY implements this operator as retry
:
Rx.rb has two versions of this operator: retry
and retry_infinitely
.
retryInfinitely
, on the other hand, will attempt to resubscribe to and mirror the
source Observable indefinitely, no matter how many onError
notifications it
receives.
RxScala has two versions of this operator: retry
and retryWhen
.


int ip2long ( string $ip_address )
The function ip2long() generates an IPv4 Internet network address from its Internet standard format (dotted string) representation. ip2long() will also work with non-complete IP addresses. Read » http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/libs/commtrf2/inet_addr.htm for more info.
Returns the IPv4 address or FALSE if ip_address is invalid.


{{define "Head"}}
The following is a list of 'go get'able packages on godoc.org. A list of Go standard packages is also available. {{htmlComment "\nPlease use http://api.godoc.org/packages instead of scraping this page.\n"}} {{template "Pkgs" .pkgs}}
Number of packages: {{len .pkgs}}. {{end}}


The pool system allows for fast random access to a number of objects. It allows for persistence and incremental updates.


Add all the ingredients into a mixing glass with ice and stir until very cold
Strain into a chilled cocktail glass
Garnish with a lemon twist
In a shaker, muddle the vodka, cucumber, tabasco and vermouth. Strain into a rocks glass filled with ice
Top with the tomato juice and garnish with a Kirby cucumber spear
Add all the ingredients into a shaker with ice, and shake until chilled
Strain into the prepared rocks glass over fresh ice
Garnish with a lime wheel and kosher salt
Add all the ingredients into a blender
Blend until smooth and pour into a Margarita glass
Garnish with an orchid and a cocktail umbrella
Add all the ingredients to a mixing glass with ice, and stir until well-chilled
Strain into a chilled coupe
Garnish with a brandied cherry
Add the juice to a champagne flute
Top the glass up with champagne or prosecco
Garnish with a fresh orange slice


Sweet Potato Buns
Awesome for savory foods such as burgers.
metadata
Created on 2021-01-08 Last updated on 2021-01-09
Adapted from Sweet Potato Buns – Great for Burgers, and Learning How to Bake Without Fear by Chef John @ blogspot.com (2021-01-08)
Recipe should yield this much: 982 g. 12 cm diameter – 12 buns.
Estimated time needed: At least 252 minutes. At most 257 minutes.
Ingredients
| 600 | g | flour | ||
| 300 | g | sweet potato | Original recipe calls for 1 cup of mashed orange sweet potatoes. | |
| 120 | g | water | ||
| 100 | g | egg | 50 g is approximately 1 medium sized egg. | |
| 50 | g | butter | ||
| 18 | g | honey | ||
| 12 | g | active dry yeast | 12g is approximately 1 package, which should be equivalent to 55g normal yeast. | |
| 10 | g | sesame seeds | 10 g is approximately 1 tbsp. | |
| 6 | g | salt | 6 g is approximately 1 tsp. |
Scaling
Timeline
Directions
⌛ Active time 3 minutes
- 300 g sweet potato | Original recipe calls for 1 cup of mashed orange sweet potatoes.
Peel and chop sweet potatoes:
The potatoes will later be mashed, so cut them as small as possible to reduce cooking time, but not so small that you have trouble mashing them.
⌛ Active time 1 minutes | Passive time 10 minutes
Boild sweet potatoes:
Boil the sweet potatoes with some salt until you are satisified with that they are soft enough to mash.
⌛ Active time 5 minutes
Drain and mash sweet potatoes:
Drain the water from the sweet potatoes and mash them into a mash.
⌛ Active time 1 minutes | Passive time 30 minutes
Set sweet potato mash aside to cool:
The sweet potato mash need to cool down to be just a bit hotter than room temperature before you can use it so that it doesn't mess up the yeast. How long this will take depends greatly on how thin you spread it out, how deep the snow is outside, etc, so the time given here is a very rough estimate.
⌛ Active time 5 minutes
- 50 g butter
Melt butter:
Melt the butter so that it is ready to add to the dough later. Also give it some time to cool down so that it doesn't mess up the eggs and yeast in the dough.
⌛ Active time 2 minutes | Passive time 5 minutes
- 12 g active dry yeast | 12g is approximately 1 package, which should be equivalent to 55g normal yeast.
- 120 g water
- 75 g flour
Combine yeast, water, and flour:
Because you will shortly have to add the sweet potato mash, wait with this step until the mash has reached a satisfactory temperature. When combined, wait for 5 minutes to see if the yeast activates (starts to bubble).
⌛ Active time 5 minutes
- 18 g honey
- 6 g salt | 6 g is approximately 1 tsp.
- 50 g egg | 50 g is approximately 1 medium sized egg.
- 525 g flour
Add rest of ingredients to dough:
Take the sweet potato mash you previously prepared, the melted butter, and add it to the yeast/water/flour sponge you just made, together with some honey, salt, egg, and flour. Note that you might not need all of the flour. When you've added about 450 g (85%), you should start considering whether you actually need more. You should add just enough flour so that it's no longer stick/you're comfortable with rolling it into buns.
⌛ Passive time 120 minutes
Proof dough until doubled in size:
Should take about 2 hours.
⌛ Active time 10 minutes
Shape buns:
Shape the dough into buns of desired size. Note that they will probably rise quite a lot when they're proofing after they have been shaped, and then some more in the oven, so don't be afraid to make them rather flat.
⌛ Passive time 40 minutes
Proof shaped buns for 40 minutes
⌛ Active time 5 minutes
- 50 g egg
- 10 g sesame seeds | 10 g is approximately 1 tbsp.
Egg wash and sprinkle with sesame seeds:
Optionally egg was and sprinkle the buns with sesame seeds before they go into the oven.
⌛ Passive time 15 minutes
Bake the buns:
Roast the buns in the oven at 200 ℃ for about 15 minutes.


OpenDesignis notDesign byCommittee Published {{page.date | date: "%b %e, %Y" }} {{ content }} {% include author.html %} {% include post-footer-nav.html %} {% include comments.html %}


---
layout: post
title: rough Storyboards
date: '2018-01-20T15:42:39+01:00'
categories:
- Storyboards
picture_url: https://film-Storyboards.tumblr.com/post/169934635571/rough-Storyboards
---
Facteur Chance car chase sequence Storyboards
Directed by Julien Séri
Productions: TF1 / AT Production TV series – 2009


Name:
Time:
Location:
NTRP:
Infomation:
Appoint People:
Back
Appoint
Name:
Time:
Location:
NTRP:
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
>5.0
Infomation:
Back
Write


%inherit file="/base/index.html"/> <%def name="title()">Signed Out%def> <%def name="profile()">
You have been signed out.


At the University
Universities and colleges provide tertiary education which lasts from 4 to 6 years. Each secondary school graduate can apply for as many universities and colleges as he/she likes but before he/she is accepted they have to pass an entrance examination in the subjects in which the university specialises. The examination consists of a written test and an interview.
Undergraduates can study a variety of subjects such as economics, foreign trade, architecture, law, journalism, the humanities, foreign languages, medicine, science, music, art, drama, engineering or computer science at various schools e.g. School of Economics or Architecture, Law, Medical or Science Faculty, Faculty of Journalism, Teachers' Training College, Art School, College of Agriculture, technical universities or polytechnics.
The university or college students can enrol at three-year courses for a Bachelor’s Degree or four and five-year courses for a Master’s Degree. Medicine usually takes 6 years. The university or college study is finished with a state examination and every undergraduate also has to write a thesis in order to receive a diploma in a certain field of study. The diploma is handed over at a graduation ceremony. Doctoral Degrees are awarded after other few years of study, which may be also individual, and completion of another thesis. Full-time university students are expected to bear the expense of their tuition and they also have to pay for their accommodation and board. The students from distant places usually lodge at a hall of residence (dorm). Only a limited number of students get a grant or a scholarship. For those who do not want to enter the university there are various types of two-year training courses such as for managers, businessmen, social workers, specialised nurses or language experts.
Are you lost in all the information about your stay abroad at Masaryk University in the Czech Republic? Are you confused by the university system, the choice of courses and filling in the complicated forms?
Masaryk University
Are you lost in all the information about your stay abroad at Masaryk University in the Czech Republic? Are you confused by the university system, the choice of courses and filling in the complicated forms?
Mendel University
Are you lost in all the information about your stay abroad at Masaryk University in the Czech Republic? Are you confused by the university system, the choice of courses and filling in the complicated forms?
Brno University of Technology
Are you lost in all the information about your stay abroad at Masaryk University in the Czech Republic? Are you confused by the university system, the choice of courses and filling in the complicated forms?
University of Veterinary Sciences Brno
Palackého třída 1/3, 612 42 Brno
The Janáček Academy of Music and Performing Arts Brno (JAMU)
Beethovenova 2, 602 00 Brno
Univerzita obrany
Kounicova 65, 662 10 Brno
Private facilities
NEWTON College, a.s.
Rašínova 2, 602 00 Brno
Akademie STING, o.p.s.
Stromovka 1, 637 00 Brno
Vysoká škola obchodní a hotelová, s.r.o.
Bosonožská 9, 625 00 Brno
Vysoká škola regionálního rozvoje a Bankovní institut – AMBIS, a. s.
Mezírka 775/1, 602 00 Brno – střed


IMF approves US$450m loan tranche for Pakistan
WASHINGTON, Nov 9 — The International Monetary Fund (IMF) yesterday praised Pakistan’s economic performance and agreed on next steps, paving the way for release of another portion of a US$6 billion (RM24.7), three-year loan package.
Once the International Monetary Fund board gives the go ahead, the Washington-based lender will provide US$450 million to help right the South Asian nation’s economy, on top of the US$1 billion released in July.
“Despite a difficult environment, programme implementation has been good, and all performance criteria for end-September were met with comfortable margins,” IMF mission chief Ernesto Ramirez Rigo said in a statement.
The official, who led a team that spent two weeks in the country, pointed to signs of improving economic stability, including the move to a flexible exchange rate, and slowing inflation that is projected to fall under 12 per cent next year.
But he said more work was needed to target money laundering and on terror finance controls.
Approval of the first performance review of Pakistan’s policy programme will also help unlock “significant funding from bilateral and multilateral partners.”
Under the loan program, the government agreed to slash civil expenditure and freeze military spending while promising to substantially raise revenues to stem a yawning fiscal deficit, and pledging to collect 5.5 trillion rupees (US$36 billion) in taxes. — AFP


nonfunctional requirement
1. A requirement that does not relate to functionality but to attributes such as reliability, efficiency, usability, maintainability, and portability, which product backlog items must possess in order to be fully accepted by the stakeholders. 2. Each nonfunctional requirement is a candidate for inclusion in the definition of done. See also definition of done.


--- --- {% for post in site.posts limit:site.data.theme.num_home_posts %} {% unless post.category contains "Memo" %}


--- title: "About My Research Projects" author: "Koki Ikeda" date: "September 19, 2018" output: html_document ---
Here I am going to talk about my research in psychology.


public final class DataUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static double[] |
arrayFromString(java.lang.String s) |
static double[] |
arrayFromString(java.lang.String s,
java.lang.String delemiter) |
static double[] |
arrayFromString(java.lang.String s,
java.lang.String delemiter,
boolean trim) |
static double[] |
average(double[] a,
int processes) |
static double[] |
combineLabelAndData(double[] x,
double y)
This method combines the label and features in the data point
This can be use to submit a single message in the stream
|
static BinaryBatchModel |
generateBinaryModel(double[][] xy,
int iterations,
double alpha)
Deprecated.
method
|
static double[][] |
generateDummyDataPoints(int samples,
int features)
This method provides a dummy data set for batch based computations
User can say the number of samples and feature size and this function
generates a data set with labels included per data sample
|
static double[][] |
getDataObjectToDoubleArray(DataObject<java.lang.Object> dataPointsObject1) |
static double[][] |
getDataPointsFromDataObject(java.lang.Object object)
This method is used to convert the input data obtained from a different SourceTask
|
static double[][] |
getWeightVectorFromDataObject(java.lang.Object object)
This method is used to convert the input data obtained from a different SourceTask
|
static double[] |
seedDoubleArray(int features)
This method populates the array with a Gaussian Distribution
|
static BinaryBatchModel |
updateModelData(BinaryBatchModel binaryBatchModel,
double[][] xy)
This method updates an existing BinaryBatchModel with the data points
|
public static double[] seedDoubleArray(int features)
features
- : number of features in a data pointpublic static double[] combineLabelAndData(double[] x, double y)
x
- data points with d featuresy
- labelpublic static double[][] generateDummyDataPoints(int samples, int features)
samples
- number of data points = Nfeatures
- number of features in a data point = D@Deprecated public static BinaryBatchModel generateBinaryModel(double[][] xy, int iterations, double alpha)
xy
- data points with {y_i, x_i_1, .... x_i_d}iterations
- number of iterationsalpha
- learning ratepublic static BinaryBatchModel updateModelData(BinaryBatchModel binaryBatchModel, double[][] xy)
binaryBatchModel
- Binary Batch Modelxy
- data points with {y_i, x_i_1, .... x_i_d}public static double[][] getDataPointsFromDataObject(java.lang.Object object)
public static double[][] getWeightVectorFromDataObject(java.lang.Object object)
public static double[][] getDataObjectToDoubleArray(DataObject<java.lang.Object> dataPointsObject1)
public static double[] arrayFromString(java.lang.String s)
public static double[] arrayFromString(java.lang.String s, java.lang.String delemiter)
public static double[] arrayFromString(java.lang.String s, java.lang.String delemiter, boolean trim)
public static double[] average(double[] a, int processes)


--- title: Page not found date: 2017-09-29 10:00:00 +02:00 layout: default ---
Sorry, the requested page does not exist.


- canonicalize(byte[], Charset, XMLCanonicalizationAlgorithm) - Static method in class permafrost.tundra.xml.XMLHelper
-
Canonicalizes the given XML content using the given algorithm.
- canonicalize(byte[], Charset, String) - Static method in class permafrost.tundra.xml.XMLHelper
-
Canonicalizes the given XML content using the given algorithm.
- canonicalize(byte[], String, XMLCanonicalizationAlgorithm) - Static method in class permafrost.tundra.xml.XMLHelper
-
Canonicalizes the given XML content using the given algorithm.
- canonicalize(byte[], String, String) - Static method in class permafrost.tundra.xml.XMLHelper
-
Canonicalizes the given XML content using the given algorithm.
- canonicalize(InputStream, Charset, XMLCanonicalizationAlgorithm) - Static method in class permafrost.tundra.xml.XMLHelper
-
Canonicalizes the given XML content using the given algorithm.
- canonicalize(InputStream, Charset, String) - Static method in class permafrost.tundra.xml.XMLHelper
-
Canonicalizes the given XML content using the given algorithm.
- canonicalize(InputStream, String, XMLCanonicalizationAlgorithm) - Static method in class permafrost.tundra.xml.XMLHelper
-
Canonicalizes the given XML content using the given algorithm.
- canonicalize(InputStream, String, String) - Static method in class permafrost.tundra.xml.XMLHelper
-
Canonicalizes the given XML content using the given algorithm.
- capitalize(String, boolean) - Static method in class permafrost.tundra.lang.StringHelper
-
Capitalizes the first character in either the first word or all
words in the given string.
- capture(String, String) - Static method in class permafrost.tundra.lang.StringHelper
-
Returns all the groups captured by the given regular expression pattern
in the given string.
- ChainFilter - Class in permafrost.tundra.io.filter
-
A FilenameFilter that chains together other filters.
- ChainFilter(FilenameFilter...) - Constructor for class permafrost.tundra.io.filter.ChainFilter
-
Constructs a new ChainFilter from the given list of FilenameFilter objects.
- ChainFilter(Collection<FilenameFilter>) - Constructor for class permafrost.tundra.io.filter.ChainFilter
-
Constructs a new ChainFilter from the given list of FilenameFilter objects.
- characters(String) - Static method in class permafrost.tundra.lang.StringHelper
-
Returns the given string as a list of characters.
- CharsetHelper - Class in permafrost.tundra.lang
-
A collection of convenience methods for working with Charset objects.
- clear(IData) - Static method in class permafrost.tundra.data.IDataHelper
-
Removes all key value pairs from the given IData document.
- clear(IData, String...) - Static method in class permafrost.tundra.data.IDataHelper
-
Removes all key value pairs from the given IData document except those with
a specified key.
- clear() - Method in class permafrost.tundra.data.IDataMap
-
Removes all of the mappings from this map.
- clear() - Method in class permafrost.tundra.net.http.route.HTTPRouter
-
Unregisters this object as the handler of all directives in the current route table from the Integration Server
dispatcher, and then clears the route table.
- close() - Method in class permafrost.tundra.io.DeleteOnCloseFileInputStream
-
Closes this file input stream and releases any system resources associated with the stream, then
deletes the file.
- close() - Method in class permafrost.tundra.io.MarkableFileInputStream
-
Closes this file input stream and releases any system resources associated with the stream.
- close(Closeable...) - Static method in class permafrost.tundra.io.StreamHelper
-
Closes all given closeable objects, suppressing any encountered
java.io.IOExceptions.
- compact(IData, boolean) - Static method in class permafrost.tundra.data.IDataHelper
-
Removes all null values from the given IData document.
- compact(IData[], boolean) - Static method in class permafrost.tundra.data.IDataHelper
-
Removes all null values from the given IData[].
- compact(T[]) - Static method in class permafrost.tundra.lang.ArrayHelper
-
Returns a new array with all null elements removed.
- compact(T[][]) - Static method in class permafrost.tundra.lang.ArrayHelper
-
Returns a new table with all null elements removed.
- comparator - Variable in class permafrost.tundra.data.IDataMap
-
- compare(IData[], IData[]) - Method in class permafrost.tundra.data.BasicIDataArrayComparator
-
Compares two IData[] objects.
- compare(IData, IData) - Method in class permafrost.tundra.data.BasicIDataComparator
-
Compares two IData documents.
- compare(IData, IData) - Method in class permafrost.tundra.data.CriteriaBasedIDataComparator
-
Compares two IData documents.
- compare(Object[], Object[]) - Method in class permafrost.tundra.lang.BasicArrayComparator
-
Compares two Object[] objects.
- compare(Object, Object) - Method in class permafrost.tundra.lang.BasicObjectComparator
-
Compares two Objects.
- compare(String, String, boolean) - Static method in class permafrost.tundra.lang.StringHelper
-
Compares two strings lexicographically.
- compare(NSPackage, NSPackage) - Method in class permafrost.tundra.server.PackageNameComparator
-
Compares two Package objects using the package name.
- compare(Calendar, Calendar) - Static method in class permafrost.tundra.time.DateTimeHelper
-
Compares two datetimes.
- compare(String, String, String, String) - Static method in class permafrost.tundra.time.DateTimeHelper
-
Compares two datetime strings.
- compareTo(IData) - Method in class permafrost.tundra.data.IDataMap
-
Compares this object with the specified object for order.
- compress(InputStream) - Static method in class permafrost.tundra.zip.GzipHelper
-
GZIP compresses the given data.
- compress(byte[]) - Static method in class permafrost.tundra.zip.GzipHelper
-
GZIP compresses the given data.
- compress(String, Charset) - Static method in class permafrost.tundra.zip.GzipHelper
-
GZIP compresses the given data.
- compress(String, String) - Static method in class permafrost.tundra.zip.GzipHelper
-
GZIP compresses the given data.
- compress(String) - Static method in class permafrost.tundra.zip.GzipHelper
-
GZIP compresses the given data.
- compress(ZipEntryWithData...) - Static method in class permafrost.tundra.zip.ZipHelper
-
Compresses the given contents into a zip archive.
- concatenate(T[]...) - Static method in class permafrost.tundra.lang.ArrayHelper
-
Returns a new array which contains all the elements from the given arrays.
- condition - Variable in class permafrost.tundra.flow.ConditionEvaluator
-
The conditional statement to be evaluated by this object.
- ConditionEvaluator - Class in permafrost.tundra.flow
-
Performs webMethods Integration Server flow language conditional statement evaluation against a specified scope.
- ConditionEvaluator(String) - Constructor for class permafrost.tundra.flow.ConditionEvaluator
-
Constructs a new flow condition.
- CONFIGURATION_FILE_NAME - Static variable in class permafrost.tundra.net.http.route.HTTPRouteTable
-
- construct(String) - Static method in class permafrost.tundra.io.FileHelper
-
Returns a java.io.File object given a file name.
- containsKey(Object) - Method in class permafrost.tundra.data.IDataMap
-
Returns true if this map contains a mapping for the specified key.
- containsValue(Object) - Method in class permafrost.tundra.data.IDataMap
-
Returns true if this map maps one or more keys to the specified value.
- contentType - Variable in class permafrost.tundra.data.IDataCSVParser
-
- convert(byte[], Charset, Charset) - Static method in class permafrost.tundra.lang.CharsetHelper
-
Returns a new byte[] by converting the given byte[] from the input charset to
the output charset, unless the two charsets are equal in which case the given
byte[] is returned as is.
- convert(byte[], String, String) - Static method in class permafrost.tundra.lang.CharsetHelper
-
Returns a new byte[] by converting the given byte[] from the input charset to
the output charset, unless the two charsets are equal in which case the given
byte[] is returned as is.
- convert(InputStream, Charset, Charset) - Static method in class permafrost.tundra.lang.CharsetHelper
-
Returns a new InputStream by converting the given InputStream from the input charset to
the output charset, unless the two charsets are equal in which case the given
InputStream is returned as is.
- convert(InputStream, String, String) - Static method in class permafrost.tundra.lang.CharsetHelper
-
Returns a new InputStream by converting the given InputStream from the input charset to
the output charset, unless the two charsets are equal in which case the given
InputStream is returned as is.
- convert(Object, String, String) - Static method in class permafrost.tundra.lang.ObjectHelper
-
Converts a string, byte array or stream to a string, byte array or stream.
- convert(Object, Charset, String) - Static method in class permafrost.tundra.lang.ObjectHelper
-
Converts a string, byte array or stream to a string, byte array or stream.
- convert(Object, String) - Static method in class permafrost.tundra.lang.ObjectHelper
-
Converts a string, byte array or stream to a string, byte array or stream.
- convert(Object, ObjectConvertMode) - Static method in class permafrost.tundra.lang.ObjectHelper
-
Converts a string, byte array or stream to a string, byte array or stream.
- convert(Object, Charset, ObjectConvertMode) - Static method in class permafrost.tundra.lang.ObjectHelper
-
Converts a string, byte array or stream to a string, byte array or stream.
- convert(Calendar, String) - Static method in class permafrost.tundra.time.TimeZoneHelper
-
Converts the given calendar to the given time zone.
- convert(Calendar, TimeZone) - Static method in class permafrost.tundra.time.TimeZoneHelper
-
Converts the given calendar to the given time zone.
- copy(IData, String, String) - Static method in class permafrost.tundra.data.IDataHelper
-
Copies a value from source key to target key within the given IData document.
- copy(File, File, boolean) - Static method in class permafrost.tundra.io.FileHelper
-
Copies the content in the source file to the target file.
- copy(String, String, boolean) - Static method in class permafrost.tundra.io.FileHelper
-
Copies the content in the source file to the target file.
- copy(Object, Object, boolean) - Static method in class permafrost.tundra.io.StreamHelper
-
Copies all data from the given input String, byte[] or InputStream to the given output stream,
and optionally closes both streams.
- copy(Object, Object) - Static method in class permafrost.tundra.io.StreamHelper
-
Copies all data from the given input String, byte[] or InputStream to the given output stream,
and then closes both streams.
- copy(InputStream, OutputStream, boolean) - Static method in class permafrost.tundra.io.StreamHelper
-
Copies all data from the given input stream to the given output stream, and optionally
closes both streams.
- copy(InputStream, OutputStream) - Static method in class permafrost.tundra.io.StreamHelper
-
Copies all data from the given input stream to the given output stream, and then
closes both streams.
- copy(Reader, Writer, boolean) - Static method in class permafrost.tundra.io.StreamHelper
-
Copies all the data from the given reader to the given writer, then closes both.
- copy(Reader, Writer) - Static method in class permafrost.tundra.io.StreamHelper
-
Copies all the data from the given reader to the given writer, then closes both.
- count - Variable in class permafrost.tundra.math.NormalDistributionEstimator
-
- create(File) - Static method in class permafrost.tundra.io.DirectoryHelper
-
Creates a new directory.
- create(String) - Static method in class permafrost.tundra.io.DirectoryHelper
-
Creates a new directory.
- create(File, boolean) - Static method in class permafrost.tundra.io.DirectoryHelper
-
Creates a new directory.
- create(String, boolean) - Static method in class permafrost.tundra.io.DirectoryHelper
-
Creates a new directory.
- create() - Static method in class permafrost.tundra.io.FileHelper
-
Creates a new, empty temporary file.
- create(File) - Static method in class permafrost.tundra.io.FileHelper
-
Creates a new, empty file; if file is null, a temporary file is created.
- create(String) - Static method in class permafrost.tundra.io.FileHelper
-
Creates a new, empty file; if filename is null, a temporary file is created.
- create(String, String) - Static method in class permafrost.tundra.server.ServiceHelper
-
Creates a new flow service in the given package with the given name.
- criteria - Variable in class permafrost.tundra.data.CriteriaBasedIDataComparator
-
- CriteriaBasedIDataComparator - Class in permafrost.tundra.data
-
Compares two IData objects using the values associated with the given
list of keys in precedence order.
- CriteriaBasedIDataComparator(IDataComparisonCriterion...) - Constructor for class permafrost.tundra.data.CriteriaBasedIDataComparator
-
Construct a new IDataComparator with one or more comparison criteria.
- CriteriaBasedIDataComparator(List<IDataComparisonCriterion>) - Constructor for class permafrost.tundra.data.CriteriaBasedIDataComparator
-
Construct a new IDataComparator with one or more comparison criteria.


Defend the energy cores from ever increasing enemy waves by destroying their spawn gates. Build tower mazes on Hex grid. Adapt them to dynamic changes in the terrain. Face quirky bosses. Design your own levels and share them on the Steam Workshop.
- Platforms
- Windows
- Release date
- May 16, 2022


Aqua Splash
问题描述 :
Give you a n*n chessboard. At first there are some blisters(水泡) on some position of the chessboard. There are three kinds of blisters. They will contain 1, 2 or 3 globules(水珠).
Now ZWC can choose one grid which has a blister to click. When being clicked, the blister will add one globule. If the number of globules in one blister is not less than 4, the blister will burst and disappear. Meanwhile, it will splash into 4 globules to up, down, left, right direction. In each direction, the first blister that not burst will absorb the globule and its globules will add one. This action may cause new blisters’ burst. If all the blisters have burst, ZWC will win the game.
To simplify this problem, you may suppose the globules move very fast and every second divide into two parts, at first all blisters have not less than 4 globules will burst and splash globules. Then the blisters still not burst try to absorb these globules. The following second repeats the same action.
You can get more detailed information from the sample.
ZWC wants to know whether he could win the game by clicking only one of the blisters. Can you help him?
输入:
Each test case starts with a line contains three numbers n (0 < n <= 20), the size of chessboard, x, y (1 <= x, y <= n) the grid that ZWC has clicked. Then n lines follow, each contains n integers. The integer aij (0<=aij <4) indicates the ith row and jth column of the chessboard has a blister with aij globules, aij = 0 means there isn’t exist a blister.
输出:
Each test case starts with a line contains three numbers n (0 < n <= 20), the size of chessboard, x, y (1 <= x, y <= n) the grid that ZWC has clicked. Then n lines follow, each contains n integers. The integer aij (0<=aij <4) indicates the ith row and jth column of the chessboard has a blister with aij globules, aij = 0 means there isn’t exist a blister.
样例输入:
2 4 4 4 0 3 0 0 3 3 0 3 0 0 0 0 0 3 0 3 4 3 3 3 1 0 0 3 1 2 3 2 3 3 3 0 0 2 3
样例输出:
Case 1: Yes! Good job ZWC! Case 2: No! Please try again ZWC!HintIn the first Case, the first burst blister is at (4, 4), and (4, 2) and (2, 4) are at second 2, (2, 2) are at second 3, (1, 2) and (2, 1) are at second 4. In the second Case, (3, 3) is at second 1, (3, 2) and (3, 4) are at second 2, (2, 4) (3, 1) (4, 4) are at second 3, (2, 1) (2, 3) (4, 3) are at second 4, (1, 1) and (2, 2) are at second 5. the blister at (1, 2) will not burst.
Discover’s Problem I
Submitted : 31, Accepted : 14
Given a sequence , how to find the longest increasing subsequence?  Here comes a question about the increasing subsequence, and I think you will like it. Now you don’t need to pay attention to the
length but to the sum of its elements. You should find out the increasing subsequence that the sum of its elements is max and print the sum of this increasing subsequence’s elements.
Input
The first line contains a integer T, indicating there a T cases(T<=10). Every case begin with a integer n, which is the length of the sequence. ( 1<=n<=10^5).The next line comes the elements . The values of it’s elements are positive integers that no more
than 2^31-1.
Output
For every case, print the answer in a single line.
Sample Input
2 5 100 1 2 2 3 5 9 3 4 10 5
Sample output
100 19
题目大意：给你一列数共n个(1<=n<=10^5),求最大的上升和序列。
分析：树状数组+DP 或则 线段树+DP现在我们先讲一下：树状数组+DP实际上状态转移方程是很容易想出的，dp[i]=max(dp[j])+a[i](其中0<j<i)关键是如何降低复杂度来实现快速的寻找最大的前i-1项中的最大上升和子序列。现在来说明一下如何用树状数组来实现快速的查询：按数的大小从小到大的排一下序，然后再按照数字的大小插入这样就保证了已经插入的就一定比插入的小，那么单调递增就能保证了，现在还一个需要确保，就是先后问题。由于树状数组如果按照排序前的序号插入的话，那么我们只统计他们的序号前面的就同样可以保证先后问题，仔细想一想其实没那么难的。
我们来寻找一下此问题的本源思想。我们是求上升且最大的子序列和，那么问题来了上升且最大，二这两个又不是单调的关系，无论怎样我们的快速查找的方法都只是一个排序的标准即一个判断条件。因此我们就想办法了，如果先确定一个不就OK了，寻找区间最大的方法是有的，因此我们就想方法先把单调升序列确定，然后查询区间的最大值。让序列在查询的过程中保持升序列的确很难想，现在介绍一下实际具体的做法：
1.设结构体，包含两个变量：数值，下标
2.按照数值从小到大的规则排序
3.遍历排序后的序列，按照结构体中的下标插入树状数组中：求出树状数组中插入位置前的最大的递升序列和，加上当前结构体中的数值再插入
4.遍历求出最大值关键是树状数组如何操作，下面还是不理解记住吧！
代码如下
/*
* File: main.cpp
* Author: Administrator
*
* Created on 2012年3月11日, 下午6:21
*/
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
const int MAX = 100001;
long long a[MAX];
long long dp[MAX];
/*
* 这个是DP的思想，但是要实现DP还需一定的技巧
*/
int lowbit(int x) {
return x & (-x);
}
void add(int x, long long p) {
while (x < 100001) {
a[x] = max(p, a[x]);
x += lowbit(x);
}
}
long long sum(int x) {
long long res = 0;
while (x) {
res = max(res, a[x]);
x -= lowbit(x);
}
return res;
}
struct node {
int pos;
int element;
bool operator<(const node & a)const {
if (element != a.element) {
return element < a.element;
}
return pos > a.pos;
}
} Node[MAX];
int main() {
int T;
int n;
while (scanf("%d", &T) != EOF) {
while (T–) {
scanf("%d", &n);
memset(dp, 0, sizeof (dp));
memset(a, 0, sizeof (a));
for (int i = 1; i <= n; i++) {
scanf("%d", &Node[i].element);
Node[i].pos = i;
}
sort(Node + 1, Node + n + 1);
for (int i = 1; i <= n; i++) {
dp[Node[i].pos] = sum(Node[i].pos) + (long long)(Node[i].element);
add(Node[i].pos, dp[Node[i].pos]);
}
long long res = 0;
for (int i = 1; i <= n; i++) {
res = max(dp[i], res);
}
printf("%lld\n", res);
}
}
return 0;
}
参考：http://blog.csdn.net/cyb6100300115/article/details/7343050
4.19革命
4.19革命
4.19革命
4.19革命
4.19革命
4.19革命
4.19革命
4.19革命
4.19革命
4.19革命
正是我要找的，适合新手
处凡愚而不减，在圣贤而不增；
住烦恼而不乱，居禅定而不寂。
L（X [0 .. M-1]，Y [0 .. N-1]）= 1 + L（X [0 .. M-2]，Y [0 .. N-1]）这个地方也也有笔误
应改为L（X [0 .. M-1]，Y [0 .. N-1]）= 1 + L（X [0 .. M-2]，Y [0 .. N-2]）
继续加油哦
这是什么编译器啊，不通过
没错的，九度OJ也有此题
很强大啊，佩服
全是智力分析的题
红绯鱼：
牛逼牛逼
没错的，九度OJ也有此题
约瑟夫也用说这么长……很成熟的一个问题了，分治的方法解起来o(n)就可以了，有兴趣可以看看具体数学的第一章，关于约瑟夫问题推导出了一系列的结论，很漂亮
bottes vernies blanches
I appreciate the efforts you men and women place in to share blogs on such sort of matters, it was certainly useful. Keep Posting!
刚开始学习，为啥会报错了，你试过了吗
不错，再多来的CF上面的题


Hello everyone! I am Gaurang Kamat. I am currently pursuing a bachelor's degree in electronics and telecommunication engineering. I like to learn new things and try implementing it. I wanna try having a basic experience in every domain of computer science and information technology.
I have worked in Trudawn solution as a web developer intern in which I have used wix for front end development and canva for designing logo
I have worked in Cloud Counselage as a data science intern in which I have used python for data classification and data visualisation
I am currently doing my engineering in Dwarkadas J Sanghvi College of Engineering. My CGPA is 8.8 out of 10 (till semester 6).
I was studying in Acharya Ambalal V Patel Junior college. My 12th grade percentage is 83.85
I was studying VPMS Orion (ICSE) School. My 10th grade percentage is 92.33%
This project is based on we present an Arduino based self-drive car with added software-based features like drowsiness detection, voice control along with line following ability and obstacle detection. The system uses OpenCV-Python to achieve control over the car by voice commands. The drowsiness detector detects the expression of the driver and sends signals to the Arduino board. The Arduino switches the car to self- drive mode depending upon the signal received and it also sends a signal to an app which is linked with it. The app performs the task of sending SOS. It also accounts for controlling the sensors and motors which are responsible for obstacle detection and route following.
(Sadly, we could not complete the project due to Covid-19 situation)
This project is an Internet of Things (IoT) based smart parking system which will manage and update a database based on availability of parking spaces in different parking slots and display the same to the user. The end user can interact with the system through a mobile application which will let the show a list of nearby parking spaces and availability of space in each. The user can select the parking lot of his choice and book it for himself for some hours which he/she will provide. User bookings get updated on the database. To display vacancy status to the user on his/her application, the current occupancy will have to get updated on the database in real time. For this, every parking lot will be fit with two IR sensors at a distance of average distance between car wheels which will sense the presence of a car. Output of IR sensors will be sent to the database through IoT. This will then be displayed to the end user on his application. The system will also have RFID based authentication at the parking gate. Every user will be provided with a RFID token at entrance which will be scanned at the entrance and exit of the parking lot which will cause the motorised gate to open. In this way, we are proposing a system which can be easily implemented with currently available technology in a cost-effective manner. Implementation of this system at a larger scale will not only provide a great deal of convenience to the end user.
I used to make a lot of paintings during my school days and I have used that talent for my hard creatives work in NSS (National Service Scheme) when I was in second year. Here are few pictures based on it.
Apart from learning new technical skills in this lockdown, I have also learnt how to cook


This report describes the ISO TC211 codelist catalogs, the codelists they contain, and the values and definitions of the codes.
Please contact Ted Habermann if you have questions or suggestions.
| Entry | Definition |
|---|---|
| class | descriptor of a set of objects that share the same attributes, operations, methods, relationships, and behaviour |
| codelist | flexible enumeration useful for expressing a long list of values, can be extended |
| enumeration | data type whose instances form a list of named literal values, not extendable |
| codelistElement | permissible value for a codelist or enumeration |
| abstractClass | class that cannot be directly instantiated |
| aggregateClass | class that is composed of classes it is connected to by an aggregate relationship |
| specifiedClass | subclass that may be substituted for its superclass |
| datatypeClass | class with few or no operations whose primary purpose is to hold the abstract state of another class for transmittal, storage, encoding or persistent storage |
| interfaceClass | named set of operations that characterize the behaviour of an element |
| unionClass | class describing a selection of one of the specified types |
| metaClass | class whose instances are classes |
| typeClass | class used for specification of a domain of instances (objects), together with the operations applicable to the objects. A type may have attributes and associations |
| characterString | textual information |
| integer | numerical field |
| association | semantic relationship between two classes that involves connections among their instances |
| Entry | Definition |
|---|---|
| mandatory | element is always required |
| optional | element is not required |
| conditional | element is required when a specific condition is met |


Web Development Blog
This blog discusses web development tools and libraries.
Primary
Secondary
Success
Danger
Warning
Info
Light
Dark
Link


Lab 7 Ð Data Sharing
Application Container Hands-on Labs
In Lab 7 we introduce the advanced concept of data sharing. We have already seen how Multitenant, with Application Containers, can provide an instant SaaS architecture for an application previously architected for standalone deployment. Technically this is done by installing a master application definition in an Application Root. Application PDBs for each tenant / franchise are plugged into this Application Root and the metadata for the database components of the Application definition is served from the Application root. However, so far all data, including data which may be considered part of the application definition ("seed data") has been local. In other words, there's a replica of this seed data in every Application PDB. In this lab we'll see how, in addition to metadata, common data may also be shared from Application Root. To do this we'll upgrade application wmStore to v3.0 and introduce various powerful data sharing capabilities.
To run this lab, start the lab
script by executing the following command:
@07.Data_Sharing.sql
In this lab, we have explored the advanced concept of data sharing,
through the following steps:
1. Upgrade Application wmStore to v3.0.
a. Add a new table to the application, defined as sharing = data.
b. Populated this table with a common set of data.
c.
Change table wm_Campaigns
to be sharing = data
(centrally-defined data only).
d.
Change table wm_Products
to be sharing = extended data
(both centrally-defined and locally-defined data).
e. This upgrade requires careful timing of redefinition of seed data in these two tables. (The seed data needs to be removed from the Application PDBs and re-created in the Application Root.)
f. Update data in wm_Orders to set the appropriate value for the newly added denormalized column.
2. Propagate the Upgrade to all franchises.
3. Query the wm_Products table in a franchise PDB to see the sources of data.
Connect to wmStore_Admin
Create a new List of Values table. For the purposes of this demo, these values will be centrally defined only. (That is, they may be thought of as "seed data" that is part of the application definition.) Here we have created a new table, and specified that its data is to be centrally defined and shared from Application Root to all application PDBs. In the next step we go through the routine exercise of adding data to this new table.
Now, things get interesting! In the next section, we convert the sharing mode of two existing tables:
_ wm_Campaigns: Centrally defined (sharing = data)
_ wm_Products: Centrally and locally defined (sharing = extended data)
Notice how we handle the seed data. In each case, we must disable any constraints that reference data which is about to be "moved" from the application PDB to the Root. (Technically this is a delete from the application PDB, followed by an insert into Application Root. We need the delete to work.)
_ Campaigns are centrally defined
_ Products are both centrally and locally defined
This is required because in these steps we will be deleting data from the Application PDBs and re-creating it in Application Root. We don't want the delete statements to fail because of these constraints.
These statements will execute in the Application PDBs because the sharing mode of the tables is currently sharing=metadata.
These steps need to be skipped until cross-container constraints are supported.
In the previous section, we converted the sharing mode of two existing tables.
We have now completed the definition of the upgrade to v3 of wmStore. As before, this upgrade script is defined in a "begin / end" block. Between the begin and end statements, much of the upgrade was a typical upgrade script. There was also some special handling to convert the data sharing mode of some of the tables. We have also seen how the steps in the upgrade script are captured in Application Root, to be replayed subsequently in the Application PDBs as they are sync'ed. The next step, therefore is to synchronize the Application PDBs for all tenants. In this lab, we'll do this by executing a script to do this in a single step.
This will be accomplished by executing a script. Application PDBs for all tenants / franchises have now been synchronized with the latest version of wmStore. In the next step, we'll connect to a particular franchise's Application PDB and look at the data in table wm_Products. The "sharing mode" of this table was changed to "sharing = extended data" in an earlier step of this Lab. In the next step we'll see the source of the data for the various rows in this table.


const ( ZTOL = 1e-14 STOL = 1e-14 )
const ( ATOL = 1e-14 // zero α for refinement )
func DistPointLine(p, a, b *Point, tol float64, verbose bool) float64
DistPointLine computes the distance from p to line passing through a -> b
func DistPointPoint(a, b *Point) float64
DistPointPoint computes the unsigned distance from a to b
func GetLimits(o *Nurbs) (xmin, xmax, xdel []float64)
func HashPoint(x, xmin, xdel []float64, tol float64) int
HashPoint returns a unique id of a point
func IsPointIn(p *Point, cMin, cMax []float64, tol float64) bool
IsPointIn returns whether p is inside box with cMin and cMax
func IsPointInLine(p, a, b *Point, zero, told, tolin float64) bool
IsPointInLine returns whether p is inside line passing through a and b
func PlotNurbs(dirout, fn string, b *Nurbs, npts int, ids bool, extra func())
PlotNurbs plots a NURBS
func PlotNurbsBasis(dirout, fn string, b *Nurbs, la, lb int)
PlotNurbsBasis plots basis functions la and lb
func PlotNurbsDerivs(dirout, fn string, b *Nurbs, la, lb int)
PlotNurbsDerivs plots derivatives of basis functions la and lb
func PlotTwoNurbs(dirout, fn string, b, c *Nurbs, npts int, ids bool, extra func())
PlotTwoNurbs plots two NURBS for comparison
func PointsLims(pp []*Point) (cmin, cmax []float64)
PointsLims returns the limits of a set of points
func ReadMsh(fnk string) (nurbss []*Nurbs)
ReadMsh reads .msh file
func VecDot(u, v []float64) float64
VecDot returns the dot product between two vectors
func VecNew(m float64, u []float64) []float64
VecNew returns a new vector scaled by m
func VecNewAdd(α float64, u []float64, β float64, v []float64) []float64
VecNewAdd returns a new vector by adding two other vectors
w := α*u + β*v
func VecNorm(u []float64) float64
VecNorm returns the length (Euclidian norm) of a vector
func WriteMshD(dirout, fnk string, nurbss []*Nurbs, vtagged map[int]int, ctagged map[string]int, tol float64)
WriteMshD writes .msh file Input:
vtagged -- maps hashed id of control point to vertex tag ctagged -- maps idOfNurbs_localIdOfElem to cell tag tol -- tolerance for normalized numbers comparison when generating hashes, e.g. 1e-7
type BezierQuad struct { // input Q [][]float64 // control points; can be set outside // auxiliary P []float64 // a point on curve }
BezierQuad implements a quadratic Bezier curve
C(t) = (1-t)² Q0 + 2 t (1-t) Q1 + t² Q2 = t² A + 2 t B + Q0 A = Q2 - 2 Q1 + Q0 B = Q1 - Q0
func (o *BezierQuad) DistPoint(X []float64, doplot bool) float64
DistPoint returns the distance from a point to this Bezier curve It finds the closest projection which is stored in P
func (o *BezierQuad) Point(C []float64, t float64)
Point returns the x-y-z coordinates of a point on Bezier curve
type Bin struct { Idx int // index of bin Entries []*BinEntry // entries }
Bin defines one bin in Bins (holds entries for search)
func (o Bin) String() string
type BinEntry struct { Id int // object Id X []float64 // entry coordinate (read only) }
BinEntry holds data of an entry to bin
type Bins struct { Ndim int // space dimension Xi []float64 // [ndim] left/lower-most point Xf []float64 // [ndim] right/upper-most point L []float64 // [ndim] whole box lengths S []float64 // size of bins N []int // [ndim] number of divisions All []*Bin // [nbins] all bins (there will be an extra bin row along each dimension) // contains filtered or unexported fields }
Bins defines bins to hold entries and speed up search
func (o *Bins) Append(x []float64, id int) (err error)
Append adds a new entry {x, id} to the bins structure
func (o Bins) CalcIdx(x []float64) int
CalcIdx calculates the bin index where the point x is returns -1 if out-of-range
func (o *Bins) Clear()
Clear clears all bins
func (o *Bins) Draw2d(withtxt, withgrid, withentries, setup bool, selBins map[int]bool)
Draw2d draws bins' grid
func (o Bins) Find(x []float64) int
Find returns the stored id of the entry whose coordinates are closest to x returns -1 if out of range or not found
func (o Bins) FindAlongSegment(xi, xf []float64, tol float64) []int
FindAlongSegment gets the ids of entries that lie close to a segment
Note: the initial (xi) and final (xf) points on segment defined a bounding box of valid points
func (o Bins) FindBinByIndex(idx int) *Bin
FindBinByIndex finds or allocate new bin corresponding to index idx
func (o *Bins) Init(xi, xf []float64, ndiv int) (err error)
xi -- [ndim] initial positions xf -- [ndim] final positions ndiv -- number of divisions for the maximum length
func (o Bins) String() string
type Bspline struct { // essential T []float64 // array of knots: e.g: T = [t_0, t_1, ..., t_{m-1}] // optional Q [][]float64 // control points (has to call SetControl to change this) // contains filtered or unexported fields }
Bspline holds B-spline data
func (o *Bspline) CalcBasis(t float64)
CalcBasis computes all non-zero basis functions N[i] @ t Note: use GetBasis to get a particular basis function value
func (o *Bspline) CalcBasisAndDerivs(t float64)
CalcBasisAndDerivs computes all non-zero basis functions N[i] and corresponding first order derivatives of basis functions w.r.t t => dR[i]dt @ t Note: use GetBasis to get a particular basis function value
use GetDeriv to get a particular derivative
func (o *Bspline) Draw2d(npts, option int)
Draw2d draws curve and control points option = 0 : use CalcBasis
1 : use RecursiveBasis
func (o *Bspline) Draw3d(npts int, first bool)
func (o *Bspline) Elements() (spans [][]int)
Elements returns the indices of nonzero spans
func (o *Bspline) GetBasis(i int) float64
GetBasis returns the basis function N[i] just computed by CalcBasis or CalcBasisAndDerivs
func (o *Bspline) GetDeriv(i int) float64
GetDeriv returns the derivative dN[i]dt just computed by CalcBasisAndDerivs
func (o *Bspline) Init(T []float64, p int)
Init initialises B-spline
func (o *Bspline) NumBasis() int
NumBasis returns the number (n) of basis functions == number of control points
func (o *Bspline) NumericalDeriv(t float64, i int) float64
NumericalDeriv computes a particular derivative dN[i]dt @ t using numerical differentiation Note: it uses RecursiveBasis and therefore is highly non-efficient
func (o *Bspline) PlotBasis(npts, option int)
PlotBasis plots basis functions in I option = 0 : use CalcBasis
1 : use CalcBasisAndDerivs 2 : use RecursiveBasis
func (o *Bspline) PlotDerivs(npts, option int)
PlotDerivs plots derivatives of basis functions in I option = 0 : use CalcBasisAndDerivs
1 : use NumericalDeriv
func (o *Bspline) Point(t float64, option int) (C []float64)
Point returns the x-y-z coordinates of a point on B-spline option = 0 : use CalcBasis
1 : use RecursiveBasis
func (o *Bspline) RecursiveBasis(t float64, i int) float64
RecursiveBasis computes one particular basis function N[i] recursively (not efficient)
func (o *Bspline) SetControl(Q [][]float64)
SetControl sets B-spline control points
func (o *Bspline) SetOrder(p int)
SetOrder sets B-spline order (p)
type Data struct { Verts []Vert // vertices Nurbss []NurbsD // NURBSs }
Data holds all geometry data
type Nurbs struct { Q [][][][]float64 // Qw: 4D control points [n[0]][n[1]][n[2]][4] // contains filtered or unexported fields }
Nurbs holds NURBS data Note: Control points must be set after a call to Init
Either SetControl must be called or the Q array must be directly specified
func FactoryNurbs1dCurveA() (b *Nurbs)
FactoryNurbs1dCurveA generates a NURBS 1D curve
func FactoryNurbs2dPlateHole() (b *Nurbs)
FactoryNurbs2dPlateHole generates a NURBS of a 2D quarter of plate with hole (quadratic)
func FactoryNurbs2dStrip() (b *Nurbs)
FactoryNurbs2dStrip generates a NURBS of a 2D strip (x-quadratic, y-linear)
func (o *Nurbs) CalcBasis(u []float64)
CalcBasis computes all non-zero basis functions R[i][j][k] @ u. Note: use GetBasisI or GetBasisL to get a particular basis function value
func (o *Nurbs) CalcBasisAndDerivs(u []float64)
CalcBasisAndDerivs computes all non-zero basis functions R[i][j][k] and corresponding first order derivatives of basis functions w.r.t u => dRdu[i][j][k] @ u Note: use GetBasisI or GetBasisL to get a particular basis function value
use GetDerivI or GetDerivL to get a particular derivative
func (o *Nurbs) CheckDerivs(tst *testing.T, nn int, tol float64, ver bool)
CheckDerivs compares analytical with numerical derivatives
func (o *Nurbs) CloneCtrlsAlongCurve(iAlong, jAt int) (Qnew [][][][]float64)
CloneCtrlsAlongCurve returns a copy of control points @ 2D boundary
func (o *Nurbs) CloneCtrlsAlongSurface(iAlong, jAlong, kAt int) (Qnew [][][][]float64)
CloneCtrlsAlongSurface returns a copy of control points @ 3D boundary
func (o *Nurbs) DrawCtrl2d(ids bool, args, idargs string)
DrawCtrl2d draws control net
func (o *Nurbs) DrawEdge2d(tmin, tmax, cte float64, along, npts int, args string)
DrawEdge2d draws and edge from tmin to tmax
func (o *Nurbs) DrawElem2d(span []int, npts int, ids bool, args, idargs string)
DrawElem2d draws element (non-zero span)
func (o *Nurbs) DrawElems2d(npts int, ids bool, args, idargs string)
DrawElems2d draws all elements (non-zero spans)
func (o *Nurbs) ElemBryLocalInds() (I [][]int)
ElemBryLocalInds returns the local (element) indices of control points @ boundaries (if element would have all surfaces @ boundaries)
func (o *Nurbs) Elements() (spans [][]int)
Elements returns the indices of nonzero spans
func (o *Nurbs) ExtractSurfaces() (surfs []*Nurbs)
ExtractSurfaces returns a new NURBS representing a boundary of this NURBS
func (o *Nurbs) GetBasisI(I []int) float64
GetBasisI returns the basis function R[i][j][k] just computed by CalcBasis or CalcBasisAndDerivs Note: I = [i,j,k]
func (o *Nurbs) GetBasisL(l int) float64
GetBasisL returns the basis function R[i][j][k] just computed by CalcBasis or CalcBasisAndDerivs Note: l = i + j * n0 + k * n0 * n1
func (o *Nurbs) GetDerivI(dRdu []float64, I []int)
GetDerivI returns the derivative of basis function dR[i][j][k]du just computed by CalcBasisAndDerivs Note: I = [i,j,k]
func (o *Nurbs) GetDerivL(dRdu []float64, l int)
GetDerivL returns the derivative of basis function dR[i][j][k]du just computed by CalcBasisAndDerivs Note: l = i + j * n0 + k * n0 * n1
func (o *Nurbs) GetElemNumBasis() (npts int)
GetElemNumBasis returns the number of control points == basis functions needed for one element
npts := Π_i (p[i] + 1)
func (o *Nurbs) GetQ(i, j, k int) (x []float64)
GetQ gets a control point x[i,j,k] (size==4)
func (o *Nurbs) GetQl(l int) (x []float64)
GetQl gets a control point x[l] (size==4)
func (o *Nurbs) GetU(dir int) []float64
GetU returns the knots along direction dir
func (o *Nurbs) Gnd() int
GetGnd returns the geometry dimension
func (o *Nurbs) IndBasis(span []int) (L []int)
IndBasis returns the indices of basis functions == local indices of control points
func (o *Nurbs) IndsAlongCurve(iAlong, iSpan0, jAt int) (L []int)
IndsAlongCurve returns the control points indices along curve
func (o *Nurbs) IndsAlongSurface(iAlong, jAlong, iSpan0, jSpan0, kAt int) (L []int)
IndsAlongSurface return the control points indices along surface
func (o *Nurbs) Init(gnd int, ords []int, knots [][]float64)
Init initialises Nurbs
func (o *Nurbs) Krefine(X [][]float64) (O *Nurbs)
Krefine returns a new Nurbs with knots refined Note: X[gnd][numNewKnots]
func (o *Nurbs) KrefineN(ndiv int, hughesEtAlPaper bool) *Nurbs
KrefineN return a new Nurbs with each span divided into ndiv parts = [2, 3, ...]
func (o *Nurbs) NonZeroSpans(dir int) [][]int
NonZeroSpans returns the 'elements' along direction dir
func (o *Nurbs) NumBasis(dir int) int
NumBasis returns the number of basis (controls) along direction dir
func (o *Nurbs) NumericalDeriv(dRdu []float64, u []float64, l int)
NumericalDeriv computes a particular derivative dR[i][j][k]du @ t using numerical differentiation Note: it uses RecursiveBasis and therefore is highly non-efficient
func (o *Nurbs) Ord(dir int) int
GetOrd returns the order along direction dir
func (o *Nurbs) PlotBasis(l int, args string, npts, option int)
PlotBasis plots basis function (2D only) option = 0 : use CalcBasis
1 : use CalcBasisAndDerivs 2 : use RecursiveBasis
func (o *Nurbs) PlotDeriv(l, d int, args string, npts, option int)
PlotDeriv plots derivative dR[i][j][k]du[d] (2D only) option = 0 : use CalcBasisAndDerivs
1 : use NumericalDeriv
func (o *Nurbs) Point(u []float64) (C []float64)
Point returns the x-y-z coordinates of a point on curve/surface/volume
func (o *Nurbs) RecursiveBasis(u []float64, l int) (res float64)
RecursiveBasis implements basis functions by means of summing all terms in Bernstein polynomial using recursive Cox-DeBoor formula (very not efficient) Note: l = i + j * n0 + k * n0 * n1
func (o *Nurbs) SetControl(verts [][]float64, ctrls []int)
SetControl sets control points from list of global vertices
func (o *Nurbs) SetQ(i, j, k int, x []float64)
SetQ sets a control point x[i,j,k] (size==4)
func (o *Nurbs) SetQl(l int, x []float64)
SetQl sets a control point x[l] (size==4)
func (o *Nurbs) U(dir, idx int) float64
U returns the value of a knot along direction dir
type NurbsD struct { Id int // id of Nurbs Gnd int // 1: curve, 2:surface, 3:volume (geometry dimension) Ords []int // order along each x-y-z direction [gnd] Knots [][]float64 // knots along each x-y-z direction [gnd][m] Ctrls []int // global ids of control points }
NurbsD holds all data required to read/save a Nurbs to/from files
type Point struct { X, Y, Z float64 }
Point holds the Cartesian coordinates of a point in 3D space
func (o *Point) NewCopy() *Point
NewCopy creates a new copy of Point
func (o *Point) NewDisp(dx, dy, dz float64) *Point
NewDisp creates a new copy of Point displaced by dx, dy, dz
func (o *Point) String() string
String outputs Point
type Segment struct { A, B *Point }
Segment represents a directed segment from A to B
func NewSegment(a, b *Point) *Segment
NewSegment creates a new segment from a to b
func (o *Segment) Len() float64
Len computes the length of Segment == Euclidian norm
func (o *Segment) New(m float64) *Segment
NewScaled creates a new Segment scaled by m and starting from A
func (o *Segment) String() string
String outputs Segment
func (o *Segment) Vector(m float64) []float64
Vector returns the vector representing Segment from A to B (scaled by m)
type Vert struct { Id int // id Tag int // tag C []float64 // coordinates (size==4) }
Vert holds data for a vertex => control point