| deleteAllVisibleCookies |
|
|
| open |
/vivo/ |
|
| assertTitle |
VIVO |
|
| type |
querytext |
primates |
| clickAndWait |
//input[@value='Search'] |
|
| assertTitle |
primates - VIVO Search Results |
|
| verifyElementPresent |
link=people |
|
| verifyElementPresent |
link=activities |
|
| verifyElementPresent |
link=courses |
|
| verifyElementPresent |
link=events |
|
| verifyElementPresent |
link=organizations |
|
| verifyElementPresent |
link=equipment |
|
| verifyElementPresent |
link=research |
|
| verifyElementPresent |
link=locations |
|
| verifyElementPresent |
link=Primates in the Wild |
|
| verifyTextPresent |
Primates in the Wild Performance |
|
| verifyElementPresent |
link=Introduction to Primates |
|
| verifyTextPresent |
Introduction to Primates Course |
|
| verifyElementPresent |
link=Primates-r-us |
|
| verifyTextPresent |
Primates-r-us Company |
|
| verifyElementPresent |
link=Primate Happenings |
|
| verifyTextPresent |
Primate Happenings Blog Posting |
|
| verifyElementPresent |
link=Primate Info |
|
| verifyTextPresent |
Primate Info Database |
|
| verifyElementPresent |
link=Primate Health |
|
| verifyTextPresent |
Primate Health Concept |
|
| verifyElementPresent |
link=Primate Quad |
|
| verifyTextPresent |
Primate Quad Geographic Location |
|
| verifyElementPresent |
link=Primate Feeder |
|
| verifyTextPresent |
Primate Feeder Equipment |
|
| verifyElementPresent |
link=Primate Diet |
|
| verifyTextPresent |
Primate Diet Concept |
|
| verifyElementPresent |
link=Primate College of America |
|
| verifyTextPresent |
Primate College of America College |
|
| verifyElementPresent |
link=Primate Health Talks |
|
| verifyTextPresent |
Primate Health Talks Seminar Series |
|
| verifyElementPresent |
link=Primate Research Laboratory |
|
| verifyTextPresent |
Primate Research Laboratory Laboratory |
|
| verifyElementPresent |
link=Portable Primate Habitat |
|
| verifyTextPresent |
Portable Primate Habitat Equipment |
|
| verifyElementPresent |
link=Primate Elderly Care |
|
| verifyTextPresent |
Primate Elderly Care Grant |
|
| verifyElementPresent |
link=Introduction to Primate Health |
|
| verifyTextPresent |
Introduction to Primate Health Course |
|
| verifyElementPresent |
link=Primate Health and Fitness |
|
| verifyTextPresent |
Primate Health and Fitness Invited Talk |
|
| verifyElementPresent |
link=Primate University of America |
|
| verifyTextPresent |
Primate University of America University |
|
| verifyElementPresent |
link=Primate Colleges of the World |
|
| verifyTextPresent |
Primate Colleges of the World Consortium |
|
| verifyElementPresent |
link=Primate Health Check |
|
| verifyTextPresent |
Primate Health Check Event |
|
| verifyElementPresent |
link=Primate Health Conference |
|
| verifyTextPresent |
Primate Health Conference Conference |
|
| verifyElementPresent |
link=Primate Heart Health |
|
| verifyTextPresent |
Primate Heart Health Service |
|
| verifyElementPresent |
link=New Primate Students |
|
| verifyTextPresent |
New Primate Students Workshop |
|
| verifyElementPresent |
link=Primate Habitat Research Grant |
|
| verifyTextPresent |
Primate Habitat Research Grant Grant |
|
| verifyElementPresent |
link=Primate Memorial Building |
|
| verifyTextPresent |
Primate Memorial Building Building |
|
| verifyElementPresent |
link=Primate Student of the Year |
|
| verifyTextPresent |
Primate Student of the Year Award or Honor |
|
| clickAndWait |
link=2 |
|
| assertTitle |
primates - VIVO Search Results |
|
| verifyElementPresent |
link=Best Primate College |
|
| verifyTextPresent |
Best Primate College Award or Honor |
|
| verifyElementPresent |
link=Primate History Library |
|
| verifyTextPresent |
Primate History Library Library |
|
| verifyElementPresent |
link=Primate Survival Planning Grant |
|
| verifyTextPresent |
Primate Survival Planning Grant Grant |
|
| verifyElementPresent |
link=Primate College of New York |
|
| verifyTextPresent |
Primate College of New York College |
|
| verifyElementPresent |
link=Primate Research Lab Room 123 |
|
| verifyTextPresent |
Primate Research Lab Room 123 Facility |
|
| verifyElementPresent |
link=Animal Health |
|
| verifyTextPresent |
Animal Health Concept |
|
| verifyElementPresent |
link=Ape Health |
|
| verifyTextPresent |
Ape Health Concept |
|
| verifyElementPresent |
link=Elderly Care |
|
| verifyTextPresent |
Elderly Care Concept |
|
| verifyElementPresent |
link=Jane Memorial Building |
|
| verifyText |
//div[@id='wrapper-content']/div/ul/li[9]/span |
Building |
| verifyElementPresent |
link=exact:http://primatehealthintro.cornell.edu |
|
| verifyTextPresent |
http://primatehealthintro.cornell.edu Webpage |
|
| verifyElementPresent |
link=Human and Ape Brain Comparison |
|
| verifyTextPresent |
Human and Ape Brain Comparison Human Study |
|
| verifyElementPresent |
link=Person, Polly |
|
| verifyText |
//div[@id='wrapper-content']/div/ul/li[12]/span |
Person |
| verifyElementPresent |
link=Gorilla Moving Company |
|
| verifyTextPresent |
Gorilla Moving Company Transport Service |
|
| verifyElementPresent |
link=PHC Proceedings |
|
| verifyTextPresent |
PHC Proceedings Proceedings |
|
| verifyElementPresent |
link=State Fair Park |
|
| verifyText |
//div[@id='wrapper-content']/div/ul/li[15]/span |
Facility |
| verifyElementPresent |
link=USA222333444555 |
|
| verifyTextPresent |
USA222333444555 Patent |
|
| verifyElementPresent |
link=Africa |
|
| verifyTextPresent |
Africa Continent Transnational Region |
|
| verifyElementPresent |
link=Kenya |
|
| verifyTextPresent |
Kenya Country |
|
| clickAndWait |
link=Home |
|
| assertTitle |
VIVO |
|


