HWCLOCK
Section: Maintenance Commands (8)Updated: 06 August 2008
Index Return to Main Contents
NAME
hwclock - query and set the hardware clock (RTC)SYNOPSIS
hwclock [functions] [options]DESCRIPTION
hwclock is a tool for accessing the Hardware Clock. You can display the current time, set the Hardware Clock to a specified time, set the Hardware Clock to the System Time, and set the System Time from the Hardware Clock.You can also run hwclock periodically to insert or remove time from the Hardware Clock to compensate for systematic drift (where the clock consistently gains or loses time at a certain rate if left to run).
FUNCTIONS
You need exactly one of the following options to tell hwclock what function to perform:
- -r, --show
-
Read the Hardware Clock and print the time on Standard Output.
The time shown is always in local time, even if you keep your Hardware Clock
in Coordinated Universal Time. See the
--utc
option.
- --set
- Set the Hardware Clock to the time given by the --date option.
- -s, --hctosys
-
Set the System Time from the Hardware Clock.
Also set the kernel's timezone value to the local timezone as indicated by the TZ environment variable and/or /usr/share/zoneinfo, as tzset(3) would interpret them. The obsolete tz_dsttime field of the kernel's timezone value is set to DST_NONE. (For details on what this field used to mean, see settimeofday(2).)
This is a good option to use in one of the system startup scripts.
- -w, --systohc
- Set the Hardware Clock to the current System Time.
- --systz
-
Reset the System Time based on the current timezone.
Also set the kernel's timezone value to the local timezone as indicated by the TZ environment variable and/or /usr/share/zoneinfo, as tzset(3) would interpret them. The obsolete tz_dsttime field of the kernel's timezone value is set to DST_NONE. (For details on what this field used to mean, see settimeofday(2).)
This is an alternate option to --hctosys that does not read the hardware clock, and may be used in system startup scripts for recent 2.6 kernels where you know the System Time contains the Hardware Clock time.
- --adjust
- Add or subtract time from the Hardware Clock to account for systematic drift since the last time the clock was set or adjusted. See discussion below.
- --getepoch
-
Print the kernel's Hardware Clock epoch value to standard output.
This is the number of years into AD to which a zero year value in the
Hardware Clock refers. For example, if you are using the convention
that the year counter in your Hardware Clock contains the number of
full years since 1952, then the kernel's Hardware Counter epoch value
must be 1952.
This epoch value is used whenever hwclock reads or sets the Hardware Clock.
- --setepoch
- Set the kernel's Hardware Clock epoch value to the value specified by the --epoch option. See the --getepoch option for details.
- -v, --version
- Print the version of hwclock on Standard Output.
- --date=date_string
-
You need this option if you specify the
--set
option. Otherwise, it is ignored.
This specifies the time to which to set the Hardware Clock.
The value of this option is an argument to the
date(1)
program.
For example,
hwclock --set --date=9/22/96 16:45:05
The argument is in local time, even if you keep your Hardware Clock in Coordinated Universal time. See the --utc option.
- --epoch=year
-
Specifies the year which is the beginning of the Hardware Clock's
epoch. I.e. the number of years into AD to which a zero value in the
Hardware Clock's year counter refers. It is used together with
the --setepoch option to set the kernel's idea of the epoch of the
Hardware Clock, or otherwise to specify the epoch for use with
direct ISA access.
For example, on a Digital Unix machine:
hwclock --setepoch --epoch=1952
OPTIONS
The following options apply to most functions.
- -u, --utc
- --localtime
-
Indicates that the Hardware Clock is kept in Coordinated Universal
Time or local time, respectively. It is your choice whether to keep
your clock in UTC or local time, but nothing in the clock tells which
you've chosen. So this option is how you give that information to
hwclock.
If you specify the wrong one of these options (or specify neither and take a wrong default), both setting and querying of the Hardware Clock will be messed up.
If you specify neither --utc nor --localtime , the default is whichever was specified the last time hwclock was used to set the clock (i.e. hwclock was successfully run with the --set, --systohc, or --adjust options), as recorded in the adjtime file. If the adjtime file doesn't exist, the default is local time.
- --noadjfile
-
disables the facilities provided by
/etc/adjtime.
hwclock
will not read nor write to that file with this option. Either
--utc
or
--localtime
must be specified when using this option.
- --adjfile=filename
-
overrides the default /etc/adjtime.
- -f, --rtc=filename
-
overrides the default /dev file name, which is
/dev/rtc
on many platforms but may be
/dev/rtc0,
/dev/rtc1,
and so on.
- --directisa
-
is meaningful only on an ISA machine or an Alpha (which implements enough
of ISA to be, roughly speaking, an ISA machine for
hwclock's
purposes). For other machines, it has no effect. This option tells
hwclock
to use explicit I/O instructions to access the Hardware Clock.
Without this option,
hwclock
will try to use the /dev/rtc device (which it assumes to be driven by the
rtc device driver). If it is unable to open the device (for read), it will
use the explicit I/O instructions anyway.
The rtc device driver was new in Linux Release 2.
- --badyear
-
Indicates that the Hardware Clock is incapable of storing years outside
the range 1994-1999. There is a problem in some BIOSes (almost all
Award BIOSes made between 4/26/94 and 5/31/95) wherein they are unable
to deal with years after 1999. If one attempts to set the year-of-century
value to something less than 94 (or 95 in some cases), the value that
actually gets set is 94 (or 95). Thus, if you have one of these machines,
hwclock
cannot set the year after 1999 and cannot use the value of the clock as
the true time in the normal way.
To compensate for this (without your getting a BIOS update, which would definitely be preferable), always use --badyear if you have one of these machines. When hwclock knows it's working with a brain-damaged clock, it ignores the year part of the Hardware Clock value and instead tries to guess the year based on the last calibrated date in the adjtime file, by assuming that that date is within the past year. For this to work, you had better do a hwclock --set or hwclock --systohc at least once a year!
Though hwclock ignores the year value when it reads the Hardware Clock, it sets the year value when it sets the clock. It sets it to 1995, 1996, 1997, or 1998, whichever one has the same position in the leap year cycle as the true year. That way, the Hardware Clock inserts leap days where they belong. Again, if you let the Hardware Clock run for more than a year without setting it, this scheme could be defeated and you could end up losing a day.
hwclock warns you that you probably need --badyear whenever it finds your Hardware Clock set to 1994 or 1995.
- --srm
- This option is equivalent to --epoch=1900 and is used to specify the most common epoch on Alphas with SRM console.
- --arc
- This option is equivalent to --epoch=1980 and is used to specify the most common epoch on Alphas with ARC console (but Ruffians have epoch 1900).
- --jensen
- --funky-toy
-
These two options specify what kind of Alpha machine you have. They
are invalid if you don't have an Alpha and are usually unnecessary
if you do, because
hwclock
should be able to determine by itself what it's
running on, at least when
/proc
is mounted.
(If you find you need one of these options to make
hwclock
work, contact the maintainer to see if the program can be improved
to detect your system automatically. Output of `hwclock --debug'
and `cat /proc/cpuinfo' may be of interest.)
--jensen means you are running on a Jensen model.
--funky-toy means that on your machine, one has to use the UF bit instead of the UIP bit in the Hardware Clock to detect a time transition. "Toy" in the option name refers to the Time Of Year facility of the machine.
- --test
- Do everything except actually updating the Hardware Clock or anything else. This is useful, especially in conjunction with --debug, in learning about hwclock.
- --debug
-
Display a lot of information about what
hwclock
is doing internally. Some of its function is complex and this output
can help you understand how the program works.
NOTES
Clocks in a Linux System
There are two main clocks in a Linux system:
The Hardware Clock: This is a clock that runs independently of any control program running in the CPU and even when the machine is powered off.
On an ISA system, this clock is specified as part of the ISA standard. The control program can read or set this clock to a whole second, but the control program can also detect the edges of the 1 second clock ticks, so the clock actually has virtually infinite precision.
This clock is commonly called the hardware clock, the real time clock, the RTC, the BIOS clock, and the CMOS clock. Hardware Clock, in its capitalized form, was coined for use by hwclock because all of the other names are inappropriate to the point of being misleading.
So for example, some non-ISA systems have a few real time clocks with only one of them having its own power domain. A very low power external I2C or SPI clock chip might be used with a backup battery as the hardware clock to initialize a more functional integrated real-time clock which is used for most other purposes.
The System Time: This is the time kept by a clock inside the Linux kernel and driven by a timer interrupt. (On an ISA machine, the timer interrupt is part of the ISA standard). It has meaning only while Linux is running on the machine. The System Time is the number of seconds since 00:00:00 January 1, 1970 UTC (or more succinctly, the number of seconds since 1969). The System Time is not an integer, though. It has virtually infinite precision.
The System Time is the time that matters. The Hardware Clock's basic purpose in a Linux system is to keep time when Linux is not running. You initialize the System Time to the time from the Hardware Clock when Linux starts up, and then never use the Hardware Clock again. Note that in DOS, for which ISA was designed, the Hardware Clock is the only real time clock.
It is important that the System Time not have any discontinuities such as would happen if you used the date(1L) program to set it while the system is running. You can, however, do whatever you want to the Hardware Clock while the system is running, and the next time Linux starts up, it will do so with the adjusted time from the Hardware Clock. You can also use the program adjtimex(8) to smoothly adjust the System Time while the system runs.
A Linux kernel maintains a concept of a local timezone for the system. But don't be misled -- almost nobody cares what timezone the kernel thinks it is in. Instead, programs that care about the timezone (perhaps because they want to display a local time for you) almost always use a more traditional method of determining the timezone: They use the TZ environment variable and/or the /usr/share/zoneinfo directory, as explained in the man page for tzset(3). However, some programs and fringe parts of the Linux kernel such as filesystems use the kernel timezone value. An example is the vfat filesystem. If the kernel timezone value is wrong, the vfat filesystem will report and set the wrong timestamps on files.
hwclock sets the kernel timezone to the value indicated by TZ and/or /usr/share/zoneinfo when you set the System Time using the --hctosys option.
The timezone value actually consists of two parts: 1) a field tz_minuteswest indicating how many minutes local time (not adjusted for DST) lags behind UTC, and 2) a field tz_dsttime indicating the type of Daylight Savings Time (DST) convention that is in effect in the locality at the present time. This second field is not used under Linux and is always zero. (See also settimeofday(2).)
How hwclock Accesses the Hardware Clock
hwclock uses many different ways to get and set Hardware Clock values. The most normal way is to do I/O to the device special file /dev/rtc, which is presumed to be driven by the rtc device driver. However, this method is not always available. For one thing, the rtc driver is a relatively recent addition to Linux. Older systems don't have it. Also, though there are versions of the rtc driver that work on DEC Alphas, there appear to be plenty of Alphas on which the rtc driver does not work (a common symptom is hwclock hanging). Moreover, recent Linux systems have more generic support for RTCs, even systems that have more than one, so you might need to override the default by specifying /dev/rtc0 or /dev/rtc1 instead.
On older systems, the method of accessing the Hardware Clock depends on the system hardware.
On an ISA system, hwclock can directly access the "CMOS memory" registers that constitute the clock, by doing I/O to Ports 0x70 and 0x71. It does this with actual I/O instructions and consequently can only do it if running with superuser effective userid. (In the case of a Jensen Alpha, there is no way for hwclock to execute those I/O instructions, and so it uses instead the /dev/port device special file, which provides almost as low-level an interface to the I/O subsystem).
This is a really poor method of accessing the clock, for all the reasons that user space programs are generally not supposed to do direct I/O and disable interrupts. Hwclock provides it because it is the only method available on ISA and Alpha systems which don't have working rtc device drivers available.
On an m68k system, hwclock can access the clock via the console driver, via the device special file /dev/tty1.
hwclock tries to use /dev/rtc. If it is compiled for a kernel that doesn't have that function or it is unable to open /dev/rtc (or the alternative special file you've defined on the command line) hwclock will fall back to another method, if available. On an ISA or Alpha machine, you can force hwclock to use the direct manipulation of the CMOS registers without even trying /dev/rtc by specifying the --directisa option.
The Adjust Function
The Hardware Clock is usually not very accurate. However, much of its inaccuracy is completely predictable - it gains or loses the same amount of time every day. This is called systematic drift. hwclock's "adjust" function lets you make systematic corrections to correct the systematic drift.
It works like this: hwclock keeps a file, /etc/adjtime, that keeps some historical information. This is called the adjtime file.
Suppose you start with no adjtime file. You issue a hwclock --set command to set the Hardware Clock to the true current time. Hwclock creates the adjtime file and records in it the current time as the last time the clock was calibrated. 5 days later, the clock has gained 10 seconds, so you issue another hwclock --set command to set it back 10 seconds. Hwclock updates the adjtime file to show the current time as the last time the clock was calibrated, and records 2 seconds per day as the systematic drift rate. 24 hours go by, and then you issue a hwclock --adjust command. Hwclock consults the adjtime file and sees that the clock gains 2 seconds per day when left alone and that it has been left alone for exactly one day. So it subtracts 2 seconds from the Hardware Clock. It then records the current time as the last time the clock was adjusted. Another 24 hours goes by and you issue another hwclock --adjust. Hwclock does the same thing: subtracts 2 seconds and updates the adjtime file with the current time as the last time the clock was adjusted.
Every time you calibrate (set) the clock (using --set or --systohc), hwclock recalculates the systematic drift rate based on how long it has been since the last calibration, how long it has been since the last adjustment, what drift rate was assumed in any intervening adjustments, and the amount by which the clock is presently off.
A small amount of error creeps in any time hwclock sets the clock, so it refrains from making an adjustment that would be less than 1 second. Later on, when you request an adjustment again, the accumulated drift will be more than a second and hwclock will do the adjustment then.
It is good to do a hwclock --adjust just before the hwclock --hctosys at system startup time, and maybe periodically while the system is running via cron.
The adjtime file, while named for its historical purpose of controlling adjustments only, actually contains other information for use by hwclock in remembering information from one invocation to the next.
The format of the adjtime file is, in ASCII:
Line 1: 3 numbers, separated by blanks: 1) systematic drift rate in seconds per day, floating point decimal; 2) Resulting number of seconds since 1969 UTC of most recent adjustment or calibration, decimal integer; 3) zero (for compatibility with clock(8)) as a decimal integer.
Line 2: 1 number: Resulting number of seconds since 1969 UTC of most recent calibration. Zero if there has been no calibration yet or it is known that any previous calibration is moot (for example, because the Hardware Clock has been found, since that calibration, not to contain a valid time). This is a decimal integer.
Line 3: "UTC" or "LOCAL". Tells whether the Hardware Clock is set to Coordinated Universal Time or local time. You can always override this value with options on the hwclock command line.
You can use an adjtime file that was previously used with the clock(8) program with hwclock.
Automatic Hardware Clock Synchronization By the Kernel
You should be aware of another way that the Hardware Clock is kept synchronized in some systems. The Linux kernel has a mode wherein it copies the System Time to the Hardware Clock every 11 minutes. This is a good mode to use when you are using something sophisticated like ntp to keep your System Time synchronized. (ntp is a way to keep your System Time synchronized either to a time server somewhere on the network or to a radio clock hooked up to your system. See RFC 1305).
This mode (we'll call it "11 minute mode") is off until something turns it on. The ntp daemon xntpd is one thing that turns it on. You can turn it off by running anything, including hwclock --hctosys, that sets the System Time the old fashioned way.
To see if it is on or off, use the command adjtimex --print and look at the value of "status". If the "64" bit of this number (expressed in binary) equal to 0, 11 minute mode is on. Otherwise, it is off.
If your system runs with 11 minute mode on, don't use hwclock --adjust or hwclock --hctosys. You'll just make a mess. It is acceptable to use a hwclock --hctosys at startup time to get a reasonable System Time until your system is able to set the System Time from the external source and start 11 minute mode.
ISA Hardware Clock Century value
There is some sort of standard that defines CMOS memory Byte 50 on an ISA machine as an indicator of what century it is. hwclock does not use or set that byte because there are some machines that don't define the byte that way, and it really isn't necessary anyway, since the year-of-century does a good job of implying which century it is.
If you have a bona fide use for a CMOS century byte, contact the hwclock maintainer; an option may be appropriate.
Note that this section is only relevant when you are using the "direct ISA" method of accessing the Hardware Clock. ACPI provides a standard way to access century values, when they are supported by the hardware.
ENVIRONMENT VARIABLES
TZFILES
/etc/adjtime /usr/share/zoneinfo/ (/usr/lib/zoneinfo on old systems) /dev/rtc /dev/rtc0 /dev/port /dev/tty1 /proc/cpuinfoSEE ALSO
adjtimex(8), date(1), gettimeofday(2), settimeofday(2), crontab(1), tzset(3)AUTHORS
Written by Bryan Henderson, September 1996 (bryanh@giraffe-data.com), based on work done on the clock program by Charles Hedrick, Rob Hooft, and Harald Koenig. See the source code for complete history and credits.AVAILABILITY
The hwclock command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- FUNCTIONS
- OPTIONS
- NOTES
- Clocks in a Linux System
- How hwclock Accesses the Hardware Clock
- The Adjust Function
- Automatic Hardware Clock Synchronization By the Kernel
- ISA Hardware Clock Century value
- ENVIRONMENT VARIABLES
- FILES
- SEE ALSO
- AUTHORS
- AVAILABILITY
This document was created by man2html, using the manual pages.
Time: 05:34:26 GMT, December 24, 2015


Visual Satellite Picture
Ian Watkins |<EMAIL_ADDRESS>| Last updated: 25 October 1995 | © Crown Copyright 1995


If you deploy CloudFormation stack, Lambda functions and API Gateway have already been made. You should put required part of these resources.
Until last part, we have made AWS services for Full Stack Game. From now on, we are making Lambda functions to handle Game Process.
In this lab, we are creating Three Lambda functions.
Let’s make first one.
Move to Lambda menu on console. https://console.aws.amazon.com/lambda
Click “Create function” button and create first function.
Select “Author from scratch”, and create empty function.
Put game-sqs-process as Name.
Select Runtime as Python 2.7.
In Permissions tab, choose “Use an existing role” and select “Gomok-game-sqs-process”. Execute “Create function”.
When it is completed, select SQS(Simple Queue Service) as trigger of this function on Designer Group. Than you can create “Configure triggers” group below.
Basic settings: 128MB Memory and 1 min timeout
Code: Copy contents of GameResultProcessing.py and Paste code to Lambda function. Change proper region_name for your lab. (ex: ap-northeast-2)
Please check Lambda functions Handler. Lambda function can access this handler when it is executed.
In this lab, we provide Python Package for comfort. For source codes GetRank.py and Scoring.py, please refer Lambda / LambdaDeploy in given Binary Folder. Or you can also import redis module by yourselves. You can find where to download the binary in here.
Second Lambda function will be created by uploading Python package. Unlike First function only uses Python standard SDK for its logic, some Lambda functions use External Library like Redis. So, we are using Deploy package for making lambda functions.
It will be a good opportunity to make lambda functions with package.
You can see two Python files GetRank.py and Scoring.py under Lambda/LambdaDeploy.
Compress All files on the folder as name “LambdaDeploy.zip” (Notice: LambdaDeploy should not be included on the zipped file. GetRank.py and Scoring.py should be located root path of the compressed file)
We can make Lambda function using this Deploy Package.
Click “Create Function” and select “Author from scratch” to create function.
Set Name as game-rank-update, and Runtime as Python 2.7, Role as Gomok-game-rank-update. Click Create function button.
Select Upload a .ZIP file in Function code Group, and upload LambdaDeploy.zip.
Put Scoring.handler as Handler, and ElastiCache Endpoint(we made before) for Environment Variables like below.
You can manage endpoint safely and efficiently using this Environment Variables without hard-coding.
Set function Timeout 1 minute.
Set VPC same as ElastiCache in function configuration. Select all Subnets and Security Group that we made before (GomokuDefault).
Last but not least, let’s make 3rd Lambda function. It can be made same way.
Create Lambda function with “Author from scratch”.
Put function name game-rank-reader, Python 2.7 as Runtime, set Gomok-game-rank-reader as Role.
Click Create function, select “Upload a .ZIP file” on Actions Menu. Upload LambdaDeploy.zip for this function.
Put GetRank.handler in Function Code Handler. Make Environment variable as same as before.
Set Timeout 1 minute in Basic settings. Configure VPC as same as VPC that ElastiCache is located. Select all subnets and Security Group that we made previously.
Save and Complete Lambda function.
Now we can check Three Lambda functions are made. (If you tried CloudFormation, that there would be Five)
Lambda functions are prepared! Nextly, we are considering how to run these functions. First two functions are triggered by SQS and DynamoDB, but we have not designated trigger for last function.
We are using API Gateway for this function. Let’s make API Gateway!
If you finished this page, you are able to test how components that we made work.
When SQS takes data, Lambda functions will be triggered. And the function updates data to DynamoDB.
Data updated to DynamoDB, triggers another Lambda function by DynamoDB Stream. And this function updates Redis Cache for Ranking Leaderboard.
We can test this process simply.
{ "PlayerName" : "SomeName" , "WinDiff" : 1, "LoseDiff" : 0, "ScoreDiff" : 100 }


ClearMyRecord
A criminal record makes it difficult to get jobs, housing, and education. ClearMyRecord makes it easier to reclassify low-level offenses, giving people a second chance.
Who we're helping
- Hundreds of thousands of Bay Area residents are eligible for Prop 47 reclassification and other dismissal remedies to clear up old convictions on their criminal records.
- Legal Aid providers and county public defenders are the first points of contact when people need help accessing and changing their criminal records and they are significantly under-resourced.
Our goals
- Redesign criminal background check process, in partnership with California Department of Justice and state Judicial Council, making it possible for hundreds of thousands of people to know if they qualify for Prop 47 reclassification and other dismissal remedies.
- Build pre-screening and intake tools that enable legal service providers to double the number of clients they can see in a day.
The Problem
When people are trying to access these basic services, they don’t have weeks to waste trying to navigate an incomprehensible system. Prop 47 provides the legal framework for qualifying individuals to reduce previous low level, non-violent charges from a felony to a misdemeanor. However, the process of actually changing your record is extremely difficult. Here is why:
- It is hard to know if you qualify for Prop 47 and many people may be better served by other existing record clearing mechanisms.
- In order to know what you qualify for, you need access to your criminal record (known as a RAP sheet), which typically requires a person to get fingerprinted at approved locations. This process costs $50, and it can take up to two months to receive the fingerprint card. RAP sheets also commonly contain inaccuracies or are missing key information. All of these challenges — limited access, readability, and accuracy — cause delays and bottlenecks in the record clearing process. Separately, they also cause qualified people with criminal histories to needlessly miss out on job opportunities.
- Once you’ve obtained your record, it’s really hard to understand your RAP sheet without a lawyer's help.
- If you have overcome all of these obstacles, which most people don’t, you have to request and pay for another RAP sheet to verify that your change was processed.
- The processes vary from county to county.
Code for America’s research has shown that when someone is trying to change their criminal record it is often because they have been denied a job or access to public housing. They need to be able to clear their record quickly, as the law intends. Addressing these process improvements can make a lasting impact in peoples' lives.
Our approach
For the past three months, Code for America has conducted extensive user research, working with legal aid offices, public defenders, district attorneys, county court officials, and citizens trying to change their records. Through this research, we mapped out the entire process and have identified the points within the system where technology interventions can improve the process.
We believe that we can have the greatest impact on this issue by focusing on two key challenges:
- Improving the state’s criminal background check process, in partnership with the California Department of Justice and the California Judicial Council. Our goal for this partnership is to reduce the amount of time it takes for someone to access their state RAP sheet, as well as to improve the quality of the RAP sheet, so it is both easier to understand and contains accurate information.
- Making it easier for legal aid providers to efficiently process more applications. We are partnering with the San Francisco Public Defender’s office and anticipate launching partnerships in two additional Bay Area counties in 2016 to build a pre-screening tool that will help clients understand if they are eligible for Prop 47, another expungement mechanism, or neither. Doing this screening in advance means that legal aid offices are only seeing qualified clients and that applicants don’t have to unnecessarily spend their time waiting for an appointment if they ultimately won’t qualify.


| PostgreSQL 9.0.10 Documentation | ||||
|---|---|---|---|---|
| Prev | Up | Appendix F. Additional Supplied Modules | Next |
The pgrowlocks module provides a function to show row locking information for a specified table.
pgrowlocks(text) returns setof record
The parameter is the name of a table. The result is a set of records, with one row for each locked row within the table. The output columns are shown in Table F-19.
Table F-19. pgrowlocks
output columns
| Name | Type | Description |
|---|---|---|
| locked_row | tid | Tuple ID (TID) of locked row |
| lock_type | text | Shared for shared lock, or Exclusive for exclusive lock |
| locker | xid | Transaction ID of locker, or multixact ID if multi-transaction |
| multi | boolean | True if locker is a multi-transaction |
| xids | xid[] | Transaction IDs of lockers (more than one if multi-transaction) |
| pids | integer[] | Process IDs of locking backends (more than one if multi-transaction) |
pgrowlocks
takes AccessShareLock for the
target table and reads each row one by one to collect the row locking
information. This is not very speedy for a large table. Note that:
If the table as a whole is exclusive-locked by someone else,
pgrowlocks
will be blocked.
pgrowlocks
is not guaranteed to produce a
self-consistent snapshot. It is possible that a new row lock is taken,
or an old lock is freed, during its execution.
pgrowlocks
does not show the contents of locked
rows. If you want to take a look at the row contents at the same time, you
could do something like this:
SELECT * FROM accounts AS a, pgrowlocks('accounts') AS p WHERE p.locked_row = a.ctid;
Be aware however that (as of PostgreSQL 8.3) such a query will be very inefficient.
test=# SELECT * FROM pgrowlocks('t1'); locked_row | lock_type | locker | multi | xids | pids ------------+-----------+--------+-------+-----------+--------------- (0,1) | Shared | 19 | t | {804,805} | {29066,29068} (0,2) | Shared | 19 | t | {804,805} | {29066,29068} (0,3) | Exclusive | 804 | f | {804} | {29066} (0,4) | Exclusive | 804 | f | {804} | {29066} (4 rows)
Tatsuo Ishii


| Interface | Description |
|---|---|
| BindDynamicValueMethod |
Phantom type for an @OnBindDynamicValue method model.
|
| ClassNames |
Constants used in
SpecModel s. |
| DelegateMethod |
Phantom type for a delegate method model.
|
| DependencyInjectionHelper |
An interface for generating certain methods that are required in order for Dependency Injection
to work.
|
| DependencyInjectionHelperFactory |
A factory that chooses whether or not to create a
DependencyInjectionHelper based on the
TypeElement of the class it is generated for. |
| EventMethod |
Phantom type for an event method model.
|
| HasEnclosedSpecModel |
A SpecModel that wraps another SpecModel.
|
| HasPureRender |
An interface for
SpecModel s that can be pure render. |
| MethodParamModel |
Model that is an abstract representation of a method param.
|
| SpecGenerator<T extends SpecModel> | |
| SpecModel |
A model that represents a ComponentSpec.
|
| UpdateStateMethod |
Phantom type for an update state method model.
|
| Class | Description |
|---|---|
| BuilderMethodModel |
Model that is an abstract representation of implicit methods on Component builders.
|
| CachedValueParamModel |
Model that is an abstract representation of a method param that is a cached value.
|
| CachedValueValidation |
Class for validating that the state models within a
SpecModel are well-formed. |
| DefaultLayoutSpecGenerator | |
| DefaultMountSpecGenerator | |
| DelegateMethodDescription |
Describes the signature and other feature of a delegate method.
|
| DelegateMethodDescription.Builder | |
| DelegateMethodDescriptions |
Descriptions of delegate methods.
|
| DelegateMethodValidation |
Class for validating that the
SpecMethodModel s for a SpecModel are well-formed. |
| DiffPropModel |
Model that is an abstract representation of a
Prop that
has type Diff. |
| DiffStateParamModel |
Model that is an abstract representation of a
State that
has type Diff. |
| DiffValidation |
Class for validating that Diff parameter usages within a
SpecModel are well-formed. |
| ErrorEventHandlerGenerator | |
| EventDeclarationModel |
Model that is an abstract representation of a
Event . |
| EventValidation |
Class for validating that the event declarations and event methods within a
SpecModel are
well-formed. |
| FieldModel |
Container for
FieldSpec and field represented object. |
| FieldsValidation |
Validates
SpecModel fields are static and final. |
| InjectPropModel |
Model that is an abstract representation of a
InjectProp . |
| InterStageInputParamModel |
Model that is an abstract representation of a method param that is an inter-stage input.
|
| LayoutSpecModel |
Model that is an abstract representation of a
com.facebook.litho.annotations.LayoutSpec . |
| LifecycleMethodArgumentType |
Describes the type required by the lifecycle method being overridden.
|
| MethodParamModelFactory |
Factory for creating
MethodParamModel s. |
| MethodParamModelUtils |
Useful methods for
MethodParamModel s. |
| MountSpecModel |
Model that is an abstract representation of a
MountSpec . |
| PrepareInterStageInputParamModel |
Model that is an abstract representation of a method param that is an layout phase inter-stage
input.
|
| PropDefaultModel |
Model that is a simple base representation of a
PropDefault . |
| PropJavadocModel |
Model that is an abstract representation of the javadoc for a prop.
|
| PropModel |
Model that is an abstract representation of a
Prop . |
| PropValidation |
Class for validating that the state models within a
SpecModel are well-formed. |
| PropValidation.CommonPropModel | |
| PureRenderValidation | |
| RenderDataDiffModel |
Model that is an abstract representation of a Diff parameter to a lifecycle method.
|
| SimpleMethodParamModel |
Model that is a simple base representation of a method param.
|
| SimpleNameDelegateValidation |
Class for validating that the simple name delegate contract is upheld.
|
| SpecMethodModel<Phantom,A> |
Model that is an abstract representation of a method.
|
| SpecMethodModel.Builder<Phantom,A> | |
| SpecMethodModelUtils |
Utility methods for
SpecMethodModel s. |
| SpecMethodModelValidation |
Class for validating that the
SpecMethodModel s for a SpecModel are well-formed. |
| SpecModelImpl |
Simple implementation of
SpecModel . |
| SpecModelImpl.Builder | |
| SpecModelUtils |
Utility methods for
SpecModel s. |
| SpecModelValidation |
Class for validating that a
SpecModel is well-formed. |
| SpecModelValidationError | |
| StateParamModel |
Model that is an abstract representation of a
State . |
| StateValidation |
Class for validating that the state models within a
SpecModel are well-formed. |
| TagModel |
Model that is an abstract representation of empty interfaces tagging component specs.
|
| TagValidation | |
| TreePropModel |
Model that is an abstract representation of a
TreeProp . |
| TriggerValidation |
Class for validating that the event declarations and event methods within a
SpecModel are
well-formed. |
| WorkingRangeDeclarationModel | |
| WorkingRangeMethodModel |
| Enum | Description |
|---|---|
| DelegateMethodDescription.InterStagePropsTarget | |
| DelegateMethodDescription.OptionalParameterType |
Defines possible param types that can be used in delegate methods.
|
| PropDefaultModel.AccessorType |
There are two ways to access a PropDefault: either via a field or a method.
|
| SpecElementType |


Portfolio
Horiseon Home Page
The Horiseon Home Page was refactored to:
- meet accessibility standards
- incorporate HTML semantics
- simplify the CSS stylesheet
- improve page performance
Zombie vs Robot
Try your hand at catching zombies and gaining lives in my game Zombie vs Robot. This game was created using Scratch, a project based at the MIT Media Lab. Create stories, games, animations and more!
Project on the way!
This is a placeholder for a future project. Check back soon!
Project on the way!
This is a placeholder for a future project. Check back soon!


Here are the answers to some of the questions we get asked most often about our products, website and service. Still can’t find the answer you’re looking for? Contact one of our customer care advisers who will be more than happy to help.
How can I see what I have purchased in the past? We’ve made checking on your previous orders easy. Simply log in to your account to view your previous purchases.
I live outside the UK can I still order from the site? We Deliver to the US, UK, Europe, China, Asia, The Middle East, Africa, Australia, New Zealand and other destinations. For more detailed information on destinations we deliver to and delivery costs please visit our delivery & handling page. Please note that delivery charges may vary depending on where your parcel is travelling to, we cannot deliver to Russian PO boxes. We may need to calculate your shipping at a special rate after you submit and order. Special rates may increase or lower your shipping cost. If a special shipping rate needs to be applied to your parcel, no order will be processed until you have agreed to the special order rate.
Delivery charge varies depending on the value and destination of your parcel. Please see here.
We include VAT on all items on our website however this may removed at the Order Summary page depending on your delivery country. Your taxes will be shown on the Order Summary page during checkout. When you complete your order, the final tax charged will be present on your order confirmation.
How long it will take for your order to arrive depends on the destination it has to travel to. Please see here.
Unfortunately, we cannot specify an exact time, however within the UK our items will usually be delivered between 8am and 6pm.
Your privacy is of the utmost importance to us. Please be assured that we never pass your details on to a third party. We use industry standard encryption on our website where all communication between you and our site is secure. We take every step possible to keep your financial information private and safe. If you have further questions about the security of your details, please do not hesitate to contact one of our Customer Care advisors.
Changed your mind? Not a problem, but please contact us as soon as you realise that you need to change the details of your order. Please note that if your order has already been processed, it may be too late to cancel or change the delivery. If this is the case please be rest assured that we will be happy for you to return it once it has been received.
Each time you order through our website, you will receive two emails from us:
We’ve made checking on your previous orders easy. Simply log in to your account to view your previous purchases.
I’m having problems registering or logging into my account, can you help me? Sorry to hear that you’re experiencing trouble accessing your account. If you can’t access your account email here. We will try our best to help so that you can update your details as you wish. Alternatively, you can also use this telephone service to place orders.
Not to worry, we all forget things from time to time. Simply click here and follow the steps to re-access your account.
Updating your details is simple. You can manage your details by logging in to your account here. If you have any problems doing so please contact our Customer Care team.
We love sharing our latest news and keeping you inspired with fresh ideas. To stay up to date, sign up to our email newsletters, and don’t forget you can follow us on Facebook, Twitter, Pinterest and Instagram.


Supporting real-time updates in your mobile app
Introduction to real-time updates
After developing some queries and mutations, you might want to implement real-time updates.
These are supported in the GraphQL specification by an operation type called Subscription
.
To support subscriptions in a production environment, Data Sync implements subscriptions using an MQTT PubSub subscription mechanism, however you might want to use the Apollo PubSub module to develop proof-of-concept applications.
When coding for real-time updates, you use the following modules:
-
@aerogear/voyager-server - supports clients that use voyager-client to enable GraphQL queries and mutations
-
@aerogear/voyager-subscriptions - supports clients that use voyager-client to enable GraphQL subscriptions
-
@aerogear/graphql-mqtt-subscriptions - supports GraphQL resolvers connections to a MQTT broker
GraphQL Subscriptions enable clients to subscribe to server events over a websocket connection.
The flow can be summarized as follows:
-
Client connects to the server using websockets, and subscribes to certain events.
-
As events occur, the server notifies the clients that are subscribed to those events.
-
Any currently connected client that is subscribed to a given event receives it.
-
The client can close the connection at any time and no longer receives updates.
To receive updates, the client must be currently connected to the server. The client does not receive events from subscriptions while offline. To support inactive clients, use Push Notifications.
-
For more information about GraphQL subscriptions, see the Subscriptions documentation.
Implementing real-time updates on a Data Sync server
The follow code shows typical code for a Data Sync Server without subscriptions:
const apolloServer = VoyagerServer({
typeDefs,
resolvers
})
const app = express()
apolloServer.applyMiddleware({ app })
app.listen({ port }, () =>
console.log(`🚀 Server ready at http://localhost:${port}${apolloServer.graphqlPath}`)
)
The following sections outline the steps required to enable real-time updates:
-
Implement a SubscriptionServer
-
Implement a Publish Subscribe Mechanism
-
Define subscriptions in the schema
-
Implement resolvers
Implementing a SubscriptionServer using voyager-subscription
To allow you create GraphQL subscription types in your schema:
-
Install the
@aerogear/voyager-subscriptions
package:$ npm i @aerogear/voyager-subscriptions
-
Configure SubscriptionServer using
@aerogear/voyager-subscriptions
const { createSubscriptionServer } = require('@aerogear/voyager-subscriptions') const apolloServer = VoyagerServer({ typeDefs, resolvers }) const app = express() apolloServer.applyMiddleware({ app }) const port = 4000 const server = app.listen({ port }, () => { console.log(`🚀 Server ready at http://localhost:${port}${apolloServer.graphqlPath}`) createSubscriptionServer({ schema: apolloServer.schema }, { server, path: '/graphql' }) })
The
createSubscriptionServer
code:-
returns a
SubscriptionServer
instance -
installs handlers for
-
managing websocket connections
-
delivering subscriptions on the server
-
-
provides integrations with other modules such as
@aerogear/voyager-keycloak
.
-
For more information about arguments and options, see the subscriptions-transport-ws module.
Implementing a Publish Subscribe Mechanism
| This procedure describes an in-memory implementation which is useful for prototyping but not suitable for production. AeroGear recommends using MQTT PubSub in production. See Configuring a Publish Subscribe mechanism for more information about all the implementation methods. |
To provide a channel to push updates to the client using the default PubSub
provided by apollo-server
, you implement a Publish Subscribe mechanism, for example:
const { PubSub } = require('apollo-server')
const pubsub = new PubSub()
Subscriptions depend on a publish subscribe mechanism to generate the events that notify a subscription. There are several PubSub implementations available based on the PubSubEngine
interface.
Defining subscriptions in the schema
Subscriptions are a root level type.
They are defined in the schema similar to Query
and Mutation
.
For example, in the following schema, a Task
type is defined and so are mutations and subscriptions.
type Subscription { taskCreated: Task } type Mutation { createTask(title: String!, description: String!): Task } type Task { id: ID! title: String! description: String! }
Implementing resolvers
Inside the resolver map, subscription resolvers return an AsyncIterator,
which listens for events.
To generate an event, call the publish
method.
The pubsub.publish
code is typically located inside a mutation resolver.
In the following example, when a new task is created, the createTask
resolver publishes the result of this mutation to the TaskCreated
channel.
const TASK_CREATED = 'TaskCreated'
const resolvers = {
Subscription: {
taskCreated: {
subscribe: () => pubSub.asyncIterator(TASK_CREATED)
}
},
Mutation: {
createTask: async (obj, args, context, info) => {
const task = tasks.create(args)
pubSub.publish(TASK_CREATED, { taskCreated: task })
return task
}
},
}
| This subscription server does not implement authentication or authorization. For information about implementing authenication and authorization, see Supporting authentication and authorization in your mobile app. |
For information on how to use subscriptions in your client code, see Realtime Updates.
Configuring a Publish Subscribe mechanism
You can use the Apollo PubSub mechanism for development, but you must use the MQTT PubSub mechanism for production.
Using the Apollo PubSub mechanism
The Implementing real-time updates on a Data Sync server section describes how to set up the default PubSub
provided by apollo-server
. For a production system, you require MQTT PubSub.
Using the MQTT PubSub mechanism
The @aerogear/graphql-mqtt-subscriptions
module provides an AsyncIterator
interface used for implementing subscription resolvers
It connects the Data Sync server to an MQTT broker to support horizontally scalable subscriptions.
Initialize an MQTT client and pass that client to the @aerogeaar/graphql-mqtt-subscriptions
module, for example:
const mqtt = require('mqtt')
const { MQTTPubSub } = require('@aerogear/graphql-mqtt-subscriptions')
const client = mqtt.connect('mqtt://test.mosquitto.org', {
reconnectPeriod: 1000,
})
const pubsub = new MQTTPubSub({
client
})
In the example, an mqtt
client is created using mqtt.connect
and then this client is passed into an MQTTPubSub
instance.
The pubsub
instance can then be used to publish and subscribe to events in the server.
Configuring AMQ Online for MQTT Messaging
Red Hat AMQ supports the MQTT protocol which makes it a suitable PubSub technology for powering GraphQL subscriptions at scale.
This section provides recommendations for
-
Configuring AMQ Online for MQTT messaging.
-
Connecting to AMQ Online and using it as a pubsub within server applications.
-
AMQ Online is a mechanism that allows developers to consume the features of Red Hat AMQ within OpenShift.
-
Red Hat AMQ provides fast, lightweight, and secure messaging for Internet-scale applications. AMQ Broker supports multiple protocols and fast message persistence.
-
MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol.
-
OpenShift Cluster
-
AMQ Online is installed in the OpenShift cluster
AMQ Online includes many configuration options that could address the specific needs of your application. The minimum configuration steps for using AMQ Online for MQTT messaging and enabling GraphQL subscriptions are:
-
Create an
AddressSpace
-
Create an
Address
-
Create a
MessagingUser
Creating an address space
A user can request messaging resources by creating an AddressSpace
. There are two types of address space, standard
and brokered
.
You must use the brokered
address space for MQTT based applications.
-
Create an address space, for example, the following resource creates a brokered
AddressSpace
:apiVersion: enmasse.io/v1beta1 kind: AddressSpace metadata: name: myaddressspace spec: type: brokered plan: brokered-single-broker
-
Create the
AddressSpace
.oc create -f brokered-address-space.yaml
-
Check the status of the address space:
oc get <`AddressSpace` name> -o yaml
The output displays information about the address space, including details required for connecting applications.
See Creating address spaces using the command line for more information.
Creating an Address
An adress is part of an AddressSpace
and represents a destination for sending and receiving messages.
Use an Address
with type topic
to represent an MQTT topic.
-
Create an address definition:
apiVersion: enmasse.io/v1beta1 kind: Address metadata: name: myaddressspace.myaddress # must have the format <`AddressSpace` name>.<address name> spec: address: myaddress type: topic plan: brokered-topic
-
Create the address:
oc create -f topic-address.yaml
See the Configuring your server for real-time updates guide for more information about using pubsub.asyncIterator() .
Create an Address for each topic name passed into pubsub.asyncIterator() .
|
See Creating addresses using the command line for more information.
Creating an AMQ Online user
A messaging client connects using an AMQ Online user, also known as a`MessagingUser`.
A MessagingUser
specifies an authorization policy that controls which addresses can be used and the operations that can be performed on those addresses.
Users are configured as MessagingUser
resources.
Users can be created, deleted, read, updated, and listed.
-
Create a user definition:
apiVersion: user.enmasse.io/v1beta1 kind: MessagingUser metadata: name: myaddressspace.mymessaginguser # must be in the format <`AddressSpace` name>.<username> spec: username: mymessaginguser authentication: type: password password: cGFzc3dvcmQ= # must be Base64 encoded. Password is 'password' authorization: - addresses: ["*"] operations: ["send", "recv"]
-
Create the
MessagingUser
.oc create -f my-messaging-user.yaml
An application can now connect to an AMQ Online address using this user’s credentials.
For more information see the AMQ Online User Model.
Using GraphQL MQTT PubSub with AMQ Online
-
OpenShift cluster
-
AMQ Online is installed in the OpenShift cluster
The following AMQ Online resources are available for MQTT Applications
-
AddressSpace
-
Address
-
MessagingUser
This section describes how to use @aerogear/graphql-mqtt-subscriptions
to connect to an AMQ Online Address
.
-
Retrieve the connection details for the
AddressSpace
you want to use:oc get addressspace <addressspace> -o yaml
-
Determine which method you want to use to connect to the address:
-
Using the service hostname - Allows clients to connect from within the OpenShift cluster.
AeroGear recommends that applications running inside OpenShift connect using the service hostname. The service hostname is only accessible within the OpenShift cluster. This ensures messages routed between your application and AMQ Online stay within the OpenShift cluster and never go onto the public internet.
-
Using the external hostname - Allows clients to connect from outside the OpenShift cluster.
The external hostname allows connections from outside the OpenShift cluster. This is useful for the following cases:
-
Production applications running outside of OpenShift connecting and publishing messages.
-
Quick Prototyping and local development. Create a non-production
AddressSpace
, allowing developers to connect applications from their local environments.
-
-
-
To connect to an AMQ Online
Address
using the service hostname-
Retrieve the service hostname:
oc get addressspace <addressspace name> -o jsonpath='{.status.endpointStatuses[?(@.name=="messaging")].serviceHost
-
Add code to create the connection, for example:
const mqtt = require('mqtt') const { MQTTPubSub } = require('@aerogear/graphql-mqtt-subscriptions') const client = mqtt.connect({ host: '<internal host name>', username: '<MessagingUser name>', password: '<MessagingUser password>', port: 5762, }) const pubsub = new MQTTPubSub({ client })
-
To encrypt all messages between your application and the AMQ Online broker, enable TLS, for example:
const mqtt = require('mqtt') const { MQTTPubSub } = require('@aerogear/graphql-mqtt-subscriptions') const host = '<internal host name>' const client = mqtt.connect({ host: host, servername: host, username: '<MessagingUser name>', password: '<MessagingUser password>', port: 5761, protocol: 'tls', rejectUnauthorized: false, }) const pubsub = new MQTTPubSub({ client })
-
-
To connect to an AMQ Online
Address
using the external hostname:The external hostname typically accept only accept TLS connections. -
Retrieve the external hostname:
oc get addressspace <addressspace name> -o jsonpath='{.status.endpointStatuses[?(@.name=="messaging")].externalHost
-
Connect to the external hostname, for example:
const mqtt = require('mqtt') const { MQTTPubSub } = require('@aerogear/graphql-mqtt-subscriptions') const host = '<internal host name>' const client = mqtt.connect({ host: host, servername: host, username: '<MessagingUser name>', password: '<MessagingUser password>', port: 443, protocol: 'tls', rejectUnauthorized: false, }) const pubsub = new MQTTPubSub({ client })
-
-
If you use TLS, note the following additional
mqtt.connect
options:-
servername
- when connecting to a message broker in OpenShift using TLS, this property must be set otherwise the connection will fail, because the messages are being routed through a proxy resulting in the client being presented with multiple certificates. By setting theservername
, the client will use Server Name Indication (SNI) to request the correct certificate as part of the TLS connection setup. -
protocol
- must be set to'tls'
-
rejectUnauthorizated
- must be set to false, otherwise the connection will fail. This tells the client to ignore certificate errors. Again, this is needed because the client is presented with multiple certificates and one of the certificates is for a different hostname than the one being requested, which normally results in an error. -
port
- must be set to 5761 for service hostname or 443 for external hostname.
-
Using environment variables for configuration
AeroGear recommends that you use environment variables for connection, for example:
const mqtt = require('mqtt')
const { MQTTPubSub } = require('@aerogear/graphql-mqtt-subscriptions')
const host = process.env.MQTT_HOST || 'localhost'
const client = mqtt.connect({
host: host,
servername: host,
username: process.env.MQTT_USERNAME,
password: process.env.MQTT_PASSWORD,
port: process.env.MQTT_PORT || 1883,
protocol: process.env.MQTT_PROTOCOL || 'mqtt',
rejectUnauthorized: false,
})
const pubsub = new MQTTPubSub({ client })
In this example, the connection options can be configured using environment variables, but sensible defaults for the host
, port
and protocol
are provided for local development.
Troubleshooting MQTT Connection Issues
Troubleshooting MQTT Events
The mqtt
module emits various events during runtime.
It recommended to add listeners for these events for regular operation and for troubleshooting.
client.on('connect', () => {
console.log('client has connected')
})
client.on('reconnect', () => {
console.log('client has reconnected')
})
client.on('offline', () => {
console.log('Client has gone offline')
})
client.on('error', (error) => {
console.log(`an error has occurred ${error}`)
})
Read the mqtt documentation
to learn about all of the events and what causes them.
Troubleshooting MQTT Configuration Issues
If your application is experiencing connection errors, the most important thing to check is the configuration being passed into mqtt.connect
. Because your application may run locally or in OpenShift, it may connect using internal or external hostnames, and it may or may not use TLS, it’s very easy to accidentally provide the wrong configuration.
The Node.js mqtt
module does not report any errors if parameters such as hostname
or port
are incorrect. Instead, it will silently fail and allow your application to start without messaging capabilities.
It may be necessary to handle this scenario in your application. The following workaround can be used.
const TIMEOUT = 10 // number of seconds to wait before checking if the client is connected
setTimeout(() => {
if (!client.connected) {
console.log(`client not connected after ${TIMEOUT} seconds`)
// process.exit(1) if you wish
}
}, TIMEOUT * 1000)
This code can be used to detect if the MQTT client hasn’t connected. This can be helpful for detecting potential configuration issues and allows your application to respond to that scenario.
Implementing real-time updates on on the client
A core concept of the GraphQL specification is an operation type called Subscription
, they provide a mechanism for real time updates.
For more information on GraphQL subscriptions see the Subscriptions documentation.
To do this GraphQL Subscriptions utilise websockets to enable clients to subscribe to published changes.
The architecture of websockets is as follows:
-
Client connects to websocket server.
-
Upon certain events, the server can publish the results of these events to the websocket.
-
Any currently connected client to that websocket receives these results.
-
The client can close the connection at any time and no longer receives updates.
Websockets are a perfect solution for delivering messages to currently active clients. To receive updates the client must be currently connected to the websocket server, updates made over this websocket while the client is offline are not consumed by the client. For this use case Push Notifications are recommended.
Voyager Client comes with subscription support out of the box including auto-reconnection upon device restart or network reconnect. To enable subscriptions on your client set the following paramater in the Voyager Client config object. A DataSyncConfig interface is also available from Voyager Client if you wish to use it.
Setting up a client to use subscriptions
To set up a client to use subscriptions:
-
Provide a
wsUrl
string in the config object as follows:const config = { wsUrl: "ws://<your_websocket_url>" }
where
<your_websocket_url>
is the full URL of the websocket endpoint of your GraphQL server. -
Use the object from step 1 to initialise Voyager Client:
const { createClient } = require("@aerogear/voyager-client"); const client = createClient(config)
Using Subscriptions
A standard flow to utilise subscriptions is as follows:
-
Make a network query to get data from the server
-
Watch the cache for changes to queries
-
Subscribe to changes pushed from the server
-
Unsubscibe when leaving the view where there is an active subscription
In the three examples below, subscribeToMore
ensures that any further updates received from the server force the updateQuery function to be called with subscriptionData
from the server.
Using subscribeToMore
ensures the cache is easily updated as all GraphQL queries are automatically notified.
For more information, see the subscribeToMore documentation.
getTasks() {
const tasks = client.watchQuery({
query: GET_TASKS
});
tasks.subscribeToMore({
document: TASK_ADDED_SUBSCRIPTION,
updateQuery: (prev, { subscriptionData }) => {
// Update logic here.
}
});
return tasks;
}
To allow Voyager Client to automatically generate the updateQuery
function for you, please see the Cache Update Helpers section.
You can then use this query in our application to subscribe to changes so that the front end is always updated when new data is returned from the server.
this.tasks = [];
this.getTasks().subscribe(result => {
this.tasks = result.data && result.data.allTasks;
})
Note that it is also a good idea to unsubscribe from a query upon leaving a page. This prevents possible memory leaks. This can be done by calling unsubscribe() as shown in the following example. This code should be placed in the appropriate place.
this.getTasks().unsubscribe();
Handling network state changes
When using subscriptions to provide your client with realtime updates it is important to monitor network state because the client will be out of sync if the server if updated when the the client is offline.
To avoid this, Voyager Client provides a NetworkStatus
interface which can be used along with the NetworkInfo
interface to implement custom checks of network status.
For more information about how to import and configure a custom network status checker, see Advanced Topics.
Use the following example to re-run a query after a client returns to an online state:
const { CordovaNetworkStatus, NetworkInfo } = require("@aerogear/voyager-client");
const networkStatus = new CordovaNetworkStatus();
networkStatus.onStatusChangeListener({
onStatusChange(networkInfo: NetworkInfo) {
const online = networkInfo.online;
if (online) {
client.watchQuery({
query: GET_TASKS
});
}
}
});


Visualization 2:
1. Who is the intended audience?
The intended audiences are general America public who want to find out project information associated with their departments such as how many projects launched in certain year by some departments and whether those departments spend more or fewer than planned. This visualization is appropriate for those audiences since it is convenient to visualize intended information and easy to understand.
2. What does the visualization show?
This visualization is designed to show the statistic project information according to their department: project amounts in different start year, end year and executed by different department. Differences between plan and real cost are also visualized. This visualization is suits the dataset because the relation between departments and projects is clear and detailed. Besides, the dataset also lists real cost and planned cost clearly. By grouping those projects by their departments, statistic information could be easily extracted by audiences: how many projects carried out by certain departments, among those projects how many of them starts in 2011, what is the planned cost and real cost for the department in that year. By this design audiences could not only get clear and detailed information on the department’s behave, but also further information behind data can be discovered, such as identifying amount extremum and cost tendency.
To be specific, the row chart displays departments and project amount executed by them. It gives an obvious comparison among departments. The two bar charts listed the amount of projects which starts and ends in the year range. Bar charts are associated with selected departments in the row chart. The stacked area chart displays number of planned and real cost within certain departments according to the year range. Audiences could find various features with these charts.
3. How is visualization interactive?
It is simple and easy to interact with the row chart. By clicking, some departments can be chosen, at the same time, other charts would displayed related contents.
In these two bar charts, on one hand, audiences could select year range to show how many projects start in certain year range and simultaneously the other bar chart would display the end year of these projects. On the other hand, audiences could also select year range in the end year bar chart, then the start year bar chart would display content similarly. Additionally, more detailed visualization could be made by selecting year range in both bar charts.
The stacked flow chart can be interacted by selecting year range, once the year range selected, other diagrams would react according to the range.


Monthly Calendar
Weekly Calendar
Add New Event
REMINDERS
2
Sep
12
Study For Exam
Sep
12
Study For Exam
Sep
12
Study For Exam
Sep
12
no new event reminders
SUGGESTED/INVITED
2
Sep
12
Study For Exam
Add this event to Calendar
Sep
12
Study For Exam
Busy at this time
no new event invitations
Monthly Calendar
Weekly Calendar
Add New Event


|
Name
|
|---|
| {{client.$lastNameFirstName}} |
{{latestCompositionMeasurement.created.timestamp | amCalendar}}
Latest Measurement
{{latestWeightMeasurement.weight}} lbs
Latest Weight
{{latestComposition.percentFat | number:2}}%
Latest Fat Percentage
{{latestComposition.rating}}
Latest Rating
{{averageWeight | number:2}} lbs
Average Weight
{{averageFatPercentage | number:2}}%
Average Fat Percentage
| Date | Weight | Fat Percentage | Rating |
|---|---|---|---|
| {{measurement.created.timestamp | amDateFormat:'MM-D-YY, h:mm a'}} | {{measurement.$weight.weight}} | {{measurement.$composition.percentFat | number:2}}% | {{measurement.$composition.rating}} |


Running the simple basic authentication sample application
Make sure you've imported the simple-basic-authentication and jetty-start projects in Eclipse.
Run the be.devijver.acegi.authentication.basic.JettyStart class as a Java Application as shown in figure 1:
Figure 1: Running the JettyStart class as a Java Application in Eclipse
This class will start the Jetty server on localhost port 8890. The console will print the start sequence of the sample application as shown in figure 2:
Figure 2: the console screen shows the startup sequence of the sample application
Go to http://localhost:8890/webapp in your browser as shown in figure 3:
Figure 3: loading the sample application in the browser
As figure 3 shows the Acegi configuration in this sample application causes the browser to ask for a username and password. Enter steven/password as username and password. After doing this you'll get to the main page of the sample application as shown in figure 4:
Figure 4: the main page of the sample application
Next click the Logout link on the main page of the sample application as shown in figure 5:
Figure 5: clicking the Logout link
Clicking the Logout link will cause the main page to re-appear without asking for re-authorization. This happens because the browser will sends your authentication details on each request.
The next section looks at the configuration of this sample application.
Copyright © 2007, Steven Devijver
This help file has been generated by the freeware version of HelpNDoc


3. Hartree-Fock¶
The SCF procedure is the workhorse of most computational chemistry software packages, as it is generally the first step before doing more advanced calculations (such as MP2, etc).
3.1. Plain Solver¶
Starting from the basics, we’ll run a simple calculation for a water molecule with a bond-length of 1.1 Å and a bond angle of 104.0o with an STO-3G basis set.
- Restricted Hartree-Fock
from moha import * mol,orbs = IOSystem.from_file('h2o.xyz','sto-3g.nwchem') ham = Hamiltonian.build(mol,orbs) hfwavefunction = SCFSolver.hf(ham,occ = {'alpha':5,'beta':5})
- Unrestricted Hartree-Fock
from moha import * mol,orbs = IOSystem.from_file('h2o.xyz','sto-3g.nwchem') ham = Hamiltonian.build(mol,orbs) hfwavefunction = SCFSolver.hf(ham,occ = {'alpha':4,'beta':5})
3.2. DIIS Solver¶
ToDo


About The Owner
This site was created by Ayyoub Alkeyyam :
A hardworking and ambitious civil engineer with a great passion for the software development industry. Currently, He is nearing completion of studying software development at LTUC college. In addition to his bachelor's degree in civil engineering from Yarmouk University with over two years of experience as a site engineer.
Education:
- Advanced Software Development | LTUC-(ASAC)| September 2021
- Civil Engineering | Yarmouk University | Feb 2018
Top 10 cities for the owner :
- Mecca
- Medina
- Alquds
- İstanbul
- Dubai
- Madrid
- London
- Salalah
- Doha
- Toronto


-
social media
writing
productivity
creative writing
supercomputing
bioinformatics
biology
saving the world
chemistry
keyboard
osx
xkb
protips
sql
ruby
reporting
rails
text editors
shell
python
ideas
health
science
education
economics
sociology
privacy
surveillance
philosophy
anime
business
marketing
lean
agile
kanban
neuro
machine learning
psychology
language
anecdotes
jamskating
creativity
fitness
food
yoga
hackathons
medicine
bullying
gangstalking
gaslighting
torture
warcrimes
math
category theory
sci fi
computer science
algorithms
startups
graffiti
art
meditation
religion
intelligence
epistemology
ai
linux
security
cinematography
virtual reality
anthropology
linguistics
physics
astronomy
graphics
swift
functional programming
haskell
leadership
networking
dreams
singularity
postmodernism
metamodernism
literature
politics
censorship
communism
atheism
oneirontology
semiotics
operational strategy
military
information warfare
civil disobedience
environment
futurism
civil disobidence
social physics
chaos
jung
iching


Search an artist to find their highest chart number on the Billboard 200. This page contains all the Billboard 200 charts from {{ time }} to August 17, 1963. If they've charted, it's here.
| Artist | Highest Chart Number (All Time) |
|---|---|
| ARTIST NOT FOUND MATCHING: | {{ tested }} |
| {{ i[0] }} | {{ i[1][0] }} |
| {{ i[0] }} | {{ i[1][0] }} |
| NO EXACT MATCHES FOUND FOR: | {{ tested }} |
| {{ i[0] }} | {{ i[1][0] }} |
| {{ i[0] }} | {{ i[1][0] }} |


GeoMesa Spark: Spatial Join and Aggregation¶
This tutorial will show you how to:
- Use GeoMesa with Apache Spark in Scala.
- Create and use DataFrames with our geospatial User Defined Functions.
- Calculate aggregate statistics based on a threshold distance.
- Create a new simple feature type to represent this aggregation.
- Write the result back to a data store.
Background¶
NYCTaxi is taxi activity data published by the University of Illinois from Freedom of Information Law requests to NYC Taxi and Limo Commission.
GeoNames is a geographical database containing over 10 million geographical names and over 9 million unique features.
Suppose we wanted to answer the questions: “Do taxi pickups centralize near certain points of interest?”, “Are people more likely to request a pickup or be dropped off at points of interest?”. To find out, we would need to combine these two data sets and aggregate statistics over the result.
Since GeoNames is a data set of points, and NYCTaxi provides only the pickup and drop-off points of a trip, it is highly unlikely that the trip would start or end exactly on the labeled point of interest. So we can’t naively join the data sets based on where the points are equal. Instead, we will need to join where the points are within some tolerable distance of each other. This is henceforth referred to as a D-within join.
Prerequisites¶
For this tutorial, we will assume that your have already ingested the two data sets into the data store of your choosing. Following this tutorial without having created the necessary tables will lead to errors.
The converters for the GeoNames data set, GeoNames, and the NYCTaxi data set, NYC Taxi, are provided with GeoMesa. For further guidance, you can follow one of the ingest tutorials Map-Reduce Ingest of GDELT. Once you have the data ingested in GeoMesa, you may proceed with the rest of the tutorial.
Initializing Spark¶
To start working with Spark, we will need a Spark Session initialized, and to apply GeoMesa’s geospatial User Defined Types (UDTs) and User Defined Functions (UDFs) to our data in Spark, we will need to initialize our SparkSQL extensions. This functionality requires having the appropriate GeoMesa Spark runtime jar on the classpath when running your Spark job. GeoMesa provides spark runtime jars for Accumulo, HBase, and FileSystem data stores. For example, the following would start an interactive Spark REPL with all dependencies needed for running Spark with GeoMesa version 2.0.0 on an Accumulo data store.
$ bin/spark-shell --jars geomesa-accumulo-spark-runtime_2.11-2.0.0.jar
To configure the Spark Session such that we can serialize Simple Features and work with geometric UDTs and UDFs, we must alter the Spark Session as follows.
import org.apache.spark.sql.SparkSession
import org.locationtech.geomesa.spark.GeoMesaSparkKryoRegistrator
import org.locationtech.geomesa.spark.jts._
val spark: SparkSession = SparkSession.builder()
.appName("testSpark")
.config("spark.serializer", "org.apache.spark.serializer.KryoSerializer")
.config("spark.kryo.registrator", classOf[GeoMesaSparkKryoRegistrator].getName)
.master("local[*]")
.getOrCreate()
.withJTS
Note the withJTS
, which registers GeoMesa’s UDTs and UDFs, and the two config
options which tell Spark to
use GeoMesa’s custom Kryo serializer and registrator to handle serialization of Simple Features. These configuration options can
also be set in the conf/spark-defaults.conf
configuration file.
Creating DataFrames¶
With our Spark Session created and configured, we can move on to loading our data from the data store into a Spark DataFrame.
First we’ll set up the parameters for connecting to the data store. For example, if our data is in two Accumulo catalogs, we would set up the following parameter maps:
val taxiParams = Map(
"accumulo.instance.id" -> "instance",
"accumulo.zookeepers" -> "zoo1:2181,zoo2:2181,zoo3:2181",
"accumulo.user" -> "user",
"accumulo.password" -> "password",
"accumulo.catalog" -> "nyctaxi")
val geonamesParams = Map(
"accumulo.instance.id" -> "instance",
"accumulo.zookeepers" -> "zoo1:2181,zoo2:2181,zoo3:2181",
"accumulo.user" -> "user",
"accumulo.password" -> "password",
"accumulo.catalog" -> "geonames")
Note
The above parameters assume Accumulo as the backing data store, but the rest of the tutorial is independent of which data store is used. Other supported data stores may be used by simply adapting the above parameters appropriately.
Then we can make use of Spark’s DataFrameReader
and our SpatialRDDProvider
to create a DataFrame
val taxiDF = spark.read.format("geomesa")
.options(taxiParams)
.option("geomesa.feature", "nyctaxi-single")
.load()
val geonamesDF = spark.read.format("geomesa")
.options(geonamesParams)
.option("geomesa.feature", "geonames")
.load()
Since we know our taxi data is limited to the state of New York, we can filter our geonames data.
import spark.implicits._
import org.apache.spark.sql.functions._
val geonamesNY = geonamesDF.where($"admin1Code" === lit("NY"))
D-within Join¶
Now we’re ready to join the two data sets. This is where we will make use of two of our geospatial UDFs.
st_contains
takes two geometries as input, and it outputs whether the second geometry lies within the first one.
st_bufferPoint
takes a point and a distance in meters as input, and it outputs a circle around the point with radius
equal to the provided distance.
For more documentation and a full list of the UDFs provided by GeoMesa see SparkSQL Functions.
Using these two UDFs, we can build the following join query.
val joinedDF = geonamesNY
.select(st_bufferPoint($"geom", lit(50)).as("buffer"), $"name", $"geonameId")
.join(taxiDF, st_contains($"buffer", $"pickup_point"))
The above query transforms the geometry of each GeoName point into a circle with a radius of 50 meters, and joins the result with the taxi records that had pickups anywhere in that circle.
Aggregating¶
Now we have a DataFrame where each point of interest in New York is combined with a taxi record where a pickup
was issued from approximately that location. To turn this into meaningful statistics about taxi habits in the region, we
can do a GROUP BY
operation and use some of SparkSQL’s aggregate functions.
val aggregateDF = joinedDF.groupBy($"geonameId")
.agg(first("name").as("name"),
countDistinct($"trip_id")).as(s"numPickups"),
first("buffer").as("buffer"))
The above query groups the data based on point of interest, and counts the number of distinct pickups. The result can be used to generate a heatmap of points of interest based on density of pickups, but to quickly see which points of interest are most departed from via taxi, we can sort the results and look at the top ten.
val top10 = aggregateDF.orderBy($"numPickups".desc).take(10)
top10.foreach { row => println(row.getAs[String]("name") + row.getAs[Int]("numPickups")) }
This tells us that Hotel Gansevoort has the most taxi pickups.
Write-back¶
If we would like to persist this aggregated result beyond the spark session, we will need to write it back to the underlying data store. This is done is two steps.
First we create a SimpleFeatureType that is aligned with the aggregated result:
import org.locationtech.geomesa.utils.geotools.SchemaBuilder
val aggregateSft = SchemaBuilder.builder()
.addString("name")
.addInt("numPickups")
.addPolygon("buffer")
.build("aggregate")
Following this, we can create the schema in the data store, then safely write the data.
import org.geotools.data.DataStoreFinder
DataStoreFinder.getDataStore(taxiParams).createSchema(aggregateSft)
aggregateDF.write.format("geomesa").options(taxiParams).option("geomesa.feature", "aggregate").save()
If you followed all of the above steps, the end result is a data set with the density of taxi pickups at all the points of interest in New York, optionally written back to the data store. If one was further interested in comparing this result against the distribution of taxi drop-offs, the above code could easily be adapted to use the drop-off points instead.
Further steps to visualize this result can be taken by following the example in GeoMesa Spark: Broadcast Join and Aggregation. This will lead to something like the following:


