To help you remember what is stored in star_wars_matrix
, you would like to add the names of the movies for the rows. Not only does this help you to read the data, but it is also useful to select certain elements from the matrix.
Similar to vectors, you can add names for the rows and the columns of a matrix
rownames(my_matrix) <- row_names_vector
colnames(my_matrix) <- col_names_vector
We went ahead and prepared two vectors for you: region
, and titles
. You will need these vectors to name the columns and rows of star_wars_matrix
, respectively.
colnames()
to name the columns of star_wars_matrix
with the region
vector.rownames()
to name the rows of star_wars_matrix
with the titles
vector.star_wars_matrix
to see the result of your work.
# Box office Star Wars (in millions!)
new_hope <- c(460.998, 314.4)
empire_strikes <- c(290.475, 247.900)
return_jedi <- c(309.306, 165.8)
# Construct matrix
star_wars_matrix <- matrix(c(new_hope, empire_strikes, return_jedi), nrow = 3, byrow = TRUE)
# Vectors region and titles, used for naming
region <- c("US", "non-US")
titles <- c("A New Hope", "The Empire Strikes Back", "Return of the Jedi")
# Name the columns with region
# Name the rows with titles
# Print out star_wars_matrix
# Box office Star Wars (in millions!)
new_hope <- c(460.998, 314.4)
empire_strikes <- c(290.475, 247.900)
return_jedi <- c(309.306, 165.8)
# Construct matrix
star_wars_matrix <- matrix(c(new_hope, empire_strikes, return_jedi), nrow = 3, byrow = TRUE)
# Vectors region and titles, used for naming
region <- c("US", "non-US")
titles <- c("A New Hope", "The Empire Strikes Back", "Return of the Jedi")
# Name the columns with region
colnames(star_wars_matrix) <- region
# Name the rows with titles
rownames(star_wars_matrix) <- titles
# Print out star_wars_matrix
star_wars_matrix
msg <- "Do not change anything about the box office variables `new_hope`, `empire_strikes` and `return_jedi`!"
test_object("new_hope", undefined_msg = msg, incorrect_msg = msg)
test_object("empire_strikes", undefined_msg = msg, incorrect_msg = msg)
test_object("return_jedi", undefined_msg = msg, incorrect_msg = msg)
msg <- "Don't change the contents of `star_wars_matrix`; only the names of the rows and columns!"
test_object("star_wars_matrix", incorrect_msg = msg)
msg <- "Don't change anything about the `region` and `titles` vectors that have been defined for you."
test_object("region", undefined_msg = msg, incorrect_msg = msg)
test_object("titles", undefined_msg = msg, incorrect_msg = msg)
test_object("star_wars_matrix", eq_condition = "equal",
incorrect_msg = "Did you set the row and column names of `star_wars_matrix` correctly? Use `colnames(star_wars_matrix) <- region` for the column names; do a similar thing to name the rows.")
test_output_contains("star_wars_matrix", incorrect_msg = "Don't forget to print out `star_wars_matrix` after you've named the rows and columns.")
success_msg("Great! You're on the way of becoming an R jedi! Continue to the next exercise.")
You can use colnames(star_wars_matrix) <- region
to name the columns of star_wars_matrix
. Do a similar thing to name the rows.


If you provide a passphrase when creating a secret, the data will be encrypted with AES-256 in CBC mode in your browser prior to being sent to the server. This is the most secure mode, as the server will never see the passphrase.
Author: Mark Steele<EMAIL_ADDRESS>The code for Self-destruct-o can be found here
Blog post about Self-destruct-o


