|
XenForo
1.5.12
|
Public Member Functions | |
| update ($user, $field, $value=null) | |
| couldBeEmail ($email) | |
| getAllUsers (array $fetchOptions=array()) | |
| getUsersByNames (array $usernames, array $fetchOptions=array(), &$invalidNames=array()) | |
| getUsersByIds (array $userIds, array $fetchOptions=array()) | |
| getUsersByIp ($ip, array $fetchOptions=array()) | |
| getUsersByIpRange ($lowerBound, $upperBound, array $fetchOptions=array()) | |
| getUsers (array $conditions, array $fetchOptions=array()) | |
| getUsersForEmailList (array $conditions, array $fetchOptions=array()) | |
| getUserIds (array $conditions, $start=0, $limit=0) | |
| countUsers (array $conditions) | |
| getBirthdayUsers ($month, $day, array $conditions=array(), array $fetchOptions=array(), $publicOnly=true) | |
| getUserById ($userId, array $fetchOptions=array()) | |
| getUserByName ($username, array $fetchOptions=array()) | |
| getUserByEmail ($email, array $fetchOptions=array()) | |
| getUserByNameOrEmail ($input, array $fetchOptions=array()) | |
| prepareUserFetchOptions (array $fetchOptions) | |
| prepareUserConditions (array $conditions, array &$fetchOptions) | |
| prepareUserOrderOptions (array &$fetchOptions, $defaultOrderSql='') | |
| getFullUserById ($userId, array $fetchOptions=array()) | |
| getVisitingUserById ($userId) | |
| getVisitingGuestUser () | |
| setPermissionsOnVisitorArray (array $userinfo, $permissionCombinationId=false) | |
| setPermissionsFromUserId (array $userInfo, $permUserId) | |
| updateSessionActivity ($userId, $ip, $controllerName, $action, $viewState, array $inputParams, $viewDate=null, $robotKey='') | |
| deleteSessionActivity ($userId, $ip) | |
| getLatestUser () | |
| getLatestUsers (array $criteria, array $fetchOptions=array()) | |
| getMostActiveUsers (array $criteria, array $fetchOptions=array()) | |
| countTotalUsers () | |
| getUserAuthenticationRecordByUserId ($userId) | |
| getUserAuthenticationObjectByUserId ($userId) | |
| validateAuthentication ($nameOrEmail, $password, &$error='') | |
| loginUserByRememberKeyFromCookie ($userId, $rememberKey, $auth=null) | |
| loginUserByRememberCookie ($userCookie) | |
| setUserRememberCookie ($userId, $auth=null) | |
| getUserRememberKeyForCookie ($userId, $auth=null) | |
| prepareRememberKeyForCookie ($rememberKey) | |
| getUserEmailConfirmKey (array $user) | |
| prepareUser (array $user) | |
| prepareUserCard (array $user) | |
| prepareUserCards (array $users) | |
| addUserGroupChange ($userId, $key, $addGroups) | |
| removeUserGroupChange ($userId, $key) | |
| removeUserGroupChangeLogByKey ($key) | |
| getUserGroupChangesForUser ($userId) | |
| isMemberOfUserGroup (array $user, $userGroupId, $includeSecondaryGroups=true) | |
| isUserSuperAdmin (array $user) | |
| follow (array $followUsers, $dupeCheck=true, array $user=null) | |
| unfollow ($followUserId, $userId=null) | |
| removeDuplicateFollowUserIds ($userId, array $newUsers, $existingUserIds=null) | |
| getFollowRecord ($userId, $followUserId) | |
| getFollowedUserProfiles ($userId, $maxResults=0, $orderBy='user.username') | |
| getFollowedUsers ($userId, array $fetchOptions=array()) | |
| getFollowingDenormalizedValue ($userId) | |
| isFollowing ($userId, array $follower=null) | |
| updateFollowingDenormalizedValue ($userId, $following=false) | |
| getUsersFollowingUserId ($userId, $maxResults=0, $orderBy='user.username') | |
| getUsersFollowing ($userId, array $fetchOptions=array()) | |
| countUsersFollowingUserId ($userId) | |
| rebuildCustomFieldCache ($userId) | |
| getUserIdsInRange ($start, $limit) | |
| getUnreadAlertsCount ($userId) | |
| canBypassUserPrivacy (&$errorPhraseKey='', array $viewingUser=null) | |
| canViewUserOnlineStatus (array $user, &$errorPhraseKey='', array $viewingUser=null) | |
| canViewUserCurrentActivity (array $user, &$errorPhraseKey='', array $viewingUser=null) | |
| canWarnUser (array $user, &$errorPhraseKey='', array $viewingUser=null) | |
| canReportUser (array $user, &$errorPhraseKey='', array $viewingUser=null) | |
| canEditUser (array $user, &$errorPhraseKey='', array $viewingUser=null) | |
| canStartConversationWithUser (array $user, &$errorPhraseKey='', array $viewingUser=null) | |
| canViewIps (&$errorPhraseKey='', array $viewingUser=null) | |
| canViewMemberList (&$errorPhraseKey='', array $viewingUser=null) | |
| canReportContent (&$errorPhraseKey='', array $viewingUser=null) | |
| canViewWarnings (&$errorPhraseKey='', array $viewingUser=null) | |
| canStartConversations (&$errorPhraseKey='', array $viewingUser=null) | |
| passesPrivacyCheck ($privacyRequirement, array $user, array $viewingUser=null) | |
| getRegistrationIps ($userId) | |
| couldBeSpammer (array $user, &$errorKey='') | |
| ban ($userId, $endDate, $reason, $update=false, &$errorKey=null, array $viewingUser=null, $triggered=false) | |
| liftBan ($userId) | |
| getEarliestRegistrationDate () | |
| isUserIgnored (array $user, $ignoredUser) | |
| sendWelcomeContact (array $user, $oldState=null) | |
| changeContentUser ($existingUserId, $newUserName=null, $oldUserName=null, $newUserId=null) | |
| rebuildUserModerationQueueCache () | |
| mergeUsers (array $target, array $source) | |
| logChanges ($userId, array $changedFields, $editUserId=null) | |
| Public Member Functions inherited from XenForo_Model | |
| __construct () | |
| setLocalCacheData ($name, $value) | |
| resetLocalCacheData ($name=null) | |
| getModelFromCache ($class) | |
| setAllowCachedRead ($allowCachedRead) | |
| fetchAllKeyed ($sql, $key, $bind=array(), $nullPrefix='') | |
| limitQueryResults ($query, $limit, $offset=0) | |
| addFetchOptionJoin (array &$fetchOptions, $join) | |
| getConditionsForClause (array $sqlConditions) | |
| getOrderByClause (array $choices, array $fetchOptions, $defaultOrderSql='') | |
| addPositionLimit ($table, $limit, $offset=0, $column='position') | |
| prepareLimitFetchOptions (array $fetchOptions) | |
| prepareStateLimitFromConditions (array $fetchOptions, $table='', $stateField='message_state', $userField='user_id') | |
| standardizePermissionsAndUserId (&$permissions, &$userId=0) | |
| standardizeNodePermissionsAndUserId ($nodeId, &$permissions, &$userId=0) | |
| standardizePermissionCombinationIdAndUserId (&$permissionCombinationId, &$userId=0) | |
| standardizeViewingUserReference (array &$viewingUser=null) | |
| standardizeViewingUserReferenceForNode ($nodeId, array &$viewingUser=null, array &$nodePermissions=null) | |
| unserializePermissionsInList (array $items, $serializedKey, $targetKey='permissions') | |
| getContentTypesWithField ($fieldName) | |
| getContentTypeField ($contentType, $fieldName) | |
| getCutOffCondition ($column, $condition) | |
| assertValidCutOffOperator ($operator, $allowBetween=false) | |
Static Public Member Functions | |
| static | getUserIdFromUser ($user) |
| Static Public Member Functions inherited from XenForo_Model | |
| static | create ($class) |
Protected Member Functions | |
| _applyUserGroupChanges ($userId, array $oldGroupStrings, array $newGroupStrings) | |
| _getUserProfileModel () | |
| _getFieldModel () | |
| _getIpModel () | |
| Protected Member Functions inherited from XenForo_Model | |
| _getLocalCacheData ($name) | |
| _getDataRegistryModel () | |
| _getCache ($forceCachedRead=false) | |
| _getDb () | |
Protected Attributes | |
| $_ignoreCache = array() | |
| Protected Attributes inherited from XenForo_Model | |
| $_cache = null | |
| $_db = null | |
| $_allowCachedRead = true | |
| $_localCacheData = array() | |
| $_modelCache = array() | |
|
protected |
Applies a set of user group changes.
| integer | $userId | |
| array | $oldGroupStrings | Array of comma-delimited strings of existing (accounted for) user group change sets |
| array | $newGroupStrings | Array of comma-delimited strings for new list of user group change sets |
|
protected |
|
protected |
|
protected |
| addUserGroupChange | ( | $userId, | |
| $key, | |||
| $addGroups | |||
| ) |
Inserts (or updates an existing) user group change set.
| integer | $userId | |
| string | $key | Unique identifier for change set |
| string | array | $addGroups | Comma delimited string or array of user groups to add |
| ban | ( | $userId, | |
| $endDate, | |||
| $reason, | |||
$update = false , |
|||
| & | $errorKey = null , |
||
| array | $viewingUser = null , |
||
$triggered = false |
|||
| ) |
Bans a user or updates an existing ban.
| integer | $userId | ID of user to ban |
| integer | $endDate | Date at which ban will be lifted. Use XenForo_Model_User::PERMANENT_BAN for a permanent ban. |
| $reason | ||
| $update | ||
| $errorKey | ||
| $viewingUser | ||
| $triggered |
| canBypassUserPrivacy | ( | & | $errorPhraseKey = '' , |
| array | $viewingUser = null |
||
| ) |
Determines if the user has permission to bypass users' privacy preferences, including online status and activity feed
| string | $errorPhraseKey | |
| array | $viewingUser |
| canEditUser | ( | array | $user, |
| & | $errorPhraseKey = '' , |
||
| array | $viewingUser = null |
||
| ) |
Determines if the viewing user can edit a user's basic details (moderator-level permission for editing)
| array | $user | |
| string | $errorPhraseKey | |
| array | null | $viewingUser |
| canReportContent | ( | & | $errorPhraseKey = '' , |
| array | $viewingUser = null |
||
| ) |
Determines if a user can report the specified content
| string | $errorPhraseKey | |
| array | null | $viewingUser |
| canReportUser | ( | array | $user, |
| & | $errorPhraseKey = '' , |
||
| array | $viewingUser = null |
||
| ) |
Checks that the viewing user may report the specified user
| array | $user | User being viewed |
| string | $errorPhraseKey | Returned by ref. Phrase key of more specific error |
| array | null | $viewingUser | Viewing user ref |
| canStartConversations | ( | & | $errorPhraseKey = '' , |
| array | $viewingUser = null |
||
| ) |
Determines if the viewing user can start conversations in general.
| string | $errorPhraseKey | |
| array | null | $viewingUser |
| canStartConversationWithUser | ( | array | $user, |
| & | $errorPhraseKey = '' , |
||
| array | $viewingUser = null |
||
| ) |
Determines if the viewing user can start a conversation with the given user. Does not check standard conversation permissions.
| array | $user | |
| string | $errorPhraseKey | |
| array | null | $viewingUser |
| canViewIps | ( | & | $errorPhraseKey = '' , |
| array | $viewingUser = null |
||
| ) |
Determines if the viewing user can view IPs logged with posts, profile posts etc.
| string | $errorPhraseKey | |
| array | null | $viewingUser |
| canViewMemberList | ( | & | $errorPhraseKey = '' , |
| array | $viewingUser = null |
||
| ) |
Determines if the viewing user can view any member list (notable members, full list, online, etc).
| string | $errorPhraseKey | |
| array | null | $viewingUser |
| canViewUserCurrentActivity | ( | array | $user, |
| & | $errorPhraseKey = '' , |
||
| array | $viewingUser = null |
||
| ) |
Determines if permissions are sufficient to view the user's current activity (page).
| array | $user | User being viewed |
| string | $errorPhraseKey | Returned by ref. Phrase key of more specific error |
| array | null | $viewingUser | Viewing user ref |
| canViewUserOnlineStatus | ( | array | $user, |
| & | $errorPhraseKey = '' , |
||
| array | $viewingUser = null |
||
| ) |
Determines if permissions are sufficient to view on the specified user's online status. This refers to time but not necessarily the specific page.
| array | $user | User being viewed |
| string | $errorPhraseKey | Returned by ref. Phrase key of more specific error |
| array | null | $viewingUser | Viewing user ref |
| canViewWarnings | ( | & | $errorPhraseKey = '' , |
| array | $viewingUser = null |
||
| ) |
Determines if a user can view the warnings
| string | $errorPhraseKey | |
| array | null | $viewingUser |
| canWarnUser | ( | array | $user, |
| & | $errorPhraseKey = '' , |
||
| array | $viewingUser = null |
||
| ) |
Determines if permissions are sufficient to warn the given user.
| array | $user | User being viewed |
| string | $errorPhraseKey | Returned by ref. Phrase key of more specific error |
| array | null | $viewingUser | Viewing user ref |
| changeContentUser | ( | $existingUserId, | |
$newUserName = null , |
|||
$oldUserName = null , |
|||
$newUserId = null |
|||
| ) |
Updates existing content with a new username, or updated user ID
| integer | $existingUserId | |
| string | $newUserName | |
| string | $oldUserName | |
| integer | $newUserId | (set if the user ownership has changed) |
| couldBeEmail | ( | ) |
Checks to see if the input string might be an email address - contains '@' after its first character
| String |
| couldBeSpammer | ( | array | $user, |
| & | $errorKey = '' |
||
| ) |
Determines whether or not the specified user may have the spam cleaner applied against them.
| array | $user | |
| string|array | Error phrase key - may become an array if the phrase requires parameters |
| countTotalUsers | ( | ) |
Gets the count of total users.
| countUsers | ( | array | $conditions | ) |
Gets the count of users that match the specified conditions.
| array | $conditions |
| countUsersFollowingUserId | ( | $userId | ) |
Gets the count of users following the specified user.
| integer | $userId |
| deleteSessionActivity | ( | $userId, | |
| $ip | |||
| ) |
Deletes the session activity record for the specified user / IP address
| integer | $userId | |
| string | $ip |
| follow | ( | array | $followUsers, |
$dupeCheck = true , |
|||
| array | $user = null |
||
| ) |
Creates a new follower record for $userId following $followUserId(s)
| array | Users being followed | |
| boolean | Check for and prevent duplicate followers | |
| array | $user | User doing the following |
| getAllUsers | ( | array | $fetchOptions = array() | ) |
Gets all users. Can be restricted to valid users only with the validOnly fetch option.
| array | $fetchOptions | User fetch options |
| getEarliestRegistrationDate | ( | ) |
Gets the date of the earliest user registration
| getFollowedUserProfiles | ( | $userId, | |
$maxResults = 0 , |
|||
$orderBy = 'user.username' |
|||
| ) |
Gets an array of all users being followed by the specified user
| integer | array | $userId,|$user | |
| integer | $maxResults | (0 = all) |
| string | $orderBy |
| getFollowedUsers | ( | $userId, | |
| array | $fetchOptions = array() |
||
| ) |
Gets users followed by the user ID.
| integer | $userId | |
| array | $fetchOptions |
| getFollowingDenormalizedValue | ( | $userId | ) |
Generates the denormalized, comma-separated version of a user's following
| $userId |
| getFollowRecord | ( | $userId, | |
| $followUserId | |||
| ) |
Fetches a single user-following-user record.
| integer | array | $userId | - the user doing the following |
| integer | array | $followUserId | - the user being followed |
| getFullUserById | ( | $userId, | |
| array | $fetchOptions = array() |
||
| ) |
Returns a full user record based on an input user ID. Equivalent to calling getUserById including the FETCH_USER_FULL constanct
| integer | $userId | |
| array | $fetchOptions | User fetch options |
| getLatestUser | ( | ) |
Gets the latest (valid) user to join.
| getLatestUsers | ( | array | $criteria, |
| array | $fetchOptions = array() |
||
| ) |
Fetch the most recently-registered users
| array | $criteria | |
| array | $fetchOptions |
| getMostActiveUsers | ( | array | $criteria, |
| array | $fetchOptions = array() |
||
| ) |
Fetch the most active users
| array | $criteria | |
| array | $fetchOptions |
| getRegistrationIps | ( | $userId | ) |
Fetches the logged registration IP addresses for the specified user, if available.
| integer | $userId |
| getUnreadAlertsCount | ( | $userId | ) |
Returns the number of unread alerts belonging to a user - following fresh recalculation
| integer | $userId |
| getUserAuthenticationObjectByUserId | ( | $userId | ) |
Returns an auth object based on an input userid
| integer | Userid |
| getUserAuthenticationRecordByUserId | ( | $userId | ) |
Gets the user authentication record by user ID.
| integer | $userId |
| getUserByEmail | ( | $email, | |
| array | $fetchOptions = array() |
||
| ) |
Returns a user record based on an input email
| string | ||
| array | $fetchOptions | User fetch options |
| getUserById | ( | $userId, | |
| array | $fetchOptions = array() |
||
| ) |
Gets the specified user by ID.
| integer | $userId | |
| array | $fetchOptions | User fetch options |
| getUserByName | ( | $username, | |
| array | $fetchOptions = array() |
||
| ) |
Returns a user record based on an input username
| string | $username | |
| array | $fetchOptions | User fetch options |
| getUserByNameOrEmail | ( | $input, | |
| array | $fetchOptions = array() |
||
| ) |
Returns a user record based on an input username OR email
| string | $input | |
| array | $fetchOptions | User fetch options |
| getUserGroupChangesForUser | ( | $userId | ) |
Gets the user group change sets for the specified user.
| integer | $userId |
|
static |
Fetches the user_id index from a user record
| integer | array | $userId,|$user |
| getUserIds | ( | array | $conditions, |
$start = 0 , |
|||
$limit = 0 |
|||
| ) |
Gets the user Ids that match the specified conditions.
| array | $conditions | |
| integer | $start | |
| integer | $limit |
| getUserIdsInRange | ( | $start, | |
| $limit | |||
| ) |
Returns an array containing the user ids found from the complete result given the range specified, along with the total number of users found.
| integer | Find users with user_id greater than... |
| integer | Maximum users to return at once |
| getUsers | ( | array | $conditions, |
| array | $fetchOptions = array() |
||
| ) |
Gets users that match the specified conditions.
| array | $conditions | |
| array | $fetchOptions |
| getUsersByIds | ( | array | $userIds, |
| array | $fetchOptions = array() |
||
| ) |
Get users with specified user IDs.
| array | $userIds | |
| array | $fetchOptions |
| getUsersByIp | ( | $ip, | |
| array | $fetchOptions = array() |
||
| ) |
Return all users logged from a particular IP address
| string | $ip | |
| array | $fetchOptions |
| getUsersByIpRange | ( | $lowerBound, | |
| $upperBound, | |||
| array | $fetchOptions = array() |
||
| ) |
Return all users logged from a range of binary IPs
| string | $lowerBound | Binary IP range start |
| string | $upperBound | Binary IP range end |
| array | $fetchOptions |
| getUsersByNames | ( | array | $usernames, |
| array | $fetchOptions = array() , |
||
| & | $invalidNames = array() |
||
| ) |
Returns user records based on a list of usernames.
| array | $usernames | |
| array | $fetchOptions | User fetch options |
| array | $invalidNames | Returns a list of usernames that could not be found |
| getUsersFollowing | ( | $userId, | |
| array | $fetchOptions = array() |
||
| ) |
Gets users following the specified user ID.
| integer | $userId | |
| array | $fetchOptions |
| getUsersFollowingUserId | ( | $userId, | |
$maxResults = 0 , |
|||
$orderBy = 'user.username' |
|||
| ) |
Gets the user information for all users following the specified user.
| integer | $userId | |
| integer | $maxResults | (0 = all) |
| string | $orderBy |
| getVisitingGuestUser | ( | ) |
Get the visiting user information for a guest.
| getVisitingUserById | ( | $userId | ) |
Gets the visiting user's information based on their user ID.
| integer | $userId |
| isFollowing | ( | $userId, | |
| array | $follower = null |
||
| ) |
Returns whether or not the specified user is being followed by the follower
| integer | $userId | User being followed |
| array | $follower | User doing the following |
| isMemberOfUserGroup | ( | array | $user, |
| $userGroupId, | |||
$includeSecondaryGroups = true |
|||
| ) |
Determines if a user is a member of a particular user group
| array | $user | |
| integer | array | $userGroupId | either a single user group ID or an array thereof |
| boolean | Also check secondary groups |
| isUserIgnored | ( | array | $user, |
| $ignoredUser | |||
| ) |
Returns true if the specified user ID or user name is in the ignored (cache) of the given user.
| array | $user | |
| integer|string | User ID or user name |
| liftBan | ( | $userId | ) |
Lifts the ban on the specified user
| integer | $userId |
| logChanges | ( | $userId, | |
| array | $changedFields, | ||
$editUserId = null |
|||
| ) |
| loginUserByRememberCookie | ( | $userCookie | ) |
Logs a user in based on the raw value of the remember cookie.
| string | $userCookie |
| loginUserByRememberKeyFromCookie | ( | $userId, | |
| $rememberKey, | |||
$auth = null |
|||
| ) |
Logs a user in based on their remember key from a cookie.
| integer | $userId | |
| string | $rememberKey | |
| array | false | null | $auth | User's auth record (retrieved if null) |
| passesPrivacyCheck | ( | $privacyRequirement, | |
| array | $user, | ||
| array | $viewingUser = null |
||
| ) |
Determines if the viewing user passes the specified privacy check. This must include the following status for the viewing user.
| string | $privacyRequirement | The required privacy: everyone, none, members, followed |
| array | $user | User info, including following status for viewing user |
| array | null | $viewingUser | Viewing user ref |
| prepareRememberKeyForCookie | ( | $rememberKey | ) |
Prepares the remember key for use in a cookie (or for comparison against the cookie).
| string | $rememberKey | Key from DB |
| prepareUser | ( | array | $user | ) |
Prepares a user record for display. Note that this may be called on incomplete guest records.
| array | $user | User info |
| prepareUserCard | ( | array | $user | ) |
Prepares the data needed for the simple user card-like output.
| array | $user |
| prepareUserCards | ( | array | $users | ) |
Prepares a batch of user cards.
| array | $users |
| prepareUserConditions | ( | array | $conditions, |
| array & | $fetchOptions | ||
| ) |
Prepares a set of conditions to select users against.
| array | $conditions | List of conditions. (TODO: make list) |
| array | $fetchOptions | The fetch options that have been provided. May be edited if criteria requires. |
| prepareUserFetchOptions | ( | array | $fetchOptions | ) |
Prepares join-related fetch options.
| array | $fetchOptions |
| prepareUserOrderOptions | ( | array & | $fetchOptions, |
$defaultOrderSql = '' |
|||
| ) |
Construct 'ORDER BY' clause
| array | $fetchOptions | (uses 'order' key) |
| string | $defaultOrderSql | Default order SQL |
| rebuildCustomFieldCache | ( | $userId | ) |
Rebuilds the custom field cache for a specific user, using the canonical data.
| integer | $userId |
| rebuildUserModerationQueueCache | ( | ) |
Rebuilds the user moderation queue cache.
| removeDuplicateFollowUserIds | ( | $userId, | |
| array | $newUsers, | ||
$existingUserIds = null |
|||
| ) |
Compares an array of user IDs to be followed with the existing value and removes any duplicates to prevent duplicate key errors on insertion
| integer | $userId | |
| array | $newUsers | (full user arrays) |
| string | $existingUserIds | '3,6,42,....' |
| removeUserGroupChange | ( | $userId, | |
| $key | |||
| ) |
Removes the specified user group change set.
| integer | $userId | |
| string | $key | Change set key |
| sendWelcomeContact | ( | array | $user, |
$oldState = null |
|||
| ) |
Initiates contact to a newly registered user with a valid state.
If the $oldState == null this is a new registration.
| array | $user | |
| null | $oldState |
| setPermissionsFromUserId | ( | array | $userInfo, |
| $permUserId | |||
| ) |
Sets the permission info from the specified user ID into an array of user info (likely for a visitor array).
| array | $userInfo | |
| integer | $permUserId |
| setPermissionsOnVisitorArray | ( | array | $userinfo, |
$permissionCombinationId = false |
|||
| ) |
Sets the specified permissions (combination and permissions string) on visitor array. Defaults to setting guest permissions.
| array | $userinfo | Visitor record |
| setUserRememberCookie | ( | $userId, | |
$auth = null |
|||
| ) |
Sets the user remember cookie for the specified user ID.
| integer | $userId | |
| array | false | null | $auth | User's auth record (retrieved if null) |
| unfollow | ( | $followUserId, | |
$userId = null |
|||
| ) |
Deletes an existing follower record for $userId following $followUserId
| integer | $followUserId | User being followed |
| integer | $userId | User doing the following |
| update | ( | $user, | |
| $field, | |||
$value = null |
|||
| ) |
Simple way to update user data fields.
| integer | array | $userId,|$user | |
| array|string | Either the name of a single field, or an array of field-name => field-value pairs | |
| mixed | If the previous parameter is a string, use this as the field value |
| updateFollowingDenormalizedValue | ( | $userId, | |
$following = false |
|||
| ) |
Updates the denormalized, comma-separated version of a user's following. Will query for the value if it is not provided
| integer | array | $userId,|$user | |
| string | Denormalized following value |
| updateSessionActivity | ( | $userId, | |
| $ip, | |||
| $controllerName, | |||
| $action, | |||
| $viewState, | |||
| array | $inputParams, | ||
$viewDate = null , |
|||
$robotKey = '' |
|||
| ) |
Updates the session activity of a user.
| integer | $userId | |
| string | $ip | IP of visiting user |
| string | $controllerName | Last controller class that was invoked |
| string | $action | Last action that was invoked |
| string | $viewState | Either "valid" or "error" |
| array | $inputParams | List of special input params, to include to help get more info on current activity |
| integer | null | $viewDate | The timestamp of the last page view; defaults to now |
| string | $robotKey |
| validateAuthentication | ( | $nameOrEmail, | |
| $password, | |||
| & | $error = '' |
||
| ) |
Logs the given user in (as the visiting user). Exceptions are thrown on errors.
| string | $nameOrEmail | User name or email address |
| string | $password | |
| string | $error | Error string (by ref) |