Welcome {{ user }}
Add New Post
View/Edit Posts
View My Blog
Blog Settings
Browse Blogs
Account Settings
Logout


{%- include head.html -%}
{%- include header.html -%}
{{ content }}
{%- include mobile_menu.html -%} {%- include footer.html -%} {%- include scripts.html -%}


API reference¶
This page lists the generated API reference to the library.
XGeoDatasetAccessor¶
-
class
xgeo.raster.
XGeoDatasetAccessor
(xarray_obj)¶ XGeoDatasetAccessor adds the geospatial functionalities to the xarray Dataset. The accessor makes use of the versatility of xarray together with the geospatial operations provided by rasterio together with many custom operations that are used in general day to day task in the geospatial world.
-
add_mask
(vector_file, geometry_name='geometry', value_name=None, mask_name='mask')¶ Rasterizes the vector_file and add the mask as coordinate with name mask_name to the Dataset
- Parameters
vector_file (str or geopandas.Dataframe) – Vector file which need to be rasterized and added as mask
geometry_name (str) – Name of geometry column in vector file if it doesn’t default to “geometry”
value_name (str) – Name of the value column, its value will be used to fill the raster. If None, all values in geometry is filled with 1
mask_name (str) – Name of the mask index
-
band_coords
¶ Gets the band coordinates of the Dataset.
- Returns
bandcoords – Band coordinates of the Dataset
- Return type
xarray.DataArray
-
band_dim
¶ Gets name of band dimension
- Returns
band_dim – Name of the band dimension
- Return type
str
-
band_size
¶ Gets the size of band dimension
- Returns
bands – Size of band dimension
- Return type
int
-
bounds
¶ Gets the bounds of the data.
- Returns
bounds – Bounds of the data (left, bottom, right, top)
- Return type
tuple
-
origin
¶ Gets the origin of the Dataset in human readable format.
- Returns
origin – Origin of the Dataset.
- Return type
str
-
projection
¶ Gets the projection/CRS system of the Dataset
- Returns
projection – Projection/CRS in proj4 string
- Return type
str
-
reproject
(data_var=None, target_crs=None, resolution=None, resampling=None, target_height=None, target_width=None, source_nodata=None, target_nodata=None, memory_limit=0, threads=None)¶ Reprojects and resamples the Dataset.
- Parameters
data_var (str) – The raster DataArray to be reprojected. Defaults to all
target_crs (int or string or dict) – Target projection/CRS system the DataSet should be reprojected to
resolution (int or float (Optional)) – Target resolution
resampling (rasterio.warp.Resampling or string) – Resampling method to be used. Default is ‘nearest’
target_height (int (Optional)) – Target height
target_width (int (Optional)) – Target width
source_nodata (int or float (Optional)) – Source NoData value
target_nodata (int or float (Optional)) – Target NoData value
memory_limit (int (Optional)) – Maximum memory the process should use. Defaults to 64MB
threads (int (Optional)) – Number of threads the process should use. Defaults to number of CPU.
- Returns
dsout – Dataset with the reprojected rasters.
- Return type
xarray.Dataset
Examples
>>> import xgeo # In order to use the xgeo accessor >>> import xarray as xr >>> ds = xr.open_rasterio('test.tif') >>> ds = ds.to_dataset(name='data') >>> ds_reprojected = ds.geo.reproject(target_crs=4326)
-
resolutions
¶ Gets the resolutions of the DataArrays in Dataset. If the resolutions don’t exist, it calculates the resolutions from the current coordinates.
- Returns
resolutions – x and y resolutions of the DataArrays.
- Return type
(float, float)
-
sample
(vector_file, geometry_name='geometry', value_name='id')¶ Samples the pixel for the given regions. Each sample pixel have all the data values for each timestamp and each band.
- Parameters
vector_file (str) – Name of the vector file to be used for the sampling. The vector file can be any one supported by geopandas.
geometry_name (str) – Name of the geometry in the vector file, if it doesn’t default to ‘geometry’”
value_name (str) – Name of the value of each region. This value will be associated with each pixels.
- Returns
samples – Samples of pixels contained and touched by each regions in pandas.Dataframe.
- Return type
pandas.Dataframe
Examples
>>> import xgeo # In order to use the xgeo accessor >>> import xarray as xr >>> ds = xr.open_rasterio('test.tif') >>> ds = ds.to_dataset(name='data') >>> df_sample = ds.geo.sample(vector_file='test.shp', value_name="class")
-
slice_dataset
(indices=None, bounds=None)¶ Subsets Dataset either with indices or bounds. :param indices: Indices (row_x_min, col_y_min, row_x_max, col_y_max) :type indices: tuple/list :param bounds: Bounds (x_min, y_min, x_max, y_max) :type bounds: tuple/list
- Returns
ds – Dataset with data in given bounds or indices
- Return type
xarray.Dataset
-
stats
()¶ Calculates general statistics mean, standard deviation, max, min of for each band.
- Returns
statistics – DataFrame with statistics
- Return type
pandas.Dataframe
-
subset
(vector_file, geometry_name='geometry', crop=False, extent_only=False, invert=False)¶ Subset the Dataset with the vector file. :param vector_file: Path to the vector file. Any vector file supported by GDAL are supported. :type vector_file: str or geopandas.GeoDataFrame :param geometry_name: Column name that describes the geometries in the vector file. Default value is “geometry” :type geometry_name: str :param crop: If True, the output Dataset bounds is approximately equal to the total bounds of the geometry. The
default value is False
- Parameters
extent_only (bool) – If True, the output Dataset consists all the data that are within the total bounds of the geometry. Default value is True. If extent_only is True, the crop is by default True.
invert (bool) – If True, the output GeoDataset contains values that are only outside of the geometries. Default value is False. This doesn’t have effect if extent_only is True
- Returns
ds_subset – Subset dataset
- Return type
xarray.Dataset
-
time_coords
¶ Gets the time coordinates of the Dataset
- Returns
timecoords – Time coordinates of the Dataset
- Return type
xarray.DataArray
-
time_dim
¶ Gets name of time dimension
- Returns
time_dim – Name of the time dimension
- Return type
str
-
time_size
¶ Gets the size of time dimension
- Returns
times – Size of time dimension
- Return type
int
-
to_geotiff
(output_path='.', file_prefix='data', overviews=False, bigtiff=True, compress='lzw', tiled=True, num_threads='ALL_CPUS')¶ Creates one or multiple Geotiffs for the Dataset. If the Dataset has muliple raster arrays or raster arrays for multiple timestamps, separate geotiffs are created in following path:
output_path/<file_prifix>_<variable_nane>_<timestamp>.tif
- Parameters
output_path (str) – Output directory for the files.
file_prefix (str) – Prefix for the filename
overviews (bool) – Creates image overviews if True.
bigtiff (bool) – Creates BigTiff if True
compress (str) – Compression algorithm to apply, default ‘lzw’
tiled (bool) – The tif is tiled if True
num_threads (int or str) – The number of threads the process should use. Default is ‘ALL_CPUS’
-
transform
¶ Gets the geo-transform of the Dataset. If the transform isn’t present, it calculate the transform from the current coordinates of Dataset. :returns: transform – Geo-transform (x resolution, 0, x origin, 0, y resolution, y origin) :rtype: tuple
-
validate_and_restructure
()¶ - Validates and restructures the dataset to make full utilization of GeoDataset.
Validates if x and y dimensions exists
- Validates if band and time dimension exists. If they don’t exist, it adds those dimensions to the raster
DataArrays
- Returns
dsout – A copy of original dataset restructured to have all raster DataArray in 4 dimensional format. It allows the library to be consistent over its operations.
- Return type
xarray.Dataset
-
x_coords
¶ Gets the X coordinates. :returns: xcoords – X coordinates of the Dataset :rtype: xarray.DataArray
-
x_dim
¶ Gets name of X dimension :returns: x_dim – Name of the X dimension :rtype: str
-
x_size
¶ Gets the size of X dimension :returns: xsize – Size of X dimension :rtype: int
-
y_coords
¶ Gets the Y coordinates of the Dataset.
- Returns
ycoords – Y Coordinates of the Dataset
- Return type
xarray.DataArray
-
y_dim
¶ Gets name of Y dimension :returns: y_dim – Name of the y dimension :rtype: str
-
y_size
¶ Gets the size of Y dimension :returns: ysize – Size of Y dimension :rtype: int
-
zonal_stats
(vector_file, geometry_name='geometry', value_name='id')¶ Calculates statistics for regions in the vector file.
- Parameters
vector_file (str or geopandas.GeoDataFrame) – Vector file with regions/zones for which statistics needs to be calculated
geometry_name (str) – Name of the geometry column in vector file. Default is “geometry”
value_name (str) – Name of the value column for each of which the statistics need to be calculated. Default is “id”
- Returns
zonal_statistics – DataFrame with Statistics
- Return type
pandas.Dataframe
-


