How Authorization Works
When a component requests an operation,
the SecurityManager.authorize
method is invoked.
It is passed the principal of the operation’s requester
and a ResourcePermission
, which describes the operation requested.
The implementation of the SecurityManager.authorize
method
makes a decision as to whether or not the principal will be granted permission
to carry out the operation.
It returns a boolean in which a return value of true
permits
the operation,
and a return value of false
prevents the operation.
A well-designed authorize
method will have or will have a way of obtaining
a mapping of principals to the operations (in the form of resource permissions)
that they are permitted to do.
Resource Permissions
All operations are described by an instance of the ResourcePermission
class.
A permission contains the Resource
data member,
which classifies whether the operation as working on
- cache data; value is
DATA
- the distributed system; value is
CLUSTER
A permission also contains the Operation
data member,
which classifies whether the operation as
- reading; value is
READ
- changing information; value is
WRITE
- making administrative changes; value is
MANAGE
The operations are not hierarchical;
MANAGE
does not imply WRITE
, and WRITE
does not imply READ
.
Some DATA
operations further specify a region name in the permission.
This permits restricting operations on that region to only those
authorized principals.
And within a region, some operations may specify a key.
This permits restricting operations on that key within that region to
only those authorized principals.
Some CLUSTER
operations further specify a finer-grained
target for the operation.
Specify the target with a string value of:
DISK
to target operations that write to a disk storeGATEWAY
to target operations that manage gateway senders and receiversQUERY
to target operations that manage both indexes and continuous queriesDEPLOY
to target operations that deploy code to serversLUCENE
to target Lucene index operations
This table classifies the permissions assigned for operations common to a Client-Server interaction.
| Client Operation | Assigned ResourcePermission |
|---|---|
| get function attribute | CLUSTER:READ |
| create region | DATA:MANAGE |
| destroy region | DATA:MANAGE |
| Region.Keyset | DATA:READ:RegionName |
| Region.query | DATA:READ:RegionName |
| Region.getAll | DATA:READ:RegionName |
| Region.getAll with a list of keys | DATA:READ:RegionName:Key |
| Region.getEntry | DATA:READ:RegionName |
| Region.containsKeyOnServer(key) | DATA:READ:RegionName:Key |
| Region.get(key) | DATA:READ:RegionName:Key |
| Region.registerInterest(key) | DATA:READ:RegionName:Key |
| Region.registerInterest(regex) | DATA:READ:RegionName |
| Region.unregisterInterest(key) | DATA:READ:RegionName:Key |
| Region.unregisterInterest(regex) | DATA:READ:RegionName |
| execute function | Defaults to DATA:WRITE. Override Function.getRequiredPermissions to change the permission. |
| clear region | DATA:WRITE:RegionName |
| Region.putAll | DATA:WRITE:RegionName |
| Region.clear | DATA:WRITE:RegionName |
| Region.removeAll | DATA:WRITE:RegionName |
| Region.destroy(key) | DATA:WRITE:RegionName:Key |
| Region.invalidate(key) | DATA:WRITE:RegionName:Key |
| Region.destroy(key) | DATA:WRITE:RegionName:Key |
| Region.put(key) | DATA:WRITE:RegionName:Key |
| Region.replace | DATA:WRITE:RegionName:Key |
| queryService.newCq | DATA:READ:RegionName |
| CqQuery.stop | DATA:READ |
This table classifies the permissions assigned for gfsh
operations.
gfsh Command |
Assigned ResourcePermission |
|---|---|
| alter disk-store | CLUSTER:MANAGE:DISK |
| alter region | DATA:MANAGE:RegionName |
| alter runtime | CLUSTER:MANAGE |
| backup disk-store | DATA:READ and CLUSTER:WRITE:DISK |
| change loglevel | CLUSTER:WRITE |
| clear defined indexes | CLUSTER:MANAGE:QUERY |
| close durable-client | CLUSTER:MANAGE:QUERY |
| close durable-cq | CLUSTER:MANAGE:QUERY |
| compact disk-store | CLUSTER:MANAGE:DISK |
| configure pdx | CLUSTER:MANAGE |
| create async-event-queue | CLUSTER:MANAGE:DEPLOY, plus CLUSTER:WRITE:DISK if the associated region is persistent |
| create defined indexes | CLUSTER:MANAGE:QUERY |
| create disk-store | CLUSTER:MANAGE:DISK |
| create gateway-receiver | CLUSTER:MANAGE:GATEWAY |
| create gateway-sender | CLUSTER:MANAGE:GATEWAY |
| create index | CLUSTER:MANAGE:QUERY |
| create lucene index | CLUSTER:MANAGE:LUCENE |
| create region | DATA:MANAGE, plus CLUSTER:WRITE:DISK if the associated region is persistent |
| define index | CLUSTER:MANAGE:QUERY |
| deploy | CLUSTER:MANAGE:DEPLOY |
| describe client | CLUSTER:READ |
| describe config | CLUSTER:READ |
| describe disk-store | CLUSTER:READ |
| describe lucene index | CLUSTER:READ:LUCENE |
| describe member | CLUSTER:READ |
| describe offline-disk-store | CLUSTER:READ |
| describe region | CLUSTER:READ |
| destroy disk-store | CLUSTER:MANAGE:DISK |
| destroy function | CLUSTER:MANAGE:DEPLOY |
| destroy index | CLUSTER:MANAGE:QUERY |
| destroy lucene index | CLUSTER:MANAGE:LUCENE |
| destroy region | DATA:MANAGE |
| execute function | Defaults to DATA:WRITE. Override Function.getRequiredPermissions to change the permission. |
| export cluster-configuration | CLUSTER:READ |
| export config | CLUSTER:READ |
| export data | CLUSTER:READ |
| export logs | CLUSTER:READ |
| export offline-disk-store | CLUSTER:READ |
| export stack-traces | CLUSTER:READ |
| gc | CLUSTER:MANAGE |
| get ‑key=key1 ‑region=region1 | DATA:READ:RegionName:Key |
| import data | DATA:WRITE:RegionName |
| import cluster-configuration | CLUSTER:MANAGE |
| list async-event-queues | CLUSTER:READ |
| list clients | CLUSTER:READ |
| list deployed | CLUSTER:READ |
| list disk-stores | CLUSTER:READ |
| list durable-cqs | CLUSTER:READ |
| list functions | CLUSTER:READ |
| list gateways | CLUSTER:READ |
| list indexes | CLUSTER:READ:QUERY |
| list lucene indexes | CLUSTER:READ:LUCENE |
| list members | CLUSTER:READ |
| list regions | CLUSTER:READ |
| load-balance gateway-sender | CLUSTER:MANAGE:GATEWAY |
| locate entry | DATA:READ:RegionName:Key |
| netstat | CLUSTER:READ |
| pause gateway-sender | CLUSTER:MANAGE:GATEWAY |
| put –key=key1 –region=region1 | DATA:WRITE:RegionName:Key |
| query | DATA:READ:RegionName |
| rebalance | DATA:MANAGE |
| remove | DATA:WRITE:RegionName or DATA:WRITE:RegionName:Key |
| resume gateway-sender | CLUSTER:MANAGE:GATEWAY |
| revoke mising-disk-store | CLUSTER:MANAGE:DISK |
| search lucene | DATA:READ:RegionName |
| show dead-locks | CLUSTER:READ |
| show log | CLUSTER:READ |
| show metrics | CLUSTER:READ |
| show missing-disk-stores | CLUSTER:READ |
| show subscription-queue-size | CLUSTER:READ |
| shutdown | CLUSTER:MANAGE |
| start gateway-receiver | CLUSTER:MANAGE:GATEWAY |
| start gateway-sender | CLUSTER:MANAGE:GATEWAY |
| start server | CLUSTER:MANAGE |
| status cluster-config-service | CLUSTER:READ |
| status gateway-receiver | CLUSTER:READ |
| status gateway-sender | CLUSTER:READ |
| status locator | CLUSTER:READ |
| status server | CLUSTER:READ |
| stop gateway-receiver | CLUSTER:MANAGE:GATEWAY |
| stop gateway-receiver | CLUSTER:MANAGE:GATEWAY |
| stop locator | CLUSTER:MANAGE |
| stop server | CLUSTER:MANAGE |
| undeploy | CLUSTER:MANAGE:DEPLOY |
The gfsh connect
does not have a permission,
as it is the operation that invokes authentication.
These gfsh
commands do not have permission defined,
as they do not interact with the distributed system:
-
gfsh describe connection
, which describes thegfsh
end of the connection -
gfsh debug
, which toggles the mode withingfsh
-
gfsh exit
-
gfsh help
-
gfsh hint
-
gfsh history
-
gfsh run
, although individual commands within the script will go through authorization -
gfsh set variable
-
gfsh sh
-
gfsh sleep
-
validate offline-disk-store
-
gfsh version
This table classifies the permissions assigned for JMX operations.
| JMX Operation | Assigned ResourcePermission |
|---|---|
| DistributedSystemMXBean.shutdownAllMembers | CLUSTER:MANAGE |
| ManagerMXBean.start | CLUSTER:MANAGE |
| ManagerMXBean.stop | CLUSTER:MANAGE |
| ManagerMXBean.createManager | CLUSTER:MANAGE |
| ManagerMXBean.shutDownMember | CLUSTER:MANAGE |
| Mbeans get attributes | CLUSTER:READ |
| MemberMXBean.showLog | CLUSTER:READ |
| DistributedSystemMXBean.changerAlertLevel | CLUSTER:WRITE |
| ManagerMXBean.setPulseURL | CLUSTER:WRITE |
| ManagerMXBean.setStatusMessage | CLUSTER:WRITE |
| CacheServerMXBean.closeAllContinuousQuery | CLUSTER:MANAGE:QUERY |
| CacheServerMXBean.closeContinuousQuery | CLUSTER:MANAGE:QUERY |
| CacheServerMXBean.executeContinuousQuery | DATA:READ |
| CqQuery.execute | DATA:READ:RegionName and CLUSTER:MANAGE:QUERY |
| CqQuery.executeWithInitialResults | DATA:READ:RegionName and CLUSTER:MANAGE:QUERY |
| DiskStoreMXBean.flush | CLUSTER:MANAGE:DISK |
| DiskStoreMXBean.forceCompaction | CLUSTER:MANAGE:DISK |
| DiskStoreMXBean.forceRoll | CLUSTER:MANAGE:DISK |
| DiskStoreMXBean.setDiskUsageCriticalPercentage | CLUSTER:MANAGE:DISK |
| DiskStoreMXBean.setDiskUsageWarningPercentage | CLUSTER:MANAGE:DISK |
| DistributedSystemMXBean.revokeMissingDiskStores | CLUSTER:MANAGE:DISK |
| DistributedSystemMXBean.setQueryCollectionsDepth | CLUSTER:MANAGE:QUERY |
| DistributedSystemMXBean.setQueryResultSetLimit | CLUSTER:MANAGE:QUERY |
| DistributedSystemMXBean.backupAllMembers | DATA:READ and CLUSTER:WRITE:DISK |
| DistributedSystemMXBean.queryData | DATA:READ |
| DistributedSystemMXBean.queryDataForCompressedResult | DATA:READ |
| GatewayReceiverMXBean.pause | CLUSTER:MANAGE:GATEWAY |
| GatewayReceiverMXBean.rebalance | CLUSTER:MANAGE:GATEWAY |
| GatewayReceiverMXBean.resume | CLUSTER:MANAGE:GATEWAY |
| GatewayReceiverMXBean.start | CLUSTER:MANAGE:GATEWAY |
| GatewayReceiverMXBean.stop | CLUSTER:MANAGE:GATEWAY |
| GatewaySenderMXBean.pause | CLUSTER:MANAGE:GATEWAY |
| GatewaySenderMXBean.rebalance | CLUSTER:MANAGE:GATEWAY |
| GatewaySenderMXBean.resume | CLUSTER:MANAGE:GATEWAY |
| GatewaySenderMXBean.start | CLUSTER:MANAGE:GATEWAY |
| GatewaySenderMXBean.stop | CLUSTER:MANAGE:GATEWAY |
| LockServiceMXBean.becomeLockGrantor | CLUSTER:MANAGE |
| MemberMXBean.compactAllDiskStores | CLUSTER:MANAGE:DISK |
Implement Authorization
Complete these items to implement authorization.
- Decide upon an authorization algorithm. The Authorization Example stores a mapping of which principals (users) are permitted to do which operations. The algorithm bases its decision on a look up of the permissions granted to the principal attempting the operation.
- Define the
security-manager
property. See Enable Security with Property Definitions for details about this property. - Implement the
authorize
method of theSecurityManager
interface. - Define any extra resources that the implemented authorization algorithm needs in order to make a decision.
Authorization of Function Execution
By default, a function executed on servers requires that the
entity invoking the function have DATA:WRITE
permission on the
region(s) involved.
Since the default permission may not be appropriate for all functions,
the permissions required may be altered.
To implement a different set of permissions,
override the Function.getRequiredPermissions()
method
in the function’s class.
The method should return a Collection
of the permissions
required of the entity that invokes an execution of the function.
Authorization of Methods Invoked from Queries
Enabling the SecurityManager
affects queries
by restricting the methods that a running query may invoke.
See Method Invocations for details.


