A FUSE binding for Lua
Here you can find a list of the functions present in the module and how to use them. LUSE main module follows Lua 5.1 package system, see the Lua 5.1 manual for further explanations.
Quick links:
These functions are global to the LUSE module.
luse.main (argv, fs)
Starts a new filesystem daemon. argv
is an array containing additionnal parameters to pass to the FUSE library. fs
is a table (or any indexable object) containing methods of the FUSE filesystem you are trying to create.
local luafs = {}
function luafs:getattr(path, stat) return -errno.ENOSYS end
local argv = {"luafs", select(2, ...)}
luse.main(argv, fs)
luse.get_context ([tbl])
Obtain information about the context of the current FUSE request. A table is returned containing fields uid
, gid
and pid
(user, group and thread id of the calling process, respectively). If no arguments are given, a new table is created. If a table is passed as an argument, it is reused and fields are set in it instead.
These methods may be present in the fs
object passed to luse.main
. They are all optionnal, though without them your filesystem may not work properly. See example filesystems available in LUSE packages for minimal requirements.
Unless otherwise noted, all these functions should return 0 on success. On error, they should returned a negated error number (for example -errno.EINVAL
, see errno module below). Each function will receive the object passed to luse.main
as first parameter, that's why they are documented with the colon notation below.
As of FUSE 2.6, there are six FUSE methods that are not bound by LUSE: and init
, destroy
, lock
and bmap
which I haven't used yet and are a bit complicated to bind, and getdir
and utime
which are obsolete.
fs:getattr (path, st)
Get file attributes. st
is a stat
structure as described in the posixio.new
function below. The 'dev'
and 'blksize'
fields are ignored. The 'ino'
field is ignored except if the 'use_ino'
mount option is given.
Note that for the find command line utility to work in your filesystem, the 'nlink'
field of the stat
structure must be properly filled. See this FUSE FAQ entry for more details.
fs:readlink (path, buf, size)
Read the target of a symbolic link. The userdata buffer buf
should be filled with a null terminated string. You can use userdata.memcpy
to write the content of a string to it.
function luafs:readlink(path, buf, size)
local link = "/foo"
userdata.memcpy(buf, link, math.min(size-1, #link)+1)
end
fs:mknod (path, mode, redev)
Create a file node. This is called for creation of all non-directory, non-symlink nodes. If the filesystem defines a create
method, then for regular files that will be called instead. mode
is a Lua set (see description of stat
structure in posixio.new
documentation).
fs:mkdir (path, mode)
Create a directory.
fs:unlink (path)
Remove a file.
fs:rmdir (path)
Remove a directory.
fs:symlink (linkname, path)
Create a symbolic link. path
is the name of the link itself in the LUSE filesystem, linkname
is the linked file.
fs:rename (oldpath, newpath)
Rename a file.
fs:link (oldpath, newpath)
Create a hard link to a file.
fs:chmod (path, mode)
Change the permission bits of a file. mode
is a Lua set (see description of stat
structure in posixio.new
documentation).
fs:chown (path, uid, gid)
Change the owner and group of a file.
fs:truncate (path, size)
Change the size of a file.
fs:open (path, fi)
File open operation. fi
is a fuse_file_info
structure (see below). No creation, or truncation flags ('CREAT'
, 'EXCL'
, 'TRUNC'
) will be passed to fs:open
. Open should check if the operation is permitted for the given flags. Optionally open may also return an arbitrary file handle in the fuse_file_info structure, which will be passed to all subsequent operations on that file.
The fuse_file_info
structure has the following members:
flags
, table, this table is a lua set, see the documentation of posixio.open
writepage
, numberdirect_io
, booleankeep_cache
, booleanflush
, booleanfh
, number, the file handle that the filesystem can write tolock_owner
, numberfs:read (path, buf, size, offset, fi)
Read data from an open file. buf
is a lightuserdata pointing to a buffer of size size
. offset
is a position inside the file.
Read should return exactly the number of bytes requested except on end of file or on error, otherwise the rest of the data will be substituted with zeroes. An exception to this is when the direct_io
mount option is specified, in which case the return value of the read system call will reflect the return value of this operation.
fs:write (path, buf, size, offset, fi)
Write data to an open file. buf
is a lightuserdata pointing to a buffer of size size
. offset
is a position inside the file.
Write should return exactly the number of bytes requested except on error. An exception to this is when the direct_io
mount option is specified (see read operation).
fs:statfs (path, st)
Get file system statistics. st
is a statvfs
structure (see posixio.new
documentation).The 'frsize'
, 'favail'
, 'fsid'
and 'flag'
fields are ignored.
fs:flush (path, fi)
Possibly flush cached data.
BIG NOTE: This is not equivalent to fsync(). It's not a request to sync dirty data.
Flush is called on each fs:close
of a file descriptor. So if a filesystem wants to return write errors in fs:close
and the file has cached dirty data, this is a good place to write back data and return any errors. Since many applications ignore fs:close
errors this is not always useful.
NOTE: The fs:flush
method may be called more than once for each fs:open
. This happens if more than one file descriptor refers to an opened file due to dup(), dup2() or fork() calls. It is not possible to determine if a flush is final, so each flush should be treated equally. Multiple write-flush sequences are relatively rare, so this shouldn't be a problem.
Filesystems shouldn't assume that fs:flush
will always be called after some writes, or that if will be called at all.
fs:release (path, fi)
Release an open file.
Release is called when there are no more references to an open file: all file descriptors are closed and all memory mappings are unmapped.
For every open() call there will be exactly one release() call with the same flags and file descriptor. It is possible to have a file opened more than once, in which case only the last release will mean, that no more reads/writes will happen on the file. The return value of release is ignored.
fs:fsync (path, datasync, fi)
Synchronize file contents. If the datasync
parameter is true
, then only the user data should be flushed, not the meta data.
fs:setxattr (path, name, value, size, flags)
Set extended attributes.
fs:getxattr (path, name, value, size, flags)
Get extended attributes.
fs:listxattr (path, list, size)
List extended attributes.
fs:removexattr (path, name)
Remove extended attributes.
fs:opendir (path, fi)
Open directory. This method should check if the open operation is permitted for this directory.
fs:readdir (path, filler, off, fi)
Read directory. filler
is a function with the prototype filler(name, off, fi)
that must be called for each directory entry.
The filesystem may choose between two modes of operation:
NOTE: This LUSE binding currently only support the first mode of operation. You must pass nil
as off
parameter to the filler
function.
fs:releasedir (path, fi)
Release directory.
fs:fsyncdir (path, datasync, fi)
Synchronize directory contents. If the datasync
parameter is true
, then only the user data should be flushed, naot the meta data.
fs:access (path, mask)
Check file access permissions. This will be called for the access()
system call. If the 'default_permissions'
mount option is given, this method is not called.
This method is not called under Linux kernel versions 2.4.x.
fs:create (path, mode, fi)
Create and open a file.
If the file does not exist, first create it with the specified mode, and then open it.
If this method is not implemented or under Linux kernel versions earlier than 2.6.15, the mknod() and open() methods will be called instead.
fs:ftruncate (path, size, fi)
Change the size of an open file.
This method is called instead of the fs:truncate
method if the truncation was invoked from an ftruncate()
system call.
If this method is not implemented or under Linux kernel versions earlier than 2.6.15, the fs:truncate
method will be called instead.
fs:fgetattr (path, st, fi)
Get attributes from an open file.
This method is called instead of the fs:getattr
method if the file information is available.
Currently this is only called after the fs:create
method if that is implemented (see above). Later it may be called for invocations of fstat()
too.
fs:utimens (path, tv)
Change the access and modification times of a file with nanosecond resolution. tv
is a Lua array containing two other tables, the new access time and modification time respectively. These subtables have two fields each:
sec
, number, time in secondsnsec
, number, the sub-second portion of the time, in nanosecondsThe module contains a number of constants taken from various C, POSIX and Linux headers. Not all error codes are there, but the most common for filesystem operation are defined. Ask if you need more. The bound error codes are: EPERM, ENOENT, ESRCH, EINTR, EIO, ENXIO, E2BIG, ENOEXEC, EBADF, ECHILD, EAGAIN, ENOMEM, EACCES, EFAULT, ENOTBLK, EBUSY, EEXIST, EXDEV, ENODEV, ENOTDIR, EISDIR, EINVAL, ENFILE, EMFILE, ENOTTY, ETXTBSY, EFBIG, ENOSPC, ESPIPE, EROFS, EMLINK, EPIPE, EDOM, ERANGE, ENOSYS.
errno.errno
This pseudo-variable is a getter that can retrieve the last C errno number. It can be compared to other errno constants, or returned to LUSE.
errno.strerror (err)
Returns a string corresponding to the error number err
.
This module exposes some functions to manipulate userdata. It also provides a generic way to create a buffer userdata (without metatable or environment).
userdata.memcpy (to, from, size)
Writes data to a userdata. to
must be a userdata (full or light). from
can be a userdata or a string. size
is the number of bytes copied. No check of the destination or source size is made (it's impossible for light userdata), so this function may read past data end or overwrite memory. Use it with care.
userdata.new (size)
Creates a new userdata buffer of the specified size
. This is a full userdata allocated by Lua. It has two fields: data
, which is a lightuserdata containing the address of the buffer, and size, which is a number containing the size of the buffer. You can also index the buffer with a number key to offset the buffer address (0-based offset). The userdata also have a __tostring
metamethod which converts the content of the userdata to a Lua string.
local ud = userdata.new(2) -- create a 2 byte userdata
print(ud.size) -- size of userdata (2)
print(ud.data) -- address of first byte
print(ud[1]) -- address of second byte
print(tostring(ud)) -- print content of the userdata
userdata.tostring (ud)
This functions converts the content of the full userdata ud
to a string.
This module provides some function to manipulate files and directories. It's a light binding over the POSIX API for files and directories. Unless otherwise stated, these functions return an errno error number. You can compare them with constants in the errno
module or return them to LUSE.
Except for posixio.new, all files are direct binding to POSIX functions. You can get their documentation through your system manual. Some portions of a Linux manual have been copied here.
posixio.new (type [, count])
Allocates a POSIX structure. Type must be the name of a supported POSIX struct among: 'stat'
, 'statvfs'
and 'timeval'
. count
can be used to allocate more than one structure. This is currently only supported with timeval
structures.
The stat
structure has the following members:
dev
, number, ID of device containing fileino
, number, inode numbermode
, table, protection; this table is a lua set, with the following keys possibly present and true: IFBLK
, IFCHR
, IFIFO
, IFREG
, IFDIR
, IFLNK
, IFSOCK
, IRUSR
, IWUSR
, IXUSR
, IRGRP
, IWGRP
, IXGRP
, IROTH
, IWOTH
, IXOTH
, ISUID
, ISGID
, ISVTX
.nlink
, number, number of hard linksuid
, number, user ID of ownergid
, number, group ID of ownerrdev
, number, device ID (if special file)size
, number, total size, in bytesblksize
, number, blocksize for filesystem I/Oblocks
, number, number of blocks allocatedatime
, number, time of last accessmtime
, number, time of last modificationctime
, number, time of last status changeThe statvfs
structure has the following members:
bsize
, number, file system block sizefrsize
, number, fragment sizeblocks
, number, size of fs in f_frsize unitsbfree
, number, # free blocksbavail
, number, # free blocks for non-rootfiles
, number, # inodesffree
, number, # free inodesfavail
, number, # free inodes for non-rootfsid
, number, file system IDflag
, number, mount flagsnamemax
, number, maximum filename lengthThe timeval
structure has the following members:
sec
, number, secondsusec
, number, microsecondsposixio.stat (path, st)
Get file status. path
is the path to a file. st
is a stat
userdata created with posixio.new('stat')
.
posixio.fstat (fd, st)
Get file status. fd
is the fd of an open file. st
is a stat
structure that is filled by posixio.stat
.
posixio.lstat (path, st)
posixio.lstat
is identical to posixio.stat
, except that if path
is a symbolic link, then the link itself is stated, not the file that it refers to.
posixio.opendir (path)
Open a directory.
Returns nil on error, or a directory
userdata on success. See below for the methods of this userdata.
directory:readdir ()
Read a file entry from a directory.
Returns nil on error or end of directory listing, or a dirent
structure (as a userdata) on success. The dirent
structure has the following fields:
ino
, number, inode numberoff
, number, offset to this direntreclen
, number, length of this name
name
, string, filenamedirectory:closedir ()
Close directory.
posixio.mkdir (path)
Create a directory.
posixio.rmdir (path)
Delete a directory.
posixio.mknod (path, mode, dev)
Create a file. mode
is a Lua set (see description of stat
structure in posixio.new
documentation). dev
is the device number.
posixio.unlink (path)
Delete a name and possible the file it refers to.
posixio.open (path, flags)
Open a file. flags
is a Lua set. The set must contain one of these three flags: 'RDWR'
, 'RDONLY'
or 'WRONLY'
. The following optionnal flags are also recognized: APPEND
, ASYNC
, CREAT
, DIRECT
, DIRECTORY
, EXCL
, LARGEFILE
, NOATIME
, NOCTTY
, NOFOLLOW
, NONBLOCK
, NDELAY
, SYNC
, TRUNC
.
Returns -1 on error, or a non-negative number on success. That number is a file descriptor and can be used in subsequent access to this file.
posixio.close (fd)
Close a file. fd
is a file descriptor of an open file.
posixio.read (fd, buf, size)
Read from a file descriptor. posixio.read
attempts to read up to size
bytes from file descriptor fd
into the userdata buffer buf
. buf
can be a light or a full userdata; in either case no size check is performed, so use this function with care.
posixio.write (fd, buf, size)
Write to a file descriptor. posixio.write
writes up to size
bytes to the file referenced by the descriptor fd
from the userdata buffer buf
. buf
can be a light or a full userdata; in either case no size check is performed, so use this function with care.
posixio.lseek (fd, offset, whence)
Reposition read/write offset. The posixio.lseek
function repositions the offset of the open file associated with the file descriptor fildes to the argument offset according to the directive whence as follows:
'SET'
: The offset is set to offset bytes.'CUR'
: The offset is set to its current location plus offset bytes.'END'
: The offset is set to the size of the file plus offset bytes.The lseek() function allows the file offset to be set beyond the end of the file (but this does not change the size of the file). If data is later written at this point, subsequent reads of the data in the gap (a "hole") return null bytes ('\0') until data is actually written into the gap.
posixio.statvfs (path, st)
Get file system statistics. The function posixio.statvfs
returns information about a mounted file system. path
is the pathname of any file within the mounted filesystem. st
is a statvfs
userdata created with posixio.new('statvfs')
.
posixio.utimes (path, times)
Change access and modification times of an inode, with resolution of 1 microsecond. path
is the path of the file to change times, while times
is an array of 2 timeval
structures created with posixio.new('timeval', 2)
.
Note that this function accepts microsecond resolution, while the fs:utimens
method of a FUSE filesystem receives nanosecond resolution times. Make the appropriate conversion.
posixio.rename (oldpath, newpath)
Change the name or location of a file.
posixio.getcwd (buf, size)
Put the path of the current working directory in the userdata buffer buf
of size size
.
Returns the address of buf
as a light userdata on success, a NULL light userdata on error.
local buf = userdata.new(posixio.PATH_MAX)
local result = posixio.getcwd(buf.data, buf.size)
if result~=buf.data then error(errno.strerror(errno.errno)) end
posixio.PATH_MAX
This constant is the maximum number of characters allowed in a path on the current system. It may be useful to allocate some buffers passed to other posixio
functions.


Open Google Console
Set up a continuous delivery pipeline using Jenkins and Google Kubernetes
Engine.
Make sure the following APIs are enabled in Cloud Platform Console:
Open Cloud Shell.
Set your zone by running the following command, substituting your zone for <your-zone>
.
gcloud config set compute/zone <your-zone>
A Git repository contains Kubernetes manifests that deploy Jenkins. The manifests and their settings are described in Configuring Jenkins for Kubernetes Engine.
Run the following command to get the sample code.
git clone https://github.com/GoogleCloudPlatform/continuous-deployment-on-kubernetes.git
Start your Kubernetes cluster with 5 nodes.
cd continuous-deployment-on-kubernetes
gcloud container clusters create contdelivery --num-nodes 5 --scopes "https://www.googleapis.com/auth/projecthosting,storage-rw"
You need a disk volume to pre-populate Jenkins with configurations discussed
in Jenkins on Kubernetes Engine. Kubernetes Engine will mount
this volume into your Jenkins pod.
Run the following command to create a virtual machine from the supplied tarball:
gcloud compute images create jenkins-home-image --source-uri https://storage.googleapis.com/solutions-public-assets/jenkins-cd/jenkins-home-v3.tar.gz
Add a disk to the virtual machine.
gcloud compute disks create jenkins-home --image jenkins-home-image
You need to enable authentication for the Jenkins UI.
Create a random password. Take note of the password for use later in the lab.
export PASSWORD=`openssl rand -base64 15`; echo "Your password is $PASSWORD"; sed -i.bak s#CHANGE_ME#$PASSWORD# jenkins/k8s/options
Create a Kubernetes namespace for Jenkins. Namespaces allow you to use the same resource manifests across multiple environments without needing to give resources unique names. You will include this namespace as a parameter to the commands you send to Kubernetes.
kubectl create ns jenkins
Create a Kubernetes secret. Kubernetes uses this object to provide Jenkins with the default username and password when Jenkins boots.
kubectl create secret generic jenkins --from-file=jenkins/k8s/options --namespace=jenkins
In this section, you'll create a Jenkins deployment and services based on
the Kubernetes resources defined in the jenkins
/k8s
folder of the sample code.
The kubetcl
apply
command creates a Jenkins deployment
that contains a container for running Jenkins and a persistent disk that
contains the Jenkins home directory. Keeping the home directory on the
persistent disk ensures that your critical configuration data is maintained,
even if the pod running your Jenkins master goes down.
The kubetcl
apply
command also creates two services
that enable your Jenkins master to be accessed by other pods in the cluster:
Create the Jenkins deployment and services.
kubectl apply -f jenkins/k8s/
Confirm that the pod is running. Look for Running
in the STATUS
column.
kubectl get pods -n jenkins
Create an ingress resource that manages the external load balancing of the Jenkins user interface service. The ingress resource also acts as an SSL terminator to encrypt communication between users and the Jenkins user interface service.
Confirm that the services are set up correctly by listing the services in
the Jenkins namespace. Confirm that jenkins
-discovery
and jenkins-ui
display. If not,
ensure the steps above were all run.
kubectl get svc -n jenkins
Create an SSL certificate and key.
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/tls.key -out /tmp/tls.crt -subj "/CN=jenkins/O=jenkins"
Upload the certificate to Kubernetes as a secret.
kubectl create secret generic tls --from-file=/tmp/tls.crt --from-file=/tmp/tls.key -n jenkins
Create the HTTPS load balancer using an ingress.
kubectl apply -f jenkins/k8s/lb/ingress.yaml
Check the status of the load balancer's health checks using the following command:
kubectl describe ingress jenkins --namespace jenkins
Repeat this step until you see the backends
field (not shown)
display HEALTHY
.
Once your backends are healthy, you can get the Jenkins URL by running the following command.
echo "Jenkins URL: https://`kubectl get ingress jenkins -n jenkins -o jsonpath='{.status.loadBalancer.ingress[0].ip}'`"; echo "Your username/password: jenkins/$PASSWORD"
Visit the URL from the previous command in your browser and log in with the
credentials displayed.
You'll deploy the sample application, gceme
, in your continuous
deployment pipeline. The application is written in the Go language and is
located in the repo's sample-app
directory. When you run the gceme
binary on a Compute Engine instance, the app
displays the instance's metadata in an info card as follows:
The application mimics a microservice by supporting two operation modes.
gceme
listens on port 8080 and returns Compute Engine instance metadata in JSON
format.gceme
queries the backend gceme
service and renders the resulting JSON in the user interface.You will deploy the application into two different environments:
In Google Cloud Shell, navigate to the sample application directory.
cd sample-app
Create the Kubernetes namespace to logically isolate the deployment.
kubectl create ns production
Create the production and canary deployments and services using the kubectl
apply
commands.
kubectl apply -f k8s/production -n production
kubectl apply -f k8s/canary -n production
kubectl apply -f k8s/services -n production
Scale up the production environment frontends. By default, only one replica
of the frontend is deployed. Use the kubectl
scale
command to ensure that you have
at least 4 replicas running at all times.
kubectl scale deployment gceme-frontend-production -n production --replicas 4
Confirm that you have 5 pods running for the frontend: 4 for production traffic and 1 for canary releases. This means that changes to your canary release will only affect 1 out of 5 (20%) of users. You should also have 2 pods for the backend: 1 for production and 1 for canary.
kubectl get pods -n production -l app=gceme -l role=frontend
kubectl get pods -n production -l app=gceme -l role=backend
Retrieve the external IP for the production services.
kubectl get service gceme-frontend -n production
Store the frontend service load balancer IP in an environment variable for use later.
export FRONTEND_SERVICE_IP=$(kubectl get -o jsonpath="{.status.loadBalancer.ingress[0].ip}" --namespace=production services gceme-frontend)
Confirm that both services are working by opening the frontend external IP address in your browser.
Check the version output of the service by hitting the /version
path. It should read 1.0.0.
curl http://$FRONTEND_SERVICE_IP/version
Create a copy of the gceme
sample app and push it to Cloud
Source Repositories.
Initialize the sample-app
directory as its own Git repository. Replace [PROJECT_ID]
with your current project
ID in the following command. To find your current project ID you can run gcloud
config list project
.
gcloud alpha source repos create default
git init
git config credential.helper gcloud.sh
git remote add origin https://source.developers.google.com/p/[PROJECT_ID]/r/default
Set the username and email address for your Git
commits. Replace [EMAIL_ADDRESS]
with your Git email address.  Jenkins will use your cluster's service account credentials in order to download code from the Cloud Source Repositories.
In the Jenkins user interface, click Credentials in the left navigation.
Click Jenkins in the top group.
Click Global Credentials.
Click Add Credentials in the left navigation.
Select Google Service Account from metadata from the Kind drop-down.
Click OK.
There are now two global credentials. Make a note of the second credential's
name for use later on in this tutorial.
Navigate to your Jenkins user interface and configure a Pipeline job.
Click the Jenkins link in the top left of the interface.
Click the New Item link in the left navigation.
Name the project sample-app, then choose the Multibranch Pipeline option and click OK.
On the next page, click Add Source and select git.
Paste the HTTPS clone URL of your sample-app
repo in Cloud Source
Repositories into the Project Repository field. Replace [PROJECT_ID]
with your project ID.
https://source.developers.google.com/p/[PROJECT_ID]/r/default
From the Credentials drop-down, select the name of the credentials you created when adding your service account in the previous steps.
Under Build Triggers, select the checkbox Build Periodically, and enter five asterisks (* * * * *) into the Schedule field. This ensures that Jenkins checks your code repository for changes once every minute. This field uses the CRON expression syntax to define the schedule.
Your job configuration should look like this:
Click Save.
After you complete these steps, a job named "Branch indexing"
runs. This meta-job identifies the branches in your repository and ensures
changes haven't occurred in existing branches. If you click sample-app
in the top left, the master
job should be seen.
Development branches are a set of environments your developers use to test their code changes before submitting them for integration into the live site. These environments are scaled-down versions of your application, but need to be deployed using the same mechanisms as the live environment.
To create a development environment from a feature branch, you can push the branch to the Git server and let Jenkins deploy your environment.
Create a development branch and push it to the Git server.
git checkout -b new-feature
The Jenkinsfile that defines that pipeline is written using the Jenkins Pipeline Groovy syntax. Using a Jenkinsfile allows an entire build pipeline to be expressed in a single file that lives alongside your source code. Pipelines support powerful features like parallelization and requiring manual user approval.
In order for the pipeline to work as expected, you need to modify the Jenkinsfile to set your project ID.
Open the Jenkinsfile in your favorite terminal editor. For example using Vi.
vi Jenkinsfile
Replace REPLACE_WITH_YOUR_PROJECT_ID
with your project ID. To get your project ID, run gcloud
config get-value project
def
project = 'REPLACE_WITH_YOUR_PROJECT_ID' def appName = 'gceme' def feSvcName = "${appName}-frontend" def imageTag = "gcr.io/${project}/${appName}:${env.BRANCH_NAME}.${env.BUILD_NUMBER}"
Save the file and exit the editor. In Vi, enter :wq
.
In order to demonstrate changing the application, you will be change the gceme
cards from blue to orange.
Open html.go
and replace the two instances of blue
with orange
.
Open main.go
and change the version number from 1.0.0
to 2.0.0
. The version is
defined in this line:
const version string = "2.0.0"
Commit and push your changes. This will kick off a build of your development environment.
git add Jenkinsfile html.go main.go
git commit -m "Version 2.0.0"
git push origin new-feature
After the change is pushed to the Git repository,
navigate to the Jenkins user interface where you can see that your build
started for the new-feature
branch It can take up to a minute for the changes to be picked up.
After the build is running, click the down arrow next to the build in the
left navigation and select Console Output.
Track the output of the build for a few minutes and watch for the kubectl
--namespace=new-feature apply...
messages to begin. Your new-feature
branch will now be deploying to your cluster.
In a development scenario, you wouldn't use a public-facing load balancer.
To help secure your application, you can use kubectl
proxy
. The proxy authenticates
itself with the Kubernetes API and proxies requests
from your local machine to the service in the cluster without exposing your
service to the Internet.
Start the proxy in the background.
kubectl proxy &
Verify that your application is accessible by sending a request to localhost
and letting kubectl
proxy
forward it to your service. You
should see it respond with 2.0.0
,
which is the version that is now running.
curl http://localhost:8001/api/v1/proxy/namespaces/new-feature/services/gceme-frontend:80/version
Now that you have verified that your app is running your latest code in the development environment, deploy that code to the canary environment.
Create a canary branch and push it to the Git server.
git checkout -b canary
git push origin canary
In Jenkins, you should see the canary
pipeline has kicked off. Once complete, you can check the service URL to ensure
that some of the traffic is being served by your new version. You should see
about 1 in 5 requests returning version 2.0.0.
export FRONTEND_SERVICE_IP=$(kubectl get -o jsonpath="{.status.loadBalancer.ingress[0].ip}" --namespace=production services gceme-frontend)
while true; do curl http://$FRONTEND_SERVICE_IP/version; sleep 1; done
You can stop this command by pressing Ctrl-C
.
Now that your canary release was successful and you haven't heard any customer complaints, you can deploy to the rest of your production fleet.
 Once complete, you can check the service URL to ensure
that all of the traffic is being served by your new version, 2.0.0. You can
also navigate to the site using your browser to see your orange cards.
export FRONTEND_SERVICE_IP=$(kubectl get -o jsonpath="{.status.loadBalancer.ingress[0].ip}" --namespace=production services gceme-frontend)
while true; do curl http://$FRONTEND_SERVICE_IP/version; sleep 1; done
You can stop this command by pressing Ctrl-C
.


Sometimes information and resources, especially older ones, are only available in printed or other older formats. Whether it's from a UCI library, coursework handouts, or other university information, these materials can be converted into electronic format by request.
Access to the request form requires UCInetID login, but if you do not have a UCInetID, staff from the Disability Services Center or UCI Library can make the request on your behalf and you will be notified by e-mail when your conversion has been completed.
Please note that all requests may be subject to eligibility, resources, and/or other conversion-related factors.
The CAM request form can be used for each piece of media you would like converted. If you have the only copy or if DSC cannot otherwise acquire the source material, you may have to bring it to our office.


Tue Mar 25, 2008
I’ve officially uploaded the latest version of my ePortolio - you can check it out here.
This website uses some flash elements and some fancy css coding and is basically geared towards technical writing employers as a way to showcase my work. I may expand it in the future to include other samples too.
For those who are interested, I designed it in Dreamweaver, Illustrator, and Photoshop. I used FlashSpring Pro 2 to convert a Powerpoint to flash. It’s best viewed using the latest version of any browser with a resolution of 1024x768. It’s also a bit flashier than the portfolio on this blog, which includes everything, including the kitchen sink.


WeatherGMX.wsdl
CODE
Added
5/21/2015 6.56 PM
Changed
5/21/2015 6.56 PM
Removed
5/21/2015 6.56 PM
Added
5/21/2015 6.56 PM
Changed
5/21/2015 6.56 PM
Removed
5/21/2015 6.56 PM


"We can't let the people know, sir."
The Secretary to the Protector was adamant, but he didn't press the point. He knew that the argument was already won. The Protector, sat opposite him, didn't seem to be listening to a word his secretary said. His chair was turned three-quarters to the right, so that he looked at the wall rather than his employee, and his left hand drummed faintly on the crescent-shaped top of his desk.
"Sir?" the secretary prompted, quietly.
With a sigh the Protector nodded, his jowls shaking. The most powerful man on the planet looked old and haggard; his eyes were the eyes of someone who hadn't slept for perhaps two straight days. Only his secretary knew that the Protector had been awake for at least four, and was actually looking remarkably well. The secretary nodded back, a single, controlled tilt of the head.
"Two shipments have arrived today," the secretary said, his manner becoming businesslike. "Over three thousand, two hundred crates. That leaves just under nine thousand crates to arrive, uh-" (the secretary flicked through the contents of his pad, which bleeped in protest) "-in five days time. Four ships, including the Manticore."
The Protector's eyes flickered and he swivelled round towards the secretary. "The Manticore? Are you sure that's wise? The flagship of the fleet?"
The secretary scratched the scalp under his forelock. They had both worked together for long enough to know that meant he was feeling anxious. "It should be fine, sir. We've took steps—cosmetic steps—to make it look like a scow. And it will be flying in under full radar and IR cover, at night." He shrugged. "It was the biggest ship we had, and we needed it."
"Yes. Yes, you're right. Well. Distribution: what about distribution? It's all very well getting all the crates onto the surface, but how will we distribute them among the populace?"
Again the secretary consulted his notes. "We believe we can achieve at least 90% diaspora within... oh, within the week following arrival of all crates, Protector. And without anybody knowing. We can proceed faster than that but there's a greater risk that people will learn the truth about the crates."
The truth hung in the air between them, momentarily. His secretary's eyes followed his gaze as the Protector glanced out of the window. The secretary took a breath and continued.
"I have seconded the necessary departments and their ministers already, of course, under Protection Act 117. We can therefore use the ministries' normal delivery methods, and this should arouse the least suspicion."
"Who will be in charge of delivery?"
"Minister Findley has recommended a trusted aide of his, a Mr McLaghlin, previously Captain McLaghlin. Still is, I suppose. I will brief him fully on the task ahead."
The Protector nodded. "Word must not get out, Secretary."
"No, Protector."
"Imagine how bad it would be for morale. Nobody else must know. Ever."
"Yes, Protector."
The old man turned away. He began tapping his fingers on his desk again. His secretary wondered if he had been dismissed, and he was about to rise from his seat when the Protector said suddenly:
"We are doing what's right, aren't we, Secretary?"
The secretary paused. From the way his master had spoken, he couldn't be sure if the question was really directed at him, or at some tribunal or impeachment council many years in the future.
"Protector, we're doing everything we can."
"Do everything you can to keep this quiet, McLaghlin," the secretary told Minister Findley's aide. They had met up later that day in the vast storage bin set aside—in total secrecy—for the cargo arriving from the colonies. It was the interior of a hollowed-out mountain, created as an emergency bunker during the Last Great War. A few hours after each ship had come in, landing in a burst of fire and steam, wisps of cloud had begun to form near the ceiling of the bunker. The pilot of the second ship had sworn he had felt rain.
"How am I to distribute the crates, sir?" McLaghlin was a military man, with a clipped voice that chewed the end off each sentence.
"Normal channels. Completely normal channels. I have instructed the staff at the relevant departmental warehouses and you will be permitted to deliver crates to these locations-" (he handed McLaghlin a sheaf of documents) "-under these pretexts-" (another sheaf.) "Make sure you match them up, as the staff at each warehouse have obviously not been briefed on the true nature of your cargo."
McLaghlin looked round the vast, two-thirds empty space ahead of him. He couldn't tell if their voices had been echoing or not during the conversation. Whatever noise had been returned from the far-flung walls was too weak and too delayed.
"How many crates in total, sir?"
"Twelve thousand by the end of the week. We will provide flash transport capable of handling five hundred crates at a time. Leave the Pacific journeys till last, as they will take longest."
"Very good, sir."
"Anything else?" the secretary asked. McLaghlin paused, and the secretary found it refreshing that someone was, for once, thinking about the answer to a question before submitting it.
"No, sir," he eventually barked.
"This comes straight from the Protector, McLaghlin. Tell nobody. We cannot let this become common knowledge."
With the minister gone, McLaghlin relaxed. Although he had been told what was in those crates, it was only fair that he make sure for himself. This wasn't curiosity; years of service in the fleet squeezed the curiosity out of men like McLaghlin. This was simple contingency planning. Until he could believe that the contents of the crates were what he had been told they were, then he had no confidence in the plans that the secretary had made. Professionalism: that was all. A little maverick, but the secretary would surely understand.
He wandered over to an old supply cupboard, and rummaged around inside it for a suitable implement. By luck there was a claw hammer towards the bottom of a pile of brushes and cleaning materials. He grabbed this and carried it to the nearest wall of wood. There were a few crates standing singly, each around a metre and a half high and several metres long and wide. McLaghlin could see all sides apart from the base on the floor: they were blank, with no markings or lettering of any sort. Close up he thought the wood looked unusual, but couldn't say how: perhaps the trees had been grown in the colonies.
He slid the claw in between the lid and body of one of the crates and levered. Nothing. He pushed down harder, and still it did not budge. Finally, he leant on the hammer with all his weight and, with a sensation like a long splinter being eased out, the crate opened and a handful of long nails lost their grip on one half of the join that they bridged. McLaghlin pulled on the lid, grunting as it shifted upwards. There was now a big enough gap and he looked inside.

His eyes widened a little. Not sure what to think he checked another crate, which yielded a little more easily to the hammer. Inside were white flakes and husks, like packaging material filling the crate almost to its brim. Wheat, he thought, or maybe corn: he wasn't sure whether or not they were the same thing.
Vegetables. Millions of tonnes, certainly once the rest of the cargo had arrived. McLaghlin had once had to eat hydroponically grown vegetables, and the food in the crates reminded him of those. They were a little too big, as if their growth had been rushed. Looking at the rest of the crates, McLaghlin couldn't begin to guess at the extent of the farms that had produced the contents of all these crates.
Using the same hammer he banged the crooked nails back into the crates, sealing them shut. Nobody must know, not even the guards on the gates of this facility. So as he approached those gates he rearranged the expression on his face, pokered it until it was as blank as the wooden boxes behind him.
The doors began to trundle apart. As the hot breeze blew in from outside he sniffed, and remembered again why it had come to this. Stepping outside he saw, from one end of the horizon to the other, scorched, dead fields. Not a single plant grew, nor a single insect buzzed. It was the lasting legacy of the Last Great War. McLaghlin looked around him, at the desolation and the dry heat, and silently agreed that the secretary's plan was a good one. Earth, after all, needed all the help it could get.


For this week, I started to build the scene in the Unity3D and combine it with OBS virtual camera. It is with regret that I hadn't thought of a specific concept about my altar. Thus mainly what I did it filled up my space with my "secondaries"(maybe that's my point - familiar but unimportant things floating and jumping around me - somehow digitally display the intimacy I have with my surroudings happening in real environment)
1st attempt
I added animations to the flowers and the candle models, So they are jumping and repeating in front of me - like my loyal guardians. And other stuffs floating and rotating in the area.
Final Version
I think this series of technologies is a powerful strategy to be applied into various digital practices. And also worth to think about the relationship between physical and digital objects through these open ended experiments.
For the week4, We started to use Metashape to scan our objects and create their digital twins. At very initial step, I misunderstood the photoing process - only took photos of the object at the same flat. Plus, I was really bad at managing the distance between my phone and object, so the dense cloud looked really chaotic.\n My first try:
After practiced several times, I became more experienced at taking good photo collection. So here are more photogrammetry I made:


To remove these limitations and boost your business with the new agency-tailored set of features, purchase Agency Growth Kit


Click inside the white area to add new notes.
Click on an existing note to remove it.
Press <space> to toggle playing.


Press release
Education Minister Elizabeth Truss announces more than £2 million of funding so the best computing teachers can help train thousands more teachers.
Education Minister Elizabeth Truss today announced more than £2 million of funding so the best computing teachers can help train thousands more to teach the rigorous new curriculum.
The funding will allow BCS , The Chartered Institute for IT, to recruit 400 master teachers in computer science over the next 2 years, by building on its existing network of excellence in teaching computer science ( NoE ).
Each master teacher will pass on their skills and subject knowledge to 40 schools - so that computing teachers in 16,000 primary and secondary schools will be in position to deliver the computer science element of the new computing curriculum and the new computer science GCSE. This continuous professional development programme will enhance the preparations that schools will already be making so they can deliver the new curriculum.
Computing (previously ICT ) will remain a statutory subject for all pupils in primary and secondary school. The draft curriculum has a strong emphasis on the principles of computer science and practical programming, including algorithms, coding and hardware. Computer science will be included as a science option for the English Baccalaureate from January 2014.
Elizabeth Truss made the announcement at an event co-hosted by Facebook and the Gates Foundation, the charitable organisation run by Microsoft founder Bill Gates and his wife Melinda.
She said:
Computer science is a rigorous, fascinating and intellectually challenging subject. The new computing curriculum will mean pupils have a real understanding of how digital technologies work - allowing them to create new technologies rather than being passive consumers of them.
This brings exciting challenges for computing teachers - we are raising our expectations of the subject knowledge they should have, including how computers work, programming and coding.
We want a generation of children being taught how to write computer animations or design apps for smartphones - not be bored by lessons in how to fill in spreadsheets or learn word processing.
These master teachers will spread good practice, knowledge and expertise throughout schools.
Bill Mitchell, director of BCS Academy of Computing, part of BCS , The Chartered Institute for IT, said:
Children from the age of 5 will be taught computer science once the new statutory curriculum for computing comes into force. Therefore we need to ensure all teachers can teach the computer science and programming elements of the new curriculum.
I am delighted that the Department for Education is extending the funding for the network of teaching excellence in computer science.
Our plan now is to work in partnership with the Computing At School group ( CAS ), universities and schools to extend the network into a national infrastructure that can provide CPD opportunities for 16,000 teachers over the next 2 years.
Steve Beswick, director of education, Microsoft, said:
Microsoft is delighted that the DfE is supporting the BCS / CAS Network of Excellence.
We need our children to learn the foundations of computational thinking at school so that they have the knowledge and skills they need to build successful careers here in the UK. This belief is integral to our Get On programme which aims to help 300,000 young people get inspired, get skilled and get a job. We will continue to work with DfE and teachers to help schools deliver the new computing curriculum.
Simon Milner, Director of Policy, UK & Ireland, Facebook, said:
It’s vital for young people to receive the best digital education possible so we’re pleased to see today’s announcement.
The UK’s digital industries offer awesome opportunities for young people, and it’s important that schools and educational institutions receive the necessary backing to enable pupils to grasp those opportunities.
Through our partnerships with organisations like Apps for Good, we’ve seen first-hand that with the right teaching, many young people can go all the way. Today’s announcement will help young people to develop and put their skills to good use.
Simon Peyton-Jones, Principal Researcher at Microsoft Research Cambridge, said:
As Chair of the CAS working group, I am absolutely delighted to see the DfE putting substantial support into equipping our excellent ICT teachers to deliver computer science, as part of the new computing curriculum. The challenge is enormous, and the timescale is short: I hope this grant will be spark that ignites a broad partnership of schools, universities, employers, and professional bodies to inspire, support, and encourage our teachers as they move forward.
Professor Steve Furber CBE FRS FREng, chair of the working group for the Royal Society’s report Shut down or restart? The way forward for computing in UK schools, said:
We are very pleased that the DfE has taken on board another of the key recommendations of our report by beginning to address our concerns about the number of teachers with sufficient subject knowledge and understanding to deliver a rigorous computing curriculum.
This funding is a very welcome contribution towards the professional development of the large number of specialist teachers that are needed to deliver an ambitious curriculum that truly excites students about future opportunities in computing.
Ian Livingstone, Chair Next Gen Skills, said:
I’m delighted that £2 million of funding is being provided by government to enable the BCS to recruit 400 master teachers to form a network of teaching excellence in computer science to deliver the new curriculum. This is a very important step to fast forward the teaching of essential skills for the digital world in which today’s children live, to enable them to create technology rather than being simply passive users of it. Digital manufacturing and services are becoming main drivers of the UK economy.
The Department for Education has already announced that it is offering scholarships and bursaries to recruit and train talented new teachers and have prepared others through subject knowledge enhancement courses.
The DfE funding to BCS is £2.085 million for 2 years (2013 to 2014 and 2014 to 2015)
BCS is the Chartered Institute for IT and accredits computer science and IT qualifications, including almost all university computer science degrees.
The DfE previously provided BCS with £150,000 in the year 2012 to 2013 to establish the network of teaching excellence for computer science teachers. This network has forged links between schools, universities and employers. BCS has also harnessed pro bono support from organisations such as Microsoft and Google. Since September 2012 the network has created an initial cohort of 28 master teachers in computer science teachers to lead CPD programmes for other local teachers. More than 120 schools have committed to becoming lead schools that support the development of CPD for other schools. DfE funding supports the release of teachers to participate in the network, and most administration and management time is provided pro bono.
Media enquiries: Central newsdesk
Telephone: 020 7783 8300
General enquiries: Ministerial and Public Communications Division
Department for Education
Castle View House, East Lane
Runcorn
Cheshire
WA7 2GJ
Telephone: 0870 000 2288
Website: www.education.gov.uk/help/contactus
Published: 24 April 2013


| Jumps down one entry in the list (if tapped in search box, jumps to first result) |
Down Arrow |
| Jumps up one entry in the list (if tapped at first result of first category, jumps to search box) |
Up Arrow |
| Jumps down a maximum of 5 entries in the list |
PageDown |
| Jumps up a maximum 5 entries in the list |
PageUp |
| Jumps to first result of next category (if there are results in than 1 categories, otherwise same as Down Arrow Key) |
Tab |
| Jumps to last result of previous category (if there are results in more than 1 category, otherwise same sas Up Arrow Key) |
SHIFT-Tab |
| |
| The Enter key will select the element (same as clicking on the element). |
| Down/Up/PageDown/PageUp also jump categories when at end/start of list. |


|
UMI3D Unity SDK
2.5.b.221125
A UMI3D sdk implementation using Unity
|
Interface for selectable objects. More...
Public Member Functions | |
| void | Select () |
| Raise selection event. More... | |
| void | Subscribe (UnityAction callback) |
| Subscribe a callback to the selection event. More... | |
| void | UnSubscribe (UnityAction callback) |
| Unsubscribe a callback from the selection event. More... | |
Interface for selectable objects.
| void umi3d.common.ISelectable.Select | ( | ) |
Raise selection event.
Implemented in umi3d.cdk.menu.AbstractMenuItem, umi3d.cdk.menu.view.AbstractDisplayer, umi3d.cdk.menu.interaction.ManipulationMenuItem, and umi3d.cdk.menu.view.AbstractManipulationMenuItemDisplayer.
| void umi3d.common.ISelectable.Subscribe | ( | UnityAction | callback | ) |
Subscribe a callback to the selection event.
| callback | Callback to raise on selection |
Implemented in umi3d.cdk.menu.AbstractMenuItem, and umi3d.cdk.menu.view.AbstractDisplayer.
| void umi3d.common.ISelectable.UnSubscribe | ( | UnityAction | callback | ) |
Unsubscribe a callback from the selection event.
| callback | Callback to unsubscribe |
Implemented in umi3d.cdk.menu.AbstractMenuItem, and umi3d.cdk.menu.view.AbstractDisplayer.


The Old World is New Again
I have long been a wine lover. However, most of my experience has been local to my home state of California. Up until recently my understanding of wine regions has been old world (Europe) vs. new world (everywhere else). Their comparison being old traditions vs. new experimentation. I’ve always taken pride in the fact that I live somewhere in the latter category. California is indeed a land of wine and viticulture experimentation. However, now that I am in the wine business and study it more globally, I as well as my colleagues are finding this old vs. new comparison no longer applies. The combination of global markets, better educated enologists and viticulturists, changing climate, the internet, as well as other factors are forcing innovation on a global scale that defies traditional thought.
My current trip to Spain confirms this. Penedès has always been associated with Cava. Cava, in turn, has always been labeled as an affordable alternative to Champagne. This what they teach us in class and is confirmed in most wine shops worldwide. However, as I mentioned in my earlier post during my visit to Albet I Noya when one actually visits these places they will see a very different world. The fact is, there is a lot of hard work being done by wine innovators across the globe that unfortunately largely goes unseen. Why? I suspect it has a lot to do with our ridiculous systems of trade, importation and distribution, as well as our own personal biases… but that’s for another post.
My adventures today just confirm the groundswell of innovation happening here in Spain.
I spent the day in Vila Franca. I lovely village in the heart of Penedès that was celebrating its Catalonian Fiesta when we arrived. While nearby Sant Sadurni d’Anoia is the home of Cava, Vila Franca boasts a new Penedès wine museum called the “Vinseum” which is immediately adjacent to its famous Basilica Santa Maria. When visiting Penedès wine country I highly recommend you make this your first stop…yes it includes wine tasting. More importantly, it has an exhaustive amount of local wine making, viticulture, history, and business information and artifacts presented in a modern multimedia format. An educational primer that will get you started and is well worth the 7â‚¬.
Now, on to wine tasting. I tasted several wines there and this is where I complete my reference to innovation. I didn’t taste any Cava. Instead, I tasted:
These wines were not only unique in varietal make up and style, but also in region as they did not all come from Penedès.
First, the 2013 Clot de les Soleres 100% Penedès Macabeu. Immediately, I got an understanding of where Cava gets a lot of its flavor. This wine smelled and tasted like Cava. The lack of filtration was very evident as it was a bit cloudy and actually had some visible particulates. However, the flavor was clean citrus, honeydew, a bit spritzy, and having some yeasty notes from lees contact.
The 2013 Jané Ventura Rosat Sellecio 10 Vinyes from the north eastern edge of Penedès near Barcelona was a bit beguiling. The nice strawberry, watermelon fruit was overwhelmed by the herbal thyme and strong rose petal which made the finish a little raspy. However, one couldn’t over look the complexity offered by the eclectic mix of varietals.
The best of the wines I tasted at the Vinseum was the 2011 Vins del Tros Tremenda. Cariñena is a favored grape in Catalonia and is used a lot in Priorat. This wine came out of a little-known DO called Terra Alta which lies just south of Priorat. The warmth of this region was reflected in its 15.5% alcohol. However, this was somewhat balanced by its mouth watering acidity and firm tannins. The fruit of tart currants was countered by strong tobacco and licorice. This wine is a yin-yang of extremes held in tenuous balance that both excites the palette…and makes it a little nervous.


Warehouse Chief Reed:
Not every Dwarf is granted membership in our Iron Gate Guild. Why are you here?
"To tell you about Silver Scale Balanki's work."


This section introduces several additional types of data in CGNS. These items are by no means necessary to include when getting started, but it is likely that most users will eventually want to implement some of them into their CGNS files at some point in the future. The section ends with a discussion on the usage of links.
The ConvergenceHistory_t node can be used to store
data associated with the convergence of a CFD solution.
For example, one may wish to store the global coefficient of lift
as a function of iterations. In this case,
this variable should be stored at the CGNSBase_t level
of the CGNS file.
This is achieved using the API in the following FORTRAN code
segment:
c WRITE CONVERGENCE HISTORY INFORMATION TO EXISTING CGNS FILE include 'cgnslib_f.h' c open CGNS file for modify call cg_open_f('grid.cgns',CG_MODE_MODIFY,index_file,ier) if (ier .ne. CG_OK) call cg_error_exit_f c we know there is only one base (real working code would check!) index_base=1 c go to base node call cg_goto_f(index_file,index_base,ier,'end') c create history node (SIDS names it GlobalConvergenceHistory at base level) c ntt is the number of recorded iterations call cg_convergence_write_f(ntt,'',ier) c go to new history node call cg_goto_f(index_file,index_base,ier,'ConvergenceHistory_t', + 1,'end') c write lift coefficient array (user must use SIDS-standard name here) call cg_array_write_f('CoefLift',RealDouble,1,ntt,cl,ier) c close CGNS file call cg_close_f(index_file,ier)
Descriptor nodes, which record character strings and can be inserted nearly everywhere in a CGNS file, have many possible uses. Users can insert comments or descriptions to help clarify the content of some data in the CGNS file. In the SIDS overview section, we mention a possible use for descriptor nodes to describe data that is UserDefinedData_t. Another potentially desirable use of the descriptor node is to maintain copies of the entire input file(s) from the CFD application code. Because descriptor nodes can include carriage returns, entire ASCII files can be "swallowed" into the CGNS file. In this way, a future user can see and retrieve the exact input file(s) used by the CFD code to generate the data contained in the CGNS file. The only ambiguity possible would be whether the CFD code itself has changed since that time; but if the CFD code has strict version control, then complete recoverability should be possible.
An example that writes a descriptor node at the CGNSBase_t level
is given here:
c WRITE DESCRIPTOR NODE AT BASE LEVEL include 'cgnslib_f.h' c open CGNS file for modify call cg_open_f('grid.cgns',CG_MODE_MODIFY,index_file,ier) if (ier .ne. CG_OK) call cg_error_exit_f c we know there is only one base (real working code would check!) index_base=1 c go to base node call cg_goto_f(index_file,index_base,ier,'end') c write descriptor node (user can give any name) text1='Supersonic vehicle with landing gear' text2='M=4.6, Re=6 million' textstring=text1//char(10)//text2 call cg_descriptor_write_f('Information',textstring,ier) c close CGNS file call cg_close_f(index_file,ier)
The node DataClass_t denotes the class of the data. When data is dimensional, then DataClass_t = Dimensional. The DataClass_t node can appear at many levels in the CGNS hierarchy; precedence rules dictate that a DataClass_t lower in the hierarchy supersedes any higher up.
For dimensional data, one generally is expected to indicate the
dimensionality of each particular variable through the use of
DataClass_t, DimensionalUnits_t, and
DimensionalExponents_t. An example of this is
shown in the following code segment in which units are added
to the structured grid and
cell center flow solution
used previously.
c WRITE DIMENSIONAL INFO FOR GRID AND FLOW SOLN include 'cgnslib_f.h' c open CGNS file for modify call cg_open_f('grid.cgns',CG_MODE_MODIFY,index_file,ier) if (ier .ne. CG_OK) call cg_error_exit_f c we know there is only one base (real working code would check!) index_base=1 c we know there is only one zone (real working code would check!) index_zone=1 c we know there is only one FlowSolution_t (real working code would check!) index_flow=1 c we know there is only one GridCoordinates_t (real working code would check!) index_grid=1 c put DataClass and DimensionalUnits under Base call cg_goto_f(index_file,index_base,ier,'end') call cg_dataclass_write_f(Dimensional,ier) call cg_units_write_f(Kilogram,Meter,Second,Kelvin,Degree,ier) c read fields call cg_nfields_f(index_file,index_base,index_zone,index_flow, + nfields,ier) do if=1,nfields call cg_field_info_f(index_file,index_base,index_zone, + index_flow,if,idatatype,fieldname,ier) if (fieldname .eq. 'Density') then exponents(1)=1. exponents(2)=-3. exponents(3)=0. exponents(4)=0. exponents(5)=0. else if (fieldname .eq. 'Pressure') then exponents(1)=1. exponents(2)=-1. exponents(3)=-2. exponents(4)=0. exponents(5)=0. else write(6,'('' Error! this fieldname not expected: '',a32)') + fieldname stop end if c write DimensionalExponents call cg_goto_f(index_file,index_base,ier,'Zone_t',1, + 'FlowSolution_t',1,'DataArray_t',if,'end') call cg_exponents_write_f(RealSingle,exponents,ier) enddo c read grid call cg_ncoords_f(index_file,index_base,index_zone,ncoords,ier) exponents(1)=0. exponents(2)=1. exponents(3)=0. exponents(4)=0. exponents(5)=0. do ic=1,ncoords c write DimensionalExponents call cg_goto_f(index_file,index_base,ier,'Zone_t',1, + 'GridCoordinates_t',1,'DataArray_t',ic,'end') call cg_exponents_write_f(RealSingle,exponents,ier) enddo c close CGNS file call cg_close_f(index_file,ier)
Notice in this example that a DataClass_t node and a DimensionalUnits_t node are placed near the top of the hierarchy, under CGNSBase_t. DataClass_t is specified as Dimensional, and DimensionalUnits_t are specified as (Kilogram, Meter, Second, Kelvin, Degree). These specify that, by and large, the entire database is dimensional with MKS units (anything that is not dimensional or not MKS units could be superseded at lower levels). Then, for each variable locally, one need only specify the DimensionalExponents, where one exponent is defined for each unit.
The layout of part of the resulting CGNS file from the above example is shown below. The density has units of kilogram/meter3, and the pressure has units of kilogram/(meter-second2). The grid coordinates (not shown in the figure) have units of meters.
This example is for the relatively common occurrence of CFD data that is purely nondimensional, for which the reference state is arbitrary (unknown). This type is referred to as NormalizedByUnknownDimensional. Another nondimensional type, NormalizedByDimensional, for which the data is nondimensional but the reference state is specifically known, is not covered here.
For a NormalizedByUnknownDimensional database, the DataClass is recorded as such, but also a ReferenceState is necessary to define the nondimensionalizations used. (A ReferenceState_t node can be used for any dataset to indicate the global reference state (such as free stream), as well as quantities such as the reference Mach number and Reynolds number. A ReferenceState_t node was not included in the previous section, but it could have been.)
For the current example, we do not go into detail regarding the
choices of the items which should define the reference state for a
NormalizedByUnknownDimensional database.
We simply show in the example some typical choices which very often
would likely be included.
A detailed discussion of how the
data in ReferenceState_t defines the nondimensionalizations
is given in the SIDS document.
c WRITE NONDIMENSIONAL INFO include 'cgnslib_f.h' c open CGNS file for modify call cg_open_f('grid.cgns',CG_MODE_MODIFY,index_file,ier) if (ier .ne. CG_OK) call cg_error_exit_f c we know there is only one base (real working code would check!) index_base=1 c put DataClass under Base call cg_goto_f(index_file,index_base,ier,'end') call cg_dataclass_write_f(NormalizedByUnknownDimensional,ier) c put ReferenceState under Base call cg_state_write_f('ReferenceQuantities',ier) c Go to ReferenceState node, write Mach array and its dataclass call cg_goto_f(index_file,index_base,ier,'ReferenceState_t',1, + 'end') call cg_array_write_f('Mach',RealDouble,1,1,xmach,ier) call cg_goto_f(index_file,index_base,ier,'ReferenceState_t',1, + 'DataArray_t',1,'end') call cg_dataclass_write_f(NondimensionalParameter,ier) c Go to ReferenceState node, write Reynolds array and its dataclass call cg_goto_f(index_file,index_base,ier,'ReferenceState_t',1, + 'end') call cg_array_write_f('Reynolds',RealDouble,1,1,reue,ier) call cg_goto_f(index_file,index_base,ier,'ReferenceState_t',1, + 'DataArray_t',2,'end') call cg_dataclass_write_f(NondimensionalParameter,ier) c Go to ReferenceState node to write reference quantities: call cg_goto_f(index_file,index_base,ier,'ReferenceState_t',1, + 'end') c First, write reference quantities that make up Mach and Reynolds: c Mach_Velocity call cg_array_write_f('Mach_Velocity',RealDouble,1,1,xmv,ier) c Mach_VelocitySound call cg_array_write_f('Mach_VelocitySound',RealDouble, + 1,1,xmc,ier) c Reynolds_Velocity call cg_array_write_f('Reynolds_Velocity',RealDouble, + 1,1,rev,ier) c Reynolds_Length call cg_array_write_f('Reynolds_Length',RealDouble, + 1,1,rel,ier) c Reynolds_ViscosityKinematic call cg_array_write_f('Reynolds_ViscosityKinematic',RealDouble, + 1,1,renu,ier) c c Next, write flow field reference quantities: c Density call cg_array_write_f('Density',RealDouble,1,1,rho0,ier) c Pressure call cg_array_write_f('Pressure',RealDouble,1,1,p0,ier) c VelocitySound call cg_array_write_f('VelocitySound',RealDouble,1,1,c0,ier) c ViscosityMolecular call cg_array_write_f('ViscosityMolecular',RealDouble, + 1,1,vm0,ier) c LengthReference call cg_array_write_f('LengthReference',RealDouble, + 1,1,xlength0,ier) c VelocityX call cg_array_write_f('VelocityX',RealDouble,1,1,vx,ier) c VelocityY call cg_array_write_f('VelocityY',RealDouble,1,1,vy,ier) c VelocityZ call cg_array_write_f('VelocityZ',RealDouble,1,1,vz,ier) c close CGNS file call cg_close_f(index_file,ier)
In this case, the only information added to the CGNS file is at the CGNSBase_t level. Note that Mach and Reynolds (which are stored under ReferenceState) are variables that are known as "NondimensionalParameter"s, so they must each contain a DataClass child node stating this (the local DataClass nodes supersede the overall NormalizedByUnknownDimensional data class that holds for everything else).
The layout of the relevant portion of the resulting CGNS file from the above example is shown below. Many of the reference quantities that appear under ReferenceState_t have been left out of the figure to conserve space.
The FlowEquationSet_t node is useful for describing how a flow solution was generated. This is one of the useful self-descriptive aspects of CGNS that may improve the usefulness and longevity of a CFD dataset. For example, under this node, information such as the following may be recorded: the flow field was obtained by solving the thin-layer Navier-Stokes equations (with diffusion only in the j-coordinate direction); the Spalart-Allmaras turbulence model was employed, and an ideal gas assumption was made with γ = 1.4.
The following FORTRAN code segment writes some of
the above example flow equation set information
under the Zone_t node from our earlier
single-zone structured
grid example. (Note that
a FlowEquationSet_t node can also be placed at a higher level,
under the CGNSBase_t node. The
usual precedence rules apply).
c WRITE FLOW EQUATION SET INFO include 'cgnslib_f.h' c open CGNS file for modify call cg_open_f('grid.cgns',CG_MODE_MODIFY,index_file,ier) if (ier .ne. CG_OK) call cg_error_exit_f c we know there is only one base (real working code would check!) index_base=1 c we know there is only one zone (real working code would check!) index_zone=1 c existing file must be 3D structured (real working code would check!) c Create 'FlowEquationSet' node under 'Zone_t' call cg_goto_f(index_file,index_base,ier,'Zone_t',index_zone, + 'end') c equation dimension = 3 ieq_dim=3 call cg_equationset_write_f(ieq_dim,ier) c c Create 'GoverningEquations' node under 'FlowEquationSet' call cg_goto_f(index_file,index_base,ier,'Zone_t',index_zone, + 'FlowEquationSet_t',1,'end') call cg_governing_write_f(NSTurbulent,ier) c Create 'DiffusionModel' node under 'GoverningEquations' call cg_goto_f(index_file,index_base,ier,'Zone_t',index_zone, + 'FlowEquationSet_t',1,'GoverningEquations_t',1,'end') idata(1)=0 idata(2)=1 idata(3)=0 idata(4)=0 idata(5)=0 idata(6)=0 call cg_diffusion_write_f(idata,ier) c c Create 'GasModel' under 'FlowEquationSet' call cg_goto_f(index_file,index_base,ier,'Zone_t',index_zone, + 'FlowEquationSet_t',1,'end') call cg_model_write_f('GasModel_t',Ideal,ier) c Create 'SpecificHeatRatio' under GasModel call cg_goto_f(index_file,index_base,ier,'Zone_t',index_zone, + 'FlowEquationSet_t',1,'GasModel_t',1,'end') call cg_array_write_f('SpecificHeatRatio',RealSingle,1,1, + gamma,ier) c Create 'DataClass' under 'SpecificHeatRatio' call cg_goto_f(index_file,index_base,ier,'Zone_t',index_zone, + 'FlowEquationSet_t',1,'GasModel_t',1,'DataArray_t', + 1,'end') call cg_dataclass_write_f(NondimensionalParameter,ier) c close CGNS file call cg_close_f(index_file,ier)
This particular example is specific to a 3-D structured zone. In an unstructured zone, the use of DiffusionModel is not valid. The layout of the relevant portion of the resulting CGNS file from the above example is shown below.
Time-dependent data (data with multiple flow solutions) can also be stored in a CGNS file. Different circumstances may produce data with multiple flow solutions; for example:
This section gives an example for type 1 only. Readers interested in the two other types should refer to the SIDS document. For a non-moving grid, the method for storing the multiple flow solutions is relatively simple: multiple FlowSolution_t nodes, each with a different name, are placed under each Zone_t node. However, there also needs to be a mechanism for associating each FlowSolution_t with a particular time and/or iteration. This is accomplished through the use of BaseIterativeData_t (under CGNSBase_t) and ZoneIterativeData_t (under each Zone_t). BaseIterativeData_t contains NumberOfSteps, the number of times and/or iterations stored, and their values. ZoneIterativeData_t contains FlowSolutionPointers as a character data array. FlowSolutionPointers is dimensioned to be of size NumberOfSteps, and contains the names of the FlowSolution_t nodes within the current zone that correspond with the respective times and/or iterations. Finally, a SimulationType_t node is placed under CGNSBase_t to designate what type of simulation (e.g., TimeAccurate, NonTimeAccurate) produced the data. (Note: the SimulationType_t node is not restricted for use with time-dependent data; any CGNS dataset can employ it!)
The following FORTRAN code segment writes some of the above
information, using our earlier single-zone
structured grid example.
For the purposes of this example, it is assumed that there are 3 flow
solutions from a time-accurate simulation, to be output as a function of
time to the CGNS file.
The variables r1 and p1 represent the density and
pressure at time 1, r2 and p2 are at time 2, and
r3 and p3 are at time 3.
c WRITE FLOW SOLUTION TO EXISTING CGNS FILE include 'cgnslib_f.h' c open CGNS file for modify call cg_open_f('grid.cgns',CG_MODE_MODIFY,index_file,ier) if (ier .ne. CG_OK) call cg_error_exit_f c we know there is only one base (real working code would check!) index_base=1 c we know there is only one zone (real working code would check!) index_zone=1 c set up the times corresponding to the 3 solutions to be c stored: time(1)=10. time(2)=20. time(3)=50. c define 3 different solution names (user can give any names) solname(1) = 'FlowSolution1' solname(2) = 'FlowSolution2' solname(3) = 'FlowSolution3' c do loop for the 3 solutions: do n=1,3 c create flow solution node call cg_sol_write_f(index_file,index_base,index_zone,solname(n), + Vertex,index_flow,ier) c write flow solution (user must use SIDS-standard names here) if (n .eq. 1) then call cg_field_write_f(index_file,index_base,index_zone,index_flow, + RealDouble,'Density',r1,index_field,ier) call cg_field_write_f(index_file,index_base,index_zone,index_flow, + RealDouble,'Pressure',p1,index_field,ier) else if (n .eq. 2) then call cg_field_write_f(index_file,index_base,index_zone,index_flow, + RealDouble,'Density',r2,index_field,ier) call cg_field_write_f(index_file,index_base,index_zone,index_flow, + RealDouble,'Pressure',p2,index_field,ier) else call cg_field_write_f(index_file,index_base,index_zone,index_flow, + RealDouble,'Density',r3,index_field,ier) call cg_field_write_f(index_file,index_base,index_zone,index_flow, + RealDouble,'Pressure',p3,index_field,ier) end if enddo c create BaseIterativeData nsteps=3 call cg_biter_write_f(index_file,index_base,'TimeIterValues', + nsteps,ier) c go to BaseIterativeData level and write time values call cg_goto_f(index_file,index_base,ier,'BaseIterativeData_t', + 1,'end') call cg_array_write_f('TimeValues',RealDouble,1,3,time,ier) c create ZoneIterativeData call cg_ziter_write_f(index_file,index_base,index_zone, + 'ZoneIterativeData',ier) c go to ZoneIterativeData level and give info telling which c flow solution corresponds with which time (solname(1) corresponds c with time(1), solname(2) with time(2), and solname(3) with time(3)) call cg_goto_f(index_file,index_base,ier,'Zone_t', + index_zone,'ZoneIterativeData_t',1,'end') idata(1)=32 idata(2)=3 call cg_array_write_f('FlowSolutionPointers',Character,2,idata, + solname,ier) c add SimulationType call cg_simulation_type_write_f(index_file,index_base, + TimeAccurate,ier) c close CGNS file call cg_close_f(index_file,ier)
As cautioned for earlier coding snippets, dimensions must be set appropriately for all variables. The variable time (which is an array dimensioned size 3 in this case) contains the time values stored under BaseIterativeData_t. The layout of the resulting CGNS file from the above example is shown below. Compare this figure with the layout of a CGNS file for a simple Cartesian structured grid with a single flow solution. To conserve space, the GridCoordinates_t, ZoneType_t, and all nodes underneath FlowSolution_t have been left off.
A link associates one node to another within a CGNS tree, or even one node to another in a separate CGNS file altogether. This can be useful when there is repeated data; rather than write the same data multiple times, links can point to the data written only once.
One very important use of links that may be required by many users is to point to grid coordinates. This usage comes about in the following way. Suppose a user is planning to use a particular grid for multiple cases. There are several options for how to store the data. Among these are:
Item 1 is conceptually the most direct, and is certainly the recommended method in general (this is the way all example CGNS files have been portrayed so far in this document). However, if the grid is very large, then this method causes a lot of storage space to be unnecessarily used to store the same grid points multiple times. Item 2 may or may not be a viable option. If the user is striving to have the CGNS file be completely self-descriptive, with ReferenceState and FlowEquationSet describing the relevant conditions, then this method cannot be used if the ReferenceState or FlowEquationSet is different between the cases (for example, different Mach numbers, Reynolds numbers, or angles of attack). Item 3 removes this restriction. It uses links to the grid coordinates within the same file. Item 4 is similar to item 3, except that the grid coordinates and each flow solution are stored in separate files altogether.
A sample layout showing the relevant portions of two separate CGNS files for an example of item 4 is shown below. Note that for multiple-zone grids, each zone in FILE 1 in this example would have a separate link to the appropriate zone's grid coordinates in FILE 2.
The CGNS API now has the capability to specify links and to query link information in a CGNS file. Previously this was only possible by use of the ADF core library software. However, when a CGNS file is open for writing and the link creation call is issued, the link information is merely recorded and the actual link creation is deferred until the file is written out upon closing it. Therefore, any attempt to go to a location in a linked file while the CGNS file is open for writing will fail. This problem does not exist when a CGNS file is open for modification as link creation is immediate.
Reading a linked CGNS file presents no difficulties for the API, because links are "transparent." As long as any separate linked files keep their name unchanged, and maintain the same position (within the Unix-directory) relative to the parent file, opening the parent file will automatically access the linked ones.


{% extends "base.html" %} {% load wagtailcore_tags wagtailimages_tags comments mptt_tags molo_commenting_tags i18n %} {% block content %}
{% trans "It will be reviewed by the team and may be removed if it breaks our Platform rules" %}
{% trans "Thanks!" %}
{% trans "This comment has been reported." %}
{% trans "It will be reviewed by the team and may be removed if it breaks our Platform rules" %}
{% trans "Back to article" %}


Homework
By:
murr
Mon Jun 22 2020
Click the links below to navigate to the homework.
Homework
WileyPlus Homework 1
WileyPlus Homework 2


Date: Thanksgiving Break, Friday
Drug: The Almighty Mushroom
Time: 9PM
This was the Thanksgiving of my first year away from home at college. I met up with a couple of my best friends from high school and we decided to get a bag of shrooms. We knew a friend who had a large quantity of great hydroponic shrooms. So the 3 of us (Me, A and M) bought 10g of shrooms.
9 PM - We all pop a cap, A & M leave to go to the store to buy a beer. I stay at the house playing Tony Hawk 3 on the Playstation 2. They are gone for about 30minutes or so. During this time I consumed between 4 and 5 grams. I noticed the effects starting to coming on. The game was beginning to look surreal.
9:30 - A&M get back, we drink a couple beers while playing video games. I force feed A a little more than 3g of shrooms, M eats the rest (a little over 2g).
10:30 - I'm feeling really good. My trip is coming on strong and I'm really happy. It felt like there was a dense cloud inside of my body that was made of pure happiness. We decide to go to a party and pile into A's car.
[Erowid Note: Driving while intoxicated or tripping is dangerous and irresponsible because it endangers other people. Don't do it!] We drive around for a while listening to Incubus' Morning View. More specifically the last song on the CD, Aqueous Transmission. For those who havenít heard it, it is a great song to listen to while drugged up. Really peaceful relaxing music, set the mood perfectly. I notice while riding shotgun that I can see in the dark, I can see very far and it isnít really dark outside (to me).
10:45 - We arrive at the party safe. Lots of people, good looking girls, beer, pot and fun. I drink 3 or 4 more beers and smoke a number of bowls while here. The girl who's house we were at had a dijeredoo and played it. It was euphoric, one of the greatest sounds I have ever heard. She showed me how to play it and that was even cooler.
1:30 - We leave the party. I'm feeling beyond euphoric. I'm tripping really hard. M is tired so A starts driving towards his house. I start getting very confused at this point. I begin to lose my grip on reality. I don't know what real is. I feel very compelled to do something but I don't know what. I repeatedly described to my friends feeling like I had to find the answer to a question, but I didn't know what the question was. All I knew was that I had to find the answer. I'd been confused about a number of things since I left for college and now it was all coming back to me along with a plethora of other questions I could not answer.
1:45 - Almost at M's house. A and I are having a discussion about how people werenít real (meaning that the persona [face, guise, etc...] they use when around others isnít who they really are), it's hard to remember exactly how the conversation went but it was deep, really deep.
1:50 - At M's house, I'm holding back tears.
1:51 - M gone, just me and A (best friend from high school) now. The feelings inside become too much and I start to cry. I feel really sad and depressed. A talks to me and tries to calm me down. I'm feeling alone and worthless. Trip has taken a total 180. Not only am I in a pit of despair but we have another problem. We have no marijuana to calm me down with (yet another tragedy). We drive around for awhile and talk. I start to feel a little better but still sad.
2:45 - We get a call from a friend, G, who has some weed. By this time I've stopped crying and feel better. In fact I now feel great, I feel refreshed, renewed and like a whole new person. We pick up G and with him go to J's (another friend) house. We get to J's and G goes inside while A and I talk outside. I tell him about some of the resolutions I had made and one of the problems that had bothered me so much that I had solved.
3:10 - The problem that had been plaguing me was what to do with my life. I had no idea what I wanted to major in before the trip but afterwards I had a lot confidence in my future. I decided to I wanted to pursue a career in Psychology or Philosophy. (I am currently taking classes in both and have fallen in love with both subjects.) The prospect of being a psychologist interested me very much and still does today (3 and a half months later). I also decided that I needed a creative outlet, desperately. A and a couple other close friends of mine are musicians and I decided that I wanted to learn to play an instrument, particularly the guitar. I am just starting to play and it has been great. I also am starting to experiment with writing, another interest brought forth by my trip. I havenít done much writing yet, but I'm working on it.
 Since my trip I've been much happier with my life and have gained a new sense of confidence. I can only offer two pieces of advice: Don't trip alone and be prepared if you eat a lot.
Peace
T.S.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Microsoft CRM Software Development Kit (SDK)
Here. From Ramon: This SDK provides the information necessary for developers to integrate their applications into Microsoft CRM or to build a vertical solution on the Microsoft CRM platform. An architectural overview includes descriptions of the object and security models, as well as the integration points. The API references are documented and the database schema is provided. There is a “How To” section with sample code.


Exceptions Demo 2
Controller Advice Exception Handling
Summary
- Demo running with profiles: profiles
- Key classes:
ControllerWithoutExceptionHandlers
,
GlobalExceptionHandlingControllerAdvice
.
- See for more details.
Details
The exceptions below are are not handled by the controller that threw
them, but rely on a
ControllerAdvice
instead.
- Controller:
demo2.web.ControllerWithoutExceptionHandlers
- Controller Advice:
demo2.web.GlobalExceptionHandlingControllerAdvice
To fully understand this demo, review the output in the server
(console) log as you click the links below.
The behavior of this demo is the same as Demo 1 -
just implemented differently.
Demo
- Throw OrderNotFoundException
- should generate a 404 (in the Spring Boot error page).
- Throw DataIntegrityViolationException
- should generate a 409 (in the Spring Boot error page).
- Throw SQLException -
should return a specific database-error page.
- Throw DataAccessException
- should also return the database-error page. Demonstrates catching
multiple exceptions with one handler.
- Throw SupportInfoException
- should generate a support oriented error page with hidden
stack-trace hidden in the page source. Whether this is a good idea,
is debatable! but it shows how to add extra information into the
model for the exception view to use.
Demo 3: Using a
Simple Mapping Exception Handler.
Demo 3: Using a Simple Mapping Exception
Handler.


What is Operating System?
A Unix-like "Operating System" is a software collection of:
✅ Applications
✅ Libraries
✅ Developer Tools
✅ Kernel
Kernel is a program to allocate resources and talk to the hardware.
What is GNU?
GNU's Not Unix
Is a project to provide a complete Unix-like Operating System
which is entirely based on FreeSoftware.
What is Free Sofware?
Free Software
Is a matter of the users freedom to run, copy, distribute, study, change and improve the software.
What is Linux?
Linux Is a kernel for GNU Operating-System, released in 1991 and licensed under GNU GPL later.
What is GNU/Linux?
GNU/Linux Is a term for a GNU
Operating-System which uses Linux as it's kernel!
What is a Distribution?
A GNU/Linux Distribution (Distro)
Is a collection of mostly Free software available for install or live run, plus a repository of other software packaged to be installed on system.


Index
Design
AutoPyFactory can serve to different queues in different ways thanks to its modular design based on plug-ins. There are currently 5 types of plug-ins:
WMS Status Plug-in:
it queries a given WMS system.
E.g. PandaWMSStatusPlugin queries PanDA.
The only requirements is the WMS must provide for an API.
This API has to return the number of jobs in different status (ready, running, finished...) per queue,
in such a way that information can be converted internally into APF nomenclature.
Batch Status Plug-in:
it queries the specific batch system being used to submit jobs (or pilots).
E.g. CondorBatchStatusPlugin queries condor (condor_q)
Scheduler Plug-in:
it is the component in charge of making a decision based on the information provided by the two Status Plug-ins.
It implements a given algorithm to decide how many jobs (or pilots) should be submitted next cyle.
E.g. ActivatedSchedPlugin decides the number of new jobs based on the number of jobs in a ready status in the WMS service,
with some restrictions to prevent burning a CE.
FixedSchedPlugin always submits a fixed number of jobs. Etc.
Execution Plug-in:
It is the component in charge of submitting new jobs (or pilots),
based on the decision made by the Sched Plug-in.
Examples are CondorGT2BatchSubmitPlugin, CondorGT5BatchSubmitPlugin, CondorLocalBatchSubmitPlugin, CondorCREAMBatchSubmitPlugin, and CondorEC2BatchSubmitPlugin.
Configuration Plug-in:
a plug-in to retrieve extra configuration files.
E.g PandaConfigPlugin queries SchedConfig.


Welcome to Team 30's Starter Project page. Our names are DJ, Amanda, Gloria, and Kevin!
We designed a basic social media web app for artists to showcase and discuss about their art with other fellow artists as well.
Click the links above to login and visit your page. You can post messages on your page, and you can visit other user pages if you have their URL.


On this page you will find the basic projects that support the Computer Graphics course at [link:https://www2.ufjf.br/ufjf/ UFJF].
All projects were developed in [link:https://threejs.org three.js], a cross-browser JavaScript / API library used to create and display animated 3D graphics on the web.
You will find in this page projects regarding geometric models, 3D object modeling, scene and virtual camera concepts and topics about lighting and texture usage.
Additionally you will find examples of more advanced techniques such as raytracing, virtual reality and augmented reality.
Our course notes will be available (in portuguese) here.
Three.js revision used: r


{pboot:list scode=7}
[list:title]
[list:subtitle]
[list:description]
{/pboot:list}
{pboot:sort scode=1}
查看更多
{/pboot:sort}
{pboot:content id=19}
{/pboot:content}
[content:title]
[content:subtitle]
{pboot:sort scode=4}
{/pboot:sort}
{pboot:sort scode=2}
{/pboot:sort}
{pboot:sort scode=2}
{/pboot:sort}
{pboot:sort scode=2}
{/pboot:sort}


class DRb::DRbSSLSocket::SSLConfig
SSLConfig handles the needed SSL information for establishing a DRbSSLSocket connection, including generating the X509 / RSA pair.
An instance of this config can be passed to DRb::DRbSSLSocket.new, DRb::DRbSSLSocket.open and DRb::DRbSSLSocket.open_server
See ::new for more details
Constants
Public Class Methods
Create a new DRb::DRbSSLSocket::SSLConfig instance
The DRb::DRbSSLSocket will take either a
config
Hash or an instance of SSLConfig, and will setup the certificate for its
session for the configuration. If want it to generate a generic
certificate, the bare minimum is to provide the :SSLCertName
Config options¶ ↑
From config
Hash:
- :SSLCertificate
-
An instance of OpenSSL::X509::Certificate. If this is not provided, then a generic X509 is generated, with a correspond :SSLPrivateKey
- :SSLPrivateKey
-
A private key instance, like OpenSSL::PKey::RSA. This key must be the key that signed the :SSLCertificate
- :SSLClientCA
-
An OpenSSL::X509::Certificate, or Array of certificates that will used as ClientCAs in the SSL Context
- :SSLCACertificatePath
-
A path to the directory of CA certificates. The certificates must be in PEM format.
- :SSLCACertificateFile
-
A path to a CA certificate file, in PEM format.
- :SSLTmpDhCallback
-
A DH callback. See OpenSSL::SSL::SSLContext#tmp_dh_callback
- :SSLVerifyMode
-
This is the SSL verification mode. See OpenSSL::SSL::VERIFY_* for available modes. The default is OpenSSL::SSL::VERIFY_NONE
- :SSLVerifyDepth
-
Number of CA certificates to walk, when verifying a certificate chain.
- :SSLVerifyCallback
-
A callback to be used for additional verification. See OpenSSL::SSL::SSLContext#verify_callback
- :SSLCertificateStore
-
A OpenSSL::X509::Store used for verification of certificates
- :SSLCertName
-
Issuer name for the certificate. This is required when generating the certificate (if :SSLCertificate and :SSLPrivateKey were not given). The value of this is to be an Array of pairs:
[["C", "Raleigh"], ["ST","North Carolina"], ["CN","fqdn.example.com"]]
See also OpenSSL::X509::Name
- :SSLCertComment
-
A comment to be used for generating the certificate. The default is “Generated by Ruby/OpenSSL”
Example¶ ↑
These values can be added after the fact, like a Hash.
require 'drb/ssl' c = DRb::DRbSSLSocket::SSLConfig.new {} c[:SSLCertificate] = OpenSSL::X509::Certificate.new(File.read('mycert.crt')) c[:SSLPrivateKey] = OpenSSL::PKey::RSA.new(File.read('mycert.key')) c[:SSLVerifyMode] = OpenSSL::SSL::VERIFY_PEER c[:SSLCACertificatePath] = "/etc/ssl/certs/" c.setup_certificate
or
require 'drb/ssl' c = DRb::DRbSSLSocket::SSLConfig.new({ :SSLCertName => [["CN" => DRb::DRbSSLSocket.getservername]] }) c.setup_certificate
# File lib/drb/ssl.rb, line 126 def initialize(config) @config = config @cert = config[:SSLCertificate] @pkey = config[:SSLPrivateKey] @ssl_ctx = nil end
Public Instance Methods
A convenience method to access the values like a Hash
# File lib/drb/ssl.rb, line 134 def [](key); @config[key] || DEFAULT[key] end
Accept connection to IO tcp
, with
context of the current certificate configuration
# File lib/drb/ssl.rb, line 149 def accept(tcp) ssl = OpenSSL::SSL::SSLSocket.new(tcp, @ssl_ctx) ssl.sync = true ssl.accept ssl end
Connect to IO tcp
, with context of
the current certificate configuration
# File lib/drb/ssl.rb, line 140 def connect(tcp) ssl = ::OpenSSL::SSL::SSLSocket.new(tcp, @ssl_ctx) ssl.sync = true ssl.connect ssl end
Ensures that :SSLCertificate and :SSLPrivateKey have been provided or that a new certificate is generated with the other parameters provided.
# File lib/drb/ssl.rb, line 159 def setup_certificate if @cert && @pkey return end rsa = OpenSSL::PKey::RSA.new(1024){|p, n| next unless self[:verbose] case p when 0; $stderr.putc "." # BN_generate_prime when 1; $stderr.putc "+" # BN_generate_prime when 2; $stderr.putc "*" # searching good prime, # n = #of try, # but also data from BN_generate_prime when 3; $stderr.putc "\n" # found good prime, n==0 - p, n==1 - q, # but also data from BN_generate_prime else; $stderr.putc "*" # BN_generate_prime end } cert = OpenSSL::X509::Certificate.new cert.version = 3 cert.serial = 0 name = OpenSSL::X509::Name.new(self[:SSLCertName]) cert.subject = name cert.issuer = name cert.not_before = Time.now cert.not_after = Time.now + (365*24*60*60) cert.public_key = rsa.public_key ef = OpenSSL::X509::ExtensionFactory.new(nil,cert) cert.extensions = [ ef.create_extension("basicConstraints","CA:FALSE"), ef.create_extension("subjectKeyIdentifier", "hash") ] ef.issuer_certificate = cert cert.add_extension(ef.create_extension("authorityKeyIdentifier", "keyid:always,issuer:always")) if comment = self[:SSLCertComment] cert.add_extension(ef.create_extension("nsComment", comment)) end cert.sign(rsa, OpenSSL::Digest::SHA1.new) @cert = cert @pkey = rsa end
Establish the OpenSSL::SSL::SSLContext with the configuration parameters provided.
# File lib/drb/ssl.rb, line 206 def setup_ssl_context ctx = ::OpenSSL::SSL::SSLContext.new ctx.cert = @cert ctx.key = @pkey ctx.client_ca = self[:SSLClientCA] ctx.ca_path = self[:SSLCACertificatePath] ctx.ca_file = self[:SSLCACertificateFile] ctx.tmp_dh_callback = self[:SSLTmpDhCallback] ctx.verify_mode = self[:SSLVerifyMode] ctx.verify_depth = self[:SSLVerifyDepth] ctx.verify_callback = self[:SSLVerifyCallback] ctx.cert_store = self[:SSLCertificateStore] @ssl_ctx = ctx end


Health Checker is a website that will show you a list of symptoms, and for each symptom the medical conditions that are possible. It can also fetch the treatment online for a particular medical condition and the nearest doctors based on your location. It can also tell you your medical condition from a sentence having a recognizable symptom.