+++ title = "Mexico City" lat = 19.417382 lon = -99.132385 +++
This rich and exotic city was the first stop on my year-long adventure. Mexico City is really, really big. From my aeroplane window, it stretched out below me, sprawling to the horizon in every direction. It's also a really friendly place, with locals that are always happy to give directions (which is great if you can understand what they're saying!), or to just drop what they're doing and to join you for a beer.


FROM THE DESK OF DR. MOHAMMED MUSTAFA DIRECTOR, PROJECT IMPLEMENTATION FEDERAL MINISTRY OF HEALTH AND SOCIAL SERVICES, DAKAR-SENEGAL. STRICTLY CONFIDENTIAL. DEAR FRIEND, TRANSFER OF US$25.5 MILLION INTO A PERSONAL/COMPANY'S OFFSHORE ACCOUNT Based on the information gathered from the Ministry of Trade and Industry,we intend to solicit your assistance on this transaction with you on the assumption that you will not disappoint us. We have Twenty Five Million, Five Hundred Thousand United States Dollars (US$25,500,000.00) which we made over time from over inflated contracts in my Ministry (Federal Ministry of Health and Social Services). We are seeking your assistance and permission to remit this amount into your account or any other nominated account you can provide for us. Your commission will be 20% of the total sum, 10% for expenses and the remaining 70% is for my colleagues and myself. Could you please notify me of your acceptance to carry out this transaction urgently by e-mail only on the receipt of this message. Kindly, acknowledge the receipt of this letter by sending to me by email a copy of this letter with your private Tel. And Fax number. I shall in turn inform you of the modalities for a formal application to secure the necessary approvals for the immediate release of this fund into your account. Thanks for your co-operation. Yours faithfully, Dr. Mohamed Mustafa,


