Basics of Git
Here I have compiled some basic git commands for beginners!
-
Git configuration
- $ git config --global user.name “Your Name” Set the name that will be attached to your commits and tags.
- $ git config --global user.email<EMAIL_ADDRESS>Set the e-mail address that will be attached to your commits and tags.
- $ git config --global color.ui auto Enable some colorization of Git output.
-
Starting A Project
- $ git init [project name] Create a new local repository. If [project name] is provided, Git will create a new directory name [project name] and will initialize a repository inside it. If [project name] is not provided, then
a new repository is initialized in the current directory.
- $ git clone [project url] Downloads a project with the entire history from the remote repository.
-
Day-To-Day Work
- $ git status Displays the status of your working directory. Options include new, staged, and modified files. It will retrieve branch name, current commit identifier, and changes pending commit.
- $ git add [file] Add a file to the staging area. Use in place of the full file path to add all changed files from the current directory down into the directory tree.
- $ git diff [file] Show changes between working directory and staging area.
- $ git diff --staged [file] Shows any changes between the staging area and the repository.
- $ git checkout -- [file] Discard changes in working directory. This operation is unrecoverable.
- $ git reset [file] Revert your repository to a previous known working state.
- $ git commit Create a new commit from changes added to the staging area. The commit must have a message!
- $ git rm [file] Remove file from working directory and staging area.
- $ git stash Put current changes in your working directory into stash for later use.
- $ git stash pop Apply stored stash content into working directory, and clear stash.
- $ git stash drop Delete a specific stash from all your previous stashes.
-
Git Branching Model
- $ git branch [-a] List all local branches in repository. With -a: show all branches (with remote).
- $ git branch [branch_name] Create new branch, referencing the current HEAD.
- $ git checkout [-b][branch_name] Switch working directory to the specified branch. With -b: Git will create the specified branch if it does not exist.
- $ git merge [from name] Join specified [from name] branch into your current branch (the one you are on currently).
- $ git branch -d [name] Remove selected branch, if it is already merged into any other. -D instead of -d forces deletion.
-
Reverting Changes
- $ git reset [--hard] [target reference] Switches the current branch to the target reference, leaving a difference as an uncommitted change. When --hard is used, all changes are discarded.
- $ git revert [commit sha] Create a new commit, reverting changes from the specified commit. It generates an inversion of changes.


Do you have a question?
Don’t hesitate to get in touch with us.
Due to the amount of enquiries we receive, may we seek your understanding in attending to your enquiry. Thank you.
For general matters,
please call us at 6836 6964
or drop us an email
enquiry@gmail.com


Preparation time
30 mins to 1 hour
Cooking time
10 to 30 mins
Serves
Serves 4
For the Caesar dressing, place the garlic and white wine into a small pan and bring to the boil. Simmer for five minutes until the garlic is just softened.
Take the pan off the heat and add the mustard, egg yolks and marinated anchovies, mixing to combine.
Using a stick blender, blend to a purée and transfer to a bowl.
Gradually add the two oils, whisking constantly. Season with freshly ground black pepper, to taste, and set aside.
For the anchovies, preheat the grill to high.
Season the anchovies with salt and freshly ground black pepper and brush with the olive oil.
Mix the flour with the paprika in a small bowl and then toss the anchovies in the flour to coat.
Place the anchovies onto a grill pan and place under the grill for two minutes until just cooked.
Turn and cook for a further minute and then remove from the grill.
For the salad, mix the country bread with the olive oil, salt and freshly ground black pepper.
Heat a frying pan until hot, add the bread and cook for 3-4 minutes, stirring occasionally, until golden-brown on all sides and crunchy.
Remove the pan from the heat, add the parmesan and mix to coat the croutons with parmesan.
Place the Little Gem leaves and sliced anchovies into a bowl with some of the Caesar dressing and mix to coat.
At the last minute, add the croutons and mix together.
To serve, place a pile of salad in the centre of each of four plates. Pile up the grilled anchovies next to the salad and serve immediately.


Conference Room Booking System
Home
Rooms
Booking
Contact
Reading makes a full man.
Writing a ready man.
And
Conference an exact man.


Content for first nested tab 1
Content for second nested tab 2
Content of first nested tab 2
Content of second nested tab 2


