public abstract class Intercom
extends java.lang.Object
Intercom is your direct line of communication to every user, right inside your app. Intercom's in-app messages are up to 10 times more effective than email too! Send the right messages, to the right users, at exactly the right time.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Intercom.LogLevel |
static class |
Intercom.Visibility |
| Modifier and Type | Field and Description |
|---|---|
static Intercom.Visibility |
GONE |
static java.lang.String |
PUSH_RECEIVER |
static Intercom.Visibility |
VISIBLE |
| Constructor and Description |
|---|
Intercom() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addUnreadConversationCountListener(UnreadConversationCountListener listener)
Sets a listener that will be notified when the unread conversation count for the registered user changes.
|
static Intercom |
client()
Provides access to the Intercom client.
|
abstract void |
displayArticle(java.lang.String articleId)
Opens an article.
|
abstract void |
displayCarousel(java.lang.String carouselId)
Displays carousel.
|
abstract void |
displayConversationsList()
Deprecated.
call
displayMessenger() instead |
abstract void |
displayHelpCenter()
Open up your apps help center.
|
abstract void |
displayMessageComposer()
Displays the message composer.
|
abstract void |
displayMessageComposer(java.lang.String initialMessage)
Displays the message composer.
|
abstract void |
displayMessenger()
Displays the Messenger.
|
abstract int |
getUnreadConversationCount()
Gets the number of unread conversations for a user.
|
abstract void |
handlePushMessage()
Handles the opening of an Intercom push message.
|
abstract void |
handlePushMessage(android.app.TaskStackBuilder customStack)
Handles the opening of an Intercom push message.
|
abstract void |
hideMessenger()
Dismisses the Intercom Messenger if it is on screen.
|
static void |
initialize(android.app.Application application,
java.lang.String apiKey,
java.lang.String appId)
Initializes the Intercom singleton.
|
abstract void |
logEvent(java.lang.String name)
Logs an event with a given name.
|
abstract void |
logEvent(java.lang.String name,
java.util.Map<java.lang.String,?> metaData)
Logs an event with a given name and some metadata.
|
abstract void |
logout()
Clears all data from the Intercom SDK.
|
static void |
registerForLaterInitialisation(android.app.Application application)
Begin tracking Activity lifecycle events so that Intercom can be initialized later.
|
abstract void |
registerIdentifiedUser(Registration userRegistration)
Registers an identified user with Intercom.
|
abstract void |
registerUnidentifiedUser()
Registers an unidentified user with Intercom.
|
abstract void |
removeUnreadConversationCountListener(UnreadConversationCountListener listener)
Removes a listener from the collection that receive updates when the unread conversation count changes.
|
abstract void |
reset()
Deprecated.
call
logout() instead |
abstract void |
setBottomPadding(int bottomPadding)
Set the bottom padding of in app messages and the launcher.
|
abstract void |
setInAppMessageVisibility(Intercom.Visibility visibility)
Toggles visibility of in-app messages.
|
abstract void |
setLauncherVisibility(Intercom.Visibility visibility)
Toggles visibility of the launcher view.
|
static void |
setLogLevel(int logLevel)
Set the level of the logger
|
abstract void |
setUserHash(java.lang.String userHash)
Sets the user hash necessary for validation when Identity Verification is enabled.
|
static void |
unregisterForLateInitialisation(android.app.Application application)
Stop tracking Activity lifecycle events.
|
abstract void |
updateUser(UserAttributes userAttributes)
Updates a user in Intercom.
|
public static final Intercom.Visibility VISIBLE
public static final Intercom.Visibility GONE
public static final java.lang.String PUSH_RECEIVER
public static void initialize(android.app.Application application, java.lang.String apiKey, java.lang.String appId)
Initializes the Intercom singleton.
Must be called before trying to access the object with Intercom.client()
application
- Your app's Application objectapiKey
- The Android SDK API key found on the Intercom for Android settings page.appId
- The app ID of your Intercom app.public static void registerForLaterInitialisation(@NonNull android.app.Application application)
Begin tracking Activity lifecycle events so that Intercom can be initialized later.
This must be called in Application.onCreate()
application
- Your app's Application objectpublic static void unregisterForLateInitialisation(@NonNull android.app.Application application)
Stop tracking Activity lifecycle events. This will prevent you from initializing Intercom correctly later.
application
- Your app's Application objectpublic static Intercom client()
Provides access to the Intercom client.
public abstract void registerUnidentifiedUser()
Registers an unidentified user with Intercom.
If you call registerUnidentifiedUser, all activity will be tracked anonymously. If you choose to subsequently identify that user, all that anonymous activity will be merged into the identified user. This means that you will no longer see the anonymous user in Intercom, but rather the identified one.
public abstract void registerIdentifiedUser(Registration userRegistration)
Registers an identified user with Intercom.
In order to keep track of a specific user, you must identify it with a unique user identifier, an email address, or both. By supplying information like this Intercom provides richer user profiles for your users. This is a user ID, supplied by you (e.g. from an existing web service for your product) to represent your user in Intercom, once set it cannot be changed.
userRegistration
- the Registration
for a userpublic abstract void setUserHash(java.lang.String userHash)
Sets the user hash necessary for validation when Identity Verification is enabled.
Identity Verification helps to make sure that conversations between you and your users are kept private and that one user can't impersonate another. If Identity Verification is enabled for your app the messenger will sign all requests going to the Intercom servers with tokens. It requires your mobile application to have its own server which authenticates the app's users and which can store a secret. More information on Identity Verification can be found here.
This should be called before any user registration takes place.
userHash
- A HMAC digest of the user ID or emailpublic abstract void updateUser(UserAttributes userAttributes)
Updates a user in Intercom.
You can send any data you like to Intercom. Typically our customers see a lot of value in sending data that relates to customer development, such as price plan, value of purchases, etc. Once these have been sent to Intercom you can then apply filters based on these attributes.
A detailed list of the fields you can use to update a user is available here
Attributes such as the user email or name can be updated by calling
UserAttributes userAttributes = new UserAttributes.Builder()
.withUserId("1234")
<EMAIL_ADDRESS>.build();
Intercom.client().updateUser(userAttributes);
Custom user attributes can be created and modified by passing a custom_attributes map. You do not have to create attributes in Intercom beforehand. If one hasn't been seen before it will be created for you automatically.
UserAttributes userAttributes = new UserAttributes.Builder()
.withUserId("1234")
<EMAIL_ADDRESS>.withCustomAttribute("team_mates", 3)
.build();
Intercom.client().updateUser(userAttributes);
For multiple user attributes you can chain withCustomAttribute several times or pass a Map to withCustomAttributes
All of the updatable User attributes are described here: ()
You can also set company data via this call by submitting an attribute map like
Company company = new Company.Builder()
.withCompanyId("1234")
.withName("TestCorp")
.build();
UserAttributes userAttributes = new UserAttributes.Builder()
.withCompany(company)
.build();
Intercom.client().updateUser(userAttributes);
All of the updatable Company attributes are described here: ()
Custom attributes may be of type: String, Long, Float, Double, Boolean, Character, Byte, Short, Integer.
userAttributes
- The userAttributes object with the attributes to be set on the user in Intercom.public abstract void logEvent(java.lang.String name)
Logs an event with a given name.
You can log events in Intercom based on user actions in your app. Events are different to custom user attributes in that events are information on what Users did and when they did it, whereas custom user attributes represent the User's current state as seen in their profile. See details about Events here.
name
- The name of the event that it is going to be logged.public abstract void logEvent(java.lang.String name, java.util.Map<java.lang.String,?> metaData)
Logs an event with a given name and some metadata.
Metadata Objects support a few simple types that Intercom can present on your behalf, see the Intercom API docs
Map<String, Object> metadata = new HashMap<>();
Map<String, Object> orderDetails = new HashMap<>();
orderDetails.put("price", 123);
orderDetails.put("reference_value", "3434-3434");
orderDetails.put("url", "https://example.org/orders/3434-3434");
metadata.put("order", orderDetails);
metadata.put("order_date",<PHONE_NUMBER>);
Intercom.client().logEvent("ordered_item", metadata);
name
- The name of the event you wish to track.metaData
- a map of simple types to present to Intercompublic abstract void displayMessenger()
Displays the Messenger.
Opens the Intercom Messenger automatically to the best place for your users.
public abstract void displayMessageComposer()
Displays the message composer.
public abstract void displayMessageComposer(java.lang.String initialMessage)
Displays the message composer.
Open the conversation screen with the composer pre-populated for example:
Intercom.client().displayMessageComposer("Message sent from FAQ screen: ");
Note:
- This only applies when the user is starting a new conversation.
- The text input cursor will start at the end of text passed in.
- This text is editable so the user can delete or modify it.
initialMessage
- Text that will be pre-populated in the composer@Deprecated public abstract void displayConversationsList()
displayMessenger()
insteadDisplays the conversations list.
public abstract void displayHelpCenter()
Open up your apps help center.
public abstract void displayCarousel(java.lang.String carouselId)
Displays carousel.
carouselId
- Id of carousel that will be shown.public abstract void setBottomPadding(int bottomPadding)
Set the bottom padding of in app messages and the launcher.
Setting the bottom padding will increase how far from the bottom of the screen the default launcher and in app messages will appear.
Previously you could add `intercom_bottom_padding` to your `dimens.xml` to set the padding at startup. This should be removed and your should call setBottomPadding instead. `intercom_bottom_padding` will still function for the time being.
You can call setBottomPadding at any time to animate the position of your in-apps and launcher.
bottomPadding
- The amount of pixels to set the bottom paddingpublic abstract void setInAppMessageVisibility(Intercom.Visibility visibility)
Toggles visibility of in-app messages.
Set to Intercom.Visibility.GONE to hide all incoming Intercom messages and message previews in the parts of your app where you do not wish to interrupt users: camera views, parts of a game etc.
visibility
- Intercom.GONE for hidden, Intercom.VISIBLE to showpublic abstract void setLauncherVisibility(Intercom.Visibility visibility)
Toggles visibility of the launcher view.
Set as Intercom.Visibility.GONE to hide the launcher when you don't want it to be visible.
visibility
- Intercom.GONE for hidden, Intercom.VISIBLE to showpublic abstract void hideMessenger()
Dismisses the Intercom Messenger if it is on screen.
public abstract void handlePushMessage()
Handles the opening of an Intercom push message.
This will retrieve the URI from the last Intercom push message.
If the message is an in-app message or reply this will open up the Messenger (Push Notifications).
If the message was an Intercom push message this will follow the URI you provided (Push Messages).
public abstract void handlePushMessage(android.app.TaskStackBuilder customStack)
Handles the opening of an Intercom push message.
This will retrieve the URI from the last Intercom push message.
If the message is an in-app message or reply this will open up the Messenger (Push Notifications).
If the message was an Intercom push message this will follow the URI you provided (Push Messages).
customStack
- provide a TaskStackBuilder to allow for a custom back stack@Deprecated public abstract void reset()
logout()
insteadClears all data from the Intercom SDK.
Reset is used to reset all local caches and user data the Intercom SDK has created. Use this at a time when you wish to log a user out of your app or change a user. Once called, the SDK will no longer communicate with Intercom until a further registration is made.
public abstract void logout()
Clears all data from the Intercom SDK.
Logout is used to clear all local caches and user data the Intercom SDK has created. Use this at a time when you wish to log a user out of your app or change a user. Once called, the SDK will no longer communicate with Intercom until a further registration is made.
public abstract int getUnreadConversationCount()
Gets the number of unread conversations for a user.
public abstract void addUnreadConversationCountListener(@NonNull UnreadConversationCountListener listener)
Sets a listener that will be notified when the unread conversation count for the registered user changes.
This listener will immediately receive an update with the latest unread count, and it will be notified of all
future updates. If you want to know the unread count right now you can use the
getUnreadConversationCount()
method
Multiple listeners may be set. A strong reference is kept to each listener.
listener
- the listener to be notified of unread count updatespublic abstract void removeUnreadConversationCountListener(UnreadConversationCountListener listener)
Removes a listener from the collection that receive updates when the unread conversation count changes.
listener
- the listener to be removedpublic static void setLogLevel(int logLevel)
Set the level of the logger
Set the level of logs to display in the console by passing in an Intercom.LogLevel eg. `setLogLevel(Intercom.LogLevel.ERROR);` Passing in Intercom.LogLevel.DISABLED results in no logs being displayed. Default log level is set to Intercom.LogLevel.WARN
logLevel
- the level of logs to displaypublic abstract void displayArticle(@NonNull java.lang.String articleId)
Opens an article.
Opens an article in a new activity
articleId
- ID of the article