AngularJS?
Based on JavaScript, like PHP and other script languages, can do (virtually) everything at client side.
Build Website by AngularJS?
It is enough!
How to deploy on server?
I was confused by this. Because you can click the html file and see the website, but how to access via Internet? Apache server! It holds files on server, very powerful!
Sometimes need more
Bower?
Package denpendecy manager. Declare lib dependency in bower.json, and type “bower install” to download all js libs. It is like maven in Java, but more light-weighted.
Grunt?
Make script alive. It is “task runner”, doing automations. Simply, it is something outside AngularJS, and do testing, minimize js libs into 1 file, and also can start up a server for scripts. Then you don’t need Apache server any more.
Enough by AngularJS?
Not really! Script is mainly used for loading views and handling some logic by controller in the middle. But cannot take heavy tasks. So we need more! MEAN.JS is a solution! MongoDB, Express, AngularJS, NodeJS. We have focused on AngularJS on client side. Now, M+E+N build the back-end server. Express is the web framework building on NodeJS, making it easier to handle web events. And NodeJS is server-side JS which connects MongoDB. MongoDB creates/ updates/ inserts/ deletes/ queries Json-format data.
General View of App
Generally, back-end server runs REST service. And front-end AngularJS makes request to REST server, and gets data to update views. That is very similar to mobile App dev. Client side code is equivalent to mobile app code, which both make request to REST server (or other ways) to obtain required data to update views. But mobile app is more complicated as it has cache mechanism so that can run offline as well.
Some traditional web apps, according to my understanding, are more rigid for front/back-end binding. Like structs in J2EE, the web app runs on the web container, and catch URL request, then route it to some functions to do logics, and then render the view page (asp for example), injecting data and loading the view. The workflow is like: request ->(struts) back-end -> view with data. And the web work with REST service is like: request -> view without data(js/php) -> back-end(restful) -> view with data.
Conclusion
Should learn more!