Game 1: Orlando Magic at Washington Wizards
My Pick:
Washington Wizards
Why I'm Rolling with them:
The Washington Wizards have looked slightly better as of late, going 2-2 in their last four including a win over a decent Heat team. Beal is by far their best player, and John Wall seems to have taken a step backwards. Dwight Howard against Vucevic should be interesting, as well as seeing how these two teams stack up bench wise. I'm giving the edge to the Wizards because at some point, this team will have to start to right the ship, and this Magic team is a good chance to do that. Wizards take it 113-109.
Game 2: Philadelphia 76ers at Miami Heat
My Pick:
Philadelphia 76ers
Why I'm Rolling with them:
Although Butler is still not playing tonight, this 76ers team is still capable of beating this Miami Heat team. I'll be interested to see the Philadelphia starting lineup tonight without Covington, as well as if Reddick is back in the starting lineup. If he is, count on him to have a great game, as Josh Richardson will be doing to much on the offensive end to be able to go all out defensively. Sixers take this one, 119-110.
Game 3: New Orleans Pelicans at Toronto Raptors
My Pick:
Toronto Raptors
Why I'm Rolling with them:
I think the Raptors are just the better team, and have the depth as well as talent to beat this Pelicans team pretty easily. Davis will still be a tough matchup for the Raptors, but the rest of this Pelicans team is outmatched. Siakam on Mirotic should be an interesting matchup, as the shooting of Mirotic will be matched with the speed and physicality of Siakam. Raptors win 120-112.
Game 4: Brooklyn Nets at Minnesota Timberwolves
My Pick:
Brooklyn Nets
Why I'm Rolling with them:
Wiggins is questionable for tonight's game, so a lot of my decision here hinges on that. I'm fairly confident that Covington isn't playing tonight, which means this Timberwolves roster is very depleted. Count on Derrick Rose to step up again alongside KAT to put big points on the board, but without so many key pieces of this roster I'm not sure how Minnesota can pull this one off. Brookly wins it 105-101.
Game 5: Utah Jazz at Memphis Grizzlies
My Pick:
Utah Jazz
Why I'm Rolling with them:
These teams have played twice so far this year, and both times Memphis has won. However, Donovan Mitchell is back and this Utah team looks to have figured out some of the early season woes that had been affecting them. I am excited to see how these two teams compete. Gasol and Conley will put up good numbers, but the interior presence of Gobert may make this harder for them. The Jazz take a close game, 100-97.
Game 6: Phoenix Suns at Oklahoma City Thunder
My Pick:
Oklahoma City Thunder
Why I'm Rolling with them:
The Oklahoma City Thunder struggled against the Mavericks two days ago, losing by 15 to a mediocre Dallas squad. The Thunder need more than 22 points from their bench unit in 80 minutes of play. Luckily, this weak Suns team should allow the OKC offense to get back on track, even with Westbrook out for tonight. The Thunder should have no problems dispatching the Suns, 110-103.
Game 7: Dallas Mavericks at Chicago Bulls
My Pick:
Dallas Mavericks
Why I'm Rolling with them:
Luka Donic is a star already, and now holds the record for most points scored through the first 12 games of someone's career. He looks very comfortable in this Dallas offense, and now that he's getting more touches he looks even better than before. Dallas should be able to beat Chicago easily, provided that Matthews can play a solid level of defense on LaVine. Dallas takes this one, 106-100.
Game 8: San Antonio Spurs at Sacramento Kings
My Pick:
San Antonio Spurs
Why I'm Rolling with them:
Both the Kings and the Spurs have exceeded expectations so far this season, with both DeRozan and Fox blossoming in their new roles. This Spurs team has looked good lately, beating the Rockets and holding them to just 89 points. This bodes well for their ability to handle the offensively gifted but defensively lacking Kings team. Spurs win, 115-111.
Game 9: Golden State Warriors at Los Angeles Clippers
My Pick:
Golden State Warriors
Why I'm Rolling with them:
Although Steph Curry is still out, Kevin Durant and Klay Thompson will be enough to deal with this Clippers team. Although the Clippers bench might be the best in the league, the Golden State trio should still be able to handle them pretty easily. Golden State's weakest position is probably center, which is good because that's probably the weakest Clipper postition too. Golden State, 118-110.