4
4
2
Weapon
Deathrattle:
Return a random friendly minion to your hand. It costs (2) less.
Kobolds informally refer to its effect as a deathwaggle.
Artist: Jason Kang


Library Metadata
A module can contain an optional file which describes the
libraries that it contains. This is located at
meta/libraries.json
. It either contains a single
json object for a single library, or a list or json objects for
any number of libraries.
For example, for a single library:
{ "key": "unordered", "name": "Unordered", "authors": [ "Daniel James" ], "maintainers": [ "Daniel James <dnljms -at- gmail.com>" ], "description": "Unordered associative containers.", "category": [ "Containers" ] }
An example for multiple libraries:
[ { "key": "functional", "name": "Functional", "authors": [ "Mark Rodgers" ], "description": "The Boost.Function library contains a family of class templates that are function object wrappers.", "category": [ "Function-objects" ] }, { "key": "functional/factory", "name": "Functional/Factory", "authors": [ "Tobias Schwinger" ], "maintainers": [ "Tobias Schwinger <tschwinger -at- isonews2.com>" ], "description": "Function object templates for dynamic and static object creation", "documentation": "factory/", "category": [ "Function-objects" ] }, ]
Json fields
key
This is a unique identifier for the library, typically the
path to it from the libs
directory.
name
Human readable name of the library
status
Used for libraries with special statuses, currently can have
value deprecated
for deprecated libraries, and
hidden
for libraries which shouldn't be displayed to
the user.
authors
Either a string, or a list of strings, containing the names of the authors
description
A brief description of what the library does
category
A list of categories that the library belongs to, the full list is below.
documentation
Path to the documentation, defaults to the root of the module.
cxxstd
The minimum C++ standard compilation level at which all, or the large majority, of the functionality in the library is usable. The possible values are:
- 98 = C++98
- 03 = C++98/C++03
- 11 = C++11
- 14 = C++14
- 17 = C++17
- 20 = C++20
The level only indicates the minimum level, which means that the functionality of the library can be used when compiling at that level or at a higher level. There may be some functionality in the library which will need a higher C++ standard compilation level than is indicated by this value, but the information about that specific functionality will be provided for the end-user within the documentation for that library. If a library does not have this field it indicates that the end-user will have to read the library documentation to understand what C++ standard compilation level is needed to use the library.
Available categories
- String
- String and text processing
- Containers
- Containers
- Iterators
- Iterators
- Algorithms
- Algorithms
- Function-objects
- Function objects and higher-order programming
- Generic
- Generic Programming
- Metaprogramming
- Template Metaprogramming
- Preprocessor
- Preprocessor Metaprogramming
- Concurrent
- Concurrent Programming
- Math
- Math and numerics
- Correctness
- Correctness and testing
- Error-handling
- Error handling and recovery
- Data
- Data structures
- Domain
- Domain Specific
- Image-processing
- Image processing
- IO
- Input/Output
- Inter-language
- Inter-language support
- Emulation
- Language Features Emulation
- Memory
- Memory
- Parsing
- Parsing
- Patterns
- Patterns and Idioms
- Programming
- Programming Interfaces
- State
- State Machines
- System
- System
- Miscellaneous
- Miscellaneous
- workarounds
- Broken compiler workarounds


Tempe's Hidden Gems
House of Tricks
Visit House of Tricks, a Tempe staple for over 30 years with their cozy outdoor ambiance, and signature seasonal menu
Casey Moore's
Hit Casey Moore's Oyster House for seafood, pub grub and a night of beer and cocktails with friends, this Tempe staple is a must try!
Alter Ego
Located at the Canopy hotel in Downtown Tempe, Alter Ego provides modern-american fusion cuisine and a must try signature cocktail menu/p>
Doc and Eddys
Grab some wings, and catch the game at this go-to local favorite sports bar, Doc and Eddys!
Fate Brewing Company
With three locations in the valley this local brewpub is the perfect place for lunch on the patio!
The Porch
The Porch is an upscale yet relaxed restaurant with three current locations in Arcadia, Gilbert, and Tempe. Check them out for their lively atmosphere and great food and drink menu.
Tempe Tavern
This rustic-style watering hole in a 1918 dairy barn features a classic pub menu & sports on TV.
Pedal Haus Brewery
Pedal Haus Brewery offers elevated gastro-pub grub, award-winning craft beer and a unique atmosphere that is engaging yet relaxing.


Tighten up your seatbelts, as we embrace our journey towards the most exciting cultural fest of IIT Dhanbad, Srijan 2019! Watch our Srijan 2018 aftermovie.


Appearance depends on your OS
Place focus on textbox and hit Tab key.
Put focus on one of the radio buttons and use Left, Right, Up and Down to navigate.


The XI that Mourinho could play at Tottenham... With Dybala, Bruno and Bale!
by BeSoccerThe newspaper 'The Sun' has already published a possible eleven with which José Mourinho could work in Tottenham soon. Several illustrious names would make up some new signings...
Mourinho has landed in London to take the Spurs' reigns, but he has done so with a few signings in mind. Those footballers who Mauricio Pochettino asked for time after time but who could not be brought in because of the spending in the new stadium ...
Also, although 'The Sun' does not make specific mention of Gareth Bale, there are many voices calling for the return of the Welsh striker. Bale had already impressed the Portuguese coach as a Spurs player and Mourinho wanted him in Manchester United.
While Eriksen ends his contract and seems to be wanted at other destinations (he dreams of Madrid), Tottenham has shown interest in players like Youcef Atal (Nice) and others of very high quality (and not cheap) like Paulo Dybala (Juventus) and Bruno Fernandes (Sporting CP).
The Sun's eleven includes Heung-min Son, who could alternate his position with a Bale whose return is contemplated more than ever by Mourinho's arrival to Spurs. According to 'AS', Mourinho adores Bale as a footballer and will propose him to Daniel Levy, president of the entity.
Here is the XI that Mourinho dreams of:
Hugo Lloris (goalkeeper)
Youcef Atal (central defender)
Davinson Sánchez (central defender)
Juan Foyth (central defender)
Ryan Sessegnon (winger)
Featured links
- BREAKING NEWS: Mourinho replaces Pochettino at Tottenham
- The latest football transfers news and rumours
- Wales, golf, Madrid... in that order
- Luis Enrique returns to Spain national team
Tanguy Ndombele (midfielder)
Giovani Lo Celso (midfielder)
Bruno Fernandes (midfielder)
Paulo Dybala (midfielder)
Harry Kane (striker)
Gareth Bale (delantero)


Huawei SmartScreen adds a 75-inch version for 12,999 yuan ($1828) -
by Efe UdinRate this post
Today, Chinese manufacturing giant, Huawei, released a couple of products including the Huawei MatePad Pro, Huawei Sound X and Huawei MateBook D. In addition, the company also released a new version of the Huawei SmartScreen – a 75-inch version. On September 19, Huawei officially brought a new series of SmartScreens which it claims provides a richer experience than traditional Smart TV.
Huawei’s first SmartScreen is a 65-inch model which comes with a 6999 yuan ($995). Today, Huawei SmarScreen officially joins the 75-inch model. This device adopts a 120-frame high refresh rate screen which enhances picture clarity and smoothness. It supports HDR Boost, enhances video contrast, clears the light and dark levels, and adds Mocha on StarCraft.
The Huawei SmartScreen (75-inch model) overall design is basically the same as the 65-inch version. However, it also adds an AI fitness gesture operation function. Without the remote control, the content on display can be skipped or paused by waving. This makes the smart TV easier to control.
Now, you can cast two mobile phones to the Huawei smart screen simultaneously. This means that we can have two displays on one TV. We can have two games displaying on different halves of the TV. However, the price of the Huawei SmartScreen (75-inch model) is much more expensive than the 65-inch model. It comes with a 12,999 yuan ($1828) price tag and pre-sale will start at 12 o’clock on December 12. The first outright sale/shipment will commence on December 24th.


A storage class defines the scope (visibility) and life-time of variables and/or functions within a C++ Program. These specifiers precede the type that they modify. There are following storage classes, which can be used in a C++ Program
auto
register
static
extern
mutable
The auto storage class is the default storage class for all local variables.
{ int mount; auto int month; }
The example above defines two variables with the same storage class, auto can only be used within functions, i.e., local variables.
The register storage class is used to define local variables that should be stored in a register instead of RAM. This means that the variable has a maximum size equal to the register size (usually one word) and can't have the unary '&' operator applied to it (as it does not have a memory location).
{ register int miles; }
The register should only be used for variables that require quick access such as counters. It should also be noted that defining 'register' does not mean that the variable will be stored in a register. It means that it MIGHT be stored in a register depending on hardware and implementation restrictions.
The static storage class instructs the compiler to keep a local variable in existence during the life-time of the program instead of creating and destroying it each time it comes into and goes out of scope. Therefore, making local variables static allows them to maintain their values between function calls.
The static modifier may also be applied to global variables. When this is done, it causes that variable's scope to be restricted to the file in which it is declared.
In C++, when static is used on a class data member, it causes only one copy of that member to be shared by all objects of its class.
#include <iostream> // Function declaration void func(void); static int count = 10; /* Global variable */ main() { while(count--) { func(); } return 0; } // Function definition void func( void ) { static int i = 5; // local static variable i++; std::cout << "i is " << i ; std::cout << " and count is " << count << std::endl; }
When the above code is compiled and executed, it produces the following result:
i is 6 and count is 9 i is 7 and count is 8 i is 8 and count is 7 i is 9 and count is 6 i is 10 and count is 5 i is 11 and count is 4 i is 12 and count is 3 i is 13 and count is 2 i is 14 and count is 1 i is 15 and count is 0
The extern storage class is used to give a reference of a global variable that is visible to ALL the program files. When you use 'extern' the variable cannot be initialized as all it does is point the variable name at a storage location that has been previously defined.
When you have multiple files and you define a global variable or function, which will be used in other files also, then extern will be used in another file to give reference of defined variable or function. Just for understanding extern is used to declare a global variable or function in another file.
The extern modifier is most commonly used when there are two or more files sharing the same global variables or functions as explained below.
First File: main.cpp
#include <iostream> int count ; extern void write_extern(); main() { count = 5; write_extern(); }
Second File: support.cpp
#include <iostream> extern int count; void write_extern(void) { std::cout << "Count is " << count << std::endl; }
Here, extern keyword is being used to declare count in another file. Now compile these two files as follows:
$g++ main.cpp support.cpp -o write
This will produce write executable program, try to execute write and check the result as follows:
$./write 5
The mutable specifier applies only to class objects, which are discussed later in this tutorial. It allows a member of an object to override constness. That is, a mutable member can be modified by a const member function.


