XCore generates number of events during task execution from synchronization operations and task switches.
Task switch events are generated when task switch occurs or interrupt occurs. Task is assigned an enum value of the TaskNumber type. The name, given to the task, is also assigned to the correspondent task number. Two special value: EnterInt and LeaveInt, are used to designate entry of the interrupt context and exit of the interrupt context. Task switch generates an event of the TaskSwitchEvent type.
struct TaskSwitchEvent // meta-named as TaskSwitch
{
EventTimeType time;
EventIdType id;
uint16 task;
};
task is the number of the task, which become active. The correspondent marker is Up for EnterInt, Down for LeaveInt and Push for tasks.
Mutex is assigned an enum value of the MutexNumber type. The name, given to the mutex, is also assigned to the correspondent mutex number. Mutex generates events of the MutexEvent type.
struct MutexEvent // meta-named as MutexEvent
{
EventTimeType time;
EventIdType id;
uint16 task;
uint16 mutex;
uint8 type;
enum Type : uint8
{
Lock,
Unlock,
IncLock,
DecLock,
Block
};
};
task is a task number.
mutex is a mutex number.
type is an event type. There are five event types.
Lock is generated when the task locks the mutex. The correspondent maker is Up.
Unlock is generated when the task unlocks the mutex. The correspondent maker is Down.
IncLock is generated when the task increments the lock count of the mutex, which is already locked by the task. The correspondent maker is Inc.
DecLock is generated when the task decrements the lock count of the mutex, which is remaining locked by the task. The correspondent maker is Dec.
Block is generated when the task becomes blocked by the mutex, which is already locked by another task. The correspondent maker is UpBlock.
Semaphore is assigned an enum value of the SemNumber type. The name, given to the semaphore, is also assigned to the correspondent semaphore number. Semaphore generates events of the SemEvent type and the SemEvent_task type.
struct SemEvent // meta-named as SemEvent
{
EventTimeType time;
EventIdType id;
uint16 sem;
uint8 type;
enum Type : uint8
{
ToTaskList,
Give,
GiveMany
};
};
sem is a semaphore number.
type is an event type. There are three event types.
ToTaskList is generated when the give_many() operation releases a group of tasks. The correspondent marker is UpUpPush.
Give is generated when a task or an interrupt gives the semaphore. The correspondent marker is Up.
GiveMany is generated when a task or an interrupt gives the semaphore many times. The correspondent marker is UpUp.
struct SemEvent_task // meta-named as SemEventTask
{
EventTimeType time;
EventIdType id;
uint16 task;
uint16 sem;
uint8 type;
enum Type : uint8
{
ToTask,
Take,
Block
};
};
task is a task number.
sem is a semaphore number.
type is an event type. There are three event types.
ToTask is generated when the semaphore, which is given by another task or an interrupt, releases the task. The correspondent marker is UpPush.
Take is generated when the task takes the semaphore. The correspondent marker is Down.
Block is generated when the task becomes blocked by the semaphore. The correspondent marker is DownBlock.
Event is assigned an enum value of the EventNumber type. The name, given to the event, is also assigned to the correspondent event number. Event generates events of the EventEvent type and the EventEvent_task type.
struct EventEvent // meta-named as EventEvent
{
EventTimeType time;
EventIdType id;
uint16 event;
uint8 type;
enum Type : uint8
{
Trigger
};
};
event is an event number.
type is an event type. There is only one event type.
Trigger is generated when a task or an interrupt triggers the event. The correspondent marker is Up.
struct EventEvent_task // meta-named as EventEventTask
{
EventTimeType time;
EventIdType id;
uint16 task;
uint16 event;
uint8 type;
enum Type : uint8
{
ToTask,
Consume,
Block
};
};
task is a task number.
event is an event number.
type is an event type. There are three event types.
ToTask is generated when the event, which is triggered by another task or an interrupt, releases the task. The correspondent marker is UpPush.
Consume is generated when the task consumes the event. The correspondent marker is Down.
Block is generated when the task becomes blocked by the event. The correspondent marker is DownBlock.
Multi-semaphore is assigned an enum value of the MultiSemNumber type. The name, given to the multi-semaphore, is also assigned to the correspondent multi-semaphore number. Multi-semaphore generates events of the MultiSemEvent type and the MultiSemEvent_task type.
struct MultiSemEvent // meta-named as MultiSemEvent
{
EventTimeType time;
EventIdType id;
uint16 msem;
uint8 type;
uint8 index;
enum Type : uint8
{
Give
};
};
msem is a multi-semaphore number.
type is an event type. There is only one event type.
index is the input index.
Give is generated when a task or an interrupt gives the multi-semaphore. The correspondent marker is Up.
struct MultiSemEvent_task // meta-named as MultiSemEventTask
{
EventTimeType time;
EventIdType id;
uint16 task;
uint16 msem;
uint8 type;
uint8 index;
enum Type : uint8
{
ToTask,
Block,
Take
};
};
task is a task number.
msem is a multi-semaphore number.
type is an event type. There are three event types.
index is the input index.
ToTask is generated when the multi-semaphore, which is given by another task or an interrupt, releases the task. The correspondent marker is UpPush.
Take is generated when the task takes the multi-semaphore. The correspondent marker is Down.
Block is generated when the task becomes blocked by the multi-semaphore. The correspondent marker is DownBlock.
Multi-event is assigned an enum value of the MultiEventNumber type. The name, given to the multi-event, is also assigned to the correspondent multi-event number. Multi-event generates events of the MultiEventEvent type and the MultiEventEvent_task type.
struct MultiEventEvent // meta-named as MultiEventEvent
{
EventTimeType time;
EventIdType id;
uint16 mevent;
uint8 type;
uint8 index;
enum Type : uint8
{
Trigger
};
};
mevent is a multi-event number.
type is an event type. There is only one event type.
index is the input index.
Trigger is generated when a task or an interrupt triggers the multi-event. The correspondent marker is Up.
struct MultiEventEvent_task // meta-named as MultiEventEventTask
{
EventTimeType time;
EventIdType id;
uint16 task;
uint16 mevent;
uint8 type;
uint8 index;
enum Type : uint8
{
ToTask,
Consume,
Block
};
};
task is a task number.
mevent is a multi-event number.
type is an event type. There are three event types.
index is the input index.
ToTask is generated when the multi-event, which is triggered by another task or an interrupt, releases the task. The correspondent marker is UpPush.
Consume is generated when the task consumes the multi-event. The correspondent marker is Down.
Block is generated when the task becomes blocked by the multi-event. The correspondent marker is DownBlock.
Anti-semaphore is assigned an enum value of the AntiSemNumber type. The name, given to the anti-semaphore, is also assigned to the correspondent anti-semaphore number. Anti-semaphore generates events of the AntiSemEvent type and the AntiSemEvent_task type.
struct AntiSemEvent // meta-named as AntiSemEvent
{
EventTimeType time;
EventIdType id;
uint16 asem;
uint8 type;
enum Type : uint8
{
Add,
Sub,
Release
};
};
asem is an anti-semaphore number.
type is an event type. There are three event types.
Add is generated when the anti-semaphore is added. The correspondent marker is Down.
Sub is generated when the anti-semaphore is subtracted, but still remaining blocking. The correspondent marker is Up.
Release is generated when the anti-semaphore becomes non-blocking. All blocked tasks, if any, are released. The correspondent marker is UpPush.
struct AntiSemEvent_task // meta-named as AntiSemEventTask
{
EventTimeType time;
EventIdType id;
uint16 task;
uint16 asem;
uint8 type;
enum Type : uint8
{
Wait,
Pass
};
};
task is a task number.
asem is an anti-semaphore number.
type is an event type. There are two event types.
Wait is generated when the task becomes blocked by the anti-semaphore. The correspondent marker is Wait.
Pass is generated when the task passes the non-blocking anti-semaphore. The correspondent marker is Pass.
Res-semaphore is assigned an enum value of the ResSemNumber type. The name, given to the res-semaphore, is also assigned to the correspondent res-semaphore number. Res-semaphore generates events of the ResSemEvent type and the ResSemEvent_task type.
struct ResSemEvent // meta-named as ResSemEvent
{
EventTimeType time;
EventIdType id;
uint16 rsem;
uint8 type;
enum Type : uint8
{
Give
};
};
rsem is a res-semaphore number.
type is an event type. There is only one event type.
Give is generated when the res-semaphore is given. The correspondent marker is Up.
struct ResSemEvent_task // meta-named as ResSemEventTask
{
EventTimeType time;
EventIdType id;
uint16 task;
uint16 rsem;
uint8 type;
enum Type : uint8
{
ToTask,
Wait,
Pass,
Block,
Take
};
};
task is a task number.
rsem is a res-semaphore number.
type is an event type. There are five event types.
ToTask is generated when the res-semaphore, which is given by another task or an interrupt, releases the task. The correspondent marker is UpPush.
Wait is generated when the task becomes blocked by the res-semaphore during the wait() operation. The correspondent marker is Wait.
Pass is generated when the task passes the non-blocking res-semaphore. The correspondent marker is Pass.
Block is generated when the task becomes blocked by the res-semaphore. The correspondent marker is DownBlock.
Take is generated when the task takes the res-semaphore during the take() operation. The correspondent marker is Down.


Please enter (and confirm) your new password.
{% else %}Password reset failed
The password reset link was invalid, possibly because it has already been used. Please request a new password reset.
{% endif %}{% extends "base_generic.html" %} {% block content %}
Please enter (and confirm) your new password.
{% else %}The password reset link was invalid, possibly because it has already been used. Please request a new password reset.
{% endif %}


Consulting is one of the most awe-inspiring fields out there. Entry-level salaries are famously high, and the hours infamously long. The big firms; Bain, McKinsey, BCG are well known, and the job is widely considered to be challenging and prestigious.
Most people understand that consultants solve problems and help clients with whatever business goals they have and to do that these guys travel, go to meetings, make documents and file summaries. Despite all that, all but few people seem to have a basic understanding of what exactly it is that consultants do during the entire engagement with a particular client.
This brings us back to the age old question, often used to mock consultants, ‘What the heck does a management consultant do?’. ‘How do fresh college graduates solve problem that experienced C-level businessmen can’t?’
The generic answer would be 'They Solve Business Problems', but that statement although not incorrect, is over simplified. Let's explain this by walking you through the entire process.
Engagement Assignment
This is where the work starts. You are assigned to work with a particular client on a specific business problem. Staffing patterns vary widely across different companies and even across different offices of the same company. Generally, as a new consultant, you get staffed to work on different industries for the first few years of your career.
 Most of the well established consulting firms have large databases of documents specifically designed to help you with this task.