{% if BASE_TEMPLATE %} {% extends BASE_TEMPLATE|string %} {% else %} {% extends "base.html" %} {% endif %} {% block title %}Unauthorized{% endblock %} {% block content %}
Your account has not yet been approved to access the requested CyberGym materials. If the error persists, please contact support at<EMAIL_ADDRESS>{% endblock %}


I am a Web Developer
I am open-minded and focused on never-ending professional self-improvement. I am interested in Software Development,Ethical Hacking ,Weeb Developing.
I enjoy being physically active, and spend a lot of time playing sports and team games, amd iam Fan of Call Of Duty
If you have got any questions, feel free to contact me.
Personal Whatsapp account
8073159584
Personal email address
prajwalaspb@gmail.com


Toggle navigation
Intro
Presciptions
Buy Medicine
Profile
Patient
Sign Out
Take care of your body.
It's the only place you have to live.
|
Your Prescriptions
Keep track of all the medicines you have to take!
Buy Medicines
Select prescription and pharmacy to buy medicines....
View Prescription
Buy request
Change Photo
UserName
Full Name
Email
Age
Phone Number
Edit Profile
Medicine list
Medicine Name
Total(pieces)
Price (per pcs)
Total price
Napa
50
5tk
250tk
Napa
50
5tk
250tk
Napa
50
5tk
250tk
Confirm Request
×
Edit profile