Where can I get some? There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc. Lorem ipsum dolor sit amet consectetur adipisicing elit. Beatae reprehenderit, modi, tempore repudiandae exercitationem neque excepturi, expedita unde tenetur dolore ipsa assumenda accusantium vitae itaque impedit quisquam dolores. Dolor, porro. Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi rerum voluptas similique eligendi, sunt obcaecati deserunt illum, doloribus illo corrupti, quia enim sequi debitis facere qui ab voluptatem natus iure. Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi dicta, temporibus aperiam aspernatur numquam id ipsa ipsam, quasi libero animi quisquam vel, ad laudantium eos culpa nesciunt officiis alias vero. Lorem ipsum dolor, sit amet consectetur adipisicing elit. Officiis doloremque ab doloribus, nam esse numquam nulla nostrum sequi quasi eaque saepe porro magnam, sunt maxime fuga maiores modi ex? Numquam.
call to action


Note
This page can be skipped if all that is needed are efficient sorted drop-in replacemnt containers for Python’s sets and dicts.
Consider the following tree, drawn rotated 90 degrees counter-clockwise (the root of the tree is 40, and the leftmost leaf is 3).
/-99
/-96
| \-88
/-73
| | /-64
| \-57
| \-54
| \-52
40
| /-37
| /-34
| | \-29
| | \-28
\-27
| /-24
\-20
\-6
\-3
It is well known that some queries can be supported efficiently by augmenting each node with metadata having the property that the metadata at each node can be calculated from the metadata of its direct children. See the following lecture, or Chapter 14 of Introduction To Algorithms (3rd edition), for the specifics.
E.g., consider the same tree, but with each node augmented by the size of its subtree (shown in square brackets). Then this tree can answer efficiently queries such as what is the ordinal position of this key in the set, or which is the kth key. The size of a node’s subtree can indeed be calculated by the size of the subtrees sizes of the direct children.
/-99 [ 1 ]
/-96 [ 3 ]
| \-88 [ 1 ]
/-73 [ 8 ]
| | /-64 [ 1 ]
| \-57 [ 4 ]
| \-54 [ 2 ]
| \-52 [ 1 ]
40 [ 18 ]
| /-37 [ 1 ]
| /-34 [ 4 ]
| | \-29 [ 2 ]
| | \-28 [ 1 ]
\-27 [ 9 ]
| /-24 [ 1 ]
\-20 [ 4 ]
\-6 [ 2 ]
\-3 [ 1 ]
As another example, here is the same tree, but with each node augmented by the smallest and largest keys in its subtrees (shown as a pair in square brackets). Then, obviously, this tree can answer efficiently what are the smallest and largest keys in the entire tree. Here, too, the relevant information can be calculated directly from that of the direct children.
/-99 [ (99, 99) ]
/-96 [ (88, 99) ]
| \-88 [ (88, 88) ]
/-73 [ (52, 99) ]
| | /-64 [ (64, 64) ]
| \-57 [ (52, 64) ]
| \-54 [ (52, 54) ]
| \-52 [ (52, 52) ]
40 [ (3, 99) ]
| /-37 [ (37, 37) ]
| /-34 [ (28, 37) ]
| | \-29 [ (28, 29) ]
| | \-28 [ (28, 28) ]
\-27 [ (3, 37) ]
| /-24 [ (24, 24) ]
\-20 [ (3, 24) ]
\-6 [ (3, 6) ]
\-3 [ (3, 3) ]
The library comes with a number of predefined classes, as well as the ability to plug in new algorithms.
Using the predefined classes is easy. Simply specify the class as the updator parameter of a set or dict, and its methods become available as those of the set or dict. For example:
>>> t = SortedSet(['hao', 'jiu', 'mei', 'jian'], updator = RankUpdator)
>>> t
SortedSet['hao', 'jian', 'jiu', 'mei'])
>>>
>>> # 'hao' is key no. 0
>>> t.kth(0)
'hao'
>>> t.order('hao')
0
>>>
>>> # 'mei' is key no. 3
>>> t.kth(3)
'mei'
>>> t.order('mei')
3
The kth and order methods of the updator class become part of the set, in this case.
Writing a new updator is probably best understood by an example. Following is a SumUpdator updator class, which provides the additional functionality of asking for the sum of the keys of all keys stored in a set or dict. That is, after writing the class, we will be able to use it as follows:
>>> t = SortedSet(range(4), updator = SumUpdator)
>>> t
SortedSet([0, 1, 2, 3])
>>> t.sum_()
6
Of course, there are simpler ways to track the sum of keys in a container, and this example is just to illustrate the point of writing a new updator.
The entire code of the updator is as follows:
class SumUpdator(object):
class Metadata(object):
def update(self, key, key_fn, l, r):
self.sum = key
for c in [l, r]:
if c is not None:
self.sum += r.sum
def __repr__(self):
return str(self.sum)
def sum_(self):
return 0 if self.root is None else self.root.metadata.sum
It contains two types of entries:
The Metadata Class
The metadata class needs to support a single method, update. This method is called with the following parameters (besides self):
The code of update, in this case, is as follows:
def update(self, key, key_fn, l, r):
self.sum = key
for c in [l, r]:
if c is not None:
self.sum += r.sum
The first line sets the sum using the key parameter. The next three lines add the sums of the children (if any), to the sum.
The sum_ method
Recall that any method appearing in the updator will be adopted by the container. In this case, the code is:
def sum_(self):
return 0 if self.root is None else self.root.metadata.sum
and, as it becomes part of the code of the set or dict, it may access their methods and properties. In this case, the code accesses the root property, to obtain a banyan.Node object. It uses the metadata property of the node to return the sum.
Augmentation does not alter the running time of non-modifying operations (e.g., __contains__), and while it does not change the order of growth of modifying operations, it adds a multiplicative factor. For the predefined classes, the multiplicative factor is small. Due to the dynamic nature of Python, however, pure-Python augmentation incurrs a significant multiplicative factor, and is therefore primarily useful for very large trees. See the Updators Section in the Performance Page.


--- layout: post status: publish published: true title: shutting down cloud server on shivalink.com author: display_name: vishvendra login: vishvendra email<EMAIL_ADDRESS>url: '' author_login: vishvendra author_email<EMAIL_ADDRESS>wordpress_id: 291 wordpress_url: http://vishvendrasingh.com/?p=291 date: '2016-09-08 17:41:50 +0530' date_gmt: '2016-09-08 17:41:50 +0530' categories: - cloud - Common tags: - Cloud - Common comments: [] ---
Hi everyone,
I decided of shutting down cloud server on shivalink.com as I have very low signup. But News Engine and note application are public and free of cost on same domain. I hope it will do you will love them to use


User Persona, Use Story, and Interaction Flow
User Persona
- Name:Dalton Villanueva
- Age:35
- Gender:Male
- Profession:Insurance Agent
- Technology:iPhone X and 5th generation iPad (with a keyboard)
- Attitudes:
- Loves to eat macaroni and cheese
- Wants to find the best restaurant in Albuquerque for macaroni and cheese
- Willing to to try new places just for the macaroni and cheese
- Has eaten at many restaurants in Albuquerque
- Suggests restaurants to friends and family
- Willing to eat meals with clients
- Needs:
- Needs to wind down after a stressful day at work
- Needs to be able to compare restaurants easily
- Needs to learn about restaurants in Albuquerque
User Story:
As a restaurant user, I want to find the best restaurant for mac and cheese in Albuquerque.
Use Case
Dalton is having a lunch meeting with a client to talk over renewing the business insurance policy. He wants
to find the best macaroni and cheese restaurant near the client's business location. Dalton opens up the
That's What Cheese Said web page to look for all the restaurants. Looking at all of the suggestions, he picks
a restaurant that is near the top of the restaurant list and close to the business. Dalton suggests this to
the client and they meet there for lunch.
Interaction Flow
Precondition:Dalton is on the homepage website
Postcondition:Dalton has decided where to eat
Interaction Flow:
- Dalton clicks on Restaurant Ranker
- Server returns list of restaurants in order of popularity
- Dalton clicks on the first restaurant to find its address
- Server returns the restaurant's information including address
- Dalton is not satisfied with the location of this restaurant, so he returns to the list
- Server returns list of restaurants in Albuquerque
- Dalton clicks on the second restaurant in the list.
- Server returns the second restaurant's information including address
- Dalton is satisfied with the location of the restaurant
Frequency of Use:3 Times a week


Reflecting on my learning journey here at EDA and how I plan on achieving my goals.
What is your long term goal and or career pathway?
My long term goal is to become a full stack software developer that can help with the advancement and security of our health care facility in the future. Because thinking of it, our healthcare system here in New Zealand is really behind in terms of technology advancement. We do still use written notes taking that uses lots of papers in our hospitals and some clinics. Its like combining my previous career which is being a Physiotherapist and Web Development at the same time.
What skills (non-technical - human skills) would you like to see developed in yourself while at EDA?
I would really like to develop my confidence, and the way I communicate with people and other team members. I grew up with a really shy personality and I would like to work on that, so that I can freely speak my thoughts without reservations and hesitations so that there will be no miscommunication and missed opportunity to do better.
A description of your own strengths and limitations.
I can say that I'm a quick learner, adaptable, I'm also a good listener and can work with different people with different backgrounds and culture, open to changes and criticisms good or bad. I can also say that I really practice the art of multi tasking well. And know what a good customer support and service is so that I can really help with improving user experience in everything I do. Knowledge in healthcare and banking that can be of used in the future.
LIMITATIONS:
One of the limitations that I can think of is really being shy and always afraid to speak my mind in discussions.
Based on the above description, a commitment to how you will manage your workload in this programme. This should include - an explanation of how you will manage yourself to work productively and safely with other learners, facilitators and industry/community representatives.
In having the commitment to manage my workload while at EDA I reckon one thing that's need to be essential is your time management skills. That should be a priority specially with flipped classes that we are practicing here in EDA. Having to time yourself with every learning exercise is a good practice as well. Destressing while doing mindfulness activities will also increase productivity in my EDA journey
A commitment as to how and where you will seek help in a timely way.
If I can't really find the solutions on my own and have used all my resources I reckon the best person to ask for help is my facilitator. I can also use the slack channel in code held desk so that other cohort members can provide me with the idea on what I can possible look for, for the solutions I would like to have.
I really do like how the facilitation team is easy to talk to and friendly at the same time especially when I find it hard to understand some terms and jargons in development. And one thought or idea that I can suggest to them is to have like a list of development jargons and terms that can be provided to the students who really don’t have any learning experience with this career.
Any scheduling information such as block-out times when you are committed to other things. For example, you might have whanau commitments such as school drop-offs. It’s important to plan these in.
Prior in enrolling with EDA I have already planned out and cleaned out all my schedule so that I can focused on my learning in the Foundations and also in Bootcamp. The only thing that is out of plan and also didn't expect is that having myself pregnant within the course but having known about it before the foundation start I have properly arrange all necessary schedule so that it will not interfere with any commitments. I planned out to work for a 40 hrs a week with foundations dividing it into different times per day for the week. By this I'm also making sure that it is beneficial for me and my safety as an expectant mum.