{% load humanize %} {% load custom_tags %}
relevance * max(1, log(doc.var[2]))(sorts documents considering the textual relevance of the document times the natural logarithm of the third var in the document, or 1 if it's lower)
miles(query.var[0], query.var[1], doc.var[0], doc.var[1])(sorts documents considering the distance between doc and a point passed in the query)
Current status: Enabled - [Disable now] Disabled - [Enable now]


--- layout: barebones ---
MultiTech designs, develops and manufactures communications equipment for the industrial Internet of Things – connecting physical assets to business processes to deliver enhanced value. Their commitment to quality and service excellence means you can count on MultiTech products and people to address your needs, while their history of innovation ensures you can stay ahead of the latest technology with a partner who will be there for the life of a solution.
For more information about Multitech, read their brochure.
The MultiConnect Conduit provides as standard on AEP models the Node-RED graphical, drag-and-drop interface. This offers IT professionals, integrators and developers the capability to utilize the distributed intelligence capabilities of the Conduit to provide analytics on incoming data and create more actionable outgoing data quickly and easily, without needing to be an experienced programmer.
Applications can be simply created and deployed by the click of a button based upon Node-RED's visual development tool. It provides an intuitive graphical programming tool ideal for rapid prototyping, designed for IT professionals to optimize and scale the edge behavior of their IoT network.
MultiTech employed the Node-RED visual development tool and targeted it for use in an industrial IoT environment. The interface makes it easy to wire together flows using the wide range of nodes in the palette. Flows are then immediately pushed by a click of a single button to deployed hardware.
The Node-RED development environment is available across our broad range of MultiConnect® Conduit™ programmable IoT gateways, featuring 4G-LTE, Wi-Fi, Bluetooth/BLE, GNSS, Serial, GPIO, LoRaWAN and more connectivity. Its graphical, easy to use, drag and drop interface opens up programming the Conduit to any user.
MultiTech developed custom nodes to suit the connectivity and software feature sets of the Conduit Industrial IoT gateway platform. A great example of this innovation is a built-in LoRaWAN network Server ideal for private network deployments, where through the MultiTech LoRaWAN Node, a user can gain access to sensor or devices and their data from within the Conduit gateway, thereby enabling Intelligence at the Edge to take advantage of low latency, reduced Operating costs of data backhaul and continue to perform Complex Event Processing and decision making even if internet backhaul connectivity to an IoT cloud Platform is intermittent or unavailable.
DeviceHQ is MultiTech’s Device Management Platform and Application Store for things that is able to activate, provision and remotely manage MultiTech communication assets including Conduit IoT gateways deployed in the field. Node-RED flows can be stored in the DeviceHQ App Store and deployed upon demand to a single or a group Conduit IoT gateways. Thereby, providing IT and developers alike the ability to debug and upgrade flows quickly without costly truck rolls. All this made possible in a simple Node-RED flow on a Conduit gateway!


We exchange dogs!
- empower scalable solutions
- grow granular e-markets
- aggregate integrated functionalities
- architect innovative experiences
- exploit one-to-one metrics
- facilitate dynamic portals
- matrix seamless initiatives
- architect killer channels
- transition bricks-and-clicks paradigms
- transition compelling portals
- disintermediate ubiquitous web-readiness


| paint {ouch} | R Documentation |
Function to paint selective regimes on a phylogenetic tree.
paint(tree, subtree, branch, which = 1)
tree |
An object of class |
subtree |
An optional named vector specifying the root nodes of subtrees. Each branch that descends from this node will be painted with the specified regime. |
branch |
An optional named vector specifying the end nodes of branches. The unique branch that terminates at the named node will be painted with the specified regime. |
which |
integer;
if |
The names of subtree
and branch
must be the names of nodes of tree
.
The painting proceeds in a particular order:
one can overpaint a branch.
The subtrees indicated by the elements of subtree
are painted first, in order.
Then the branches indicated by branch
are painted.
If tree
is of class hansentree
, then paint
begins with the regimes specified in the regimes
slot of tree
.
Otherwise, paint
begins with a blank canvas,
i.e., a tree painted with the single regime "nonspec".
Note that, if tree
is a multivariate hansentree
, then there are multiple regime specifications contained in tree
.
In this case, the argument which
lets you pick which one you wish to begin with;
by default, the first is used.
A vector of class 'factor' with names corresponding to the nodes in tree
, specifying selective regimes.
Aaron A. King
Other methods for ouch trees:
as_data_frame
,
bootstrap()
,
coef()
,
logLik
,
ouch-package
,
plot()
,
print()
,
simulate()
,
summary()
,
update()
Other phylogenetic comparative models:
brown()
,
hansen()
,
ouch-package
,
ouchtree
x <- with(
bimac,
ouchtree(nodes=node,times=time/max(time),ancestors=ancestor,labels=species)
)
r <- paint(x,subtree=c("1"="medium","9"="large","2"="small"),
branch=c("38"="large","2"="medium"))
plot(x,regimes=r,node.names=TRUE)
## compare to bimac['OU.LP']
h5 <- hansen(data=log(bimac['size']),tree=x,regimes=bimac['OU.LP'],
sqrt.alpha=1,sigma=1,reltol=1e-5)
r <- paint(h5,branch=c("18"="large"),subtree=c("9"="small"))
plot(x,regimes=r,node.names=TRUE)


referenced
by Christina Chortaria at 2022-11-02 12:43:08.merged
by Christina Chortaria at 2022-11-02 12:43:08.closed
by Christina Chortaria at 2022-11-02 12:43:08.head_ref_deleted
by Christina Chortaria at 2022-11-02 12:43:09.closed
by None at 2022-11-02 12:45:20.closed
by None at 2022-11-02 12:45:39.assigned
by None at 2022-11-02 18:51:29.We also tested with @acozine @kayiwa @leefaisonr upgrading bibdata-qa to ruby 3.1.
@sandbergja can you please rereview?
mentioned
by Francis Kayiwa at 2022-11-02 17:00:58.subscribed
by Francis Kayiwa at 2022-11-02 17:00:58.mentioned
by Alicia Cozine at 2022-11-02 17:00:59.subscribed
by Alicia Cozine at 2022-11-02 17:00:59.mentioned
by Robert-Anthony Lee-Faison at 2022-11-02 17:00:59.subscribed
by Robert-Anthony Lee-Faison at 2022-11-02 17:00:59.head_ref_force_pushed
by Christina Chortaria at 2022-11-02 18:03:49.ready_for_review
by Christina Chortaria at 2022-11-02 18:05:37.head_ref_force_pushed
by Christina Chortaria at 2022-11-02 18:20:50.mentioned
by Jane Sandberg at 2022-11-02 18:21:52.subscribed
by Jane Sandberg at 2022-11-02 18:21:52.review_requested
by Christina Chortaria at 2022-11-02 18:22:03.deployed
by None at 2022-11-02 18:31:11.2019 student thesis Items have had their authorizations confirmed as properly set.
The remaining Items identified for update have had the authorizations corrected.
closed
by James R. Griffin III at 2022-11-02 13:57:53.unlabeled
by James R. Griffin III at 2022-11-02 17:06:25.closed
by James R. Griffin III at 2022-11-02 17:06:32.Elements has been migrated to a hosted solution.
closed
by James R. Griffin III at 2022-11-02 17:08:50.This list has been transferred to CaMS team for further data loading.
closed
by Kate Lynch at 2022-11-02 17:36:00.referenced
by None at 2022-11-02 13:25:46.merged
by None at 2022-11-02 13:25:46.closed
by None at 2022-11-02 13:25:46.head_ref_deleted
by None at 2022-11-02 13:25:47.closed
by None at 2022-11-02 13:25:47.After talking with @hackartisan, we came up with the wireframe below for what the bulk edit form UI should look like to allow setting and removing an embargo date.
mentioned
by None at 2022-11-02 19:11:02.subscribed
by None at 2022-11-02 19:11:02.@hackartisan Ill let @roelmoon know. Muhanad's backup should still have them.
Roel checked, they are bad tifs on the backup as well. just wrote to Anna and Thomas and Roel is going to recall box 16 to reshoot what is needed. Anna will be there for handoff on Friday, 11/4/2022
Fixed! @roelmoon is a wizard. Closing ticket.
labeled
by None at 2022-11-02 13:51:00.labeled
by None at 2022-11-02 13:51:00.mentioned
by None at 2022-11-02 19:58:30.subscribed
by None at 2022-11-02 19:58:30.mentioned
by Roel Munoz at 2022-11-02 19:58:30.subscribed
by Roel Munoz at 2022-11-02 19:58:30.closed
by Kim Leaman at 2022-11-02 21:20:25.mentioned
by Roel Munoz at 2022-11-02 21:20:25.subscribed
by Roel Munoz at 2022-11-02 21:20:25.assigned
by Trey Pendragon at 2022-11-02 23:37:31.mentioned
by None at 2022-11-03 00:26:46.subscribed
by None at 2022-11-03 00:26:46.head_ref_force_pushed
by Trey Pendragon at 2022-11-03 00:32:17.These steps got apache using php 8.1 - a2enmod php8.1 - a2dismod php7.4 - restart apache
Then, @christinach and @kevinreiss and I did these steps to get the necessary php modules: - apt-get install -y php8.1-mysql php8.1-mbstring php8.1-gd # we can hopefully get this included in the playbook. - restart apache
ready_for_review
by Jane Sandberg at 2022-11-02 20:35:51.mentioned
by Christina Chortaria at 2022-11-02 20:38:21.subscribed
by Christina Chortaria at 2022-11-02 20:38:21.mentioned
by Kevin Reiss at 2022-11-02 20:38:21.subscribed
by Kevin Reiss at 2022-11-02 20:38:21.referenced
by Jane Sandberg at 2022-11-02 17:57:44.merged
by Jane Sandberg at 2022-11-02 17:57:44.closed
by Jane Sandberg at 2022-11-02 17:57:44.head_ref_deleted
by Jane Sandberg at 2022-11-02 17:57:45.referenced
by James R. Griffin III at 2022-11-02 19:17:46.assigned
by Max Kadel at 2022-11-02 12:51:15.head_ref_force_pushed
by None at 2022-11-02 14:20:32.head_ref_force_pushed
by None at 2022-11-02 14:38:40.deployed
by None at 2022-11-02 14:45:04.closed
by None at 2022-11-02 14:52:46.Nice refactor
labeled
by Kevin Reiss at 2022-11-02 18:04:33.labeled
by Chun Ly at 2022-11-02 15:15:08.assigned
by Chun Ly at 2022-11-02 15:15:08.labeled
by Chun Ly at 2022-11-02 16:29:11.labeled
by Chun Ly at 2022-11-02 16:29:11.assigned
by Chun Ly at 2022-11-02 16:29:11.Added last acceptance criteria, plus one more, to a different ticket: https://github.com/pulibrary/pdc_describe/issues/591
closed
by Bess Sadler at 2022-11-02 13:26:41.closed
by Hector Correa at 2022-11-02 14:02:33.referenced
by Hector Correa at 2022-11-02 14:02:31.merged
by Hector Correa at 2022-11-02 14:02:31.closed
by Hector Correa at 2022-11-02 14:02:32.head_ref_deleted
by Hector Correa at 2022-11-02 14:02:33.Test failure may just be a sporadic timeout: ``` 1) View status of data in S3 when a dataset has a DOI and its data is in S3 when item is approved when user is a curator shows data from S3 Failure/Error: example.run
Net::OpenTimeout:
execution expired
rerunning.
review_requested
by Chuck McCallum at 2022-11-02 13:20:51.review_dismissed
by None at 2022-11-02 14:13:50.referenced
by None at 2022-11-02 14:30:38.merged
by None at 2022-11-02 14:30:38.closed
by None at 2022-11-02 14:30:38.head_ref_deleted
by None at 2022-11-02 14:30:39.ready_for_review
by Chuck McCallum at 2022-11-02 16:08:02.assigned
by James R. Griffin III at 2022-11-02 16:46:26.ready_for_review
by Chuck McCallum at 2022-11-02 16:29:55.referenced
by Hector Correa at 2022-11-02 16:58:49.merged
by Hector Correa at 2022-11-02 16:58:50.closed
by Hector Correa at 2022-11-02 16:58:50.head_ref_deleted
by Hector Correa at 2022-11-02 16:58:50.ready_for_review
by Chuck McCallum at 2022-11-02 14:57:20.referenced
by Hector Correa at 2022-11-02 17:07:55.merged
by Hector Correa at 2022-11-02 17:07:55.closed
by Hector Correa at 2022-11-02 17:07:55.head_ref_deleted
by Hector Correa at 2022-11-02 17:07:56.closed
by Hector Correa at 2022-11-02 17:07:56.closed
by Bess Sadler at 2022-11-02 17:27:39.labeled
by James R. Griffin III at 2022-11-02 14:23:29.head_ref_force_pushed
by James R. Griffin III at 2022-11-02 14:25:15.unlabeled
by James R. Griffin III at 2022-11-02 14:25:30.referenced
by James R. Griffin III at 2022-11-02 17:35:53.merged
by James R. Griffin III at 2022-11-02 17:35:53.closed
by James R. Griffin III at 2022-11-02 17:35:53.head_ref_deleted
by James R. Griffin III at 2022-11-02 17:35:54.refs #409
assigned
by Tyler Wade at 2022-11-02 17:09:08.@mccalluc You are correct that the purpose of this PR is not to test software functionality exactly. It is instead to validate that our re-description process is correct (i.e., "Has Tyler received enough training in DataCite from the RDOS team that he can re-describe these records the way they would?") and also to validate that our metadata mapping process is correct (i.e., "Given the form we've created, do we produce a complete and correct DataCite record, as judged by our subject matter experts in RDOS?")
The epic is here: https://github.com/pulibrary/pdc_describe/issues/229
Once the data migration process is complete we probably won't keep all of these migration specs.
mentioned
by Chuck McCallum at 2022-11-02 12:24:42.subscribed
by Chuck McCallum at 2022-11-02 12:24:42.deployed
by None at 2022-11-02 14:10:34.referenced
by None at 2022-11-02 14:25:00.merged
by None at 2022-11-02 14:25:00.closed
by None at 2022-11-02 14:25:00.head_ref_deleted
by None at 2022-11-02 14:25:01.referenced
by Max Kadel at 2022-11-02 18:23:27.merged
by Max Kadel at 2022-11-02 18:23:27.closed
by Max Kadel at 2022-11-02 18:23:27.head_ref_deleted
by Max Kadel at 2022-11-02 18:23:28.rebase this when #3414 is merged
Today when I re ran the playbook I noticed that even though we specify bundler version 2.3.24 , it installed 2.3.25 which was released today Nov 2nd. It didn't create any problem when I deployed the app.
Closing for now. We may revisit in future.
closed
by Alicia Cozine at 2022-11-02 19:32:59.head_ref_deleted
by Alicia Cozine at 2022-11-02 19:34:07.I meant to add this comment in this pr https://github.com/pulibrary/princeton_ansible/pull/3373#issuecomment-1301065281
The ruby_s role does not reliably install the specified version of bundler
, we're not sure why.
This won't pass CI until the changes in #3414 are merged and this PR is rebased.
@kayiwa @christinach I think these lines can just be updated to reference {{ phpversion }}, rather than hard-coded php7.4: https://github.com/pulibrary/princetonansible/blob/main/roles/drupal/tasks/main.yml#L7-L10
That will also bring in the php8.1-xml
package, which is needed for the special_collections site.
mentioned
by Francis Kayiwa at 2022-11-02 21:49:37.subscribed
by Francis Kayiwa at 2022-11-02 21:49:37.mentioned
by Christina Chortaria at 2022-11-02 21:49:37.subscribed
by Christina Chortaria at 2022-11-02 21:49:37.closed
by Jane Sandberg at 2022-11-02 17:57:45.ready_for_review
by James R. Griffin III at 2022-11-02 19:19:01.assigned
by James R. Griffin III at 2022-11-02 19:19:12.referenced
by James R. Griffin III at 2022-11-02 20:09:16.merged
by James R. Griffin III at 2022-11-02 20:09:16.closed
by James R. Griffin III at 2022-11-02 20:09:16.head_ref_deleted
by James R. Griffin III at 2022-11-02 20:09:17.labeled
by None at 2022-11-02 20:09:58.labeled
by None at 2022-11-02 20:10:06.labeled
by None at 2022-11-02 20:10:24.Thanks for the feedback @acozine; I made some improvements to transitions between sections.
Thanks to everyone who has reviewed!!
renamed
by None at 2022-11-02 13:33:26.mentioned
by Alicia Cozine at 2022-11-02 17:29:58.subscribed
by Alicia Cozine at 2022-11-02 17:29:58.closed
by Kate Lynch at 2022-11-02 17:02:58.renamed
by Kate Lynch at 2022-11-02 17:49:23.renamed
by None at 2022-11-02 18:48:36.This seems to require VPN. And I got an unsafe warning on my browser
Also I had to double click on the icons on the side for them to open
For context, this is the error. I'd prefer to hold off on this until the error can be resolved. I'll ask on slack if there's someone we can reach out to...
Warning: Potential Security Risk Ahead
Firefox detected an issue and did not continue to arca.rc.princeton.edu. The website is either misconfigured or your computer clock is set to the wrong time.
It’s likely the website’s certificate is expired, which prevents Firefox from connecting securely. If you visit this site, attackers could try to steal information like your passwords, emails, or credit card details.
What can you do about it?
The issue is most likely with the website, and there is nothing you can do to resolve it. You can notify the website’s administrator about the problem.
I was able to login without VPN, but I think for uploading files you need to be on the VPN (?)
I was able to "create an asset", it's under collection "samples3/net/hector-test-three" but it has no content.
Eventually I was able to add content (a file) by dragging and dropping a file (thanks @kelynch) -- this feature is rather finicky, sometimes it works, other times it does not. I think you need to NOT have the DTI thingy running for the feature to work but I am not 100% sure about this.
mentioned
by Kate Lynch at 2022-11-02 21:16:51.subscribed
by Kate Lynch at 2022-11-02 21:16:51.


Hurry up
Your score
Ranking
Letter typing game
Welcome to letter typing game.
Game purpose is to type the most amount of words in 10 seconds.
You can start whenever you are ready.
Welcome to letter typing game.
Game purpose is to type the most amount of words in 10 seconds.
You can start whenever you are ready.


--- layout: post title: Leopard print nail art & Avon simply pretty glitter gold tags: - Avon - Nail Art status: publish type: post published: true meta: _edit_last: '2' _graphene_slider_img: global _graphene_slider_imgurl: '' _graphene_show_addthis: global _aioseop_keywords: Leopard print nail art & Avon simply pretty glitter gold _aioseop_title: Leopard print nail art & Avon simply pretty glitter gold al2fb_facebook_image_id: '1749' al2fb_facebook_link_id: '218440691518395_305265412835922' al2fb_facebook_link_time: '2011-11-15T13:06:32+00:00' al2fb_facebook_link_picture: meta=http://missenchanted.com/wp-content/uploads/2011/11/IMG_2342-150x150.jpg _yoast_wpseo_linkdex: '0' _thumbnail_id: '1746' --- Leopard print nail art is a classic design which most of us would have given a try. I tried it last week, but when print was done on all the nails, they looked a bit overdone and would definitely attract attention at my work place. So here is my subdue version of the print.
Just a finger on one hand made the look more subtle. Avon glitter gold is a lovely color, I mostly use it for weddings and festivals :)
Hope you liked it ?


User Input and Variables in C, an Emacspeak Tutorial
How do you interact with a user in C?
Check out my emacspeak tutorial on how to get user input of numbers (like ages) and strings (like names and addresses).
-
YouTube video: User Input and Variables in C
-
Resources: User Input and Variables in C zip
-
Other Emacspeak C tutorials Emacspeak Tutorials List


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DestinationDataProvider
The JCo framework defines the DestinationDataProvider interface to retrieve the destination configuration that must be implemented by infrastructure components. At runtime JCo will use the provided implementation to get the destination configuration that is stored and managed elsewhere and not by the application using the JCo (separation of concerns). For example, if the destination configuration is stored on an LDAP server the instance method getProperties of the interface DestinationDataProvider needs to get the relevant configuration data from the LDAP server.
Applications using these destinations (JCoDestination), i.e. want to execute function modules existing in an ABAP system, can rely on the fact that these data is managed elsewhere and retrieve the data. It is not the responsibility of the business application logic to manage the destination parameters. A business application should only use destinations that encapsulate these parameters.
Example CustomDestinationDataProvider
demonstrates a simple
implementation of this interface and how to register the instance implementing
this interface at JCo runtime.
Note:
JCoDestinationManager
, the data will be
updated. Please see the DestinationDataEventListener
interface in order
to find out more about the reaction of the JCo runtime to destination data events.
In most scenarios the destination configuration will consists of the properties of the following groups
The configuration data is divided to into the following groups:
| destination authentication information | |
| jco.destination.auth_type | authentication type - configured user or current user |
| user logon properties | |
| jco.client.client | SAP client |
| jco.client.user | Logon user |
| jco.client.alias_user | Logon user alias |
| jco.client.passwd | Logon password |
| jco.client.lang | Logon language |
| jco.client.mysapsso2 | SAP Cookie Version 2 as logon ticket |
| jco.client.x509cert | X.509 certificate as logon ticket |
| jco.client.extid_data | External identification user logon data |
| jco.client.extid_type | Type of the external identification user logon data |
| connection configuration | |
| jco.client.type | Connection type (optional) |
| jco.client.ashost | SAP application server host |
| jco.client.sysnr | SAP system number |
| jco.client.mshost | SAP message server host |
| jco.client.msserv | SAP message server service or port number (optional) |
| jco.client.r3name | System ID of the SAP system, the so-called SID |
| jco.client.group | Logon group name of SAP application servers (optional, default is PUBLIC) |
| jco.client.tphost | Host on which to start an external RFC server executable program |
| jco.client.tpname | Registered RFC server program ID / External RFC server executable program name |
| jco.client.gwhost | SAP gateway host |
| jco.client.gwserv | SAP gateway service or port number |
| jco.client.saprouter | SAP router string to use for networks being protected by a firewall |
| trace configuration | |
| jco.client.trace | Enable/disable RFC trace (0 or 1) |
| jco.client.cpic_trace | Enable/disable CPIC trace (-1 [take over environment value <CPIC_TRACE>], 0 no trace, 1,2,3 different trace levels) |
| special parameters | |
| jco.client.lcheck | Enable/disable logon check at open time (1 - enable [default] or 0 - disable) |
| jco.client.use_sapgui | Start a SAP GUI and associate with the connection (0 - do not start [default], 1 - start GUI, 2 - start GUI and hide if not used) |
| jco.client.codepage | Initial logon codepage in SAP notation |
| jco.client.pcs | Initial logon codepage type (1 - non-unicode or 2 - unicode enabled, optional) |
| jco.client.delta | Enable/disable table parameter delta management (1 - enable [default] or 0 - disable) |
| jco.client.getsso2 | Get/don't get an SSO ticket after logon (1 or 0) |
| jco.client.deny_initial_password | deny usage of initial passwords (0 [default] or 1) |
| destination pool configuration | |
| jco.destination.peak_limit | Maximum number of active connections that can be created for a destination simultaneously |
| jco.destination.pool_capacity | Maximum number of idle connections kept open by the destination. A value of 0 has the effect that there is no connection pooling, i.e. connections will be closed after each request. |
| jco.destination.expiration_time | Time in ms after that the connections hold by the internal pool can be closed |
| jco.destination.expiration_check_period | Interval in ms with which the timeout checker thread checks the connections in the pool for expiration |
| jco.destination.max_get_client_time | Max time in ms to wait for a connection, if the max allowed number of connections is allocated by the application |
| SNC configuration | |
| jco.client.snc_mode | Secure Network Communications (SNC) mode; 1: on, 0: off (default) |
| jco.client.snc_partnername | SNC name of the communication partner server. For example: p:CN=SID, O=ACompany, C=EN |
| jco.client.snc_qop | SNC quality of protection; valid values: 1, 2, 3, 8 (default), 9 |
| jco.client.snc_myname | Own SNC name of the caller (optional). Overrides the default SNC name. For example: p:CN=MyUserID, O=ACompany, C=EN |
| jco.client.snc_lib | Full path to the library which provides the SNC service; default: value from JCo middleware property jco.middleware.snc_lib |
| jco.client.snc_sso | Turn on/off the SSO mechanism of SNC. If set to 0 use alternative credentials like user/password instead. Valid values are 1 (yes, default) and 0 (no). |
| repository configuration | |
| jco.destination.repository_destination | Specifies which destination should be used for repository queries. |
| jco.destination.repository.user | Optional: If repository destination is not set, and this property is set, it will be used as user for repository queries. This allows using a different user for repository lookups and restrict the permissions accordingly. |
| jco.destination.repository.passwd | The password for a repository user. Mandatory, if a repository user should be used. |
| jco.destination.repository.snc_mode | Optional: If SNC is used for this destination, it is possible to turn it off for repository connections, if this property is set to 0. Defaults to the value of jco.client.snc_mode |
| jco.destination.one_roundtrip_repository | 1 forces the usage of RFC_METADATA_GET in ABAP System, 0 deactivates it.
If the property is not set, the destination will initially do a remote call to check whether RFC_METADATA_GET is available.
In case it is available, it will use it. |
| Field Summary | |
|---|---|
static java.lang.String |
JCO_ALIAS_USER
Logon user alias, can be used instead of logon user. |
static java.lang.String |
JCO_ASHOST
SAP ABAP application server host, mandatory for a direct application server instance connection. |
static java.lang.String |
JCO_AUTH_TYPE
Authentication type used by the destination. |
static java.lang.String |
JCO_AUTH_TYPE_CONFIGURED_USER
Value to use for the property JCO_AUTH_TYPE. |
static java.lang.String |
JCO_AUTH_TYPE_CURRENT_USER
Value to use for the property JCO_AUTH_TYPE. |
static java.lang.String |
JCO_CLIENT
SAP client, mandatory logon parameter. |
static java.lang.String |
JCO_CODEPAGE
Additional logon parameter to define the codepage that will be used to convert the logon parameters. |
static java.lang.String |
JCO_CPIC_TRACE
Enable/disable CPIC trace [0..3]. |
static java.lang.String |
JCO_DELTA
Use the table delta management for reducing the amount of data being sent via the network, especially if dealing with big RFC table parameters. |
static java.lang.String |
JCO_DENY_INITIAL_PASSWORD
If set to 1, using initial passwords will lead to an exception (default=0). |
static java.lang.String |
JCO_DEST
For internal purposes only. |
static java.lang.String |
JCO_EXPIRATION_PERIOD
Period in ms after that the destination checks the released connections for expiration. |
static java.lang.String |
JCO_EXPIRATION_TIME
Time in ms after that a free connections hold internally by the destination can be closed. |
static java.lang.String |
JCO_EXTID_DATA
External identification user logon data. |
static java.lang.String |
JCO_EXTID_TYPE
Type of the external identification user logon data. |
static java.lang.String |
JCO_GETSSO2
Order a SSO ticket after logon, the obtained ticket is available in the destination attributes. |
static java.lang.String |
JCO_GROUP
Logon group of the logon load balanced connections, which is identifying a set of SAP application servers (optional, default is PUBLIC) |
static java.lang.String |
JCO_GWHOST
SAP gateway host to use for the connection. |
static java.lang.String |
JCO_GWSERV
SAP gateway service or port number, should be specified when using JCO_GWHOST. |
static java.lang.String |
JCO_LANG
Logon language, if not defined the default user language is used. |
static java.lang.String |
JCO_LCHECK
Postpone the authentication until the first call. |
static java.lang.String |
JCO_MAX_GET_TIME
Max time in ms to wait for a connection, if the max allowed number of connections is allocated by the application. |
static java.lang.String |
JCO_MSHOST
SAP message server host, mandatory property for a logon load balanced connection. |
static java.lang.String |
JCO_MSSERV
SAP message server service name or port number. |
static java.lang.String |
JCO_MYSAPSSO2
SAP Cookie Version 2 as logon ticket for SSO based authentication. |
static java.lang.String |
JCO_PASSWD
Logon password, logon parameter for password based authentication. |
static java.lang.String |
JCO_PCS
Additional logon parameter to define the codepage type of the SAP System, 1 - non-unicode, 2 - unicode enabled. |
static java.lang.String |
JCO_PEAK_LIMIT
Maximum number of active connections that can be created for a destination simultaneously. |
static java.lang.String |
JCO_POOL_CAPACITY
Maximum number of idle connections kept open by the destination. |
static java.lang.String |
JCO_R3NAME
System ID of the SAP system, the so-called SID. |
static java.lang.String |
JCO_REPOSITORY_DEST
Specifies which destination should be used as repository, i.e. |
static java.lang.String |
JCO_REPOSITORY_PASSWD
The password for a repository user. |
static java.lang.String |
JCO_REPOSITORY_ROUNDTRIP_OPTIMIZATION
Enable the usage of RFC_METADATA_GET API, which is providing
repository data in one single roundtrip. |
static java.lang.String |
JCO_REPOSITORY_SNC
Optional: If SNC is used for this destination, it is possible to turn it off for repository connections, if this property is set to 0. |
static java.lang.String |
JCO_REPOSITORY_USER
If repository destination is not set, and this property is set, it will be used as user for repository calls. |
static java.lang.String |
JCO_SAPROUTER
SAP Router string for connection to systems behind a SAP Router. |
static java.lang.String |
JCO_SNC_LIBRARY
Path to library which provides SNC service. |
static java.lang.String |
JCO_SNC_MODE
Secure Network Communications (SNC) mode. |
static java.lang.String |
JCO_SNC_MYNAME
Own SNC name of the caller. |
static java.lang.String |
JCO_SNC_PARTNERNAME
SNC name of the communication partner server. |
static java.lang.String |
JCO_SNC_QOP
SNC quality of protection. Valid values: 1: Authentication only 2: Authentication and integrity protection 3: Authentication, integrity and privacy protection (encryption) 8: Global default configuration (usually: 3) 9: Maximum protection |
static java.lang.String |
JCO_SNC_SSO
When connecting via SNC, the SNC identity is typically used for authenticating the caller. |
static java.lang.String |
JCO_SYSNR
System number of the SAP ABAP application server, mandatory for a direct application server instance connection. |
static java.lang.String |
JCO_TPHOST
Host on which to start an external RFC server executable program. |
static java.lang.String |
JCO_TPNAME
Registered RFC server program ID or - if used in combination with JCO_TPHOST -
the external RFC server executable program name to start (incl. |
static java.lang.String |
JCO_TRACE
RFC trace flag. |
static java.lang.String |
JCO_TYPE
The connection type. |
static java.lang.String |
JCO_USE_SAPGUI
Use a visible, hidden, or do not use SAP GUI. |
static java.lang.String |
JCO_USER
Logon user, logon parameter for password based authentication. |
static java.lang.String |
JCO_USER_ID
Deprecated. Will be removed in future versions without further notice. As of JCo 3.0.10 this property has become obsolete and is no longer needed. |
static java.lang.String |
JCO_X509CERT
X509 certificate for certificate based authentication. |
| Method Summary | |
|---|---|
java.util.Properties |
getDestinationProperties(java.lang.String destinationName)
This method shall return a properties object that contains a subset of the supported properties mentioned above which represent the configuration of the given destination in your destination configuration repository. |
void |
setDestinationDataEventListener(DestinationDataEventListener eventListener)
This method sets a DestinationDataEventListener implemented by JCo that
processes the fired events within the JCo runtime. |
boolean |
supportsEvents()
Returns true if the implementation can support DestinationDataEvents that allow a better integration into the JCo runtime management. |
| Field Detail |
|---|
static final java.lang.String JCO_AUTH_TYPE
static final java.lang.String JCO_AUTH_TYPE_CONFIGURED_USER
static final java.lang.String JCO_AUTH_TYPE_CURRENT_USER
static final java.lang.String JCO_USER_ID
static final java.lang.String JCO_CLIENT
static final java.lang.String JCO_USER
static final java.lang.String JCO_ALIAS_USER
static final java.lang.String JCO_PASSWD
static final java.lang.String JCO_LANG
static final java.lang.String JCO_CODEPAGE
static final java.lang.String JCO_PCS
static final java.lang.String JCO_ASHOST
static final java.lang.String JCO_SYSNR
static final java.lang.String JCO_MSHOST
static final java.lang.String JCO_MSSERV
sapms<SID>
a lookup in etc/services
is performed by the network layer of the operating system. If using port numbers instead
of symbolic service names, no lookups are performed and no additional entries are needed.
static final java.lang.String JCO_R3NAME
sapms<SID>
will be automatically
set as service name, which needs to be resolved by the network layer of the
operating system.
static final java.lang.String JCO_GROUP
static final java.lang.String JCO_SAPROUTER
(/H/<host>[/S/<port>])+
static final java.lang.String JCO_MYSAPSSO2
static final java.lang.String JCO_GETSSO2
static final java.lang.String JCO_X509CERT
static final java.lang.String JCO_EXTID_DATA
JCO_EXTID_TYPE
. Its format depends on the external ID type.
The mapping to the actual logon user has to be defined in the AS ABAP
system table VUSREXTID.
static final java.lang.String JCO_EXTID_TYPE
JCO_EXTID_DATA
. Possible values are for example "NT"
for an NT Domain User (NTLM), "MP" for a Microsoft .NET Passport UID
(PUID), "ID" for ID data from a trusted RFC system, or "DN" for a
Distinguished Name (DN) of a Certificate (X.500).
static final java.lang.String JCO_LCHECK
static final java.lang.String JCO_DELTA
'jco.delta_management'
RFC protocol feature is not generally turned off. Use in special cases only.
 If using port numbers
instead of symbolic service names, no lookups are performed and no
additional entries are needed.
static final java.lang.String JCO_TPHOST
static final java.lang.String JCO_TPNAME
JCO_TPHOST
-
the external RFC server executable program name to start (incl. path).
static final java.lang.String JCO_TYPE
3
- ABAP system with unspecified logon method A
- ABAP system with direct application server host logon B
- ABAP system with message server driven load balanced logon E
- External RFC server program R
- Registered RFC server program
static final java.lang.String JCO_USE_SAPGUI
static final java.lang.String JCO_DENY_INITIAL_PASSWORD
static final java.lang.String JCO_REPOSITORY_ROUNDTRIP_OPTIMIZATION
RFC_METADATA_GET
API, which is providing
repository data in one single roundtrip.
1 forces the usage of RFC_METADATA_GET
in ABAP System, 0
deactivates it. If the property is not set, the destination will
initially do a remote call to check whether RFC_METADATA_GET
is available. In case it is available, it will use it.
Note: If the repository is already initializated, for example because it is used by some other destination, this property does not have any effect. Generally, this property is related to the ABAP System, and should have the same value on all destinations pointing to the same ABAP System. See note 1456826 for SAP AS ABAP system prerequisites.
| Method Detail |
|---|
java.util.Properties getDestinationProperties(java.lang.String destinationName) throws DataProviderException
null
means that the destination is not
available. In this case a JCoException with the key JCO_ERROR_RESOURCE
will be thrown.
The implementation may throw a DataProviderException
in order to signal
an internal error like a severe technical issue that prevent returning
the requested properties data. As a consequence the method
JCoDestinationManager.getDestination()
will then throw a JCoException
with an appropriate key to the JCo application.
Note: Missing user data or user credentials in the destination
configuration shall not be regarded as a configuration error and must not
result in throwing a DataProviderException
because this data may also be
set later programmatically by using a JCoCustomDestination
.
destinationName
- the name of the destination for which the provider should
return the properties
null
if the destination
configuration was not found
DataProviderException
- if an internal error occurred or a severe
configuration error was detected.boolean supportsEvents()
false
. If you're not
sure about the ability that your DestinationDataProvider
can
guarantee to fire all events you may return false
to be on the safe side.
If the implementation can support DestinationDataEvents, JCo runtime will set
a DestinationDataEventListener
that is implemented by JCo.
setDestinationDataEventListener(DestinationDataEventListener)
void setDestinationDataEventListener(DestinationDataEventListener eventListener)
DestinationDataEventListener
implemented by JCo that
processes the fired events within the JCo runtime.
DestinationDataEventListener
instance.
eventListener
- the DestinationDataEventListener
to which configuration
events need to be fired
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


| Name | Description |
|---|---|
| Bike.Http.Methods.GET |
Type: Bike.Number
Number constant for a GET method. |
| Bike.Http.Methods.POST |
Type: Bike.Number
Number constant for a POST method. |
| Bike.Http.Methods.HEAD |
Type: Bike.Number
Number constant for a HEAD method. |
| Bike.Http.Methods.PUT |
Type: Bike.Number
Number constant for a PUT method. |
| Bike.Http.Methods.DELETE |
Type: Bike.Number
Number constant for a DELETE method. |
| Name | Description |
|---|---|
| Bike.Http.Methods.has( method_int_value ) |
Checks whether a given number value is valid constant of Bike.Http.Methods or not.
Parameters method_int_value Type: Bike.Number Number value to check. Return Value Type: Bike.Boolean True of the given number is valid constant. Otherwise, False. |
| Bike.Http.Methods.text( int_value ) |
Returns appropriate http verb.
Parameters int_value Type: Bike.Number Constant of Bike.Http.Methods. Return Value Type: Bike.String The http verb appropriates to given constant. E.g. 'GET' for Bike.Http.Methods.GET. |
| Bike.Http.Methods.parse( method_text ) |
Converts a http verb into a constant of Bike.Http.Methods.
Parameters method_text Type: Bike.String A http verb. Return Value Type: Bike.Number A Bike.Http.Methods constant appropriates to given http verb. E.g. Bike.Http.Methods.GET for 'GET'. |
| Name | Description |
|---|---|
| Bike.Http.Request.initialize( uri, http_method ) |
Initializes this object.
Parameters uri Type: Bike.String A string representation for uri of request. http_method Type: Bike.Number One of the constants in Bike.Http.Methods. |
| Bike.Http.Request.uri() |
Returns the uri of request.
Return Value Type: Bike.Uri The uri of request. |
| Bike.Http.Request.http_method() |
Returns the HTTP method of this request.
Return Value Type: Bike.Number The HTTP method of this request. |
| Bike.Http.Request.headers() |
Returns request headers.
Return Value Type: Bike.Http.Headers The request headers. |
| Bike.Http.Request.uri() |
Returns uri-encoded string representation of form data for request set in Bike.Http.Request.set_form_data().
Return Value Type: Bike.String The uri-encoded string representation of form data, e.x: param1=value1¶m2=value2. |
| Bike.Http.Request.set_form_data( form_hash ) |
Sets the form data for the request to submit to server.
Parameters form_hash Type: Bike.Object A form data object. This object must contains text values. |
| Bike.Http.Request.send() |
Sends the request to server and return the response object.
Return Value Type: Bike.Http.Response The response of request. |
| Bike.Http.Request.get( uri, response_callback, query_parameters ) |
Makes a GET request to server and receives response text body.
Parameters uri Type: Bike.String The uri of the request. response_callback Type: Bike.Function A func( Bike.Http.Response ) callback. query_parameters Type: Bike.Object A hash for request parameters. |
| Bike.Http.Request.post( uri, response_callback, form_parameters ) |
Makes a POST request to server and receives response text body.
Parameters uri Type: Bike.String The uri of the request. response_callback Type: Bike.Function A func( Bike.Http.Response ) callback. form_parameters Type: Bike.Object A hash for form parameters of POST method. |
| Bike.Http.Request.download( file_uri , download_dir , overwrite , file_name_to_save ) |
A handy way to download a file with a GET HTTP request.
Parameters file_uri Type: Bike.String The uri of the file to download. download_dir Type: Bike.String The location to store the downloaded file. overwrite Type: Bike.Boolean Indicates whether the downloaded file is saved if there is a file with the same name in download_dir. False if not specified. file_name_to_save Type: Bike.String The downloaded file will be saved with file name indicated by this parameter. If not specified, the name is the same with the file uri. |
| Name | Description |
|---|---|
| Bike.Http.Response.initialize( uri, method, headers, code, response_data_memory_stream ) |
Initializes this object.
Parameters uri Type: Bike.String The uri of the original request. method Type: Bike.Number One of the constants Bike.Http.Methods. headers Type: Bike.Object A hash of HTTP response headers. code Type: Bike.Number HTTP code in response. response_data_memory_stream Type: System.IO.MemoryStream Raw data of response body. |
| Bike.Http.Response.headers() |
Returns the read-only header collection of the response.
Return Value Type: Bike.Http.Headers The read-only header collection. |
| Bike.Http.Response.code() |
Returns the http status code of response.
Return Value Type: Bike.Number The http status code of response, e.g. 200. |
| Bike.Http.Response.body() |
Returns the body of response ( not include the header ) as text.
Return Value Type: Bike.String The body of response ( not include the header ) as text. |
| Bike.Http.Response.save_body_to_file( path, override ) |
Saves the body of response to file as binary.
Parameters path Type: Bike.String Path to new file to save. overwrite Type: Bike.Boolean Indicate whether to overwrite the file if it exists. Default is False. |
| Bike.Http.Response.http_method() |
Returns the constant of Bike.Http.Methods.
Return Value Type: Bike.Number The constant of Bike.Http.Methods. |
| Bike.Http.Response.uri() |
Returns the uri of original request.
Return Value Type: Bike.Uri The uri of original request. |
| Name | Description |
|---|---|
| Bike.Http.Get.initialize( uri ) |
Initializes this object.
Parameters uri Type: Bike.String A string presentation for uri of request. |
| Name | Description |
|---|---|
| Bike.Http.Post.initialize( uri ) |
Initializes this object.
Parameters uri Type: Bike.String A string presentation for uri of request. |
| Name | Description |
|---|---|
| Bike.Http.Headers.initialize( headers_hash, is_readonly ) |
Initializes this object.
Parameters headers_hash Type: Bike.Object The hash for initial headers. is_readonly Type: Bike.Boolean Indicate whether the header collection can be modified. |
| Bike.Http.Headers.add( header, value ) |
Adds a new http header.
Parameters header Type: Bike.String The header name. value Type: Bike.String The header value. Return Value Type: Bike.Http.Headers The object itself. |
| Bike.Http.Headers.remove( header ) |
Removes a http header.
Parameters header Type: Bike.String The header name. Return Value Type: Bike.Http.Headers The object itself. |
| Bike.Http.Headers.get( header ) |
Retrieves a http header value from given name.
Parameters header Type: Bike.String The header name. Return Value Type: Bike.String The string value of header. If the name doesn't exist, return null. |
| Bike.Http.Headers.all_headers() |
Gets header names.
Return Value Type: Bike.Array A string array of header names. |
| Bike.Http.Headers.has( header ) |
Checks whether a header name exist or not.
Parameters header Type: Bike.String The header name. Return Value Type: Bike.Boolean True if it exists. Otherwise, False. |
| Bike.Http.Headers.count() |
Returns the current amount of headers which has been added.
Return Value Type: Bike.Number Number of headers. |
| Bike.Http.Headers.clear() |
Removes all headers.
|


|
Neural Network (Deep Learning)
Mini-project 1
|
Encapsulates objective functinos. More...
#include "Objective.h"
Public Member Functions | |
| void | initialise (ParamsInit parameters) |
| void | initialiseWeightsFromCenter (ParamsInit parameters) |
| double | leastSquaresError (double target, double predicted) |
| double | leastSquaresDer (double target, double predicted) |
| double | lOneNormError (double target, double predicted) |
| double | lOneNormDer (double target, double predicted) |
| double | huberLossError (double target, double predicted) |
| double | huberLossDer (double target, double predicted) |
| double | qMeasureError (double target, double predicted) |
| double | meanVarCovarQmeasure (vector< double > target, vector< double > predicted, vector< double > mask) |
| double | objective (int stage, double target, double predicted) |
| double | objective (int stage, int position, double target, double predicted) |
| double | getLSError (double target, double predicted, int position) |
Private Types | |
| enum | ObjectiveName { leastSquares, huberLoss, lOneNorm, qMeasure } |
| The enum to hold objective functions. More... | |
Private Attributes | |
| ObjectiveName | m_objective |
| The name of the objective function (one of 4 in the enum) More... | |
| double | m_huberDelta |
| The delta in the huber delta objective function. More... | |
| double | m_sumMask |
| Number of non-zero elements in the mask. More... | |
| double | m_meanTarget |
| Mean of the target values in the patch. More... | |
| double | m_meanPredicted |
| Mean of the predicted values in the patch. More... | |
| double | m_varianceTarget |
| Variance target. More... | |
| double | m_variancePredicted |
| Predicted variance. More... | |
| double | m_meanDevTarget |
| Average standard deviation target. More... | |
| double | m_meanDevPredicted |
| Average standard deviation predicted. More... | |
| double | m_covariance |
| Covariance in the target and predicted values. More... | |
| vector< float > | m_distFromCenter |
| The vector to hold distances of the values from the center. More... | |
Encapsulates objective functinos.
Definition at line 23 of file Objective.h.
|
private |
The enum to hold objective functions.
| Enumerator | |
|---|---|
| leastSquares | |
| huberLoss | |
| lOneNorm | |
| qMeasure |
Definition at line 29 of file Objective.h.
| double Objective::getLSError | ( | double | target, |
| double | predicted, | ||
| int | position | ||
| ) |
A function used to give a scaled value for the Squared Error depending on the distance from the center of the patch
| position | in the neural network output layer (used to calculate the distance from the patch) |
| target | - a target value |
| predicted | - a predicted value |
Definition at line 133 of file objective.cpp.
| double Objective::huberLossDer | ( | double | target, |
| double | predicted | ||
| ) |
A function to get the derivative for huber loss
| target | - a target value |
| predicted | - a predicted value |
Definition at line 169 of file objective.cpp.
| double Objective::huberLossError | ( | double | target, |
| double | predicted | ||
| ) |
A function to get the huber loss error
| target | - a target value |
| predicted | - a predicted value |
Definition at line 158 of file objective.cpp.
| void Objective::initialise | ( | ParamsInit | parameters | ) |
A function to initialise
| parameters | - stores values from the config file |
Definition at line 3 of file objective.cpp.
| void Objective::initialiseWeightsFromCenter | ( | ParamsInit | parameters | ) |
A function to initialise m_distFromCenter
| parameters | - stores values from the config file |
Definition at line 15 of file objective.cpp.
| double Objective::leastSquaresDer | ( | double | target, |
| double | predicted | ||
| ) |
A function to get the derivative of the Squared Error
| target | - a target value |
| predicted | - a predicted value |
Definition at line 143 of file objective.cpp.
| double Objective::leastSquaresError | ( | double | target, |
| double | predicted | ||
| ) |
A function to get the Squared Error
| target | - a target value |
| predicted | - a predicted value |
Definition at line 139 of file objective.cpp.
| double Objective::lOneNormDer | ( | double | target, |
| double | predicted | ||
| ) |
A function to get the derivative of the L1 norm
| target | - a target value |
| predicted | - a predicted value |
Definition at line 151 of file objective.cpp.
| double Objective::lOneNormError | ( | double | target, |
| double | predicted | ||
| ) |
A function to get the error of the L1 norm
| target | - a target value |
| predicted | - a predicted value |
Definition at line 147 of file objective.cpp.
| double Objective::meanVarCovarQmeasure | ( | vector< double > | target, |
| vector< double > | predicted, | ||
| vector< double > | mask | ||
| ) |
A function to calculate parameters for the SSIM error
| target | - a target patch |
| predicted | - a predicted patch |
| mask | - mask |
Definition at line 178 of file objective.cpp.
| double Objective::objective | ( | int | stage, |
| double | target, | ||
| double | predicted | ||
| ) |
A function returning the value of the chosen objective function or its derivative
| stage | - 0 for feedforward, 1 for backpropagate |
| target | - a target value |
| predicted | - a predicted value |
Definition at line 96 of file objective.cpp.
| double Objective::objective | ( | int | stage, |
| int | position, | ||
| double | target, | ||
| double | predicted | ||
| ) |
A function returning the value of the chosen objective function or its derivative
| stage | - 0 for feedforward, 1 for backpropagate |
| position | in the neural network output layer (used to calculate the distance from the patch) |
| target | - a target value |
| predicted | - a predicted value |
Definition at line 55 of file objective.cpp.
| double Objective::qMeasureError | ( | double | target, |
| double | predicted | ||
| ) |
A function to calculate the SSIM error
| target | - a target value |
| predicted | - a predicted value |
Definition at line 241 of file objective.cpp.
|
private |
Covariance in the target and predicted values.
Definition at line 59 of file Objective.h.
|
private |
The vector to hold distances of the values from the center.
Definition at line 62 of file Objective.h.
|
private |
The delta in the huber delta objective function.
Definition at line 35 of file Objective.h.
|
private |
Average standard deviation predicted.
Definition at line 56 of file Objective.h.
|
private |
Average standard deviation target.
Definition at line 53 of file Objective.h.
|
private |
Mean of the predicted values in the patch.
Definition at line 44 of file Objective.h.
|
private |
Mean of the target values in the patch.
Definition at line 41 of file Objective.h.
|
private |
The name of the objective function (one of 4 in the enum)
Definition at line 32 of file Objective.h.
|
private |
Number of non-zero elements in the mask.
Definition at line 38 of file Objective.h.
|
private |
Predicted variance.
Definition at line 50 of file Objective.h.
|
private |
Variance target.
Definition at line 47 of file Objective.h.


const ( STATE_QUERY_RESULT resultType = iota + 1 HISTORY_QUERY_RESULT )
These constants comprise the LoggingLevel enumeration
const ( LogDebug = LoggingLevel(logging.DEBUG) LogInfo = LoggingLevel(logging.INFO) LogNotice = LoggingLevel(logging.NOTICE) LogWarning = LoggingLevel(logging.WARNING) LogError = LoggingLevel(logging.ERROR) LogCritical = LoggingLevel(logging.CRITICAL) )
const ( // OK constant - status code less than 400, endorser will endorse it. // OK means init or invoke successfully. OK = 200 // ERRORTHRESHOLD constant - status code greater than or equal to 400 will be considered an error and rejected by endorser. ERRORTHRESHOLD = 400 // ERROR constant - default error value ERROR = 500 )
func Error(msg string) pb.Response
func IsEnabledForLogLevel(logLevel string) bool
IsEnabledForLogLevel checks to see if the chaincodeLogger is enabled for a specific logging level used primarily for testing
func SetLoggingLevel(level LoggingLevel)
SetLoggingLevel allows a Go language chaincode to set the logging level of its shim.
func SetupChaincodeLogging()
SetupChaincodeLogging sets the chaincode logging format and the level to the values of CORE_CHAINCODE_LOGGING_FORMAT, CORE_CHAINCODE_LOGGING_LEVEL and CORE_CHAINCODE_LOGGING_SHIM set from core.yaml by chaincode_support.go
func Start(cc Chaincode) error
chaincodes.
func StartInProc(env []string, args []string, cc Chaincode, recv <-chan *pb.ChaincodeMessage, send chan<- *pb.ChaincodeMessage) error
StartInProc is an entry point for system chaincodes bootstrap. It is not an API for chaincodes.
func Success(payload []byte) pb.Response
Chaincode interface must be implemented by all chaincodes. The fabric runs the transactions by calling these functions as specified.
type Chaincode interface { // Init is called during Instantiate transaction after the chaincode container // has been established for the first time, allowing the chaincode to // initialize its internal data Init(stub ChaincodeStubInterface) pb.Response // Invoke is called to update or query the ledger in a proposal transaction. // Updated state variables are not committed to the ledger until the // transaction is committed. Invoke(stub ChaincodeStubInterface) pb.Response }
ChaincodeLogger is an abstraction of a logging object for use by chaincodes. These objects are created by the NewLogger API.
type ChaincodeLogger struct {
// contains filtered or unexported fields
}
func NewLogger(name string) *ChaincodeLogger
NewLogger allows a Go language chaincode to create one or more logging objects whose logs will be formatted consistently with, and temporally interleaved with the logs created by the shim interface. The logs created by this object can be distinguished from shim logs by the name provided, which will appear in the logs.
func (c *ChaincodeLogger) Critical(args ...interface{})
Critical logs always appear; They can not be disabled.
func (c *ChaincodeLogger) Criticalf(format string, args ...interface{})
Criticalf logs always appear; They can not be disabled.
func (c *ChaincodeLogger) Debug(args ...interface{})
Debug logs will only appear if the ChaincodeLogger LoggingLevel is set to LogDebug.
func (c *ChaincodeLogger) Debugf(format string, args ...interface{})
Debugf logs will only appear if the ChaincodeLogger LoggingLevel is set to LogDebug.
func (c *ChaincodeLogger) Error(args ...interface{})
Error logs will appear if the ChaincodeLogger LoggingLevel is set to LogError, LogWarning, LogNotice, LogInfo or LogDebug.
func (c *ChaincodeLogger) Errorf(format string, args ...interface{})
Errorf logs will appear if the ChaincodeLogger LoggingLevel is set to LogError, LogWarning, LogNotice, LogInfo or LogDebug.
func (c *ChaincodeLogger) Info(args ...interface{})
Info logs will appear if the ChaincodeLogger LoggingLevel is set to LogInfo or LogDebug.
func (c *ChaincodeLogger) Infof(format string, args ...interface{})
Infof logs will appear if the ChaincodeLogger LoggingLevel is set to LogInfo or LogDebug.
func (c *ChaincodeLogger) IsEnabledFor(level LoggingLevel) bool
IsEnabledFor returns true if the logger is enabled to creates logs at the given logging level.
func (c *ChaincodeLogger) Notice(args ...interface{})
Notice logs will appear if the ChaincodeLogger LoggingLevel is set to LogNotice, LogInfo or LogDebug.
func (c *ChaincodeLogger) Noticef(format string, args ...interface{})
Noticef logs will appear if the ChaincodeLogger LoggingLevel is set to LogNotice, LogInfo or LogDebug.
func (c *ChaincodeLogger) SetLevel(level LoggingLevel)
SetLevel sets the logging level for a chaincode logger. Note that currently the levels are actually controlled by the name given when the logger is created, so loggers should be given unique names other than "shim".
func (c *ChaincodeLogger) Warning(args ...interface{})
Warning logs will appear if the ChaincodeLogger LoggingLevel is set to LogWarning, LogNotice, LogInfo or LogDebug.
func (c *ChaincodeLogger) Warningf(format string, args ...interface{})
Warningf logs will appear if the ChaincodeLogger LoggingLevel is set to LogWarning, LogNotice, LogInfo or LogDebug.
ChaincodeStub is an object passed to chaincode for shim side handling of APIs.
type ChaincodeStub struct { TxID string ChannelId string // contains filtered or unexported fields }
func (stub *ChaincodeStub) CreateCompositeKey(objectType string, attributes []string) (string, error)
CreateCompositeKey documentation can be found in interfaces.go
func (stub *ChaincodeStub) DelPrivateData(collection string, key string) error
DelPrivateData documentation can be found in interfaces.go
func (stub *ChaincodeStub) DelState(key string) error
DelState documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetArgs() [][]byte
GetArgs documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetArgsSlice() ([]byte, error)
GetArgsSlice documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetBinding() ([]byte, error)
GetBinding documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetChannelID() string
GetChannelID returns the channel for the proposal
func (stub *ChaincodeStub) GetCreator() ([]byte, error)
GetCreator documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetDecorations() map[string][]byte
func (stub *ChaincodeStub) GetFunctionAndParameters() (function string, params []string)
GetFunctionAndParameters documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetHistoryForKey(key string) (HistoryQueryIteratorInterface, error)
GetHistoryForKey documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetPrivateData(collection string, key string) ([]byte, error)
GetPrivateData documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetPrivateDataByPartialCompositeKey(collection, objectType string, attributes []string) (StateQueryIteratorInterface, error)
GetPrivateDataByPartialCompositeKey documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetPrivateDataByRange(collection, startKey, endKey string) (StateQueryIteratorInterface, error)
GetPrivateDataByRange documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetPrivateDataHash(collection string, key string) ([]byte, error)
GetPrivateDataHash documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetPrivateDataQueryResult(collection, query string) (StateQueryIteratorInterface, error)
GetPrivateDataQueryResult documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetPrivateDataValidationParameter(collection, key string) ([]byte, error)
GetPrivateDataValidationParameter documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetQueryResult(query string) (StateQueryIteratorInterface, error)
GetQueryResult documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetQueryResultWithPagination(query string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)
func (stub *ChaincodeStub) GetSignedProposal() (*pb.SignedProposal, error)
GetSignedProposal documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetState(key string) ([]byte, error)
GetState documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetStateByPartialCompositeKey(objectType string, attributes []string) (StateQueryIteratorInterface, error)
GetStateByPartialCompositeKey function can be invoked by a chaincode to query the state based on a given partial composite key. This function returns an iterator which can be used to iterate over all composite keys whose prefix matches the given partial composite key. This function should be used only for a partial composite key. For a full composite key, an iter with empty response would be returned.
func (stub *ChaincodeStub) GetStateByPartialCompositeKeyWithPagination(objectType string, keys []string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)
func (stub *ChaincodeStub) GetStateByRange(startKey, endKey string) (StateQueryIteratorInterface, error)
GetStateByRange documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetStateByRangeWithPagination(startKey, endKey string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)
func (stub *ChaincodeStub) GetStateValidationParameter(key string) ([]byte, error)
GetStateValidationParameter documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetStringArgs() []string
GetStringArgs documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetTransient() (map[string][]byte, error)
GetTransient documentation can be found in interfaces.go
func (stub *ChaincodeStub) GetTxID() string
GetTxID returns the transaction ID for the proposal
func (stub *ChaincodeStub) GetTxTimestamp() (*timestamp.Timestamp, error)
GetTxTimestamp documentation can be found in interfaces.go
func (stub *ChaincodeStub) InvokeChaincode(chaincodeName string, args [][]byte, channel string) pb.Response
InvokeChaincode documentation can be found in interfaces.go
func (stub *ChaincodeStub) PutPrivateData(collection string, key string, value []byte) error
PutPrivateData documentation can be found in interfaces.go
func (stub *ChaincodeStub) PutState(key string, value []byte) error
PutState documentation can be found in interfaces.go
func (stub *ChaincodeStub) SetEvent(name string, payload []byte) error
SetEvent documentation can be found in interfaces.go
func (stub *ChaincodeStub) SetPrivateDataValidationParameter(collection, key string, ep []byte) error
SetPrivateDataValidationParameter documentation can be found in interfaces.go
func (stub *ChaincodeStub) SetStateValidationParameter(key string, ep []byte) error
SetStateValidationParameter documentation can be found in interfaces.go
func (stub *ChaincodeStub) SplitCompositeKey(compositeKey string) (string, []string, error)
SplitCompositeKey documentation can be found in interfaces.go
ChaincodeStubInterface is used by deployable chaincode apps to access and modify their ledgers
type ChaincodeStubInterface interface { // GetArgs returns the arguments intended for the chaincode Init and Invoke // as an array of byte arrays. GetArgs() [][]byte // GetStringArgs returns the arguments intended for the chaincode Init and // Invoke as a string array. Only use GetStringArgs if the client passes // arguments intended to be used as strings. GetStringArgs() []string // GetFunctionAndParameters returns the first argument as the function // name and the rest of the arguments as parameters in a string array. // Only use GetFunctionAndParameters if the client passes arguments intended // to be used as strings. GetFunctionAndParameters() (string, []string) // GetArgsSlice returns the arguments intended for the chaincode Init and // Invoke as a byte array GetArgsSlice() ([]byte, error) // GetTxID returns the tx_id of the transaction proposal, which is unique per // transaction and per client. See ChannelHeader in protos/common/common.proto // for further details. GetTxID() string // GetChannelID returns the channel the proposal is sent to for chaincode to process. // This would be the channel_id of the transaction proposal (see ChannelHeader // in protos/common/common.proto) except where the chaincode is calling another on // a different channel GetChannelID() string // InvokeChaincode locally calls the specified chaincode `Invoke` using the // same transaction context; that is, chaincode calling chaincode doesn't // create a new transaction message. // If the called chaincode is on the same channel, it simply adds the called // chaincode read set and write set to the calling transaction. // If the called chaincode is on a different channel, // only the Response is returned to the calling chaincode; any PutState calls // from the called chaincode will not have any effect on the ledger; that is, // the called chaincode on a different channel will not have its read set // and write set applied to the transaction. Only the calling chaincode's // read set and write set will be applied to the transaction. Effectively // the called chaincode on a different channel is a `Query`, which does not // participate in state validation checks in subsequent commit phase. // If `channel` is empty, the caller's channel is assumed. InvokeChaincode(chaincodeName string, args [][]byte, channel string) pb.Response // GetState returns the value of the specified `key` from the // ledger. Note that GetState doesn't read data from the writeset, which // has not been committed to the ledger. In other words, GetState doesn't // consider data modified by PutState that has not been committed. // If the key does not exist in the state database, (nil, nil) is returned. GetState(key string) ([]byte, error) // PutState puts the specified `key` and `value` into the transaction's // writeset as a data-write proposal. PutState doesn't effect the ledger // until the transaction is validated and successfully committed. // Simple keys must not be an empty string and must not start with a // null character (0x00) in order to avoid range query collisions with // composite keys, which internally get prefixed with 0x00 as composite // key namespace. In addition, if using CouchDB, keys can only contain // valid UTF-8 strings and cannot begin with an underscore ("_"). PutState(key string, value []byte) error // DelState records the specified `key` to be deleted in the writeset of // the transaction proposal. The `key` and its value will be deleted from // the ledger when the transaction is validated and successfully committed. DelState(key string) error // SetStateValidationParameter sets the key-level endorsement policy for `key`. SetStateValidationParameter(key string, ep []byte) error // GetStateValidationParameter retrieves the key-level endorsement policy // for `key`. Note that this will introduce a read dependency on `key` in // the transaction's readset. GetStateValidationParameter(key string) ([]byte, error) // GetStateByRange returns a range iterator over a set of keys in the // ledger. The iterator can be used to iterate over all keys // between the startKey (inclusive) and endKey (exclusive). // However, if the number of keys between startKey and endKey is greater than the // totalQueryLimit (defined in core.yaml), this iterator cannot be used // to fetch all keys (results will be capped by the totalQueryLimit). // The keys are returned by the iterator in lexical order. Note // that startKey and endKey can be empty string, which implies unbounded range // query on start or end. // Call Close() on the returned StateQueryIteratorInterface object when done. // The query is re-executed during validation phase to ensure result set // has not changed since transaction endorsement (phantom reads detected). GetStateByRange(startKey, endKey string) (StateQueryIteratorInterface, error) // GetStateByRangeWithPagination returns a range iterator over a set of keys in the // ledger. The iterator can be used to fetch keys between the startKey (inclusive) // and endKey (exclusive). // When an empty string is passed as a value to the bookmark argument, the returned // iterator can be used to fetch the first `pageSize` keys between the startKey // (inclusive) and endKey (exclusive). // When the bookmark is a non-emptry string, the iterator can be used to fetch // the first `pageSize` keys between the bookmark (inclusive) and endKey (exclusive). // Note that only the bookmark present in a prior page of query results (ResponseMetadata) // can be used as a value to the bookmark argument. Otherwise, an empty string must // be passed as bookmark. // The keys are returned by the iterator in lexical order. Note // that startKey and endKey can be empty string, which implies unbounded range // query on start or end. // Call Close() on the returned StateQueryIteratorInterface object when done. // This call is only supported in a read only transaction. GetStateByRangeWithPagination(startKey, endKey string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) // GetStateByPartialCompositeKey queries the state in the ledger based on // a given partial composite key. This function returns an iterator // which can be used to iterate over all composite keys whose prefix matches // the given partial composite key. However, if the number of matching composite // keys is greater than the totalQueryLimit (defined in core.yaml), this iterator // cannot be used to fetch all matching keys (results will be limited by the totalQueryLimit). // The `objectType` and attributes are expected to have only valid utf8 strings and // should not contain U+0000 (nil byte) and U+10FFFF (biggest and unallocated code point). // See related functions SplitCompositeKey and CreateCompositeKey. // Call Close() on the returned StateQueryIteratorInterface object when done. // The query is re-executed during validation phase to ensure result set // has not changed since transaction endorsement (phantom reads detected). GetStateByPartialCompositeKey(objectType string, keys []string) (StateQueryIteratorInterface, error) // GetStateByPartialCompositeKeyWithPagination queries the state in the ledger based on // a given partial composite key. This function returns an iterator // which can be used to iterate over the composite keys whose // prefix matches the given partial composite key. // When an empty string is passed as a value to the bookmark argument, the returned // iterator can be used to fetch the first `pageSize` composite keys whose prefix // matches the given partial composite key. // When the bookmark is a non-emptry string, the iterator can be used to fetch // the first `pageSize` keys between the bookmark (inclusive) and the last matching // composite key. // Note that only the bookmark present in a prior page of query result (ResponseMetadata) // can be used as a value to the bookmark argument. Otherwise, an empty string must // be passed as bookmark. // The `objectType` and attributes are expected to have only valid utf8 strings // and should not contain U+0000 (nil byte) and U+10FFFF (biggest and unallocated // code point). See related functions SplitCompositeKey and CreateCompositeKey. // Call Close() on the returned StateQueryIteratorInterface object when done. // This call is only supported in a read only transaction. GetStateByPartialCompositeKeyWithPagination(objectType string, keys []string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) // CreateCompositeKey combines the given `attributes` to form a composite // key. The objectType and attributes are expected to have only valid utf8 // strings and should not contain U+0000 (nil byte) and U+10FFFF // (biggest and unallocated code point). // The resulting composite key can be used as the key in PutState(). CreateCompositeKey(objectType string, attributes []string) (string, error) // SplitCompositeKey splits the specified key into attributes on which the // composite key was formed. Composite keys found during range queries // or partial composite key queries can therefore be split into their // composite parts. SplitCompositeKey(compositeKey string) (string, []string, error) // GetQueryResult performs a "rich" query against a state database. It is // only supported for state databases that support rich query, // e.g.CouchDB. The query string is in the native syntax // of the underlying state database. An iterator is returned // which can be used to iterate over all keys in the query result set. // However, if the number of keys in the query result set is greater than the // totalQueryLimit (defined in core.yaml), this iterator cannot be used // to fetch all keys in the query result set (results will be limited by // the totalQueryLimit). // The query is NOT re-executed during validation phase, phantom reads are // not detected. That is, other committed transactions may have added, // updated, or removed keys that impact the result set, and this would not // be detected at validation/commit time. Applications susceptible to this // should therefore not use GetQueryResult as part of transactions that update // ledger, and should limit use to read-only chaincode operations. GetQueryResult(query string) (StateQueryIteratorInterface, error) // GetQueryResultWithPagination performs a "rich" query against a state database. // It is only supported for state databases that support rich query, // e.g., CouchDB. The query string is in the native syntax // of the underlying state database. An iterator is returned // which can be used to iterate over keys in the query result set. // When an empty string is passed as a value to the bookmark argument, the returned // iterator can be used to fetch the first `pageSize` of query results. // When the bookmark is a non-emptry string, the iterator can be used to fetch // the first `pageSize` keys between the bookmark and the last key in the query result. // Note that only the bookmark present in a prior page of query results (ResponseMetadata) // can be used as a value to the bookmark argument. Otherwise, an empty string // must be passed as bookmark. // This call is only supported in a read only transaction. GetQueryResultWithPagination(query string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error) // GetHistoryForKey returns a history of key values across time. // For each historic key update, the historic value and associated // transaction id and timestamp are returned. The timestamp is the // timestamp provided by the client in the proposal header. // GetHistoryForKey requires peer configuration // core.ledger.history.enableHistoryDatabase to be true. // The query is NOT re-executed during validation phase, phantom reads are // not detected. That is, other committed transactions may have updated // the key concurrently, impacting the result set, and this would not be // detected at validation/commit time. Applications susceptible to this // should therefore not use GetHistoryForKey as part of transactions that // update ledger, and should limit use to read-only chaincode operations. GetHistoryForKey(key string) (HistoryQueryIteratorInterface, error) // GetPrivateData returns the value of the specified `key` from the specified // `collection`. Note that GetPrivateData doesn't read data from the // private writeset, which has not been committed to the `collection`. In // other words, GetPrivateData doesn't consider data modified by PutPrivateData // that has not been committed. GetPrivateData(collection, key string) ([]byte, error) // GetPrivateDataHash returns the hash of the value of the specified `key` from the specified // `collection` GetPrivateDataHash(collection, key string) ([]byte, error) // PutPrivateData puts the specified `key` and `value` into the transaction's // private writeset. Note that only hash of the private writeset goes into the // transaction proposal response (which is sent to the client who issued the // transaction) and the actual private writeset gets temporarily stored in a // transient store. PutPrivateData doesn't effect the `collection` until the // transaction is validated and successfully committed. Simple keys must not // be an empty string and must not start with a null character (0x00) in order // to avoid range query collisions with composite keys, which internally get // prefixed with 0x00 as composite key namespace. In addition, if using // CouchDB, keys can only contain valid UTF-8 strings and cannot begin with an // an underscore ("_"). PutPrivateData(collection string, key string, value []byte) error // DelState records the specified `key` to be deleted in the private writeset of // the transaction. Note that only hash of the private writeset goes into the // transaction proposal response (which is sent to the client who issued the // transaction) and the actual private writeset gets temporarily stored in a // transient store. The `key` and its value will be deleted from the collection // when the transaction is validated and successfully committed. DelPrivateData(collection, key string) error // SetPrivateDataValidationParameter sets the key-level endorsement policy // for the private data specified by `key`. SetPrivateDataValidationParameter(collection, key string, ep []byte) error // GetPrivateDataValidationParameter retrieves the key-level endorsement // policy for the private data specified by `key`. Note that this introduces // a read dependency on `key` in the transaction's readset. GetPrivateDataValidationParameter(collection, key string) ([]byte, error) // GetPrivateDataByRange returns a range iterator over a set of keys in a // given private collection. The iterator can be used to iterate over all keys // between the startKey (inclusive) and endKey (exclusive). // The keys are returned by the iterator in lexical order. Note // that startKey and endKey can be empty string, which implies unbounded range // query on start or end. // Call Close() on the returned StateQueryIteratorInterface object when done. // The query is re-executed during validation phase to ensure result set // has not changed since transaction endorsement (phantom reads detected). GetPrivateDataByRange(collection, startKey, endKey string) (StateQueryIteratorInterface, error) // GetPrivateDataByPartialCompositeKey queries the state in a given private // collection based on a given partial composite key. This function returns // an iterator which can be used to iterate over all composite keys whose prefix // matches the given partial composite key. The `objectType` and attributes are // expected to have only valid utf8 strings and should not contain // U+0000 (nil byte) and U+10FFFF (biggest and unallocated code point). // See related functions SplitCompositeKey and CreateCompositeKey. // Call Close() on the returned StateQueryIteratorInterface object when done. // The query is re-executed during validation phase to ensure result set // has not changed since transaction endorsement (phantom reads detected). GetPrivateDataByPartialCompositeKey(collection, objectType string, keys []string) (StateQueryIteratorInterface, error) // GetPrivateDataQueryResult performs a "rich" query against a given private // collection. It is only supported for state databases that support rich query, // e.g.CouchDB. The query string is in the native syntax // of the underlying state database. An iterator is returned // which can be used to iterate (next) over the query result set. // The query is NOT re-executed during validation phase, phantom reads are // not detected. That is, other committed transactions may have added, // updated, or removed keys that impact the result set, and this would not // be detected at validation/commit time. Applications susceptible to this // should therefore not use GetQueryResult as part of transactions that update // ledger, and should limit use to read-only chaincode operations. GetPrivateDataQueryResult(collection, query string) (StateQueryIteratorInterface, error) // GetCreator returns `SignatureHeader.Creator` (e.g. an identity) // of the `SignedProposal`. This is the identity of the agent (or user) // submitting the transaction. GetCreator() ([]byte, error) // GetTransient returns the `ChaincodeProposalPayload.Transient` field. // It is a map that contains data (e.g. cryptographic material) // that might be used to implement some form of application-level // confidentiality. The contents of this field, as prescribed by // `ChaincodeProposalPayload`, are supposed to always // be omitted from the transaction and excluded from the ledger. GetTransient() (map[string][]byte, error) // GetBinding returns the transaction binding, which is used to enforce a // link between application data (like those stored in the transient field // above) to the proposal itself. This is useful to avoid possible replay // attacks. GetBinding() ([]byte, error) // GetDecorations returns additional data (if applicable) about the proposal // that originated from the peer. This data is set by the decorators of the // peer, which append or mutate the chaincode input passed to the chaincode. GetDecorations() map[string][]byte // GetSignedProposal returns the SignedProposal object, which contains all // data elements part of a transaction proposal. GetSignedProposal() (*pb.SignedProposal, error) // GetTxTimestamp returns the timestamp when the transaction was created. This // is taken from the transaction ChannelHeader, therefore it will indicate the // client's timestamp and will have the same value across all endorsers. GetTxTimestamp() (*timestamp.Timestamp, error) // SetEvent allows the chaincode to set an event on the response to the // proposal to be included as part of a transaction. The event will be // available within the transaction in the committed block regardless of the // validity of the transaction. SetEvent(name string, payload []byte) error }
CommonIterator documentation can be found in interfaces.go
type CommonIterator struct {
// contains filtered or unexported fields
}
func (iter *CommonIterator) Close() error
Close documentation can be found in interfaces.go
func (iter *CommonIterator) HasNext() bool
HasNext documentation can be found in interfaces.go
CommonIteratorInterface allows a chaincode to check whether any more result to be fetched from an iterator and close it when done.
type CommonIteratorInterface interface { // HasNext returns true if the range query iterator contains additional keys // and values. HasNext() bool // Close closes the iterator. This should be called when done // reading from the iterator to free up resources. Close() error }
Handler handler implementation for shim side of chaincode.
type Handler struct { //need lock to protect chaincode from attempting //concurrent requests to the peer sync.Mutex To string ChatStream PeerChaincodeStream // contains filtered or unexported fields }
HistoryQueryIterator documentation can be found in interfaces.go
type HistoryQueryIterator struct { *CommonIterator }
func (iter *HistoryQueryIterator) Next() (*queryresult.KeyModification, error)
HistoryQueryIteratorInterface allows a chaincode to iterate over a set of key/value pairs returned by a history query.
type HistoryQueryIteratorInterface interface { // Inherit HasNext() and Close() CommonIteratorInterface // Next returns the next key and value in the history query iterator. Next() (*queryresult.KeyModification, error) }
LoggingLevel is an enumerated type of severity levels that control chaincode logging.
type LoggingLevel logging.Level
func LogLevel(levelString string) (LoggingLevel, error)
LogLevel converts a case-insensitive string chosen from CRITICAL, ERROR, WARNING, NOTICE, INFO or DEBUG into an element of the LoggingLevel type. In the event of errors the level returned is LogError.
MockQueryIteratorInterface allows a chaincode to iterate over a set of key/value pairs returned by range query. TODO: Once the execute query and history query are implemented in MockStub, we need to update this interface
type MockQueryIteratorInterface interface { StateQueryIteratorInterface }
type MockStateRangeQueryIterator struct { Closed bool Stub *MockStub StartKey string EndKey string Current *list.Element }
func NewMockStateRangeQueryIterator(stub *MockStub, startKey string, endKey string) *MockStateRangeQueryIterator
func (iter *MockStateRangeQueryIterator) Close() error
Close closes the range query iterator. This should be called when done reading from the iterator to free up resources.
func (iter *MockStateRangeQueryIterator) HasNext() bool
HasNext returns true if the range query iterator contains additional keys and values.
func (iter *MockStateRangeQueryIterator) Next() (*queryresult.KV, error)
Next returns the next key and value in the range query iterator.
func (iter *MockStateRangeQueryIterator) Print()
MockStub is an implementation of ChaincodeStubInterface for unit testing chaincode. Use this instead of ChaincodeStub in your chaincode's unit test calls to Init or Invoke.
type MockStub struct { // A nice name that can be used for logging Name string // State keeps name value pairs State map[string][]byte // Keys stores the list of mapped values in lexical order Keys *list.List // registered list of other MockStub chaincodes that can be called from this MockStub Invokables map[string]*MockStub // stores a transaction uuid while being Invoked / Deployed // TODO if a chaincode uses recursion this may need to be a stack of TxIDs or possibly a reference counting map TxID string TxTimestamp *timestamp.Timestamp // stores a channel ID of the proposal ChannelID string PvtState map[string]map[string][]byte // stores per-key endorsement policy, first map index is the collection, second map index is the key EndorsementPolicies map[string]map[string][]byte // channel to store ChaincodeEvents ChaincodeEventsChannel chan *pb.ChaincodeEvent Decorations map[string][]byte // contains filtered or unexported fields }
func NewMockStub(name string, cc Chaincode) *MockStub
Constructor to initialise the internal State map
func (stub *MockStub) CreateCompositeKey(objectType string, attributes []string) (string, error)
CreateCompositeKey combines the list of attributes to form a composite key.
func (stub *MockStub) DelPrivateData(collection string, key string) error
func (stub *MockStub) DelState(key string) error
DelState removes the specified `key` and its value from the ledger.
func (stub *MockStub) GetArgs() [][]byte
func (stub *MockStub) GetArgsSlice() ([]byte, error)
Not implemented
func (stub *MockStub) GetBinding() ([]byte, error)
Not implemented
func (stub *MockStub) GetChannelID() string
func (stub *MockStub) GetCreator() ([]byte, error)
Not implemented
func (stub *MockStub) GetDecorations() map[string][]byte
func (stub *MockStub) GetFunctionAndParameters() (function string, params []string)
func (stub *MockStub) GetHistoryForKey(key string) (HistoryQueryIteratorInterface, error)
GetHistoryForKey function can be invoked by a chaincode to return a history of key values across time. GetHistoryForKey is intended to be used for read-only queries.
func (stub *MockStub) GetPrivateData(collection string, key string) ([]byte, error)
func (stub *MockStub) GetPrivateDataByPartialCompositeKey(collection, objectType string, attributes []string) (StateQueryIteratorInterface, error)
func (stub *MockStub) GetPrivateDataByRange(collection, startKey, endKey string) (StateQueryIteratorInterface, error)
func (stub *MockStub) GetPrivateDataHash(collection, key string) ([]byte, error)
func (stub *MockStub) GetPrivateDataQueryResult(collection, query string) (StateQueryIteratorInterface, error)
func (stub *MockStub) GetPrivateDataValidationParameter(collection, key string) ([]byte, error)
func (stub *MockStub) GetQueryResult(query string) (StateQueryIteratorInterface, error)
GetQueryResult function can be invoked by a chaincode to perform a rich query against state database. Only supported by state database implementations that support rich query. The query string is in the syntax of the underlying state database. An iterator is returned which can be used to iterate (next) over the query result set
func (stub *MockStub) GetQueryResultWithPagination(query string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)
func (stub *MockStub) GetSignedProposal() (*pb.SignedProposal, error)
Not implemented
func (stub *MockStub) GetState(key string) ([]byte, error)
GetState retrieves the value for a given key from the ledger
func (stub *MockStub) GetStateByPartialCompositeKey(objectType string, attributes []string) (StateQueryIteratorInterface, error)
GetStateByPartialCompositeKey function can be invoked by a chaincode to query the state based on a given partial composite key. This function returns an iterator which can be used to iterate over all composite keys whose prefix matches the given partial composite key. This function should be used only for a partial composite key. For a full composite key, an iter with empty response would be returned.
func (stub *MockStub) GetStateByPartialCompositeKeyWithPagination(objectType string, keys []string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)
func (stub *MockStub) GetStateByRange(startKey, endKey string) (StateQueryIteratorInterface, error)
func (stub *MockStub) GetStateByRangeWithPagination(startKey, endKey string, pageSize int32, bookmark string) (StateQueryIteratorInterface, *pb.QueryResponseMetadata, error)
func (stub *MockStub) GetStateValidationParameter(key string) ([]byte, error)
func (stub *MockStub) GetStringArgs() []string
func (stub *MockStub) GetTransient() (map[string][]byte, error)
Not implemented
func (stub *MockStub) GetTxID() string
func (stub *MockStub) GetTxTimestamp() (*timestamp.Timestamp, error)
func (stub *MockStub) InvokeChaincode(chaincodeName string, args [][]byte, channel string) pb.Response
InvokeChaincode calls a peered chaincode. E.g. stub1.InvokeChaincode("stub2Hash", funcArgs, channel) Before calling this make sure to create another MockStub stub2, call stub2.MockInit(uuid, func, args) and register it with stub1 by calling stub1.MockPeerChaincode("stub2Hash", stub2)
func (stub *MockStub) MockInit(uuid string, args [][]byte) pb.Response
Initialise this chaincode, also starts and ends a transaction.
func (stub *MockStub) MockInvoke(uuid string, args [][]byte) pb.Response
Invoke this chaincode, also starts and ends a transaction.
func (stub *MockStub) MockInvokeWithSignedProposal(uuid string, args [][]byte, sp *pb.SignedProposal) pb.Response
Invoke this chaincode, also starts and ends a transaction.
func (stub *MockStub) MockPeerChaincode(invokableChaincodeName string, otherStub *MockStub)
Register a peer chaincode with this MockStub invokableChaincodeName is the name or hash of the peer otherStub is a MockStub of the peer, already intialised
func (stub *MockStub) MockTransactionEnd(uuid string)
End a mocked transaction, clearing the UUID.
func (stub *MockStub) MockTransactionStart(txid string)
Used to indicate to a chaincode that it is part of a transaction. This is important when chaincodes invoke each other. MockStub doesn't support concurrent transactions at present.
func (stub *MockStub) PutPrivateData(collection string, key string, value []byte) error
func (stub *MockStub) PutState(key string, value []byte) error
PutState writes the specified `value` and `key` into the ledger.
func (stub *MockStub) SetEvent(name string, payload []byte) error
func (stub *MockStub) SetPrivateDataValidationParameter(collection, key string, ep []byte) error
func (stub *MockStub) SetStateValidationParameter(key string, ep []byte) error
func (stub *MockStub) SplitCompositeKey(compositeKey string) (string, []string, error)
SplitCompositeKey splits the composite key into attributes on which the composite key was formed.
PeerChaincodeStream interface for stream between Peer and chaincode instance.
type PeerChaincodeStream interface { Send(*pb.ChaincodeMessage) error Recv() (*pb.ChaincodeMessage, error) CloseSend() error }
SendPanicFailure
type SendPanicFailure string
func (e SendPanicFailure) Error() string
StateQueryIterator documentation can be found in interfaces.go
type StateQueryIterator struct { *CommonIterator }
func (iter *StateQueryIterator) Next() (*queryresult.KV, error)
StateQueryIteratorInterface allows a chaincode to iterate over a set of key/value pairs returned by range and execute query.
type StateQueryIteratorInterface interface { // Inherit HasNext() and Close() CommonIteratorInterface // Next returns the next key and value in the range and execute query iterator. Next() (*queryresult.KV, error) }


scikit-learn¶
Welcome to scikit-learn¶
- 安装 scikit-learn
- 频繁问到的问题
- What is the project name (a lot of people get it wrong)?
- How do you pronounce the project name?
- Why scikit?
- How can I contribute to scikit-learn?
- What’s the best way to get help on scikit-learn usage?
- How can I create a bunch object?
- How can I load my own datasets into a format usable by scikit-learn?
- What are the inclusion criteria for new algorithms ?
- Why are you so selective on what algorithms you include in scikit-learn?
- Why did you remove HMMs from scikit-learn?
- Will you add graphical models or sequence prediction to scikit-learn?
- Will you add GPU support?
- Do you support PyPy?
- How do I deal with string data (or trees, graphs…)?
- Why do I sometime get a crash/freeze with n_jobs > 1 under OSX or Linux?
- Why does my job use more cores than specified with n_jobs under OSX or Linux?
- Why is there no support for deep or reinforcement learning / Will there be support for deep or reinforcement learning in scikit-learn?
- Why is my pull request not getting any attention?
- How do I set a
random_state
for an entire execution? - Why do categorical variables need preprocessing in scikit-learn, compared to other tools?
- Why does Scikit-learn not directly work with, for example, pandas.DataFrame?
- 支持
- 相关工程
- About us
- Who is using scikit-learn?
- 发布历史
- Version 0.20.2
- Version 0.20.1
- Version 0.20.0
- Version 0.19.2
- Version 0.19.1
- Version 0.19
- 以前的版本
- Version 0.18.2
- Version 0.18.1
- Version 0.18
- Version 0.17.1
- Version 0.17
- Version 0.16.1
- Version 0.16
- Version 0.15.2
- Version 0.15.1
- Version 0.15
- Version 0.14
- Version 0.13.1
- Version 0.13
- Version 0.12.1
- Version 0.12
- Version 0.11
- Version 0.10
- Version 0.9
- Version 0.8
- Version 0.7
- Version 0.6
- Version 0.5
- Version 0.4
- Earlier versions


We are not just exchanging Engagement rings.We are exchanging Expectations & Promises.
A bell’s no bell ’til you ring it, a song’s not a song ’til you sing it, Love in your heart wasn’t put there to stay, Love isn’t love ’til you give it away.
ENGAGEMENT CEREMONY
WEDDING CEREMONY
Shruti & Sunny