{% extends 'base.html' %} {% block title %}All CodeCatz Members{% endblock %} {% block content%} {% load staticfiles %} Who is who? This page will show all our active members.
This page will show all our active members.


$def with (modify_type, modifiedModulesSummary, modifiedModulesMounting, modifiedModulesQuota, modifiedModulesDetails, targetModuleCode, targetModuleModifiedInfo) $var title:View Modified Modules $ home = ['/', 'Home'] $ modifiedModulePage = ['#', 'Modified Modules'] $ modifiedModuleLink = ['/modifiedModules', 'Modified Modules'] $if modify_type is not None: $if modify_type.lower() == "mounting": $ modifyType = ['#', 'Modified Mounting of ' + targetModuleCode] $var hierarchy = [home, modifiedModuleLink, modifyType] $elif modify_type.lower() == "quota": $ modifyType = ['#', 'Modified Quota of ' + targetModuleCode] $var hierarchy = [home, modifiedModuleLink, modifyType] $elif modify_type.lower() == "moduledetails": $ modifyType = ['#', 'Modified Module Details of ' + targetModuleCode] $var hierarchy = [home, modifiedModuleLink, modifyType] $else: $var hierarchy = [home, modifiedModulePage]
Shows all modules that have been modified
*Change in module mounting is always illustrated with respect to the module mounting in the current AY.
| Code | Name | Change in Mounting | Restore | |
|---|---|---|---|---|
| $moduleCode | $moduleName | $if mountingChange == 1:Unmounted → Mounted | $elif mountingChange == 0:Mounted → Unmounted | $if True:
*Change in module quota is always illustrated with respect to the module quota in the current AY.
| Code | Name | Old Quota | New Quota | Change in Quota | Restore | ||
|---|---|---|---|---|---|---|---|
| $moduleCode | $moduleName | $if currentQuota is None:? | $else:$currentQuota | $if targetQuota is None:? | $else:$targetQuota | $quotaChange | $if currentQuota == "Unmounted" or targetQuota == "Unmounted": $else: |
There are no changes to module details for this module.
Shows an overview of what changes were applied to a modified module.
| Code | Name | Is Mounting Modified? | Is Quota Modified? | Is Module Details Modified? |
|---|---|---|---|---|
| $moduleCode | $moduleName | $if isMountingModified is True: Yes $else: - | $if isQuotaModified is True: Yes $else: - | $if isDetailsModified is True: Yes $else: - |
*Change in module mounting is always illustrated with respect to the module mounting in the current AY.
| Code | Name | Change in Mounting | Restore | |
|---|---|---|---|---|
| $moduleCode | $moduleName | $if mountingChange == 1:Unmounted → Mounted | $elif mountingChange == 0:Mounted → Unmounted | $if True:
*Change in module quota is always illustrated with respect to the module quota in the current AY.
| Code | Name | Old Quota | New Quota | Change in Quota | Restore | ||
|---|---|---|---|---|---|---|---|
| $moduleCode | $moduleName | $if currentQuota is None:? | $else:$currentQuota | $if targetQuota is None:? | $else:$targetQuota | $quotaChange | $if currentQuota == "Unmounted" or targetQuota == "Unmounted": $else: |
Shows which details have been changed for a modified module.
| Code | Name | Change in Details | Restore |
|---|---|---|---|
| $moduleCode | $moduleName |
$if isNameModified is True:
$ originalName = module[0][1]
$ modifiedName = module[0][4]
Name Changed: From $originalName to $modifiedName
$if isDescModified is True: Description Changed: Click to show/hide $ originalDesc = module[0][2] $ modifiedDesc = module[0][5] $if isMcModified is True: $ originalMc = module[0][3] $ modifiedMc = module[0][6] MCs Changed: From $originalMc to $modifiedMc |
$if True:


2019 Financial Intelligence Unit National Risk Assessment
by New Zealand Police"Police publish 2019 Financial Intelligence Unit National Risk Assessment"
This week the New Zealand Police Financial Intelligence Unit (NZP FIU) published an updated assessment of the money laundering and terrorism financing risks New Zealand faces.
The Anti-Money-Laundering and Countering Financing of Terrorism (AML/CFT) Act 2009 envisages a cooperative relationship between the private sector and government agencies to prevent and disrupt illicit use of New Zealand’s financial system.
The National Risk Assessment 2019 along with Sector Risk Assessments published by the Reserve Bank, the Department of Internal Affairs and the Financial Market Authority, form a comprehensive package of public risk assessments.
NZP FIU Manager Detective Inspector Christiaan Barnard says:
“Understanding risk is essential to understanding where we deploy our compliance and investigative resources.
"The effective deployment of these resources denies criminals the use of the financial system while maintaining New Zealand’s excellent economic reputation.
“The risk assessment continues to highlight the areas of remittance and trust or company and service providers (TCSPs) as being high risk sectors for money laundering. The use of cash also remains central to much of the offending detected as it provides a way of anonymising the paper trail.
“The offences of drug dealing and fraud are the most common offences associated with money laundering and there is an emerging transnational element to these illicit businesses.
"New Zealand Police works closely with its international partners to stymie criminal attempts to use these networks.
“Terrorist financing remains low risk, but is a high priority for New Zealand Police due to the low probability but high impact nature of this type of offending.”
“Money remains a key driver of crime in New Zealand, which is reflected by New Zealand Police’s target of seizing $500 million in cash and assets from criminals by 2021.”
The National Risk Assessment full report can be found here.
ENDS