Latest from our blogs
-
The net finally closes in on Jean Morgan
Monkey,16 Jul 2010, 11.59am -
Radio catchup: Johnny Marr, John Wyndham's Chocky and a troll
Celine Bijleveld,16 Jul 2010, 11.31am
-
Smartphones revived the radio star
15 Jul 2010, 5.49pm -
Apple buys Canadian mapping firm Poly9
Jemima Kiss,15 Jul 2010, 4.06pm
More news & features
Most viewed in Media
24 hours
7 days
- 1. How sloths took the internet by storm (slowly)
- 2.
- 3. Katherine Jenkins to star in Doctor Who Christmas special
- 4. Doctor Who showrunner Steven Moffat defies the critics
- 5. TV ratings - 11 July: World Cup final: BBC scores in TV ratings battle
- Click here for more top stories


{% load static %}
EM Simulator - {{ProgramSession}}
Toggle navigation
{{ProgramSession}}
Dashboard
Portfolio
Blog
SignUp
Register
Timeline
Forms
Typography
Bootstrap Elements
Bootstrap Grid
Messages
2
2 New Messages
Security alert
Security alert
Go to Inbox
2
Steve Miller
Profile
Settings
Log Out
Inputs
{% csrf_token %}
Ke
Number of cells.
T0
Initial time.
Spread
Pulse spread.
nsteps
Number of steps.
Calculate!
Ex for one dimensional FDTD simulation of a pulse in free space after T0 time steps.
Hy for one dimensional FDTD simulation of a pulse in free space after T0 time steps.