public interface Provider extends AutoCloseable, Cloneable, java.io.Serializable
Dataset
only provides read-only operations via "get" and "fetch" methods.
Thus, Provider
interface and its implementations support storage service in service layer to update and modify database via writing operations.
Provider
interacts directly with database, which is created in data layer.
For example, updateRating(RatingVector)
method saves rating values that user makes on items to database.
Provider
also provides read-only accesses to database. So, in many situations, Scanner
uses Provider
to retrieve information from database because Scanner
does not store information in memory.
Provider
manipulates context and context template via context template schema manager (CTS manager) represented by CTSManager
.
Provider
provides most of read-write data operations (get, insert, update, delete).
Provider uses provider associator represented by ProviderAssoc
for low-level data operators.
Every provider own a configuration represented by DataConfig
for initialization (setting up).
unit
representing a CSV file, database table, Excel sheet, etc.
Such database has the schema. Please distinguish such framework database schema from context template schema because the framework schema contains template schema.| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Any class that implements this interface must define this method to clone itself.
|
void |
close()
Closing provider, in which CTS manager and provider associator are closed too.
|
boolean |
createSchema(AttributeList userAttList,
AttributeList itemAttList)
Each database has a schema as the structure of such database.
|
boolean |
createUnit(java.lang.String unitName,
AttributeList attList)
Creating a unit specified unit name and specified attribute list.
|
boolean |
deleteAccount(java.lang.String accName)
Deleting the specified account via its name.
|
boolean |
deleteAttributeMap(InternalRecord internalRecord)
Deleting an
interchanged attribute map by specified internal record. |
boolean |
deleteAttributeMap(java.lang.String internalUnit)
Deleting all
interchanged attribute maps by specified internal unit. |
boolean |
deleteConfigProfile(java.lang.String cfgAttribute)
Each provider has a configuration and store such configuration in unit as profiles.
|
boolean |
deleteItemProfile(int itemId)
Deleting a item profile via specified user identification (user ID).
|
boolean |
deleteItemRating(int itemId)
Deleting all ratings of a specified item from framework database.
|
boolean |
deleteNominal(java.lang.String unitName)
Deleting all nominal (s) in the specified unit.
|
boolean |
deleteNominal(java.lang.String unitName,
java.lang.String attName)
Deleting the nominal belonging specified attribute (like field in database table) from specified unit.
|
boolean |
deleteProfile(java.lang.String profileUnit,
Profile condition)
Deleting profiles from specified unit and specified condition.
|
boolean |
deleteRating(RatingVector vRating)
Deleting ratings of specified rating vector into rating matrix of framework database.
|
boolean |
deleteUnitData(java.lang.String unitName)
Clearing content of a unit specified by name.
|
boolean |
deleteUserProfile(int userId)
Deleting a user profile via specified user identification (user ID).
|
boolean |
deleteUserRating(int userId)
Deleting all ratings of a specified user.
|
boolean |
dropSchema()
Each database has a schema as the structure of such database.
|
boolean |
dropUnit(java.lang.String unitName)
Removing (dropping) the unit specified by name.
|
Profile |
getAccount(java.lang.String accName)
Getting profile of account by account name.
|
ProviderAssoc |
getAssoc()
Provider uses provider associator represented by
ProviderAssoc for low-level data operators. |
InterchangeAttributeMap |
getAttributeMap(InternalRecord internalRecord)
Getting an
interchanged attribute map by specified internal record. |
InterchangeAttributeMap |
getAttributeMapByExternal(ExternalRecord externalRecord)
Getting an
interchanged attribute map by specified external record. |
DataConfig |
getConfig()
Provider is initialized (set up) based on the configuration. |
Profile |
getConfigProfile(java.lang.String att)
Each provider has a configuration and store such configuration in unit as profiles.
|
CTSManager |
getCTSManager()
Provider manipulates context and context template via context template schema manager (CTS manager) represented by CTSManager . |
InterchangeAttributeMap |
getItemAttributeMap(int itemId)
Some item information is stored in outside database different from the framework database.
|
AttributeList |
getItemAttributes()
Getting attribute list of profiles of items in framework database.
|
Profile |
getItemProfile(int itemId)
Getting profile of a specified item.
|
RatingVector |
getItemRatingVector(int itemId)
Getting a rating vector (a vector of ratings) of specified item.
|
NominalList |
getNominalList(java.lang.String unitName,
java.lang.String attribute)
Getting nominal list of specified attribute of specified unit.
|
Profile |
getProfile(java.lang.String profileUnit,
Profile condition)
Getting profile from specified unit with specified condition.
|
AttributeList |
getProfileAttributes(ParamSql selectSql,
Profile condition)
Getting attribute list of profiles queried by specified select SQL statement and specified unit.
|
AttributeList |
getProfileAttributes(java.lang.String profileUnit)
Getting attribute list of profiles in specified unit.
|
Fetcher<java.lang.Integer> |
getProfileIds(java.lang.String profileUnit)
Getting many profile identifications (IDs) from specified unit.
|
int |
getProfileMaxId(java.lang.String profileUnit)
If the identification (ID) of each profile read from specified unit is integer,
this method returns the maximum ID among many IDs.
|
Fetcher<Profile> |
getProfiles(ParamSql selectSql,
Profile condition)
Getting many profiles queried by specified select SQL statement with specified condition.
|
Fetcher<Profile> |
getProfiles(java.lang.String profileUnit,
Profile condition)
Getting many profiles from specified unit with specified condition.
|
Fetcher<RatingTriple> |
getRatings()
Retrieving all ratings from rating matrix of framework database via a fetcher.
|
RecommendParam |
getRecommendParam(int userId)
Creating a recommendation parameter for a user identified by given user ID.
|
UnitList |
getUnitList()
Getting the list of units in framework database.
|
InterchangeAttributeMap |
getUserAttributeMap(int userId)
Some user information is stored in outside database different from the framework database.
|
AttributeList |
getUserAttributes()
Getting attribute list of profiles of users in framework database.
|
Profile |
getUserProfile(int userId)
Getting profile of a specified user.
|
RatingVector |
getUserRatingVector(int userId)
Getting a rating vector (a vector of ratings) of specified user.
|
boolean |
importData(DataConfig src,
boolean create,
ProgressListener registeredListener)
Initializing this framework database by importing data from other database.
|
boolean |
importData(Dataset src,
boolean create,
ProgressListener registeredListener)
Initializing this framework database by importing data from other database.
|
boolean |
importData(Provider src,
boolean create,
ProgressListener registeredListener)
Initializing this framework database by importing data from other database.
|
boolean |
insertAccount(Profile acc)
Inserting a new account (account profile) into framework database.
|
boolean |
insertAttributeMap(InterchangeAttributeMap attributeMap)
Inserting a specified
interchanged attribute map into framework database. |
boolean |
insertConfigProfile(Profile cfgProfile)
Each provider has a configuration and store such configuration in unit as profiles.
|
boolean |
insertItemProfile(Profile item,
ExternalRecord externalRecord)
Inserting specified item profile via specified external record.
|
boolean |
insertNominal(java.lang.String unitName,
java.lang.String attName,
Nominal nominal)
Inserting the specified nominal into specified unit with regard to specified attribute name.
|
boolean |
insertProfile(java.lang.String profileUnit,
Profile profile)
Inserting specified profile into specified unit.
|
boolean |
insertRating(int userId,
int itemId,
Rating rating)
Inserting a specified rating that a specified user gives on a specified item into rating matrix of framework database.
|
boolean |
insertRating(RatingVector vRating)
Inserting ratings in the specified rating vector into rating matrix of framework database.
|
boolean |
insertUserProfile(Profile user,
ExternalRecord externalRecord)
Inserting specified user profile via specified external record.
|
boolean |
updateAccount(Profile acc)
Updating the specified account (specified account profile) in framework database.
|
boolean |
updateAttributeMap(InterchangeAttributeMap attributeMap)
Updating a specified
interchanged attribute map in framework database. |
boolean |
updateConfigProfile(Profile cfgProfile)
Each provider has a configuration and store such configuration in unit as profiles.
|
boolean |
updateItemProfile(Profile item)
Updating specified item profile.
|
boolean |
updateNominal(java.lang.String unitName,
java.lang.String attName,
Nominal nominal)
Updating the specified nominal with regard to specified unit and specified attribute.
|
boolean |
updateProfile(java.lang.String profileUnit,
Profile profile)
Updating specified profile in specified unit.
|
boolean |
updateRating(int userId,
int itemId,
Rating rating)
Update a specified rating that a specified user gives on a specified item.
|
boolean |
updateRating(RatingVector vRating)
Updating ratings of the specified rating vector into rating matrix of framework database.
|
boolean |
updateUserProfile(Profile user)
Updating specified user profile.
|
boolean |
validateAccount(java.lang.String account,
java.lang.String password,
int privileges)
Checking whether an account is valid with regard to specified password and specified privileges.
|
CTSManager getCTSManager()
Provider
manipulates context and context template via context template schema manager (CTS manager) represented by CTSManager
.
This method returns the internal CTS manager of the provider.CTSManager
DataConfig getConfig()
Provider
is initialized (set up) based on the configuration.
This method returns the configuration of provider.ProviderAssoc getAssoc()
ProviderAssoc
for low-level data operators.
The method returns the internal provider associator of this provider.ProviderAssoc
of this provider.Profile getConfigProfile(java.lang.String att)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).att
- specified attribute.boolean insertConfigProfile(Profile cfgProfile)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).cfgProfile
- specified new entry of the configuration as profile.boolean updateConfigProfile(Profile cfgProfile)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).cfgProfile
- specified configuration.boolean deleteConfigProfile(java.lang.String cfgAttribute)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).cfgAttribute
- specified attribute name.Fetcher<RatingTriple> getRatings()
Fetcher
of RatingTriple
.boolean insertRating(int userId, int itemId, Rating rating)
userId
- specified user identification (user ID).itemId
- specified item identification (user ID).rating
- specified rating that a specified user gives on a specified item.boolean insertRating(RatingVector vRating)
RatingVector
contains ratings.
If rating vector is user rating vector, it contains all ratings of the same user on many items.
If rating vector is item rating vector, it contains all ratings of many users on the same item.vRating
- specified rating vector.boolean updateRating(int userId, int itemId, Rating rating)
userId
- specified user identification (user ID).itemId
- specified item identification (item ID).rating
- specified rating that a specified user gives on a specified item.boolean updateRating(RatingVector vRating)
RatingVector
contains ratings.
If rating vector is user rating vector, it contains all ratings of the same user on many items.
If rating vector is item rating vector, it contains all ratings of many users on the same item.vRating
- specified rating vector.boolean deleteRating(RatingVector vRating)
RatingVector
contains ratings.
If rating vector is user rating vector, it contains all ratings of the same user on many items.
If rating vector is item rating vector, it contains all ratings of many users on the same item.vRating
- specified rating vector.RatingVector getUserRatingVector(int userId)
RatingVector
contains ratings.
If rating vector is user rating vector, it contains all ratings of the same user on many items.
If rating vector is item rating vector, it contains all ratings of many users on the same item.userId
- specified user identification (user ID).boolean deleteUserRating(int userId)
userId
- specified user identification (user ID).Profile getUserProfile(int userId)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).userId
- specified user identification (user ID).AttributeList getUserAttributes()
Attribute
class indicates the data type, which is also a wrapper of data type. Attribute list represented by AttributeList
is the list of many attributes.
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types.AttributeList
that shared by user profiles.InterchangeAttributeMap getUserAttributeMap(int userId)
interchanged attribute map
represented by InterchangeAttributeMap
class.
Note, interchanged attribute map
includes both internal record and external record.
Internal record
represents a single-value record of a unit
in framework database.
External record
represents a single-value record of a unit
in other database (different from the framework database).
There is a special unit (having name "hdp_attribute_map", for example) for storing many interchanged attribute maps
;userId
- specified user identification (user ID).InterchangeAttributeMap
class.boolean insertUserProfile(Profile user, ExternalRecord externalRecord)
External record
represents a single-value record of a unit
in other database (different from the framework database).
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).user
- specified user profile.externalRecord
- specified external record.boolean updateUserProfile(Profile user)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).user
- specified user profile.boolean deleteUserProfile(int userId)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).userId
- specified user identification (user ID).RecommendParam getRecommendParam(int userId)
estimate(...)
and recommend(...)
of Recommender
class.userId
- specified user identification (user ID).RecommendParam
class which is input for recommendation tasks.RatingVector getItemRatingVector(int itemId)
RatingVector
contains ratings.
If rating vector is user rating vector, it contains all ratings of the same user on many items.
If rating vector is item rating vector, it contains all ratings of many users on the same item.itemId
- specified item identification (item ID).boolean deleteItemRating(int itemId)
itemId
- specified item identification (item ID).Profile getItemProfile(int itemId)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).itemId
- specified item identification (user ID).AttributeList getItemAttributes()
Attribute
class indicates the data type, which is also a wrapper of data type. Attribute list represented by AttributeList
is the list of many attributes.
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types.AttributeList
that shared by user profiles.InterchangeAttributeMap getItemAttributeMap(int itemId)
interchanged attribute map
represented by InterchangeAttributeMap
class.
Note, interchanged attribute map
includes both internal record and external record.
Internal record
represents a single-value record of a unit
in framework database.
External record
represents a single-value record of a unit
in other database (different from the framework database).
There is a special unit (having name "hdp_attribute_map", for example) for storing many interchanged attribute maps
;itemId
- specified item identification (item ID).InterchangeAttributeMap
class.boolean insertItemProfile(Profile item, ExternalRecord externalRecord)
External record
represents a single-value record of a unit
in other database (different from the framework database).
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).item
- specified item profile.externalRecord
- specified external record.boolean updateItemProfile(Profile item)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).item
- specified item profile.boolean deleteItemProfile(int itemId)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).itemId
- specified item identification (user ID).NominalList getNominalList(java.lang.String unitName, java.lang.String attribute)
NominalList
contains nominal (s). Nominal data indicates discrete and non-number data such as weekdays {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday}. Nominal data is called nominal
, in brief, represented by Nominal
class.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
Attribute represented by Attribute
class indicates the data type, which is also a wrapper of data type.
If unit is database table, an attribute is identical to a field.unitName
- specified unit name.attribute
- specified attribute.boolean insertNominal(java.lang.String unitName, java.lang.String attName, Nominal nominal)
Nominal
indicates discrete and non-number data such as weekdays {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday}.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
Attribute represented by Attribute
class indicates the data type, which is also a wrapper of data type.
If unit is database table, an attribute is identical to a field.unitName
- specified unit name.attName
- specified attribute name.nominal
- specified nominal.boolean updateNominal(java.lang.String unitName, java.lang.String attName, Nominal nominal)
Nominal
indicates discrete and non-number data such as weekdays {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday}.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
Attribute represented by Attribute
class indicates the data type, which is also a wrapper of data type.
If unit is database table, an attribute is identical to a field.unitName
- specified unit name.attName
- specified attribute name.nominal
- specified nominal.boolean deleteNominal(java.lang.String unitName, java.lang.String attName)
Nominal
indicates discrete and non-number data such as weekdays {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday}.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
Attribute represented by Attribute
class indicates the data type, which is also a wrapper of data type.
If unit is database table, an attribute is identical to a field.unitName
- specified unit name.attName
- specified attribute name to which the deleted nominal belongs.boolean deleteNominal(java.lang.String unitName)
Nominal
indicates discrete and non-number data such as weekdays {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday}.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
If unit is database table, an attribute is identical to a field.unitName
- specified unit name.InterchangeAttributeMap getAttributeMap(InternalRecord internalRecord)
interchanged attribute map
by specified internal record.
Note, interchanged attribute map
includes both internal record and external record.
Internal record
represents a single-value record of a unit
in framework database.
External record
represents a single-value record of a unit
in other database (different from the framework database).
There is a special unit (having name "hdp_attribute_map", for example) for storing many interchanged attribute maps
;internalRecord
- specified internal record.interchanged attribute map
by specified internal record.InterchangeAttributeMap getAttributeMapByExternal(ExternalRecord externalRecord)
interchanged attribute map
by specified external record.
Note, interchanged attribute map
includes both internal record and external record.
Internal record
represents a single-value record of a unit
in framework database.
External record
represents a single-value record of a unit
in other database (different from the framework database).
There is a special unit (having name "hdp_attribute_map", for example) for storing many interchanged attribute maps
;externalRecord
- specified external record.interchanged attribute map
by specified external record.boolean insertAttributeMap(InterchangeAttributeMap attributeMap)
interchanged attribute map
into framework database.
Note, interchanged attribute map
includes both internal record and external record.
Internal record
represents a single-value record of a unit
in framework database.
External record
represents a single-value record of a unit
in other database (different from the framework database).
There is a special unit (having name "hdp_attribute_map", for example) for storing many interchanged attribute maps
;attributeMap
- specified interchanged attribute map
.boolean updateAttributeMap(InterchangeAttributeMap attributeMap)
interchanged attribute map
in framework database.
Note, interchanged attribute map
includes both internal record and external record.
Internal record
represents a single-value record of a unit
in framework database.
External record
represents a single-value record of a unit
in other database (different from the framework database).
There is a special unit (having name "hdp_attribute_map", for example) for storing many interchanged attribute maps
;attributeMap
- specified interchanged attribute map
.boolean deleteAttributeMap(InternalRecord internalRecord)
interchanged attribute map
by specified internal record.
Note, interchanged attribute map
includes both internal record and external record.
Internal record
represents a single-value record of a unit
in framework database.
External record
represents a single-value record of a unit
in other database (different from the framework database).
There is a special unit (having name "hdp_attribute_map", for example) for storing many interchanged attribute maps
;internalRecord
- specified internal record.boolean deleteAttributeMap(java.lang.String internalUnit)
interchanged attribute maps
by specified internal unit.
Note, interchanged attribute map
includes both internal record and external record.
Internal record
represents a single-value record of a unit
in framework database.
External record
represents a single-value record of a unit
in other database (different from the framework database).
There is a special unit (having name "hdp_attribute_map", for example) for storing many interchanged attribute maps
;internalUnit
- specified internal unit.Profile getAccount(java.lang.String accName)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).
Account is the information of a user who has access to the server with her/his previleges. Account is modeled and stored in framework database as profile.accName
- specified account name.boolean validateAccount(java.lang.String account, java.lang.String password, int privileges)
account
- specified account name.password
- specified password.privileges
- specified privileges.boolean insertAccount(Profile acc)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).
Account is the information of a user who has access to Hudup server with her/his previleges. Account is modeled and stored in framework database as profile.acc
- specified account profile.boolean updateAccount(Profile acc)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).
Account is the information of a user who has access to Hudup server with her/his previleges. Account is modeled and stored in framework database as profile.acc
- specified profile of account.boolean deleteAccount(java.lang.String accName)
accName
- specified account name.Profile getProfile(java.lang.String profileUnit, Profile condition)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.profileUnit
- specified unit name.condition
- specified condition to select profile to be returned, please see the net.hudup.core.data.Condition
.Fetcher<Profile> getProfiles(java.lang.String profileUnit, Profile condition)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
Fetcher is the interface for iterating each item of an associated collection.profileUnit
- specified unit name.condition
- specified condition to select profile to be returned, please see the net.hudup.core.data.Condition
.Fetcher
of profiles read from specified unit with specified condition.Fetcher<Profile> getProfiles(ParamSql selectSql, Profile condition)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).
Fetcher is the interface for iterating each item of an associated collection.Fetcher<java.lang.Integer> getProfileIds(java.lang.String profileUnit)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
Fetcher is the interface for iterating each item of an associated collection.profileUnit
- specified unit name.Fetcher
of profile IDS from specified unit.int getProfileMaxId(java.lang.String profileUnit)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.profileUnit
- specified unit name.AttributeList getProfileAttributes(java.lang.String profileUnit)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).
Attribute represented by Attribute
class indicates the data type, which is also a wrapper of data type. Attribute list represented by AttributeList
is the list of many attributes.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.profileUnit
- specified unit name.AttributeList getProfileAttributes(ParamSql selectSql, Profile condition)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).
Attribute represented by Attribute
class indicates the data type, which is also a wrapper of data type. Attribute list represented by AttributeList
is the list of many attributes.
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.selectSql
- specified select SQL statement represented by ParamSql
class.condition
- specified condition to select profile to be returned, please see the net.hudup.core.data.Condition
.boolean insertProfile(java.lang.String profileUnit, Profile profile)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.profileUnit
- specified unit name.profile
- specified profile.boolean updateProfile(java.lang.String profileUnit, Profile profile)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.profileUnit
- specified unit name.profile
- specified profile.boolean deleteProfile(java.lang.String profileUnit, Profile condition)
Profile
is one of important data structures, like record of table in database, has a list of values. Each value belongs to a particular attribute. Profile uses a attribute list to specify its data types. Every object can be modeled as profile to be stored in archive (file).
Unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.profileUnit
- specified unit name.condition
- specified condition to select profile to be returned, please see the net.hudup.core.data.Condition
.UnitList getUnitList()
unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
If unit
is table in database, this method returns a list of tables in framework database.boolean createUnit(java.lang.String unitName, AttributeList attList)
unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.
Attribute represented by Attribute
class indicates the data type, which is also a wrapper of data type. Attribute list represented by AttributeList
is the list of many attributes.unitName
- specified unit name.attList
- specified attribute list.boolean deleteUnitData(java.lang.String unitName)
unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.unitName
- name of specified unit whose content is cleared.boolean dropUnit(java.lang.String unitName)
unit
represents a CSV file, database table, Excel sheet, etc. Unit is used to store object such as user profile, item profile, rating matrix, etc.unitName
- specified name of unit which be removed (dropped) from framework database.boolean createSchema(AttributeList userAttList, AttributeList itemAttList)
userAttList
- specified user attribute list.itemAttList
- specified item attribute list.boolean dropSchema()
boolean importData(Provider src, boolean create, ProgressListener registeredListener)
ProgressListener
.
Programmers need to implement ProgressListener
in order to specify how progress listener observes and does some tasks for the given process (importing data).src
- other provider that provides the other database.create
- whether or not re-creating the current framework database.registeredListener
- registered progress listener that observes the process of importing data.boolean importData(Dataset src, boolean create, ProgressListener registeredListener)
ProgressListener
.
Programmers need to implement ProgressListener
in order to specify how progress listener observes and does some tasks for the given process (importing data).src
- dataset of other database.create
- whether or not re-creating the current framework database.registeredListener
- registered progress listener that observes the process of importing data.boolean importData(DataConfig src, boolean create, ProgressListener registeredListener)
ProgressListener
.
Programmers need to implement ProgressListener
in order to specify how progress listener observes and does some tasks for the given process (importing data).src
- configuration of other database.create
- whether or not re-creating the current framework database.registeredListener
- registered progress listener that observes the process of importing data.void close()
close
in interface AutoCloseable
java.lang.Object clone()
Cloneable