First, get all participants at your organization to write their letters. Make sure they add fun facts about themselves and festive decorations. We want the volunteers to be excited about receiving a letter.
Once you have collected all letters, organize them by tracking number. This will make the rest of the process easier.
Next, review each letter to make sure the gift request is reasonable. Please keep in mind the $40 limit. If the letter looks good, type it in the appropriate tracking form slot. Otherwise, start a "To Be Rewritten" pile. Sub-par letters will be returned and the participants may end up without a gift.
Finally, when all letters have been reviewed and entered, submit the tracking form online and mail the letters to the New York Cares office.


Trait backend\components\ClosureTableActiveRecordTrait
ClosureTableActiveRecordTrait class file.
Provides tree set functionality for an ActiveRecord.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| append() | Appends target to node as child. | backend\components\ClosureTableActiveRecordTrait |
| appendTo() | Appends node to target as child (Only for new records). | backend\components\ClosureTableActiveRecordTrait |
| deleteNode() | Deletes node and it's descendants. | backend\components\ClosureTableActiveRecordTrait |
| find() | backend\components\ClosureTableActiveRecordTrait | |
| isLeaf() | backend\components\ClosureTableActiveRecordTrait | |
| markAsRoot() | Insert closure table records | backend\components\ClosureTableActiveRecordTrait |
| moveTo() | Move node | backend\components\ClosureTableActiveRecordTrait |
| saveNodeAsRoot() | Save node and insert closure table records with transaction | backend\components\ClosureTableActiveRecordTrait |
Method Details
Appends target to node as child.
| boolean append( \yii\db\ActiveRecord $target ) | ||
| $target | \yii\db\ActiveRecord | The target. |
| return | boolean | Whether the appending succeeds. |
|---|
Appends node to target as child (Only for new records).
| \backend\components\number appendTo( $target, $node = null ) | ||
| $target | \yii\db\ActiveRecord|int|string | Where to append |
| $node | \yii\db\ActiveRecord|int|string | Node to append |
| return | \backend\components\number | Of rows inserted, on fail - 0 |
|---|
Deletes node and it's descendants.
| int deleteNode( $primaryKey = null ) | ||
| $primaryKey | ||
| return | int | Number of rows deleted |
|---|
| \backend\components\CommentQuery find( ) |
| bool isLeaf( $modelClass ) | ||
| $modelClass | \backend\components\type | |
| return | bool | Is a leaf node |
|---|
Insert closure table records
| int markAsRoot( $primaryKey ) | ||
| $primaryKey |
Move node
| void moveTo( $target, $node = null ) | ||
| $target | \yii\db\ActiveRecord|int|string | |
| $node | \yii\db\ActiveRecord|int|string | If null, $this primary key will be used |
| throws | \backend\components\CDbException|\backend\components\Exception |
|---|
Save node and insert closure table records with transaction
| boolean saveNodeAsRoot( $runValidation = true, $attributes = null ) | ||
| $runValidation | boolean | Whether to perform validation before saving the record. If the validation fails, the record will not be saved to database. |
| $attributes | array | List of attributes that need to be saved. Defaults to null, meaning all attributes that are loaded from DB will be saved. |
| return | boolean | Whether the saving succeeds |
|---|---|---|
| throws | \backend\components\CDbException|\backend\components\Exception |