{% extends "base.html" %}
{% block content %}
{{ user.get_profile.user_type|title }} Dashboard
Questions assigned to you needing a patient callback:
{% if callback_qs %}
{% else %}
No questions assigned to you in need of patient callbacks.
{% endif %}
Questions assigned to you needing a translation:
{% if translate_qs %}
{% else %}
No questions assigned to you awaiting translation.
{% endif %}
Unclaimed questions in need of translators:
{% if available_qs %}
{% else %}
No unclaimed questions in need of translators.
{% endif %}
{% endblock %}


Now that we know how to work with spherical harmonic coefficient and grid classes, let's move on to the other major feature of pyshtools: localization windows and spectral analysis. pyshtools allows for localized spectral analyses using either spherical-cap localization windows or localization windows constructed from an arbitrary mask. As with our examples in the previous notebook, a single class, SHWindow
, bundles the relevant shtools functions. Here, we will demonstrate how to construct optimal localization windows, and how to obtain localized spectral estimates for arbitrary regions on the sphere.
To demonstrate the localized spectral analysis routines, we will make use of a pathological data set. In particular, we will construct a function on the sphere whose power spectrum is different in the northern and southern hemispheres. First, import the standard modules:
%matplotlib inline
from __future__ import print_function # only necessary if using Python 2.x
import matplotlib.pyplot as plt
import numpy as np
import pyshtools
Next, create two grids using random coefficients that have power spectra following power laws of -2 and -3, up to and including degree 300:
ldata = 300
degrees = np.arange(ldata+1, dtype=float)
degrees[0] = np.inf
power_north = degrees**(-2)
power_south = degrees**(-3)
clm_north = pyshtools.SHCoeffs.from_random(power_north)
grid_north = clm_north.expand()
clm_south = pyshtools.SHCoeffs.from_random(power_south)
grid_south = clm_south.expand()
Next, create a new grid that contains data from the northern hemisphere of one grid and the southern hemisphere of the other. The SHGrid
method from_array()
returns a copy of the data, so you don't need to worry about modifying the original data set:
grid = pyshtools.SHGrid.from_array(grid_north.data)
nlat = grid_north.nlat
grid.data[nlat//2:nlat+1,:] = grid_south.data[nlat//2:nlat+1,:].copy()
fig, ax = grid.plot()
clm = grid.expand()
Here, we made use of the grid attribute nlat
, which is the number of rows of the gridded data, and we modified the raw gridded data for grid
that is stored in the data
class attribute.
Next, let's construct some spherical-cap localization windows. This is done using the constructor from_cap()
that is associated with the SHWindow
class. The other option, as we will demonstrate later, is from_mask()
and takes as input a user defined mask. For spherical-cap windows, we need to specify both the angular radius of the cap and its spherical harmonic bandwidth, and for this example we will use an angular radius of 30 degrees and a bandwidth of 29.
capwin = pyshtools.SHWindow.from_cap(theta=30., lwin=29)
This command calculates the spherical harmonic coefficients of the spherical cap windows along with their associated angular orders and concentration factors. If you ever need to access these directly, they are stored in the class attributes tapers
, orders
and eigenvalues.
By default, theta
should be provided in degrees, but this can be input in radians by specifying the optional parameter theta_degrees=False
. If you are curious to see what these windows look like, you can plot them using the built in method plot_windows()
. Let's plot the first 35:
fig, axes = capwin.plot_windows(35)
As is seen, the windows are centered at the north pole, the concentration factor is noted above the window, and almost all of these windows are very well localized. If you want to know how many windows have concentration factors larger than a specified value, you can use the method number_concentrated()
:
capwin.number_concentrated(0.99)
If you are really curious about the windows, you can return an SHGrid
class instance of an individual window using the method to_shgrid()
, you can return the spherical harmonic coefficients of individual windows using to_array()
and to_shcoeffs()
, and you can also return as a numpy array the power spectra of one or more windows using the method spectra()
. If you want to plot the power spectra of the windows, this can be done using the built in method plot_spectra()
:
fig, axes = capwin.plot_spectra(15)
In general, we will not perform localized spectral analyses at the north pole, so let's rotate the windows so that they are centered at 45 degrees north and 90 degrees east. This is easily accomplished using the rotate()
method. To speed things up, we will rotate only the first 50 best localized windows, and not all 900 of them:
capwin.rotate(clat=45., clon=90., nwinrot=50)
fig, axes = capwin.plot_windows(15)
In rotating the windows, the spherical harmonic coefficients of the initial tapers
centered at the north pole are not modified, but a second set of rotated coefficients are created and stored in the attribute coeffs
. If you ever forget how you constructed your windows, you can always use the info()
method to print out all the metadata:
capwin.info()
Next, let's calculate the localized power spectrum at two different locations, one in the northern hemisphere and the other in the southern hemisphere. We will use all 34 windows that have concentration factors greater than 0.99:
k = capwin.number_concentrated(0.99)
mtse_north, sd_north = capwin.multitaper_spectrum(clm, k)
mtse_south, sd_south = capwin.multitaper_spectrum(clm, k, clat=-55., clon=90.)
If you don't provide the central latitude and longitude of the analysis with the parameters clat
and clon
, the coefficients that were created previously using the rotate()
method will be employed. If these coefficients are not available, the analysis will be performed at the north pole.
multitaper_spectrum
returns a power spectrum whose maximum degree is ldata - lwin
. This is because localized degrees beyond this limit depend upon coefficients of the global data beyond ldata
, and these are not known. If the global function was truly zero beyond ldata
, you could simply construct the spherical harmonic coefficients of clm
to have zeros beyond that degree.
When a function is multiplied by a window, the power spectrum of the localized function is modified. For the case of stationary and random data, the expectation of this biasing effect can be estimated using two methods. First, we could calculate the "coupling matrix" using the method coupling_matrix()
. The expectation of the windowed power spectrum is then simply the multiplication of this matrix by the global spectrum. If you are interested, you can plot the coupling matrix using the built in method plot_coupling_matrix()
:
fig, ax = capwin.plot_coupling_matrix(ldata)
Here, however, we will estimate the expectation of the windowed spectrum using biased_spectrum()
and the global power spectra used to create the data in the northern and southern hemispheres:
power_north_biased = capwin.biased_spectrum(power_north, k)
power_south_biased = capwin.biased_spectrum(power_south, k)
Note that this function returns a spectrum with a maximum degree ldata+lwin
. In calculating the expectation of the biased power spectrum from the global spectrum, it is assumed implicitly that the global power spectrum is exactly zero for all degrees greater than ldata
.
Finally, lets plot the global power spectra, the localized spectra, and the localized expectations. Assuming that the data are unknown above degree ldata
, we plot only the valid localized spectral estimates up to degree ldata - lwin
.
degrees2 = np.arange(ldata+capwin.lwin+1)
degrees3 = np.arange(ldata-capwin.lwin+1)
fig, ax = plt.subplots(1,1)
ax.plot(degrees, power_north, '-k',
degrees, power_south, '--k',
degrees2, power_north_biased, '-r',
degrees2, power_south_biased, '--r',
degrees3, mtse_north, '-b',
degrees3, mtse_south, '--b')
ax.set(yscale='log', xlabel='degree', ylabel='power', xlim=(0,200-capwin.lwin), ylim=(1.e-8, 1.))
As is seen, the expectation of the localized spectra (red) are significantly biased at low degrees in comparison to the unwindowed global fields (black). This is not necessarily a problem, because this effect is quantifiable. The actual localized power spectra (blue) are found to closely resemble the expected value, especially for degrees greater than the window bandwidth of 29.
In this example, we calculated only the localized power spectrum of a single function. If you were interested in the localized cross-power spectrum of two functions, this could be caluculated using the method multitaper_cross_spectrum()
.
We next demonstrate how to perform a localized spectral analysis over an irregular region. For this example, we will first create a function whose power spectrum is different over the oceans and landmass of Earth, we will then calculate windows that localize these two regions, and finally we will perform a multitaper spectral analysis similar to what we did with the spherical cap localization windows above.
First, let's read in the spherical harmonic coefficients of Earth's topography (referenced to mean sea level):
topo_coeffs = pyshtools.SHCoeffs.from_file('../ExampleDataFiles/srtmp300.msl', 300)
topo = topo_coeffs.expand()
fig, ax = topo.plot()
Next, create a boolean mask that is True
for elevations that are greater than zero:
land_mask = pyshtools.SHGrid.from_array(topo.data > 0)
ocean_mask = pyshtools.SHGrid.from_array(topo.data <= 0)
fig, ax = land_mask.plot()
fig2, ax2 = ocean_mask.plot()
Constructing localization windows from a boolean mask is simple using the from_mask()
constructor of the SHWindow
class. Here, we will use a spherical harmonic bandwidth of 30, and then plot maps and power spectra of the first 20 windows that are concentrated on land:
land_windows = pyshtools.SHWindow.from_mask(land_mask.data, 30)
ocean_windows = pyshtools.SHWindow.from_mask(ocean_mask.data, 30)
fig, axes = land_windows.plot_windows(20)
fig, axes = land_windows.plot_spectra(20)
To demonstrate that these windows actually concentrate their power over the land and oceans, we next plot the cumulative energy of all windows that have concentration factors greater than 0.99. In this case, because the surface area of the oceans is larger than that of the land, there are many more ocean windows than land windows.
k_land = land_windows.number_concentrated(0.99)
k_ocean = ocean_windows.number_concentrated(0.99)
print('k_land = {:d}'.format(k_land))
print('k_ocean = {:d}'.format(k_ocean))
land_energy = (land_windows.to_shgrid(0).to_array())**2
for i in range(1,k_land):
land_energy = land_energy + (land_windows.to_shgrid(i).to_array())**2
ocean_energy = (ocean_windows.to_shgrid(0).to_array())**2
for i in range(1,k_ocean):
ocean_energy = ocean_energy + (ocean_windows.to_shgrid(i).to_array())**2
fig, axes = plt.subplots(1, 2, figsize=(10, 5))
axes[0].imshow(land_energy)
axes[1].imshow(ocean_energy)
Next, let's construct a pathological function that has different power spectra over the oceans and land. In this example, we will make use of the same grids that we constructed for our demonstation using spherical cap localization windows. In particular, the land mass will use the grid constructed from random coefficients with a power spectrum that followed a power law of exponenent -2, and the oceans will use the grid constructed with a power law exponent of -3.
grid_earth = grid_north.copy()
grid_earth.data[topo.data<=0.] = grid_south.data[topo.data<=0.].copy()
clm_earth = grid_earth.expand()
fig, ax = grid_earth.plot()
Finally, we calculate localized power spectra over the land and oceans, as well as the expection of the windowed spectra. For demonstration purposes, we will use the same number of localization windows for both regions.
mtse_land, sd_land = land_windows.multitaper_spectrum(clm_earth, k_land)
mtse_ocean, sd_ocean = ocean_windows.multitaper_spectrum(clm_earth, k_land)
power_land_biased = land_windows.biased_spectrum(power_north, k_land)
power_ocean_biased = ocean_windows.biased_spectrum(power_south, k_land)
degrees2 = np.arange(ldata+land_windows.lwin+1)
degrees3 = np.arange(ldata-land_windows.lwin+1)
fig, ax = plt.subplots(1,1)
ax.plot(degrees, power_north, '-k',
degrees, power_south, '--k',
degrees2, power_land_biased, '-r',
degrees2, power_ocean_biased, '--r',
degrees3, mtse_land, '-b',
degrees3, mtse_ocean, '--b')
ax.set(yscale='log', xlabel='degree', ylabel='power', xlim=(0,200-land_windows.lwin), ylim=(1.e-8, 1.))
As with our example using spherical cap localization windows, the localized power spectra (blue) over the oceans and land match closely their theoretical expectations (red). Both of these are significantly biased from the unwindowed global spectra (black) at low degrees.


--- layout: default title: About ---
Eduardo is a Biomedical Engineer graduated from Monterrey Institute of Technologies (ITESM). He has been intrested on Coding and open source solutions desing since an early age. Reason that took him into the Enterpreneur Ecosystem, He started as an independent developer for iOS applications and Web newsletters and progress througth hardware programming and Health system solution Development.
Founded Radiatta productions at age 17 for music and media production, on 2013 he won Startup Weekend 2013 in Guadalajara, México with TeRento.mx a 2nd hand book market for students. This same year he Co-Founded GreenBox a company focused on creating high-end Acoustic Amplifiers for mobile devices. Currently he volunteers with Mexican RedCross on the implementation of a Biomedical Engineering Department and developing low cost blood pressure Sphygmomanometers. He designed and developed iOS health care applications for Vital Advanced.
For comments or questions, feel free to ask me on Twitter or shoot me an email at eduardo.pradoruiz @ gmail .com .
Other SocialNetworks:


Trisha Yearwood to appear Wednesday on 'Good Morning America'
by Brandy McDonnellCountry music superstar Trisha Yearwood, a former Owasso resident, will appear Wednesday on "Good Morning America."
"GMA" airs from 7 to 9 p.m. weekdays on ABC.
As previously reported, Yearwood will host the 10th annual “CMA Country Christmas,” which will air at 8 p.m. Tuesday, Dec. 3 on ABC.
Yearwood will also perform on the Country Music Association’s holiday special, with Broken Arrow native Kristin Chenoweth, Rascal Flatts (which includes guitarist Joe Don Rooney, who grew up in Picher), For King & Country, Chris Janson, Tori Kelly, Lady Antebellum, Runaway June, CeCe Winans, Brett Young and Chris Young joining her on the lineup.
Also as previously reported, Yearwood released her new album “Every Girl,” her first full-length country music collection in more than a decade, in August. The long-awaited follow-up to 2007’s critically acclaimed “Heaven, Heartache and the Power of Love," her new country album debuted less than six months after the bow of "Let's Be Frank," a Frank Sinatra covers collection she had wanted to record for 20 years.
To read my summer interview with Yearwood, click here.
-BAM
Related Photos


Navease.js
Intro
Javascript library enabling smooth scroll between anchor links on the page
using different easing functions.
Navease uses Easing.js for easing.
Features:
- Scrolling speed can be customized
- Different easing functions (please refer to Easing.js for the full list)
- Navease functionality can be set to elements with specified css selector only
Source code is available at Github
Licensed under the MIT License, © 2016 Mark Rolich
JSDoc
new Navease(frames, easing, selector)
Parameters:
| Name | Type | Argument | Default | Description |
|---|---|---|---|---|
| frames | number | <optional> | 30 | frames count (lower is faster, minimum is 1) |
| easing | string | <optional> | "easeInOutQuad" | easing function name from Easing.js |
| selector | string | <optional> | "a[name]" | apply Navease functionality to the specified selector only |
- Throws an exception if easing function is not defined in Easing.js
- Throws an exception if frames count is less than 1
Examples
Using default values:
new Navease();
Navease will be applied to all anchor links (a[name])
with "easeInOutQuad" easing, and will contain 30 frames (duration will be 0.5 seconds at 60 fps)
new Navease(60, "easeInOutCubic", ".scroll");
Navease will be applied to elements with css class "scroll",
with "easeInOutCubic" easing, and will contain 60 frames (at typical 60 frames per second the duration will be 1 second)
Navigation on the current page uses Navease.js with default settings (you can minimize the page for better experience)
Browser Compatibility
- IE >= 10
- Chrome
- Firefox
- Safari


[§551G-12] Exclusive basis. This part provides the exclusive jurisdictional basis for a court of the State of Hawaii to appoint a guardian or issue a protective order for an adult. [L 2012, c 236, pt of §1]


The WeightedSum object adds two or more input values. A set of dimensionless constants can be provided to multiply each input value prior to addition.
y = C1*x1 + C2*x2 + … + CN*xN, if the coefficients Ci are specified
= x1 + x2 + … + xN , if the coefficients Ci are not specified
where:
y = present output value for the weighted sum
xi = present value for the ith input to the weighted sum
Ci = ith entry in the CoefficientList input
N = number of inputs to the weighted sum
The value returned by the WeightedSum is calculated on demand.


Cloud is now prevalent in every industry. To help you out with cloud technology, you need an expert. The one who is reliable, has deep understanding of the technology and is up-to-date with the latest trends! If you are searching for such experts, we can help you. In Cloud Life Consulting, our mission is to help you in learning about cloud technology which will help you in accomplishing business goals. We are weaving together cloud environments which will ensure you achieving different business goals like saving money, expanding operations or add mobility to your workforce.
Our cloud team of consultants takes pride in bringing to our clients years of experience in the cloud technology. Our purpose is to ensure that you and your organization remain available, innovative and competitive to your customers using the cloud technology, fitting to your organization. We spend our time and efforts in the research and stay on top of the recent trends in the field. You and your customers or clients are key factors of your organization and in Cloud life, we make sure you are focusing on what is important to you. We earn your trust by hearing you out patiently and applying our expertise or giving you suggestions which fits your best interest.
Let our cloud technology consultants help you out to implement the appropriate cloud environment for your organization.
Our values are the part of our success! Our ultimate ambition is to serve clients well. We are the believers of teamwork and builders of long term relationship with our clients as well as teammates.


HTML
CSS
HTML Entity
Tip:
You can also use this icon using its aliases -
Font
Icons
Options
Contribute
WSO2 Icons - All
Download all as PNG:
128x128
WSO2 Inc. |
License


Displays the contents of the Clipboard in a new window.
Syntax
SHOW.CLIPBOARD( )
Remarks
In Microsoft Excel for Windows, the Clipboard must already be running if you want to display its contents in a new window. If it is not already running, you must run the SHOW.CLIPBOARD function twice, once to start the Clipboard application and again to display it in a new window.
If the Clipboard contains cells, the window shows the size of the Clipboard contents in rows and columns. If the Clipboard contains text cut from the formula bar, the window displays the text.
Return to index


Nigeria spends ₦1.06 billion to subsidise petrol daily – PPPRC report
by Amos ABBAAdvertisement
THE Petroleum Products Pricing Regulatory Agency, PPPRA, in its latest report has shown that the Nigerian National Petroleum Corporation, NNPC currently subsidises the cost of petrol by ₦19.37 per litre.
The report published on Tuesday also shows that Nigeria’s current daily consumption of petrol is valued at 55.8 million litres, while NNPC spends an average of ₦1.06 billion on every litre of petrol consumed in the country daily.
The landing cost of petrol for November 18 was ₦144.7 per litre, while the distribution margin was put at ₦19.37 per litre.
The total cost of petrol, adding the landing cost together with the distribution cost is ₦164.07 per litre but the NNPC takes the distribution costs off the private marketers as subsidy.
Petrol is sold at a fixed price of ₦145 per litre at filling stations across the country.
According to a Reuters report, the Senate in May had approved ₦129 billion as payment to cover debts to local oil firms related to a fuel subsidy programme.
Advertisement
For over two years, the NNPC has imported close to 90 per cent of the nation’s petrol because the difference between the price cap and international fuel costs made it expensive for private marketers to import the product.
In another development, the Group Managing Director, GMD, of the NNPC, Mele Kyari, at the 37th National Association of Petroleum Explorationists, NAPE, Conference & Exhibition in Lagos announced there will be a licensing round for ultra-deepwater assets next year.
“As we are all aware, the ultra-deepwater is completely unexplored today. Before the end of this year or next year, God willing, I believe there will be some form of bid rounds in that space,” he said.
Kyari said the nation’s crude oil reserves had fluctuated around 37 billion barrels in recent years due to stalled exploration, saying that there might be “a massive depletion in the available resources.”
He added that the amendment of the Deep Offshore Act was a requirement of law, saying the conditions required to make changes were met since 2003.
President Muhammadu Buhari signed into law the bill amending the Deep Offshore and Inland Basin Production Sharing Contract Act earlier this month.


[ Module Hierarchy
| Class Hierarchy ]
Class Hierarchy
- SocketServer.BaseRequestHandler:
Base class for request handler classes.
- SocketServer.StreamRequestHandler:
Define self.rfile and self.wfile for stream sockets.
- SocketServer.BaseServer:
Base class for server classes.
- SocketServer.TCPServer:
Base class for various socket-based server classes.
- robotide.controller.cellinfo.CellType
- robotide.controller.cellinfo.ContentType
- wx.Dialog
- robotide.contrib.SearchPlugin.KeywordResult:
A result for a search on keywords
- wx.ListCtrl
- wx.lib.mixins.listctrl.ListCtrlAutoWidthMixin:
A mix-in class that automatically resizes the last column to take up
the remaining width of the wx.ListCtrl.
- wx._core.PyOnDemandOutputWindow:
A class that can be used for redirecting Python's stdout and
stderr streams. It will do nothing until something is wrriten to
the stream at which point it will create a Frame with a text area
and write the text there.
- robotide.contrib.testrunner.SocketListener.SocketListener:
Pass all listener events to a remote listener
- wx.StatusBar
- robotide.contrib.SearchPlugin.TagResult:
A result for a search on tags
- robotide.contrib.testrunner.TestSuiteTreeCtrl.TreeNode
- robotide.context.settings._Section
- object:
The most base type
- robotide.ui.actiontriggers.ActionDelegator
- robotide.ui.mainframe.ActionRegisterer
- exceptions.BaseException:
Common base class for all exceptions
- exceptions.Exception:
Common base class for all non-exit exceptions.
- robotide.contrib.testrunner.runprofiles.BaseProfile:
Base class for all test runner profiles
- robotide.controller.cellinfo.CellContent
- robotide.controller.cellinfo.CellInfo
- robotide.controller.cellinfo.CellPosition
- robotide.controller.chiefcontroller.ChiefController
- robotide.editor.gridcolorizer.ColorizationSettings
- robotide.editor.gridcolorizer.Colorizer
- robotide.editor.contentassist.ContentAssistPopup
- robotide.controller.basecontroller.ControllerWithParent
- robotide.controller.settingcontrollers._SettingController
- robotide.controller.tablecontrollers._TableController
- robotide.controller.macrocontrollers._WithStepsController
- robotide.controller.dataloader.DataLoader
- robotide.namespace.namespace.DatafileRetriever
- robotide.editor.editors.EditorCreator
- robotide.application.editorprovider.EditorProvider
- robotide.namespace.embeddedargs.EmbeddedArgsHandler
- robotide.namespace.cache.ExpiringCache
- robotide.context.font.Font
- wx.grid.GridCellWorker:
Proxy of C++ GridCellWorker class
- wx.grid.GridCellEditor:
Proxy of C++ GridCellEditor class
- wx.grid.PyGridCellEditor:
Proxy of C++ PyGridCellEditor class
- robotide.editor.tooltips.GridToolTips
- robotide.widgets.images.ImageProvider
- robotide.spec.iteminfo.ItemInfo:
Represents an object that can be displayed by content assistant.
- robotide.controller.macrocontrollers.ItemNameController
- robotide.ui.tree.LabelEditor
- robotide.namespace.cache.LibraryCache
- robotide.context.logger.Logger
- robotide.ui.actiontriggers.MenuBar
- robotide.action.actioninfo.MenuInfo:
Base class for ActionInfo and SeparatorInfo.
- robotide.namespace.namespace.Namespace
- robotide.controller.commands.NonExistingStep
- robotide.controller.commands.NullObserver
- wx._core.Object:
The base class for most wx objects, although in wxPython not
much functionality is needed nor exposed.
- wx._core.EvtHandler:
Proxy of C++ EvtHandler class
- wx._core.Menu:
Proxy of C++ Menu class
- wx._core.PyApp:
The wx.PyApp class is an implementation detail, please use the
wx.App
class (or some other derived class) instead.
- wx._core.App:
The wx.App class represents the application and is used to:
- robotide.run.ui.Runner
- wx._core.Validator:
Proxy of C++ Validator class
- wx._core.PyValidator:
Proxy of C++ PyValidator class
- robotide.validators._AbstractValidator:
Implements methods to keep wxPython happy and some helper methods.
- wx._core.Window:
wx.Window is the base class for all windows and represents any visible
object on the screen. All controls, top level windows and so on are
wx.Windows. Sizers and device contexts are not however, as they don't
appear on screen themselves.
- wx._core.Control:
This is the base class for a control or 'widget'.
- wx._controls.Button:
A button is a control that contains a text string, and is one of the most
common elements of a GUI. It may be placed on a dialog box or panel, or
indeed almost any other window.
- wx._controls.CollapsiblePane:
A collapsable pane is a container with an embedded button-like
control which can be used by the user to collapse or expand the pane's
contents.
- wx._controls.ListCtrl:
Proxy of C++ ListCtrl class
- wx._controls.StaticText:
Proxy of C++ StaticText class
- wx._controls.TextCtrl:
Proxy of C++ TextCtrl class
- wx._controls.TreeCtrl:
Proxy of C++ TreeCtrl class
- wx._windows.Panel:
Proxy of C++ Panel class
- wx._windows.PopupWindow:
Proxy of C++ PopupWindow class
- wx._windows.TopLevelWindow:
Proxy of C++ TopLevelWindow class
- wx._windows.Dialog:
Proxy of C++ Dialog class
- wx._windows.Frame:
Proxy of C++ Frame class
- robotide.ui.tree._ActionHandler
- wx.html.HtmlEasyPrinting:
Proxy of C++ HtmlEasyPrinting class
- wx._gdi.ImageList:
Proxy of C++ ImageList class
- wx._core.Sizer:
wx.Sizer is the abstract base class used for laying out subwindows in
a window. You cannot use wx.Sizer directly; instead, you will have to
use one of the sizer classes derived from it such as
wx.BoxSizer
,
wx.StaticBoxSizer
, wx.GridSizer
, wx.FlexGridSizer
and
wx.GridBagSizer
.
- wx._core.BoxSizer:
The basic idea behind a box sizer is that windows will most often be
laid out in rather simple basic geometry, typically in a row or a
column or nested hierarchies of either. A wx.BoxSizer will lay out
its items in a simple row or column, depending on the orientation
parameter passed to the constructor.
- robotide.widgets.sizers._BoxSizer
- wx._core.PySizer:
wx.PySizer is a special version of
wx.Sizer
that has been
instrumented to allow the C++ virtual methods to be overloaded in
Python derived classes. You would derive from this class if you are
wanting to implement a custom sizer in Python code. Simply implement
CalcMin
and RecalcSizes
in the derived class and you're all set.
For example:
- robotide.controller.commands.Occurrence
- robotide.pluginapi.plugin.Plugin:
Entry point to RIDE plugin API -- all plugins must extend this class.
- robotide.application.pluginloader.PluginLoader
- robotide.ui.pluginmanager.PluginManager
- robotide.widgets.popupmenu.PopupCreator
- robotide.widgets.popupmenu.PopupMenuItem
- robotide.widgets.popupmenu.PopupMenuItems
- robotide.run.process.Process
- robotide.contrib.testrunner.asyncproc.Process:
Manager for an asynchronous process.
The process will be run in the background, and its standard output
and standard error will be collected asynchronously.
- robotide.ui.progress.ProgressObserver
- robotide.publish.publisher.Publisher
- robotide.ui.recentfiles.RecentFileEntry
- robotide.recentfiles.recentfiles.RecentFileEntry
- robotide.namespace.namespace.ResourceCache
- robotide.namespace.namespace.RetrieverContext
- robotide.utils.eventhandler.RideEventHandler
- robotide.publish.messages.RideMessage:
Base class for all messages sent by RIDE.
- robotide.run.runanything.RunConfig
- robotide.run.runanything.RunConfigs
- robotide.writer.serializer.SerializationContext
- robotide.writer.serializer.Serializer
- robotide.action.shortcut.Shortcut
- robotide.ui.actiontriggers.ShortcutRegistry
- robotide.context.configobj.SimpleVal:
A simple validator.
Can be used to check that all members expected are present.
- robotide.spec.xmlreaders.Spec
- robotide.controller.stepcontrollers.StepController
- robotide.controller.tags.Tag
- robotide.ui.actiontriggers.ToolBar
- robotide.ui.actiontriggers.ToolBarButton
- wx.lib.mixins.treemixin.TreeAPIHarmonizer:
This class attempts to hide the differences in API between the
different tree controls that are part of wxPython.
- wx.lib.mixins.treemixin.DragAndDrop:
This is a mixin class that can be used to easily implement
dragging and dropping of tree items.
- wx.lib.mixins.treemixin.TreeHelper:
This class provides methods that are not part of the API of any
tree control, but are convenient to have available.
- wx.lib.mixins.treemixin.DragAndDrop:
This is a mixin class that can be used to easily implement
dragging and dropping of tree items.
- robotide.usages.UsageRunner.Usages
- robotide.usages.usagesdialog.UsagesListModel
- robotide.ui.usagesdialog.UsagesListModel
- robotide.controller.basecontroller.WithUndoRedoStacks
- robotide.controller.filecontrollers._DataController
- robotide.controller.macrocontrollers._WithStepsController
- robotide.controller.basecontroller._BaseController
- robotide.editor.clipboard._ClipboardHandler
- robotide.controller.commands._Command
- robotide.editor.contentassist._ContentAssistTextCtrlBase
- robotide.controller.tablecontrollers._MacroTable
- robotide.ui.actiontriggers._MenuItem
- robotide.controller.tablecontrollers._NameValidation
- robotide.application.pluginconnector._PluginConnector
- robotide.action.action._Registrable
- robotide.editor.tags._TagBoxProperties
- robotide.controller.tablecontrollers._WithListOperations
- robotide.writer.writer._WriterHelper
- dict:
dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
d = {}
for k, v in iterable:
d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list.
- robotide.context.configobj.Section:
A dictionary-like object that represents a section in a config file.
- type:
type(object) -> the object's type
type(name, bases, dict) -> a new type


{% extends "base.html" %} {%block content%}
Listen to fragments of the lives of people belonging to three vastly different cultures-- Terrans-- planet-dwellers fighting to maintain the lives they’ve always known in an increasingly-precarious ecosystem, Belters--fiercely independent individualists, scraping out livelihoods on the asteroids and moons of the Sol system, and the Peregrination-- former refugees turned family, struggling simply to exist in the blackness of space.
{%endblock content%}


{% extends "global/Page.html" %} {% load staticfiles otree %} {% block title %} The task is over {% endblock %} {% block content %}
Your scored {{ participant.payoff }} in the task.
Please return to the previous window. You will be asked to provide the following password:


Girlfriend's formal definition can be found here. But to certain people, they only exist in myth and imaginary world.


The controller with the name '{0}' is not registered.
This error occurs when the $controller()
service is called
with a string that does not match any of the registered controllers. The controller service may have
been invoked directly, or indirectly, for example through the ngController
directive,
or inside a component / directive /
route definition (when using a string for the controller property).
Third-party modules can also instantiate controllers with the $controller()
service.
Causes for this error can be:
ngController
directive attribute, in a component
definition's controller property, or in the call to $controller()
.Module.controller
nor $controllerProvider.register()
.Please consult the $controller service api docs to learn more.


Class: ActiveSupport::Cache::MemoryStore
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Store
|
|
|
Instance Chain:
self,
Store
|
|
| Inherits: |
ActiveSupport::Cache::Store
|
| Defined in: | activesupport/lib/active_support/cache/memory_store.rb |
Overview
A cache store implementation which stores everything into memory in the same process. If you’re running multiple Ruby on ::Rails
server processes (which is the case if you’re using Phusion Passenger or puma clustered mode), then this means that ::Rails
server process instances won’t be able to share cache data with each other and this may not be the most appropriate cache in that scenario.
This cache has a bounded size specified by the :size
options to the initializer (default is 32Mb). When the cache exceeds the allotted size, a cleanup will occur which tries to prune the cache down to three quarters of the maximum size by removing the least recently used entries.
Unlike other ::ActiveSupport::Cache
store implementations, MemoryStore
does not compress values by default. MemoryStore
does not benefit from compression as much as other Store
implementations, as it does not send data over a network. However, when compression is enabled, it still pays the full cost of compression in terms of cpu use.
MemoryStore
is thread-safe.
Constant Summary
-
DEFAULT_CODER =
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 42DupCoder
-
PER_ENTRY_OVERHEAD =
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 140240
Store
- Inherited
Class Attribute Summary
-
.supports_cache_versioning? ⇒ Boolean
readonly
Advertise cache versioning support.
Store
- Inherited
Class Method Summary
Instance Attribute Summary
-
#pruning? ⇒ Boolean
readonly
Returns true if the cache is currently being pruned.
Store
- Inherited
| #logger, #options, | |
| #silence? | Alias for Store#silence. |
Instance Method Summary
-
#cleanup(options = nil)
Preemptively iterates through all stored keys and removes the ones which have expired.
-
#clear(options = nil)
Delete all data stored in a given cache store.
-
#decrement(name, amount = 1, options = nil)
Decrement an integer value in the cache.
-
#delete_matched(matcher, options = nil)
Deletes cache entries if the cache key matches a given pattern.
-
#increment(name, amount = 1, options = nil)
Increment an integer value in the cache.
-
#prune(target_size, max_time = nil)
To ensure entries fit within the specified memory prune the cache by removing the least recently accessed entries.
Store
- Inherited
| #cleanup | Cleanups the cache by removing expired entries. |
| #clear | Clears the entire cache. |
| #decrement | Decrements an integer value in the cache. |
| #delete | Deletes an entry in the cache. |
| #delete_matched | Deletes all entries with keys matching the pattern. |
| #delete_multi | Deletes multiple entries in the cache. |
| #exist? | Returns |
| #fetch | Fetches data from the cache, using the given key. |
| #fetch_multi | Fetches data from the cache, using the given keys. |
| #increment | Increments an integer value in the cache. |
| #mute | Silences the logger within a block. |
| #read | Reads data from the cache, using the given key. |
| #read_multi | Reads multiple values at once from the cache. |
| #silence, | |
| #silence! | Silences the logger. |
| #write | Writes the value to the cache, with the key. |
| #write_multi |
|
| #key_matcher | Adds the namespace defined in the options to a pattern designed to match keys. |
Constructor Details
.new(options = nil) ⇒ MemoryStore
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 44
def initialize( = nil) ||= {} # Disable compression by default. [:compress] ||= false super( ) @data = {} @max_size = [:size] || 32.megabytes @max_prune_time = [:max_prune_time] || 2 @cache_size = 0 @monitor = Monitor.new @pruning = false end
Class Attribute Details
.supports_cache_versioning? ⇒ Boolean
(readonly)
Advertise cache versioning support.
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 58
def self.supports_cache_versioning? true end
Instance Attribute Details
#pruning? ⇒ Boolean
(readonly)
Returns true if the cache is currently being pruned.
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 103
def pruning? @pruning end
Instance Method Details
#cleanup(options = nil)
Preemptively iterates through all stored keys and removes the ones which have expired.
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 71
def cleanup( = nil) = ( ) instrument(:cleanup, size: @data.size) do keys = synchronize { @data.keys } keys.each do |key| entry = @data[key] delete_entry(key, ** ) if entry && entry.expired? end end end
#clear(options = nil)
Delete all data stored in a given cache store.
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 63
def clear( = nil) synchronize do @data.clear @cache_size = 0 end end
#decrement(name, amount = 1, options = nil)
Decrement an integer value in the cache.
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 113
def decrement(name, amount = 1, = nil) modify_value(name, -amount, ) end
#delete_matched(matcher, options = nil)
Deletes cache entries if the cache key matches a given pattern.
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 118
def delete_matched(matcher, = nil) = ( ) instrument(:delete_matched, matcher.inspect) do matcher = key_matcher(matcher, ) keys = synchronize { @data.keys } keys.each do |key| delete_entry(key, ** ) if key.match(matcher) end end end
#increment(name, amount = 1, options = nil)
Increment an integer value in the cache.
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 108
def increment(name, amount = 1, = nil) modify_value(name, amount, ) end
#prune(target_size, max_time = nil)
To ensure entries fit within the specified memory prune the cache by removing the least recently accessed entries.
# File 'activesupport/lib/active_support/cache/memory_store.rb', line 84
def prune(target_size, max_time = nil) return if pruning? @pruning = true begin start_time = Concurrent.monotonic_time cleanup instrument(:prune, target_size, from: @cache_size) do keys = synchronize { @data.keys } keys.each do |key| delete_entry(key, ** ) return if @cache_size <= target_size || (max_time && Concurrent.monotonic_time - start_time > max_time) end end ensure @pruning = false end end


idr: Irreproducible discovery rate
This is a package for estimating the copula mixture model and plotting correspondence curves in "Measuring reproducibility of high-throughput experiments" (2011), Annals of Applied Statistics, Vol. 5, No. 3, 1752-1779, by Li, Brown, Huang, and Bickel
| Version: |
1.2 |
| Published: |
2014-09-04 |
| Author: |
Qunhua Li |
| Maintainer: |
Qunhua Li <qunhua.li at gmail.com> |
| License: |
GPL-2 | GPL-3 [expanded from: GPL (≥ 2.0)] |
| NeedsCompilation: |
no |
| CRAN checks: |
idr results |
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=idr
to link to this page.


StandAlone中cluster和client模式启动类是不一样的，在SparkSubmit类中可以看到，
private[deploy] val REST_CLUSTER_SUBMIT_CLASS = classOf[RestSubmissionClientApp].getName()
if (args.isStandaloneCluster) {
if (args.useRest) {
childMainClass = REST_CLUSTER_SUBMIT_CLASS
childArgs += (args.primaryResource, args.mainClass)
} else {
// In legacy standalone cluster mode, use Client as a wrapper around the user class
childMainClass = STANDALONE_CLUSTER_SUBMIT_CLASS
if (args.supervise) { childArgs += "--supervise" }
Option(args.driverMemory).foreach { m => childArgs += ("--memory", m) }
Option(args.driverCores).foreach { c => childArgs += ("--cores", c) }
childArgs += "launch"
childArgs += (args.master, args.primaryResource, args.mainClass)
}
if (args.childArgs != null) {
childArgs ++= args.childArgs
}
}
提交后执行start方法，我看到这段代码时突然懵了，这创建完endpoint和endpointRef后就没了，amazing，那怎么启动呢，想了一会，就明白了，创建endpointRef后会自动存入onstart消息，触发onStart方法，Master的onStart可以做一些初始化工作
private[spark] class ClientApp extends SparkApplication {
override def start(args: Array[String], conf: SparkConf): Unit = {
val driverArgs = new ClientArguments(args)
if (!conf.contains("spark.rpc.askTimeout")) {
conf.set("spark.rpc.askTimeout", "10s")
}
Logger.getRootLogger.setLevel(driverArgs.logLevel)
val rpcEnv =
RpcEnv.create("driverClient", Utils.localHostName(), 0, conf, new SecurityManager(conf))
val masterEndpoints = driverArgs.masters.map(RpcAddress.fromSparkURL).
map(rpcEnv.setupEndpointRef(_, Master.ENDPOINT_NAME))
rpcEnv.setupEndpoint("client", new ClientEndpoint(rpcEnv, driverArgs, masterEndpoints, conf))
rpcEnv.awaitTermination()
}
}
ClientEndpoint的onStart方法会调用MasterEndpointRef发送RequestSubmitDriver消息给Master的Endpoint
override def onStart(): Unit = {
driverArgs.cmd match {
case "launch" =>
// TODO: We could add an env variable here and intercept it in `sc.addJar` that would
// truncate filesystem paths similar to what YARN does. For now, we just require
// people call `addJar` assuming the jar is in the same directory.
val mainClass = "org.apache.spark.deploy.worker.DriverWrapper"
val classPathConf = "spark.driver.extraClassPath"
val classPathEntries = sys.props.get(classPathConf).toSeq.flatMap { cp =>
cp.split(java.io.File.pathSeparator)
}
val libraryPathConf = "spark.driver.extraLibraryPath"
val libraryPathEntries = sys.props.get(libraryPathConf).toSeq.flatMap { cp =>
cp.split(java.io.File.pathSeparator)
}
val extraJavaOptsConf = "spark.driver.extraJavaOptions"
val extraJavaOpts = sys.props.get(extraJavaOptsConf)
.map(Utils.splitCommandString).getOrElse(Seq.empty)
val sparkJavaOpts = Utils.sparkJavaOpts(conf)
val javaOpts = sparkJavaOpts ++ extraJavaOpts
val command = new Command(mainClass,
Seq("", "", driverArgs.mainClass) ++ driverArgs.driverOptions,
sys.env, classPathEntries, libraryPathEntries, javaOpts)
val driverDescription = new DriverDescription(
driverArgs.jarUrl,
driverArgs.memory,
driverArgs.cores,
driverArgs.supervise,
command)
asyncSendToMasterAndForwardReply[SubmitDriverResponse](
RequestSubmitDriver(driverDescription))
case "kill" =>
val driverId = driverArgs.driverId
asyncSendToMasterAndForwardReply[KillDriverResponse](RequestKillDriver(driverId))
}
}
private def asyncSendToMasterAndForwardReply[T: ClassTag](message: Any): Unit = {
for (masterEndpoint <- masterEndpoints) {
masterEndpoint.ask[T](message).onComplete {
case Success(v) => self.send(v)
case Failure(e) =>
logWarning(s"Error sending messages to master $masterEndpoint", e)
}(forwardMessageExecutionContext)
}
}
createDriver(description)方法并不会创建driver，只是生成DriverInfo类，里面包含了driver的一些信息，真正执行的还是shedule方法
case RequestSubmitDriver(description) =>
if (state != RecoveryState.ALIVE) {
val msg = s"${Utils.BACKUP_STANDALONE_MASTER_PREFIX}: $state. " +
"Can only accept driver submissions in ALIVE state."
context.reply(SubmitDriverResponse(self, false, None, msg))
} else {
logInfo("Driver submitted " + description.command.mainClass)
val driver = createDriver(description)
persistenceEngine.addDriver(driver)
waitingDrivers += driver
drivers.add(driver)
schedule()
// TODO: It might be good to instead have the submission client poll the master to determine
// the current status of the driver. For now it's simply "fire and forget".
context.reply(SubmitDriverResponse(self, true, Some(driver.id),
s"Driver successfully submitted as ${driver.id}"))
}
shedule种两个方法，一个是launchDriver，另一个是startExecutorsOnWorkers，看名字也就知道含义，前者启动driver，后者用于启动executors
private def schedule(): Unit = {
if (state != RecoveryState.ALIVE) {
return
}
// Drivers take strict precedence over executors
val shuffledAliveWorkers = Random.shuffle(workers.toSeq.filter(_.state == WorkerState.ALIVE))
val numWorkersAlive = shuffledAliveWorkers.size
var curPos = 0
for (driver <- waitingDrivers.toList) { // iterate over a copy of waitingDrivers
// We assign workers to each waiting driver in a round-robin fashion. For each driver, we
// start from the last worker that was assigned a driver, and continue onwards until we have
// explored all alive workers.
var launched = false
var numWorkersVisited = 0
while (numWorkersVisited < numWorkersAlive && !launched) {
val worker = shuffledAliveWorkers(curPos)
numWorkersVisited += 1
if (worker.memoryFree >= driver.desc.mem && worker.coresFree >= driver.desc.cores) {
launchDriver(worker, driver)
waitingDrivers -= driver
launched = true
}
curPos = (curPos + 1) % numWorkersAlive
}
}
startExecutorsOnWorkers()
}
launchDriver中使用work的endpointRef发送LaunchDriver消息到WorkEndpoint中
private def launchDriver(worker: WorkerInfo, driver: DriverInfo) {
logInfo("Launching driver " + driver.id + " on worker " + worker.id)
worker.addDriver(driver)
driver.worker = Some(worker)
worker.endpoint.send(LaunchDriver(driver.id, driver.desc))
driver.state = DriverState.RUNNING
}
LaunchDriver使用会创建DriverRunner对象，并调用start方法
case LaunchDriver(driverId, driverDesc) =>
logInfo(s"Asked to launch driver $driverId")
val driver = new DriverRunner(
conf,
driverId,
workDir,
sparkHome,
driverDesc.copy(command = Worker.maybeUpdateSSLSettings(driverDesc.command, conf)),
self,
workerUri,
securityMgr)
drivers(driverId) = driver
driver.start()
coresUsed += driverDesc.cores
memoryUsed += driverDesc.mem
DriverRunner的start方法运行到最后，会调用命令创建系统process
/** Starts a thread to run and manage the driver. */
private[worker] def start() = {
new Thread("DriverRunner for " + driverId) {
override def run() {
var shutdownHook: AnyRef = null
try {
shutdownHook = ShutdownHookManager.addShutdownHook { () =>
logInfo(s"Worker shutting down, killing driver $driverId")
kill()
}
// prepare driver jars and run driver
val exitCode = prepareAndRunDriver()
// set final state depending on if forcibly killed and process exit code
finalState = if (exitCode == 0) {
Some(DriverState.FINISHED)
} else if (killed) {
Some(DriverState.KILLED)
} else {
Some(DriverState.FAILED)
}
} catch {
case e: Exception =>
kill()
finalState = Some(DriverState.ERROR)
finalException = Some(e)
} finally {
if (shutdownHook != null) {
ShutdownHookManager.removeShutdownHook(shutdownHook)
}
}
// notify worker of final driver state, possible exception
worker.send(DriverStateChanged(driverId, finalState.get, finalException))
}
}.start()
}
启动executor也类似呗，先分配资源，再使用命令创建executor
启动Driver和Executor可以参考动态分配executor章节


- getConstraints() - Method in class com.firebase.jobdispatcher.Job.Builder
-
The runtime constraints applied to this Job.
- getConstraints() - Method in class com.firebase.jobdispatcher.Job
-
The runtime constraints applied to this Job.
- getConstraints() - Method in interface com.firebase.jobdispatcher.JobParameters
-
The runtime constraints applied to this Job.
- getErrors() - Method in exception com.firebase.jobdispatcher.ValidationEnforcer.ValidationException
-
- getExtras() - Method in class com.firebase.jobdispatcher.Job.Builder
-
The optional set of user-supplied extras associated with this Job.
- getExtras() - Method in class com.firebase.jobdispatcher.Job
-
The optional set of user-supplied extras associated with this Job.
- getExtras() - Method in interface com.firebase.jobdispatcher.JobParameters
-
The optional set of user-supplied extras associated with this Job.
- getFlags() - Method in class com.firebase.jobdispatcher.ObservedUri
-
- getInitialBackoff() - Method in class com.firebase.jobdispatcher.RetryStrategy
-
Returns the initial backoff (i.e.
- getLifetime() - Method in class com.firebase.jobdispatcher.Job.Builder
-
The Job's lifetime; how long it should persist for.
- getLifetime() - Method in class com.firebase.jobdispatcher.Job
-
The Job's lifetime; how long it should persist for.
- getLifetime() - Method in interface com.firebase.jobdispatcher.JobParameters
-
The Job's lifetime; how long it should persist for.
- getMaximumBackoff() - Method in class com.firebase.jobdispatcher.RetryStrategy
-
Returns the maximum backoff duration in seconds.
- getPolicy() - Method in class com.firebase.jobdispatcher.RetryStrategy
-
Returns the backoff policy in place.
- getReceiverClass() - Method in class com.firebase.jobdispatcher.GooglePlayDriver
-
- getRetryStrategy() - Method in class com.firebase.jobdispatcher.Job.Builder
-
The RetryStrategy for the Job.
- getRetryStrategy() - Method in class com.firebase.jobdispatcher.Job
-
The RetryStrategy for the Job.
- getRetryStrategy() - Method in interface com.firebase.jobdispatcher.JobParameters
-
The RetryStrategy for the Job.
- getService() - Method in class com.firebase.jobdispatcher.Job.Builder
-
Returns the name of the backing JobService class.
- getService() - Method in class com.firebase.jobdispatcher.Job
-
Returns the name of the backing JobService class.
- getService() - Method in interface com.firebase.jobdispatcher.JobParameters
-
Returns the name of the backing JobService class.
- getTag() - Method in class com.firebase.jobdispatcher.Job.Builder
-
Returns a string identifier for the Job.
- getTag() - Method in class com.firebase.jobdispatcher.Job
-
Returns a string identifier for the Job.
- getTag() - Method in interface com.firebase.jobdispatcher.JobParameters
-
Returns a string identifier for the Job.
- getTrigger() - Method in class com.firebase.jobdispatcher.Job.Builder
-
The Job's Trigger, which decides when the Job is ready to run.
- getTrigger() - Method in class com.firebase.jobdispatcher.Job
-
The Job's Trigger, which decides when the Job is ready to run.
- getTrigger() - Method in interface com.firebase.jobdispatcher.JobParameters
-
The Job's Trigger, which decides when the Job is ready to run.
- getTriggeredContentUris() - Method in class com.firebase.jobdispatcher.TriggerReason
-
- getTriggerReason() - Method in class com.firebase.jobdispatcher.Job.Builder
-
- getTriggerReason() - Method in class com.firebase.jobdispatcher.Job
-
- getTriggerReason() - Method in interface com.firebase.jobdispatcher.JobParameters
-
- getUri() - Method in class com.firebase.jobdispatcher.ObservedUri
-
- getUris() - Method in class com.firebase.jobdispatcher.JobTrigger.ContentUriTrigger
-
- getValidator() - Method in interface com.firebase.jobdispatcher.Driver
-
Returns a JobValidator configured for this backend.
- getValidator() - Method in class com.firebase.jobdispatcher.FirebaseJobDispatcher
-
Returns a ValidationEnforcer configured for the current Driver.
- getValidator() - Method in class com.firebase.jobdispatcher.GooglePlayDriver
-
- getWindowEnd() - Method in class com.firebase.jobdispatcher.JobTrigger.ExecutionWindowTrigger
-
- getWindowStart() - Method in class com.firebase.jobdispatcher.JobTrigger.ExecutionWindowTrigger
-
- GooglePlayDriver - Class in com.firebase.jobdispatcher
-
GooglePlayDriver provides an implementation of Driver for devices with Google Play services
installed.
- GooglePlayDriver(Context) - Constructor for class com.firebase.jobdispatcher.GooglePlayDriver
-
Instantiates a new GooglePlayDriver.
- GooglePlayReceiver - Class in com.firebase.jobdispatcher
-
Handles incoming execute requests from the GooglePlay driver and forwards them to your Service.
- GooglePlayReceiver() - Constructor for class com.firebase.jobdispatcher.GooglePlayReceiver
-
- schedule(Job) - Method in interface com.firebase.jobdispatcher.Driver
-
Schedules the provided Job.
- schedule(Job) - Method in class com.firebase.jobdispatcher.FirebaseJobDispatcher
-
Attempts to schedule the provided Job.
- schedule(Job) - Method in class com.firebase.jobdispatcher.GooglePlayDriver
-
Schedules the provided Job.
- SCHEDULE_RESULT_BAD_SERVICE - Static variable in class com.firebase.jobdispatcher.FirebaseJobDispatcher
-
Indicates the schedule request failed because the service is not exposed or configured
correctly.
- SCHEDULE_RESULT_NO_DRIVER_AVAILABLE - Static variable in class com.firebase.jobdispatcher.FirebaseJobDispatcher
-
Indicates the schedule request failed because the driver was unavailable.
- SCHEDULE_RESULT_SUCCESS - Static variable in class com.firebase.jobdispatcher.FirebaseJobDispatcher
-
Indicates the schedule request seems to have been successful.
- SCHEDULE_RESULT_UNKNOWN_ERROR - Static variable in class com.firebase.jobdispatcher.FirebaseJobDispatcher
-
Indicates the schedule request encountered an unknown error.
- SCHEDULE_RESULT_UNSUPPORTED_TRIGGER - Static variable in class com.firebase.jobdispatcher.FirebaseJobDispatcher
-
Indicates the schedule request failed because the Trigger was unsupported.
- ScheduleFailedException() - Constructor for exception com.firebase.jobdispatcher.FirebaseJobDispatcher.ScheduleFailedException
-
- setConstraints(int...) - Method in class com.firebase.jobdispatcher.Job.Builder
-
Sets the Job's runtime constraints.
- setExtras(Bundle) - Method in class com.firebase.jobdispatcher.Job.Builder
-
Sets the user-defined extras associated with the Job.
- setLifetime(int) - Method in class com.firebase.jobdispatcher.Job.Builder
-
Sets the Job's lifetime, or how long it should persist.
- setRecurring(boolean) - Method in class com.firebase.jobdispatcher.Job.Builder
-
Sets whether the job should recur.
- setReplaceCurrent(boolean) - Method in class com.firebase.jobdispatcher.Job.Builder
-
Sets whether this Job should replace pre-existing Jobs with the same tag.
- setRetryStrategy(RetryStrategy) - Method in class com.firebase.jobdispatcher.Job.Builder
-
Set the RetryStrategy used for the Job.
- setService(Class<? extends JobService>) - Method in class com.firebase.jobdispatcher.Job.Builder
-
Sets the backing JobService class for the Job.
- setTag(String) - Method in class com.firebase.jobdispatcher.Job.Builder
-
Sets the unique String tag used to identify the Job.
- setTrigger(JobTrigger) - Method in class com.firebase.jobdispatcher.Job.Builder
-
Sets the Trigger used for the Job.
- shouldReplaceCurrent() - Method in class com.firebase.jobdispatcher.Job.Builder
-
Whether the Job should replace a pre-existing Job with the same tag.
- shouldReplaceCurrent() - Method in class com.firebase.jobdispatcher.Job
-
Whether the Job should replace a pre-existing Job with the same tag.
- shouldReplaceCurrent() - Method in interface com.firebase.jobdispatcher.JobParameters
-
Whether the Job should replace a pre-existing Job with the same tag.
- SimpleJobService - Class in com.firebase.jobdispatcher
-
SimpleJobService provides a simple way of doing background work in a JobService.
- SimpleJobService() - Constructor for class com.firebase.jobdispatcher.SimpleJobService
-


Huntr
Used the Wikitude/Javascript SDK to build a mobile app that sends users on an augmented reality treasure hunt. I created pop up points of interest based on the user's geolocation, integrated a 3D object and became familiar with Xcode basics.
GameGyft
Gamifies the gift card experience. Users pick age appropriate games to send to friends and family that end in a VisaDirect gift card. I made the JavaScript game, worked on CSS and HTML and helped solve Ruby issues.
DoodleLife
Allow users to draw on photos of cats. This solo project reflects my love for JavaScript, art and silliness. I used an ActiveRecord database to save photo titles, pushed the site to Heroku and hit the Cat API.


Snake
Game Over
Restart
Tweet My Score
Snake
by
Raf Geekee
Start
Loading...
Score: 0
© Raf Geekee - 2014


Experienced and proficient in all phases of advocacy including State and Federal Trial and Appellate court practice, with emphasis in real property, loans and lending; commercial real estate/ business sales and transactions; and mortgage and deed of trust practice. Public Speaker regarding foreclosure laws; procedure and litigation. Our firm is rated AV Preeminent (R) by Martindale-Hubbel lawyer ratings.
Our firm successfully and routinely recaptures investor's funds from problem real estate loans and transactions and creates effective work-outs of troubled loans to maximize returns. We represent parties in commercial real estate transactions, including sale, purchase and leasing.
Representative cases include defending multi-million dollar demand for commercial construction reimbursement from retailer, obtaining commercial funds from large High Tech company, shepherding sale transaction of shopping center site from private party to Mega-retainer and major developer, and routinely obtaining payoffs of problem loans for lenders and secured properties for investors. Our firm has represented clients from an owner of a small dog-wash business to large investment firms. We also believe in keeping attorney fees reasonable so that our client's rewards are not overshadowed by legal fees.
Emphasis: Real estate transactions and litigation; General civil litigation; Business litigation; Mortgage and loan litigation; Commercial real estate sales and leasing transactions.
Our firm represents many pro-bono clients during each year. Sally Williams is also an active member of the Board of Directors for the Santa Cruz Homeless Services Center and strongly supports housing first initiatives as smart solutions to homelessness.
555 Soquel Avenue #370 | Santa Cruz, CA 95062 | e<EMAIL_ADDRESS>| p:<PHONE_NUMBER> | f:<PHONE_NUMBER>