Perdue defends, celebrates USDA agency moves to Missouri
KANSAS CITY, Mo. (AP) - U.S. Agriculture Secretary Sonny Perdue says he has “absolutely zero regrets” over the decision to move two research agencies’ headquarters from Washington, D.C., to Kansas City.
Perdue joined government leaders from Kansas and Missouri Friday to tour the new headquarters for the Economic Research Service and National Institute of Food and Agriculture. Critics say the move will harm agriculture research and make the findings less accessible to federal policymakers.
Perdue contends moving the agencies to the heart of agriculture country will allow researchers to work more closely with farmers, land grant universities and private agriculture-related companies.
TOP STORIES
Evangelist Franklin Graham calls impeachment hearing 'a day of shame for America'
White House rejects accusation of witness intimidation
Nancy Pelosi goes for slam dunk -- and crashes to court
But Laura Dodson, an agricultural economist and union representative at the Economic Research Service, said the agencies’ researchers focus on national questions, and living near agricultural land is irrelevant to the work they do.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


MolPaintJS is a project of the Leibniz Institute of Plant Biochemistry (https://www.ipb-halle.de) in Halle (Saale), Germany. The project is hosted on GitHub, you may obtain your own copy of MolPaintJS there. Main author of the program is Frank Broda (fbroda@ipb-halle.de); valuable input from Frank Lange and Steffen Neumann is acknowledged.
MolPaintJS is licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2007-2016, Alexandru Mărășteanu<EMAIL_ADDRESS>All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of this software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.