Android.os.Bundle;Import Android.widget.TextView;public class Helloworldactivity extends Activity {Private TextView Txtview;/** called when the activity is first created. */@Overridepublic void OnCreate (Bundle savedinstancestate) {Super.oncreate (savedinstancestate);Setcontentview (R.layout.main);This.txtview = (TextView) Findviewbyid (R.id.txtview);if (this.txtview!=null) {This.txtView.setText ("Hello World");}}}Execute it.android4.0 API documentation, emulator and other download linksed2k://
Proxy: An HTTP intermediate entity located between the client and the serverCache: A repository of HTTP so that copies of frequently used pages can be saved closer to the clientGateway: A special WEB server that connects other applicationsTunneling: A special agent for blind forwarding of HTTP communication messagesAgent agent: A semi-intelligent web client that initiates automatic HTTP requests, such as Web bots, network spidersWEB Fabric Components
This is a HTML5 Canvas application demo that mimics the effect of a ripped cloth, with realistic results. You'll see that with Canvas 's powerful drawing and animation capabilities, you can take your breath away with minimal code. Tips: For the best results, browse through modern browsers such as ie10+, Chrome, Firefox, and Safari.SOURCE Download Effect DemoRelated articles that may be of interest to you
Web development in a very practical 10 effects "source Download"
Carefully selected
The main introduction through the use of replacement filter text and wrinkled silk fabric background perfect combination, suitable for novice friends to learn, hope friends like.
The replacement of Ytterbium in PS (displace) seems to be less noticeable, some people may not know its role. Now let's explore its potential and analyze how it works, and see how this filter, combined with layer blending, combines text with a wrinkled silk background that wo
Hyperledger source code Analysis of Fabric
Deliver means that the client obtains data from the ordering service via the Grpc interface (for example, data from a specified block).
The Orderer node receives the request message, which is first given to the Deliver of the server structure in the Orderer.common.server package (SRV ab. Atomicbroadcast_deliverserver) Error method processing. This method further invokes the Handle of the deliverserver structu
Certificate requirements:
1. The format of the digital certificate follows the X.509 standard
2. Version V3
3. Signature Algorithm SHA256ECDSA
CA used in FABRIC-JAVA-SDK:
./e2e-2orgs/channel/crypto-config/peerorganizations/org1.example.com/users/admin@org1.example.com/msp/signcerts
./e2e-2orgs/channel/crypto-config/peerorganizations/org1.example.com/users/admin@org1.example.com/msp/keystore
Docker-compose.yaml the CA used in the conf
Hyperledger source code Analysis of Fabric
Broadcast means that the client sends the request message (for example, after the endorsement transaction is completed) to the ordering service via the Grpc interface.
These request messages are given to the broadcast (SRV ab) of the server structure in the Orderer.common.server package. Atomicbroadcast_broadcastserver) Error method processing. This method will mainly call the Handle (SRV ab) of the HANDLERIM
General use of fabric, mostly with the remote interaction, and in the interaction, in addition to the logic of simple code, time is also accompanied by the transmission of files, and there may be a lot of files in the file.
Whether we can make a judgment, if the file exists, then we do not upload, look at the code
# for a test
@task
@roles ("Mgmt")
def Test ():
if Int (run ("[E '/etc/passwd1 '] echo 11 | | echo ") = = one:
print" Yes, f
complete, unzip to the/usr/local directory:sudo tar -c/usr/local-xzf go1.10.1.linux-amd64.tar.gz To configure the GO locale variable:Enter the. BASHRC Configuration environment variable:$ sudo vim ~/. BASHRC or: $ sudo vim/etc/profileAdd the following code to the last side:Export gopath=/usr/local/goexport path= $GOPATH/bin: $PATH Save, exit.To make an environment variable effective:$ source ~/. BASHRC or: $ source/etc/profile After viewing the version number no problem, the configuration
-8-*-Each time you specify the password is also more troublesome, wrote a shell script, each time only need to specify the source IP, destination IP, port number, library name can bemysqlha_sync2test.sh#!/bin/bashS_host=$1D_host=$2Port=$3Db=$4Mysql_path= "/usr/local/mysql-5.6.24"Sync_time= ' date + '%h%m%s 'Sync_date= ' date + '%y%m%d 'S_user= ' Db_read_user 'S_pwd= ' 123456 'D_user= ' Root 'D_pwd= ' 123456 'Schemasync--tag= "${sync_time}"--output-dir= "/data/mysql_schemasync"--sync-comments mys
Application development Configuration and build
You can use Go to develop applications and use the APIs available in the Hyperledger Fabric SDK Go to invoke the chain code to complete transactions in the blockchain network. At this stage we run the test project first.
Steps:
1. Sample application service-side code run
2. Download the certificate
3. Build the Certificate directory
4. Fabric SDK Configuration
Fabric is a Python class library that uses SSH protocol-based command-line tools for application Deployment and System task management, and here are two ways that fabric code runs in parallel:
1: Parameter-P
From FABRIC.API import * host1 = ' root@ip1:22 ' host2 = ' root@ip2:22 ' env.hosts = [Host1, host2] Env.pass Words = { host1: "P1", host2: "P2" }
Have the version number of the strict as required, encountered a lot of pits1) No requirement to install Git version2) Install the Go 1.9 configuration environment variable3) Install Vagrant 1.9.44) Install VirtualBox 5.1.285) Create the following directory under the Go installation directory/src/(no restrictions on location)D:\Go\src\github.com\hyperledger6) Use Git to draw official source codegit clone https://github.com/hyperledger/fabric.git7) Open the corresponding pathD:\Go\src\github.com\
Fabric is a command-line-based automated deployment framework for Python that uses Docker to open two of containers to learn fabric.#!/usr/bin/env python#-*-coding=utf-8-*- fromFabric.apiImport*env.hosts=[ '[Email protected]:22', '[Email protected]:32',]env.passwords={ '[Email protected]:22':'*****', '[Email protected]:32':'***',} @taskdefTask1 (): Run (' PS') @taskdefTask2 (): Run (' Uname-a')
work, let us see how to achieve a key with fabric: (in fact, with shell script can be directly done, but the advantage of FAB is not here, Here the main bit behind the local + remote operation to prepare, after all, two places to write a script for easy maintenance)from fabric.api import localdef setting_ci(): local("cd /home/project/test/conf/") local("git add settings.py") #后面你懂的,懒得敲了…..Mashup Integration Remote operationAt this point, sup
work, let us see how to achieve a key with fabric: (in fact, with shell script can be directly done, but the advantage of FAB is not here, Here the main bit behind the local + remote operation to prepare, after all, two places to write a script for easy maintenance)from fabric.api import localdef setting_ci(): local("cd /home/project/test/conf/") local("git add settings.py") #后面你懂的,懒得敲了…..Mashup Integration Remote operationAt this point, sup
first, fabric network structure (temporarily excluding CA)
As shown in the figure above, in the Fabric network, o indicates that ORDERER,P represents PEER,EP representative endorsing Peer (endorser), CC represents Chaincode, and client, Channel, Ledger, Transaction, which makes up the entire network, describes each of these elements:
Clients: A client installed at a node (Peer) can initiate a request to
The 1.Chaincode interface must be implemented by all the code on the chain, and the fabric runs the transaction by invoking these specified functions
Call the INIT function to allow code on the chain to initialize internal data after the container has established a connection and then deploys the transaction
Init (stub chaincodestubinterface, function string, args []string) ([]byte, error)
Each call to the transaction invokes the Invoke interface.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.