^[A-Za-z_][0-9A-Za-z_]*$
^[^<>]+$
Must be at least 8
characters long
Must contain a minimum of 1
items
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"Group"
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"Module"
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"Sequential"
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"Concatenate"
If the conditions in the "If" tab are respected, then the conditions in the "Then" tab should be respected. Otherwise, the conditions in the "Else" tab should be respected.
"Reshape"
Must contain a minimum of 1
items
Value must be greater or equal to 1
^(<<variable:([-+/*0-9A-Za-z_]+)>>|<<auto>>)$
.+\.jsonnet
"flatten"
Must contain a minimum of 1
items
Value must be greater or equal to 0
Must contain a minimum of 2
items
All property whose name matches the following regular expression must respect the following conditions
Property name regular expression:^[0-9]+$
Must contain a minimum of 2
items
Value must be greater or equal to 1
^(<<variable:([-+/*0-9A-Za-z_]+)>>|<<auto>>)$
Must contain a minimum of 1
items
^[A-Za-z_][0-9A-Za-z_]*( +-> +[A-Za-z_][0-9A-Za-z_]*)+$
Must contain a minimum of 1
items
Must contain a minimum of 1
items
Value must be greater or equal to 1
^(<<variable:([-+/*0-9A-Za-z_]+)>>|<<auto>>)$


Thank you for taking the time to help us improve our service
Please select your citizenship
Are you a current, future or returned expat?
What info would you like to be highlighted in our magazine? (Check all that apply)
How did you find out about Cuenca Expats Magazine?
Any comments or suggestions?


{% extends 'base.html' %} {% load static %} {% block title %} Delete the review?? {% endblock title %} {% block body %} {% if request.user.is_authenticated %}
Do you want to delete {{ reviews.movie_name }} ?


|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |
| Packages that use NativeBehavior | |
|---|---|
| com.innowhere.jnieasy.core.mem | Provides utility classes and interfaces to manage the life cycle of native instances, native memory attachment, read and write, and Dynamic Link Library managers. |
| com.innowhere.jnieasy.core.method | Provides the interfaces to be implemented by native capable classes (user defined or predefined) related to methods. |
| com.innowhere.jnieasy.core.typedec | Provides utility interfaces to declare native types. |
| Uses of NativeBehavior in com.innowhere.jnieasy.core.mem |
|---|
| Methods in com.innowhere.jnieasy.core.mem that return NativeBehavior | |
|---|---|
NativeBehavior |
DynamicLibrary.findBehaviorByName(java.lang.String nativeName,
NativeBehaviorSignature sig)
Returns the registered native method instance with the specified native name and signature. |
NativeBehavior |
DynamicLibrary.findBehaviorBySignature(java.lang.String signature)
Returns the registered native method instance with the specified signature as string. |
NativeBehavior |
JNIEasyLibrary.findExportedMethodAddress(java.lang.String signature)
Returns the native method instance registered with the specified signature. |
NativeBehavior |
DynamicLibrary.removeBehaviorByName(java.lang.String nativeName,
NativeBehaviorSignature sig)
Removes the registered native method instance with the specified native name and signature. |
| Methods in com.innowhere.jnieasy.core.mem with parameters of type NativeBehavior | |
|---|---|
boolean |
JNIEasyLibrary.exportBehavior(java.lang.String nativeName,
NativeBehavior method)
Exports a native capable method instance with the specified name. |
| Uses of NativeBehavior in com.innowhere.jnieasy.core.method |
|---|
| Subinterfaces of NativeBehavior in com.innowhere.jnieasy.core.method | |
|---|---|
interface |
CFieldMethod
The CFieldMethod is the interface implemented by
native capable classes that make accessible exported C fields of DLLs
from Java seen as methods. |
interface |
CMethod
The CMethod is the interface implemented by
native capable classes that make accessible exported C methods of DLLs
from Java. |
interface |
CPPConstructor
The CPPConstructor is the interface implemented by
native capable classes that make accessible exported C methods of DLLs
working as constructors from Java. |
interface |
CPPMethod
The CPPMethod is the interface implemented by
native capable classes that make accessible C++ exported
instance methods of DLLs from Java. |
interface |
DLLBehavior
The DLLBehavior is the interface implemented by
native capable classes that make accessible to Java DLL's exported
fields and methods. |
interface |
DLLMethod
The DLLMethod is the interface implemented by
native capable classes that make accessible exported methods of DLLs
from Java. |
interface |
NativeBehaviorReflection
The NativeBehaviorReflection is the interface implemented by
native capable classes that make accessible Java fields
and methods from native seen as methods. |
interface |
NativeCallback
The NativeCallback is the interface implemented by
native capable classes that bridges Java and native methods and fields (as methods). |
interface |
NativeConstructor
The NativeConstructor is the interface implemented by
native capable classes that bridges Java and native constructors. |
interface |
NativeConstructorCallback
The NativeConstructorCallback is the interface implemented by
native capable classes that make accessible Java constructors
from native. |
interface |
NativeConstructorReflection
The NativeConstructorReflection is the interface implemented by
native capable classes that make accessible Java constructors
from native. |
interface |
NativeDirectCallback
The NativeDirectCallback is the interface implemented by
native capable classes that make accessible Java fields
and methods from native seen as methods. |
interface |
NativeDirectConstructorCallback
The NativeDirectConstructorCallback is the interface implemented by
native capable classes that make accessible Java constructors
from native. |
interface |
NativeDirectFieldCallback
The NativeDirectFieldCallback is the interface implemented by
native capable classes that make accessible Java fields
from native seen as methods. |
interface |
NativeDirectInstanceFieldCallback
The NativeDirectInstanceFieldCallback is the interface implemented by
native capable classes that make accessible Java instance fields
from native as methods. |
interface |
NativeDirectInstanceMethodCallback
The NativeDirectInstanceMethodCallback is the interface implemented by
native capable classes that make accessible Java instance methods
from native. |
interface |
NativeDirectMethodCallback
The NativeDirectMethodCallback is the interface implemented by
native capable classes that make accessible Java methods
from native. |
interface |
NativeDirectStaticFieldCallback
The NativeDirectStaticFieldCallback is the interface implemented by
native capable classes that make accessible static Java fields
from native as methods. |
interface |
NativeDirectStaticMethodCallback
The NativeDirectStaticMethodCallback is the interface implemented by
native capable classes that make accessible static Java methods
from native. |
interface |
NativeFieldCallback
The NativeFieldCallback is the interface implemented by
native capable classes that make accessible Java fields
from native seen as methods. |
interface |
NativeFieldMethod
The NativeFieldMethod is the interface implemented by
native capable classes that bridges Java and native fields seen as methods. |
interface |
NativeFieldMethodReflection
The NativeFieldMethodReflection is the interface implemented by
native capable classes that make accessible Java fields
from native seen as methods. |
interface |
NativeInstanceFieldCallback
The NativeInstanceFieldCallback is the interface implemented by
native capable classes that make accessible Java instance fields
from native seen as methods. |
interface |
NativeInstanceFieldMethod
The NativeInstanceFieldMethod is the interface implemented by
native capable classes that bridges Java and native instance fields seen as methods. |
interface |
NativeInstanceFieldMethodReflection
The NativeInstanceFieldMethodReflection is the interface implemented by
native capable classes that make accessible Java instance fields
from native as methods. |
interface |
NativeInstanceMethod
The NativeInstanceMethod is the interface implemented by
native capable classes that bridges Java and native instance methods. |
interface |
NativeInstanceMethodCallback
The NativeInstanceMethodCallback is the interface implemented by
native capable classes that make accessible Java instance methods
from native. |
interface |
NativeInstanceMethodReflection
The NativeInstanceMethodReflection is the interface implemented by
native capable classes that make accessible Java instance methods
from native. |
interface |
NativeMethod
The NativeMethod is the interface implemented by
native capable classes that bridges Java and native methods. |
interface |
NativeMethodCallback
The NativeMethodCallback is the interface implemented by
native capable classes that make accessible Java methods
from native. |
interface |
NativeMethodReflection
The NativeMethodReflection is the interface implemented by
native capable classes that make accessible Java methods
from native. |
interface |
NativeStaticFieldCallback
The NativeStaticFieldCallback is the interface implemented by
native capable classes that make accessible Java static fields
from native seen as methods. |
interface |
NativeStaticFieldMethod
The NativeStaticFieldMethod is the interface implemented by
native capable classes that bridges Java and native static fields seen as methods. |
interface |
NativeStaticFieldMethodReflection
The NativeStaticFieldMethodReflection is the interface implemented by
native capable classes that make accessible static Java fields
from native as methods. |
interface |
NativeStaticMethod
The NativeStaticMethod is the interface implemented by
native capable classes that bridges Java and native static methods. |
interface |
NativeStaticMethodCallback
The NativeStaticMethodCallback is the interface implemented by
native capable classes that make accessible Java static methods
from native. |
interface |
NativeStaticMethodReflection
The NativeStaticMethodReflection is the interface implemented by
native capable classes that make accessible static Java methods
from native. |
| Uses of NativeBehavior in com.innowhere.jnieasy.core.typedec |
|---|
| Methods in com.innowhere.jnieasy.core.typedec that return NativeBehavior | |
|---|---|
NativeBehavior |
NativeBehaviorSignature.attachBehavior(long address)
Creates and attachs to the specified address of a native method a native instance of a predefined class implementing the interface NativeBehavior
Current implementation calls NativeBehaviorSignature.attachBehavior(NativeAddress,long)
with offset set to 0. |
NativeBehavior |
NativeBehaviorSignature.attachBehavior(NativeAddress address,
long offset)
Creates and attachs to the specified address and offset of a native method a native instance of a predefined class implementing the interface NativeBehavior
With this object the native method can be called from Java using
this signature. |
NativeBehavior |
NativeBehaviorDescriptor.getNativeBehavior()
Returns the native object instance used to make native calls (and receive native calls if it is a callback). |
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |


App
0.10
Contents:
Installation
Python API
Common Issues
Change Log
[master] – YYYY-MM-DD
Added
Changed
Deprecated
Fixed
Development Changes
[0.10] – 2019-05-09
Added
Changed
Fixed
Development Changes
App
Docs
»
Change Log
View page source
Change Log
¶
All notable changes to
app
will be listed here.
[master] – YYYY-MM-DD
¶
Added
¶
Changed
¶
Deprecated
¶
Fixed
¶
Development Changes
¶
[0.10] – 2019-05-09
¶
Added
¶
Initial version
Changed
¶
Nothing
Fixed
¶
Nothing
Development Changes
¶
Nothing


We understand that when you upload one of your repositories to Quay that you are trusting us with some potentially very sensitive data. On this page we will lay out our security features and practices to help you make an informed decision about whether you can trust us with your data.
We expressly forbid connections to Quay using unencrypted HTTP traffic. This helps keep your data and account information safe on the wire. Our SSL traffic is decrypted on our application servers, so your traffic is encrypted even within the datacenter. We use a 4096-bit RSA key, and after the key exchange is complete, traffic is transferred using 256-bit AES, for the maximum encryption strength.
Our binary data is currently stored in Amazon's S3 service. We use HTTPS when transferring your data internally between our application servers and S3, so your data is never exposed in plain text on the internet. We use their server side encryption to protect your data while stored at rest in their data centers.
There have been a number of high profile leaks recently where companies have been storing their customers' passwords in plain text, an unsalted hash, or a salted hash where every salt is the same. At Quay we use the bcrypt algorithm to generate a salted hash from your password, using a unique salt for each password. This method of storage is safe against rainbow attacks and is obviously superior to plain-text storage. Your credentials are also never written in plain text to our application logs, a leak that is commonly overlooked.
Repositories will only ever be shared with people to whom you delegate access. Repositories created from the Docker command line are private by default and must be made public with an explicit action in the Quay UI. We have a test suite which is run before every code push which tests all methods which expose private data with all levels of access to ensure nothing is accidentally leaked.
Our application servers and database servers are all protected with firewall settings that only allow communication with known hosts and host groups on sensitive ports (e.g. SSH). None of our servers have SSH password authentication enabled, preventing brute force password attacks.
While not related directly to security, many of you are probably worried about whether you can depend on the data you store in Quay. All binary data that we store is stored in Amazon S3 at the highest redundancy level, which Amazon claims provides 11-nines of durability. Our service metadata (e.g. logins, tags, teams) is stored in a database which is backed up nightly, and backups are preserved for 7 days.


react-bound-state
Binding library for React
TL;DR
- Managing state in React has all sorts of solutions from
useContext
anduseState
to Redux. However, all of these methods lack a truly declarative style. - I wanted a cleaner way to write code that manages global and document level scoped state. I also wanted a way to write code to update state where it makes the most sense to me - next to the thing it affects. Writing code in this way enables better modularisation and separation of concerns.
- I like data binding, I like having components bound to parts of the model that can automatically react to changes, it reduces boilerplate code and reduces re-renders.
- I've built a brand new library, documentation, and a demonstration that you can use to explore the solution that I arrived at given the objectives above. The library makes extensive use of Hooks. react-bound-state is MIT licensed.
- The react-bound-state library is based on the live version in the commercial software I build for a day job but it has been refined, simplified, and improved.
- I go on to describe how to use the technique and how it works internally below.
Install
npm install --save react-bound-state
Usage
import React from "react"
import { createState } from "react-bound-state"
import { Grid, CssBaseline, Container, Box, TextField } from "@material-ui/core"
const state = createState("global")
const { Bind, bind } = state
const Input = bind({ component: <TextField variant="outlined" /> })
const stateObject = { title: "global" }
function App() {
return (
<Bind target={stateObject}>
<CssBaseline />
<Container>
<Inner />
</Container>
</Bind>
)
}
function Inner() {
return (
<Box p={1}>
<Grid container spacing={2}>
<Grid item>
<Input property="title" label="title" />
</Grid>
<Grid item>
<Input
property="somethingElse"
label="other"
defaultValue=""
/>
</Grid>
</Grid>
</Box>
)
}
Documentation
Demo
CodeSandbox demo is available here.
The demonstration logs when core components are redrawn, as you will see, redraws are kept to a bare minimum.
The same demo built as a website.
Why?
I build apps that predominantly manage documents, and I want to write declarative code that follows SOLID principles. Adhering to SOLID principles ensures that the solutions I make can be easily maintained, developed, and extended.
My projects frequently use React and are modern enough to be almost 100% hook based.
In many web apps and systems, a single document or state will contain information that needs to be handled by many specialized components; this lends itself to creating multiple modules that participate in the editing and rendering processes. Furthermore, the same information frequently needs to be rendered by different components in alternate ways.
I don't like to centralize the state management, because that makes the code very coupled and limits the ability for multiple developers to work on the same code base and reuse previously created elements.
Hooks are great, but they present challenges at both the individual component level and across a broader hierarchy.
useState
needs to be isolated to a component which can cause multiple re-rendersuseReducer
can also cause large parts of the interface to require updatinguseContext
is a blunt tool that elegantly facilitates static contextual information, but does not cope well with informing sub-elements of an interface to redraw when their state changes.
function Details({ onEdited, name, description }) {
const [currentName, setName] = React.useState(name)
const [currentDescription, setDescription] = React.useState(description)
return (

 onEdited(currentName, currentDescription)}>
<input
value={currentName}
onChange={(e) => setName(e.target.value)}
/>
<textarea
rows={10}
value={currentDescription}
onChange={(e) => setDescription(e.target.value)}
/>

)
}
^ This is complex and intricate; I'd rather avoid it
The above code renders the whole component each time with a currentName
or currentDescription
change. While this is insignificant here, it's part of a broader problem. In addition to that, the state must be passed into this component as a whole.
I like the principles of data binding offered by Angular, Svelte, and the like, so I've built something that solves all of these problems.
react-bound-state
The new library works by using Inversion of Control implemented using a super-fast wildcard event emitter and lets us:
- Create multiple global state contexts
- Bind contexts to objects
- Have any number of components be updated when relevant state changes, but only those components
- Create components that are bound directly to the data model
- Composes in a very straightforward and obvious way
Using the library, we can rewrite Details
from above like this:
function Details() {
return (

<Input property="name" />
<Input multiline property="description" />

)
}
Working with state in react-bound-state
The first step is to create state contexts that you will then bind to objects. You will typically make a global state context for each of the things that might be in scope at the same time. In the example, we have a global state for the current document and the current settings.
import { createState } from "react-bound-state"
export const globalState = createState("global")
export const styleState = createState("style")
Binding Components
Once we've created state, we can access the methods of the state to do some useful things. For instance, we can use bind
to create data-bound versions of standard components that we can use when building out our interface.
import { TextField } from "@material-ui/core"
export const Input = globalState.bind({
component: <TextField variant={"outlined"} fullWidth />
})
The code above creates an component that uses an outlined, full-width TextField that will be bound to the current target of globalState
.
The default version of bind
expects an onChange
event that supports event.target.value
or value
directly and an input that wants value
. We can override all of these. For instance, to create a Combo Box for the demo we use Material UI Autocomplete - this passes the current value of the component as a second parameter to onChange
so we might declare the Combo like this:
export const Combo = styleState.bind({
extract(_, value) {
return value
},
component: (
<Autocomplete
options={[]}
fullWidth
renderInput={(params) => (
<TextField {...params} variant="outlined" />
)}
/>
)
})
Here we use the extract
method that allows us to extract the current value from the onChange
event.
We have total control over the attribute
that is used, the event
that is fired on a change, plus we can also use transformIn
and transformOut
to convert data from the model to the editing component.
The real benefit is we can apply any properties to the component or the underlying component on the definition or use.
<Input
property="some.model.property"
transformIn={(v) => v.toUpperCase()}
transformOut={(v) => v.toLowerCase()}
/>
We can also bind components inline rather than defining them up front, using the <Bound/>
component exposed from the state:
<globalState.Bound
component={<Checkbox color="primary" />}
attribute="checked"
property="done"
/>
Binding the state to an object
Before we can do anything much with the components or the other properties of the state, we must bind it to a model.
const App = () => {
return (

)
}
Here we've bound globalState
to a document and styleState
to a set of style settings. Once bound, we can start to use the other features of the library to access values, or we can use the bound components to edit values.
You can see the onChange()
handler which is called any time any property of the model changes. In the demo case, it is wired to a denounced function that stores the current state in localStorage.
Accessing properties of the state
Once bound, we can use the functions of the state
and property syntax to retrieve values, set values, and be refreshed when the value changes, no matter what made the change.
To perform this, we use the following functions:
-
useState
provides access to a property of the model and causes the component to redraw should it change, it also works the same way as React.useState and provides a setter function. -
useBinding
provides an object that can be spread onto a component to provide data binding (same as thecomponents and bind()
derivation function) -
useSetter
provides a method to set values for a property but does not re-render when it changes -
useRefresh
allows the component to refresh based on defined properties (this includes wildcards)
All of these methods end up using property syntax:
// Access and set a name property
const [name, setName] = globalState.useState("some.sub.object.name")
Property syntax works the same way as lodash/underscore/sugarjs get/set methods. We can replace array accessors [] with . if we like.
Binding using property syntax
To facilitate a much easier interface constructor, the <Bind/>
component also allows us to use property
rather than target
to focus on a subsection of the model.
<Grid item md={3}>
<Bind property={"profile"}>
<Profile />
</Bind>
<Description />
</Grid>
Once this sub binding is made, all of the inner functions use property syntax from the new target.
When we bind to a part of the model that is an array, the children of the <Bind/>
will be rendered for every member of the collection.
export function Todos() {
const setTodos = globalState.useSetter("todos")
return (
<Box>
<Box ml={2}>
<Typography variant={"h6"} component={"h1"} gutterBottom>
Todo List
</Typography>
</Box>
<Box width={1} clone>
<List>
<Bind property={"todos"}>
<Todo />
</Bind>
</List>
</Box>
<Box mt={2}>
<Button color={"primary"} onClick={add}>
+ Add Todo
</Button>
</Box>
</Box>
)
function add() {
const newTodo = prompt("What must you do?", "")
if (newTodo) {
setTodos((prev) => [
...prev,
{ title: newTodo, description: "", done: false }
])
}
}
}
Here we bind the list of todos. Also, note how we use useSetter
because the <Bind/>
component knows to re-render all of the Todos when the array changes. There is no need to re-render this component. Similar to React.useState, we can either pass a value to the set function or a function that will receive the previous state; this significantly reduces re-renders.
A child rendered by an array can tell its index using the useIndex()
function exported directly from 'react-bound-state.'
Sometimes in an inner component, we might want to reaccess the outer context. For instance, in the demo, a <Todo/>
wants to delete itself from the array of todos.
When we have <Bind/>
inside of <Bind/>
as in this example, we can prepend ^ characters to property syntax to move us up to the parent.
function Todo() {
const [title, setTitle] = globalState.useState("title")
const [done] = globalState.useState("done", false)
const [todos, setTodos] = globalState.useState("^todos")
const [me] = globalState.useState()
return (
<ListItem>
<Card className="full-width" variant={"outlined"}>
<CardHeader
title={title}
action={
<globalState.Bound
property={"done"}
component={<Checkbox color={"primary"} />}
attribute={"checked"}
extract={(e) => e.target.checked}
/>
}
/>
<CardContent>
<Input label="Notes" multiline property={"description"} />
</CardContent>
<CardActions>
<Button color={"secondary"} onClick={remove}>
Delete
</Button>
</CardActions>
</Card>
</SortableItem>
)
function remove() {
setTodos(todos.filter((t) => t !== me))
}
Here we can see that the <Todo/>
accesses its state to render the card but also accesses the todos from the parent state and uses them to delete entries when the user requests it.
Refreshing
The elements of the UI redraw if we have used a bound component or a useState(), and the property or any of its direct ancestors change.
e.g. some.sub.module.name
will redraw if some
or some.sub
or some.sub.module
or some.sub.module.name
change. It won't redraw if some.sub.another
changes of course.
Sometimes, especially if we are retrieving an object (say a style), we may want to redraw if a sub-property of the thing we have retrieved changes. This is what useRefresh()
is for and, in that case, we can also use wildcard *
and **
characters in the property syntax:
const [style] = styleState.useState("some.style")
styleState.useRefresh("some.style.**")
return (

<Content />

)
The code above redraws the component if any sub-property of the style changes.
Setting data
useSetter()
and useState()
both return functions that allow you to set the value of a part of the model. You may either mutate or use immutable data as you wish. The set functions returned by both also have a .set()
sub-function that will set multiple properties at once from an object. These are merged into the current state.
const updateStyle = styleState.useSetter("style")
// Merge properties into the style using .set()
updateStyle.set({ background: "red", color: "white" })
// Replace the whole style object
updateStyle({ color: "blue" })
How it works
The whole system is predicated off React hooks combined with a super-fast wildcard based, custom event emitter. The system uses Inversion of Control to announce updates to the model and then it loosely couples listeners that react and cause the relevant parts of the UI to redraw.
The current value of a <Bind/>
component is stored in a React Context, and useState is used as a refresh mechanism when we discover a change. We use the useEffect hook to wire up the relevant event handlers and ensure that they are correctly disposed of.
useState(property = "", defaultValue, target) {
let { target: existingTarget, path, stack } = this[useTargetContext]()
target = target || existingTarget
;[property, target, path] = getTargetFrom(property, target, path, stack)
const value = get(target, property, defaultValue)
const [id, refresh] = useState(-1)
const currentRefresh = useRef()
React.useEffect(() => {
return () => {
currentRefresh.current = ()=>{}
}
}, [])
currentRefresh.current = refresh
useEvent(getPatterns(target, [...path, ...getPath(property)]), update)
return [value, updateValue, id]
function update() {
currentRefresh.current(refreshId++)
}
function updateValue(newValue) {
if (typeof newValue === "function") {
newValue = newValue(get(target, property, defaultValue))
}
set(target, property, newValue)
emit(target, path, property, newValue)
}
}
Here you can see the useState
hook from the system. It uses getTargetFrom()
to handle upward movements through the state stack. get()
is an implementation that can retrieve a value from an object without throwing an error if parts are missing.
get()
is paired with set()
which does the same for setting a property (these are very like lodash/underscore).
The useEvent()
hook uses React.useEffect to wire up the set of handlers suggested by getPatterns()
The code in useState
is pretty much the crux of the whole thing. When we change a value, we update the model and emit an event. Any component that cares about the property (or is derived from it, or is listening for it with useRefresh()
) will redraw retrieving the latest updated value.
function Bind({ target, property = "", onChange = () => {}, children }) {
const self = this
const innerId = React.useRef(refreshId++)
let { target: existingTarget, path, stack } = this[useTargetContext]()
if (target && !targetIds.has(target)) {
targetIds.set(target, nextId++)
path = [`${targetIds.get(target)}`]
} else if (target) {
path = [`${targetIds.get(target)}`]
} else {
target = existingTarget
}
const [finalTarget, setFinalTarget] = React.useState(target)
const currentTarget = useRef()
currentTarget.current = setFinalTarget
React.useEffect(() => {
return () => {
currentTarget.current = noop
}
}, [])
useEvent(`${targetIds.get(finalTarget)}`, update)
let updatedPath = [...path, ...getPath(property)]
useEvent(
getPatterns(finalTarget, updatedPath).map((p) => `${p}.**`),
() => onChange(finalTarget)
)
const [subTarget, , , id] = this.useState(property, {}, finalTarget)
if (Array.isArray(subTarget)) {
return <ArrayContents key={id} />
} else {
if (typeof subTarget !== "object")
throw new Error("You must bind to an object or an array")
return (
<this.context.Provider
key={`${id}:${innerId.current}`}
value={{
target: subTarget,
path: updatedPath,
stack: [...stack, { target: subTarget, path: updatedPath }]
}}
>
{children}
</this.context.Provider>
)
}
function update(newValue) {
targetIds.set(newValue, targetIds.get(target))
innerId.current = refreshId++
currentTarget.current(newValue)
}
function ArrayContents() {
let output = []
for (let i = 0; i < subTarget.length; i++) {
output.push(<Item key={i} index={i} />)
}
return output
}
function Item({ index }) {
return (
<IndexContext.Provider value={index}>
<self.Bind property={`${property}.${index}`}>
{children}
</self.Bind>
</IndexContext.Provider>
)
}
}
Bind, on the other hand, handles using an object, which it stores in the context, in addition to providing the facility for notifying its owner when things have changed.
Conclusion
I've presented a compelling way of binding data to "contextual" and global scope. It composes in a very natural way and has the additional benefit of providing data binding for React components. As the demonstration project proves, redrawing is minimised.
License
MIT © miketalbot


The OCI API.
More...
#include <oci.h>
|
| | Oci (OciProfile profile, char *timeServer="pool.ntp.org", long gmtOffsetSeconds=0, int daylightOffsetSeconds=0) |
| | Construct a new instance of the OCI API. More...
|
| |
| void | encryptAndEncode (const unsigned char *toEncrypt, unsigned char(&encoded)[500]) |
| | Used internally to hash, sign and base64 encode the auth header to sign the request. More...
|
| |
| void | apiCall (OciApiRequest request, OciApiResponse &response) |
| | Make a call to the OCI REST API. More...
|
| |
◆ Oci()
| Oci::Oci |
( |
OciProfile |
profile, |
|
|
char * |
timeServer = "pool.ntp.org" , |
|
|
long |
gmtOffsetSeconds = 0 , |
|
|
int |
daylightOffsetSeconds = 0 |
|
) |
| |
|
inline |
Construct a new instance of the OCI API.
- Parameters
-
| profile | A configured OciProfile to be used to sign API calls |
| timeServer | The NTP Server to be used to obtain the current time. Normally it should be left as default. |
| gmtOffsetSeconds | The offset in seconds from GMT for the time object. Leave this as 0, API calls must be signed with the current time in GMT |
| daylightOffsetSeconds | Offset in seconds for DST. Leave as zero. |
◆ apiCall()
Make a call to the OCI REST API.
- Parameters
-
| [in] | request | The API request |
| [out] | response | The API response |
◆ encryptAndEncode()
| void Oci::encryptAndEncode |
( |
const unsigned char * |
toEncrypt, |
|
|
unsigned char(&) |
encoded[500] |
|
) |
| |
|
inline |
Used internally to hash, sign and base64 encode the auth header to sign the request.
- Parameters
-
| [in] | toEncrypt | toEncrypt the value to encrypt |
| [out] | encoded | &encoded the hashed/signed/encoded output |
The documentation for this class was generated from the following file:


Your Credit:
Profile
Log out
Profile
Name:
Update
Email address:
Date of birth:
Old password:
New password:
Confirm password:
Update
Name:
Email address:
Date of birth:
[Edit My Information]
Requesting Books
Posting Books
Photo
Log out


The w3-container class is one of the most important W3.CSS classes.
It provides correct margins, padding, alignments, and more, to most HTML elements.
The w3-container class is one of the most important W3.CSS classes.
It provides correct margins, padding, alignments, and more, to most HTML elements.


In this tutorial we are going to construct a very basic FHIR based web application that will load a list of patients and display demograpihc information about a selected patient.
While no formal computer programming experience is needed, some familiarity with HTML and JavaScript will be beneficial. Creating a single page HTML and JavaScript FHIR application presents a few challenges. The webpage will be requesting information from a remote FHIR server. Depending on the FHIR server and web browser used when following this tutorial, things may not work as expected due to security settings.
Open your favorite text editor or development environment and create a blank document called "HelloPatient.html". Save this file in an easily accessible location such as your desktop.
We will begin by creating a simple web page using basic HTML. The tutorial sections will alternate between the visual elements using HTML and the behind the scenes elements using JavaScript.
First add a Head and Body to the webpage:
Save it and now open your "HelloPatient.html" file in your web browser (Google Chrome works well for debugging purposes later) and you should see this:
Now that we have a basic web page up and running, lets turn our attention toward getting a patient list from a FHIR server. This portion of the code will be created using JavaScript. For programming novices this may seem a little daunting, but I will try and explain each piece along the way. To access information from a remote server from our webpage we will use something called Cross-Origin Resource Sharing (CORS). Many web pages use CORS to load images, scripts, and other information from sites or domains which are different from the original web page. For example, if I do a search on Google.com for images of 'cat', the first few sample images that are displayed are loaded from 'http://www.pexels.com'. For security purposes most web browsers and servers do not allow CORS requests to be run from within scripts. However, to keep this tutorial simple we use a function called XMLHttpRequest() and a FHIR server with permissive Access-Control settings. Add the following code below the body of your webpage:
Save the file and refresh the web-page (Control-R or Command-R). The web page itself will look like nothing has changed. That is because we did not edit anything in the HTML portion of the file. Instead, lets open the JavaScript console and see what the script has output. In Google Chrome you can select JavaScript Console from the View->Developer menu (or type Command/Ctrl+Alt+J). The console should appear and you should see a large amount of text on the screen like this:
What you may notice about the text is that it is in XML format. If we add the following line to our script:
Below the "apikey" header it will tell the server to respond to our requests in JavaScript Object Notation (JSON) rather than XML. Since we are using JavaScript for the background programming, the ability to use JSON is extremely valuable and time saving. Add the line to your code, save the file, and refresh the browser. Now you should see output in the console like this:
In order to turn this JSON formatted text response into an actual JavaScipt object we will use a built-in function called "JSON.parse". This will allow us to easily reference and manipulate the data within the JSON object. Edit the console.log statement in your code to incorporate the JSON.parse function call.
Again, save and refresh to see the results. Now you should be able to navigate the JavaScript object from within the browser's JavaScript console window, similar to what is shown here:
To get our data out of the JavaScript console and into the browser window we will take advantage of a nearly ubiquitous JavaScript Library called JQuery. The JQuery package consists of a wide variety of useful functions that make it easy to reference and dynamically update elements of our HTML using JavaScript code.
JQuery uses several shorthand notations to simplify interactions with the HTML document even further. The "$" is a reference to the JQuery library. You will also notice the use of "#" and "." before words/variables. Hashtag ("#") is a shorthand reference to the HTML element attribute "id" and period (".") is shorthand for the HTML element attribute "class".
To use JQuery we must load the library with our web site application. Add the following to the
section of your web page:
To demonstrate these concepts in our HelloPatient application, replace the
'This is the Hello Patient Browser'
with

and add the following line of code beneath the console.log statement in our FHIRquery.onload function:
$("#data").html(FHIRquery.responseText)
Then save and refresh to examine the changes. Instead of the FHIR response data only appearing in the JavaScript console, you should now see it displayed in the web browser window as well.
Now we are getting somewhere. We have successfully queried a FHIR server and returned that information to the webpage. At this point though it doesn't look like much. If you read through the JSON object that is returned you will notice an element called "resourceType" with a value of "Bundle". Bundle is exactly what is sounds like - a bundle of information. In this case it is a bundle of patients. The Patient JSON also includes an element array called "entry", and this is where each of the bundle entries is located. If you navigate the JSON object in the JavaScript console you can drill down further and eventually find the patient information that we are looking for.
To make this information truly useful, lets build a patient list on our web page using the results of our FHIR query. To ensure that we get consistent results, lets make our FHIR query a bit more specific. The SIIM hackathon FHIR server contains a set of simulated patients all with the family name of "SIIM". To search for and find only those patients with a surname of "SIIM" we can specify additional search parameters in our FHIR query.
Edit the FHIRquery.open URL so that it looks like this:
`https://api.hackathon.siim.org/fhir/Patient?name=SIIM`
Save your file and refresh the web page. You should now only get a FHIR response bundle containing five patients.
Now lets find the names of each of these patients. To do this we can drill down into the FHIR JSON response in the JavaScript console window until we find the information we are looking for. In this case it is buried several layers deep in entry->resource->name->given and entry->resource->name->family.
To create a patient list in the web browser rather than a text data dump a few changes to our code are needed. We will create a new JSON object called "patientList" as well as a new function called "patientListDisplay()". Add the following code snippit to the beginning of your


Neo-Depressionism
Collage, graphite, & china marker on Moleskin book
12” x 18”
Something to be Ashamed Of
Pen, marker, & china marker on Moleskin paper
12” x 18”
Worry
Ink, marker, china marker, colored pencil, paint pen, gouache, & collage on Moleskin paper
12” x 18”
Where am I?
Pen, marker, china marker, gouache, & collage on Moleskin paper
12” x 18”
Anatomy
Pen & china marker on Moleskin paper
12” x 18”
Crying on Speed / Nü-Do
Pen, china marker, pastel, & collage on Moleskin paper
12” x 18”
Time / Tar Baby
Pen, water-soluble wax pastel, china marker, & collage on Moleskin paper
12” x 18”
Silence is King
Collage on Moleskin book
12” x 18”
Chasing the Dragon / Adele
Pen, colored pencil, & china marker on Moleskin paper
12” x 18”
Birth of a Movement
Pen, water-soluble wax pastel, marker, colored pencil, collage, dried orchid on Moleskin paper
12” x 18”


For beginners, read "Programmer's Survival Guide for Windows - File System and CMD Shell".
Frequently-used Commands
General Notes: The commands are NOT case-sensitive (because the legacy DOS is not case-sensitive). In general, Windows/DOS Operating System is not case-sensitive, but Unixes are. Most of the programming languages such as C/C++/Java, with origin in Unix, are case-sensitive.
Help
Help: To list all the available commands, for example,
Prompt> help
For more information on a specific command, type HELP command-name ASSOC Displays or modifies file extension associations. ATTRIB Displays or changes file attributes. BREAK Sets or clears extended CTRL+C checking. ......
To get more information on a particular command, enter "help command-name
", for example,
Prompt> help cd
Displays the name of or changes the current directory. .......
Directory- and File-related Commands
Windows Operating System organizes files in drive and directory. A drive is identified by a letter followed by a colon, e,g,. "C:
", "D:
" and "I:
". (Unix does not have the concept of drive.) Directory exhibits a tree-like structure starting from the so-called root directory, denoted by a leading back slash '\'
. Each directory may contain sub-directories or files. Sub-directories may contains sub-sub-directories or files. The sub-directories are separated by a back slash '\'
(Unix uses forward slash '/'
as the directory separator). Directory is also called a folder or a path. An example is illustrated below:
In the above example, the full-path filename for "Hello.java
" is "D:\java\beginner\Hello.java
", which begins with the drive letter "D:
", followed by root directory "\
", sub-directories (separated with '\'
) and filename. The filename composes of two parts, name and extension, separated by a dot '.'
. The file extension specifies the type of the file (e.g., ".txt
" for text file, ".doc
" for Word document, ".java
" for Java source file), which can be associated with a processing program. (Unix does not have the concept of file extension.)
Current Drive and Current Working Directory (CWD
) refer to the drive and the directory that you are currently working on. They are shown as part of the command prompt preceding ">
". For example,
D:\java\beginner>
In the above example, the current drive is "D:
", and the current working directory is "\java\beginner
".
To set or change the current drive, enter the drive letter followed by a colon, for examples,
C:\Users\john> D: D:\> C: C:\Users\john> D: D:\> J: The system cannot find the drive specified. |
Change current drive to D: Change current drive to C: Change current drive to D: Change current drive to J: [error message] |
To set or change the current working directory, use the cd
(change directory) command. You can use "\
" to refer to the root directory of the current drive, "..
" to refer to the parent directory, and ".
" to refer to the current directory. You can use absolute path which begins with the root directory (with a leading back slash), or relative path (without the leading back slash) which is relative to the current working directory. For examples,
C:\Users\john> D: D:\> cd java D:\java> cd beginner D:\java\beginner> cd \java\advanced D:\java\advanced> cd .. D:\java> cd \ D:\> C: C:\Users\john> |
Change current drive to D: Change directory to "java", relative to root "\" Change directory to "beginner", relative to "\java" Change directory to "\java\advanced" (absolute) Change directory to parent directory (relative) Change directory to root (absolute) Change current drive to C: [at the current working directory of drive C:] |
The command cd
(without parameter) display the current working directory.
Take note that you have to set the current drive and current working directory in two separate operations.
You can use dir
(directory) command to list the contents of the current working directory. For examples,
D:\java\beginner> dir
Volume in drive D is Work Volume Serial Number is xxxx-xxxx Directory of D:\java\beginner xx-xxx-xx xx:xx xx <DIR> . xx-xxx-xx xx:xx xx <DIR> .. xx-xxx-xx xx:xx xx 417 Hello.class xx-xxx-xx xx:xx xx 118 Hello.java 2 File(s) 535 bytes 2 Dir(s) xx,xxx,xxx,xxx bytes free
The output lists all the sub-directories and files contained in the current working directory. It also contains two special entries: "..
" for the parent directory, and ".
" for the current directory.
You can use special wildcard characters for filename filtering or matching. The wildcard character '*'
matches zero or more (any) characters. The wildcard character '?'
matches exactly one (any) character. For examples,
Prompt> dir *.java Prompt> dir H* Prompt> dir Hello?.java |
List files ending with .java List files beginning with "H" List files beginning with Hello, followed by any (one) character, ending with .java |
Other frequently-used directory- and file-related commands include:
del filenames
: Deletes files.ren current-filename new-filename
: Renames a file.mkdir directory-name
: Creates (or make) a sub-directory under the current working directory.rmdir directory-name
: Removes or deletes the sub-directory.copy filename new-filename
: Copies file.xcopy|robocopy
: Copies (or Robust copies) files and directory trees.
You could issue "help
command-name
" to check the syntax and options of the above commands.
Alternatively, you can use Windows Explorer (My Computer) to perform the above tasks, graphically.
Environment and Local Variables
Environment variables are global system variables accessible by all the processes running under the Operating System. Environment variables are useful to store system-wide values such as the directories to search for the executable programs, the OS version, and the location of Windows binaries. (Windows registry was later created to store the ever-growing data needed for the applications in a more efficient manner.)
A process could access all the environment variables, it could also maintain its own local variables, which is available to itself only.
READ "How to set or change a variable".
PATH Environment Variable
READ "PATH (For Windows Users)"
Miscellaneous Commands
cls
(clear screen): Clears the current screen and remove all the messages.type filename
: Types out (or displays) the content of the file.
Redirection Operators and Filtering Commands
By default, the output of a command goes to the screen (called STDOUT
), and the input of a command comes from the keyboard (called STDIN
). You can use a redirection operator to redirect input and output from/to a file or another command:
>
(output redirection): Writes the output to a file (or a device such as printer), instead of the screen (STDOUT
).>>
(output append redirection): Appends the output to a file, instead of the screen.<
(input redirection): Reads the input from a file or a device, instead of the keyboard (STDIN
).|
(pipe): Pipes the output of one command into the input of another command.
An output redirector '>'
involves a program and a sink (destination). An input redirector '<'
involves a program and a source. A pipe '|'
involves two programs.
These filtering commands work with redirection operators for specifying the input and output:
find string
: Searches for the specified string.sort
: Sort the lines alphabetically.more
: Displays one screen at a time and wait for a key-press to display the next screen. (It is useful in the old days when screen output is not buffered, but I find it annoying nowadays.)
For examples,
Prompt> more < abc.txt Prompt> find "Hello" < abc.txt Prompt> find "Hello" < abc.txt > out.txt Prompt> find "Hello" < abc.txt | more Prompt> sort < xyz.txt Prompt> find "John" < xyz.txt | sort > out.txt |
Display the given file one screen at a time. Find the specified string from the given file. Find the specified string and write the results to another file. Display the result one screen at a time. Sort the lines alphabetically, output to screen. Find the string from file, sort the output, write result to file. |
Notes: Pipe '|
' is used to pipe into another command (or process); output redirection '>
' is used to send the output to a file (or device such as printer) instead of STDOUT
.
More on Windows' File System
Permissions
[TODO]
Symbolic Link (SymLink)
In Windows Vista/7/8, you can create a symlink to a file or a directory (similar to Unix), via command "mklink
". Symlink could provide great convenience in many situations.
You need the "Create Symbolic Link" privilege to run "mklink
" command, which only the administrators possessed by default. Start a CMD shell with administrator right ("run as administrator") to run the "mklink
" command..
> help mklink
// Make a directory symlink called mysql to mysql-5.0.28-win32
> mklink /D mysql mysql-5.0.28-win32
symbolic link created for mysql <<===>> mysql-5.0.28-win32
> dir
10/14/2012 12:45 AM <SYMLINKD> mysql [mysql-5.0.28-win32]
Symlink is different from shortcut, which was available in the earlier Windows.
CMD Shell Language and Batch Files
A batch file (also called a batch program or shell script) is a executable program that contains a sequence of commands. A batch file has a file extension of ".bat
". Batch files, which employ a legacy scripting language, possesses very simple, primitive and clumsy syntax . For examples,
- The names and identifiers are not case-sensitive.
- All variables belong to the type string. There is no numeric type, and no arithmetic operations.
- Only simple and primitive flow control constructs (
if-else
,goto
, andcall
) are supported. Non-structuredgoto
's are used extensively, which make the script hard to read and understand. (Afor
construct is available to process each file from a set of files.)
The primary purpose of batch files is to automate a series of commands, instead of general programming. Use a general-purpose programming language for programming. There are also many better and more powerful scripting languages, such as Perl, Python, Java Script, Java FX Script, VB Script, among other.
Batch Commands
The frequently-used commands in the batch files are:
rem message
: A programming comment (or remark) to provide explanation, non-executable.pause
: Suspends execution of the batch program and displays the message "Press any key to continue . . ."; resumes execution after a key is pressed.echo message
: Displays the specified message. To display a blank line, use "echo.
".echo on|off
: When echo is on, all batch commands are echoed on the screen. When echo is off, only echo commands are displayed.@echo off
disables display for this echo command and subsequent batch commands. Echo is usually turned on during program testing and development, and turned off in production.echo %variable-name%
: Displays the value of an environment variable.- ctrl+c or ctrl-break: to stop the batch file.
- ctrl-s or pause-key: to suspend the batch file.
Variables
All the variables belong to the type string. The names and commands are not case-sensitive.
In a batch file, you can reference an environment variable using the syntax %variable-name%
. For example, echo %USERNAME%
.
The command-line arguments can be referenced via variables %0
to %9
from right-to-left, where %0
is the name of the batch file. For example,
Prompt> process -o abc.out abc.in
The above command invoke a batch file Process.bat
with command-line arguments. The command-line arguments can be referenced inside the batch file as follows: %0=Process
, %1=-o
, %2=abc.out
, and %3=abc.in
. To reference more argument, you need to use the command shift
, which shifts the value of %1
into %0
, %2
into %1
, ..., %9
into %8
, and the next argument into %9
.
setlocal
and endlocal
: The command setlocal
begins localization of environment changes in a batch file. That is, changes to environment variables made after setlocal
are local to this batch file. The command endlocal
restores the previous environment settings. An endlocal
is issued implicitly at the end of a batch file.
Program Control Constructs
if [not] exist filename command if [not] "string1"=="string2" command if [not] errorlevel n command if [not] ... (command1) else (command2) |
Execute command if [if not] the filename exists Execute command if [if not] string1 equals to string2 Execute command if [if not] error-level is equal or greater than n (Error code is often set to 0 if no error occurs, 1 and higher otherwise.) if exist a.exe (echo yes) else (echo no) |
goto label-name :label-name |
Jump to the command at the specified label-name Define a label as target for goto |
for variable in (set) do command Examples: for %f in (*.doc *.txt) do type %f |
Runs a specified command for each file in a set of files type out all .doc and .txt |
call filename arguments start program-name program-file prompt message |
Call another batch file or program with arguments, and returns to this batch file Start a separate cmd session to run a specified program or batch file. Terminate this batch file, and start the specified program (or batch file) Put up the prompting message. |
The command call
can be used to call another batch file or program. The control returns to the next statement following the call
command, after the called program is completed (similar to calling a subroutine in programming languages). For example, suppose "process.bat
" is to be used in a batch file. "call process
" executes the "process.bat
", and returns control to the next statement. On the other hand, "process
" alone (without call
) terminates the current batch file and executes the "process.bat
".
Examples
Below is a sample batch file extracted from "startup.bat
" for starting the Tomcat server. The script checks if environment variable CATALINA_HOME
is defined, else set it to the current directory or the parent directory, which contains "bin\catalina.bat
". It then packs all the command-line arguments into variable CMD_LINE_ARGS
, and call "catalina.bat start
CMD_LINE_ARGS
".
@echo off if "%OS%" == "Windows_NT" setlocal rem Start script for the CATALINA Server rem Guess CATALINA_HOME if not defined set CURRENT_DIR=%cd% if not "%CATALINA_HOME%" == "" goto gotHome set CATALINA_HOME=%CURRENT_DIR% if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome cd .. set CATALINA_HOME=%cd% cd %CURRENT_DIR% :gotHome if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome echo CATALINA_HOME environment variable is not defined correctly goto end :okHome set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat if exist "%EXECUTABLE%" goto okExec echo Cannot find %EXECUTABLE% goto end :okExec rem Get remaining unshifted command line arguments set CMD_LINE_ARGS= :setArgs if ""%1""=="""" goto doneSetArgs set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 shift goto setArgs :doneSetArgs call "%EXECUTABLE%" start %CMD_LINE_ARGS% :end |
turn off message display localized environment %cd% gives the current directory if CATALINA_HOME defined, goto gotHome else set to current directory if startup batch file found, goto okHome else set CATALINA_HOME to the parent directory check CATALINA_HOME CATALINA_HOME defined "catalina.bat" found append next argument behind ready to start the server "catalina start cmd_line_args" |
REFERENCES & RESOURCES
- Microsoft MS-DOS User's Guide and Reference.
- "Microsoft XP Professional Product Documentation - Command-line reference", [online].
- "Microsoft XP Professional Product Documentation - Using batch file", [online].
- "Command-line Reference for IT Pros - Technical Reference", available under Windows "Help".


| Command | Input | Output | Description |
|---|---|---|---|
| + | Xreg, Yreg | Xreg |
Addition Xreg = Yreg + Xreg Rotate stack Zreg → Yreg Rotate stack Treg → Zreg Set 0.0 → Treg |
| - | Xreg, Yreg | Xreg |
Subtract Xreg = Yreg - Xreg Rotate stack Zreg → Yreg Rotate stack Treg → Zreg Set 0.0 → Treg |
| * | Xreg, Yreg | Xreg |
Multiply Xreg = Yreg * Xreg Rotate stack Zreg → Yreg Rotate stack Treg → Zreg Set 0.0 → Treg |
| / | Xreg, Yreg | Xreg |
Divide Xreg = Yreg / Xreg Rotate stack Zreg → Yreg Rotate stack Treg → Zreg Set 0.0 → Treg The value of Xreg must be non-zero. |
| chs | Xreg | Xreg |
Change sign of number in Xreg by performing a 2's Compliment subraction from zero. |
| clrstk |
Clear Stack Sets 0.0 into Xreg, Yreg, Zreg, Treg |
||
| clrx |
Clear X Register Sets 0.0 into Xreg The stack is not rotated. |
||
| enter | XReg | Yreg |
RPN Enter command Move Zreg → Treg Move Yreg → Zreg Copy Xreg → Yreg This is included for compatibility with scientific pocket calculators. The "Enter" text command duplicates Xreg into Yreg. This is different from the keyboard [Enter] key used to terminate number input. |
| log logoff |
The command 'log' starts a terminal log session. The filenames are sequential as follows: out/out001.txt, out/out002.txt, out/out003.txt ... the folder 'out' must exist in the working directory. Logging is stopped with the 'logoff' command. | ||
| print print f . . f |
Print Xreg to console output without formatting.
The base-10 conversion mode is set independently
using commands: fix, int, or sci.
The period character "." is synonymous to "print". Adding "f" to print command will format the text output stream in groups of 10 digits, with 100 digits per line, in blocks of 1000 digits. Formatting is independent of the base-10 conversion mode set with: fix, int, or sci. Use "help print" to see more options. |
||
| rcl <reg> | XReg |
Recall value from Register Reg0 to Reg7 Move Zreg → Treg Move Yreg → Zreg Move Xreg → Yreg Copy Register to Xreg Valid input: 0,1,2,3,4,5,6,7 |
|
| rdown |
Rotate stack down R↓ (circular rotation) Move Yreg → Xreg Move Zreg → Yreg Move Treg → Zreg (Circular) Move previous Xreg → Treg |
||
| recip | Xreg | Xreg | Compute Xreg = 1/Xreg reciprocal value |
| rup |
Rotate stack up R↑ (circular rotation) Move Zreg → Treg Move Yreg → Zreg Move Xreg → Yreg (circuar) Move previous Treg → Xreg |
||
| sigfigs sigfigs v sigfigs <a> sf sf v sf <a> |
Show or set number of significant digits. The command "sf" is synonymous to "sigfigs" Adding "v" to sigfigs or sf will show accuracy verbose mode, showing bytes and words. Adding an integer argument to sigfigs or sf will set the variable size. Example: "sf 1000" will set accuracy to 1000 digits. Use "help sf" to get more options to set variable size. | ||
| sto <reg> | XReg |
Store value from Xreg to Reg0 to Reg7 Valid input: 0,1,2,3,4,5,6,7 Stack is not rotated. |
|
| xy | Exchange Xreg and Yreg |
RPN calculators can be recognized because RPN calculators do not have an equals sign [=] button. In place of the equals sign key is a large [Enter] key. You can read about RPN on Wikipedia here This type of calculator will add 1 + 2 + 3 to obtain the sum 6 with the following keystrokes:
"1 Enter 2 Enter 3 + +"
Scientific calculators like the HP-11C or HP-15C have always been my favorite. Anyone who has used such a scientific calculator should feel right at home with this type of calculator. This program works with a 4 register stack, X, Y, Z, and T. Similar to a scientific calculator, there are 8 storage registers number 0 to 7. There is a simple demonstration of these registers at the start of this program's tutorial here.
The program will accept floating point input. At the "Op Code:" prompt,
enter a numeric text string. Use the keyboard [Enter] key to terminate the input.
The input be converted to a binary fixed point.
White space is ignored within the number.
Example syntax:
0
0.0
123
+123
-123
123.456
-123.456
For example:
Op Code: 123 Op Code: 456 Op Code; + XREG +579.000000000000000000000000000000000000000000000000 YREG 0.0 ZREG 0.0 TREG 0.0
Printing involves 3 concepts: base-10 conversion, text formatting, and significant digits.
Base-10 conversion:
All numbers are stored binary fixed point format.
In order to view the numbers in human understandable
output, it is necessary to convert the binary numbers (base-2) to recognizable (base-10)
format. For example, the number "123.0" would be stored as binary
fixed point as (integer part).(fraction part) with values
"07B.0000000000000000"
hex<PHONE_NUMBER>000000<PHONE_NUMBER>00007B<PHONE_NUMBER>000000<PHONE_NUMBER>000000<PHONE_NUMBER>000000<PHONE_NUMBER>000000 dec +123.000000000000000000000000000000000000000000000000000000000000
Text formatting:
The process of the base-10 conversion produces a continuous stream of ascii
characters. Unformatted text will "wrap" to the next line when the screen width of the
console terminal is reached. It is very difficult to work with unformatted
numbers. Formatting requires adding ascii space characters and
end of line characters. Formatting is configured by adding the "f" modifier character
to the end of the "print" or "." commands to request that text be formatted in group of 10 digits,
100 digits per line, in blocks of 1000 digits.
print +3.141592653589793238462643383279502884197169399375105820974944 print f +3.<PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER> . +3.141592653589793238462643383279502884197169399375105820974944 . f +3.<PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER>
Significant digits:
In the case of any repetitive calculation that runs in a loop,
each operation in the loop may experience round off errors.
Over many loops, these cumulative errors can add up.
Additionally, the variables are allocated in 64 bit words. The intended number of decimal
digits may not match up to an even number of 64 bit words.
To avoid this problem, extra bytes (or 64 bit words) are added to each variable to absorb
these precision errors.
To illustrate, take the example of dividing 1/3 to produce and endless text string of 3's looking like "0.3333...". However at some point the number may inherit various accuracy errors and look something like "0.33333328342". In this case 6 digits were accurate followed by 5 random digits. The sigfigs or sf command will set the intended accuracy variable size and number of base-10 digits to print. Extra 64 bit words are allocated, called "guard words". Adding "e" followed by an integer to the sigfigs or sf command will allow extended digits to be included in the "print" or "." commands. Extended digits beyond the specified accuracy are shown in parentheses.
Example:
"sf 100" will set accuracy to 100 digits.
"sf e 100" will tell the program to print 100 "extended" digits.
Let's do the this and divide 1/3, then print 100 digits and 100 extra
digits, 200 total. You can see the last 37 digits are random.
Although the requested accuracy is 100 digits, in fact this calculation
of 1/3 has an internal calculation accuracy of about 163 digits.
+0.333333333333333333333333333333333333333333333333333333333333333333333333333333<PHONE_NUMBER>333333333333(3333333333333333333333333333333333333333333333333333333333<PHONE_NUMBER>63606368550117241574023322014605)
A normal calculation to 100 digits would print 1/3 to the specified accuracy.
+0.333333333333333333333333333333333333333333333333333333333333333333333333333333<PHONE_NUMBER>333333333333
To calculate and print pi to 1000 digits with 10 extended digits and print in formatted output (note period command to print), you would do the following:
Op Code: sf 1000 Op Code: sf e 10 Op Code: c.pi Op Code: . f
To capture text output to a disk file, first create a folder called "out" in the current working directory. Next use the "log" and "logoff" commands to start and stop a logging session. The output text capture files will be automatically named out/out001.txt, out/out002.txt, out/out003.txt ...
Each time a numeric command is requested from the keyboard, the program will show the stack registers, Xreg, Yreg, Zreg, and Treg. The number is shown unformatted, truncated to 50 digits.


Upload a different photo...
First name
Last name
Phone
Email
House.No
Password
Verify
Save
Reset
Profiles
First Name:
Second Name:
Phone Number:
House Number:
Email:


fun uploadPipeline(): Job
Uploads Pipeline that is currently in database.
Return Job related to this process.


TGMapView
@interface TGMapView : UIView <UIGestureRecognizerDelegate>
TGMapView
is a flexible and customizable map view managing the lifecycle of an OpenGL ES map. This view provides
gesture handlers for tap, double-tap, long press, pan, pinch, rotate, and shove gestures.
The public interface provides dynamic map marker placement, change of camera view settings, and map description changes through scene updates.
This view uses scene files described by the Tangram scene format allowing you to fully customize your map using your own data. Some pre-made basemap styles can be found here using Nextzen data sources.
To use basemap styles you can sign up for an API key and load it through your application:
let sceneURL = URL("https://www.nextzen.org/carto/bubble-wrap-style/9/bubble-wrap-style.zip");
let sceneUpdates = [ TGSceneUpdate(path: "global.sdk_api_key", value: "YOUR_API_KEY") ];
view.loadScene(from: sceneURL, with: sceneUpdates);
Note
All the screen positions used in this inteface are in logical pixel or drawing coordinate system (based on aUIKit
coordinate system), which is independent of the phone pixel density. Refer to the
Apple documentation
regarding Coordinate Systems and Drawing in iOS for more information.
-
Initializes and returns a new map view with no scene loaded.
To load a map scene use one of:
-[TGMapView loadSceneFromURL:withUpdates:]
-[TGMapView loadSceneAsyncFromURL:withUpdates:]
-[TGMapView loadSceneFromYAML:relativeToURL:withUpdates:]
-[TGMapView loadSceneAsyncFromYAML:relativeToUrl:withUpdates:]
Declaration
Objective-C
- (nonnull instancetype)initWithFrame:(CGRect)frame;
Swift
init(frame: CGRect)
Parameters
frame
The view frame.
Return Value
An initialized map view.
-
Initializes and returns a new map view with no scene loaded.
To load a map scene use one of:
-[TGMapView loadSceneFromURL:withUpdates:]
-[TGMapView loadSceneAsyncFromURL:withUpdates:]
-[TGMapView loadSceneFromYAML:relativeToURL:withUpdates:]
-[TGMapView loadSceneAsyncFromYAML:relativeToUrl:withUpdates:]
Declaration
Objective-C
- (nonnull instancetype)initWithFrame:(CGRect)frame urlHandler:(nonnull id<TGURLHandler>)urlHandler;
Parameters
frame
The view frame.
urlHandler
A
TGURLHandler
for customizing URL request behavior.Return Value
An initialized map view.
-
Load a scene file synchronously from a URL with a list of updates.
If an error occurs while applying updates the new scene will not be applied. See
TGSceneUpdate
for details.Declaration
Objective-C
- (int)loadSceneFromURL:(nonnull NSURL *)url withUpdates:(nullable NSArray<TGSceneUpdate *> *)updates;
Swift
func loadScene(from url: URL, with updates: [TGSceneUpdate]?) -> Int32
Parameters
url
An http(s) or file URL for the scene file.
updates
A list of
TGSceneUpdate
to apply to the scene, ornil
.Return Value
The integer ID for the new scene or -1 if the scene cannot be loaded.
-
Load a scene file asynchronously from a URL with a list of updates.
Calls
-[TGMapViewDelegate mapView:didLoadScene:withError:]
on themapViewDelegate
when it completes.If an error occurs while applying updates the new scene will not be applied. See
TGSceneUpdate
for details.Declaration
Objective-C
- (int)loadSceneAsyncFromURL:(nonnull NSURL *)url withUpdates:(nullable NSArray<TGSceneUpdate *> *)updates;
Swift
func loadSceneAsync(from url: URL, with updates: [TGSceneUpdate]?) -> Int32
Parameters
url
An http(s) or file URL for the scene file.
updates
A list of
TGSceneUpdate
to apply to the scene, ornil
.Return Value
The integer ID for the new scene or -1 if the scene cannot be loaded.
-
Load a scene synchronously from string with a list of updates.
Calls
-[TGMapViewDelegate mapView:didLoadScene:withError:]
on themapViewDelegate
when it completes.If an error occurs while applying updates the new scene will not be applied. See
TGSceneUpdate
for details.Declaration
Objective-C
- (int)loadSceneFromYAML:(nonnull NSString *)yaml relativeToURL:(nonnull NSURL *)url withUpdates:(nullable NSArray<TGSceneUpdate *> *)updates;
Swift
func loadScene(fromYAML yaml: String, relativeTo url: URL, with updates: [TGSceneUpdate]?) -> Int32
Parameters
yaml
YAML scene string.
url
The base URL used to resolve relative URLs in the scene.
updates
A list of
TGSceneUpdate
to apply to the scene, ornil
.Return Value
The integer ID for the new scene or -1 if the scene cannot be loaded.
-
Load a scene asynchronously from string with a list of updates.
Calls
-[TGMapViewDelegate mapView:didLoadScene:withError:]
on themapViewDelegate
when it completes.If an error occurs while applying updates the new scene will not be applied. See
TGSceneUpdate
for details.Declaration
Objective-C
- (int)loadSceneAsyncFromYAML:(nonnull NSString *)yaml relativeToURL:(nonnull NSURL *)url withUpdates:(nullable NSArray<TGSceneUpdate *> *)updates;
Swift
func loadSceneAsync(fromYAML yaml: String, relativeTo url: URL, with updates: [TGSceneUpdate]?) -> Int32
Parameters
yaml
YAML scene string.
url
The base URL used to resolve relative URLs in the scene.
updates
A list of
TGSceneUpdate
to apply to the scene, ornil
.Return Value
The integer ID for the new scene or -1 if the scene cannot be loaded.
-
Modify the current scene asynchronously with a list of updates.
Calls
-[TGMapViewDelegate mapView:didLoadScene:withError:]
on themapViewDelegate
when it completes.If an error occurs while applying updates, no changes will be applied. See
TGSceneUpdate
for details.Declaration
Objective-C
- (int)updateSceneAsync:(nonnull NSArray<TGSceneUpdate *> *)updates;
Swift
func updateSceneAsync(_ updates: [TGSceneUpdate]) -> Int32
Parameters
updates
A list of
TGSceneUpdate
to apply to the scene.Return Value
The integer ID for the updated scene or -1 if the scene cannot be updated.
-
The gesture recognizer delegate May be
nil
. SeeTGRecognizerDelegate
for more details.Declaration
Objective-C
@property (readwrite, nonatomic, nullable) id<TGRecognizerDelegate> gestureDelegate;
-
The map view delegate May be
nil
. SeeTGMapViewDelegate
for more details.Declaration
Objective-C
@property (readwrite, nonatomic, nullable) id<TGMapViewDelegate> mapViewDelegate;
-
The current position and orientation of the map camera.
Setting this property will move the map immediately. To animate the movement use
-[TGMapView setCameraPosition:withDuration:easeType:callback:]
or-[TGMapView flyToCameraPosition:withDuration:callback:]
Declaration
Objective-C
@property (readwrite, copy, nonatomic) TGCameraPosition *_Nonnull cameraPosition;
Swift
@NSCopying var cameraPosition: TGCameraPosition { get set }
-
The minimum zoom level for the map view.
The default minimum zoom is 0. Values less than the default will be clamped. Assigning a value greater than the current maximum zoom will set the maximum zoom to this value.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) CGFloat minimumZoomLevel;
Swift
var minimumZoomLevel: CGFloat { get set }
-
The maximum zoom level for the map view.
The default maximum zoom is 20.5. Values greater than the default will be clamped. Assigning a value less than the current minimum zoom will set the minimum zoom to this value.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) CGFloat maximumZoomLevel;
Swift
var maximumZoomLevel: CGFloat { get set }
-
Assign a
TGCameraType
to the view cameraDeclaration
Objective-C
@property (assign, readwrite, nonatomic) TGCameraType cameraType;
Swift
var cameraType: TGCameraType { get set }
-
Move the map camera to a new position with an easing animation.
Declaration
Objective-C
- (void)setCameraPosition:(nonnull TGCameraPosition *)cameraPosition withDuration:(NSTimeInterval)duration easeType:(TGEaseType)easeType callback:(nullable void (^)(BOOL))callback;
Swift
func setCameraPosition(_ cameraPosition: TGCameraPosition, withDuration duration: TimeInterval, easeType: TGEaseType, callback: ((Bool) -> Void)? = nil)
Parameters
cameraPosition
The new camera position
duration
The animation duration in seconds
easeType
The type of easing animation
callback
A callback to execute when the animation completes
-
Move the map camera to a new position with an animation that pans and zooms in a smooth arc.
The animation duration is calculated based on the distance to the new camera position.
Declaration
Objective-C
- (void)flyToCameraPosition:(nonnull TGCameraPosition *)cameraPosition callback:(nullable void (^)(BOOL))callback;
Swift
func fly(to cameraPosition: TGCameraPosition, callback: ((Bool) -> Void)? = nil)
Parameters
cameraPosition
The new camera position
callback
A callback to execute when the animation completes
-
Move the map camera to a new position with an animation that pans and zooms in a smooth arc.
Declaration
Objective-C
- (void)flyToCameraPosition:(nonnull TGCameraPosition *)cameraPosition withDuration:(NSTimeInterval)duration callback:(nullable void (^)(BOOL))callback;
Swift
func fly(to cameraPosition: TGCameraPosition, withDuration duration: TimeInterval, callback: ((Bool) -> Void)? = nil)
Parameters
cameraPosition
The new camera position
callback
A callback to execute when the animation completes
-
Get a camera position that encloses the given bounds with at least the given amount of padding on each side.
Declaration
Objective-C
- (nonnull TGCameraPosition *)cameraThatFitsBounds:(TGCoordinateBounds)bounds withPadding:(UIEdgeInsets)padding;
Swift
func cameraThatFitsBounds(_ bounds: TGCoordinateBounds, withPadding padding: UIEdgeInsets) -> TGCameraPosition
Parameters
bounds
The map bounds to enclose
padding
The minimum distance to keep between the bounds and the edges of the view
-
The longitude and latitude of the center of the map view
Declaration
Objective-C
@property (assign, readwrite, nonatomic) CLLocationCoordinate2D position;
Swift
var position: CLLocationCoordinate2D { get set }
-
The zoom level of the map view
Declaration
Objective-C
@property (assign, readwrite, nonatomic) CGFloat zoom;
Swift
var zoom: CGFloat { get set }
-
The orientation of to the map view clockwise from true North
Declaration
Objective-C
@property (assign, readwrite, nonatomic) CLLocationDirection bearing;
Swift
var bearing: CLLocationDirection { get set }
-
The tilt angle of the map view in degrees away from straight down
Declaration
Objective-C
@property (assign, readwrite, nonatomic) CGFloat pitch;
Swift
var pitch: CGFloat { get set }
-
Convert a longitude and latitude to a view position.
Declaration
Objective-C
- (CGPoint)viewPositionFromCoordinate:(CLLocationCoordinate2D)coordinate;
Swift
func viewPosition(from coordinate: CLLocationCoordinate2D) -> CGPoint
Parameters
coordinate
The geographic coordinate to convert
Return Value
The view position of the input coordinate
-
Convert a position in view coordinates into the longitude and latitude of the corresponding geographic location.
Declaration
Objective-C
- (CLLocationCoordinate2D)coordinateFromViewPosition:(CGPoint)viewPosition;
Swift
func coordinate(fromViewPosition viewPosition: CGPoint) -> CLLocationCoordinate2D
Parameters
viewPosition
the position in view coordinates to convert
Return Value
the longitude and latitude
-
Remove all the Markers from the map.
Declaration
Objective-C
- (void)markerRemoveAll;
Swift
func markerRemoveAll()
-
Assign the resource root for this map view.
Scene file URLs will be resolved relative to this URL.
Note
By default the resource root is the main bundle resource URL. Using the default resource root:scene.yaml
is resolved tofile://<main bundle path>/Resources/scene.yaml
,/path/scene.yaml
is resolved tofile:///path/scene.yaml
, andhttps://my.host/scene.yaml
is resolved to itself.Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSURL *_Nonnull resourceRoot;
Swift
var resourceRoot: URL { get set }
-
Request the view to draw another frame.
Typically there is no need to call this. The map view re-draws automatically when needed.
Declaration
Objective-C
- (void)requestRender;
Swift
func requestRender()
-
The rate you want the map view to re-draw its contents.
The default value is 60 frames per second.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) NSInteger preferredFramesPerSecond;
Swift
var preferredFramesPerSecond: Int { get set }
-
If
continuous
isYES
, the map view will re-draw continuously. Otherwise, the map will re-draw only when an event changes the map view.Scenes can be configured as
animated
(see the animated property documentation for details). When a scene is loaded this property is set to match the animated value from the scene.Note
Changing this property will override the inferred value from the scene. Enabling continuous rendering can significantly increase the energy usage of an application.Declaration
Objective-C
@property (assign, readwrite, nonatomic) BOOL continuous;
Swift
var continuous: Bool { get set }
-
Replaces the tap gesture recognizer used by the map view and adds it to the UIView.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) UITapGestureRecognizer *_Nonnull tapGestureRecognizer;
Swift
var tapGestureRecognizer: UITapGestureRecognizer { get set }
-
Replaces the double tap gesture recognizer used by the map view and adds it to the UIView.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) UITapGestureRecognizer *_Nonnull doubleTapGestureRecognizer;
Swift
var doubleTapGestureRecognizer: UITapGestureRecognizer { get set }
-
Replaces the pan gesture recognizer used by the map view and adds it to the UIView.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) UIPanGestureRecognizer *_Nonnull panGestureRecognizer;
Swift
var panGestureRecognizer: UIPanGestureRecognizer { get set }
-
Replaces the pinch gesture recognizer used by the map view and adds it to the UIView.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) UIPinchGestureRecognizer *_Nonnull pinchGestureRecognizer;
Swift
var pinchGestureRecognizer: UIPinchGestureRecognizer { get set }
-
Replaces the rotation gesture recognizer used by the map view and adds it to the UIView.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) UIRotationGestureRecognizer *_Nonnull rotationGestureRecognizer;
Swift
var rotationGestureRecognizer: UIRotationGestureRecognizer { get set }
-
Replaces the shove gesture recognizer used by the map view and adds it to the UIView.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) UIPanGestureRecognizer *_Nonnull shoveGestureRecognizer;
Swift
var shoveGestureRecognizer: UIPanGestureRecognizer { get set }
-
Replaces the long press gesture recognizer used by the map view and adds it to the UIView.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) UILongPressGestureRecognizer *_Nonnull longPressGestureRecognizer;
Swift
var longPressGestureRecognizer: UILongPressGestureRecognizer { get set }
-
Client can use these to trigger explicit
TGMapRegionChangeState
changes Notifies that client is going to begin map region animationDeclaration
Objective-C
- (void)notifyGestureDidBegin;
Swift
func notifyGestureDidBegin()
-
Client can use these to trigger explicit
TGMapRegionChangeState
changes Notifies that client is animating map regionDeclaration
Objective-C
- (void)notifyGestureIsChanging;
Swift
func notifyGestureIsChanging()
-
Client can use these to trigger explicit
TGMapRegionChangeState
changes Notifies that client is stopping animating map regionDeclaration
Objective-C
- (void)notifyGestureDidEnd;
Swift
func notifyGestureDidEnd()
-
Adds a named data layer to the map.
Note
You cannot create more than one data source with the same name. If you call this with a name that is already in use, the previously returned object will be returned again.
Declaration
Objective-C
- (nullable TGMapData *)addDataLayer:(nonnull NSString *)name generateCentroid:(BOOL)generateCentroid;
Swift
func addDataLayer(_ name: String, generateCentroid: Bool) -> TGMapData?
Parameters
name
The name of the data layer.
generateCentroid
If YES, a point feature will be added at the centroid of every polygon feature. This can be useful for labeling.
Return Value
The map data, or
nil
if the data source can’t be initialized.
-
Capture a screenshot of the map view.
The captured screenshot will be delivered to the
mapViewDelegate
by themapView:didCaptureScreenshot:
method. The delegate must implement this method to receive the screenshot.Declaration
Objective-C
- (void)captureScreenshot:(BOOL)waitForViewComplete;
Swift
func captureScreenshot(_ waitForViewComplete: Bool)
Parameters
waitForViewComplete
If YES, the view will wait for all parts of the map in the current view to finish loading before taking the screenshot.
-
Set the radius in logical pixels to use when picking features on the map (default is
0.5
).The
-pick*
methods will retrieve allinteractive
map objects from a circular area with this radius around the pick location. Setting a larger radius can help ensure that desired features are retrieved from an imprecise touch input.Declaration
Objective-C
- (void)setPickRadius:(CGFloat)pixels;
Swift
func setPickRadius(_ pixels: CGFloat)
Parameters
pixels
The pick radius in logical pixels.
-
Select a visible feature marked as
interactive
from the map view.The pick result will be delivered to the
mapViewDelegate
bymapView:didSelectFeature:atScreenPosition:
.The scene file determines which features can be picked. See the interactive property documentation for details.
Declaration
Objective-C
- (void)pickFeatureAt:(CGPoint)viewPosition;
Swift
func pickFeature(at viewPosition: CGPoint)
Parameters
viewPosition
The position in the view to pick from, in logical pixels.
-
Select a label marked as
interactive
from the map view.The pick result will be delivered to the
mapViewDelegate
bymapView:didSelectFeature:atScreenPosition:
.The scene file determines which features can be picked. See the interactive property documentation for details.
Declaration
Objective-C
- (void)pickLabelAt:(CGPoint)viewPosition;
Swift
func pickLabel(at viewPosition: CGPoint)
Parameters
viewPosition
The position in the view to pick from, in logical pixels.
-
Select a Marker marked as
interactive
from the map view.The pick result will be delivered to the
mapViewDelegate
bymapView:didSelectFeature:atScreenPosition:
.To pick a marker you must set the
interactive
property when styling it:TGMarker marker; marker.styling = "{ style: 'points', interactive : true, color: 'white', size: [30px, 30px], order: 500 }"
Declaration
Objective-C
- (void)pickMarkerAt:(CGPoint)viewPosition;
Swift
func pickMarker(at viewPosition: CGPoint)
Parameters
viewPosition
The position in the view to pick from, in logical pixels.
-
Reduce memory usage by freeing currently unused resources.
Declaration
Objective-C
- (void)didReceiveMemoryWarning;
Swift
func didReceiveMemoryWarning()
-
Set a
TGDebugFlag
on the map view.Declaration
Objective-C
- (void)setDebugFlag:(TGDebugFlag)debugFlag value:(BOOL)on;
Swift
func setDebugFlag(_ debugFlag: TGDebugFlag, value on: Bool)
Parameters
debugFlag
The debug flag to set.
on
Whether the flag is on or off.
-
Get the status of a
TGDebugFlag
.Declaration
Objective-C
- (BOOL)getDebugFlag:(TGDebugFlag)debugFlag;
Swift
func getDebugFlag(_ debugFlag: TGDebugFlag) -> Bool
Parameters
debugFlag
The debug flag to get the status of.
Return Value
Whether the flag is currently on or off for the map view.
-
Invert the state of a
TGDebugFlag
.Declaration
Objective-C
- (void)toggleDebugFlag:(TGDebugFlag)debugFlag;
Swift
func toggle(_ debugFlag: TGDebugFlag)
Parameters
debugFlag
The debug flag to toggle the state of.


Shishuasana
Shishu= child; asana= pose
Pronounced- shishuh-asanah
How To Do:
- Sit on your heels. Keeping your hips on the heels, bend forward, and lower your forehead to the floor.
- Keep the arms alongside your body with hands on the floor, palms facing up. (If this is not comfortable, you can place one fist on top of another and rest your forehead on them.)
- Gently press your chest on the thighs.
- Hold.
- Slowly come up to sit on the heels, uncurling vertebra by vertebra and relax.
Benefits:
- Deeply relaxing for the back.
- Relieves constipation.
- Calms down the nervous system.
Cautions:
- In case of serious back or knee injuries avoid this pose.
- Pregnant women should avoid doing this pose.
- Avoid this pose if you suffering from are or had recently suffered from diarrhea.


Find yourself a new best friend
List a pet
Adopt a pet
Species:
Name:
Age:
Sex:
Female
Male
Description:
Image URL:
Submit
×
Modal title


| Constants |
| NONE |
specifies no underlining.
|
| SINGLE |
specifies underlining with a single line.
|
| DOUBLE |
specifies underlining with a double line.
|
| DOTTED |
specifies underlining with a dotted line.
|
| DONTKNOW |
The kind of underlining is not known.
|
| DASH |
specifies underlining with a dashed line.
|
| LONGDASH |
specifies underlining with long dashes.
|
| DASHDOT |
specifies underlining with a dash and dot sequence.
|
| DASHDOTDOT |
specifies underlining with a dash, dot, dot sequence.
|
| SMALLWAVE |
specifies underlining with a small wave.
|
| WAVE |
specifies underlining with a wave.
|
| DOUBLEWAVE |
specifies underlining with a double wave.
|
| BOLD |
specifies underlining with a bold line.
|
| BOLDDOTTED |
specifies underlining with bold dots.
|
| BOLDDASH |
specifies underlining with bold dashes.
|
| BOLDLONGDASH |
specifies underlining with long bold dashes.
|
| BOLDDASHDOT |
specifies underlining with a dash and dot sequence in bold.
|
| BOLDDASHDOTDOT |
specifies underlining with a dash, dot, dot sequence in bold.
|
| BOLDWAVE |
specifies underlining with a bold wave.
|
| Constants' Details |
NONE
const short NONE = 0;
- Description
- specifies no underlining.
|
|
SINGLE
const short SINGLE = 1;
- Description
- specifies underlining with a single line.
|
|
DOUBLE
const short DOUBLE = 2;
- Description
- specifies underlining with a double line.
|
|
DOTTED
const short DOTTED = 3;
- Description
- specifies underlining with a dotted line.
|
|
DONTKNOW
const short DONTKNOW = 4;
- Description
- The kind of underlining is not known.
|
|
DASH
const short DASH = 5;
- Description
- specifies underlining with a dashed line.
|
|
LONGDASH
const short LONGDASH = 6;
- Description
- specifies underlining with long dashes.
|
|
DASHDOT
const short DASHDOT = 7;
- Description
- specifies underlining with a dash and dot sequence.
|
|
DASHDOTDOT
const short DASHDOTDOT = 8;
- Description
- specifies underlining with a dash, dot, dot sequence.
|
|
SMALLWAVE
const short SMALLWAVE = 9;
- Description
- specifies underlining with a small wave.
|
|
WAVE
const short WAVE = 10;
- Description
- specifies underlining with a wave.
|
|
DOUBLEWAVE
const short DOUBLEWAVE = 11;
- Description
- specifies underlining with a double wave.
|
|
BOLD
const short BOLD = 12;
- Description
- specifies underlining with a bold line.
|
|
BOLDDOTTED
const short BOLDDOTTED = 13;
- Description
- specifies underlining with bold dots.
|
|
BOLDDASH
const short BOLDDASH = 14;
- Description
- specifies underlining with bold dashes.
|
|
BOLDLONGDASH
const short BOLDLONGDASH = 15;
- Description
- specifies underlining with long bold dashes.
|
|
BOLDDASHDOT
const short BOLDDASHDOT = 16;
- Description
- specifies underlining with a dash and dot sequence in bold.
|
|
BOLDDASHDOTDOT
const short BOLDDASHDOTDOT = 17;
- Description
- specifies underlining with a dash, dot, dot sequence in bold.
|
|
BOLDWAVE
const short BOLDWAVE = 18;
- Description
- specifies underlining with a bold wave.
|
|
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


Importing a New Page
How to add a new page using the Import function. This enables you to apply a page template that has previously been exported. The new page is added to the site before user can change the page settings.
- On the ControlBar, hover over the Pages menu option and select Import Page
- At Folder, select the folder of the Digital Asset Management module (Admin > File Management page) where the template is located. This enables the template field below and populates the drop down list with all templates within this folder.
- At Template, select a template from the drop down list. This displays a description of the selected template providing more details of the template.
- At Import Mode, select Create A New Page. to add a new page or Replace the Current Page to import the content and settings into the page you are currently on.
- In the Page Name text box, the name of the template will be displayed. You can choose to enter a new page name or use this name,
- At Parent Page, select <None Specified> to set this page as a parent page - OR - Select the parent page from the drop down list. Note: Page Editors can only select parent pages which they are editors of.
- At Insert Page, select from these options to choose the location of the new page in the menu:
- Select a page from the drop down list and then select to add the new page either Before or After that page in the menu on the current level.
- Select Add to End to add the new page to the end of the menu on the current level.
- At Redirect Mode? select from the following options to set where you will be redirected to once you complete this importing:
- Select View Imported Page to be redirected to the newly created page upon creation (Import).
- Select Edit Imported Page to be redirected to the Page Settings page of the newly created page upon creation (Import). This enables you to configure the page settings immediately.
- Click the Import button.
Tip: View the new page to ensure that any modules that are set to display on all pages are not duplicated. This may occur if the selected template includes modules that are displayed on all pages.


Hello World!
My name is
Luyolo Magayana,
Software Engineer.
HTML / CSS / JavaScript
BIO
My name is Luyolo Magayana, and I'm a Software Engineer Intern at
Younglings. My ultimate goal is to become a Senior Developer.
SKILLS
I have proficient IT computer skills, competent in making use of the MS
Office Suite as well as Code Editors. I have excellent teamwork skills
developed through working in groups throughout high school studies.
EXPERIENCE
I learnt the basics of web development back in high school; we were only
taught HTML. When I got to CapaCiTi I was then introduced to CSS and
JavaScript, this is where I started going deeper and deeper into coding.
ACCOMPLISHMENTS
My biggest achievement in life was obtaining my National Senior
Certificate, having to be the first man in my family to obtain the Qualification.
EDUCATION
I obtained my National Senior Certificate (NSC 2015) at Gardens
Commercial High School, with career subjects Business Studies,
Economics and Computer Application Technology, this is where I learnt
the basics of web development.
INTERESTS
I love creating new things, having the power to develop something totally
new and out of this world. This is the mere reason why I went into Software Engineering.
PROFESSIONAL GOALS & OBJECTIVES
My biggest dream is to work my way up the IT ladder and become a Senior
Developer. I want to oversee all software developed in the company
and have the last say when it comes to launching new software products.


Hello {{.Name}},
Thank you for verifying your email address.
Your registration request will be reviewed by the {{.WorkbenchName}} team. You should hear back from us within 7 days.
Please feel free to contact us at the email address below with any questions.
Sincerely,
{{.WorkbenchName}} team
{{.SupportEmail}}


It looks like you have no Kafka Connectors configured yet!
Let's head over and set one up now! Setup new connector Ask an Administrator to configure a connector.


Structural Contributions of IDPs
IDP tool
About
Citation
Citation for this program : (citation, add refworks file?)