&
&
&
Walk in the Shoes of Your Feminist Foremothers:
Major Events Across the US to Commemorate the 42nd Anniversary of Roe v. Wade and
Doe v. Bolton
Thursday, January 14
If you missed FFL President Serrin M. Foster’s interview on SeriusXM Radio Channel
129 with Father Matt Malone and Kerry Weber as they discuss her recently published
speech, “ [http://r20.rs6.net/tn.jsp?f=001uHUi_KexM3oSwwYYauRIyVmKTZ5HBDh_jD3nZk2Ii0CyKwZDQL5LA19RcIsOxHtKbRisQC72UOwb-uvRERQl4knhf_MeDXGH6ZDMAzqSuPupZSrE08Vfw1KLU2cp_rmTcqfZnjnu-rUJtZ25yBxIdscFs848m_u5nNsdCKg-ngyj4kMGDEobFxtQta8mOIbBweUuR5_MHQdBIBjQtBEos98ql1EG864b&c=FzpIMyhsTlHKb6NokV5TXDFSVtw2gyX5EzVNq4JrVq6zT-n3ig3Rug==&ch=ekNMLgRuXmnWgZRTbSTXCU49EKoWu8u1Bk-orQXOdd850lCWWNS7tA==]The
Feminist Case Against Abortion [http://r20.rs6.net/tn.jsp?f=001uHUi_KexM3oSwwYYauRIyVmKTZ5HBDh_jD3nZk2Ii0CyKwZDQL5LA19RcIsOxHtKbRisQC72UOwb-uvRERQl4knhf_MeDXGH6ZDMAzqSuPupZSrE08Vfw1KLU2cp_rmTcqfZnjnu-rUJtZ25yBxIdscFs848m_u5nNsdCKg-ngyj4kMGDEobFxtQta8mOIbBweUuR5_MHQdBIBjQtBEos98ql1EG864b&c=FzpIMyhsTlHKb6NokV5TXDFSVtw2gyX5EzVNq4JrVq6zT-n3ig3Rug==&ch=ekNMLgRuXmnWgZRTbSTXCU49EKoWu8u1Bk-orQXOdd850lCWWNS7tA==],”
[http://r20.rs6.net/tn.jsp?f=001uHUi_KexM3oSwwYYauRIyVmKTZ5HBDh_jD3nZk2Ii0CyKwZDQL5LA19RcIsOxHtKbRisQC72UOwb-uvRERQl4knhf_MeDXGH6ZDMAzqSuPupZSrE08Vfw1KLU2cp_rmTcqfZnjnu-rUJtZ25yBxIdscFs848m_u5nNsdCKg-ngyj4kMGDEobFxtQta8mOIbBweUuR5_MHQdBIBjQtBEos98ql1EG864b&c=FzpIMyhsTlHKb6NokV5TXDFSVtw2gyX5EzVNq4JrVq6zT-n3ig3Rug==&ch=ekNMLgRuXmnWgZRTbSTXCU49EKoWu8u1Bk-orQXOdd850lCWWNS7tA==]on
“America This Week” Get ready for Roe. Hear a portion of the interview on [http://r20.rs6.net/tn.jsp?f=001uHUi_KexM3oSwwYYauRIyVmKTZ5HBDh_jD3nZk2Ii0CyKwZDQL5LA9LnU4kOWs4JCLycUmoVdOTEvL6BB9FGoDrlAZEtz4ZsBzMKoCfmK5jR8EwVONJq-HyR2byzKqKV666amabvjuRv0eoLh9rbbmuZ23CvS80OqIAv9Dfz9-kCQ_BFY0irNrU0rLIccBCC&c=FzpIMyhsTlHKb6NokV5TXDFSVtw2gyX5EzVNq4JrVq6zT-n3ig3Rug==&ch=ekNMLgRuXmnWgZRTbSTXCU49EKoWu8u1Bk-orQXOdd850lCWWNS7tA==]America’s
podcast [http://r20.rs6.net/tn.jsp?f=001uHUi_KexM3oSwwYYauRIyVmKTZ5HBDh_jD3nZk2Ii0CyKwZDQL5LA9LnU4kOWs4JCLycUmoVdOTEvL6BB9FGoDrlAZEtz4ZsBzMKoCfmK5jR8EwVONJq-HyR2byzKqKV666amabvjuRv0eoLh9rbbmuZ23CvS80OqIAv9Dfz9-kCQ_BFY0irNrU0rLIccBCC&c=FzpIMyhsTlHKb6NokV5TXDFSVtw2gyX5EzVNq4JrVq6zT-n3ig3Rug==&ch=ekNMLgRuXmnWgZRTbSTXCU49EKoWu8u1Bk-orQXOdd850lCWWNS7tA==]and
read her speech!!
Saturday, January 17
Join thousands for the OneLife LA, first-ever large scale event celebrating the
beauty and dignity of every human being from conception to natural death in Downtown
Los Angeles. Come early and pick up your FREE FFL placard and declare to the world
“Women Deserve Better® than Abortion” and “Peace Begins in the Womb.” http://onelifela.org/
[http://r20.rs6.net/tn.jsp?f=001uHUi_KexM3oSwwYYauRIyVmKTZ5HBDh_jD3nZk2Ii0CyKwZDQL5LA9LnU4kOWs4JXP8mCl5PD2-d9blCyJb9nzJX4jJ0wm6pwn1dF3aHFGZrdo-6zWH2CgcUk1Wx3x7MugNmFrZvoPBNgV8Lzk2AJjX4hiuwzVXdO-QQGm63eog=&c=FzpIMyhsTlHKb6NokV5TXDFSVtw2gyX5EzVNq4JrVq6zT-n3ig3Rug==&ch=ekNMLgRuXmnWgZRTbSTXCU49EKoWu8u1Bk-orQXOdd850lCWWNS7tA==]
Sunday, January 18
Thousands of Midwesterners will gather at Federal Plaza for the March for Life Chicago.
It starts at 2 PM but please arrive early to receive your free FFL “Women Deserve
Better than Abortion” and “Peace Begins in the Womb” placards as you affirm the
dignity of women and the gift of every child at the largest pro-life event in Illinois.
Thursday, January 22
On the 42nd anniversary of Roe v. Wade and Doe v. Bolton decisions, meet and March
for Life with FFL at the largest pro-life rally in the country. Look for FFL at
14th Street and Madison–near the starting point for the March [http://r20.rs6.net/tn.jsp?f=001uHUi_KexM3oSwwYYauRIyVmKTZ5HBDh_jD3nZk2Ii0CyKwZDQL5LA9LnU4kOWs4JLcmSVl0T4NyCMgjQzqGOflx6Qdd2CD3YbFTKEcgwq0gDcg3m5lC98sz3V-IMzzvdeb0T0wqj-51IpLa5xpi4G0ek2MLlupI729UioKk3ZZOeMs44B9x2iwzS6SgJv2e8taaiv_qVlJY7lEDGoNiR5sTgrn2AI4iZyIlZrSE0PFaT6hAT9pgR7vx3gTI3pDtWZCPVyANqWXbn3OAC5iXG77agHCC2oL4QpliEU-4J6QxWL4v6R03TQUTrsF4TemiDYRS8sem1HDe1EvakJU5rIh32Gpdt-0o9xtcqd3Fi9BUOlRFwSQiwX9L06Tm5ZM_L&c=FzpIMyhsTlHKb6NokV5TXDFSVtw2gyX5EzVNq4JrVq6zT-n3ig3Rug==&ch=ekNMLgRuXmnWgZRTbSTXCU49EKoWu8u1Bk-orQXOdd850lCWWNS7tA==].
We also really need volunteers to help distribute placards and take turns holding
our banner! Contact<EMAIL_ADDRESS><EMAIL_ADDRESS>to meet and march with us at the mall of our Nation’s Capitol. If you can’t join
us on the Mall, watch for us on EWTN for live coverage and hears us on SiriusXM,
the Catholic Channel.
Friday, January 23 (MD) and Sunday, January 25 (CA)
FFL Vice President Sally Winn will speak at Students for Life of America’s National
Conference–East Coast in Maryland on Friday and also at SFLA’s National Conference
on the West Coast in San Francisco on Sunday! Every student will receive “Pro-Woman
Answers to Pro-Choice Questions in their welcome kit. Visit our booth for more FREE
activist materials!! Registration required. Go to: http://sflalive.org/home/schedule/
[http://r20.rs6.net/tn.jsp?f=001uHUi_KexM3oSwwYYauRIyVmKTZ5HBDh_jD3nZk2Ii0CyKwZDQL5LA9LnU4kOWs4J3tpDpytcBWLQgxLtfdiSpxWKPBHtnVVRUiYoTZ2RK15wAEFFByLYTZ7cPUhYmAMzddSZWb9OUUvAGHW8c1_SUYVM9ZhRRyY1AL2Bizepo3C5GMsbfIaFzMhLRQS6xBJY&c=FzpIMyhsTlHKb6NokV5TXDFSVtw2gyX5EzVNq4JrVq6zT-n3ig3Rug==&ch=ekNMLgRuXmnWgZRTbSTXCU49EKoWu8u1Bk-orQXOdd850lCWWNS7tA==]
Saturday, January 24
Students, facutly, clergy and activists are urged to attend the Cardinal O'Connor
Conference at Georgetown University. Register now. http://cardinaloconnorconference.com/2015-conference/registration
[http://r20.rs6.net/tn.jsp?f=001uHUi_KexM3oSwwYYauRIyVmKTZ5HBDh_jD3nZk2Ii0CyKwZDQL5LA9LnU4kOWs4J2_Za5W_x7l8xN7E0TfeojyttnBI9h2JbxV4Uc-zfpPY3vupmXfCYYXHyv-j-WjE_SBxXc_Nzn6SonTHQszr8qLZxQROlcYbtgBq1WJHWlTQDlTnvDSddWvZp2mL5Ko5YCWtPXz_m4p8QXzkO-PsF5lRknK9xgKGPY7mae0Edhsc=&c=FzpIMyhsTlHKb6NokV5TXDFSVtw2gyX5EzVNq4JrVq6zT-n3ig3Rug==&ch=ekNMLgRuXmnWgZRTbSTXCU49EKoWu8u1Bk-orQXOdd850lCWWNS7tA==]
Saturday, January 24
Come early to the Walk for Life West Coast and pick up your FREE FFL "Women Deserve
Better than Abortion” placard which reads “All People Are Equal. All Choices Are
Not.” Then go to the FFL booth and meet FFL Board Member Patrick A. O'Kane, (our
immediate past Chair of the Board), and our other volunteers at our booth at the
Walk for Life West Coast. If you are able to help Pat distribute materials at the
FFL booth, please contact<EMAIL_ADDRESS><EMAIL_ADDRESS>If you can’t make it to the walk, watch for us on EWTN for live coverage.
Our thanks to our volunteers and donors for supporting and attending these events–and
for underwriting our new placards for events in LA, Chicago and Washington DC (and
last year at San Francisco!)
With every step we take, we walk in the shoes of our feminist foremothers who were
pro-woman and pro-life!
Women Deserve Better, The American Feminist, and Remarkable Pro-Life Women
are a registered trademarks of Feminists for Life of America.
Feminists for Life of America is a 501©3 nonprofit.
Membership contributions and donations are tax-deductible to the extent allowed
by law.
For more information, go to http://www.feministsforlife.org/support/ [http://r20.rs6.net/tn.jsp?f=001uHUi_KexM3oSwwYYauRIyVmKTZ5HBDh_jD3nZk2Ii0CyKwZDQL5LA6OXHeJL-sZT-PZBNa2Vc1hfwMAhg_9YwFBYXrEv5zibCc1HsmX1whoh82fFZan5quJvM6Dv_xl_rF7XQQBfnE27huQ1euYrd1a_74YVRnQzKNMArNt6YzVhGmA8MYeZYx2ts3Fj3AqS5-78DyR3PHw=&c=FzpIMyhsTlHKb6NokV5TXDFSVtw2gyX5EzVNq4JrVq6zT-n3ig3Rug==&ch=ekNMLgRuXmnWgZRTbSTXCU49EKoWu8u1Bk-orQXOdd850lCWWNS7tA==]
&
&
&
Forward this email
<EMAIL_ADDRESS>This email was sent to<EMAIL_ADDRESS>by<EMAIL_ADDRESS>Update Profile/Email Address
http://visitor.constantcontact.com/do?p=oo&m=001Q-HkL4DKCBRaE4RH1EOTXw%3D%3D&ch=5af11d60-4f61-11e3-9d28-d4ae5275dbea&ca=03b502c6-c57f-43da-ab60-d886b52f9658
Instant removal with SafeUnsubscribe™
http://visitor.constantcontact.com/do?p=un&m=001Q-HkL4DKCBRaE4RH1EOTXw%3D%3D&ch=5af11d60-4f61-11e3-9d28-d4ae5275dbea&ca=03b502c6-c57f-43da-ab60-d886b52f9658
Privacy Policy:
http://ui.constantcontact.com/roving/CCPrivacyPolicy.jsp
Online Marketing by
Constant Contact®
www.constantcontact.com
Feminists for Life | P.O. Box 320667 | Alexandria | VA | 22320


@import scala.xml.NodeSeq @(res:String) @main("Result","") {
This is the response posted back to the client application, from the PolicyModels server.
@res


pragma solidity ^0.4.15;
/* This contract is our implementation of how voting should be done for shareholders in a company */
import "./Token.sol";
contract VotingMechanism {
address admin;
Token tok;
enum VotingState {Voting, Revealing, Finished}
struct VotingSession {
/* What is your favo? 1. opfjdsa 2.dfjkaslf 3.fdjkslajf */
string question;
uint[] totalVotes;
uint numOptions;
uint startingPhaseTime;
uint phaseLength;
VotingState state;
mapping (address => Vote) voters;
}
uint currentSession = 0;
mapping (uint => VotingSession) votingSessions;
// Last session that each user has participated in
// If last voting session is 0, then the user can vote again
mapping (address => uint) lockedSessions;
//interest would be like 1.001 * 10^18, so that interest/interestFactor = 1 + interest percentage
uint interestFactor = 10**18;
//needs to be a uint cuz solidity doesn't do floats -_-
uint interest = (101)*(10**16);
//interest should really be a construction / config parameter
struct Vote {
/* H(_vote[]||secret) stored here for each voter */
bytes32 blindedVote;
bool voted;
bool revealed;
uint[] values;
}
uint[] altResults;
modifier isVoting() { require(votingSessions[currentSession].state == VotingState.Voting); _; }
modifier unlocked() { require(lockedSessions[msg.sender] == 0); _; }
/* so that they can't vote twice */
modifier notYetVoted() { require(!votingSessions[currentSession].voters[msg.sender].voted); _; }
modifier isAdmin() { require(msg.sender == admin); _; }
modifier isRevealing() { require(votingSessions[currentSession].state == VotingState.Revealing);_; }
modifier notYetRevealed() { require(votingSessions[currentSession].voters[msg.sender].voted && !votingSessions[currentSession].voters[msg.sender].revealed); _; }
modifier hasFunds(uint[] values) { require(tok.balanceOf(msg.sender) >= values[argmax(values)]); _; }
modifier validCommitment(bytes32 secret, uint[] votes) { require(keccak256(secret,votes) == votingSessions[currentSession].voters[msg.sender].blindedVote);_; }
modifier isFinished() { require(currentSession == 0 || votingSessions[currentSession].state == VotingState.Finished);_; }
/* checks if the voter is within phaseLength for phase (VOTING or REVEAL) */
modifier validPhaseTime() { require(block.number - votingSessions[currentSession].startingPhaseTime < votingSessions[currentSession].phaseLength);_; }
/* checks if the voter is past phaseLength to poke and change state */
modifier isPastPhaseTime() { require(block.number - votingSessions[currentSession].startingPhaseTime >= votingSessions[currentSession].phaseLength);_; }
modifier checkValLength(uint[] values) { require(values.length == votingSessions[currentSession].totalVotes.length);_; }
function VotingMechanism(address _admin, address _tokenaddr) public {
admin = _admin;
tok = Token(_tokenaddr);
}
/* Creates a new voting session with _question as question+ options and _numOptions options.
Checks that msg.sender = admin and previous voting session is finished or is the first session. */
function newVotingSession(string _question, uint _numOptions, uint _phaseLength) isAdmin() isFinished() public {
/* question: what is your favo? 1. jkfdlasjfa 2.jkldfsjds 3.fjdklsajfds */
currentSession += 1;
uint currBlockTime = block.number;
votingSessions[currentSession] = VotingSession(_question,
new uint[](_numOptions),
_numOptions,
currBlockTime,
_phaseLength,
VotingState.Voting);
}
/* Gets question and choices of current voting session's */
function getQuestion() public constant returns (string) {
return votingSessions[currentSession].question;
}
/* admin can poke contract to next phase voting -> reveal */
function moveToReveal() isAdmin() isVoting() isPastPhaseTime() {
votingSessions[currentSession].state = VotingState.Revealing;
votingSessions[currentSession].startingPhaseTime = block.number;
}
/* admin can poke contract to next phase reveal -> finish */
function moveToFinish() isAdmin() isRevealing() isPastPhaseTime() {
votingSessions[currentSession].state = VotingState.Finished;
}
/* create a vote takes in an input of a hashed secret key and your array of votes */
function vote(bytes32 _vote)
isVoting()
notYetVoted()
validPhaseTime()
unlocked()
{
votingSessions[currentSession].voters[msg.sender] = Vote(_vote,
true,
false,
new uint[](votingSessions[currentSession].numOptions));
lockedSessions[msg.sender] = currentSession;
tok.lockAccount(msg.sender);
}
/* reveal real votes */
function reveal(bytes32 secret, uint[] values)
isRevealing()
validPhaseTime()
validCommitment(secret, values)
notYetRevealed()
hasFunds(values)
checkValLength(values)
{
for (uint i = 0; i < votingSessions[currentSession].numOptions; i++) {
votingSessions[currentSession].totalVotes[i] += values[i];
}
votingSessions[currentSession].voters[msg.sender].values = values;
votingSessions[currentSession].voters[msg.sender].revealed = true;
}
/* called at any time after revealing */
function unlock() isFinished() {
/* if didn't reveal, then slash all funds */
if (!votingSessions[lockedSessions[msg.sender]].voters[msg.sender].revealed) {
slash(msg.sender);
} else {
uint charge = computeCharge(msg.sender);
//pay small interest to voters as incentive for participation
uint balanceWithInterest = (tok.balanceOf(msg.sender)*interest) / interestFactor;
tok.forceUpdate(msg.sender, balanceWithInterest - charge);
}
/* can vote again */
lockedSessions[msg.sender] = 0;
}
/* if winner with total votes is different than winner with (totalvotes - your votes) then your
vote was decisive, and you should be charged the amount charged, is the margin by which the alterntive
winner would have won by which is less than your vote for the winning value, since your vote was decisive */
function computeCharge(address account) returns (uint) {
uint numOptions = votingSessions[currentSession].numOptions;
altResults = new uint[](numOptions);
//Calculate result of vote without this voter, to find their externality
for (uint i = 0; i < numOptions; i++) {
altResults[i] = votingSessions[currentSession].totalVotes[i] - votingSessions[currentSession].voters[account].values[i];
}
uint realWinner = argmax(votingSessions[currentSession].totalVotes);
uint altWinner = argmax(altResults);
if (realWinner != altWinner) {
return altResults[altWinner] - altResults[realWinner];
} else {
return 0;
}
}
function argmax(uint[] values) returns (uint) {
uint maxVal;
uint idx;
for (uint i; i < values.length; i++) {
if (values[i] > maxVal) {
maxVal = values[i];
idx = i;
}
}
return idx;
}
/* if a voter does not reveal in time, then he loses all access to his tokens */
function slash(address account) private {
tok.forceUpdate(account, 0);
}
function getVote(address account) public returns (bytes32, uint[]) {
return (votingSessions[currentSession].voters[msg.sender].blindedVote, votingSessions[currentSession].voters[msg.sender].values);
}
}
|


So far, we have used strings in order to display messages, using the functions
display and
error, as for example in
exercise \ref{ex:search-for-primes}).
We can form compound data using strings and have lists such as
["a", ["b", ["c", ["d", null]]]]
list( ["Norah", 12], ["Molly", 9], ["Anna", 7],
["Lauren", 6], ["Charlotte", 4] )
Note that in order to distinguish strings from names, we surround them with
double quotation marks. For example, the JavaScript expression z
denotes the value of the name z, whereas the
JavaScript expression "z" denotes a string that consists of
one single character, namely the last letter in the English alphabet in lower case.
JavaScript follows the
common practice in natural languages, where quotation marks
indicate that a word or a sentence is to be treated literally as a
string of characters. For instance, the first letter of John
is
clearly J.
If we tell somebody say your name aloud,
we expect
to hear that person's name. However, if we tell
somebody say
we expect to hear the
words your name
aloud,your name.
Note that
we are forced to nest quotation marks to describe what somebody else
might say.[1]
We can test whether two strings are the same, using the operator ===.[2] Using ===, we can implement a useful function called member. This takes two arguments, a string and a list. If the string is not contained in the list (i.e., is not === to any item in the list), then member returns false. Otherwise, it returns the sublist of the list beginning with the first occurrence of the string:
threeis not the phrase
one plus two.Quotation is powerful because it gives us a way to build expressions that manipulate other expressions (as we will see when we write an interpreter in chapter 4). But allowing statements in a language that talk about other statements in that language makes it very difficult to maintain any coherent principle of what
equals can be substituted for equalsshould mean. For example, if we know that the evening star is the morning star, then from the statement
the evening star is Venuswe can deduce
the morning star is Venus.However, given that
John knows that the evening star is Venuswe cannot infer that
John knows that the morning star is Venus.
the sameif they consist of the same characters in the same order. Such a definition skirts a deep issue that we are not yet ready to address: the meaning of
samenessin a programming language. We will return to this in chapter 3 (section \ref{sec:costs-of-assignment}).


|
Morning/Day
|
Night
|
Unassigned
{{unassignedEventsInPeriod}}
|
Agency Worker
{{agencyEventsInPeriod}}
|
Approved
(Historical) |
Unapproved
(Historical) |


{% extends parent_template|default:'base.html' %} {% load django_bootstrap_breadcrumbs %} {% block breadcrumbs %} {% include 'main/breadcrumbs/webapp.html' %} {% endblock %} {% block content %} Delete {{ webapp }} {% csrf_token %} Are you sure you want to delete {{ webapp }}? Delete Cancel {% endblock content %}
Are you sure you want to delete {{ webapp }}?


We monetize bitcoin!
- envisioneer impactful action-items
- expedite dynamic deliverables
- synthesize proactive users
- cultivate next-generation architectures
- cultivate interactive architectures
- benchmark granular action-items
- transition cross-media convergence
- exploit one-to-one communities
- disintermediate revolutionary bandwidth
- cultivate best-of-breed markets
- incubate bleeding-edge e-business


UI & UX by Sachin
I share beautiful and engagging UI and Ux Design for Open Source.
I share beautiful and engagging UI and Ux Design for Open Source.
Static single page responsive newsletter. Designed with HTML and CSS.
Single page COVID-19 Pendamic landing page designed with HTML, CSS and JS.
#uidesign #HTML #CSS #uxdesign pic.twitter.com/ecJ3iwsIc6
— Sachin Sharma (@SachinShrmaa) May 18, 2020


R package for visualizations of election (or poll) results as easy as adding geom_electoral_building
. While the geom is still in the planning stages, several types of visualizations are implemented and ready to use.
The development version from GitHub with:
# install.packages("devtools") devtools::install_github("heike/electionViz")
We will be inundated with information about the state of the polls in the build-up to the upcoming Presidential election of 2020.
With the tools of this package you will be able to pick your favorite visualization(s) and explore the results your own way.
Each state is represented by one hexagon. This map has been made available by Andrew X Hill at CARTO.
data(elections) el12 <- elections %>% filter(year == 2012) gg12 <- hexplot(el12$state, el12$perc_rep > el12$perc_dem) + scale_fill_party("", labels=c("Democrat", "Republican")) + theme(legend.position = "bottom") + ggtitle("Election 2012") el16 <- elections %>% filter(year == 2016) gg16 <- hexplot(el16$state, el16$perc_rep > el16$perc_dem) + scale_fill_party("", labels=c("Democrat", "Republican")) + theme(legend.position = "bottom") + ggtitle("Election 2016") gridExtra::grid.arrange(gg12, gg16, ncol=2)
Each state is represented by a set of hexagons corresponding in number to the state’s electoral votes. This map was adapted from the object sf_FiveThirtyEightElectoralCollege
in Bhaskar Karambelkar’s R package tilegramsR.
Accessing data of the most recent polls from RealClearPolitics or FiveThirtyEight is done with functions rcp_update()
or fivethirtyeight_update()
respectively. Each one of these functions has a parameter polls
to allow for a finer grained choice of which polls to focus on:
new_polls <- fivethirtyeight_update(polls="president_polls") #> Warning: 44 parsing failures. #> row col expected actual file #> 1923 sponsor_candidate 1/0/T/F/TRUE/FALSE Nicole Galloway 'https://projects.fivethirtyeight.com/polls-page/president_polls.csv' #> 1924 sponsor_candidate 1/0/T/F/TRUE/FALSE Nicole Galloway 'https://projects.fivethirtyeight.com/polls-page/president_polls.csv' #> 2585 sponsor_candidate 1/0/T/F/TRUE/FALSE Al Gross 'https://projects.fivethirtyeight.com/polls-page/president_polls.csv' #> 2586 sponsor_candidate 1/0/T/F/TRUE/FALSE Al Gross 'https://projects.fivethirtyeight.com/polls-page/president_polls.csv' #> 2968 sponsor_candidate 1/0/T/F/TRUE/FALSE Raphael Warnock 'https://projects.fivethirtyeight.com/polls-page/president_polls.csv' #> .... ................. .................. ............... ..................................................................... #> See problems(...) for more details. new_polls %>% filter(!is.na(state)) %>% select(poll_id, start_date, end_date, pollster, state, candidate_name, pct) #> # A tibble: 6,870 x 7 #> poll_id start_date end_date pollster state candidate_name pct #> <dbl> <date> <date> <chr> <chr> <chr> <dbl> #> 1 71295 2020-10-13 2020-10-16 YouGov Arizona Joseph R. Biden … 50 #> 2 71295 2020-10-13 2020-10-16 YouGov Arizona Donald Trump 47 #> 3 71296 2020-10-13 2020-10-16 YouGov Wisconsin Joseph R. Biden … 51 #> 4 71296 2020-10-13 2020-10-16 YouGov Wisconsin Donald Trump 46 #> 5 71242 2020-09-19 2020-10-16 SurveyMonk… Wyoming Joseph R. Biden … 33 #> 6 71242 2020-09-19 2020-10-16 SurveyMonk… Wyoming Donald Trump 66 #> 7 71242 2020-09-19 2020-10-16 SurveyMonk… Wyoming Joseph R. Biden … 33 #> 8 71242 2020-09-19 2020-10-16 SurveyMonk… Wyoming Donald Trump 66 #> 9 71243 2020-09-19 2020-10-16 SurveyMonk… West Virgi… Joseph R. Biden … 35 #> 10 71243 2020-09-19 2020-10-16 SurveyMonk… West Virgi… Donald Trump 63 #> # … with 6,860 more rows
The difference in percentage between democratic and republican percentage of the last five polls (of likely or registered voters) for each state are shown as grey points, colored points show average difference for each point. States are ordered according to difference in percentage. The yellow rectangle shows a margin of +/- 5 percent - the typical margin of error of a poll.
state_3 <- state_3 %>% filter(!(state %in% c("Maine", "Nebraska"))) electoral_building( state_district = state_3$state, electoral_votes = state_3$electoral_votes, perc_dem = state_3$perc_dem, perc_rep = state_3$perc_rep, source = state_3$source) + scale_color_party("Party") + scale_fill_party("Party") + theme(legend.position = "none") + ggtitle("Electoral building, based on polls")
bead_snake_plot( electoral_votes_2016$state_district, electoral_votes_2016$electoral_votes, electoral_votes_2016$perc_dem, electoral_votes_2016$perc_rep, height = 30, buffer = 3) + ggtitle("Election 2016") #> Joining, by = "state_district"


| Package | Description |
|---|---|
| java.awt.im.spi |
Provides interfaces that enable the development of input methods
that can be used with any Java runtime environment.
|
| javax.swing |
Provides a set of "lightweight"
(all-Java language) components that,
to the maximum degree possible, work the same on all platforms.
|
| javax.swing.border |
Provides classes and interface for drawing
specialized borders around a Swing component.
|
| javax.swing.colorchooser |
Contains classes and interfaces used by the
JColorChooser
component. |
| javax.swing.event |
Provides for events fired by Swing components.
|
| javax.swing.filechooser |
Contains classes and interfaces used by the
JFileChooser component. |
| javax.swing.plaf |
Provides one interface and many abstract classes that
Swing uses to provide its pluggable look-and-feel capabilities.
|
| javax.swing.plaf.basic |
Provides user interface objects built according to the
Basic look and feel.
|
| javax.swing.plaf.metal |
Provides user interface objects built according to
the Java look and feel (once codenamed Metal),
which is the default look and feel.
|
| javax.swing.plaf.multi |
Provides user interface objects that combine two or more look and feels.
|
| javax.swing.plaf.nimbus |
Provides user interface objects built according to the cross-platform
Nimbus look and feel.
|
| javax.swing.plaf.synth |
Synth is a skinnable look and feel in which all painting is
delegated.
|
| javax.swing.table |
Provides classes and interfaces for dealing with
javax.swing.JTable . |
| javax.swing.text |
Provides classes and interfaces that deal with editable
and noneditable text components.
|
| javax.swing.text.html |
Provides the class
HTMLEditorKit and supporting classes
for creating HTML text editors. |
| javax.swing.tree |
Provides classes and interfaces for dealing with
javax.swing.JTree . |
| Class and Description |
|---|
| JFrame
An extended version of
java.awt.Frame that adds support for
the JFC/Swing component architecture. |
| Class and Description |
|---|
| AbstractButton
Defines common behaviors for buttons and menu items.
|
| AbstractButton.AccessibleAbstractButton
This class implements accessibility support for the
AbstractButton class. |
| AbstractCellEditor
A base class for
CellEditors , providing default
implementations for the methods in the CellEditor
interface except getCellEditorValue() . |
| AbstractListModel
The abstract definition for the data model that provides
a
List with its contents. |
| AbstractSpinnerModel
This class provides the ChangeListener part of the
SpinnerModel interface that should be suitable for most concrete SpinnerModel
implementations.
|
| Action
The
Action interface provides a useful extension to the
ActionListener
interface in cases where the same functionality may be accessed by
several controls. |
ActionMap
ActionMap provides mappings from
Object s
(called keys or Action names)
to Action s. |
| BoundedRangeModel
Defines the data model used by components like
Slider s
and ProgressBar s. |
| Box
A lightweight container
that uses a BoxLayout object as its layout manager.
|
| ButtonGroup
This class is used to create a multiple-exclusion scope for
a set of buttons.
|
| ButtonModel
State model for buttons.
|
| CellEditor
This interface defines the methods any general editor should be able
to implement.
|
| ComboBoxEditor
The editor component used for JComboBox components.
|
| ComboBoxModel
A data model for a combo box.
|
| ComponentInputMap
A
ComponentInputMap is an InputMap
associated with a particular JComponent . |
| DefaultButtonModel
The default implementation of a
Button component's data model. |
| DefaultCellEditor.EditorDelegate
The protected
EditorDelegate class. |
| DefaultListCellRenderer
Renders an item in a list.
|
DefaultRowSorter.ModelWrapper
DefaultRowSorter.ModelWrapper is responsible for providing
the data that gets sorted by DefaultRowSorter . |
| DesktopManager
DesktopManager objects are owned by a JDesktopPane object.
|
| DropMode
Drop modes, used to determine the method by which a component
tracks and indicates a drop location during drag and drop.
|
| FocusManager
This class has been obsoleted by the 1.4 focus APIs.
|
| GroupLayout.Alignment
Enumeration of the possible ways
ParallelGroup can align
its children. |
GroupLayout.Group
Group provides the basis for the two types of
operations supported by GroupLayout : laying out
components one after another (SequentialGroup )
or aligned (ParallelGroup ). |
| GroupLayout.ParallelGroup
A
Group that aligns and sizes it's children. |
| GroupLayout.SequentialGroup
A
Group that positions and sizes its elements
sequentially, one after another. |
| Icon
A small fixed size picture, typically used to decorate components.
|
InputMap
InputMap provides a binding between an input event
(currently only KeyStroke s are used)
and an Object . |
| InputVerifier
The purpose of this class is to help clients support smooth focus
navigation through GUIs with text fields.
|
| InternalFrameFocusTraversalPolicy
A FocusTraversalPolicy which can optionally provide an algorithm for
determining a JInternalFrame's initial Component.
|
| JButton
An implementation of a "push" button.
|
| JCheckBox
An implementation of a check box -- an item that can be selected or
deselected, and which displays its state to the user.
|
JColorChooser
JColorChooser provides a pane of controls designed to allow
a user to manipulate and select a color. |
| JComboBox
A component that combines a button or editable field and a drop-down list.
|
| JComboBox.KeySelectionManager
The interface that defines a
KeySelectionManager . |
| JComponent
The base class for all Swing components except top-level containers.
|
| JComponent.AccessibleJComponent
Inner class of JComponent used to provide default support for
accessibility.
|
| JDesktopPane
A container used to create a multiple-document interface or a virtual desktop.
|
| JDialog
The main class for creating a dialog window.
|
| JEditorPane
A text component to edit various kinds of content.
|
| JEditorPane.AccessibleJEditorPane
This class implements accessibility support for the
JEditorPane class. |
JFormattedTextField
JFormattedTextField extends JTextField adding
support for formatting arbitrary values, as well as retrieving a particular
object once the user has edited the text. |
| JFormattedTextField.AbstractFormatter
Instances of
AbstractFormatter are used by
JFormattedTextField to handle the conversion both
from an Object to a String, and back from a String to an Object. |
| JFormattedTextField.AbstractFormatterFactory
Instances of
AbstractFormatterFactory are used by
JFormattedTextField to obtain instances of
AbstractFormatter which in turn are used to format values. |
| JInternalFrame
A lightweight object that provides many of the features of
a native frame, including dragging, closing, becoming an icon,
resizing, title display, and support for a menu bar.
|
| JInternalFrame.JDesktopIcon
This component represents an iconified version of a
JInternalFrame . |
| JLabel
A display area for a short text string or an image,
or both.
|
JLayeredPane
JLayeredPane adds depth to a JFC/Swing container,
allowing components to overlap each other when needed. |
| JList
A component that displays a list of objects and allows the user to select
one or more items.
|
| JList.DropLocation
A subclass of
TransferHandler.DropLocation representing
a drop location for a JList . |
| JMenu
An implementation of a menu -- a popup window containing
JMenuItem s that
is displayed when the user selects an item on the JMenuBar . |
| JMenu.WinListener
A listener class that watches for a popup window closing.
|
| JMenuBar
An implementation of a menu bar.
|
| JMenuItem
An implementation of an item in a menu.
|
| JMenuItem.AccessibleJMenuItem
This class implements accessibility support for the
JMenuItem class. |
JPanel
JPanel is a generic lightweight container. |
| JPopupMenu
An implementation of a popup menu -- a small window that pops up
and displays a series of choices.
|
| JRootPane
A lightweight container used behind the scenes by
JFrame , JDialog , JWindow ,
JApplet , and JInternalFrame . |
| JScrollBar
An implementation of a scrollbar.
|
| JScrollPane
Provides a scrollable view of a lightweight component.
|
JSeparator
JSeparator provides a general purpose component for
implementing divider lines - most commonly used as a divider
between menu items that breaks them up into logical groupings. |
| JSpinner
A single line input field that lets the user select a
number or an object value from an ordered sequence.
|
| JSpinner.DefaultEditor
A simple base class for more specialized editors
that displays a read-only view of the model's current
value with a
JFormattedTextField . |
| JTable
The
JTable is used to display and edit regular two-dimensional tables
of cells. |
| JTable.DropLocation
A subclass of
TransferHandler.DropLocation representing
a drop location for a JTable . |
| JTable.PrintMode
Printing modes, used in printing
JTable s. |
JTextField
JTextField is a lightweight component that allows the editing
of a single line of text. |
| JTextField.AccessibleJTextField
This class implements accessibility support for the
JTextField class. |
| JToggleButton
An implementation of a two-state button.
|
| JToggleButton.AccessibleJToggleButton
This class implements accessibility support for the
JToggleButton class. |
| JToolTip
Used to display a "Tip" for a Component.
|
| JTree |
| JTree.DropLocation
A subclass of
TransferHandler.DropLocation representing
a drop location for a JTree . |
JTree.EmptySelectionModel
EmptySelectionModel is a TreeSelectionModel
that does not allow anything to be selected. |
| JTree.TreeSelectionRedirector
Handles creating a new
TreeSelectionEvent with the
JTree as the
source and passing it off to all the listeners. |
| JViewport
The "viewport" or "porthole" through which you see the underlying
information.
|
| JViewport.ViewListener
A listener for the view.
|
| KeyStroke
A KeyStroke represents a key action on the keyboard, or equivalent input
device.
|
LayoutStyle
LayoutStyle provides information about how to position
components. |
LayoutStyle.ComponentPlacement
ComponentPlacement is an enumeration of the
possible ways two components can be placed relative to each
other. |
| ListCellRenderer
Identifies components that can be used as "rubber stamps" to paint
the cells in a JList.
|
| ListModel
This interface defines the methods components like JList use
to get the value of each cell in a list and the length of the list.
|
| ListSelectionModel
This interface represents the current state of the
selection for any of the components that display a
list of values with stable indices.
|
LookAndFeel
LookAndFeel , as the name implies, encapsulates a look and
feel. |
| MenuElement
Any component that can be placed into a menu should implement this interface.
|
| MenuSelectionManager
A MenuSelectionManager owns the selection in menu hierarchy.
|
| MutableComboBoxModel
A mutable version of
ComboBoxModel . |
| Popup
Popups are used to display a
Component to the user, typically
on top of all the other Component s in a particular containment
hierarchy. |
PopupFactory
PopupFactory , as the name implies, is used to obtain
instances of Popup s. |
| ProgressMonitor
A class to monitor the progress of some operation.
|
| RepaintManager
This class manages repaint requests, allowing the number
of repaints to be minimized, for example by collapsing multiple
requests into a single repaint for members of a component tree.
|
| RootPaneContainer
This interface is implemented by components that have a single
JRootPane child: JDialog, JFrame, JWindow, JApplet, JInternalFrame.
|
RowFilter
RowFilter is used to filter out entries from the
model so that they are not shown in the view. |
| RowFilter.ComparisonType
Enumeration of the possible comparison values supported by
some of the default
RowFilter s. |
| RowFilter.Entry
An
Entry object is passed to instances of
RowFilter , allowing the filter to get the value of the
entry's data, and thus to determine whether the entry should be shown. |
RowSorter
RowSorter provides the basis for sorting and filtering. |
| RowSorter.SortKey
SortKey describes the sort order for a particular column.
|
| Scrollable
An interface that provides information to a scrolling container
like JScrollPane.
|
| ScrollPaneConstants
Constants used with the JScrollPane component.
|
| ScrollPaneLayout
The layout manager used by
JScrollPane . |
| SingleSelectionModel
A model that supports at most one indexed selection.
|
| SizeRequirements
For the convenience of layout managers,
calculates information about the size and position of components.
|
| SortingFocusTraversalPolicy
A FocusTraversalPolicy that determines traversal order by sorting the
Components of a focus traversal cycle based on a given Comparator.
|
| SortOrder
SortOrder is an enumeration of the possible sort orderings.
|
| SpinnerDateModel
A
SpinnerModel for sequences of Date s. |
| SpinnerListModel
A simple implementation of
SpinnerModel whose
values are defined by an array or a List . |
| SpinnerModel
A model for a potentially unbounded sequence of object values.
|
| SpinnerNumberModel
A
SpinnerModel for sequences of numbers. |
| Spring
An instance of the
Spring class holds three properties that
characterize its behavior: the minimum, preferred, and
maximum values. |
| SpringLayout.Constraints
A
Constraints object holds the
constraints that govern the way a component's size and position
change in a container controlled by a SpringLayout . |
| SwingConstants
A collection of constants generally used for positioning and orienting
components on the screen.
|
| SwingWorker.StateValue
Values for the
state bound property. |
| ToolTipManager
Manages all the
ToolTips in the system. |
| TransferHandler
This class is used to handle the transfer of a
Transferable
to and from Swing components. |
| TransferHandler.DropLocation
Represents a location where dropped data should be inserted.
|
| TransferHandler.TransferSupport
This class encapsulates all relevant details of a clipboard
or drag and drop transfer, and also allows for customizing
aspects of the drag and drop experience.
|
| UIDefaults
A table of defaults for Swing components.
|
| UIDefaults.LazyValue
This class enables one to store an entry in the defaults
table that isn't constructed until the first time it's
looked up with one of the
getXXX(key) methods. |
| UIManager.LookAndFeelInfo
Provides a little information about an installed
LookAndFeel for the sake of configuring a menu or
for initial application set up. |
| UnsupportedLookAndFeelException
An exception that indicates the requested look & feel
management classes are not present on the user's system.
|
| WindowConstants
Constants used to control the window-closing operation.
|
| Class and Description |
|---|
| Icon
A small fixed size picture, typically used to decorate components.
|
| Class and Description |
|---|
| Icon
A small fixed size picture, typically used to decorate components.
|
JColorChooser
JColorChooser provides a pane of controls designed to allow
a user to manipulate and select a color. |
| JComponent
The base class for all Swing components except top-level containers.
|
JPanel
JPanel is a generic lightweight container. |
| Class and Description |
|---|
| JComponent
The base class for all Swing components except top-level containers.
|
| JInternalFrame
A lightweight object that provides many of the features of
a native frame, including dragging, closing, becoming an icon,
resizing, title display, and support for a menu bar.
|
| MenuElement
Any component that can be placed into a menu should implement this interface.
|
| MenuSelectionManager
A MenuSelectionManager owns the selection in menu hierarchy.
|
RowSorter
RowSorter provides the basis for sorting and filtering. |
| Class and Description |
|---|
| Icon
A small fixed size picture, typically used to decorate components.
|
| Class and Description |
|---|
ActionMap
ActionMap provides mappings from
Object s
(called keys or Action names)
to Action s. |
| ComponentInputMap
A
ComponentInputMap is an InputMap
associated with a particular JComponent . |
| Icon
A small fixed size picture, typically used to decorate components.
|
InputMap
InputMap provides a binding between an input event
(currently only KeyStroke s are used)
and an Object . |
| JButton
An implementation of a "push" button.
|
| JComboBox
A component that combines a button or editable field and a drop-down list.
|
| JComponent
The base class for all Swing components except top-level containers.
|
JFileChooser
JFileChooser provides a simple mechanism for the user to
choose a file. |
JLayer
JLayer is a universal decorator for Swing components
which enables you to implement various advanced painting effects as well as
receive notifications of all AWTEvent s generated within its borders. |
| JList
A component that displays a list of objects and allows the user to select
one or more items.
|
JOptionPane
JOptionPane makes it easy to pop up a standard dialog box that
prompts users for a value or informs them of something. |
| JPopupMenu
An implementation of a popup menu -- a small window that pops up
and displays a series of choices.
|
JSplitPane
JSplitPane is used to divide two (and only two)
Component s. |
| JTabbedPane
A component that lets the user switch between a group of components by
clicking on a tab with a given title and/or icon.
|
| JTree |
| Popup
Popups are used to display a
Component to the user, typically
on top of all the other Component s in a particular containment
hierarchy. |
| Class and Description |
|---|
| AbstractAction
This class provides default implementations for the JFC
Action
interface. |
| AbstractButton
Defines common behaviors for buttons and menu items.
|
| AbstractListModel
The abstract definition for the data model that provides
a
List with its contents. |
| Action
The
Action interface provides a useful extension to the
ActionListener
interface in cases where the same functionality may be accessed by
several controls. |
ActionMap
ActionMap provides mappings from
Object s
(called keys or Action names)
to Action s. |
| BoxLayout
A layout manager that allows multiple components to be laid out either
vertically or horizontally.
|
| CellRendererPane
This class is inserted in between cell renderers and the components that
use them.
|
| ComboBoxEditor
The editor component used for JComboBox components.
|
| ComboBoxModel
A data model for a combo box.
|
| DesktopManager
DesktopManager objects are owned by a JDesktopPane object.
|
| Icon
A small fixed size picture, typically used to decorate components.
|
| JButton
An implementation of a "push" button.
|
JColorChooser
JColorChooser provides a pane of controls designed to allow
a user to manipulate and select a color. |
| JComboBox
A component that combines a button or editable field and a drop-down list.
|
| JComponent
The base class for all Swing components except top-level containers.
|
| JDesktopPane
A container used to create a multiple-document interface or a virtual desktop.
|
JFileChooser
JFileChooser provides a simple mechanism for the user to
choose a file. |
| JFrame
An extended version of
java.awt.Frame that adds support for
the JFC/Swing component architecture. |
| JInternalFrame
A lightweight object that provides many of the features of
a native frame, including dragging, closing, becoming an icon,
resizing, title display, and support for a menu bar.
|
| JInternalFrame.JDesktopIcon
This component represents an iconified version of a
JInternalFrame . |
| JLabel
A display area for a short text string or an image,
or both.
|
| JList
A component that displays a list of objects and allows the user to select
one or more items.
|
| JMenu
An implementation of a menu -- a popup window containing
JMenuItem s that
is displayed when the user selects an item on the JMenuBar . |
| JMenuBar
An implementation of a menu bar.
|
| JMenuItem
An implementation of an item in a menu.
|
JOptionPane
JOptionPane makes it easy to pop up a standard dialog box that
prompts users for a value or informs them of something. |
JPanel
JPanel is a generic lightweight container. |
| JPopupMenu
An implementation of a popup menu -- a small window that pops up
and displays a series of choices.
|
| JProgressBar
A component that visually displays the progress of some task.
|
| JRootPane
A lightweight container used behind the scenes by
JFrame , JDialog , JWindow ,
JApplet , and JInternalFrame . |
| JScrollBar
An implementation of a scrollbar.
|
| JScrollPane
Provides a scrollable view of a lightweight component.
|
JSeparator
JSeparator provides a general purpose component for
implementing divider lines - most commonly used as a divider
between menu items that breaks them up into logical groupings. |
| JSlider
A component that lets the user graphically select a value by sliding
a knob within a bounded interval.
|
| JSpinner
A single line input field that lets the user select a
number or an object value from an ordered sequence.
|
JSplitPane
JSplitPane is used to divide two (and only two)
Component s. |
| JTabbedPane
A component that lets the user switch between a group of components by
clicking on a tab with a given title and/or icon.
|
| JTable
The
JTable is used to display and edit regular two-dimensional tables
of cells. |
JTextField
JTextField is a lightweight component that allows the editing
of a single line of text. |
JToolBar
JToolBar provides a component that is useful for
displaying commonly used Action s or controls. |
| JTree |
| JTree.DropLocation
A subclass of
TransferHandler.DropLocation representing
a drop location for a JTree . |
| KeyStroke
A KeyStroke represents a key action on the keyboard, or equivalent input
device.
|
| ListCellRenderer
Identifies components that can be used as "rubber stamps" to paint
the cells in a JList.
|
| ListModel
This interface defines the methods components like JList use
to get the value of each cell in a list and the length of the list.
|
| ListSelectionModel
This interface represents the current state of the
selection for any of the components that display a
list of values with stable indices.
|
LookAndFeel
LookAndFeel , as the name implies, encapsulates a look and
feel. |
| MenuElement
Any component that can be placed into a menu should implement this interface.
|
| MenuSelectionManager
A MenuSelectionManager owns the selection in menu hierarchy.
|
| RootPaneContainer
This interface is implemented by components that have a single
JRootPane child: JDialog, JFrame, JWindow, JApplet, JInternalFrame.
|
| ScrollPaneConstants
Constants used with the JScrollPane component.
|
| SwingConstants
A collection of constants generally used for positioning and orienting
components on the screen.
|
| Timer
Fires one or more
ActionEvent s at specified
intervals. |
| UIDefaults
A table of defaults for Swing components.
|
| Class and Description |
|---|
| AbstractAction
This class provides default implementations for the JFC
Action
interface. |
| AbstractButton
Defines common behaviors for buttons and menu items.
|
| AbstractListModel
The abstract definition for the data model that provides
a
List with its contents. |
| Action
The
Action interface provides a useful extension to the
ActionListener
interface in cases where the same functionality may be accessed by
several controls. |
ActionMap
ActionMap provides mappings from
Object s
(called keys or Action names)
to Action s. |
| CellRendererPane
This class is inserted in between cell renderers and the components that
use them.
|
| ComboBoxEditor
The editor component used for JComboBox components.
|
| ComboBoxModel
A data model for a combo box.
|
| DefaultListCellRenderer
Renders an item in a list.
|
| Icon
A small fixed size picture, typically used to decorate components.
|
| JButton
An implementation of a "push" button.
|
| JComboBox
A component that combines a button or editable field and a drop-down list.
|
| JComponent
The base class for all Swing components except top-level containers.
|
JFileChooser
JFileChooser provides a simple mechanism for the user to
choose a file. |
| JInternalFrame
A lightweight object that provides many of the features of
a native frame, including dragging, closing, becoming an icon,
resizing, title display, and support for a menu bar.
|
| JLabel
A display area for a short text string or an image,
or both.
|
| JList
A component that displays a list of objects and allows the user to select
one or more items.
|
| JMenu
An implementation of a menu -- a popup window containing
JMenuItem s that
is displayed when the user selects an item on the JMenuBar . |
JPanel
JPanel is a generic lightweight container. |
| JPopupMenu
An implementation of a popup menu -- a small window that pops up
and displays a series of choices.
|
| JScrollPane
Provides a scrollable view of a lightweight component.
|
JSeparator
JSeparator provides a general purpose component for
implementing divider lines - most commonly used as a divider
between menu items that breaks them up into logical groupings. |
| JSlider
A component that lets the user graphically select a value by sliding
a knob within a bounded interval.
|
JToolBar
JToolBar provides a component that is useful for
displaying commonly used Action s or controls. |
LayoutStyle
LayoutStyle provides information about how to position
components. |
| ListCellRenderer
Identifies components that can be used as "rubber stamps" to paint
the cells in a JList.
|
| ListModel
This interface defines the methods components like JList use
to get the value of each cell in a list and the length of the list.
|
LookAndFeel
LookAndFeel , as the name implies, encapsulates a look and
feel. |
| MenuElement
Any component that can be placed into a menu should implement this interface.
|
| ScrollPaneConstants
Constants used with the JScrollPane component.
|
| SwingConstants
A collection of constants generally used for positioning and orienting
components on the screen.
|
| UIDefaults
A table of defaults for Swing components.
|
| Class and Description |
|---|
| JComboBox
A component that combines a button or editable field and a drop-down list.
|
| JComponent
The base class for all Swing components except top-level containers.
|
JFileChooser
JFileChooser provides a simple mechanism for the user to
choose a file. |
| JList
A component that displays a list of objects and allows the user to select
one or more items.
|
JOptionPane
JOptionPane makes it easy to pop up a standard dialog box that
prompts users for a value or informs them of something. |
| JPopupMenu
An implementation of a popup menu -- a small window that pops up
and displays a series of choices.
|
JSplitPane
JSplitPane is used to divide two (and only two)
Component s. |
| JTabbedPane
A component that lets the user switch between a group of components by
clicking on a tab with a given title and/or icon.
|
| JTree |
LookAndFeel
LookAndFeel , as the name implies, encapsulates a look and
feel. |
| Popup
Popups are used to display a
Component to the user, typically
on top of all the other Component s in a particular containment
hierarchy. |
| UIDefaults
A table of defaults for Swing components.
|
| Class and Description |
|---|
| Icon
A small fixed size picture, typically used to decorate components.
|
| JComponent
The base class for all Swing components except top-level containers.
|
LookAndFeel
LookAndFeel , as the name implies, encapsulates a look and
feel. |
| Painter
A painting delegate.
|
| UIDefaults
A table of defaults for Swing components.
|
| Class and Description |
|---|
| AbstractButton
Defines common behaviors for buttons and menu items.
|
| ComboBoxEditor
The editor component used for JComboBox components.
|
| Icon
A small fixed size picture, typically used to decorate components.
|
| JButton
An implementation of a "push" button.
|
| JComponent
The base class for all Swing components except top-level containers.
|
| JInternalFrame
A lightweight object that provides many of the features of
a native frame, including dragging, closing, becoming an icon,
resizing, title display, and support for a menu bar.
|
| JLabel
A display area for a short text string or an image,
or both.
|
JPanel
JPanel is a generic lightweight container. |
| JRootPane
A lightweight container used behind the scenes by
JFrame , JDialog , JWindow ,
JApplet , and JInternalFrame . |
| JScrollPane
Provides a scrollable view of a lightweight component.
|
JSeparator
JSeparator provides a general purpose component for
implementing divider lines - most commonly used as a divider
between menu items that breaks them up into logical groupings. |
| JSlider
A component that lets the user graphically select a value by sliding
a knob within a bounded interval.
|
JSplitPane
JSplitPane is used to divide two (and only two)
Component s. |
| ListCellRenderer
Identifies components that can be used as "rubber stamps" to paint
the cells in a JList.
|
LookAndFeel
LookAndFeel , as the name implies, encapsulates a look and
feel. |
| ScrollPaneConstants
Constants used with the JScrollPane component.
|
| SwingConstants
A collection of constants generally used for positioning and orienting
components on the screen.
|
| UIDefaults
A table of defaults for Swing components.
|
| Class and Description |
|---|
| CellEditor
This interface defines the methods any general editor should be able
to implement.
|
| DefaultRowSorter
An implementation of
RowSorter that provides sorting and
filtering around a grid-based data model. |
| JComponent
The base class for all Swing components except top-level containers.
|
| JComponent.AccessibleJComponent
Inner class of JComponent used to provide default support for
accessibility.
|
| JLabel
A display area for a short text string or an image,
or both.
|
| JTable
The
JTable is used to display and edit regular two-dimensional tables
of cells. |
| ListSelectionModel
This interface represents the current state of the
selection for any of the components that display a
list of values with stable indices.
|
RowSorter
RowSorter provides the basis for sorting and filtering. |
| SwingConstants
A collection of constants generally used for positioning and orienting
components on the screen.
|
| Class and Description |
|---|
| AbstractAction
This class provides default implementations for the JFC
Action
interface. |
| Action
The
Action interface provides a useful extension to the
ActionListener
interface in cases where the same functionality may be accessed by
several controls. |
| DropMode
Drop modes, used to determine the method by which a component
tracks and indicates a drop location during drag and drop.
|
| Icon
A small fixed size picture, typically used to decorate components.
|
| JComponent
The base class for all Swing components except top-level containers.
|
| JComponent.AccessibleJComponent
Inner class of JComponent used to provide default support for
accessibility.
|
| JEditorPane
A text component to edit various kinds of content.
|
JFormattedTextField
JFormattedTextField extends JTextField adding
support for formatting arbitrary values, as well as retrieving a particular
object once the user has edited the text. |
| JFormattedTextField.AbstractFormatter
Instances of
AbstractFormatter are used by
JFormattedTextField to handle the conversion both
from an Object to a String, and back from a String to an Object. |
| JFormattedTextField.AbstractFormatterFactory
Instances of
AbstractFormatterFactory are used by
JFormattedTextField to obtain instances of
AbstractFormatter which in turn are used to format values. |
| KeyStroke
A KeyStroke represents a key action on the keyboard, or equivalent input
device.
|
| Scrollable
An interface that provides information to a scrolling container
like JScrollPane.
|
| SizeRequirements
For the convenience of layout managers,
calculates information about the size and position of components.
|
| SwingConstants
A collection of constants generally used for positioning and orienting
components on the screen.
|
| TransferHandler.DropLocation
Represents a location where dropped data should be inserted.
|
| Class and Description |
|---|
| AbstractAction
This class provides default implementations for the JFC
Action
interface. |
| Action
The
Action interface provides a useful extension to the
ActionListener
interface in cases where the same functionality may be accessed by
several controls. |
| Icon
A small fixed size picture, typically used to decorate components.
|
| JEditorPane
A text component to edit various kinds of content.
|
| SizeRequirements
For the convenience of layout managers,
calculates information about the size and position of components.
|
| SwingConstants
A collection of constants generally used for positioning and orienting
components on the screen.
|
| Class and Description |
|---|
| CellEditor
This interface defines the methods any general editor should be able
to implement.
|
| DefaultListSelectionModel
Default data model for list selections.
|
| Icon
A small fixed size picture, typically used to decorate components.
|
| JComponent
The base class for all Swing components except top-level containers.
|
| JLabel
A display area for a short text string or an image,
or both.
|
JTextField
JTextField is a lightweight component that allows the editing
of a single line of text. |
| JTree |
| Scrollable
An interface that provides information to a scrolling container
like JScrollPane.
|
| SwingConstants
A collection of constants generally used for positioning and orienting
components on the screen.
|
| Timer
Fires one or more
ActionEvent s at specified
intervals. |
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.


Tutorials
ChocolateChip-UI version 3.5.3
Layouts
ChocolateChip-UI provides a layout module to enable you to create the layouts you need. It uses an unordered list with the class list
. This means you can use a normal ordered or unordered list inside of ChocolateChip-UI's layout lists and they will display as expected.
To create a layout is very simple. Just put an unordered list with the class 'list', then add content to the list items. The default list layout stacks its content vertically. Also all h3
, h4
and p
tags will wrap their contents when it is longer than can fit on the line. Layout lists expect the following possible containers for content:
- h3 (the list item title)
- h4 (the list item subtitle)
- p (the list item detail or description)
List with list item titles:

People

Places

Food

List with list item titles and subtitles:

People

Your Friends

Places

Interesting Destinations

Food

Restaurants

Here is a list with various content types:

Willy Moon

Yeah Yeah

Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus.

The Olms

Wanna Feel It

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium.

You can create a list header by putting an h2
tag right before it. Similarly, you can create a list footer by putting a p
tag immediately after the list. A list header is display with all caps and is cut off with ellipsis if it is longer than can fit on the screen. You can set the header to display its actual capitalization by putting the class normal-case
.
List with header:

Basic tableheader with a bunch of stuff in here

People

Places

Food

List with header using the class normal-case
:

Basic tableheader with a bunch of stuff in here

People

Places

Food

List with footer (You can have more than one p
tag after a list.):

People

Places

Food

A quick summary about all of the items in this list. You can put as much as you like in here and the text will simply wrap around.

To create a footer, just put a paragraph tag right after the list. And yes, as you can see, you can put multiple paragraphs after the list for more complex list footers.

This simple technique provides a consistent way to implement layouts with little effort. However, if you need more precise layouts for placement of list item content, ChocolateChip-UI provides another layout option: comp list items. Comp stands for composite or complex. You can designate a list as comp by adding the class comp
. When a list item has this class, you can insert several list item containers to create various types of layouts. There are thee possible combinations of containers for comp layouts:
- div + aside
- aside + div
- aside + div + aside
A div will always be used to hold the list item h3
, h4
and p
. Asides are always used for secondary material, such as images, counters or date-time markers. If you wanted to have a list item show an image on the side with the h3
, etc. next to it, you would put the image in an aside, followed by a div with the h3
, etc. When using comp layouts, if the width of the container for the h2
and h3
is shorter than their content, they will be clipped with an ellipsis. This is more likely to happen in portrait orientation. Switching to landscape orientation will usually reveal the clipped text, unless it is really long.
Here's a basic comp layout

Imagine Dragons

Radioactive

In the above example, notice that we only provided a height for the image. This will mean that all images will be the same height, though not necessarily the same width. If the images are different widths, the div with the h3
and h4
will automatically adjust its width to accomodate the image. You could also apply a width to the image instead of a height. Then all cells would be the same width, though their height would vary depending on the image height. You could also control the height or width of the images through a CSS declaration.
Here's another possible list item layout where the subtitle is displayed to the right of the title by putting it in a aside. By default the content in the last aside is always displayed spread horizontally and centered vertically:

People

Your Friends

There are times where you want to indicate a value on a list item. This may be the price, the weight or the number of items it will reveal. You can provide that information in a counter
tag. This is just a span tag with the class counter
. You put that in and aside after the list item's div:

People

Your Friends

23

You can also provide a date-time value using a span with the class date-time
:

Meetings

Personal

Monday

And here's a comp layout with an aside
, div
and aside
:

Weather

Alerts

2

Sometimes you may want to emphasize the subtitle visually over the title. You can do with with the switched class on the list items. This type of layout only expects the title and subtitle as content.

People

Your Friends

Places

Interesting Destinations

Navigation Indicators
iOS uses navigation indicators to inform the user that a pressing a list item will result in navigation to another screen. ChocolateChip-UI provides a simple way to provide this visual feedback. For simple list layouts, just put the class 'nav' on the list item. This will display a right pointing chevron on iOS. Please note that this will be hidden on Android and Windows Phone 8 as these are foreign to those operating systems.

People

Places

Food

If you have a number of items in your you list, the placement of the navigation indicator might appear off. If you would prefer that it was vertically centered to the height of the list item, you can accomplish this by using a comp layout and putting a span with a class of nav
in each list item. Since these are navigation items, they have the data-goto
attribute indicating what article they will go to. Read the tutorial on navigation to learn how this works.

People

Your Friends

Places

Interesting Destinations

Sometimes you may want to indicate that a list item will reveal some greater detail about an item. You can show this with the show-detail
class. For simple lists just put it on the list item:

People

Places

Food

Unlike the navigation indicator for iOS, this will be display on Android and Windows Phone 8. For comp layouts you can use a span with the class show-detail
in the last aside:

Imagine Dragons

Radioactive

Open up the layout examples and see how they are put together and how they display in browser and on devices. If you find yourself in a situation where none of these layouts cover your needs, feel free to create a new class for any of the layout containers. Open up the CSS file and copy the style of the closest thing to what you need. Then modify the new class to suit your purposes. Remember, this is just markup and CSS. Customize it to suit your needs.


@angular-material-extensions/password-strength
client side password validation with angular built in form controller
Show Password DetailsHTMLTSPassword
{{passwordWithValidation.value.length}} / {{passwordComponentWithValidation.max}}
Password is required
Password is not valid
@angular-material-extensions/password-strength
confirm your password with angular form group
Show Password Details
HTMLTSPassword
{{passwordWithConfirmation.value.length}} / {{passwordComponentWithConfirmation.max}}
Password is required
Password is not valid
Confirm Password
{{passwordToConfirm.value.length}} / {{passwordComponentWithConfirmation.max}}
Password confirmation is required
Password is not the same