Gathering basic data and insights
After familiarising yourself to the industry, you look at the current market trends, industry specific developments, gather basic data about how the major industry players are performing, what problems they are facing etc. Basic industry dynamics like supplier and buyer dynamics also need a little reading up on.
Discussing objectives with your engagement manager
An engagement manager is often the immediate reporting senior in most of the consulting firms’ organisational hierarchy. You schedule a meeting with them to align your views and goals with theirs for an particular engagement. This is generally the first time you come face-to-face with the nuances of the problem faced by your client.
In-depth study of the problem
After the meeting with the engagement manager, you have the work cut out for you. Armed with the industry insights that you have gathered, you start analysing the problem and breaking it into small manageable chunks. You scan the firm’s extensive internal knowledge database and study reports by independent parties to prepare yourself for the client meeting ahead.
Meeting the client on the client site
Most people know that consultants travel a lot and reason behind it is that many times most of the work is done on the client site itself. Getting to know the client side team and key contact points is also one of many important tasks that are accomplished at this stage.
Getting a running hypothesis
By this time you have a pretty good idea about what the problem at hand is. You often use your logical reasoning and business acumen to make a list of results that you can expect at the end of the engagement.
Networking with the people
Consultants are often the mouthpieces of a remarkably extensive and efficient workforce at the disposal of any prominent consulting firm. At this stage, you search for projects that were done by other consultants in the past which tackled similar problems. You also start giving directives to the in-house market research team to provide you with useful data.
Creating a ghost deck
'Ghost' decks are used to align on what the end product will look like and to minimise wasted work. They go by different names in different firms; ghost, shell and skeleton being the most popular euphemisms.
Interviewing key personnel
With the consultant being the face of a large group of supporting staff, it hardly comes as a surprise that routine work also involves interacting with key people related to the problem. Your deck also helps in identifying areas that might need more work. Thus keeping your workflow efficient and effort consistent.
Iterations of the the deck
By this time in the engagement, all the data starts to pour in, models start churning out results and your final deliverable starts taking its final form. Through the multiple iterations, the deck slowly starts to reflect all the work that you have done.
Final presentation and hand over process
This stage marks the end of your work at the client side. You present your findings to the top management brass of the company that hired you and advise them on the most effective ways of solving the problem at hand. After this, all the related documents are handed over to the concerned authorities and the process of implementing the suggestions gets underway.
Summarising your work
At this stage you make documents summarising your work and adding more unique information to the firm's internal database and file it appropriately for future use. All such documents are generic in nature and will prove to be a good starting point to another consultant going through a similar engagement in the future. With this step you complete your work on the current engagement and are ready for a new engagement in yet another unknown industry.
So, as you can see, consultants are in essence metaphorical filters that connect complicated client problems with the back end team of knowledgeable experts, specialist teams and documentation; making our world even more efficient one engagement at a time.
Below is a video explaining the workflow using the example of the cement industry:


18
1 Then Bildad replied again:
2 "Please stop talking!

Do you think that everyone on the earth must leave to prove that you are right,
or do you think that God must move the rocks in the mountains to please you?
5 What will happen is that the lives of wicked people like you end
as quickly as we can put out a light or extinguish the flame of a fire.
6 When the lamps above them in their tents are extinguished,
there will be no light in those tents.
7 While they are alive, they walk confidently,
but later it will be as though they stumbled and fell,
because they themselves do not pay attention to the advice that they give to others.
8 It will be as though they had walked into their own net
or had fallen into a pit that they themselves dug.
9 It will be as though a trap had grabbed their heels and held them fast,
10 as though the end of a rope that was hidden on the ground
had sprung up and seized them when they walked on it.
11 Everywhere they go, there will be things that cause them to be terrified;
it will be as though those things were pursuing them and biting at their heels.
12 They will become hungry, with the result that they will be strong no longer.
They will continually experience disasters.
13 Diseases will spread all over their skin;
diseases will cause their bodies to decay.
14 When they die, they will be snatched away from their tents
and brought to the one who rules over the dead.
15 Then other people will live in their tents,
but only after they sprinkle sulfur on those tents to get rid of the disease!
16 Because they will die and leave no descendants,
they will be like trees whose roots have dried up and whose branches have all withered.
17 No one on the earth will remember them anymore;
no one on any street will even remember their names.
18 They will have to leave the earth, where there is light,
and rush into the place where it is dark.
19 They will have no children or grandchildren,
no descendants where they will have previously lived.
20 People from the east to the west who hear about what happened to them, everyone,
will be shocked and horrified.
21 This is what happens to unrighteous people like you,
people who do not know God."


CS Department Home
/
Students
/
Prospective
/ Request Info
Virtual Tour
Admissions
[Request Info]
Name
Email
Mailing Address
City
State
Postal Code
Additional Requests:


type
The type of event.useCapture
Determines whether the listener works in the capture phase or the target and bubbling phases. If useCapture
is set to true
, the listener processes the event only during the capture phase and not in the target or bubbling phase. If useCapture
is false
, the listener processes the event only during the target or bubbling phase. To listen for the event in all three phases, call addEventListener
twice, once with useCapture
set to true
, then again with useCapture
set to false
.priority
The priority level of the event listener. The priority is designated by a signed 32-bit integer. The higher the number, the higher the priority. All listeners with priority n are processed before listeners of priority n-1. If two or more listeners share the same priority, they are processed in the order in which they were added. The default priority is 0.useWeakReference
Determines whether the reference to the listener is strong or weak. A strong reference(the default) prevents your listener from being garbage-collected. A weak reference does not. Class-level member functions are not subject to garbage collection, so you can set useWeakReference
to true
for class-level member functions without subjecting them to garbage collection. If you set useWeakReference
to true
for a listener that is a nested inner function, the function will be garbage-collected and no longer persistent. If you create references to the inner function(save it in another variable) then it is not garbage-collected and stays persistent.
ArgumentError
The listener
specified is not a function.event
The Event object that is dispatched into the event flow. If the event is being redispatched, a clone of the event is created automatically. After an event is dispatched, its target
property cannot be changed, so you must create a new copy of the event for redispatching to work.true
if the event was successfully dispatched. A value of false
indicates failure or that preventDefault()
was called on the event.Error
The event dispatch recursion limit has been reached.dispatchEvent()
method
is called.
type
The type of event.true
if a listener of the specified type is registered; false
otherwise.willTrigger()
.
The difference between hasEventListener()
and
willTrigger()
is that hasEventListener()
examines only the object to which it belongs, whereas
willTrigger()
examines the entire event flow for the event
specified by the type
parameter.
When hasEventListener()
is called from a LoaderInfo
object, only the listeners that the caller can access are considered.
type
The type of event.useCapture
Specifies whether the listener was registered for the capture phase or the target and bubbling phases. If the listener was registered for both the capture phase and the target and bubbling phases, two calls to removeEventListener()
are required to remove both, one call with useCapture()
set to true
, and another call with useCapture()
set to false
.type
The type of event.true
if a listener of the specified type will be triggered; false
otherwise.true
if an event listener is triggered during any
phase of the event flow when an event of the specified type is dispatched
to this EventDispatcher object or any of its descendants.
The difference between the hasEventListener()
and the
willTrigger()
methods is that hasEventListener()
examines only the object to which it belongs, whereas the
willTrigger()
method examines the entire event flow for the
event specified by the type
parameter.
When willTrigger()
is called from a LoaderInfo object,
only the listeners that the caller can access are considered.
After you successfully register an event listener, you cannot change its priority through additional calls to
addEventListener()
. To change a listener's priority, you must first callremoveListener()
. Then you can register the listener again with the new priority level.Keep in mind that after the listener is registered, subsequent calls to
addEventListener()
with a differenttype
oruseCapture
value result in the creation of a separate listener registration. For example, if you first register a listener withuseCapture
set totrue
, it listens only during the capture phase. If you calladdEventListener()
again using the same listener object, but withuseCapture
set tofalse
, you have two separate listeners: one that listens during the capture phase and another that listens during the target and bubbling phases.You cannot register an event listener for only the target phase or the bubbling phase. Those phases are coupled during registration because bubbling applies only to the ancestors of the target node.
If you no longer need an event listener, remove it by calling
removeEventListener()
, or memory problems could result. Event listeners are not automatically removed from memory because the garbage collector does not remove the listener as long as the dispatching object exists(unless theuseWeakReference
parameter is set totrue
).Copying an EventDispatcher instance does not copy the event listeners attached to it.(If your newly created node needs an event listener, you must attach the listener after creating the node.) However, if you move an EventDispatcher instance, the event listeners attached to it move along with it.
If the event listener is being registered on a node while an event is being processed on this node, the event listener is not triggered during the current phase but can be triggered during a later phase in the event flow, such as the bubbling phase.
If an event listener is removed from a node while an event is being processed on the node, it is still triggered by the current actions. After it is removed, the event listener is never invoked again(unless registered again for future processing).


{% load staticfiles %}
TOGETHER - Your Online Traveling BOOK
TOGETHER
Your Online Traveling BOOK
Home
Travel Blogs
Our Team
Sign In
{% csrf_token %} {{ form.as_p }}
Login
Register
Remember me
Forgot your password?
Or


You can't get Industrial Injuries benefit
To get Industrial Injuries benefit you must have either:
- an illness caused by your normal work duties or work environment
- been injured while doing your job
Based on your answers you're not eligible to claim.
You may still be able to get other help, it will depend on your illness or disability and how it happened.