---
layout: post
title: Installing Pharo in many flavors
categories:
- Pharo
- Software Engineering
tags:
- bash scripts
- dependency management
- deploy
- image releases
- Pharo
- software
- technology
summary: In the recent times, there appeared many many ways to leverage the installation and deploy of Pharo applications. These installation approaches enhance significantly the experience of using Pharo, by simplifying either dependency management with OS libraries, enabling to write deploy bash scripts or loading prebuilt images for any (and many) taste(s). You better know them!
status: publish
type: post
published: true
meta:
geo_public: '0'
_wpas_mess: ! 'Installing Pharo in many flavors @pharoproject #pharo #easy #cool'
_publicize_pending: '1'
_wpas_done_3194664: '1'
_publicize_done_external: a:1:{s:8:"facebook";a:1:{i:1479284455;b:1;}}
publicize_twitter_user: GuillePolito
_wpas_done_1260342: '1'
_wpas_done_1260340: '1'
_elasticsearch_indexed_on: '2013-07-23 08:57:13'
tagazine-media: a:7:{s:7:"primary";s:77:"http://playingwithobjects.files.wordpress.com/2013/07/launcher_screenshot.png";s:6:"images";a:1:{s:77:"http://playingwithobjects.files.wordpress.com/2013/07/launcher_screenshot.png";a:6:{s:8:"file_url";s:77:"http://playingwithobjects.files.wordpress.com/2013/07/launcher_screenshot.png";s:5:"width";i:910;s:6:"height";i:570;s:4:"type";s:5:"image";s:4:"area";i:518700;s:9:"file_path";b:0;}}s:6:"videos";a:0:{}s:11:"image_count";i:1;s:6:"author";s:8:"35633512";s:7:"blog_id";s:8:"36660125";s:9:"mod_stamp";s:19:"2013-07-23
08:58:49";}
_wpas_skip_3194664: '1'
_wpas_skip_1260342: '1'
_wpas_skip_1260340: '1'
---
Buon giorno!
In the recent times, there appeared many many ways to leverage the installation and deploy of Pharo applications. These installation approaches enhance significantly the experience of using Pharo, by simplifying either dependency management with OS libraries, enabling to write deploy bash scripts or loading prebuilt images for any (and many) taste(s).
However, if you are not in the Pharo mailing lists, you probably have not heard about many of these installation mechanisms, and therefore, you cannot enjoy them. So, let's summarize a bit some of these mechanisms, at least the ones I know. If you know some more, contact me so we can include it.
Manual download from the webpage
Downloading Pharo manually is the easiest but more primitive approach. Proceed to the download page [1] and download the flavor of Pharo you like the most. You will find in here the 1.3, 1.4 and 2.0 releases, plus the option to load the latest (still in development) version of Pharo 3.0.
Focusing on what is available for Pharo 2.0, you can either install
- under the category "Pharo Installers": a package specific for your operative system containing both virtual machine and the image with the runtime and development environment
- under the category "Custom Downloads": the possibility to download them by separate. This option is useful if you already have a virtual machine and only want a new image to play with.
[1] http://www.pharo-project.org/pharo-download
Manual download from the file server
In the Pharo file server[2] you will find available the virtual machine and image releases as well as other resources to download. You can use these urls to create your custom download scripts.
[2] http://files.pharo.org/
Virtual Machine PPA for Ubuntu linux
There is a PPA available for Ubuntu users (probably it works also for any distribution using apt-get package manager) which is in charge of downloading the virtual machine and its dependencies, simplifying its installation and deploy. We thank Damien Cassou for taking finally the initiative of creating the PPA!
[code language="bash"]
#install the PPA repository
sudo add-apt-repository ppa:pharo/stable
sudo apt-get update
#install pharo vm core
sudo apt-get install pharo-vm-core
#install pharo vm for desktop (with graphical dependencies)
sudo apt-get install pharo-vm-desktop
[/code]
ZeroConf scripts
The ZeroConf scripts[3] are already built bash scripts easing the download and installation of pharo. They are scripts served by get.pharo.org which can be parameterized for getting the pair vm/image you want.
Their usage, as written in the ZeroConf webpage can be resumed as
[code language="bash"]
curl url | bash
#or if curl is not available:
wget -O- url | bash
[/code]
where url is replaced by the formula vmVersion|imageVersion|vmVersion+imageVersion
For example, some valid usages of ZeroConf are
[code language="bash"]
#downloading latest 3.0
curl get.pharo.org/alpha | bash
#downloading stable 2.0 + vm
curl get.pharo.org/20+vm | bash
#downloading latest non stable vm
curl get.pharo.org/vmLatest | bash
[/code]
You can look for the valid values in the ZeroConf page [3]. These scripts are currently heavily used by the ci infrastructure of pharo. We thank Camillo Bruni for pushing this harder!
In fact, this is the way I download my own images right now, because the url is easy to memorize and using the terminal is pretty straightforward.
[3] http://get.pharo.org/
Pharo Launcher
The Pharo Launcher is an application to download and manage prebuilt and custom Pharo images. Below I paste the release notes from the first release:
"Erwan and I are proud to announce the first release of the Pharo
Launcher, a cross-platform application that
- lets you manage your Pharo images (launch, rename, copy and delete);
- lets you download image templates (i.e., zip archives) from many
different sources (Jenkins, files.pharo.org, and your local cache);
- lets you create new images from any template.
The idea behind the Pharo Launcher is that you should be able to
access it very rapidly from your OS application launcher. As a result,
launching any image is never more than 3 clicks away.
Download: https://ci.inria.fr/pharo-contribution/job/PharoLauncher/PHARO=30,VERSION=bleedingEdge,VM=vm/lastSuccessfulBuild/artifact/PharoLauncher.zip
Please report bugs on the 'Launcher' project at https://pharo.fogbugz.org
You can contribute to this project. All classes and most methods are
commented. There are unit tests. Please contribute!
Source code: http://www.smalltalkhub.com/#!/~Pharo/PharoLauncher
CI: https://ci.inria.fr/pharo-contribution/job/PharoLauncher
"
[caption id="attachment_254" align="alignright" width="625"] Pharo Launcher screenshot[/caption]
The Pharo launcher is an initiative of Erwan Douaille and Damien Cassou. And of course, you can contribute to it. In their release notes they added some points they would like to enhance in this project:
- check if a template is already downloaded before downloading it
- add a preference mechanism (for, e.g., quit after launch, definition of your own template groups, location of downloaded templates and images)
- put the launcher in the Pharo Ubuntu package so that the launcher becomes a registered application of the system (https://launchpad.net/~pharo/+archive/stable)
- make sure the pharo launcher does not load your personal scripts (like fonts and MC configuration)
- add a toolbar to enhance the discoverability of the features (currently everything is in contextual menus)
- make sure rename and copy actions propose default values
- make sure no debugger pops up when a user press cancels or enter an invalid name
- propose multiple kinds of sorting (last used, most frequently used, alphabetically on the name)
- give some information about each template (build date, pharo version)
Conclusion
Pharo is growing, and getting sexy. And now you have easy deploy, and it will get only easier in the future. What are you waiting?
[code language="bash"]
#Just do this!
curl get.pharo.org/20+vm | bash
./pharo-ui Pharo.image
[/code]


Once upon a time there lived a king who was deeply in love with a princess, but she could not marry anyone, because she was under an enchantment. So the King set out to seek a fairy, and asked what he could do to win the Princess’s love. The Fairy said to him:
“You know that the Princess has a great cat which she is very fond of. Whoever is clever enough to tread on that cat’s tail is the man she is destined to marry.”
The King said to himself that this would not be very difficult, and he left the Fairy, determined to grind the cat’s tail to powder rather than not tread on it at all.
You may imagine that it was not long before he went to see the Princess, and puss, as usual, marched in before him, arching his back. The King took a long step, and quite thought he had the tail under his foot, but the cat turned round so sharply that he only trod on air. And so it went on for eight days, till the King began to think that this fatal tail must be full of quicksilver—it was never still for a moment.
At last, however, he was lucky enough to come upon puss fast asleep and with his tail conveniently spread out. So the King, without losing a moment, set his foot upon it heavily.
With one terrific yell the cat sprang up and instantly changed into a tall man, who, fixing his angry eyes upon the King, said:
“You shall marry the Princess because you have been able to break the enchantment, but I will have my revenge. You shall have a son, who will never be happy until he finds out that his nose is too long, and if you ever tell anyone what I have just said to you, you shall vanish away instantly, and no one shall ever see you or hear of you again.”
Though the King was horribly afraid of the enchanter, he could not help laughing at this threat.
“If my son has such a long nose as that,” he said to himself, “he must always see it or feel it; at least, if he is not blind or without hands.”
But, as the enchanter had vanished, he did not waste any more time in thinking, but went to seek the Princess, who very soon consented to marry him. But after all, they had not been married very long when the King died, and the Queen had nothing left to care for but her little son, who was called Hyacinth.  The Queen was inconsolable when she saw this great nose, but her ladies assured her that it was not really as large as it looked; that it was a Roman nose, and you had only to open any history to see that every hero has a large nose. The Queen, who was devoted to her baby, was pleased with what they told her, and when she looked at Hyacinth again, his nose certainly did not seem to her quite so large.
The Prince was brought up with great care; and, as soon as he could speak, they told him all sorts of dreadful stories about people who had short noses. No one was allowed to come near him whose nose did not more or less resemble his own, and the courtiers, to get into favor with the Queen, took to pulling their babies’ noses several times every day to make them grow long. But, do what they would, they were nothing by comparison with the Prince’s.
When he grew sensible he learned history; and whenever any great prince or beautiful princess was spoken of, his teachers took care to tell him that they had long noses.
His room was hung with pictures, all of people with very large noses; and the Prince grew up so convinced that a long nose was a great beauty, that he would not on any account have had his own a single inch shorter!
When his twentieth birthday was passed the Queen thought it was time that he should be married, so she commanded that the portraits of several princesses should be brought for him to see, and among the others was a picture of the Dear Little Princess!
Now, she was the daughter of a great king, and would some day possess several kingdoms herself; but Prince Hyacinth had not a thought to spare for anything of that sort, he was so much struck with her beauty. The Princess, whom he thought quite charming, had, however, a little saucy nose, which, in her face, was the prettiest thing possible, but it was a cause of great embarrassment to the courtiers, who had got into such a habit of laughing at little noses that they sometimes found themselves laughing at hers before they had time to think; but this did not do at all before the Prince, who quite failed to see the joke, and actually banished two of his courtiers who had dared to mention disrespectfully the Dear Little Princess’s tiny nose!
The others, taking warning from this, learned to think twice before they spoke, and one even went so far as to tell the Prince that, though it was quite true that no man could be worth anything unless he had a long nose, still, a woman’s beauty was a different thing; and he knew a learned man who understood Greek and had read in some old manuscripts that the beautiful Cleopatra herself had a “tip-tilted” nose!
The Prince made him a splendid present as a reward for this good news, and at once sent ambassadors to ask the Dear Little Princess in marriage. The King, her father, gave his consent; and Prince Hyacinth, who, in his anxiety to see the Princess, had gone three leagues to meet her was just advancing to kiss her hand when, to the horror of all who stood by, the enchanter appeared as suddenly as a flash of lightning, and, snatching up the Dear Little Princess, whirled her away out of their sight!
The Prince was left quite unconsolable, and declared that nothing should induce him to go back to his kingdom until he had found her again, and refusing to allow any of his courtiers to follow him, he mounted his horse and rode sadly away, letting the animal choose his own path.
So it happened that he came presently to a great plain, across which he rode all day long without seeing a single house, and horse and rider were terribly hungry, when, as the night fell, the Prince caught sight of a light, which seemed to shine from a cavern.
He rode up to it, and saw a little old woman, who appeared to be at least a hundred years old.
She put on her spectacles to look at Prince Hyacinth, but it was quite a long time before she could fix them securely because her nose was so very short.
The Prince and the Fairy (for that was who she was) had no sooner looked at one another than they went into fits of laughter, and cried at the same moment, “Oh, what a funny nose!”
“Not so funny as your own,” said Prince Hyacinth to the Fairy; “but, madam, I beg you to leave the consideration of our noses—such as they are—and to be good enough to give me something to eat, for I am starving, and so is my poor horse.”
“With all my heart,” said the Fairy.  I loved your father as if he had been my brother. Now he had a very handsome nose!”
“And pray what does mine lack?” said the Prince.
“Oh! it doesn’t lack anything,” replied the Fairy. “On the contrary quite, there is only too much of it. But never mind, one may be a very worthy man though his nose is too long. I was telling you that I was your father’s friend; he often came to see me in the old times, and you must know that I was very pretty in those days; at least, he used to say so. I should like to tell you of a conversation we had the last time I ever saw him.”
“Indeed,” said the Prince, “when I have supped it will give me the greatest pleasure to hear it; but consider, madam, I beg of you, that I have had nothing to eat to-day.”
“The poor boy is right,” said the Fairy; “I was forgetting.  Too long a tongue is worse than too long a nose, and I remember when I was young that I was so much admired for not being a great chatterer. They used to tell the Queen, my mother, that it was so. For though you see what I am now, I was the daughter of a great king. My father——”
“Your father, I dare say, got something to eat when he was hungry!” interrupted the Prince.
“Oh! certainly,” answered the Fairy, “and you also shall have supper directly. I only just wanted to tell you——”
“But I really cannot listen to anything until I have had something to eat,” cried the Prince, who was getting quite angry; but then, remembering that he had better be polite as he much needed the Fairy’s help, he added:
“I know that in the pleasure of listening to you I should quite forget my own hunger; but my horse, who cannot hear you, must really be fed!”
The Fairy was very much flattered by this compliment, and said, calling to her servants:
“You shall not wait another minute, you are so polite, and in spite of the enormous size of your nose you are really very agreeable.”
“Plague take the old lady! How she does go on about my nose!” said the Prince to himself. “One would almost think that mine had taken all the extra length that hers lacks! If I were not so hungry I would soon have done with this chatterpie who thinks she talks very little!
Meanwhile the servants were putting the supper on the table, and the prince was much amused to hear the Fairy who asked them a thousand questions simply for the pleasure of hearing herself speak; especially he noticed one maid who, no matter what was being said, always contrived to praise her mistress’s wisdom.
“Well!” he thought, as he ate his supper, “I’m very glad I came here. This just shows me how sensible I have been in never listening to flatterers. People of that sort praise us to our faces without shame, and hide our faults or change them into virtues. For my part I never will be taken in by them. I know my own defects, I hope.”
Poor Prince Hyacinth! He really believed what he said, and hadn’t an idea that the people who had praised his nose were laughing at him, just as the Fairy’s maid was laughing at her; for the Prince had seen her laugh slyly when she could do so without the Fairy’s noticing her.
However, he said nothing, and presently, when his hunger began to be appeased, the Fairy said:
“My dear Prince, might I beg you to move a little more that way, for your nose casts such a shadow that I really cannot see what I have on my plate. Ah! thanks. Now let us speak of your father. When I went to his Court he was only a little boy, but that is forty years ago, and I have been in this desolate place ever since. Tell me what goes on nowadays; are the ladies as fond of amusement as ever? In my time one saw them at parties, theatres, balls, and promenades every day.  I cannot get used to it!”
“Really, madam,” said the Prince, “I wish you would leave off mentioning my nose. It cannot matter to you what it is like. I am quite satisfied with it, and have no wish to have it shorter. One must take what is given one.”
“Now you are angry with me, my poor Hyacinth,” said the Fairy, “and I assure you that I didn’t mean to vex you; on the contrary, I wished to do you a service. However, though I really cannot help your nose being a shock to me, I will try not to say anything about it. I will even try to think that you have an ordinary nose. To tell the truth, it would make three reasonable ones.”
The Prince, who was no longer hungry, grew so impatient at the Fairy’s continual remarks about his nose that at last he threw himself upon his horse and rode hastily away. But wherever he came in his journeyings he thought the people were mad, for they all talked of his nose, and yet he could not bring himself to admit that it was too long, he had been so used all his life to hear it called handsome.
The old Fairy, who wished to make him happy, at last hit upon a plan. She shut the Dear Little Princess up in a palace of crystal, and put this palace down where the Prince would not fail to find it. His joy at seeing the Princess again was extreme, and he set to work with all his might to try to break her prison; but in spite of all his efforts he failed utterly. In despair he thought at least that he would try to get near enough to speak to the Dear Little Princess, who, on her part, stretched out her hand that he might kiss it; but turn which way he might, he never could raise it to his lips, for his long nose always prevented it. For the first time he realized how long it really was, and exclaimed:
“Well, it must be admitted that my nose is too long!”
In an instant the crystal prison flew into a thousand splinters, and the old Fairy, taking the Dear Little Princess by the hand, said to the Prince:
“Now, say if you are not very much obliged to me. Much good it was for me to talk to you about your nose! You would never have found out how extraordinary it was if it hadn’t hindered you from doing what you wanted to. You see how self-love keeps us from knowing our own defects of mind and body. Our reason tries in vain to show them to us; we refuse to see them till we find them in the way of our interests.”
Prince Hyacinth, whose nose was now just like anyone’s else, did not fail to profit by the lesson he had received. He married the Dear Little Princess, and they lived happily ever after.(1)
(1) Le Prince Desir et la Princesse Mignonne. Par Madame Leprince de Beaumont.


We have sent you an email with a link to change your password.
We didn't recognize that password reset code. Enter your email address to get a new one.
{* #forgotPasswordForm *} {* forgotPassword_emailAddress *} {* forgotPassword_sendButton *} {* /forgotPasswordForm *}We've sent an email with instructions to create a new password. Your existing password has not been changed.
CloseWe have sent you a verification email. Please check your email and click on the link to activate your site profile.
If you do not receive the verification message within a few minutes of signing up, please check your Spam or Junk folder.
CloseWe look forward to seeing you frequently. Visit us and sign in to update your profile, receive the latest news and keep up to date with mobile alerts.
Click here to return to the page you were visiting.
Don't worry, it happens. We'll send you a link to create a new password.
{* #forgotPasswordForm *} {* forgotPassword_emailAddress *} {* forgotPassword_sendButton *} {* /forgotPasswordForm *}Click submit to receive another verification email
{* #resendVerificationForm *} {* traditionalSignIn_emailAddress *}Check your email for a verification link
You're now logged in.
Please confirm the information below before signing in.


Runs a shell command of your choice to install the tool. Ubuntu example,
assuming the Jenkins user is in /etc/sudoers
:
sudo apt-get --yes install openjdk-6-jdk
(In this case specify e.g. /usr/lib/jvm/java-6-openjdk-i386
as the home directory.)
As another example, to install an older version of Sun JDK 6 for (x86) Linux, you can use the obsolete DLJ:
bin=jdk-6u13-dlj-linux-i586.bin if [ \! -f $bin ] then wget --no-verbose http://download.java.net/dlj/binaries/$bin sh $bin --unpack --accept-license fi
(In this case specify jdk1.6.0_13
as the home directory.)


Hi there! This is Parth Parikh (પાર્થ પરીખ).
I am currently a student at North Carolina State University (Masters in Computer Science).
I am primarily interested in Computational Linguistics and Data Structures. Every day I wake up hoping to explore new topics and thoughts!
When in the mood for fun, I do the usual read-binge-listen. I am a movie buff, mainly interested in crime, thrillers, and sci-fi genres. I even enjoy watching sitcoms. I habitually follow Formula-1, Chess, and Cricket. I am also a numismatist and web link collector.
The site logo is that of a Pilcrow. It is widely used as a paragraph mark or separator. While the reasons for choosing this logo were its public domain status and a strong correlation with my initials, Wikipedia states The pilcrow was a type of rubrication used in the Middle Ages to mark a new train of thought, which is neat.
Contact:


Digital infrastructure for evidence-informed policy
We identify important and neglected areas of public health policy in low- and middle-income countries. Then we decide on strategies to help change take place.
Microexperiments in public health advocacy
We build coalitions and use a broad repertoire of online advocacy tools to save lives and improve health outcomes in low- and middle-income countries.


{% extends "base.html" %} {% block topbar %}
{% endblock %} {% block hero_content %} {% endblock %} {% block content %}{{ _("If you are developer and can access and process json, xml or yaml, this is for you.") }}
TobaccoFree {{ _("provides RESTful API for third party tools and services.") }} {{ _("Try it out. Let us know what you use it for and if it works well for you.") }}
{{ _("YAML, JSON and XML serializers are available.") }} {{ _("For example") }} {{ _("to use YAML attach '?format=yaml' to your URL request.") }} {{ _("Similarily for json and xml") }}.
{{ _("The resources schema for") }} API version 1 {{ _("is available at the following URL:") }}
http://tobaccofree.nzdis.org/api/v1/?format=json
{{_("To get the list of all observations")}} {{_("use")}}:
http://tobaccofree.nzdis.org/api/v1/observation/?format=json{{_("To get a single record of a given observation")}} {{_("use")}}:
http://tobaccofree.nzdis.org/api/v1/observation/observation_ID/?format=json
{{ _("Observation fields") }}:
{{ _("You can use one of many available filters in the URL")}}. {{ _("For example, to filter data for a given country, or city")}}.
{{ _("Available text filters:")}}
{{ _("Available number filters:")}}


Computes the elementwise value of a polynomial.
tf.compat.v1.math.polyval
tf.compat.v2.math.polyval
tf.math.polyval( coeffs, x, name=None )
If x
is a tensor and coeffs
is a list n + 1 tensors, this function returns
the value of the n-th order polynomial
p(x) = coeffs[n-1] + coeffs[n-2] * x + ... + coeffs[0] * x**(n-1)
evaluated using Horner's method, i.e.
p(x) = coeffs[n-1] + x * (coeffs[n-2] + ... + x * (coeffs[1] + x * coeffs[0]))
coeffs
: A list of Tensor
representing the coefficients of the polynomial.x
: A Tensor
representing the variable of the polynomial.name
: A name for the operation (optional).A tensor
of the shape as the expression p(x) with usual broadcasting rules
for element-wise addition and multiplication applied.
Equivalent to numpy.polyval.


Steem Developer Portal
JS: Reblogging Post
By the end of this tutorial you should know how to reblog (resteem) a blog from steem
Full, runnable src of Reblogging Post can be downloaded as part of the JS tutorials repository.
This tutorial will show the method of obtaining the relevant inputs for the reblog process followed by broadcasting the info to the steem blockchain using a demo
account on the production server
.
Intro
We are using the client.broadcast
function provided by dsteem
to reblog the selected blogpost. There are 4 variables that are required to perform this action:
- The account name that is doing the reblog
- The private posting key of the account that is doing the reblog (this is not your main key)
- The author of the post that is being reblogged
- The title of the post that is being reblogged
A simple HTML interface is used to capture the required information after which the transaction is submitted. There are two prerequisites within the reblog process in Steem that have to be adhered to, namely, the post must not be older than 7 days, and the post can only be reblogged once by a specific account. The fields have been populated with information to give an example of what it would look like but care has to be taken to provide correct details before the function is executed.
This tutorial makes use of the This function is taken from the tutorial Blog Feed to get a list of trending posts.
Steps
- Configure connection Configuration of
dsteem
to use the proper connection and network. - Collecting information Generating relevant posting information with an HTML interface.
- Broadcasting the reblog Assigning variables and executing the reblog.
1. Configure connection**
Below we have dsteem
pointing to the production network with the proper chainId, addressPrefix, and endpoint. Although this tutorial is interactive, we will not post to the testnet due to the prerequisites of reblogging.
There is a public/app.js
file which holds the Javascript segment of this tutorial. In the first few lines we define the configured library and packages:
const dsteem = require('dsteem');
//define network parameters
let opts = {};
opts.addressPrefix = 'STM';
opts.chainId =
'0000000000000000000000000000000000000000000000000000000000000000';
//connect to a Steem node. This is currently setup on production, but we recommend using a testnet like https://testnet.steem.vc
const client = new dsteem.Client('https://api.steemit.com', opts);
2. Collecting information
Next we have the submitPost
function that collects the required fields for the reblog process via an HTML interface
after wich we assign them to variables for use later.
//this function will execute when the HTML form is submitted
window.submitPost = async () => {
//get private key
const privateKey = dsteem.PrivateKey.fromString(
document.getElementById('postingKey').value
);
//get account name
const myAccount = document.getElementById('username').value;
//get blog author
const theAuthor = document.getElementById('theAuthor').value;
//get blog permLink
const thePermLink = document.getElementById('thePermLink').value;
3. Broadcasting the reblog
Finally we create two variables to simply the client.broadcast
function line and broadcast the reblog instruction.
const jsonOp = JSON.stringify([
'reblog',
{
account: myAccount,
author: theAuthor,
permlink: thePermLink,
},
]);
const data = {
id: 'follow',
json: jsonOp,
required_auths: [],
required_posting_auths: [myAccount],
};
client.broadcast.json(data, privateKey).then(
function(result) {
console.log('client broadcast result: ', result);
},
function(error) {
console.error(error);
}
);
There are also two console
functions an a ui output under Resteem Results defined in order to track if the reblog
as successful or not. If the broadcast succeeds the console.log
will show the following:
client broadcast result:
{
id: "f10d69ac521cf34b0f5d18d938e68c89e77bb31d",
block_num: 22886453,
trx_num: 35,
expired: false
}
This indicates the block number at which the broadcast was sent as well as the transaction ID for the reblog.
If the reblog fails the console.log
will present a long line of error code:
{
name: "RPCError",
jse_shortmsg: "blog_itr == blog_comment_idx.end(): Account has already reblogged this post",
jse_info: {
ode: 10,
name: "assert_exception",
message: "Assert Exception",
stack: Array(6)
},
message: "blog_itr == blog_comment_idx.end(): Account has already reblogged this post",
stack: "RPCError: blog_itr == blog_comment_idx.end(): Acco…lled (http://localhost:3000/bundle.js:440:690874)"
}
There is a line in the error log indicating “Account has already reblogged this post” indicating exactly that. This process can be run until a positive result is found.
It should be noted that reblogging a post does not create a new post on the blockchain but merely shares the post to whomever is following the user doing the reblog. Along with reblogging
the custom_json
broadcast operation also includes options for following users and editing blog content. More information on how to use the broadcast
operation and options surrounding the operation can be found on the Steem Devportal
To run this tutorial
- clone this repo
cd tutorials/14_reblogging_post
npm i
npm run dev-server
ornpm run start
- After a few moments, the server should be running at http://localhost:3000/


The following table describes the SubscriptionTransportMedium
enumeration members:
| Member | Value | Description |
|---|---|---|
| LocalFile | 0 | The subscription's data comes from disk (0) |
| RemoteFile | 1 | The subscription's data is downloaded from a remote source (1) |
| Rest | 2 | The subscription's data comes from a rest call that is polled and returns a single line/data point of information (2) |
| Streaming | 3 | The subscription's data is streamed (3) |


God_Friended_Me
God Friended Me is described as a humorous, uplifting series, which explores questions of faith, existence, and science.  Unwittingly, he becomes an agent of change in the lives and destinies of others around him.


Block selection of anything than page and note content
Select or Drop the file with your ebook reader notes
(tested with: KindlePaperwhite2, Tolino Shine 2.
project on github
)


For Hire
Troy Gottier
I am a
.
Download my resume
What I do
Download my resume
Where I have been
Download my resume


Computer Science Student at National University of Singapore.
Previously at 99.co, SEA and Google.
I like solving interesting problems and working on products that make the world a better place.
I write code, read, and try to store information in my head. Occasionally I write.
I have a resume.
You may reach me at seanngpengnam@gmail.com