Forms
Celery seakale
Dulse daikon
Zucchini garlic
Catsear azuki bean
Dandelion bunya
Rutabaga
Simple Editor
Developer Mode
GitHub
COPY YOUR CODE
×
Form Color
Change Form Color
Default
Primary
Secondary
Success
Danger
Warning
Info
Light
Dark
Labels & Font
Font Weight
Light
Normal
Bold
Text Align
Left Align
Right Align
Input Fields
Number of Fields
You may add up to 3.
ADD FIELD
Checkboxes
Number of Checkboxes
You may add up to 3.
ADD CHECKBOX
Radio Buttons
Number of Radio Buttons
You may add up to 3.

Input ID:
Placeholder Text:
Pre-filled Value:
Max Length:
Input Type:
Select...
Text
Number
Email
Password
Date


Using Google Sheets as a database.
Installation
Install: npm install --save @sheetbase/database
Usage:
// 1. import module
import { DatabaseModule } from "@sheetbase/database";
// 2. create an instance
export class App {
// the object
databaseModule: DatabaseModule;
// initiate the instance
constructor() {
this.databaseModule = new DatabaseModule(/* options */);
}
}
Options
| Name | Type | Description |
|---|---|---|
| databaseId | string |
|
| keyFields? | undefined | object |
|
| security? | boolean | object |
|
| securityHelpers? | SecurityHelpers |
Lib
The Lib
class.
Lib properties
Lib methods
| Function | Returns type | Description |
|---|---|---|
| registerRoutes(routeEnabling?, middlewares?) | RouterService<> |
Expose the module routes |
registerRoutes(routeEnabling?, middlewares?)
Expose the module routes
Parameters
| Param | Type | Description |
|---|---|---|
| routeEnabling | true | DisabledRoutes |
|
| middlewares | Middlewares | RouteMiddlewares |
Returns
RouterService<>
Routing
DatabaseModule provides REST API endpoints allowing clients to access server resources. Theses enpoints are not exposed by default, to expose the endpoints:
DatabaseModule.registerRoutes(routeEnabling?);
Errors
DatabaseModule returns these routing errors, you may use the error code to customize the message:
database/content-no-id
: No doc id.database/no-input
: No path/table/sheet.Routes
Routes overview
| Route | Method | Disabled | Description |
|---|---|---|---|
| /database/content | GET |
Get doc content | |
| /database | DELETE |
true |
Delete an item from the database (proxy to: post /database) |
| /database | GET |
true |
Get data from the database |
| /database | PATCH |
true |
Update an item from the database (proxy to: post /database) |
| /database | POST |
true |
Add/update/delete data from database |
| /database | PUT |
true |
Add a new item do the database (proxy to: post /database) |
Routes detail
GET
/database/content
Get doc content
Request query
| Name | Type | Description |
|---|---|---|
| docId | string |
|
| style? | DocsContentStyles |
Response
object
DELETE
/database
DISABLED
Delete an item from the database (proxy to: post /database)
Request body
| Name | Type | Description |
|---|---|---|
| path | string |
|
| table? | string |
|
| sheet? | string |
|
| id? | string |
|
| key? | string |
Response
void
GET
/database
DISABLED
Get data from the database
Request query
| Name | Type | Description |
|---|---|---|
| path? | string |
|
| table? | string |
|
| sheet? | string |
|
| id? | string |
|
| key? | string |
|
| type? | 'object' |
|
| query? | string |
|
| segment? | string |
|
| order? | string |
|
| orderBy? | string |
|
| limit? | number |
|
| offset? | number |
Response
Record<string, unknown> | unknown[]
PATCH
/database
DISABLED
Update an item from the database (proxy to: post /database)
Request body
| Name | Type | Description |
|---|---|---|
| path | string |
|
| table? | string |
|
| sheet? | string |
|
| id? | string |
|
| key? | string |
|
| data? | unknown |
Response
void
POST
/database
DISABLED
Add/update/delete data from database
Request body
| Name | Type | Description |
|---|---|---|
| path | string |
|
| table? | string |
|
| sheet? | string |
|
| id? | string |
|
| key? | string |
|
| data? | unknown |
|
| increasing? | Record |
|
| clean? | boolean |
Response
void
PUT
/database
DISABLED
Add a new item do the database (proxy to: post /database)
Request body
| Name | Type | Description |
|---|---|---|
| path | string |
|
| table? | string |
|
| sheet? | string |
|
| id? | string |
|
| key? | string |
|
| data? | unknown |
Response
void
@sheetbase/database is released under the MIT license.
Generated using TypeDoc