KUnit
What is KUnit?
KUnit is a lightweight unit testing framework for the Linux kernel. These tests are able to be run locally on a developer’s workstation without a VM or special hardware.
KUnit is heavily inspired by JUnit, Python’s unittest.mock, and Googletest/Googlemock for C++. KUnit provides facilities for defining unit test cases, grouping related test cases into test suites, providing common infrastructure for running tests, and more.
Get started now: Using KUnit
Who is it for?
If you work on the Linux kernel, then KUnit is for you.
Why unit test the kernel?
The first question is, “why write unit tests in the first place?”
A unit test is a test focused on testing a small “unit” of code. This is usually on the level of a few functions at most. Unit tests try to avoid external dependencies like hardware and/or stub them out where possible.
This ideally makes unit tests more stable, faster, and easier to debug when they fail.
In-kernel testing
Note
In our case, “unit test” implies in-kernel test code. It’s not really possible to be a “unit test” if you’re relying on a kernel working enough to have a functional userspace on top of it.
For internal libraries (e.g. include/linux/list.h
), there’s no good way to
test from userspace. It’s far easier to write in-kernel code to test these.
That are some tests that make this work, but if you’re starting from scratch,
just use KUnit.
For code with a user facing component, you’ll want some tests in userspace. But it can be useful to have unit tests as well. For example, it can be hard to trigger certain code paths from userspace, particularly error paths. Furthermore, it’s probably much faster and more hermetic to build and run the tests under KUnit instead of booting a machine and waiting for all the needed userspace processes to come up.
Why KUnit?
KUnit provides a library to help making writing tests easy: including making assertions, setting up and cleaning up test resources, and more. It also provides a python script to make building and running tests easy.
kselftest has a way of writing unit tests as kernel modules via the helpers in
tools/testing/selftests/kselftest_module.h
. But this requires more
boilerplate scattered across several files and potentially several directories.
UML
KUnit is able to run tests without needing a virtual machine or actual hardware with User Mode Linux. User Mode Linux is a Linux architecture, like ARM or x86; however, unlike other architectures it compiles to a standalone program that can be run like any other program directly inside of a host operating system; to be clear, it does not require any virtualization support; it is just a regular program. User Mode Linux is fast: on my desktop it boots to init process in under a second.
The provided tooling (tools/testing/kunit/kunit.py
) mainly works with UML,
but you can use KUnit manually on different architectures, if wanted. See here for more details.
How do I use it?
Using KUnit - for new users of KUnit
For upstream KUnit: - Usage - for a more detailed explanation of KUnit features - API - for the list of KUnit APIs used for testing
Where do I get it?
Upstream: https://www.kernel.org/ (version 5.5 or later)
Deprecated version: https://kunit.googlesource.com/linux/+/kunit/alpha/master
Connect with us
Mailing List<EMAIL_ADDRESS>Google Groups (web interface for above): https://groups.google.com/forum/#!forum/kunit-dev
IRC: #kunit on oftc.net
Riot: #kunit:matrix.org
Contributing
If you want to contribute to KUnit in the Linux kernel (which is just the same as contributing to the Linux kernel, please see the Linux kernel’s guide on contributing.
For other KUnit repositories (CI/CD, vim plugin, etc), please see
CONTRIBUTING.md
.
In all cases, you will also want to take a look at Development.


Appearance
Interestingly, the back of this Pokemon was depicted in several different ways. In the anime, the oldies look like two starfish merged together, while in more modern games the back half was shown completely independently of the front half of the Pokemon. Many fans tend to find the description in the anime more realistic. The starmi core shimmers with all the colors of the rainbow, which gives it a resemblance to a gem.


Windows 10 November 2019 Update Is Now Available
by Mayank ParmarMicrosoft has officially released the November 2019 Update for Windows 10 and is in the process of rolling out to users. This update will upgrade the operating system to Windows 10 1909 and is an optional feature update that will not be installed automatically for users running newer versions of Windows.
As previously reported, Windows 10 November 2019 Update is not a big release and it doesn't come with any major improvements. Instead this should be considered a service pack that includes bug fixes and mostly feature improvements.
The main improvements from this build include:
- You can now create an event directly from the Calendar flyout on the Taskbar.
- Action Center is getting a new button at the top and Microsoft is also updating notifications settings with a new option that will help you sort notifications by most recently shown. The notification toast has been updated with a new button to quickly mute notifications from that particular app.
- File Explorer updated with new Search experience and OneDrive integration.
- The navigation pane on the Start menu now expands when you hover over it with your mouse
- Third-party digital assistants like Alexa will work from the Lock screen.
Microsoft says it's rolling out the update now and it will show up on PCs gradually. For users who wish to install it right now, they need to open the Settings app and navigate to Update & Security page > Windows Update, and then click on 'Check for updates'.
If the update is available for your PC, you will see a new 'Download and install now' option underneath the check for updates button. November 2019 Update will be labeled as an optional update, so it won't be installed automatically.
Microsoft says you cannot download the Windows 10 version 1909 with the Update Assistant tool until November 18. Instead you can use one of the following two methods.
Getting the November 2019 Update via Windows Update
To get the November 2019 Update using Windows Update, please follow these steps:
- Open the Start menu and click on Settings icons.
- Navigate to Update & Security.
- Open Windows Update page.
- Click 'Check for updates'.
- A new section "Feature update to Windows 10, version 1909" will appear.
- Click 'Download and install now' to begin the download.
Downloading the November 2019 Update ISO files
If you don't want to wait until the update is released for your device, you can also grab ISO images and manually force the update.
- Open Windows 10 download page in Chrome or Firefox.
- Open the Developer tools.
- Toggle device bar and select iPhone, iPad or a Pixel phone. It can be any platform other than Windows.
- Refresh the page and you have the direct download links on your screen.
- Select the language and system version (32 or 64-bit) and download the file. Remember that the link will expire in 24 hours.
Automatic update for older versions
Microsoft plans to automatically initiate Windows 10 feature update download on PCs running a version of Windows 10 that will be reaching the end of service in a few weeks or months. Users will still have the ability to choose a convenient time.
Today, Windows 10 April 2018 Update has reached end of service for Home and Pro editions, and such devices should receive the latest feature update.


--- title: Contact Me permalink: /contact/ layout: splash header: overlay_color: "#000" overlay_image: /assets/images/contact.webp overlay_filter: 0.6 excerpt: "Reach out and send a friendly Hello" date: 2019-03-27 last_modified_at: 2019-03-27T23:00:00+05:30 --- If you have any problem that I can help you with, I would love to help


NOT PUBLIC API - DO NOT USE: Convention parsing to identify Coordinate Systems. Parses the information in netCDF datasets using Conventions, and extracts information about coordinate systems. The extracted information is put into a NetcdfDataset. See: Netcdf Conventions


What...
Come and experience creating with painting, drawing and mixed media. Creative expression will relax, inspire, and strengthen your artistic spirit. If you are affected by cancer, art can give you a way to talk about your feelings by allowing you to focus on a project and think about something other than the diagnosis. Doing art itself is therapeutic and it is the process, not the product, that is the primary focus. We encourage you to come with a sense of curiosity, adventure, and a willingness to jump in and try something new.
When...
Every Friday
10:30 AM - 12:30 PM
Where...
El Camino Hospital - Oak Pavilion
2505 Hospital Drive Mountain View, CA 94040


Erasing Levels
Permanent Eraser 2.5 introduced the ability to customize the level of erasing for files on a hard drive or rewritable optical disc.
File Erasing Level |
|
|
Simple (1x) : Overwrites the file with a single pass of random data. This option is automatically used when erasing files on an SSD to prevent unnecessary wear on the drive. DoE (3x) : Overwrites the file with the 3-pass U.S. DoE compliant algorithm (two random passes, 0x00). DoD (7x) : Overwrites the file with 7 U.S. DoD compliant passes (0xF6, 0x00, 0xFF, random, 0x00, 0xFF, random). This is the default option. Gutmann (35x) : Overwrites the file using the 35-pass Gutmann algorithm. The Gutmann method will provide the most thorough erasing procedure, but it will also take the longest amount of time to erase the data. Files which reside on a Solid State Drives (SSD) will only be overwritten once, due to the wear leveling technique used by SSDs when writing to the drive. |
Optical Disc Erasing Level |
|
|
Quick : Quickly erase the data from the rewritable optical disc. As its name suggests, this is the faster method. Complete : Thoroughly erase the data from the rewritable optical disc. This can take several times longer than the Quick method. Permanent Eraser can only erase data from rewritable optical discs, such as CD-RW and DVD-RW discs. Read-only media such as CD-ROMs, DVD-ROMs, CD-Rs, and DVD-Rs cannot be erased. |


Sections of the StatPages.net web site
|
{{ x.Name}}
|
What's New in the Interactive Statistical
Pages
Edpsychassociates -- more than 25 small specialised programs
covering a wide range of statistical topics. All freely available for download (Mac and Windows) (added 05/04/23)
acetabulum.dk New online app's for doing Meta-analysis (Interval Scale or Binary outcome) and Excel like Cross-tabulate and Pivoting (added 11/19/2022)
Had2Know Calculators for math, statistics, finance, home and garden
remodeling, science, technology, health, and much more (added 03/17/2021)
StatsJournal is a selection of basic statistics tools (added 09/25/2020)
Nonlinear least-square regression calculator added to acetabulum.dk (added 06/28/2020)
statpages.info now uses Let's Encrypt certificate authorisation (added 09/01/2019)
The Thomeer Excel spreadsheet A highly developed spreadsheet software that implements the complete formalism of the type curve matching analysis of Mercury Injection Capillary Pressure data obtained upon porous geological materials
(updated 11/08/2019)
GIGA Calculators Several small versatile online calculators (added 03/03/2019)
InVivoStat is a free to use, versatile statistical program for Windows (added 3/17/2018)
ViSta Windows version <IP_ADDRESS> (added 12/26/17)
A comprehensive list of financial ratios and metrics to be used by investors and analysts (added 11/14/17)
iCalcu -- four statistics calculators: Five-number summary, ANOVA and Tukey HSD, Chi-square and Binomial Probability (added 10/27/2017)
acetabulum.dk - five statistics calculators: Correlation, Survival Analysis, Cox Propertional Hazard Analysis, ANOVA and Logistic Regression (added 09/02/2017)
Graphing Calculator 3D with a wide range of plot capabilities. Plot equations and data points (Excel, CSV).
Available for Windows, Mac or Linux computers (added 04/19/2017)
Quantify agreement with kappa with data entry in case format. You can copy/paste Excel or CSV data (added 12/13/2016)
Contingency Table Analysis for Ordinal (sequenced) Categories. New version with N-by-M contingency tables (added 12/08/2016)
Chi Square calculation for for N x M contingency tables (added 12/03/2016)
Statpages 2-by-2 table analysis interactive page
- Adjusted predictive values by Søren Merser (added 11/06/2016)
- Diagnostic Test and RIOC, Relative Improvement Over Chance suggested by Michael Meier (added 11/04/2016)
- NNM, the Number Needed to Mis-diagnose thanks to Farrokh Habibzadeh (added 07/23/2013)
Diagnostic Test Calculator determine diagnostic test characteristics like sensitivity, specificity, likelihood ratios etc. (added 11/03/2016)
GoodCall's student guide to success throughout the course of their internship (added 05/30/2016)
Bill Millers OpenStat resource back online (added 04/24/2016)
Areavibes has information for thousands of US cities (added 04/24/2016)
Hosting Facts A page for learning website development
Marko Lucijanic's Excel spreadsheet to perform Log Rank test on survival data (added 03/14/2016)
Site search for Statpages (added 03/10/2016)
Cox Proportional Hazards Regression Copy/paste data from Excel or upload a CSV file. Produces a
regression table report, survival plot, survival table, log-rank test,
and a predicted survival plot for specified covariable patterns. Uses
the R statistical engine on the host server to provide very
high-quality output (added 12/20/2015)
Online Guide to MBA and Graduate Programs, on the Discover Business
web site. Helps prospective students make more informed decisions when
selecting a graduate program. Contains a list of Accredited MBA
Programs, a curated list of 200+ MBA and Graduate Scholarships, and
how-to guides for studying for the GMAT and GRE, and how to pay for
graduate school. (added 12/10/2015)
Go Grad's Guide to Online Master's Degrees
-- a comprehensive resource for current and prospective grad students.
Includes an in-depth look at the growth of distance education courses
at the graduate level, scholarship and financial aid information for
students pursuing a graduate education, and job growth outlook and ROI
for students pursuing a master's degree. (added 12/10/2015)
Varsity Learning Tools
-- contains over 100,000 professionally written problems and thousands
of distinct practice tests across 150 subjects (e.g.: foreign
languages, history, math, and all levels of science). Also has
thousands of practice tests and problems for Common Core and
standardized tests like the ACT, SAT, GRE, GMAT, LSAT, MCAT, ISEE, and
SSAT. Each question is tied to a specific academic concept, which means
that students can pinpoint their particular strengths and weaknesses in
almost any area. The platform also includes free web-based classroom assessment software.
Varsity Learning Tools also has 41 subject specific Mobile Apps for on-the-go studying, with all of the same free academic content in a convenient and user-friendly interface. The Varsity main web page provides a referral service to paid tutors. (added 12/10/2015)
Neuvoo.com -- a free job search engine
that indexes almost 3 million US jobs directly from companies' career
websites, placement agencies and job boards. Much like a "Google for
jobs", you can also search by company, job title, skills, and by city,
region, state, industry, etc., and find all relevant jobs. (added 12/10/2015, on the John Pezullo Page)
Explorer
-- A data exploration / graphing / analysis program with a very elegant
drag-and-drop interface. Accepts data from text files, Excel
spreadsheet, MySQL databases, and copy/pasted from the clipboard.
Provides over a dozen kinds of plots and diagrams, basic statistical
summaries, significance tests (chi-square, t, ANOVA ) and more advanced
analyses (factorial, principal components, discriminant, variance,
linear regression). Executable programs can be downloaded for Windows
and Mac OSX. Written in JavaScript, so it can also be run in any modern
browser. See a short demo here. (added 10/08/2015)
MATLAB tutorial
-- covers setting it up, interactive mode and script files, writing
Matlab code (variables, arrays and matrices, control flow and classes),
and sample applications. (added 09/18/2015)
HealthCareSpanish -- a web site to help you learn common phrases and medical terms in Spanish. (added 09/18/2015)
AppOnFly has a
different approach -- the company maintains Windows computers with a
wide selection of Windows software, including utilities for accessing
PDF, ZIP, graphics and other files, web browsers, various office suites
(MS Office, Libre Office, Apache OpenOffice, WordPerfect Office), and
statistical packages (SPSS, NCSS, R), to mention a few. They then
provide apps for accessing this Windows desktop environment from any
device -- computer, smartphone, tablet (Windows, Mac OS, iOS, Android).
This is a pay-for service, but they offer one-month free trials.
A
Guide to Not-for-Profit Online Universities - a guidebook to help new and
returning students understand the online academic landscape and how best to
succeed in an online degree program. Key elements of the guide include:
- A
comprehensive review of the growth of distance education at not-for-profit
universities
- Differences between for-profit and not-for profit online
schools
- An exploration of the most popular online learning platforms
-
Scholarships and other financial aid options for online students
(added 08/20/2015)
Sample size
calculator for pilot or safety studies where the goal is to detect the
occurrence of one or more events that might indicate possible problems in study
design (ambiguous inclusion criteria, misinterpretation of questionnaire items)
or product safety (occurrence of serious adverse events, abnormal lab tests, or
other safety markers). Enter the prevalence rate you want to be able to detect
(like one in a hundred), and the probabibility you want to have of seeing at
least one such event in your sample (like 95% probability), and the page will
tell you how many subjects you need in the study. (added 08/05/2015)
JASP -- a new package
(still in "beta" development) that's described by the authors as a "low-fat
alternative to SPSS", and "Bayesian statistics made accessible". Provides a
user-friendly interface to many of the commonly-used statistical analyses --
descriptive statistics, plots, t tests, Levene's Test, ANOVA, ANCOVA,
contingency tables, Pearson and Spearman correlation, Kendall's Tau-B, and
linear regression. For many of these analyses, the JASP also provides the
closest corresponding Bayesian equivalent, implemented in a way that will be
understandable to people not familiar with Bayesian concepts and terminology.
(added 07/29/2015)
Statigraphics Stratus -- a browser-based version of
Stratigraphics statistical software. Provides plotting, probability
distributions, summary statistics, one-, two-, and multiple-sample analysis,
time-series analysis, regression analysis, curve-fitting, attribute estimates,
ANOVAs, Statistical Process Control, smoothing, power/sample-size calculations,
and other statistical analyses.Also provides access to over 50 applets in
which you can enter data, compute statistics, create tables and graphs, and
print out the results. The free "Guest" version supports up to 100 rows and 10
columns of data. For larger data sets, a single-user copy or a corporate
deployment license can be purchased. To use the Guest version, click here. (added
07/18/2015)
- MedCalc -- Two different web sites:
(added 07/18/2015)
How to
Test a Random Number Generator -- a chapter from the book Beautiful Testing,
by John D. Cook. (added 07/15/2015)
MyCurveFit.com -- an easy-to-use curve-fitting page.
Offers 13 pre-defined functions (no initial guesses required), along with
the ability to fit a general non-linear function you provide (along with initial
guesses). Displays the results graphically, along with the formula of the fitted
curve. Several types of unequal data-point weighting are provided. Lets
you generate predicted values (interpolated and extrapolated) from the fitted
curve. Lets you save results in Excel and PDF formats. (added
03/13/2015)
MaxStat
statistics & graphics program (for Windows): Easy to use, modern interface
-- specify an analysis in three simple steps within a single dialog.
(added 02/13/2015)
Two versions are available:
* Lite (free)
has descriptive statistics, hypothesis testing (t-tests, chi-square, 1-way ANOVA
with post-hocs, non-parametric tests), distribution testing, linear
regression, correlation, many basic types of graphs; limited to 254
rows and 12 columns of data, no import/export.
* Professional (free 30-day trial) advanced analyses
(unlimited rows & columns, import/export, many more analyses (2-way ANOVA,
logistic and non-linear regression, principal-components analysis and
multidimensional scaling, time series, power/sample-size, factorial design),
more graph types, word-processing and formatting of results. (added
02/08/2015)
Please send all suggestions for new pages, notifications for dead links, and other requests in an e-mail to statpages.org@gmail.com


Uses of Package
org.apache.cayenne
-
Classes in org.apache.cayenne used by org.apache.cayenne Class Description BaseDataObject Base implementation ofDataObject
, have no assumption about how data is actually stored.CayenneRuntimeException A generic unchecked exception that may be thrown by Cayenne framework.DataChannel DataChannel is an abstraction used by ObjectContexts to obtain mapping metadata and access a persistent store.DataChannelFilterChain Deprecated.DataChannelQueryFilter An interface of a filter that allows to intercept DataChannel query operations.DataChannelQueryFilterChain Interface for chain of query filtersDataChannelSyncCallbackAction DataChannelSyncFilter An interface of a filter that allows to intercept DataChannel sync operations.DataChannelSyncFilterChain Interface for chain of sync filtersDataObject Defines basic methods for a persistent object in Cayenne.DataRow DataRow a map that holds values retrieved from the database for a given query row.DeleteDenyException An exception thrown during an attempt to delete an object that has a relationship to a non-null related object, that has a DENY delete rule.ObjectContext A Cayenne object facade to a persistent store.ObjectId A portable global identifier for persistent objects.Persistent Defines minimal API of an object that can be persisted via Cayenne.PersistentObject A convenience base superclass for concrete Persistent objects.QueryResponse Represents a result of query execution.QueryResult Represents a collection of items which are results of a multipart query execution.QueryResultItem Represents a single item in a multipart query execution.ResultBatchIterator Defines API of a batch iterator over the ResultIterator returned as a result of Select queries execution.ResultIterator Defines API of an iterator over the records returned as a result of Select queries execution.ResultIteratorCallback A callback interface invoked on each row when iterating overResultIterator
.Validating Defines a number of callback methods that allow an object to be validated before safe. -
Classes in org.apache.cayenne used by org.apache.cayenne.access Class Description BaseContext A common base superclass for Cayenne ObjectContext implementors.CayenneRuntimeException A generic unchecked exception that may be thrown by Cayenne framework.DataChannel DataChannel is an abstraction used by ObjectContexts to obtain mapping metadata and access a persistent store.DataChannelFilter Deprecated.since 4.1 useDataChannelQueryFilter
andDataChannelSyncFilter
DataChannelQueryFilter An interface of a filter that allows to intercept DataChannel query operations.DataChannelSyncFilter An interface of a filter that allows to intercept DataChannel sync operations.DataObject Defines basic methods for a persistent object in Cayenne.DataRow DataRow a map that holds values retrieved from the database for a given query row.Fault Represents a placeholder for an unresolved relationship from a source object.ObjectContext A Cayenne object facade to a persistent store.ObjectId A portable global identifier for persistent objects.Persistent Defines minimal API of an object that can be persisted via Cayenne.QueryResponse Represents a result of query execution.ResultIterator Defines API of an iterator over the records returned as a result of Select queries execution.ValueHolder Provides a level of indirection for property value access, most often used for deferred faulting of to-one relationships. -
Classes in org.apache.cayenne used by org.apache.cayenne.access.event Class Description DataRow DataRow a map that holds values retrieved from the database for a given query row.ObjectId A portable global identifier for persistent objects. -
Classes in org.apache.cayenne used by org.apache.cayenne.access.jdbc Class Description ResultIterator Defines API of an iterator over the records returned as a result of Select queries execution. -
Classes in org.apache.cayenne used by org.apache.cayenne.access.translator.select Class Description ObjectId A portable global identifier for persistent objects.Persistent Defines minimal API of an object that can be persisted via Cayenne. -
Classes in org.apache.cayenne used by org.apache.cayenne.access.util Class Description ObjectId A portable global identifier for persistent objects.ResultIterator Defines API of an iterator over the records returned as a result of Select queries execution. -
Classes in org.apache.cayenne used by org.apache.cayenne.ashwood Class Description Persistent Defines minimal API of an object that can be persisted via Cayenne. -
Classes in org.apache.cayenne used by org.apache.cayenne.cache Class Description ConfigurationException A runtime exception thrown on failures in Cayenne configuration. -
Classes in org.apache.cayenne used by org.apache.cayenne.configuration Class Description CayenneRuntimeException A generic unchecked exception that may be thrown by Cayenne framework.ConfigurationException A runtime exception thrown on failures in Cayenne configuration.DataChannel DataChannel is an abstraction used by ObjectContexts to obtain mapping metadata and access a persistent store.ObjectContext A Cayenne object facade to a persistent store. -
Classes in org.apache.cayenne used by org.apache.cayenne.configuration.rop.client Class Description ConfigurationException A runtime exception thrown on failures in Cayenne configuration.DataChannel DataChannel is an abstraction used by ObjectContexts to obtain mapping metadata and access a persistent store.ObjectContext A Cayenne object facade to a persistent store. -
Classes in org.apache.cayenne used by org.apache.cayenne.configuration.server Class Description CayenneRuntimeException A generic unchecked exception that may be thrown by Cayenne framework.ConfigurationException A runtime exception thrown on failures in Cayenne configuration.DataChannel DataChannel is an abstraction used by ObjectContexts to obtain mapping metadata and access a persistent store.DataChannelFilter Deprecated.since 4.1 useDataChannelQueryFilter
andDataChannelSyncFilter
DataChannelQueryFilter An interface of a filter that allows to intercept DataChannel query operations.DataChannelSyncFilter An interface of a filter that allows to intercept DataChannel sync operations.ObjectContext A Cayenne object facade to a persistent store. -
Classes in org.apache.cayenne used by org.apache.cayenne.configuration.xml Class Description CayenneRuntimeException A generic unchecked exception that may be thrown by Cayenne framework.ConfigurationException A runtime exception thrown on failures in Cayenne configuration. -
Classes in org.apache.cayenne used by org.apache.cayenne.ejbql Class Description CayenneRuntimeException A generic unchecked exception that may be thrown by Cayenne framework. -
Classes in org.apache.cayenne used by org.apache.cayenne.event Class Description ConfigurationException A runtime exception thrown on failures in Cayenne configuration. -
Classes in org.apache.cayenne used by org.apache.cayenne.exp Class Description CayenneRuntimeException A generic unchecked exception that may be thrown by Cayenne framework.Persistent Defines minimal API of an object that can be persisted via Cayenne. -
Classes in org.apache.cayenne used by org.apache.cayenne.graph Class Description ObjectContext A Cayenne object facade to a persistent store.Persistent Defines minimal API of an object that can be persisted via Cayenne. -
Classes in org.apache.cayenne used by org.apache.cayenne.map Class Description DataRow DataRow a map that holds values retrieved from the database for a given query row.ObjectId A portable global identifier for persistent objects.Persistent Defines minimal API of an object that can be persisted via Cayenne. -
Classes in org.apache.cayenne used by org.apache.cayenne.query Class Description DataRow DataRow a map that holds values retrieved from the database for a given query row.ObjectContext A Cayenne object facade to a persistent store.ObjectId A portable global identifier for persistent objects.Persistent Defines minimal API of an object that can be persisted via Cayenne.ProcedureResult Result of procedure call.QueryResult Represents a collection of items which are results of a multipart query execution.ResultBatchIterator Defines API of a batch iterator over the ResultIterator returned as a result of Select queries execution.ResultIterator Defines API of an iterator over the records returned as a result of Select queries execution.ResultIteratorCallback A callback interface invoked on each row when iterating overResultIterator
. -
Classes in org.apache.cayenne used by org.apache.cayenne.reflect Class Description CayenneRuntimeException A generic unchecked exception that may be thrown by Cayenne framework.Fault Represents a placeholder for an unresolved relationship from a source object.LifecycleListener A callback interface to listen to persistent object lifecycle events.Persistent Defines minimal API of an object that can be persisted via Cayenne.ValueHolder Provides a level of indirection for property value access, most often used for deferred faulting of to-one relationships. -
Classes in org.apache.cayenne used by org.apache.cayenne.remote Class Description CayenneRuntimeException A generic unchecked exception that may be thrown by Cayenne framework.DataChannel DataChannel is an abstraction used by ObjectContexts to obtain mapping metadata and access a persistent store.ObjectContext A Cayenne object facade to a persistent store.QueryResponse Represents a result of query execution. -
Classes in org.apache.cayenne used by org.apache.cayenne.remote.service Class Description CayenneRuntimeException A generic unchecked exception that may be thrown by Cayenne framework.DataChannel DataChannel is an abstraction used by ObjectContexts to obtain mapping metadata and access a persistent store. -
Classes in org.apache.cayenne used by org.apache.cayenne.rop Class Description CayenneRuntimeException A generic unchecked exception that may be thrown by Cayenne framework. -
Classes in org.apache.cayenne used by org.apache.cayenne.tx Class Description DataChannelSyncFilter An interface of a filter that allows to intercept DataChannel sync operations.DataChannelSyncFilterChain Interface for chain of sync filtersObjectContext A Cayenne object facade to a persistent store. -
Classes in org.apache.cayenne used by org.apache.cayenne.util Class Description CayenneRuntimeException A generic unchecked exception that may be thrown by Cayenne framework.DataChannel DataChannel is an abstraction used by ObjectContexts to obtain mapping metadata and access a persistent store.DataChannelListener A listener ofDataChannel
lifecycle events.ObjectContext A Cayenne object facade to a persistent store.ObjectId A portable global identifier for persistent objects.Persistent Defines minimal API of an object that can be persisted via Cayenne.ProcedureResult Result of procedure call.QueryResponse Represents a result of query execution.QueryResult Represents a collection of items which are results of a multipart query execution.QueryResultItem Represents a single item in a multipart query execution.ResultIterator Defines API of an iterator over the records returned as a result of Select queries execution.ValueHolder Provides a level of indirection for property value access, most often used for deferred faulting of to-one relationships. -
Classes in org.apache.cayenne used by org.apache.cayenne.validation Class Description CayenneRuntimeException A generic unchecked exception that may be thrown by Cayenne framework.
DataChannelSyncFilterChain
andDataChannelQueryFilterChain


{% extends 'all_images/base.html' %} {% block content %} {{block.super}}
Copy Link
Link Successfully Copied


|
KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
Classes | |
| class | STMonolithicSolver |
Functions | |
| def | AddVariables (model_part, config=None) |
| def | AddDofs (model_part, config=None) |
| def | CreateSolver (model_part, config, eul_model_part, gamma, contact_angle, zeta_dissapative_JM, zeta_dissapative_BM, zeta_dissapative_SM) |
Variables | |
| dictionary | variables_dictionary |
| def SurfaceTension_monolithic_solver.AddDofs | ( | model_part, | |
config = None |
|||
| ) |
| def SurfaceTension_monolithic_solver.AddVariables | ( | model_part, | |
config = None |
|||
| ) |
| def SurfaceTension_monolithic_solver.CreateSolver | ( | model_part, | |
| config, | |||
| eul_model_part, | |||
| gamma, | |||
| contact_angle, | |||
| zeta_dissapative_JM, | |||
| zeta_dissapative_BM, | |||
| zeta_dissapative_SM | |||
| ) |
| dictionary SurfaceTension_monolithic_solver.variables_dictionary |


Katie Holmes Is Set to Star in a New Drama, 'The Secret: Dare to Dream' Alongside Josh Lucas
by Kayleigh Roberts- Gravitas Features will distribute The Secret: Dare to Dream, an upcoming drama film starring Katie Holmes and Josh Lucas, Deadline reports.
- The movie, helmed by Sweet Home Alabama director Andy Tennant, was inspired by Rhonda Byrne’s 2006 NYT bestseller, The Secret, and is expected out in April 2020.
- Here's everything we know about the movie as of now.
If you're as obsessed with Katie Holmes' every move as we are, then you'll be interested to know that the actress has an upcoming drama film scheduled out next spring. The movie, a drama called The Secret: Dare to Dream, just got picked up for distribution by Gravitas Ventures, in partnership with Roadside Attractions, Deadline reports.
Here's everything we know about the movie so far.
What is The Secret: Dare to Dream about?
The Secret: Dare to Dream is described as a drama film with a script inspired by Rhonda Byrne’s 2006 NYT bestselling self-help book, The Secret. According to Deadline, the plot revolves around a woman named Miranda Wells (played by Katie), a hard-working young widow and single mother of three.  In just a few short days, Bray’s presence re-ignites the family’s spirit, but he carries a secret—and that secret could change everything."
The movie is being helmed by Sweet Home Alabama director Andy Tennant.
Who stars in The Secret: Dare to Dream?
In addition to Holmes and Lucas, The Secret: Dare to Dream also stars Celia Weston and Jerry O’Connell.
When will The Secret: Dare to Dream be released?
The Secret: Dare to Dream is set to hit theaters on April 17, 2020.
For more stories like this, including celebrity news, beauty and fashion advice, savvy political commentary, and fascinating features, sign up for the Marie Claire newsletter.


--- title: About us layout: general ---
We are University of Washington students that form the robotics team. Each year we design and build robots for international competitions.
Our mission is to design and build robots to provide not only our team members with valuable experience in multiple engineering disciplines, but to create robots with advanced designs and win competitions.
Originally, our robotics club had competed in the collegiate FIRST robotics competitions. As of fall of 2012, we have switched our focus to the University Rover Challenge where we must design a rover to perform missions under conditions simulating a space mission.
DUBotics is a multi-disciplinary engineering group that draws students from the University of Washington to participate in constructing robots for several international competitions. Most recently, the team has been participating in the University Rover Challenge and has to date competed in one year of the competition, submitting our first entry: The Cerberus Rover.
The team is divided into different subgroups that have work delegated to them by their individual group leaders, all of which are overseen by the team leaders. Currently, anyone regardless of major or intended major is open to join the team as most of the skills needed to participate can be learned on site.
The team generally meets in the Mechanical Engineering Annex. For more information on when specific teams meet and do, consult our teams page.
{% include meeting-times.html %}Most of our meetings take place in the Mechanical Engineering Annex, next to the Formula SAE team:


React credit card
React port of the display part of Card by @jessepollak
Why?
Card looks amazing on any form, but it interacts with the dom in a more classic javascript interface, which is incompatible with react.
Goals
- Look like Card.
- Provide a react interface for displaying credit card information.
How to install
npm install react-credit-card
- Add the
build/card.css
andbuild/card-types.css
files to your app's stylesheets (This step may be unnecessary in the future)
How to use (Check the test index.cjsx for a better overview)
Card = require('react-credit-card')
React.render(
<Card
cvc = {myForm.props.cvc}
name = {myForm.props.name}
focused = {'name'}/> // The form turns around when focused is "cvc"
,document.body)
Available props
-
cvc
: number(max 4 characters, will cut the rest)(The "/" will be automatically added) -
name
: string (max 2 lines) -
number
: credit card number(max 16 characters, will cut the rest) -
expiry
: number(max 4 characters, will cut the rest) -
focused
: one of the above fields- name
- number
- expiry
- cvc (Upon focusing cvc, the form will be rotated until this is changed.)
- null
-
namePlaceholder
: The text displayed as placeholder of name field (default is: "FULL NAME") -
expiryAfter
: The text displayed on the left of the expiry date -
expiryBefore
: The text displayed above the expiry date -
shinyAfterBack
: The text displayed at the back of the card near the shiny thing -
type
: Available in case you need to explicitly specify the card type. In most cases this will be inferred for you as the user fills the form, so you won't need to use it. One of the following:- dankort
- discover
- mastercard
- visa
- amex
Missing features towards the intended goals
- Images are inlined using base64, Card uses images created with css.
Planned improvements
- Allow for some way to indicate that a field is invalid, and style appropriately to indicate errors.
- Add more credit card variations, to the extent that Payment supports.
- Maybe inline styles according to facebook's new guidelines, for now the styles are in a separate stylesheet.
- Automated test suite.
Intentional deviations
- There is no intention to port the form or validation part of Card. This is merely for display.
- Flat background colors for the various cards.
- Placeholder symbols are progressively filled while changing the values.
Development
- Clone the repo
- Run npm install
- Run npm start
- Use test/index.html for testing behaviour and display
It was developed on a local webserver so it doesn't come with any server tools. If someone wants to add a more fleshed out build/testing process (gulp/grunt/webpack) it's very much welcome.
Most of the credit goes to @jessepollak for creating and mantaining Card, I just ported it over.


Psalms 37:24
Though he fall, he shall not be utterly cast down: for the LORD upholdeth him with his hand.


Bounding Box module.
MIT. See LICENSE for full details.
These are common commands that apply to all widgets that have them injected.
Get the bounding box of a character in the text.
An int array representing the bounding box in pixels.


About this project
theschoolofathens is open source. It lives here.
Why?
Philosophers don't think in isolation. They draw from their peers' work to make their own contribution, creating a web of ideas. The goal of this project was to make this visible using data analysis and visualization techniques.
This was inspired in part by similar work:
In this very nice article, Simon Raper shows how he graphed the history of philosophy using philosopher's Wikipedia bio, in particular the "influenced" section. He notes that the graph could be improved by taking into account indirect influences rather than just direct ones, which is what I tried here.
This project by Deniz Cem Önduygu is quite different in nature, as the visualized information was compiled all by hand (which is amazing).
How?
Scraping the data
Using the alphabetic index of philosophers as a starting point, I parsed the "bio card" to get information about a philosopher and their influences. To uniquely identify a philosopher, I used Wikipedia's pageid, as urls were often not unique. Normalizing birth dates turned out to be a bit tricky. It's not obvious how to express "500BC" in an amount of milliseconds since 1970. I settled for a conversion of birth date string -> datetime64 -> 64bit signed integer of seconds before / after 1970.
Building the graph of philosophers
After filtering some bad data points I found myself with a list of philosophers and their influences, which could quite easily be turned into a directed graph. I used the PageRank algorithm to get a measure of centrality for each node aka philosopher in the graph and stored the output as JSON.
Visualization
The final step was to visualize the graph and its centrality scores in a d3.js force-directed graph. A nice property of these graphs is that connected nodes are automatically drawn to each other, which leads to a natural clustering. Also its quite fun to drag around nodes.
Disclaimer
This visualization carries quite some bias. The bias of looking only at the English Wikipedia, the bias of looking only at philosophers with nicely scrapable bios, the bias of the algorithm and hyperparameters used for calculating centrality scores and lastly the noise added by my erratic Python programming. If you still want to use it to draw conclusions like "Plato is #1 I knew it!!", go ahead.
References & Credit
This project uses
- Wikipedia as its data source
- scrapy for scraping
- networkx for calculating centrality scores
- d3.js for rendering the force-directed graph and axis
- materialize for some UI elements
The background is the famous painting "The School of Athens" by Raphael. The image is from here.


Google Code offered in: English - Español - 日本語 - 한국어 - Português - Pусский - 中文(简体) - 中文(繁體)
At this point, you've created the initial implementation of the StockWatcher application, simulating stock data in the client-side code.
In this section, you'll deploy this application on Google App Engine. Also, you'll learn about some of the App Engine service APIs and use them to personalize the StockWatcher application so that users can log into their Google Account and retrieve their list of stocks.
This tutorial builds on the GWT concepts and the StockWatcher application created in the Getting Started tutorial. It also uses techniques covered in the GWT RPC tutorial. If you have not completed these tutorials and are familiar with basic GWT concepts, you can import the StockWatcher project as coded to this point.
Sign up for an App Engine account. After your account is activated, sign in and create an application. Make a note of the application ID you choose because you will need this information when you configure the StockWatcher project. After you've finished with this tutorial you will be able to reuse this application ID for other applications.
If you plan to use Eclipse, you can download the App Engine SDK with the Google Plugin for Eclipse. Or download the App Engine SDK for Java separately.
If you initially created your StockWatcher Eclipse project using the Google Plugin for Eclipse with both GWT and Google App Engine enabled, your project is already ready to run on App Engine. If not:
WEB-INF/lib
directory automatically.
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application><!-- Your App Engine application ID goes here --></application>
<version>1</version>
</appengine-web-app>
Substitute your App Engine application ID on the second line. Read more about appengine-web.xml.
<?xml version="1.0" encoding="utf-8"?>
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
<persistence-manager-factory name="transactions-optional">
<property name="javax.jdo.PersistenceManagerFactoryClass" value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
<property name="javax.jdo.option.ConnectionURL" value="appengine"/>
<property name="javax.jdo.option.NontransactionalRead" value="true"/>
<property name="javax.jdo.option.NontransactionalWrite" value="true"/>
<property name="javax.jdo.option.RetainValues" value="true"/>
<property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
</persistence-manager-factory>
</jdoconfig>
You will refrence this configuration later by its name "transactions-optional". Read more about jdoconfig.xml.
<!-- Configure path to GWT SDK -->
<property name="gwt.sdk" location="Path to GWT" />
<!-- Configure path to App Engine SDK -->
<property name="appengine.sdk" location="Path to App Engine SDK" />
<path id="project.class.path">
<pathelement location="war/WEB-INF/classes"/>
<pathelement location="${gwt.sdk}/gwt-user.jar"/>
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar"/>
<!-- Add any additional non-server libs (such as JUnit) -->
<fileset dir="war/WEB-INF/lib" includes="**/*.jar"/>
</path>
<path id="tools.class.path">
<path refid="project.class.path"/>
<pathelement location="${appengine.sdk}/lib/appengine-tools-api.jar"/>
<fileset dir="${appengine.sdk}/lib/tools">
<include name="**/asm-*.jar"/>
<include name="**/datanucleus-enhancer-*.jar"/>
</fileset>
</path>
<target name="libs" description="Copy libs to WEB-INF/lib">
<mkdir dir="war/WEB-INF/lib" />
<copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" />
<!-- Add any additional server libs that need to be copied -->
<copy todir="war/WEB-INF/lib" flatten="true">
<fileset dir="${appengine.sdk}/lib/user" includes="**/*.jar"/>
</copy>
</target>
<target name="javac" depends="libs" description="Compile java source">
<mkdir dir="war/WEB-INF/classes"/>
<javac srcdir="src" includes="**" encoding="utf-8"
destdir="war/WEB-INF/classes"
source="1.5" target="1.5" nowarn="true"
debug="true" debuglevel="lines,vars,source">
<classpath refid="project.class.path"/>
</javac>
<copy todir="war/WEB-INF/classes">
<fileset dir="src" excludes="**/*.java"/>
</copy>
<taskdef
name="datanucleusenhancer"
classpathref="tools.class.path"
classname="org.datanucleus.enhancer.tools.EnhancerTask" />
<datanucleusenhancer
classpathref="tools.class.path"
failonerror="true">
<fileset dir="war/WEB-INF/classes" includes="**/*.class" />
</datanucleusenhancer>
</target>
<target name="devmode" depends="javac" description="Run development mode""> <java failonerror="true" fork="true" classname="com.google.gwt.dev.DevMode""> <classpath> <pathelement location="src"/> <path refid="project.class.path"/> <path refid="tools.class.path"/> </classpath> <jvmarg value="-Xmx256M"/> <arg value="-startupUrl"/> <arg value="StockWatcher.html"/> <!-- Additional arguments like -style PRETTY or -logLevel DEBUG --> <arg value="-server"/> <arg value="com.google.appengine.tools.development.gwt.AppEngineLauncher"/> <arg value="com.google.gwt.sample.stockwatcher.StockWatcher"/> </java> </target>
We will run the application in GWT development mode to verify the project was set up successfully. However, instead of using the servlet container which comes with GWT, the application will run in the App Engine development server, the servlet container which comes with the App Engine SDK. What's the difference? The App Engine development server is configured to mimic the App Engine production environment.
ant devmode
Now that we've verified the StockWatcher project is running locally in GWT development mode and with the App Engine development server, we can run the application on App Engine.
Compile the application by executing:
ant build
Tip: Add the ant bin directory to your environment PATH to avoid having to specify the full path to ant.
appcfg is a command-line tool which comes with the App Engine SDKs. Upload the application by executing:
appcfg.sh update war
From the Windows command prompt, the command is appcfg update war
. The first parameter is the action to perform. The second parameter is the directory with the update, which in this case is a relative directory containing the static files and output from the GWT compiler. Enter your Google Accounts email and password when prompted.
Tip: Add the App Engine SDK bin directory to your environment PATH to avoid having to specify the full path to appcfg.sh.
Test your uploaded application by opening a web browser to http://application-id.appspot.com/ where application-id is the App Engine application ID that you created earlier. The StockWatcher application is now running on App Engine under your application ID.
Now that the StockWatcher is deployed on App Engine, we can start using some of the available services to enrich the application. We'll start by persisting stock quote listings on a per user basis. This is possible due to the datastore service, which allows us to save application data, as well as the User Service, which allows us to have users login and save stock quote listings for each user. For persistence, we'll use the Java Data Objects (JDO) interface provided by the App Engine SDK.
To implement login functionality we'll use the User Serivce. With this service in place, any user with a Google Account will be able to login using their account to access the StockWatcher application. In this section, you'll use the App Engine User API to add user login to the application.
The App Engine User Service is very easy to use. First, you need to instantiate the UserService class, as shown in the code snippet below:
UserService userService = UserServiceFactory.getUserService();
Next, you need to get the current user who is accessing the StockWatcher application:
User user = userService.getCurrentUser();
The UserService returns an instantiated User object if the current user who is accessing the application is logged into their Google Account. The User object contains useful information such as the email address associated with the account, as well as the account nickname. If the person accessing the application is not logged into their account, or doesn't have a Google Account, the returned User object will be null. In this case we have a number of options available to us in how we want to handle the situation, but for the purposes of the StockWatcher application, we will point the user to a login URL where they will be able to log into their Google Account.
The User API offers an easy way to generate the login URL. Simply calling the UserService createLoginURL(String requestUri)
method, which gives you the redirect login URL to send the user to the Google Account login screen. Once they log in, the App Engine container will know where to redirect the user based on the requestUri
that you provide when making the createLoginURL()
call.
To make this more concrete, let's create a login RPC service for the StockWatcher application. If you're not familiar with GWT RPC, see the previous tutorial.
First, create the LoginInfo object which will contain the login info from the User service.
package com.google.gwt.sample.stockwatcher.client; import java.io.Serializable; public class LoginInfo implements Serializable { private boolean loggedIn = false; private String loginUrl; private String logoutUrl; private String emailAddress; private String nickname; public boolean isLoggedIn() { return loggedIn; } public void setLoggedIn(boolean loggedIn) { this.loggedIn = loggedIn; } public String getLoginUrl() { return loginUrl; } public void setLoginUrl(String loginUrl) { this.loginUrl = loginUrl; } public String getLogoutUrl() { return logoutUrl; } public void setLogoutUrl(String logoutUrl) { this.logoutUrl = logoutUrl; } public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String emailAddress) { this.emailAddress = emailAddress; } public String getNickname() { return nickname; } public void setNickname(String nickname) { this.nickname = nickname; } }
LoginInfo is serializable since it is the return type of an RPC method.
Next, create the LoginService and LoginServiceAsync interfaces.
package com.google.gwt.sample.stockwatcher.client; import com.google.gwt.user.client.rpc.RemoteService; import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; @RemoteServiceRelativePath("login") public interface LoginService extends RemoteService { public LoginInfo login(String requestUri); }
The path annotation "login" will be configured below.
package com.google.gwt.sample.stockwatcher.client; import com.google.gwt.user.client.rpc.AsyncCallback; public interface LoginServiceAsync { public void login(String requestUri, AsyncCallback<LoginInfo> async); }
Create the LoginServiceImpl class in the com.google.gwt.sample.stockwatcher.server package as follows:
package com.google.gwt.sample.stockwatcher.server; import com.google.appengine.api.users.User; import com.google.appengine.api.users.UserService; import com.google.appengine.api.users.UserServiceFactory; import com.google.gwt.sample.stockwatcher.client.LoginInfo; import com.google.gwt.sample.stockwatcher.client.LoginService; import com.google.gwt.user.server.rpc.RemoteServiceServlet; public class LoginServiceImpl extends RemoteServiceServlet implements LoginService { public LoginInfo login(String requestUri) { UserService userService = UserServiceFactory.getUserService(); User user = userService.getCurrentUser(); LoginInfo loginInfo = new LoginInfo(); if (user != null) { loginInfo.setLoggedIn(true); loginInfo.setEmailAddress(user.getEmail()); loginInfo.setNickname(user.getNickname()); loginInfo.setLogoutUrl(userService.createLogoutURL(requestUri)); } else { loginInfo.setLoggedIn(false); loginInfo.setLoginUrl(userService.createLoginURL(requestUri)); } return loginInfo; } }
Lastly, configure the servlet in your web.xml file. The mapping is composed of the rename-to attribute in the GWT module definition (stockwatcher) and the RemoteServiceRelativePath annotation(login). Also, because the greetServlet is not needed for this application, its configuration can be deleted.
<?xml version="1.0" encoding="UTF-8"?> <web-app> <!-- Default page to serve --> <welcome-file-list> <welcome-file>StockWatcher.html</welcome-file> </welcome-file-list> <!-- Servlets --> <servlet> <servlet-name>loginService</servlet-name> <servlet-class>com.google.gwt.sample.stockwatcher.server.LoginServiceImpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>loginService</servlet-name> <url-pattern>/stockwatcher/login</url-pattern> </servlet-mapping> </web-app>
Now that the login RPC service is in place, the last thing to do is to make the call to the service from the StockWatcher entry point class. However, we must consider how the application flow changes now that we've added login functionality. In the previous version of the application, you could load the StockWatcher unconditionally because it didn't require any login. Now that we are requiring user login, we have to change the loading logic a bit.
For one, if the user is already logged in, the application can proceed and load the StockWatcher. If, however, the user is not logged in, we have to redirect them to the login page. Once logged in, they will be redirected back to the StockWatcher host page where we'll need to check once more that they have indeed been authenticated. If the authentication check passes, then we can load the stock watcher.
The key thing to notice is that loading the stock watcher is contingent on the result of the login. This means the logic that loads the StockWatcher must be called only once login has passed. This will require a bit of refactoring. If you're using Eclipse, this will be easy to do. Simply select the code in the StockWatcher onModuleLoad()
method, select the "Refactor" menu, and click on the "Extract Method..." function. From there you can declare the extracted method something suitable, like private void loadStockWatcher()
.
You should end up with something similar to the following:
public void onModuleLoad() { loadStockWatcher(); } private void loadStockWatcher() { // Create table for stock data. stocksFlexTable.setText(0, 0, "Symbol"); stocksFlexTable.setText(0, 1, "Price"); stocksFlexTable.setText(0, 2, "Change"); stocksFlexTable.setText(0, 3, "Remove"); ... }
Now that you've refactored the StockWatcher loading logic to a callable method, we can make the login RPC service call in the onModuleLoad()
method and call the loadStockWatcher()
method when login passes. However, if the user isn't logged in, you'll need to give them some kind of indication that they need to log in to proceed. For this, it makes sense to use a Login panel along with accompanying label and button to instruct the user to proceed to login.
Considering all of these, you should add something similar to the following to your StockWatcher entry point class:
import com.google.gwt.user.client.ui.Anchor; ... private LoginInfo loginInfo = null; private VerticalPanel loginPanel = new VerticalPanel(); private Label loginLabel = new Label("Please sign in to your Google Account to access the StockWatcher application."); private Anchor signInLink = new Anchor("Sign In"); public void onModuleLoad() { // Check login status using login service. LoginServiceAsync loginService = GWT.create(LoginService.class); loginService.login(GWT.getHostPageBaseURL(), new AsyncCallback<LoginInfo>() { public void onFailure(Throwable error) { } public void onSuccess(LoginInfo result) { loginInfo = result; if(loginInfo.isLoggedIn()) { loadStockWatcher(); } else { loadLogin(); } } }); } private void loadLogin() { // Assemble login panel. signInLink.setHref(loginInfo.getLoginUrl()); loginPanel.add(loginLabel); loginPanel.add(signInLink); RootPanel.get("stockList").add(loginPanel); }
Another important point about login functionality is the ability to sign out of the application. This is something you should add to the StockWatcher application as well. Fortunately, the User Service provides us with a logout URL through a similar call as the createLoginURL(String requestUri) method. We can add this to the StockWatcher sample application by adding the following snippets:
private Anchor signInLink = new Anchor("Sign In"); private Anchor signOutLink = new Anchor("Sign Out"); ... private void loadStockWatcher() { // Set up sign out hyperlink. signOutLink.setHref(loginInfo.getLogoutUrl()); // Create table for stock data. stocksFlexTable.setText(0, 0, "Symbol"); stocksFlexTable.setText(0, 1, "Price"); stocksFlexTable.setText(0, 2, "Change"); stocksFlexTable.setText(0, 3, "Remove"); ... // Assemble Main panel. mainPanel.add(signOutLink); mainPanel.add(stocksFlexTable); mainPanel.add(addPanel); mainPanel.add(lastUpdatedLabel);
You can repeat the instructions above to run the application locally or on App Engine.
If you run the application in development mode with the App Engine development server, the sign in page will allow you to enter any email address (for ease in testing). If you deploy your application to App Engine, the sign in page will require users to sign in to a Google Account in order to access the application.
The datastore service available to the App Engine Java runtime is the same service available to the Python runtime. To access this service in Java, you may use the low-level datastore API, Java Data Objects (JDO), or Java Persistence API (JPA). For this sample we will use JDO.
We will create a basic stock service to handle the persistence of users' stocks. We will also expose this service as a GWT RPC service.
package com.google.gwt.sample.stockwatcher.client; import com.google.gwt.user.client.rpc.RemoteService; import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; @RemoteServiceRelativePath("stock") public interface StockService extends RemoteService { public void addStock(String symbol) throws NotLoggedInException; public void removeStock(String symbol) throws NotLoggedInException; public String[] getStocks() throws NotLoggedInException; }
package com.google.gwt.sample.stockwatcher.client; import com.google.gwt.user.client.rpc.AsyncCallback; public interface StockServiceAsync { public void addStock(String symbol, AsyncCallback<Void> async); public void removeStock(String symbol, AsyncCallback<Void> async); public void getStocks(AsyncCallback<String[]> async); }
public class StockWatcher implements EntryPoint { private static final int REFRESH_INTERVAL = 5000; // ms private VerticalPanel mainPanel = new VerticalPanel(); private FlexTable stocksFlexTable = new FlexTable(); private HorizontalPanel addPanel = new HorizontalPanel(); private TextBox newSymbolTextBox = new TextBox(); private Button addStockButton = new Button("Add"); private Label lastUpdatedLabel = new Label(); private ArrayListstocks = new ArrayList (); private LoginInfo loginInfo = null; private VerticalPanel loginPanel = new VerticalPanel(); private Label loginLabel = new Label("Please sign in to your Google Account to access the StockWatcher application."); private Anchor signInLink = new Anchor("Sign In"); private final StockServiceAsync stockService = GWT.create(StockService.class);
A checked exception will indicate that the user is not logged in yet. Such a scenario is possible since a RPC call can be received by the stock service even if there is no current user. The class is serializable so that it may be returned by the RPC call via the AsyncCallback onFailure(Throwable error)
method. You could also implement security with a servlet filter or Spring security.
package com.google.gwt.sample.stockwatcher.client; import java.io.Serializable; public class NotLoggedInException extends Exception implements Serializable { public NotLoggedInException() { super(); } public NotLoggedInException(String message) { super(message); } }
The Stock class is what is persisted with JDO. The specifics of how it is persisted are dictated by the JDO annotations. In particular:
id
attribute for storing its primary key.
package com.google.gwt.sample.stockwatcher.server; import java.util.Date; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; import com.google.appengine.api.users.User; @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Stock { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long id; @Persistent private User user; @Persistent private String symbol; @Persistent private Date createDate; public Stock() { this.createDate = new Date(); } public Stock(User user, String symbol) { this(); this.user = user; this.symbol = symbol; } public Long getId() { return this.id; } public User getUser() { return this.user; } public String getSymbol() { return this.symbol; } public Date getCreateDate() { return this.createDate; } public void setUser(User user) { this.user = user; } public void setSymbol(String symbol) { this.symbol = symbol; } }
This class implements the stock service and includes calls to the JDO API for persisting stock data. Things to notice:
package com.google.gwt.sample.stockwatcher.server; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.jdo.JDOHelper; import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManagerFactory; import javax.jdo.Query; import com.google.appengine.api.users.User; import com.google.appengine.api.users.UserService; import com.google.appengine.api.users.UserServiceFactory; import com.google.gwt.sample.stockwatcher.client.NotLoggedInException; import com.google.gwt.sample.stockwatcher.client.StockService; import com.google.gwt.user.server.rpc.RemoteServiceServlet; public class StockServiceImpl extends RemoteServiceServlet implements StockService { private static final Logger LOG = Logger.getLogger(StockServiceImpl.class.getName()); private static final PersistenceManagerFactory PMF = JDOHelper.getPersistenceManagerFactory("transactions-optional"); public void addStock(String symbol) throws NotLoggedInException { checkLoggedIn(); PersistenceManager pm = getPersistenceManager(); try { pm.makePersistent(new Stock(getUser(), symbol)); } finally { pm.close(); } } public void removeStock(String symbol) throws NotLoggedInException { checkLoggedIn(); PersistenceManager pm = getPersistenceManager(); try { long deleteCount = 0; Query q = pm.newQuery(Stock.class, "user == u"); q.declareParameters("com.google.appengine.api.users.User u"); List<Stock> stocks = (List<Stock>) q.execute(getUser()); for (Stock stock : stocks) { if (symbol.equals(stock.getSymbol())) { deleteCount++; pm.deletePersistent(stock); } } if (deleteCount != 1) { LOG.log(Level.WARNING, "removeStock deleted "+deleteCount+" Stocks"); } } finally { pm.close(); } } public String[] getStocks() throws NotLoggedInException { checkLoggedIn(); PersistenceManager pm = getPersistenceManager(); List<String> symbols = new ArrayList<String>(); try { Query q = pm.newQuery(Stock.class, "user == u"); q.declareParameters("com.google.appengine.api.users.User u"); q.setOrdering("createDate"); List<Stock> stocks = (List<Stock>) q.execute(getUser()); for (Stock stock : stocks) { symbols.add(stock.getSymbol()); } } finally { pm.close(); } return (String[]) symbols.toArray(new String[0]); } private void checkLoggedIn() throws NotLoggedInException { if (getUser() == null) { throw new NotLoggedInException("Not logged in."); } } private User getUser() { UserService userService = UserServiceFactory.getUserService(); return userService.getCurrentUser(); } private PersistenceManager getPersistenceManager() { return PMF.getPersistenceManager(); } }
Now that the GWT RPC service is implemented, we'll make sure the servlet container knows about it. The mapping /stockwatcher/stock is composed of the rename-to attribute in the GWT module definition (stockwatcher) and the RemoteServiceRelativePath annotation (stock).
<?xml version="1.0" encoding="UTF-8"?> <web-app> <!-- Default page to serve --> <welcome-file-list> <welcome-file>StockWatcher.html</welcome-file> </welcome-file-list> <!-- Servlets --> <servlet> <servlet-name>loginService</servlet-name> <servlet-class>com.google.gwt.sample.stockwatcher.server.LoginServiceImpl</servlet-class> </servlet> <servlet> <servlet-name>stockService</servlet-name> <servlet-class>com.google.gwt.sample.stockwatcher.server.StockServiceImpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>loginService</servlet-name> <url-pattern>/stockwatcher/login</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>stockService</servlet-name> <url-pattern>/stockwatcher/stock</url-pattern> </servlet-mapping> </web-app>
When the StockWatcher application loads, it should be prepopulated with the user's stocks. In order to reuse the existing code which displays a stock, we will refactor StockWatcher addStock()
so that the logic for displaying the new stock is in a new displayStock(String symbol)
method.
private void addStock() {
final String symbol = newSymbolTextBox.getText().toUpperCase().trim();
newSymbolTextBox.setFocus(true);
// Stock code must be between 1 and 10 chars that are numbers, letters, or dots.
if (!symbol.matches("^[0-9a-zA-Z\\.]{1,10}$")) {
Window.alert("'" + symbol + "' is not a valid symbol.");
newSymbolTextBox.selectAll();
return;
}
newSymbolTextBox.setText("");
// Don't add the stock if it's already in the table.
if (stocks.contains(symbol))
return;
displayStock(symbol);
}
private void displayStock(final String symbol) {
// Add the stock to the table.
int row = stocksFlexTable.getRowCount();
stocks.add(symbol);
stocksFlexTable.setText(row, 0, symbol);
stocksFlexTable.setWidget(row, 2, new Label());
stocksFlexTable.getCellFormatter().addStyleName(row, 1, "watchListNumericCol
umn");
stocksFlexTable.getCellFormatter().addStyleName(row, 2, "watchListNumericCol
umn");
stocksFlexTable.getCellFormatter().addStyleName(row, 3, "watchListRemoveColu
mn");
// Add a button to remove this stock from the table.
Button removeStockButton = new Button("x");
removeStockButton.addStyleDependentName("remove");
removeStockButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
int removedIndex = stocks.indexOf(symbol);
stocks.remove(removedIndex);
stocksFlexTable.removeRow(removedIndex + 1);
}
});
stocksFlexTable.setWidget(row, 3, removeStockButton);
// Get the stock price.
refreshWatchList();
}
After the stock table is set up is an appropriate time to load the stocks.
private void loadStockWatcher() {
...
stocksFlexTable.setCellPadding(5);
stocksFlexTable.addStyleName("watchList");
stocksFlexTable.getRowFormatter().addStyleName(0, "watchListHeader");
stocksFlexTable.getCellFormatter().addStyleName(0, 1, "watchListNumericColumn");
stocksFlexTable.getCellFormatter().addStyleName(0, 2, "watchListNumericColumn");
stocksFlexTable.getCellFormatter().addStyleName(0, 3, "watchListRemoveColumn");
loadStocks();
...
}
The loadStocks()
method calls the StockService defined earlier. The RPC returns an array of stock symbols, which are displayed individually using the method displayStock(String symbol)
.
private void loadStocks() {
stockService.getStocks(new AsyncCallback<String[]>() {
public void onFailure(Throwable error) {
}
public void onSuccess(String[] symbols) {
displayStocks(symbols);
}
});
}
private void displayStocks(String[] symbols) {
for (String symbol : symbols) {
displayStock(symbol);
}
}
Instead of just displaying stocks when they are added, we will call the StockService to save the new stock symbol to the datastore.
private void addStock() { final String symbol = newSymbolTextBox.getText().toUpperCase().trim(); newSymbolTextBox.setFocus(true); // Stock code must be between 1 and 10 chars that are numbers, letters, or dots. if (!symbol.matches("^[0-9a-zA-Z\\.]{1,10}$")) { Window.alert("'" + symbol + "' is not a valid symbol."); newSymbolTextBox.selectAll(); return; } newSymbolTextBox.setText(""); // Don't add the stock if it's already in the table. if (stocks.contains(symbol)) return; displayStock(symbol); addStock(symbol); } private void addStock(final String symbol) { stockService.addStock(symbol, new AsyncCallback<Void>() { public void onFailure(Throwable error) { } public void onSuccess(Void ignore) { displayStock(symbol); } }); } private void displayStock(final String symbol) { // Add the stock to the table. int row = stocksFlexTable.getRowCount(); stocks.add(symbol); ... }
And instead of simply removing stocks from display, we will call the StockService to remove the stock symbol from the datastore.
private void displayStock(final String symbol) { ... // Add a button to remove this stock from the table. Button removeStock = new Button("x"); removeStock.addStyleDependentName("remove"); removeStock.addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event) { removeStock(symbol); } }); stocksFlexTable.setWidget(row, 3, removeStock); // Get the stock price. refreshWatchList(); } private void removeStock(final String symbol) { stockService.removeStock(symbol, new AsyncCallback<Void>() { public void onFailure(Throwable error) { } public void onSuccess(Void ignore) { undisplayStock(symbol); } }); } private void undisplayStock(String symbol) { int removedIndex = stocks.indexOf(symbol); stocks.remove(removedIndex); stocksFlexTable.removeRow(removedIndex+1); }
When one of the RPC calls results in an error, we want to display the message to the user.
Furthermore, recall that the StockService throws a NotLoggedInException if for some reason the user is no longer logged in to his Google Account:
private void checkLoggedIn() throws NotLoggedInException { if (getUser() == null) { throw new NotLoggedInException("Not logged in."); } }
If we receive this error, we will redirect the user to the logout URL.
Here's a helper method to accomplish these two error handling requirements.
private void handleError(Throwable error) {
Window.alert(error.getMessage());
if (error instanceof NotLoggedInException) {
Window.Location.replace(loginInfo.getLogoutUrl());
}
}
We can add this to each AsyncCallback onFailure(Throwable error)
method.
loginService.login(GWT.getHostPageBaseURL(), new AsyncCallback<LoginInfo>() {
public void onFailure(Throwable error) {
handleError(error);
}
...
}
stockService.getStocks(new AsyncCallback<String[]>() {
public void onFailure(Throwable error) {
handleError(error);
}
...
});
stockService.addStock(symbol, new AsyncCallback<Void>() {
public void onFailure(Throwable error) {
handleError(error);
}
...
});
stockService.removeStock(symbol, new AsyncCallback<Void>() {
public void onFailure(Throwable error) {
handleError(error);
}
...
});
You can repeat the instructions above to run the application locally or on App Engine.
If you encounter runtime errors, examine the logs in the App Engine Administration Console.
Users can now sign in to Google Account and manage their own stock lists in the StockWatcher application running on App Engine. Here are some suggested enhancements you can try as exercises:
The App Engine Java Getting Started tutorial gives more details on building an App Engine application including topics such as creating a project from scratch, using JSPs, managing different application versions, and more details on the web application descriptor files.
The App Engine Java documentation covers the User service and datastore service in greater detail. In particular, it documents how to use JPA to access the datastore service. Other services documented include Memcache, HTTP client, and, Java Mail. The limitations of the App Engine Java runtime are also itemized.