;;; +=========================================================================+ ;;; | Copyright (c) 2002, 2003, 2004 JP Massar, Jeff Shrager, Mike Travers | ;;; | | ;;; | Permission is hereby granted, free of charge, to any person obtaining | ;;; | a copy of this software and associated documentation files (the | ;;; | "Software"), to deal in the Software without restriction, including | ;;; | without limitation the rights to use, copy, modify, merge, publish, | ;;; | distribute, sublicense, and/or sell copies of the Software, and to | ;;; | permit persons to whom the Software is furnished to do so, subject to | ;;; | the following conditions: | ;;; | | ;;; | The above copyright notice and this permission notice shall be included | ;;; | in all copies or substantial portions of the Software. | ;;; | | ;;; | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ;;; | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ;;; | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ;;; | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ;;; | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ;;; | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ;;; | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ;;; +=========================================================================+
Copyright (c) 2003 by Jeff Shrager and JP Massar
Defprotocol is a rather involved mechanism for doing something that is conceptually simple: making something general (a program) out of a set of specific instructions. As such, it is best to start in right away with an example, follow it with some discussion, and leave the detailed specification for the documentation.
Suppose we aren't quite sure of the BioLisp code to do good old Pythagoras' sum of squares. In standard mathmatical notation we want to define f(x,y) = sqrt (x*x + y*y). But how do we do that in Lisp?
Since we don't have an X or a Y defined, we'll use concrete values for our testing, namely 3 and 4. Okay, we'll see if we can square a number, by typing (* 3 3) into the Command Entry Box and looking at the output when when hit ENTER.
<5>> (* 3 3) :: 9
Well, that worked. And clearly we can square 4 as well:
<6>> (* 4 4) :: 16
Now we want to add our two results. Notice the line number that occurs in the output area every time we evaluate anything. This is where it becomes significant!!
<7>> (+ (hop 5) (hop 6)) :: 25
What on Earth ???? What is HOP ???? HOP stands for History-OutPut. The History is the set of things you typed in (inputs) and the set of results (outputs) you got back. (HOP <number>) says to get me the result from line <number>. The result of line 5 was 9, and the result of line 6 was 16, so (+ (HOP 5) (HOP 6)) is 16.
Ok, the last thing we need to do is take the square root and we're done with our experimenting.
<8>> (square-root *) :: attempt to call `SQUARE-ROOT' which is an undefined function.
Ruh Roh. I guess the function for taking the square root isn't called square-root. Who designed this language anyway? A quick visit to the Hyperspec and a quick scan of the symbols beginning with 's' tells us that the function is called 'sqrt'.
<9>> (sqrt **) :: 5.0
Note that '*' refers to the latest result, and likewise '**' refers to the result previous to that. You can probably guess what '***' refers to.
So we've figured out the steps necessary to honor Pythagoras. Now all we have to do is combine them and use variables instead of specific numbers, and we'll be able to diagonalize anything! What we need to do is use two variables -- call them X and Y, in place of 3 and 4. And we need to have our program execute steps 5, 6, 7 and 9 from above (leaving out our unfortunate, but understandable, error on line 8).
Here we go (type this into the Expression Entry box and hit EVAL):
<10>> (defprotocol pythag ((x :value 3) (y :value 4)) (steps 5 6 7 9)) :: PYTHAG
This defines a new function PYTHAG, which accepts two arguments, X and Y. The symbol X is substituted for the value 3 in every line (step) of the function, and the symbol Y is substituted for the value 4 likewise. The function definition consists of the input code on lines 5, 6, 7 and 9, but with the above substitutions made. The result of the function is the result of executing the last line.
Effectively, we've defined a function which does, in Lispese,
(sqrt (+ (* x x) (* y y))
We can see what the function 'really' looks like by using the SHOW-PROTOCOL primitive:
<11>> (show-protocol 'pythag) :: ;; Protocol substitution function: (DEFUN PYTHAG (&KEY (Y NIL) (X NIL)) (LET ($$::S19-RESULT $$::S20-RESULT $$::S21-RESULT $$::S23-RESULT) (DECLARE (IGNORABLE $$::S19-RESULT $$::S20-RESULT $$::S21-RESULT $$::S23-RESULT)) (PROGN (SETQ $$::S19-RESULT (* X X)) (SETQ $$::S20-RESULT (* Y Y)) (SETQ $$::S21-RESULT (+ $$::S19-RESULT $$::S20-RESULT)) (SETQ $$::S23-RESULT (SQRT $$::S21-RESULT))))) ;; Original history lines used: Line 19: (* 3 3) Line 20: (* 4 4) Line 21: (+ (HOP 19) (HOP 20)) Line 23: (SQRT **) ;; Original DEFPROTOCOL form: (DEFPROTOCOL PYTHAG ((X :VALUE 3) (Y :VALUE 4)) (STEPS 19 20 21 23))
On second thought, maybe we don't want to know what it 'really' looks like, because in fact it looks a lot like line noise, or at best the output of a compiler, one not particularly designed to produce human-readable code.
What we really care about is whether it works, so let's try it out:
<12>> (pythag 6 8) :: Illegal keyword given: 6.
Sigh. What's wrong now? Well, DEFPROTOCOL is specified to create a function which accepts keyword arguments, and keyword arguments alone. (It probably should be more flexible, but that would make it even more complicated!). So if it wants keywords, we are going to have to give it keywords:
<13>> (pythag :x 6 :y 8) :: 10.0
Muy bien. Pythagoras, were he still alive, would be proud.
So how do you use this in a more practical, if less Grecian, context? Let's do something with a microarray table.
<14>> (read-microarray-table "biol:data;hiharadat.tbl") :: #<COMMON-LISP-USER::TABLE-DATA @ #x728efea2>
We read in a particular microarray table, taken from the infamous Hihara data. We'll see in a moment how to generalize so that we can read in any file of microarray data we'd like.
Let's figure out which of the genes in this table were stimulated initially to a value of more than 2.0, save those genes away and determine how many genes were so stimulated.
<15>> (table-data-select * #'(lambda (v) (> (aref v 0) 2.0)) :return :geneid) :: -- You should get a long list of genes here, which we won't reproduce -- <16>> (setq *query-genes* *) :: -- The same long list of genes -- <17>> (length **) :: 127So there are 127 genes in the table who's first data point is greater than 2.0. This seems somewhat useful, but needs to be generalized. We'd like to be able to ask this question of any table, and we'd like to ask the question about any data point, not just the first one. Here's a defprotocol definition that (almost) does this generalization (we'll explain it in just a minute):
<17>> (defprotocol stimulated-genes (((table "biol:data;hiharadat.tbl") :line 14 :position 2) ((datapoint 0) :line 15 :value 0))) (steps 14 15 16 17) :: Position 2 does not exist in history form
Oops. Line 14 doesn't have a position 2, it only has positions 0 and 1. (Like most programming languages, Lisp, and hence BioLisp, start counting from 0). Let's try again:
<17>> (defprotocol stimulated-genes (((table "biol:data;hiharadat.tbl") :line 14 :position 1) ((datapoint 0) :line 15 :value 0))) (steps 14 15 16 17) :: ; While compiling STIMULATED-GENES: Warning: Free reference to undeclared variable *QUERY-GENES* assumed special. STIMULATED-GENES
We still get a warning, but that's OK. It's telling us we never declared *QUERY-GENES* as a global variable, and that's true, we didn't. But some warnings can sometimes be ignored, and this is one of them -- the program will work just fine.
But what does all the complicated stuff after 'stimulate-genes' in the DEFPROTOCOL definition mean?
We're declaring that the function STIMULATED-GENES will take two keyword parameters (recall that all defprotocol parameters are keywords) called TABLE and DATAPOINT. The first parameter, TABLE is to be given a default value of "biol:data;hiharadat.tbl" if no value is provided when it is called. The second parameter, DATAPOINT, likewise has a default value of 0.
So we see that if you want to give a parameter a default value, put the name of the parameter and its default value into a list. If not, as with our first example, we can just use the name of the parameter followed by the substitution instructions.
The ':line 14' means substitute in 'TABLE' on line 14, and the ':position 1' means substitute in 'TABLE' for whatever happens to be in position 1 on line 14 (recall again we start with position 0).
We can therefore restrict our substitutions to a particular line, and we further restrict a subsititution to a particular position.
Now with respect to DATAPOINT, we have ':line 15 :value 0', which means do the substitution on line 15, and substitute 'DATAPOINT' for every occurrence of 0 in the instruction, just as was done in the first DEFPROTOCOL example. There's only one occurrence as it happens, and that is the index argument to AREF. So instead of getting the 0th value from our array, we've generalized things to get the 'DATAPOINT'-th value from the array.
Theoretically at least, we now have a function, STIMULATED-GENES, which can read any microarray table file we give it, and store into the variable *QUERY-GENES* the list of genes which are stimulated by more than 2.0 as their Nth data point, and return the number of genes so stimulated. Let's try it:
<18>> (stimulated-genes :datapoint 1) :: 144 <19>> *query-genes* :: -- Another long list of genes --
It looks like it worked. Since we didn't give it a microarray file as an argument, it defaulted to the hihara data file. But this time it compared against data point 1, rather than data point 0, and we see that 144, compared to 127, genes were stimulated sufficiently when the 2nd data point value was used vs. the 1st.
This second example is a bit more complicated in terms of what it does with substitutions, and gives you a good flavor of what can be done. To really understand the capabilities, syntax and semantics of the substitutions you will need to look at the formal specification, which you can get from one of the people who runs this site.
It's all well and good to be able to define a DEFPROTOCOL function to generalize what you've been doing, but it's probably not terribly useful unless you can store it away and load it back up another session and/or another day. And sure enough, BioLingua allows you to do this using the SAVE-PROTOCOLS and LOAD-PROTOCOLS commands.
<20>> (save-protocols 'stimulated-genes) :: "/home/visitors/massar/protocols.lisp"
By default, SAVE-PROTOCOLS will save a protocol (or a list of protocols) to a file in your BioLingua workspace directory called 'protocols.lisp'. In this case, user MASSAR's workspace directory is /home/visitors/massar/.
Now if we were to come back days later and login again, we can load our protocols file, and have all our protocols recreated:
<1>> (fboundp 'stimulated-genes) :: NIL <2>> (load-protocols) :: ;;; Compiling file /home/visitors/massar/protocols.lisp ; While compiling STIMULATED-GENES: Warning: Free reference to undeclared variable *QUERY-GENES* assumed special. Warning: Free reference to undeclared variable *QUERY-GENES* assumed special. /home/visitors/massar/protocols.lisp. ;;; Writing fasl file /home/visitors/massar/protocols.fasl ;;; Fasl write complete ; Fast loading /home/visitors/massar/protocols.fasl "/home/visitors/massar/protocols.lisp" <3>> (fboundp 'stimulated-genes) :: #<Function STIMULATED-GENES>
First we see that the function STIMULATED-GENES is not defined (remember, this is a different session than before). Then we load the protocols we've saved, and we see that it now is defined, and we can indeed use it:
<4>> (stimulated-genes :datapoint 2) :: 137
Note that before the protocols file was loaded, BioLingua compiled the file, so it would run as fast as possible. We see that we got a similar warning to the warning we got before, about *QUERY-GENES*, and, again, we can ignore it. Our next session, if we haven't changed the file by saving more protocols to it, it will already be compiled and we won't see the warning as it loads.
You can save a protocol to a file of your own choosing by providing a filename, like so:
(save-protocols 'my-protocol "my-protocol-file.lisp")
and then
(load-protocols "my-protocol-file.lisp")


644_aiueo-2.py
class Solution:
def minCostConnectPoints(self, points: List[List[int]]) -> int:
dis = [[0]*len(points) for _ in range(len(points))]
for i in range(len(points)):
for j in range(len(points)):
if i == j : continue
dis[i][j]= abs(points[i][0]-points[j][0])+abs(points[i][1]-points[j][1])
def minnode(n, keyval, mstset):
mini =<PHONE_NUMBER>99
mini_index = None
for i in range(n):
if (mstset[i] == False and
keyval[i] < mini):
mini = keyval[i]
mini_index = i
return mini_index
def findcost(n, city):
parent = [None] * n
keyval = [None] * n
mstset = [None] * n
for i in range(n):
keyval[i] =<PHONE_NUMBER>999
mstset[i] = False
parent[0] = -1
keyval[0] = 0
for i in range(n - 1):
u = minnode(n, keyval, mstset)
mstset[u] = True
for v in range(n):
if (city[u][v] and mstset[v] == False and
city[u][v] < keyval[v]):
keyval[v] = city[u][v]
parent[v] = u
cost = 0
for i in range(1, n):
cost += city[parent[i]][i]
return cost
return findcost(len(dis),dis)


Test page
A
B
C
Z
Select something:
Apple
Peach
Something
Select checkbox.
One
Two
Three
Second button


GroupLayout
layout manager combined with a builder tool to lay out your GUI. One such builder tool is the
NetBeans IDE. Otherwise, if you want to code by hand and do not want to use GroupLayout
, then GridBagLayout
is recommended as the next most flexible and powerful layout manager.
GridBagLayout
.
Click the Launch button to run GridBagLayoutDemo using Java™ Web Start (download JDK 6). Alternatively, to compile and run the example yourself, consult the example index.
The code for GridBagDemo is in
GridBagLayoutDemo.java
.
GridBagLayout
is one of the most flexible —
and complex —
layout managers the Java platform provides.
A GridBagLayout
places components
in a grid of rows and columns,
allowing specified components
to span multiple rows or columns.
Not all rows necessarily have the same height.
Similarly, not all columns necessarily have the same width.
Essentially, GridBagLayout
places components
in rectangles (cells) in a grid,
and then uses the components' preferred sizes
to determine how big the cells should be.
The following figure shows the grid for the preceding applet. As you can see, the grid has three rows and three columns. The button in the second row spans all the columns; the button in the third row spans the two right columns.
If you enlarge the window as shown in the following figure,
you will notice that the bottom row,
which contains Button 5,
gets all the new vertical space.
The new horizontal space
is split evenly among all the columns.
This resizing behavior is based on weights
the program assigns to individual components
in the GridBagLayout
.
You will also notice that each component
takes up all the available horizontal space —
but not (as you can see with button 5)
all the available vertical space.
This behavior is also specified by the program.
The way the program specifies
the size and position characteristics
of its components
is by specifying constraints for each component.
The preferred approach to set constraints on a component is to use the Container.add
variant, passing it a GridBagConstraints
object, as demonstrated in the next sections.
The following sections explain the constraints you can set and provide examples.
GridBagLayout
.
You will see a more detailed example
in the next section.
JPanel pane = new JPanel(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); //For each component to be added to this container: //...Create the component... //...Set instance variables in the GridBagConstraints instance... pane.add(theComponent, c);
GridBagConstraints
instance
for multiple components, even if the components have different constraints.
However, it is recommended that you do not reuse
GridBagConstraints
, as this can very easily lead to you introducing
subtle bugs if you forget to reset the fields for each new instance.
GridBagLayout
controls a container that has a left-to-right component orientation.
You can set the following
GridBagConstraints
instance variables:
gridx
,
gridy
gridx=0
and the top row has address
gridy=0
.
Use GridBagConstraints.RELATIVE
(the default value)
to specify that the component be placed
just to the right of (for gridx
)
or just below (for gridy
)
the component that was added to the container
just before this component was added.
We recommend specifying the gridx
and gridy
values for each component rather than just using GridBagConstraints.RELATIVE
;
this tends to result in more predictable layouts.
gridwidth
,
gridheight
gridwidth
)
or rows
(for gridheight
)
in the component's display area.
These constraints specify the number of cells
the component uses,
not the number of pixels it uses.
The default value is 1.
Use GridBagConstraints.REMAINDER
to specify
that the component be the last one in its row
(for gridwidth
)
or column
(for gridheight
).
Use GridBagConstraints.RELATIVE
to specify
that the component be the next to last one
in its row
(for gridwidth
)
or column
(for gridheight
). We recommend specifying the gridwidth
and gridheight
values for each component rather than just using GridBagConstraints.RELATIVE
and GridBagConstraints.REMAINDER
;
this tends to result in more predictable layouts.
Note:
GridBagLayout
does not allow components
to span multiple rows unless the component
is in the leftmost column or you have specified
positive gridx
and gridy
values for the component.
fill
GridBagConstraints
constants)
include NONE
(the default),
HORIZONTAL
(make the component wide enough to fill its display area
horizontally, but do not change its height),
VERTICAL
(make the component tall enough to fill its display area
vertically, but do not change its width),
and
BOTH
(make the component fill its display area entirely).
ipadx
,
ipady
ipadx*2
pixels,
since the padding applies to both sides of the component.
Similarly, the height of the component will be at least
its minimum height plus ipady*2
pixels.
insets
Insets
object.
By default, each component has no external padding.
anchor
GridBagConstraints
constants)
are
CENTER
(the default),
PAGE_START
,
PAGE_END
,
LINE_START
,
LINE_END
,
FIRST_LINE_START
,
FIRST_LINE_END
,
LAST_LINE_END
, and
LAST_LINE_START
.
Here is a picture of how these values are interpreted in a container that has the default, left-to-right component orientation.
| FIRST_LINE_START | PAGE_START | FIRST_LINE_END |
| LINE_START | CENTER | LINE_END |
| LAST_LINE_START | PAGE_END | LAST_LINE_END |
PAGE_*
and *LINE_*
constants were introduced in 1.4.
Previous releases
require values named after points of the compass.
For example,
NORTHEAST
indicates the top-right part of the display area.
We recommend that you use the new constants, instead,
since they enable easier localization.
weightx
,
weighty
GridBagLayout
controls.
Weights are used to determine how to distribute space
among columns
(weightx
)
and among rows
(weighty
);
this is important for specifying resizing behavior.
Unless you specify at least one non-zero value
for weightx
or weighty
,
all the components clump together in the center of
their container.
This is because when the weight is 0.0 (the default),
the GridBagLayout
puts any extra space
between its grid of cells and the edges of the container.
Generally weights are specified with 0.0 and 1.0 as the extremes:
the numbers in between are used as necessary.
Larger numbers indicate that the component's row or column
should get more space.
For each column, the weight is related to
the highest weightx
specified
for a component within that column,
with each multicolumn component's weight being split somehow
between the columns the component is in.
Similarly, each row's weight is related to
the highest weighty
specified
for a component within that row.
Extra space tends to go toward the rightmost column and bottom row.
The next section discusses constraints in depth, in the context of explaining how the example program works.
The following code creates the GridBagLayout
and the components it manages.
You can find the entire source file in
GridBagLayoutDemo.java
.
JButton button; pane.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); if (shouldFill) { //natural height, maximum width c.fill = GridBagConstraints.HORIZONTAL; } button = new JButton("Button 1"); if (shouldWeightX) { c.weightx = 0.5; } c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 0; c.gridy = 0; pane.add(button, c); button = new JButton("Button 2"); c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 0.5; c.gridx = 1; c.gridy = 0; pane.add(button, c); button = new JButton("Button 3"); c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 0.5; c.gridx = 2; c.gridy = 0; pane.add(button, c); button = new JButton("Long-Named Button 4"); c.fill = GridBagConstraints.HORIZONTAL; c.ipady = 40; //make this component tall c.weightx = 0.0; c.gridwidth = 3; c.gridx = 0; c.gridy = 1; pane.add(button, c); button = new JButton("5"); c.fill = GridBagConstraints.HORIZONTAL; c.ipady = 0; //reset to default c.weighty = 1.0; //request any extra vertical space c.anchor = GridBagConstraints.PAGE_END; //bottom of space c.insets = new Insets(10,0,0,0); //top padding c.gridx = 1; //aligned with button 2 c.gridwidth = 2; //2 columns wide c.gridy = 2; //third row pane.add(button, c);
This example uses one GridBagConstraints
instance
for all the components the GridBagLayout
manages, however in real-life situations it is recommended that you do not reuse GridBagConstraints
, as this can very easily lead to you introducing subtle bugs if you forget to reset the fields for each new instance.
Just before each component is added to the container,
the code sets (or resets to default values)
the appropriate instance variables
in the GridBagConstraints
object.
It then adds the component to its container,
specifying the GridBagConstraints
object
as the second argument to the add
method.
For example, to make button 4 be extra tall, the example has this code:
c.ipady = 40;
ipady
to the default:
c.ipady = 0;
If a component's display area is larger than the component itself, then you can specify whereabouts in the display area the component will be displayed by using the GridBagConstraints.anchor
constraint. The anchor
constraint's values can be absolute (north, south, east, west, and so on), or orientation-relative (at start of page, at end of line, at the start of the first line, and so on), or relative to the component's baseline. For a full list of the possible values of the anchor
constraint, including baseline-relative values,see the API documentation for
GridBagConstraints.anchor
. You can see in the code extract above that Button 5 specifies that it should be displayed at the end of the display area by setting an anchor at GridBagConstraints.PAGE_END
.
add
method,
our examples used to invoke
the setConstraints
method
on the GridBagLayout
object.
For example:
GridBagLayout gridbag = new GridBagLayout(); pane.setLayout(gridbag); ... gridbag.setConstraints(button, c); pane.add(button);
Container.add
method since it makes for cleaner code than if you were to use setConstraints
.
| Component | Constraints |
|---|---|
| All components |
ipadx = 0 fill = GridBagConstraints.HORIZONTAL |
| Button 1 | ipady = 0 weightx = 0.5 weighty = 0.0 gridwidth = 1 anchor = GridBagConstraints.CENTER insets = new Insets(0,0,0,0) gridx = 0 gridy = 0 |
| Button 2 |
weightx = 0.5 gridx = 1 gridy = 0 |
| Button 3 |
weightx = 0.5 gridx = 2 gridy = 0 |
| Button 4 |
ipady = 40 weightx = 0.0 gridwidth = 3 gridx = 0 gridy = 1 |
| Button 5 |
ipady = 0 weightx = 0.0 weighty = 1.0 anchor = GridBagConstraints.PAGE_END insets = new Insets(10,0,0,0) gridwidth = 2 gridx = 1 gridy = 2 |
GridBagLayoutDemo has two components
that span multiple columns
(buttons 4 and 5).
To make button 4 tall,
we added internal padding (ipady
) to it.
To put space between buttons 4 and 5,
we used insets to add a minimum of 10 pixels above button 5,
and we made button 5 hug the bottom
edge of its cell.
All the components in the pane
container
are as wide as possible,
given the cells that they occupy.
The program accomplishes
this by setting the GridBagConstraints
fill
instance variable
to GridBagConstraints.HORIZONTAL
,
leaving it at that setting for all the components.
If the program did not specify the fill,
the buttons would be at their natural width, like this:
When you enlarge GridBagLayoutDemo's window,
the columns grow proportionately.
This is because
each component in the first row,
where each component is one column wide,
has weightx = 0.5
.
The actual value of these components' weightx
is unimportant.
What matters is that all the components,
and consequently, all the columns,
have an equal weight
that is greater than 0.
If no component managed by the GridBagLayout
had weightx
set,
then when the components' container was made wider,
the components would stay clumped together in the center of the container,
like this:
If the container is given a size that is smaller or bigger than the prefered size, then any space is distributed according to the GridBagContainer
weights.
Note that if you enlarge the window,
the last row is the only one that gets taller.
This is because only button 5 has weighty
greater than zero.
The GridBagLayout
and GridBagConstraints
classes each have only one constructor,
with no arguments.
Instead of invoking methods on a GridBagConstraints
object,
you manipulate its instance variables,
as described in
Specifying Constraints.
Generally, the only method you invoke on a
GridBagLayout
object
is setConstraints
,
as demonstrated in
The Example Explained.
GridBagLayout
throughout this tutorial.
The following table lists a few.
| Example | Where Described | Notes |
|---|---|---|
GridBagLayoutDemo
|
This section | Uses many features — weights, insets, internal padding, horizontal fill, exact cell positioning, multi-column cells, and anchoring (component positioning within a cell). |
TextSamplerDemo |
Using Text Components | Aligns two pairs of labels and text fields, plus adds a label across the full width of the container. |
ContainerEventDemo |
How to Write a Container Listener | Positions five components within a container, using weights, fill, and relative positioning. |


Please read this documentation at https://kreatio-sw.github.io/inflight/
Single Page Applications (SPA) pose unique issues which conventional applications did not face. In an SPA, quite often the following situation is faced:
A pragmatic approach can be as follows:
When switching selection criteria, the previous query, which may still be in flight, needs to be canceled.
Even the it could not be canceled it needs to be ensured that stale data does not show up in the UI (may happen if not implemented correctly).
Regarding entries already displayed, while switching there may be several scenarios:
Needs to simplify loading subsequent pages:
Ideally distinguish when no data has arrived from no entities matched the criteria.
Allows updating entities locally:
Well, this library targets to simplify the above in simple and consistent ways.
See InFlightState for more details:
These issues are not specific to this library and not solved by this library.
Local updates when combined with pagination can get quite tricky.
Consider the cases when not all entities are loaded in the UI yet.
Inserts:
Where to place the newly created entries
what to do if newly created entity does not match the current selection criteria
what to do if the newly added entities shows up on a subsequently added page
Update:
Delete:
Add npm package to your Angular4/Angular5 project:
```bash $ npm -i @kreatio/inflight
$ yarn add @kreatio/inflight ```
All classes are plain typescript classes, so you need not mention or provide any of these in your project.
See the following for API details:
```typescript const inFlight = new InFlight();
// This will be passed to the function that gets actual data
const perPage = 25;
// If set to true it will clear the data before issuing next
// request. Setting flase will cause the data to chnage when
// first page of new request arrives.
const clearData = true;
inFlight.start(perPage, clearData, (page, perPage) => {
return getAllImages(page, perPage);
});
inFlight.stateObservable.subscribe((state: InFlightState) => {
// Will yield for every state change
});
// You can use state directly as a variable for binding
let dataInFlight = inFlight.state.inFlight;
let dataLoaded = inFlight.state.dataLoaded;
inFlight.resultsObservable.subscribe((results:PagedResults) => {
// Will yield whenever results change
let totalResults = results.total;
let currentPage = results.page;
let entities = results.entities;
});
// Load additional page if there are more pages
if(inFlight.state.hasMorePages) {
inFlight.getNextPage();
}
// To switch the list entirely call start again with new criteria
inFlight.start(5, true, (page, perPage) => {
return getMyImages(page, perPage);
});
```
It should return an Observable
that should yield a PagedResults
.
Typically it will be a get
call on one of the Angular HTTP classes
with potential chaining of map
calls. The returned Observable should
yield only once.
Test cases have good coverage - has actually been more complex to develop than the actual functionality. Mock Data Generator has test cases of its own which are set to skip by default.
Beware test cases take significant time to run as these need to test delays and errors.
$ ng test


Voltage Φ‑N (in Volts)
VΦN max = Volts
VΦΦ rms = Volts
VΦΦ max = Volts
Details Table
Explanation:
The last row in the above table was excluded from sum, cause it belongs to next wave cycle.


Registration Form
  Create Your Account
Account ID
Password
No blanks, should be more than 5 with english letters, numbers, and special charaacters. (!@#$%^&*)
Confirm Password
  Your Basic Info
Name
No blanks, should be more than 6 characters, and only accept Chinese characters.
Birthday
Only date format is accepted.
E-mail
Confirm E-mail


Strictly's Neil Jones missed second week in a row and replaced by Kevin Clifton
Alex Scott will be dancing with Kevin Clifton again this weekend rather than partnerless Gorka Marquez
by Kyle O'Sullivan, https://www.mirror.co.uk/authors/kyle-osullivan/Alex Scott will be dancing with Kevin Clifton again this weekend as Neil Jones misses his second week of Strictly Come Dancing in a row.
Professional dancer Neil was forced to pull out of last Saturday's show after a last-minute injury to his calf muscle during rehearsals.
Former footballer Alex was forced to teach her entire street commercial routine to stand-in partner Kevin in just 45 minutes - and he's stepping in again for her American Smooth routine.
Speaking on tonight's It Takes Two, gutted Neil said: "No, I won't be dancing tomorrow. I've tried but it's just not ready yet. I'll be fine if I rest this weekend."
Hugging Alex, he said: "You nail the dance, go through, then I'll be ready for you on Monday morning."
Kevin came into training late on Wednesday evening when Neil realised he was not ready to dance.
Alex confessed: "It's been a strange week to be honest. Going back to ballroom I'm nervous anyway. I'm use to him [Neil]. It's really different dancing with someone else."
Speaking to Gethin Jones from the ballroom, Kevin said: "I'm obviously gutted for Neil. I’m hoping he’s on the mend. It looks like he's getting better and better. Fingers crossed I can get Alex through and she'll be back with him.
"Alex has been amazing. She’s got a brilliant mentality. Refuses to complain. Most people would say it's too much pressure. She’s like 'I'm on Strictly Come Dancing and get to learn from two of the pros. She’s been fantastic in training."
Neil described the moment where he injured his calf during their Ghostbusters themed dance.
He said: "Normally the gun was coming out. I thought the gun came out and hit me on the back of the leg. It wasn't the gun, it was just the muscle. I didn't hear a noise."
Giving her take, Alex said "We were about to go into the lift and it was the look of terror. I can't."
Neil added: " I’ve ripped muscles before and things like that. It wasn’t painful. It was just a weird feeling."
But Alex admitted she was not in a position to "moan" as Paralympian Will Bayley won't get to dance again after being injured.
Neil added: "It is hard because I want to be there with Alex and dance with her. It's such a great dance. As I'm watching I'm smiling.
"I’m just glad she gets to dance and has Kevin with her. She’s in good hands.
James Jordan voiced his disappointment that Kevin was drafted in to replace the injured Neil.
Speaking at Monday night's Pride of Britain awards, the former Strictly pro said he thinks that Gorka should have got the call up.
James told Mirror Online: "I've got nothing against Kevin. But Kevin was on the show. He had his celebrity partner.
"Gorka hadn't. He was on the show last year. It wasn't his choice. It would have been a nice nod to Gorka for a week.
"Kevin's been there and done it. For Gorka, it would have been a nice thing."
During last weekend's show, Kevin joked that he had to "get in the final one way or another" after replacing Neil.
When asked about stepping in at the last-minute, Kevin said: "I've got to get in the final one way or another, ain't I."
The rest of the celebs and pro dancers were left in hysterics, while presenter Claudia Winkleman had her head in her hands laughing.
Pointing out the night was not about him, he added: "This is not about me, it's about Alex. She’s been so amazing. For a couple of hours she’s been guiding me through the routine.
"This is a real test for her. I’m just going to do my best for her and for Neil."
Alex and Kevin set the dance floor alight and received high praise from the judges for their street commercial routine.
Praising Alex after the performance, Kevin said: "Having to teach me to do the dance in 45 minutes.
"Everyone can probably see I got a few things wrong in that and Alex kept the whole thing going on her own."
The pair received a high score of 34 from the judges, who praised Alex for dealing with adversity, and noticed her shouting directions to Kevin.
Speaking to Claudia Winkleman, Alex said: "My partner, Neil, I feel bad. We did what we did. The show must go on. You can take it one way or the other. Thank you to Kev."
Kevin admitted: "I literally went out and blanked in the middle of the routine and got it all wrong. You carried me through, Alex."
*It Takes Two airs weekdays on BBC Two at 6.30pm


Q. Create a networking policy such that only pods with the label access=granted can talk to it
Create an nginx pod and attach this policy to it.
Create a busybox pod and attempt to talk to nginx - should be blocked.
Attach the label to busybox and try again - should be allowed.


DANIEL CHIU
Daniel is an empathic problem solver with strengths in logic and communication. An unwavering idealist, Daniel is impact-driven and looks for opportunities to apply himself to the world’s most important and urgent problems.
After graduating early from Stanford with an advanced Computer Science degree, Daniel joined Palantir as a Forward Deployed Engineer to work on important problems that Silicon Valley engineers are only very rarely exposed to. As a Forward Deployed Engineer, Daniel has had a unique product- and business-oriented exposure to full-stack engineering. He currently leads a small engineering team working to optimize processes for the Center for Disease Control.
Daniel’s strengths have drawn him to roles in entrepreneurship, product, and software engineering, but he isn’t wedded to a particular role or field--he tends to gravitate toward whatever and wherever growth and impact can be optimized.


Skitai WSGI App Engine
- Documentation: Be patient for a while retrieving from PyPI (Async Response Version For Single Thread)
- Websocket Test
Medusa is different from most other servers because it runs as a single process, multiplexing I/O with its various client and server connections within a single process/thread.
Skitai orients light-weight, simplicity and strengthen networking operations with external resources - HTTP / HTTPS / XML-RPC / PostgreSQL - keeping very low costs.
- Working as Web, XML-RPC and Reverse Proxy Loadbancing Server
- HTML5 Websocket & HTTP/2.0 implemeted
- Handling massive RESTful API/RPC/HTTP(S) connections based on asynchronous socket framework at your apps easily
- Asynchronous connection pool with PostgreSQL, MongoDB and Redis
Skitai is not a framework for convinient developing, module reusability and plugin flexibility etc. It just provides some powerful communicating services for your WSGI apps as both server and client.
Also note it is inspired by Zope and Flask a lot.
From version 0.17 (Oct 2016), Skitai WSGI App Engine is seperated from this project.
If you want to run Skitai with fully pre-configured functional WSGI app engine as daemon or win32 service, install Skitai WSGI App Engine Daemon.
Conceptually, Skitai has been seperated into two components:
- Skitai App Engine Server, for WSGI apps
- Skito-Saddle, the small WSGI container integrated with Skitai. But you can also mount any WSGI apps and frameworks like Flask.


plot module¶
Visualizations of historical data, flooding zones, and stations.
-
plot.
create_choropleth_colour_scale
(min_severity=4, discrete_colourscale=False)¶ Define the colours and tick labels for the choropleth map legend.
- Parameters
min_severity (int, optional) – the minimum severity of warnings which are to be accomodated in the colour scale. Defaults to 4, allowing all possible severities
discrete_colourscale (bool, optional.) – If True, creates a discrete colour bar. Default is false.
- Returns
colorscale, ticktext – These are intended to be directly passed to the plotly colorscale and colorbar_ticktext parameters.
- Return type
list, list of strings
-
plot.
create_water_levels_plot
(listinput)¶ Plot the water levels of stations given corresponding date.
Subplots are created for each station.
- Parameters
listinput (list) –
- list of station (MonitoringStation), dates (list), and
levels (list), in this order. List must be of length multiple of 3.
- Raises
ValueError – when listinput is not of length multiple of three.
- Returns
fig – plotly figure with water levels, high, and low plotted.
- Return type
plotly.graph_objects.figure
-
plot.
get_recommended_simplification_params
(warning_len)¶ Return the recommended geometry simplification tolerance and buffer.
These settings are based on the number of warnings present, and designed to prevent the map interface from lagging if many warnings are present.
- Parameters
warning_len (int) – number of warnings in the warning list.
- Returns
{‘tol’: float, ‘buf’: float}. Parameters which determine the degree of shape approximation recommended for mapping.
- Return type
dict
-
plot.
map_flood_warnings
(geojson, warning_df=None, min_severity=4, station_df=None)¶ Plot flood warnings and station levels as a chloropleth map figure.
- Parameters
geojson (geo_json) –
- Contains the perimeter definitions for all warnings. Created from
warningdata.build_regions_geojson.
warning_df (pandas.dataframe, optional) – Contains information regarding the severity of the floods and the location name. Created using warningdata.build_severity_dataframe. Defaults to None, where warnings are not mapped.
station_df (pandas.dataframe, optional) – Contains information of position and relative water level of each station, to be plotted as a scatter map. Defaults to None, where stations are not mapped.
min_severity (int, optional) – If provided, plots only warnings equal to or above this severity level Use SeverityLevel.value to obtain the integer value corresponding to a named severity level. default is 4 (all warnings plotted)
- Returns
- Return type
None.
-
plot.
plot_water_levels
(listinput)¶ Display plot generated in create_water_levels_plot.
- Parameters
listinput (list) – list of station (MonitoringStation), dates (list), and levels (list), in this order. List must be of length multiple of 3.
- Returns
- Return type
None.
-
plot.
plot_water_levels_with_fit
(listinput, p)¶ Add best-fit line to water level graphs, and display them.
- Parameters
listinput (list) – list of station (MonitoringStation), dates (list), and levels (list), in this order. List must be of length multiple of 3.
p (int) – order of polynomial fit
- Returns
- Return type
None.


{% extends "base.html" %} {% import 'macros.html' as macro %} {% block content %}
The world's most loved pitching platform
Pitch-it connects thousands of people through
the power of pitching.
Create an account, with us to
view pitches, like and comment.
One minute can either make you or break you,
get the chance to impress someone through
writing pitches.
Get known to the world through the
wonderful pitches you post.
“We at pitch-it connect thousands of people through the power of pitching, one minute can either make or break you, impress others through your pitches.”
“Hi, my name is Sara. It’s so nice to meet you! I’m a PR manager, specializing in overseeing successful initiative launches from beginning to end.”
“I’m Joe Neely–Alpaca lovers buy my T-shirts to share their love of Alpacas and DroneClip. We offer hands-free alpaca shearing solutions.”


| Feature Article | |||
by Rob Waring
|
Will The West Wing Cause The Left Swing? by Rob Waring There has been much talk, legislation and litigation intended to control corporate campaign and soft money contributions. Absent a constitutional amendment or a dramatic change in the makeup of the Supreme Court, it appears very unlikely that there will be any effective limitation on campaign spending. The candidate and party with the most money will continue to dominate of the airwaves. The tangled web of soft money groups that influence voters perceptions about candidates and issues just got thicker. A broadcast of the NBC show, The West Wing, on the Wednesday preceding the November 2000 election, seemed an unprecedented, indirect effort to use a dramatic television series to influence the vote. As background, The West Wing is about a Democratic President and his staff who have backbone and principles. It presents an idealized view of what the Clinton Presidency could have been (or the promise of Gore). A number of political observers have said that middle class women are the most volatile and critical group in this election. (Certainly, that group made the difference for Clinton when he ran against the elder Bush in 1992.) While more women are aligned with Gore on issues such as child care, health coverage, abortion and others, many are still angry at Clinton for the Monica Lewinsky scandal and paint Gore with the same brush of dishonesty. The Democrats have responded by emphasizing their policy differences with Bush and by repeated efforts to show the level of passion that still burns in the Gore marriage. (He wont cheat on his wife!) Along comes The West Wing with its November 1, 2000 broadcast. (The night before, the actor playing the President, Martin Sheen, appeared with Al Gore on NBCs The Tonight Show and at a subsequent campaign rally.) In the episode, the President, who has been told not to have sex by his doctors due to a heart condition, has just been released from that order due to improving health. He and the First Lady frantically rearrange their schedules so that they can heat up the marital bed. They make numerous references to lingerie ("special garment") that the First Lady is going to wear in order to fan the flames of passion. Did this episode titillate some of its viewers with the notion that lusty Commander in Chief Gore would set a great example for lovelorn marriages across America? Perhaps well know on election day. Governor George W. Bush has adopted a frequently invoked theme that he is a uniter who can end the partisan bickering in Washington that has characterized most of the Clinton tenure. While some may scoff at this notion, given the scorched-earth politics of Newt and his cronies, it is a message that Gore desperately needs to rebut. In the same The West Wing episode, the President hires a Republican newspaper columnist to work on his staff. When she attempts to stop the divisive tactics of a pair of executive branch staffers who are polarizing Congress, they respond by leaving a misogynist "decoration" in her office. Male members of the White House staff who had earlier doubted the skill and sincerity of this defector from the opposing party now rally around her and the two harassers are fired. The inner-circle staffers thus join her in strong bi-partisan opposition to gender-based workplace harassment (not to mention a rousing chorus from HMS Pinafore). Bush has also been making a lot of noise about the sorry state of readiness of the U.S. military, another contention disputed by the Gore camp. The West Wing responded by depicting a confrontation between a retiring general (presumably a Bush supporter) and the White House Press secretary, in which she appears to get the better of him in an argument over the validity of the Pentagons definition of military readiness. The President ultimately gets the last word by forcing her to back off from her threat of retaliation if the General publicly speaks his mind, thereby proving that this President, at least, can take the heat. I raise my observations not because I am upset by its present manipulation of public sentiment. I am a Gore supporter and grateful for any help he can get. But, fast forward four years. Lets say George W. is elected and is running for a second term in a close race. His administration has fallen far short of its initial promise, but there is a convenient television show running about a progressive and compassionate Republican President that shows the American public how things could be if they just have faith. You can see the problem. I dont yet know how we sort through this newest, thorny problem of corporate (owners of the networks) influence on elections, but I do know that it isnt going to go away. Given the shows popularity, we will likely see more West Wings in our future. Posted November 4, 2000 Would you like to comment on this article? Please submit your comments here. |
||
|
Other Articles on the West Wing
Other Movie Comments by Rob Waring
|


960fy
Generate Chess960 Positions
Position number must be between 0 and 959.
Position Number
FEN
Copy
Generate Random Position
Analyze on lichess.org
Source Code


Answer TRUE or FALSE.
Selection Sort (as the code is written in this module) is a stable sorting algorithm. Recall that a stable sorting algorithm maintains the relative order of records with equal keys.
Think of the behaviour of every pass through the inner for loop of Selection Sort if two records are equal, with the greatest value in the array.
Which record will be selected?
The first such record.
Where will it be moved to?
The last position in the array.


This project is no longer on hold.
This project is being managed offline.
Project setup has been completed offline.
Innovate UK project finance reviewer has been updated.
Project details
These project details were supplied by the lead partner on behalf of the project.
The knowledge base partner provided these details for the overall project.
| Question | Answer |
|---|---|
|
Target start date
|
|
| Correspondence address |
|
Partner details
Each partner must provide a project location. We will assign the monitoring officer based on the location.
Each partner provided their own project location.
| Partner | Project location |
|---|---|
|
|
Innovate UK project finance reviewer
| Full name | Actions | |
|---|---|---|
|
|
|
Edit finance reviewer |


| 1 | package fr.sii.ogham.core.builder.registry; | |
| 2 | ||
| 3 | import java.util.ArrayDeque; | |
| 4 | import java.util.ArrayList; | |
| 5 | import java.util.Deque; | |
| 6 | import java.util.List; | |
| 7 | ||
| 8 | import fr.sii.ogham.core.clean.Cleanable; | |
| 9 | import fr.sii.ogham.core.exception.clean.CleanException; | |
| 10 | import fr.sii.ogham.core.exception.clean.CleanableException; | |
| 11 | import fr.sii.ogham.core.exception.clean.MultipleCleanException; | |
| 12 | ||
| 13 | /** | |
| 14 | * Registry that tracks instances that implements {@link Cleanable}. Other | |
| 15 | * instances are skipped. | |
| 16 | * | |
| 17 | * <p> | |
| 18 | * The registry is also a {@link Cleanable} to relay cleanup request to | |
| 19 | * registered instances when calling {@link #clean()} method. | |
| 20 | * | |
| 21 | * If an instance failed during its cleanup (exception is thrown), the failure | |
| 22 | * is registered. The next {@link Cleanable} instance is tried and so on until | |
| 23 | * all registered instances are cleaned. At the end a | |
| 24 | * {@link MultipleCleanException} is thrown with all registered failures. | |
| 25 | * | |
| 26 | * @author Aurélien Baudet | |
| 27 | * | |
| 28 | */ | |
| 29 | public class CleanableRegistry implements Registry<Object>, Cleanable { | |
| 30 | private final Deque<Cleanable> cleanables; | |
| 31 | ||
| 32 | /** | |
| 33 | * Initializes an empty registry | |
| 34 | */ | |
| 35 | public CleanableRegistry() { | |
| 36 | super(); | |
| 37 | this.cleanables = new ArrayDeque<>(); | |
| 38 | } | |
| 39 | ||
| 40 | @Override | |
| 41 | public void register(Object obj) { | |
| 42 |
1
1. register : negated conditional → RUN_ERROR |
if (obj instanceof Cleanable) { |
| 43 | cleanables.add((Cleanable) obj); | |
| 44 | } | |
| 45 | } | |
| 46 | ||
| 47 | @Override | |
| 48 | public void clean() throws CleanException { | |
| 49 | List<CleanException> failures = new ArrayList<>(); | |
| 50 |
1
1. clean : negated conditional → RUN_ERROR |
while (!cleanables.isEmpty()) { |
| 51 |
1
1. clean : removed call to fr/sii/ogham/core/builder/registry/CleanableRegistry::clean → RUN_ERROR |
clean(cleanables.pop(), failures); |
| 52 | } | |
| 53 |
1
1. clean : negated conditional → RUN_ERROR |
if (!failures.isEmpty()) { |
| 54 | throw new MultipleCleanException("Failed to cleanup several resources", failures); | |
| 55 | } | |
| 56 | } | |
| 57 | ||
| 58 | private static void clean(Cleanable cleanable, List<CleanException> failures) { | |
| 59 | try { | |
| 60 |
1
1. clean : removed call to fr/sii/ogham/core/clean/Cleanable::clean → RUN_ERROR |
cleanable.clean(); |
| 61 | } catch (CleanException e) { | |
| 62 | failures.add(new CleanableException(e, cleanable)); | |
| 63 | } | |
| 64 | } | |
| 65 | } | |
Mutations | ||
| 42 |
1.1 |
|
| 50 |
1.1 |
|
| 51 |
1.1 |
|
| 53 |
1.1 |
|
| 60 |
1.1 |