code
stringlengths 3
1.01M
| repo_name
stringlengths 5
116
| path
stringlengths 3
311
| language
stringclasses 30
values | license
stringclasses 15
values | size
int64 3
1.01M
|
|---|---|---|---|---|---|
// Type definitions for @ag-grid-community/core v25.0.1
// Project: http://www.ag-grid.com/
// Definitions by: Niall Crosby <https://github.com/ag-grid/>
export interface XmlElement {
name: string;
properties?: XmlAttributes;
children?: XmlElement[];
textNode?: string | null;
}
export interface HeaderElement {
[key: string]: string | undefined;
version?: string;
standalone?: string;
encoding?: string;
}
export interface XmlAttributes {
prefixedAttributes?: PrefixedXmlAttributes[];
rawMap?: any;
}
export interface PrefixedXmlAttributes {
prefix: string;
map: any;
}
|
ceolter/angular-grid
|
community-modules/core/dist/es6/interfaces/iXmlFactory.d.ts
|
TypeScript
|
mit
| 619
|
const express = require("express");
const getApp = () => {
const app = express();
return app;
};
module.exports = { getApp };
|
TelerikAcademy/Slice-and-Dice
|
Topics/12. SPA-app-architecture-Live-Demo/src/app/application.js
|
JavaScript
|
mit
| 135
|
-- SETTINGS
SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES
('modules', 'bx_spaces', '_bx_spaces', 'bx_spaces@modules/boonex/spaces/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
SET @iTypeId = LAST_INSERT_ID();
INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
VALUES (@iTypeId, 'bx_spaces', '_bx_spaces', 1);
SET @iCategId = LAST_INSERT_ID();
INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
('bx_spaces_enable_multilevel_hierarchy', '', @iCategId, '_bx_spaces_option_enable_multilevel_hierarchy', 'checkbox', '', '', '', 0),
('bx_spaces_num_connections_quick', '6', @iCategId, '_bx_spaces_option_num_connections_quick', 'digit', '', '', '', 10),
('bx_spaces_per_page_browse', '24', @iCategId, '_bx_spaces_option_per_page_browse', 'digit', '', '', '', 11),
('bx_spaces_num_rss', '10', @iCategId, '_bx_spaces_option_num_rss', 'digit', '', '', '', 12),
('bx_spaces_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
('bx_spaces_per_page_browse_recommended', '10', @iCategId, '_sys_option_per_page_browse_recommended', 'digit', '', '', '', 16),
('bx_spaces_searchable_fields', 'space_name,space_desc', @iCategId, '_bx_spaces_option_searchable_fields', 'list', 'a:2:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:21:"get_searchable_fields";}', '', '', 30);
-- PAGES
-- PAGE: create profile
INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_create_profile', 'create-space-profile', '_bx_spaces_page_title_sys_create_profile', '_bx_spaces_page_title_create_profile', 'bx_spaces', 5, 2147483647, 1, 'page.php?i=create-space-profile', '', '', '', 0, 1, 0, '', '');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
('bx_spaces_create_profile', 1, 'bx_spaces', '_bx_spaces_page_block_title_create_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:13:\"entity_create\";}', 0, 1, 1);
-- PAGE: view profile
INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_view_profile', 'view-space-profile', '_bx_spaces_page_title_sys_view_profile', '_bx_spaces_page_title_view_profile', 'bx_spaces', 10, 2147483647, 1, 'page.php?i=view-space-profile', '', '', '', 0, 1, 0, 'BxSpacesPageEntry', 'modules/boonex/spaces/classes/BxSpacesPageEntry.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
('bx_spaces_view_profile', 1, 'bx_spaces', '', '_bx_spaces_page_block_title_entry_social_sharing', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:21:\"entity_social_sharing\";}', 0, 0, 0, 0),
('bx_spaces_view_profile', 1, 'bx_spaces', '', '_bx_spaces_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:18:"entity_all_actions";}', 0, 0, 0, 0),
('bx_spaces_view_profile', 2, 'bx_spaces', '', '_bx_spaces_page_block_title_profile_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 0),
('bx_spaces_view_profile', 2, 'bx_spaces', '', '_bx_spaces_page_block_title_parent', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:13:\"entity_parent\";}', 0, 0, 1, 1),
('bx_spaces_view_profile', 2, 'bx_spaces', '', '_bx_spaces_page_block_title_childs', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:13:\"entity_childs\";}', 0, 0, 1, 2),
('bx_spaces_view_profile', 3, 'bx_spaces', '', '_bx_spaces_page_block_title_profile_location', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:15:\"entity_location\";}', 0, 0, 0, 0),
('bx_spaces_view_profile', 3, 'bx_spaces', '', '_bx_spaces_page_block_title_fans', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:4:\"fans\";}', 0, 0, 1, 0),
('bx_spaces_view_profile', 3, 'bx_spaces', '', '_bx_spaces_page_block_title_admins', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:6:\"admins\";}', 0, 0, 1, 1),
('bx_spaces_view_profile', 3, 'bx_spaces', '', '_bx_spaces_page_block_title_profile_location', 3, 2147483647, 'service', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:13:\"locations_map\";s:6:\"params\";a:2:{i:0;s:9:\"bx_spaces\";i:1;s:12:\"{content_id}\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 0, 1, 2),
('bx_spaces_view_profile', 4, 'bx_spaces', '', '_bx_spaces_page_block_title_profile_description', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 0),
('bx_spaces_view_profile', 4, 'bx_spaces', '', '_bx_spaces_page_block_title_profile_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 0, 0);
-- PAGE: view closed profile
INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_view_profile_closed', 'view-space-profile-closed', '_bx_spaces_page_title_sys_view_profile_closed', '_bx_spaces_page_title_view_profile', 'bx_spaces', 10, 2147483647, 1, 'page.php?i=view-space-profile', '', '', '', 0, 1, 0, 'BxSpacesPageEntry', 'modules/boonex/spaces/classes/BxSpacesPageEntry.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
('bx_spaces_view_profile_closed', 2, 'bx_spaces', '', '_bx_spaces_page_block_title_profile_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 0),
('bx_spaces_view_profile_closed', 3, 'bx_spaces', '', '_bx_spaces_page_block_title_fans', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:4:\"fans\";}', 0, 0, 1, 0);
-- PAGE: edit profile
INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_edit_profile', 'edit-space-profile', '_bx_spaces_page_title_sys_edit_profile', '_bx_spaces_page_title_edit_profile', 'bx_spaces', 5, 2147483647, 1, 'page.php?i=edit-space-profile', '', '', '', 0, 1, 0, 'BxSpacesPageEntry', 'modules/boonex/spaces/classes/BxSpacesPageEntry.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
('bx_spaces_edit_profile', 1, 'bx_spaces', '_bx_spaces_page_block_title_edit_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:11:\"entity_edit\";}', 0, 0, 0);
-- PAGE: edit profile cover
INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_edit_profile_cover', 'edit-space-cover', '_bx_spaces_page_title_sys_edit_profile_cover', '_bx_spaces_page_title_edit_profile_cover', 'bx_spaces', 5, 2147483647, 1, 'page.php?i=edit-space-cover', '', '', '', 0, 1, 0, 'BxSpacesPageEntry', 'modules/boonex/spaces/classes/BxSpacesPageEntry.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
('bx_spaces_edit_profile_cover', 1, 'bx_spaces', '_bx_spaces_page_block_title_edit_profile_cover', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:17:\"entity_edit_cover\";}', 0, 0, 0);
-- PAGE: invite members
INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_invite', 'invite-to-space', '_bx_spaces_page_title_sys_invite_to_space', '_bx_spaces_page_title_invite_to_space', 'bx_spaces', 5, 2147483647, 1, 'page.php?i=invite-to-space', '', '', '', 0, 1, 0, 'BxSpacesPageEntry', 'modules/boonex/spaces/classes/BxSpacesPageEntry.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
('bx_spaces_invite', 1, 'bx_spaces', '_bx_spaces_page_block_title_invite_to_space', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:13:\"entity_invite\";}', 0, 0, 0);
-- PAGE: delete profile
INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_delete_profile', 'delete-space-profile', '_bx_spaces_page_title_sys_delete_profile', '_bx_spaces_page_title_delete_profile', 'bx_spaces', 5, 2147483647, 1, 'page.php?i=delete-space-profile', '', '', '', 0, 1, 0, 'BxSpacesPageEntry', 'modules/boonex/spaces/classes/BxSpacesPageEntry.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
('bx_spaces_delete_profile', 1, 'bx_spaces', '_bx_spaces_page_block_title_delete_profile', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:13:\"entity_delete\";}', 0, 0, 0);
-- PAGE: profile info
INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_profile_info', 'space-profile-info', '_bx_spaces_page_title_sys_profile_info', '_bx_spaces_page_title_profile_info', 'bx_spaces', 5, 2147483647, 1, 'page.php?i=space-profile-info', '', '', '', 0, 1, 0, 'BxSpacesPageEntry', 'modules/boonex/spaces/classes/BxSpacesPageEntry.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
('bx_spaces_profile_info', 1, 'bx_spaces', '_bx_spaces_page_block_title_system_profile_info', '_bx_spaces_page_block_title_profile_info_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:16:\"entity_info_full\";}', 0, 0, 1, 1),
('bx_spaces_profile_info', 1, 'bx_spaces', '', '_bx_spaces_page_block_title_profile_description', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 2);
-- PAGE: space fans
INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_fans', 'space-fans', '_bx_spaces_page_title_sys_space_fans', '_bx_spaces_page_title_space_fans', 'bx_spaces', 5, 2147483647, 1, 'page.php?i=space-fans', '', '', '', 0, 1, 0, 'BxSpacesPageEntry', 'modules/boonex/spaces/classes/BxSpacesPageEntry.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
('bx_spaces_fans', 1, 'bx_spaces', '_bx_spaces_page_block_title_system_fans', '_bx_spaces_page_block_title_fans_link', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:10:"fans_table";}', 0, 0, 1, 1);
-- PAGE: view entry comments
INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_profile_comments', '_bx_spaces_page_title_sys_profile_comments', '_bx_spaces_page_title_profile_comments', 'bx_spaces', 5, 2147483647, 1, 'space-profile-comments', '', '', '', '', 0, 1, 0, 'BxSpacesPageEntry', 'modules/boonex/spaces/classes/BxSpacesPageEntry.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
('bx_spaces_profile_comments', 1, 'bx_spaces', '_bx_spaces_page_block_title_profile_comments', '_bx_spaces_page_block_title_profile_comments_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 0, 1);
-- PAGE: module home
INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_home', '_bx_spaces_page_title_sys_recent', '_bx_spaces_page_title_recent', 'bx_spaces', 5, 2147483647, 1, 'spaces-home', 'page.php?i=spaces-home', '', '', '', 0, 1, 0, 'BxSpacesPageBrowse', 'modules/boonex/spaces/classes/BxSpacesPageBrowse.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`, `active`) VALUES
('bx_spaces_home', 1, 'bx_spaces', '_bx_spaces_page_block_title_featured_profiles', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:7:"gallery";}}', 0, 1, 0, 1),
('bx_spaces_home', 1, 'bx_spaces', '_bx_spaces_page_block_title_latest_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:22:\"browse_recent_profiles\";s:6:"params";a:1:{i:0;b:1;}}', 0, 1, 1, 1),
('bx_spaces_home', 1, 'bx_spaces', '_bx_spaces_page_block_title_top_level_spaces', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:16:\"browse_top_level\";s:6:"params";a:1:{i:0;b:1;}}', 0, 1, 2, 0);
-- PAGE: top profiles
INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_top', '_bx_spaces_page_title_sys_top', '_bx_spaces_page_title_top', 'bx_spaces', 5, 2147483647, 1, 'spaces-top', 'page.php?i=spaces-top', '', '', '', 0, 1, 0, 'BxSpacesPageBrowse', 'modules/boonex/spaces/classes/BxSpacesPageBrowse.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
('bx_spaces_top', 1, 'bx_spaces', '_bx_spaces_page_block_title_top_profiles', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:19:\"browse_top_profiles\";s:6:"params";a:1:{i:0;b:1;}}', 0, 1, 0);
-- PAGE: search for entries
INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_search', '_bx_spaces_page_title_sys_entries_search', '_bx_spaces_page_title_entries_search', 'bx_spaces', 5, 2147483647, 1, 'spaces-search', 'page.php?i=spaces-search', '', '', '', 0, 1, 0, 'BxSpacesPageBrowse', 'modules/boonex/spaces/classes/BxSpacesPageBrowse.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
('bx_spaces_search', 1, 'bx_spaces', '_bx_spaces_page_block_title_search_form', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:9:"bx_spaces";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 1),
('bx_spaces_search', 1, 'bx_spaces', '_bx_spaces_page_block_title_search_results', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:9:"bx_spaces";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 2),
('bx_spaces_search', 1, 'bx_spaces', '_bx_spaces_page_block_title_search_form_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:14:"bx_spaces_cmts";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 3),
('bx_spaces_search', 1, 'bx_spaces', '_bx_spaces_page_block_title_search_results_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:14:"bx_spaces_cmts";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 4);
-- PAGE: module manage own
INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_manage', '_bx_spaces_page_title_sys_manage', '_bx_spaces_page_title_manage', 'bx_spaces', 5, 2147483647, 1, 'spaces-manage', 'page.php?i=spaces-manage', '', '', '', 0, 1, 0, 'BxSpacesPageBrowse', 'modules/boonex/spaces/classes/BxSpacesPageBrowse.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
('bx_spaces_manage', 1, 'bx_spaces', '_bx_spaces_page_block_title_system_manage', '_bx_spaces_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:12:\"manage_tools\";}}', 0, 1, 0);
-- PAGE: module manage all
INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_administration', '_bx_spaces_page_title_sys_manage_administration', '_bx_spaces_page_title_manage', 'bx_spaces', 5, 192, 1, 'spaces-administration', 'page.php?i=spaces-administration', '', '', '', 0, 1, 0, 'BxSpacesPageBrowse', 'modules/boonex/spaces/classes/BxSpacesPageBrowse.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
('bx_spaces_administration', 1, 'bx_spaces', '_bx_spaces_page_block_title_system_manage_administration', '_bx_spaces_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
-- PAGE: user's spaces
INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_joined', 'joined-spaces', '_bx_spaces_page_title_sys_joined_entries', '_bx_spaces_page_title_joined_entries', 'bx_spaces', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxSpacesPageJoinedEntries', 'modules/boonex/spaces/classes/BxSpacesPageJoinedEntries.php');
INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
('bx_spaces_joined', 1, 'bx_spaces', '_bx_spaces_page_block_title_sys_entries_actions', '_bx_spaces_page_block_title_entries_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:18:"my_entries_actions";}', 0, 0, 1, 1),
('bx_spaces_joined', 1, 'bx_spaces', '_bx_spaces_page_block_title_sys_entries_of_author', '_bx_spaces_page_block_title_entries_of_author', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:22:"browse_created_entries";}', 0, 0, 0, 2),
('bx_spaces_joined', 1, 'bx_spaces', '_bx_spaces_page_block_title_sys_favorites_of_author', '_bx_spaces_page_block_title_favorites_of_author', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:15:"browse_favorite";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 1, 1, 3),
('bx_spaces_joined', 1, 'bx_spaces', '_bx_spaces_page_block_title_sys_joined_entries', '_bx_spaces_page_block_title_joined_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:21:"browse_joined_entries";s:6:"params";a:2:{i:0;i:0;i:1;b:1;}}', 0, 0, 1, 4);
-- PAGE: add block to homepage
SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = 1 ORDER BY `order` DESC LIMIT 1);
INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
('sys_home', 1, 'bx_spaces', '', '_bx_spaces_page_block_title_latest_profiles', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:22:"browse_recent_profiles";}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1),
('sys_home', 1, 'bx_spaces', '_bx_spaces_page_block_title_sys_recommended_entries_view_showcase', '_bx_spaces_page_block_title_recommended_entries_view_showcase', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:18:"browse_recommended";}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 2);
-- PAGE: service blocks
SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' AND `cell_id` = 0 ORDER BY `order` DESC LIMIT 1);
INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
('', 0, 'bx_spaces', '', '_bx_spaces_page_block_title_categories', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"categories_list";s:6:"params";a:2:{i:0;s:14:"bx_spaces_cats";i:1;a:2:{s:10:\"show_empty\";b:1;s:21:\"show_empty_categories\";b:1;}}s:5:"class";s:20:"TemplServiceCategory";}', 1, 1, 1, IFNULL(@iBlockOrder, 0) + 1),
('', 0, 'bx_spaces', '_bx_spaces_page_block_title_sys_featured_entries_view_showcase', '_bx_spaces_page_block_title_featured_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:15:\"browse_featured\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 2),
('', 0, 'bx_spaces', '_bx_spaces_page_block_title_sys_recommended_entries_view_showcase', '_bx_spaces_page_block_title_recommended_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:18:\"browse_recommended\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, 1, IFNULL(@iBlockOrder, 0) + 3);
-- MENU
-- MENU: add to site menu
SET @iSiteMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_site' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
('sys_site', 'bx_spaces', 'spaces-home', '_bx_spaces_menu_item_title_system_entries_home', '_bx_spaces_menu_item_title_entries_home', 'page.php?i=spaces-home', '', '', 'object-group col-red2', 'bx_spaces_submenu', 2147483647, 1, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
-- MENU: add to homepage menu
SET @iHomepageMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_homepage' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
('sys_homepage', 'bx_spaces', 'spaces-home', '_bx_spaces_menu_item_title_system_entries_home', '_bx_spaces_menu_item_title_entries_home', 'page.php?i=spaces-home', '', '', 'object-group col-red2', 'bx_spaces_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
-- MENU: add to "add content" menu
SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_content_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
('sys_add_content_links', 'bx_spaces', 'create-space-profile', '_bx_spaces_menu_item_title_system_create_profile', '_bx_spaces_menu_item_title_create_profile', 'page.php?i=create-space-profile', '', '', 'object-group col-red2', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
-- MENU: view actions
INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_view_actions', '_bx_spaces_menu_title_view_profile_actions', 'bx_spaces_view_actions', 'bx_spaces', 9, 0, 1, 'BxSpacesMenuViewActions', 'modules/boonex/spaces/classes/BxSpacesMenuViewActions.php');
INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
('bx_spaces_view_actions', 'bx_spaces', '_bx_spaces_menu_set_title_view_profile_actions', 0);
INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES
('bx_spaces_view_actions', 'bx_spaces', 'profile-fan-add', '_bx_spaces_menu_item_title_system_become_fan', '{title_add_fan}', 'javascript:void(0)', 'bx_conn_action(this, \'bx_spaces_fans\', \'add\', \'{profile_id}\')', '', 'sign-in-alt', '', 0, 2147483647, 1, 0, 0, 5),
('bx_spaces_view_actions', 'bx_spaces', 'profile-subscribe-add', '_bx_spaces_menu_item_title_system_subscribe', '_bx_spaces_menu_item_title_subscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'add\', \'{profile_id}\')', '', 'check', '', 0, 2147483647, 1, 0, 1, 20),
('bx_spaces_view_actions', 'bx_spaces', 'profile-actions-more', '_bx_spaces_menu_item_title_system_more_actions', '_bx_spaces_menu_item_title_more_actions', 'javascript:void(0)', 'bx_menu_popup(''bx_spaces_view_actions_more'', this, {}, {profile_id:{profile_id}});', '', 'cog', 'bx_spaces_view_actions_more', 1, 2147483647, 1, 0, 1, 9999);
-- MENU: view actions more
INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_view_actions_more', '_bx_spaces_menu_title_view_profile_actions_more', 'bx_spaces_view_actions_more', 'bx_spaces', 6, 0, 1, 'BxSpacesMenuViewActions', 'modules/boonex/spaces/classes/BxSpacesMenuViewActions.php');
INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
('bx_spaces_view_actions_more', 'bx_spaces', '_bx_spaces_menu_set_title_view_profile_actions_more', 0);
INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
('bx_spaces_view_actions_more', 'bx_spaces', 'profile-fan-remove', '_bx_spaces_menu_item_title_system_leave_space', '{title_remove_fan}', 'javascript:void(0)', 'bx_conn_action(this, \'bx_spaces_fans\', \'remove\', \'{profile_id}\')', '', 'sign-out-alt', '', 2147483647, 1, 0, 10),
('bx_spaces_view_actions_more', 'bx_spaces', 'profile-subscribe-remove', '_bx_spaces_menu_item_title_system_unsubscribe', '_bx_spaces_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, 1, 0, 20),
('bx_spaces_view_actions_more', 'bx_spaces', 'edit-space-cover', '_bx_spaces_menu_item_title_system_edit_cover', '_bx_spaces_menu_item_title_edit_cover', 'page.php?i=edit-space-cover&id={content_id}', '', '', 'edit', '', 2147483647, 1, 0, 30),
('bx_spaces_view_actions_more', 'bx_spaces', 'edit-space-profile', '_bx_spaces_menu_item_title_system_edit_profile', '_bx_spaces_menu_item_title_edit_profile', 'page.php?i=edit-space-profile&id={content_id}', '', '', 'pencil-alt', '', 2147483647, 1, 0, 40),
('bx_spaces_view_actions_more', 'bx_spaces', 'invite-to-space', '_bx_spaces_menu_item_title_system_invite', '_bx_spaces_menu_item_title_invite', 'page.php?i=invite-to-space&id={content_id}', '', '', 'user-friends', '', 2147483647, 1, 0, 42),
('bx_spaces_view_actions_more', 'bx_spaces', 'delete-space-profile', '_bx_spaces_menu_item_title_system_delete_profile', '_bx_spaces_menu_item_title_delete_profile', 'page.php?i=delete-space-profile&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 50);
-- MENU: all actions menu for view entry
INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_view_actions_all', '_sys_menu_title_view_actions', 'bx_spaces_view_actions_all', 'bx_spaces', 15, 0, 1, 'BxSpacesMenuViewActionsAll', 'modules/boonex/spaces/classes/BxSpacesMenuViewActionsAll.php');
INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
('bx_spaces_view_actions_all', 'bx_spaces', '_sys_menu_set_title_view_actions', 0);
INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
('bx_spaces_view_actions_all', 'bx_spaces', 'profile-fan-add', '_bx_spaces_menu_item_title_system_become_fan', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 10),
('bx_spaces_view_actions_all', 'bx_spaces', 'profile-fan-remove', '_bx_spaces_menu_item_title_system_leave_group', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 20),
('bx_spaces_view_actions_all', 'bx_spaces', 'profile-subscribe-add', '_bx_spaces_menu_item_title_system_subscribe', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 30),
('bx_spaces_view_actions_all', 'bx_spaces', 'profile-subscribe-remove', '_bx_spaces_menu_item_title_system_unsubscribe', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 40),
('bx_spaces_view_actions_all', 'bx_spaces', 'comment', '_sys_menu_item_title_system_va_comment', '', '', '', '', '', '', '', 0, 2147483647, 0, 0, 200),
('bx_spaces_view_actions_all', 'bx_spaces', 'view', '_sys_menu_item_title_system_va_view', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 210),
('bx_spaces_view_actions_all', 'bx_spaces', 'vote', '_sys_menu_item_title_system_va_vote', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 220),
('bx_spaces_view_actions_all', 'bx_spaces', 'score', '_sys_menu_item_title_system_va_score', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 230),
('bx_spaces_view_actions_all', 'bx_spaces', 'favorite', '_sys_menu_item_title_system_va_favorite', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 240),
('bx_spaces_view_actions_all', 'bx_spaces', 'feature', '_sys_menu_item_title_system_va_feature', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 250),
('bx_spaces_view_actions_all', 'bx_spaces', 'repost', '_sys_menu_item_title_system_va_repost', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 260),
('bx_spaces_view_actions_all', 'bx_spaces', 'report', '_sys_menu_item_title_system_va_report', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 270),
('bx_spaces_view_actions_all', 'bx_spaces', 'social-sharing-facebook', '_sys_menu_item_title_system_social_sharing_facebook', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 300),
('bx_spaces_view_actions_all', 'bx_spaces', 'social-sharing-twitter', '_sys_menu_item_title_system_social_sharing_twitter', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 320),
('bx_spaces_view_actions_all', 'bx_spaces', 'social-sharing-pinterest', '_sys_menu_item_title_system_social_sharing_pinterest', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 330),
('bx_spaces_view_actions_all', 'bx_spaces', 'edit-space-cover', '_bx_spaces_menu_item_title_system_edit_cover', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 400),
('bx_spaces_view_actions_all', 'bx_spaces', 'edit-space-profile', '_bx_spaces_menu_item_title_system_edit_profile', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 410),
('bx_spaces_view_actions_all', 'bx_spaces', 'invite-to-space', '_bx_spaces_menu_item_title_system_invite', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 420),
('bx_spaces_view_actions_all', 'bx_spaces', 'delete-space-profile', '_bx_spaces_menu_item_title_system_delete_profile', '', '', '', '', '', '', '', 0, 2147483647, 1, 0, 430),
('bx_spaces_view_actions_all', 'bx_spaces', 'more-auto', '_sys_menu_item_title_system_va_more_auto', '_sys_menu_item_title_va_more_auto', 'javascript:void(0)', '', '', 'ellipsis-v', '', '', 0, 2147483647, 1, 0, 9999);
-- MENU: actions menu for my entries
INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_my', '_bx_spaces_menu_title_entries_my', 'bx_spaces_my', 'bx_spaces', 9, 0, 1, 'BxSpacesMenu', 'modules/boonex/spaces/classes/BxSpacesMenu.php');
INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
('bx_spaces_my', 'bx_spaces', '_bx_spaces_menu_set_title_entries_my', 0);
INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
('bx_spaces_my', 'bx_spaces', 'create-space-profile', '_bx_spaces_menu_item_title_system_create_profile', '_bx_spaces_menu_item_title_create_profile', 'page.php?i=create-space-profile', '', '', 'plus', '', 2147483647, 1, 0, 0);
-- MENU: module sub-menu
INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_submenu', '_bx_spaces_menu_title_submenu', 'bx_spaces_submenu', 'bx_spaces', 8, 0, 1, '', '');
INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
('bx_spaces_submenu', 'bx_spaces', '_bx_spaces_menu_set_title_submenu', 0);
INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
('bx_spaces_submenu', 'bx_spaces', 'spaces-home', '_bx_spaces_menu_item_title_system_entries_recent', '_bx_spaces_menu_item_title_entries_recent', 'page.php?i=spaces-home', '', '', '', '', 2147483647, 1, 1, 1),
('bx_spaces_submenu', 'bx_spaces', 'spaces-top', '_bx_spaces_menu_item_title_system_entries_top', '_bx_spaces_menu_item_title_entries_top', 'page.php?i=spaces-top', '', '', '', '', 2147483647, 1, 1, 2),
('bx_spaces_submenu', 'bx_spaces', 'spaces-search', '_bx_spaces_menu_item_title_system_entries_search', '_bx_spaces_menu_item_title_entries_search', 'page.php?i=spaces-search', '', '', '', '', 2147483647, 1, 1, 3),
('bx_spaces_submenu', 'bx_spaces', 'spaces-manage', '_bx_spaces_menu_item_title_system_entries_manage', '_bx_spaces_menu_item_title_entries_manage', 'page.php?i=spaces-manage', '', '', '', '', 2147483646, 1, 1, 4);
-- MENU: view submenu
INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_view_submenu', '_bx_spaces_menu_title_view_profile_submenu', 'bx_spaces_view_submenu', 'bx_spaces', 8, 0, 1, 'BxSpacesMenuView', 'modules/boonex/spaces/classes/BxSpacesMenuView.php'),
('bx_spaces_view_submenu_cover', '_bx_spaces_menu_title_view_profile_submenu_cover', 'bx_spaces_view_submenu', 'bx_spaces', 7, 0, 1, 'BxSpacesMenuView', 'modules/boonex/spaces/classes/BxSpacesMenuView.php');
INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
('bx_spaces_view_submenu', 'bx_spaces', '_bx_spaces_menu_set_title_view_profile_submenu', 0);
INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
('bx_spaces_view_submenu', 'bx_spaces', 'view-space-profile', '_bx_spaces_menu_item_title_system_view_profile_view', '_bx_spaces_menu_item_title_view_profile_view', 'page.php?i=view-space-profile&id={content_id}', '', '', 'object-group col-red2', '', '', 0, 2147483647, 1, 0, 1),
('bx_spaces_view_submenu', 'bx_spaces', 'space-profile-info', '_bx_spaces_menu_item_title_system_view_profile_info', '_bx_spaces_menu_item_title_view_profile_info', 'page.php?i=space-profile-info&id={content_id}', '', '', 'info-circle col-gray', '', '', 0, 2147483647, 1, 0, 2),
('bx_spaces_view_submenu', 'bx_spaces', 'space-profile-comments', '_bx_spaces_menu_item_title_system_view_profile_comments', '_bx_spaces_menu_item_title_view_profile_comments', 'page.php?i=space-profile-comments&id={content_id}', '', '', '', '', '', 0, 2147483647, 0, 0, 3),
('bx_spaces_view_submenu', 'bx_spaces', 'space-fans', '_bx_spaces_menu_item_title_system_view_fans', '_bx_spaces_menu_item_title_view_fans', 'page.php?i=space-fans&profile_id={profile_id}', '', '', 'object-group col-blue3', '', '', 0, 2147483647, 1, 0, 4),
('bx_spaces_view_submenu', 'bx_spaces', 'more-auto', '_bx_spaces_menu_item_title_system_view_profile_more_auto', '_bx_spaces_menu_item_title_view_profile_more_auto', 'javascript:void(0)', '', '', 'ellipsis-v', '', '', 0, 2147483647, 1, 0, 9999);
-- MENU: custom menu for snippet meta info
INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_snippet_meta', '_sys_menu_title_snippet_meta', 'bx_spaces_snippet_meta', 'bx_spaces', 15, 0, 1, 'BxSpacesMenuSnippetMeta', 'modules/boonex/spaces/classes/BxSpacesMenuSnippetMeta.php');
INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
('bx_spaces_snippet_meta', 'bx_spaces', '_sys_menu_set_title_snippet_meta', 0);
INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES
('bx_spaces_snippet_meta', 'bx_spaces', 'date', '_sys_menu_item_title_system_sm_date', '_sys_menu_item_title_sm_date', '', '', '', '', '', 2147483647, 0, 0, 1, 1),
('bx_spaces_snippet_meta', 'bx_spaces', 'tags', '_sys_menu_item_title_system_sm_tags', '_sys_menu_item_title_sm_tags', '', '', '', '', '', 2147483647, 0, 0, 1, 2),
('bx_spaces_snippet_meta', 'bx_spaces', 'views', '_sys_menu_item_title_system_sm_views', '_sys_menu_item_title_sm_views', '', '', '', '', '', 2147483647, 0, 0, 1, 3),
('bx_spaces_snippet_meta', 'bx_spaces', 'comments', '_sys_menu_item_title_system_sm_comments', '_sys_menu_item_title_sm_comments', '', '', '', '', '', 2147483647, 0, 0, 1, 4),
('bx_spaces_snippet_meta', 'bx_spaces', 'members', '_sys_menu_item_title_system_sm_members', '_sys_menu_item_title_sm_members', '', '', '', '', '', 2147483647, 1, 0, 1, 5),
('bx_spaces_snippet_meta', 'bx_spaces', 'subscribers', '_sys_menu_item_title_system_sm_subscribers', '_sys_menu_item_title_sm_subscribers', '', '', '', '', '', 2147483647, 0, 0, 1, 6),
('bx_spaces_snippet_meta', 'bx_spaces', 'nl', '_sys_menu_item_title_system_sm_nl', '_sys_menu_item_title_sm_nl', '', '', '', '', '', 2147483647, 1, 0, 1, 7),
('bx_spaces_snippet_meta', 'bx_spaces', 'join', '_sys_menu_item_title_system_sm_join', '_sys_menu_item_title_sm_join', '', '', '', '', '', 2147483647, 1, 0, 1, 8),
('bx_spaces_snippet_meta', 'bx_spaces', 'leave', '_sys_menu_item_title_system_sm_leave', '_sys_menu_item_title_sm_leave', '', '', '', '', '', 2147483647, 0, 0, 1, 9),
('bx_spaces_snippet_meta', 'bx_spaces', 'subscribe', '_sys_menu_item_title_system_sm_subscribe', '_sys_menu_item_title_sm_subscribe', '', '', '', '', '', 2147483647, 0, 0, 1, 10),
('bx_spaces_snippet_meta', 'bx_spaces', 'unsubscribe', '_sys_menu_item_title_system_sm_unsubscribe', '_sys_menu_item_title_sm_unsubscribe', '', '', '', '', '', 2147483647, 0, 0, 1, 11);
-- MENU: profile stats
SET @iNotifMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
('sys_profile_stats', 'bx_spaces', 'profile-stats-manage-spaces', '_bx_spaces_menu_item_title_system_manage_my_spaces', '_bx_spaces_menu_item_title_manage_my_spaces', 'page.php?i=spaces-manage', '', '_self', 'object-group col-red2', 'a:2:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 2);
-- MENU: manage tools submenu
INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_menu_manage_tools', '_bx_spaces_menu_title_manage_tools', 'bx_spaces_menu_manage_tools', 'bx_spaces', 6, 0, 1, 'BxSpacesMenuManageTools', 'modules/boonex/spaces/classes/BxSpacesMenuManageTools.php');
INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES
('bx_spaces_menu_manage_tools', 'bx_spaces', '_bx_spaces_menu_set_title_manage_tools', 0);
INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
('bx_spaces_menu_manage_tools', 'bx_spaces', 'delete', '_bx_spaces_menu_item_title_system_delete', '_bx_spaces_menu_item_title_delete', 'javascript:void(0)', 'javascript:{js_object}.onClickDelete({content_id});', '_self', 'far trash-alt', '', 2147483647, 1, 0, 1),
('bx_spaces_menu_manage_tools', 'bx_spaces', 'delete-with-content', '_bx_spaces_menu_item_title_system_delete_with_content', '_bx_spaces_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id});', '_self', 'far trash-alt', '', 2147483647, 1, 0, 2);
-- MENU: dashboard manage tools
SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
('sys_account_dashboard_manage_tools', 'bx_spaces', 'spaces-administration', '_bx_spaces_menu_item_title_system_admt_spaces', '_bx_spaces_menu_item_title_admt_spaces', 'page.php?i=spaces-administration', '', '_self', 'object-group', 'a:2:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
-- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
('trigger_profile_view_submenu', 'bx_spaces', 'joined-spaces', '_bx_spaces_menu_item_title_system_view_joined_spaces', '_bx_spaces_menu_item_title_view_joined_spaces', 'page.php?i=joined-spaces&profile_id={profile_id}', '', '', 'object-group col-red2', '', 2147483647, 1, 0, 0);
-- ACL
INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
('bx_spaces', 'create entry', NULL, '_bx_spaces_acl_action_create_profile', '', 1, 1);
SET @iIdActionProfileCreate = LAST_INSERT_ID();
INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
('bx_spaces', 'delete entry', NULL, '_bx_spaces_acl_action_delete_profile', '', 1, 1);
SET @iIdActionProfileDelete = LAST_INSERT_ID();
INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
('bx_spaces', 'view entry', NULL, '_bx_spaces_acl_action_view_profile', '', 1, 0);
SET @iIdActionProfileView = LAST_INSERT_ID();
INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
('bx_spaces', 'edit any entry', NULL, '_bx_spaces_acl_action_edit_any_profile', '', 1, 3);
SET @iIdActionProfileEditAny = LAST_INSERT_ID();
SET @iUnauthenticated = 1;
SET @iAccount = 2;
SET @iStandard = 3;
SET @iUnconfirmed = 4;
SET @iPending = 5;
SET @iSuspended = 6;
SET @iModerator = 7;
SET @iAdministrator = 8;
SET @iPremium = 9;
INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
-- profile create
(@iAccount, @iIdActionProfileCreate),
(@iStandard, @iIdActionProfileCreate),
(@iUnconfirmed, @iIdActionProfileCreate),
(@iPending, @iIdActionProfileCreate),
(@iModerator, @iIdActionProfileCreate),
(@iAdministrator, @iIdActionProfileCreate),
(@iPremium, @iIdActionProfileCreate),
-- profile delete
(@iAccount, @iIdActionProfileDelete),
(@iStandard, @iIdActionProfileDelete),
(@iUnconfirmed, @iIdActionProfileDelete),
(@iPending, @iIdActionProfileDelete),
(@iModerator, @iIdActionProfileDelete),
(@iAdministrator, @iIdActionProfileDelete),
(@iPremium, @iIdActionProfileDelete),
-- profile view
(@iUnauthenticated, @iIdActionProfileView),
(@iAccount, @iIdActionProfileView),
(@iStandard, @iIdActionProfileView),
(@iUnconfirmed, @iIdActionProfileView),
(@iPending, @iIdActionProfileView),
(@iModerator, @iIdActionProfileView),
(@iAdministrator, @iIdActionProfileView),
(@iPremium, @iIdActionProfileView),
-- any profile edit
(@iModerator, @iIdActionProfileEditAny),
(@iAdministrator, @iIdActionProfileEditAny);
-- METATAGS
INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces', 'bx_spaces_meta_keywords', 'bx_spaces_meta_locations', 'bx_spaces_meta_mentions', '', '');
-- CATEGORY
INSERT INTO `sys_objects_category` (`object`, `search_object`, `form_object`, `list_name`, `table`, `field`, `join`, `where`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_cats', 'bx_spaces', 'bx_space', 'bx_spaces_cats', 'bx_spaces_data', 'space_cat', 'INNER JOIN `sys_profiles` ON (`sys_profiles`.`content_id` = `bx_spaces_data`.`id` AND `sys_profiles`.`type` = ''bx_spaces'')', 'AND `sys_profiles`.`status` = ''active''', '', '');
-- SEARCH
SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
('bx_spaces', '_bx_spaces', @iSearchOrder + 1, 'BxSpacesSearchResult', 'modules/boonex/spaces/classes/BxSpacesSearchResult.php');
-- CONNECTIONS
INSERT INTO `sys_objects_connection` (`object`, `table`, `type`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_fans', 'bx_spaces_fans', 'mutual', '', '');
-- STATS
SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
INSERT INTO `sys_statistics` (`module`, `name`, `title`, `link`, `icon`, `query`, `order`) VALUES
('bx_spaces', 'bx_spaces', '_bx_spaces', 'page.php?i=spaces-home', 'object-group col-red2', 'SELECT COUNT(*) FROM `bx_spaces_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id` = `tp`.`content_id` AND `tp`.`type`=''bx_spaces'' WHERE 1 AND `tp`.`status`=''active''', @iMaxOrderStats + 1);
-- CHARTS
SET @iMaxOrderCharts = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_objects_chart`);
INSERT INTO `sys_objects_chart` (`object`, `title`, `table`, `field_date_ts`, `field_date_dt`, `field_status`, `query`, `active`, `order`, `class_name`, `class_file`) VALUES
('bx_spaces_growth', '_bx_spaces_chart_growth', 'bx_spaces_data', 'added', '', '', 'SELECT {field_date_formatted} AS `period`, COUNT(*) AS {object} FROM {table} LEFT JOIN `sys_profiles` AS `tp` ON {table}.`id` = `tp`.`content_id` AND `tp`.`type`=''bx_spaces'' WHERE 1 AND `tp`.`status`=''active'' {where_inteval} GROUP BY `period` ORDER BY {table}.{field_date} ASC', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
('bx_spaces_growth_speed', '_bx_spaces_chart_growth_speed', 'bx_spaces_data', 'added', '', '', 'SELECT {field_date_formatted} AS `period`, COUNT(*) AS {object} FROM {table} LEFT JOIN `sys_profiles` AS `tp` ON {table}.`id` = `tp`.`content_id` AND `tp`.`type`=''bx_spaces'' WHERE 1 AND `tp`.`status`=''active'' {where_inteval} GROUP BY `period` ORDER BY {table}.{field_date} ASC', 1, @iMaxOrderCharts + 2, 'BxDolChartGrowthSpeed', '');
-- GRID: connections
INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_fans', 'Sql', 'SELECT `p`.`id`, `c`.`added`, `c`.`mutual` FROM `sys_profiles` AS `p` INNER JOIN `sys_accounts` AS `a` ON (`a`.`id` = `p`.`account_id`) {join_connections}', 'sys_profiles', 'id', 'c`.`added', '', '', 10, NULL, 'start', '', 'name,email', '', 'auto', '', '', 2147483647, 'BxSpacesGridConnections', 'modules/boonex/spaces/classes/BxSpacesGridConnections.php');
INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `order`) VALUES
('bx_spaces_fans', 'name', '_sys_name', '50%', '', 10),
('bx_spaces_fans', 'actions', '', '50%', '', 20);
INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `confirm`, `order`) VALUES
('bx_spaces_fans', 'single', 'accept', '_sys_accept', '', 0, 10),
('bx_spaces_fans', 'single', 'to_admins', '_bx_spaces_txt_to_admins', '', 0, 20),
('bx_spaces_fans', 'single', 'from_admins', '_bx_spaces_txt_from_admins', '', 0, 30),
('bx_spaces_fans', 'single', 'delete', '', 'remove', 1, 40);
-- GRIDS: administration
INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_administration', 'Sql', 'SELECT `td`.*, `td`.`space_name` AS `name`, `ta`.`email` AS `account`, `td`.`added` AS `added_ts`, `tp`.`status` AS `status` FROM `bx_spaces_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id`=`tp`.`content_id` AND `tp`.`type`=''bx_spaces'' LEFT JOIN `sys_accounts` AS `ta` ON `tp`.`account_id`=`ta`.`id` WHERE 1 ', 'bx_spaces_data', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'space_name', '', 'like', 'reports', '', 192, 'BxSpacesGridAdministration', 'modules/boonex/spaces/classes/BxSpacesGridAdministration.php'),
('bx_spaces_common', 'Sql', 'SELECT `td`.*, `td`.`space_name` AS `name`, `ta`.`email` AS `account`, `td`.`added` AS `added_ts`, `tp`.`status` AS `status` FROM `bx_spaces_data` AS `td` LEFT JOIN `sys_profiles` AS `tp` ON `td`.`id`=`tp`.`content_id` AND `tp`.`type`=''bx_spaces'' LEFT JOIN `sys_accounts` AS `ta` ON `tp`.`account_id`=`ta`.`id` WHERE 1 ', 'bx_spaces_data', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'space_name', '', 'like', '', '', 2147483647, 'BxSpacesGridCommon', 'modules/boonex/spaces/classes/BxSpacesGridCommon.php');
INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
('bx_spaces_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
('bx_spaces_administration', 'switcher', '_bx_spaces_grid_column_title_adm_active', '8%', 0, '', '', 2),
('bx_spaces_administration', 'reports', '_sys_txt_reports_title', '5%', 0, '', '', 3),
('bx_spaces_administration', 'name', '_bx_spaces_grid_column_title_adm_name', '25%', 0, '', '', 4),
('bx_spaces_administration', 'added_ts', '_bx_spaces_grid_column_title_adm_added', '20%', 1, '25', '', 5),
('bx_spaces_administration', 'account', '_bx_spaces_grid_column_title_adm_account', '20%', 0, '25', '', 6),
('bx_spaces_administration', 'actions', '', '20%', 0, '', '', 7),
('bx_spaces_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
('bx_spaces_common', 'name', '_bx_spaces_grid_column_title_adm_name', '48%', 0, '', '', 2),
('bx_spaces_common', 'added_ts', '_bx_spaces_grid_column_title_adm_added', '30%', 1, '25', '', 3),
('bx_spaces_common', 'actions', '', '20%', 0, '', '', 4);
INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
('bx_spaces_administration', 'bulk', 'delete', '_bx_spaces_grid_action_title_adm_delete', '', 0, 1, 2),
('bx_spaces_administration', 'bulk', 'delete_with_content', '_bx_spaces_grid_action_title_adm_delete_with_content', '', 0, 1, 3),
('bx_spaces_administration', 'single', 'settings', '_bx_spaces_grid_action_title_adm_more_actions', 'cog', 1, 0, 2),
('bx_spaces_common', 'bulk', 'delete', '_bx_spaces_grid_action_title_adm_delete', '', 0, 1, 1),
('bx_spaces_common', 'bulk', 'delete_with_content', '_bx_spaces_grid_action_title_adm_delete_with_content', '', 0, 1, 2),
('bx_spaces_common', 'single', 'settings', '_bx_spaces_grid_action_title_adm_more_actions', 'cog', 1, 0, 1);
-- ALERTS
INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES
('bx_spaces', 'BxSpacesAlertsResponse', 'modules/boonex/spaces/classes/BxSpacesAlertsResponse.php', '');
SET @iHandler := LAST_INSERT_ID();
INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
('system', 'save_setting', @iHandler),
('bx_timeline', 'post_common', @iHandler),
('bx_spaces_pics', 'file_deleted', @iHandler),
('bx_spaces_fans', 'connection_added', @iHandler),
('bx_spaces_fans', 'connection_removed', @iHandler),
('profile', 'delete', @iHandler),
('bx_spaces', 'fan_added', @iHandler),
('bx_spaces', 'join_invitation', @iHandler),
('bx_spaces', 'join_request', @iHandler),
('bx_spaces', 'join_request_accepted', @iHandler),
('bx_spaces', 'timeline_view', @iHandler),
('bx_spaces', 'timeline_post', @iHandler),
('bx_spaces', 'timeline_delete', @iHandler),
('bx_spaces', 'timeline_comment', @iHandler),
('bx_spaces', 'timeline_vote', @iHandler),
('bx_spaces', 'timeline_score', @iHandler),
('bx_spaces', 'timeline_report', @iHandler),
('bx_spaces', 'timeline_repost', @iHandler),
('bx_spaces', 'timeline_pin', @iHandler),
('bx_spaces', 'timeline_promote', @iHandler);
-- PRIVACY
INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `spaces`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_allow_view_to', 'bx_spaces', 'view', '_bx_spaces_form_profile_input_allow_view_to', '3', '', 'bx_spaces_data', 'id', 'author', 'BxSpacesPrivacy', 'modules/boonex/spaces/classes/BxSpacesPrivacy.php'),
('bx_spaces_allow_view_notification_to', 'bx_spaces', 'view_event', '_bx_spaces_form_profile_input_allow_view_notification_to', '3', '', 'bx_notifications_events', 'id', 'object_owner_id', 'BxSpacesPrivacyNotifications', 'modules/boonex/spaces/classes/BxSpacesPrivacyNotifications.php'),
('bx_spaces_allow_post_to', 'bx_spaces', 'post', '_bx_spaces_form_profile_input_allow_post_to', '3', '', 'bx_spaces_data', 'id', 'author', 'BxSpacesPrivacyPost', 'modules/boonex/spaces/classes/BxSpacesPrivacyPost.php');
-- EMAIL TEMPLATES
INSERT INTO `sys_email_templates` (`Module`, `NameSystem`, `Name`, `Subject`, `Body`) VALUES
('bx_spaces', '_bx_spaces_email_join_request', 'bx_spaces_join_request', '_bx_spaces_email_join_request_subject', '_bx_spaces_email_join_request_body'),
('bx_spaces', '_bx_spaces_email_join_reject', 'bx_spaces_join_reject', '_bx_spaces_email_join_reject_subject', '_bx_spaces_email_join_reject_body'),
('bx_spaces', '_bx_spaces_email_join_confirm', 'bx_spaces_join_confirm', '_bx_spaces_email_join_confirm_subject', '_bx_spaces_email_join_confirm_body'),
('bx_spaces', '_bx_spaces_email_fan_remove', 'bx_spaces_fan_remove', '_bx_spaces_email_fan_remove_subject', '_bx_spaces_email_fan_remove_body'),
('bx_spaces', '_bx_spaces_email_fan_become_admin', 'bx_spaces_fan_become_admin', '_bx_spaces_email_fan_become_admin_subject', '_bx_spaces_email_fan_become_admin_body'),
('bx_spaces', '_bx_spaces_email_admin_become_fan', 'bx_spaces_admin_become_fan', '_bx_spaces_email_admin_become_fan_subject', '_bx_spaces_email_admin_become_fan_body'),
('bx_spaces', '_bx_spaces_email_invitation', 'bx_spaces_invitation', '_bx_spaces_email_invitation_subject', '_bx_spaces_email_invitation_body');
-- UPLOADERS
INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
('bx_spaces_cover_crop', 1, 'BxSpacesUploaderCoverCrop', 'modules/boonex/spaces/classes/BxSpacesUploaderCoverCrop.php'),
('bx_spaces_picture_crop', 1, 'BxSpacesUploaderPictureCrop', 'modules/boonex/spaces/classes/BxSpacesUploaderPictureCrop.php');
|
unaio/una
|
modules/boonex/spaces/updates/9.0.5_10.0.0/source/install/sql/enable.sql
|
SQL
|
mit
| 60,917
|
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this notice and otherwise comply with the Use Terms.
/*---
es5id: 11.13.2-11-s
description: >
Strict Mode - ReferenceError is thrown if the
LeftHandSideExpression of a Compound Assignment operator(|=)
evaluates to an unresolvable reference
flags: [onlyStrict]
includes: [runTestCase.js]
---*/
function testcase() {
"use strict";
try {
eval("_11_13_2_11 |= 1;");
return false;
} catch (e) {
return e instanceof ReferenceError;
}
}
runTestCase(testcase);
|
PiotrDabkowski/Js2Py
|
tests/test_cases/language/expressions/compound-assignment/11.13.2-11-s.js
|
JavaScript
|
mit
| 853
|
<ion-view view-title="Dashboard">
<ion-content class="padding">
<div class="list foot">
<img width="100%" height="auto" src="img/logo.png">
<form ng-submit="doLogin()">
<label class="item item-input item-floating-label">
<span class="input-label">Email</span>
<input type="text" placeholder="Email" ng-model="loginData.email">
</label>
<label class="item item-input item-floating-label">
<span class="input-label">Password</span>
<input type="password" placeholder="Password" ng-model="loginData.password">
</label>
<button class="button button-block button-positive">Log In</button>
<button class="button button-block button-calm" type="submit">
Aren't you a user? Download Parent App first!
</button>
</form>
</div>
</ion-content>
</ion-view>
|
Otsimo/Child
|
www/templates/login.html
|
HTML
|
mit
| 1,019
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php require_once("globals.php"); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php $page_title = "Rates"; require_once("meta.php"); ?>
</head>
<body>
<div id="logo">
<?php require_once("header.php"); ?>
</div> <!-- end of logo -->
<div id="header">
<div id="navigation">
<?php require_once("navigation.php"); ?>
</div> <!-- end of navigation -->
</div> <!-- end of header -->
<div id="wrap">
<div id="wrap-btm">
<div id="main">
<div id="content">
<div class="post">
<h2>Services</h2>
<h3>Website Development</h3>
<p>I offer web development services for static HTML/CSS websites, as well as dynamic PHP sites and sites developed with database driven content management systems. Graphic and image creation services can be provided at an additional hourly rate. If you want a significant website project developed that is well defined, I am willing to negotiate on a flat fee for the the entire site. Please <a href="contact.php">contact me</a> if you have a project you would like quoted. If your project is ongoing without a defined end, I will work for an agreed upon hourly rate.</p>
<h3>Custom PC Builds</h3>
<p>I charge a one-time build fee of $100 for custom built PC's, regardless of the total cost of the system. This includes assembly, operating system installation* and configuration**. Please <a href="contact.php">contact me</a> if you would like more information on a custom PC that meets your specific needs.</p>
<h3>PC Servicing (Upgrades, Repairs, Software Installation, Virus Removal)</h3>
<p>For general PC servicing including upgrading components, replacing failed components, software installation, and virus removal, please <a href="contact.php">contact me</a> to negotiate an hourly rate.</p>
<p><i>*The cost of any Microsoft Windows operating system the client wishes to have installed will be included with the total cost of the PC. I can also install most Linux Distributions at no additional cost, or include no operating system if the client wishes.</i><br/>
<i>**Configuration includes installation of drivers (on Microsoft Windows only) and a free anti-virus. Installation of additional software such as office programs and video games can be provided for an additional hourly rate.</i></p>
</div>
</div> <!-- end of content -->
<!-- start sidebar -->
<div id="sidepanel">
<?php require_once("leftpanel.php"); ?>
</div>
<div style="clear: both;"> </div>
</div> <!-- end of main -->
</div> <!-- end of wrap -->
</div> <!-- end of wrap-btm -->
<div id="footer-wrap">
<div id="footer">
<?php require_once("footer.php"); ?>
</div>
</div> <!-- end of footer -->
</body>
</html>
|
JayWalker512/brandonfoltz.com
|
rates.php
|
PHP
|
mit
| 2,846
|
import { Direction } from "./Direction";
function printValue(direction: Direction): void {
if (direction === Direction.Horizontal) {
console.log("Horizontal.");
} else if (direction === Direction.Vertical) {
console.log("Vertical.");
} else {
console.log("Unknown...");
}
}
printValue(Direction.Unknown);
printValue(Direction.Horizontal);
printValue(Direction.Vertical);
let direction: Direction;
direction = Direction.Unknown;
printValue(direction);
|
general-language-syntax/GLS
|
test/end-to-end/Enums/TypeScript/index.ts
|
TypeScript
|
mit
| 494
|
'use strict';
var baseDir = 'client';
module.exports = {
//This is the list of file patterns to load into the browser during testing.
files: [
baseDir + '/src/vendor/angular/angular.js',
baseDir + '/src/vendor/angular-mocks/angular-mocks.js',
baseDir + '/src/vendor/angular-ui-router/release/angular-ui-router.js',
baseDir + '/src/**/*.js',
'build/tmp/*.js',
baseDir + '/test/unit/**/*.spec.js'
],
//used framework
frameworks: ['jasmine'],
plugins: [
'karma-chrome-launcher',
'karma-phantomjs-launcher',
'karma-jasmine',
'karma-coverage',
'karma-html-reporter',
'karma-mocha-reporter'
],
preprocessors: {
'**/client/src/**/*.js': 'coverage'
},
reporters: ['mocha', 'html', 'coverage'],
coverageReporter: {
type: 'html',
dir: baseDir + '/test/unit-results/coverage',
file: 'coverage.html'
},
htmlReporter: {
outputDir: baseDir + '//test/unit-results/html'
},
logLevel: 'info',
urlRoot: '/__test/',
//used browsers (overriddeng in some gulp task)
browsers: ['Chrome'],
};
|
grengojbo/grengojbo-skeleton
|
config/karma.config.js
|
JavaScript
|
mit
| 1,087
|
package com.megster.cordova;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Handler;
import android.os.Message;
import android.provider.Settings;
import android.util.Log;
import org.apache.cordova.CordovaArgs;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.PluginResult;
import org.apache.cordova.LOG;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.Set;
/**
* PhoneGap Plugin for Serial Communication over Bluetooth
*/
public class BluetoothSerial extends CordovaPlugin {
// actions
private static final String LIST = "list";
private static final String CONNECT = "connect";
private static final String CONNECT_INSECURE = "connectInsecure";
private static final String DISCONNECT = "disconnect";
private static final String WRITE = "write";
private static final String AVAILABLE = "available";
private static final String READ = "read";
private static final String READ_UNTIL = "readUntil";
private static final String SUBSCRIBE = "subscribe";
private static final String UNSUBSCRIBE = "unsubscribe";
private static final String SUBSCRIBE_RAW = "subscribeRaw";
private static final String UNSUBSCRIBE_RAW = "unsubscribeRaw";
private static final String IS_ENABLED = "isEnabled";
private static final String IS_CONNECTED = "isConnected";
private static final String CLEAR = "clear";
private static final String SETTINGS = "showBluetoothSettings";
private static final String ENABLE = "enable";
private static final String DISCOVER_UNPAIRED = "discoverUnpaired";
private static final String SET_DEVICE_DISCOVERED_LISTENER = "setDeviceDiscoveredListener";
private static final String CLEAR_DEVICE_DISCOVERED_LISTENER = "clearDeviceDiscoveredListener";
// callbacks
private CallbackContext connectCallback;
private CallbackContext dataAvailableCallback;
private CallbackContext rawDataAvailableCallback;
private CallbackContext enableBluetoothCallback;
private CallbackContext deviceDiscoveredCallback;
private BluetoothAdapter bluetoothAdapter;
private BluetoothSerialService bluetoothSerialService;
// Debugging
private static final String TAG = "BluetoothSerial";
private static final boolean D = true;
// Message types sent from the BluetoothSerialService Handler
public static final int MESSAGE_STATE_CHANGE = 1;
public static final int MESSAGE_READ = 2;
public static final int MESSAGE_WRITE = 3;
public static final int MESSAGE_DEVICE_NAME = 4;
public static final int MESSAGE_TOAST = 5;
public static final int MESSAGE_READ_RAW = 6;
// Key names received from the BluetoothChatService Handler
public static final String DEVICE_NAME = "device_name";
public static final String TOAST = "toast";
StringBuffer buffer = new StringBuffer();
private String delimiter;
private static final int REQUEST_ENABLE_BLUETOOTH = 1;
@Override
public boolean execute(String action, CordovaArgs args, CallbackContext callbackContext) throws JSONException {
LOG.d(TAG, "action = " + action);
if (bluetoothAdapter == null) {
bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
}
if (bluetoothSerialService == null) {
bluetoothSerialService = new BluetoothSerialService(mHandler);
}
boolean validAction = true;
if (action.equals(LIST)) {
listBondedDevices(callbackContext);
} else if (action.equals(CONNECT)) {
boolean secure = true;
connect(args, secure, callbackContext);
} else if (action.equals(CONNECT_INSECURE)) {
// see Android docs about Insecure RFCOMM http://goo.gl/1mFjZY
boolean secure = false;
connect(args, secure, callbackContext);
} else if (action.equals(DISCONNECT)) {
connectCallback = null;
bluetoothSerialService.stop();
callbackContext.success();
} else if (action.equals(WRITE)) {
byte[] data = args.getArrayBuffer(0);
bluetoothSerialService.write(data);
callbackContext.success();
} else if (action.equals(AVAILABLE)) {
callbackContext.success(available());
} else if (action.equals(READ)) {
callbackContext.success(read());
} else if (action.equals(READ_UNTIL)) {
String interesting = args.getString(0);
callbackContext.success(readUntil(interesting));
} else if (action.equals(SUBSCRIBE)) {
delimiter = args.getString(0);
dataAvailableCallback = callbackContext;
PluginResult result = new PluginResult(PluginResult.Status.NO_RESULT);
result.setKeepCallback(true);
callbackContext.sendPluginResult(result);
} else if (action.equals(UNSUBSCRIBE)) {
delimiter = null;
// send no result, so Cordova won't hold onto the data available callback anymore
PluginResult result = new PluginResult(PluginResult.Status.NO_RESULT);
dataAvailableCallback.sendPluginResult(result);
dataAvailableCallback = null;
callbackContext.success();
} else if (action.equals(SUBSCRIBE_RAW)) {
rawDataAvailableCallback = callbackContext;
PluginResult result = new PluginResult(PluginResult.Status.NO_RESULT);
result.setKeepCallback(true);
callbackContext.sendPluginResult(result);
} else if (action.equals(UNSUBSCRIBE_RAW)) {
rawDataAvailableCallback = null;
callbackContext.success();
} else if (action.equals(IS_ENABLED)) {
if (bluetoothAdapter.isEnabled()) {
callbackContext.success();
} else {
callbackContext.error("Bluetooth is disabled.");
}
} else if (action.equals(IS_CONNECTED)) {
if (bluetoothSerialService.getState() == BluetoothSerialService.STATE_CONNECTED) {
callbackContext.success();
} else {
callbackContext.error("Not connected.");
}
} else if (action.equals(CLEAR)) {
buffer.setLength(0);
callbackContext.success();
} else if (action.equals(SETTINGS)) {
Intent intent = new Intent(Settings.ACTION_BLUETOOTH_SETTINGS);
cordova.getActivity().startActivity(intent);
callbackContext.success();
} else if (action.equals(ENABLE)) {
enableBluetoothCallback = callbackContext;
Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
cordova.startActivityForResult(this, intent, REQUEST_ENABLE_BLUETOOTH);
} else if (action.equals(DISCOVER_UNPAIRED)) {
discoverUnpairedDevices(callbackContext);
} else if (action.equals(SET_DEVICE_DISCOVERED_LISTENER)) {
this.deviceDiscoveredCallback = callbackContext;
} else if (action.equals(CLEAR_DEVICE_DISCOVERED_LISTENER)) {
this.deviceDiscoveredCallback = null;
} else {
validAction = false;
}
return validAction;
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_ENABLE_BLUETOOTH) {
if (resultCode == Activity.RESULT_OK) {
Log.d(TAG, "User enabled Bluetooth");
if (enableBluetoothCallback != null) {
enableBluetoothCallback.success();
}
} else {
Log.d(TAG, "User did *NOT* enable Bluetooth");
if (enableBluetoothCallback != null) {
enableBluetoothCallback.error("User did not enable Bluetooth");
}
}
enableBluetoothCallback = null;
}
}
@Override
public void onDestroy() {
super.onDestroy();
if (bluetoothSerialService != null) {
bluetoothSerialService.stop();
}
}
private void listBondedDevices(CallbackContext callbackContext) throws JSONException {
JSONArray deviceList = new JSONArray();
Set<BluetoothDevice> bondedDevices = bluetoothAdapter.getBondedDevices();
for (BluetoothDevice device : bondedDevices) {
deviceList.put(deviceToJSON(device));
}
callbackContext.success(deviceList);
}
private void discoverUnpairedDevices(final CallbackContext callbackContext) throws JSONException {
final CallbackContext ddc = deviceDiscoveredCallback;
final BroadcastReceiver discoverReceiver = new BroadcastReceiver() {
private JSONArray unpairedDevices = new JSONArray();
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (BluetoothDevice.ACTION_FOUND.equals(action)) {
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
try {
JSONObject o = deviceToJSON(device);
unpairedDevices.put(o);
if (ddc != null) {
PluginResult res = new PluginResult(PluginResult.Status.OK, o);
res.setKeepCallback(true);
ddc.sendPluginResult(res);
}
} catch (JSONException e) {
// This shouldn't happen, log and ignore
Log.e(TAG, "Problem converting device to JSON", e);
}
} else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) {
callbackContext.success(unpairedDevices);
cordova.getActivity().unregisterReceiver(this);
}
}
};
Activity activity = cordova.getActivity();
activity.registerReceiver(discoverReceiver, new IntentFilter(BluetoothDevice.ACTION_FOUND));
activity.registerReceiver(discoverReceiver, new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED));
bluetoothAdapter.startDiscovery();
}
private JSONObject deviceToJSON(BluetoothDevice device) throws JSONException {
JSONObject json = new JSONObject();
json.put("name", device.getName());
json.put("address", device.getAddress());
json.put("id", device.getAddress());
if (device.getBluetoothClass() != null) {
json.put("class", device.getBluetoothClass().getDeviceClass());
}
return json;
}
private void connect(CordovaArgs args, boolean secure, CallbackContext callbackContext) throws JSONException {
String macAddress = args.getString(0);
BluetoothDevice device = bluetoothAdapter.getRemoteDevice(macAddress);
if (device != null) {
connectCallback = callbackContext;
bluetoothSerialService.connect(device, secure);
PluginResult result = new PluginResult(PluginResult.Status.NO_RESULT);
result.setKeepCallback(true);
callbackContext.sendPluginResult(result);
} else {
callbackContext.error("Could not connect to " + macAddress);
}
}
// The Handler that gets information back from the BluetoothSerialService
// Original code used handler for the because it was talking to the UI.
// Consider replacing with normal callbacks
private final Handler mHandler = new Handler() {
public void handleMessage(Message msg) {
switch (msg.what) {
case MESSAGE_READ:
buffer.append((String)msg.obj);
if (dataAvailableCallback != null) {
sendDataToSubscriber();
}
break;
case MESSAGE_READ_RAW:
if (rawDataAvailableCallback != null) {
byte[] bytes = (byte[]) msg.obj;
sendRawDataToSubscriber(bytes);
}
break;
case MESSAGE_STATE_CHANGE:
if(D) Log.i(TAG, "MESSAGE_STATE_CHANGE: " + msg.arg1);
switch (msg.arg1) {
case BluetoothSerialService.STATE_CONNECTED:
Log.i(TAG, "BluetoothSerialService.STATE_CONNECTED");
notifyConnectionSuccess();
break;
case BluetoothSerialService.STATE_CONNECTING:
Log.i(TAG, "BluetoothSerialService.STATE_CONNECTING");
break;
case BluetoothSerialService.STATE_LISTEN:
Log.i(TAG, "BluetoothSerialService.STATE_LISTEN");
break;
case BluetoothSerialService.STATE_NONE:
Log.i(TAG, "BluetoothSerialService.STATE_NONE");
break;
}
break;
case MESSAGE_WRITE:
// byte[] writeBuf = (byte[]) msg.obj;
// String writeMessage = new String(writeBuf);
// Log.i(TAG, "Wrote: " + writeMessage);
break;
case MESSAGE_DEVICE_NAME:
Log.i(TAG, msg.getData().getString(DEVICE_NAME));
break;
case MESSAGE_TOAST:
String message = msg.getData().getString(TOAST);
notifyConnectionLost(message);
break;
}
}
};
private void notifyConnectionLost(String error) {
if (connectCallback != null) {
connectCallback.error(error);
connectCallback = null;
}
}
private void notifyConnectionSuccess() {
if (connectCallback != null) {
PluginResult result = new PluginResult(PluginResult.Status.OK);
result.setKeepCallback(true);
connectCallback.sendPluginResult(result);
}
}
private void sendRawDataToSubscriber(byte[] data) {
if (data != null && data.length > 0) {
PluginResult result = new PluginResult(PluginResult.Status.OK, data);
result.setKeepCallback(true);
rawDataAvailableCallback.sendPluginResult(result);
}
}
private void sendDataToSubscriber() {
String data = readUntil(delimiter);
if (data != null && data.length() > 0) {
PluginResult result = new PluginResult(PluginResult.Status.OK, data);
result.setKeepCallback(true);
dataAvailableCallback.sendPluginResult(result);
sendDataToSubscriber();
}
}
private int available() {
return buffer.length();
}
private String read() {
int length = buffer.length();
String data = buffer.substring(0, length);
buffer.delete(0, length);
return data;
}
private String readUntil(String c) {
String data = "";
int index = buffer.indexOf(c, 0);
if (index > -1) {
data = buffer.substring(0, index + c.length());
buffer.delete(0, index + c.length());
}
return data;
}
}
|
rafaelpradella/hortalize
|
hortalizeApp/plugins/cordova-plugin-bluetooth-serial/src/android/com/megster/cordova/BluetoothSerial.java
|
Java
|
mit
| 15,882
|
"""
NBConvert Preprocessor for sanitizing HTML rendering of notebooks.
"""
from bleach import (
ALLOWED_ATTRIBUTES,
ALLOWED_STYLES,
ALLOWED_TAGS,
clean,
)
from traitlets import (
Any,
Bool,
List,
Set,
Unicode,
)
from .base import Preprocessor
class SanitizeHTML(Preprocessor):
# Bleach config.
attributes = Any(
config=True,
default_value=ALLOWED_ATTRIBUTES,
help="Allowed HTML tag attributes",
)
tags = List(
Unicode(),
config=True,
default_value=ALLOWED_TAGS,
help="List of HTML tags to allow",
)
styles = List(
Unicode(),
config=True,
default_value=ALLOWED_STYLES,
help="Allowed CSS styles if <style> tag is whitelisted"
)
strip = Bool(
config=True,
default_value=False,
help="If True, remove unsafe markup entirely instead of escaping"
)
strip_comments = Bool(
config=True,
default_value=True,
help="If True, strip comments from escaped HTML",
)
# Display data config.
safe_output_keys = Set(
config=True,
default_value={
'metadata', # Not a mimetype per-se, but expected and safe.
'text/plain',
'text/latex',
'application/json',
'image/png',
'image/jpeg',
},
help="Cell output mimetypes to render without modification",
)
sanitized_output_types = Set(
config=True,
default_value={
'text/html',
'text/markdown',
},
help="Cell output types to display after escaping with Bleach.",
)
def preprocess_cell(self, cell, resources, cell_index):
"""
Sanitize potentially-dangerous contents of the cell.
Cell Types:
raw:
Sanitize literal HTML
markdown:
Sanitize literal HTML
code:
Sanitize outputs that could result in code execution
"""
if cell.cell_type == 'raw':
# Sanitize all raw cells anyway.
# Only ones with the text/html mimetype should be emitted
# but erring on the side of safety maybe.
cell.source = self.sanitize_html_tags(cell.source)
return cell, resources
elif cell.cell_type == 'markdown':
cell.source = self.sanitize_html_tags(cell.source)
return cell, resources
elif cell.cell_type == 'code':
cell.outputs = self.sanitize_code_outputs(cell.outputs)
return cell, resources
def sanitize_code_outputs(self, outputs):
"""
Sanitize code cell outputs.
Removes 'text/javascript' fields from display_data outputs, and
runs `sanitize_html_tags` over 'text/html'.
"""
for output in outputs:
# These are always ascii, so nothing to escape.
if output['output_type'] in ('stream', 'error'):
continue
data = output.data
to_remove = []
for key in data:
if key in self.safe_output_keys:
continue
elif key in self.sanitized_output_types:
self.log.info("Sanitizing %s" % key)
data[key] = self.sanitize_html_tags(data[key])
else:
# Mark key for removal. (Python doesn't allow deletion of
# keys from a dict during iteration)
to_remove.append(key)
for key in to_remove:
self.log.info("Removing %s" % key)
del data[key]
return outputs
def sanitize_html_tags(self, html_str):
"""
Sanitize a string containing raw HTML tags.
"""
return clean(
html_str,
tags=self.tags,
attributes=self.attributes,
styles=self.styles,
strip=self.strip,
strip_comments=self.strip_comments,
)
|
sserrot/champion_relationships
|
venv/Lib/site-packages/nbconvert/preprocessors/sanitize.py
|
Python
|
mit
| 4,070
|
---
title: Work
permalink: /work/
description: |
I work primarly as a software developer. I also work in the community as an
educator of Afrocentric history whilst studying childhood education.
masthead:
image: pages/work.jpeg
---
<p class="lead f2 tracked-tight lh-copy">
I am a <strong>full-stack software engineer</strong> focused on the
<strong>Web</strong> platform. I also focus on <strong>decolonized
education</strong> for Black and Brown youth in the realm of history and
computer science.
</p>
<h2 class="tracked-tight">What I Do</h2>
<p class="measure lh-copy tj fw5 bg-light-gray bl pa2">
<a class="link" href="/portfolio/">View my portfolio</a>
for deeper dives into projects I've worked on.
</p>
<p class="measure lh-copy tj">
I focus on Web application development in languages like
<a class="fw7 orange" href="https://www.python.org/">Python</a>,
<a class="fw7 red" href="https://www.ruby-lang.org/en/">Ruby</a>,
<a class="fw7 green" href="https://js.org/">JavaScript</a>
and
<a class="fw7 purple" href="http://elixir-lang.org/">Elixir</a>.
I work on building <em>delightful and effective</em> user experiences,
particularly using <a href="https://vuejs.org">VueJs</a>.
</p>
<p class="measure lh-copy tj">
I have experience working on Android applications as well. It focused around
tooling, testing and finding performance bottlenecks in the application and
library usage within the such.
</p>
<h2 class="tracked-tight">Background</h2>
<p class="lead lh-copy measure">
I'm currently looking for work either on a full-time (FTE) or contractual
(freelance) basis as a software developer.
<br />
<a class="link" href="/work/contract/">Let's build your next big thing</a>.
</p>
<p class="lh-copy measure">
I have worked as a <strong>software engineer</strong> since 2011
at companies like <a class="red" href="https://google.com">Google</a>,
<a class="blue" href="http://horizonmedia.com">Horizon Media</a>,
<a class="orange" href="http://www.theblsgroup.com/">BLS</a>,
<a class="red" href="https://shutterstock.com/">Shutterstock</a>,
<a class="orange" href="https://getclef.com/">Clef</a>,
<a class="hot-pink" href="https://lyft.com">Lyft</a> and
<a class="washed-blue" href="https://lob.com">Lob</a>.
</p>
<p class="lh-copy measure">
I've done mentoring with youth and adults alike with amazing programs like
<a href="https://blackgirlscode.com">Black Girls Code</a> and <a
href="https://yeswecode.com">Yes We Code</a>.
</p>
|
jalcine/website
|
src/pages/work/home.html
|
HTML
|
mit
| 2,515
|
//>>built
define({previousMessage:"Alegeri anterioare",nextMessage:"Mai multe alegeri"});
|
ycabon/presentations
|
2020-devsummit/arcgis-js-api-road-ahead/js-api/dijit/form/nls/ro/ComboBox.js
|
JavaScript
|
mit
| 89
|
NOMINET EPP IMPLEMENTATION
==========================
[](https://travis-ci.org/SCLInternet/SclNominetEpp)
Introduction
------------
This is Zend Framework 2 ready module which provides an interface to Nominet's
EPP management API.
Installation
------------
Use composer.phar
Configuration
-------------
Set your tag and password and call it.
Usage
-----
$nominet = $serviceManager->get('SclNominetEPP\Nominet');
$nominet->register(...);
|
adamjimenez/SclNominetEpp
|
README.md
|
Markdown
|
mit
| 531
|
<?php
declare(strict_types=1);
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
* @link https://cakephp.org CakePHP(tm) Project
* @since 4.1.0
* @license https://opensource.org/licenses/mit-license.php MIT License
*/
namespace Cake\Error\Debug;
use RuntimeException;
/**
* A Debugger formatter for generating output with ANSI escape codes
*
* @internal
*/
class ConsoleFormatter implements FormatterInterface
{
/**
* text colors used in colored output.
*
* @var array<string, string>
*/
protected $styles = [
// bold yellow
'const' => '1;33',
// green
'string' => '0;32',
// bold blue
'number' => '1;34',
// cyan
'class' => '0;36',
// grey
'punct' => '0;90',
// default foreground
'property' => '0;39',
// magenta
'visibility' => '0;35',
// red
'special' => '0;31',
];
/**
* Check if the current environment supports ANSI output.
*
* @return bool
*/
public static function environmentMatches(): bool
{
if (PHP_SAPI !== 'cli') {
return false;
}
// NO_COLOR in environment means no color.
if (env('NO_COLOR')) {
return false;
}
// Windows environment checks
if (
DIRECTORY_SEPARATOR === '\\' &&
strpos(strtolower(php_uname('v')), 'windows 10') === false &&
strpos(strtolower((string)env('SHELL')), 'bash.exe') === false &&
!(bool)env('ANSICON') &&
env('ConEmuANSI') !== 'ON'
) {
return false;
}
return true;
}
/**
* @inheritDoc
*/
public function formatWrapper(string $contents, array $location): string
{
$lineInfo = '';
if (isset($location['file'], $location['file'])) {
$lineInfo = sprintf('%s (line %s)', $location['file'], $location['line']);
}
$parts = [
$this->style('const', $lineInfo),
$this->style('special', '########## DEBUG ##########'),
$contents,
$this->style('special', '###########################'),
'',
];
return implode("\n", $parts);
}
/**
* Convert a tree of NodeInterface objects into a plain text string.
*
* @param \Cake\Error\Debug\NodeInterface $node The node tree to dump.
* @return string
*/
public function dump(NodeInterface $node): string
{
$indent = 0;
return $this->export($node, $indent);
}
/**
* Convert a tree of NodeInterface objects into a plain text string.
*
* @param \Cake\Error\Debug\NodeInterface $var The node tree to dump.
* @param int $indent The current indentation level.
* @return string
*/
protected function export(NodeInterface $var, int $indent): string
{
if ($var instanceof ScalarNode) {
switch ($var->getType()) {
case 'bool':
return $this->style('const', $var->getValue() ? 'true' : 'false');
case 'null':
return $this->style('const', 'null');
case 'string':
return $this->style('string', "'" . (string)$var->getValue() . "'");
case 'int':
case 'float':
return $this->style('visibility', "({$var->getType()})") .
' ' . $this->style('number', "{$var->getValue()}");
default:
return "({$var->getType()}) {$var->getValue()}";
}
}
if ($var instanceof ArrayNode) {
return $this->exportArray($var, $indent + 1);
}
if ($var instanceof ClassNode || $var instanceof ReferenceNode) {
return $this->exportObject($var, $indent + 1);
}
if ($var instanceof SpecialNode) {
return $this->style('special', $var->getValue());
}
throw new RuntimeException('Unknown node received ' . get_class($var));
}
/**
* Export an array type object
*
* @param \Cake\Error\Debug\ArrayNode $var The array to export.
* @param int $indent The current indentation level.
* @return string Exported array.
*/
protected function exportArray(ArrayNode $var, int $indent): string
{
$out = $this->style('punct', '[');
$break = "\n" . str_repeat(' ', $indent);
$end = "\n" . str_repeat(' ', $indent - 1);
$vars = [];
$arrow = $this->style('punct', ' => ');
foreach ($var->getChildren() as $item) {
$val = $item->getValue();
$vars[] = $break . $this->export($item->getKey(), $indent) . $arrow . $this->export($val, $indent);
}
$close = $this->style('punct', ']');
if (count($vars)) {
return $out . implode($this->style('punct', ','), $vars) . $end . $close;
}
return $out . $close;
}
/**
* Handles object to string conversion.
*
* @param \Cake\Error\Debug\ClassNode|\Cake\Error\Debug\ReferenceNode $var Object to convert.
* @param int $indent Current indentation level.
* @return string
* @see \Cake\Error\Debugger::exportVar()
*/
protected function exportObject($var, int $indent): string
{
$props = [];
if ($var instanceof ReferenceNode) {
return $this->style('punct', 'object(') .
$this->style('class', $var->getValue()) .
$this->style('punct', ') id:') .
$this->style('number', (string)$var->getId()) .
$this->style('punct', ' {}');
}
$out = $this->style('punct', 'object(') .
$this->style('class', $var->getValue()) .
$this->style('punct', ') id:') .
$this->style('number', (string)$var->getId()) .
$this->style('punct', ' {');
$break = "\n" . str_repeat(' ', $indent);
$end = "\n" . str_repeat(' ', $indent - 1) . $this->style('punct', '}');
$arrow = $this->style('punct', ' => ');
foreach ($var->getChildren() as $property) {
$visibility = $property->getVisibility();
$name = $property->getName();
if ($visibility && $visibility !== 'public') {
$props[] = $this->style('visibility', $visibility) .
' ' .
$this->style('property', $name) .
$arrow .
$this->export($property->getValue(), $indent);
} else {
$props[] = $this->style('property', $name) .
$arrow .
$this->export($property->getValue(), $indent);
}
}
if (count($props)) {
return $out . $break . implode($break, $props) . $end;
}
return $out . $this->style('punct', '}');
}
/**
* Style text with ANSI escape codes.
*
* @param string $style The style name to use.
* @param string $text The text to style.
* @return string The styled output.
*/
protected function style(string $style, string $text): string
{
$code = $this->styles[$style];
return "\033[{$code}m{$text}\033[0m";
}
}
|
ndm2/cakephp
|
src/Error/Debug/ConsoleFormatter.php
|
PHP
|
mit
| 7,785
|
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace DLaB.Xrm.Entities
{
[System.Runtime.Serialization.DataContractAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.0.0.9369")]
public enum msdyn_bpf_989e9b1857e24af18787d5143b67523bState
{
[System.Runtime.Serialization.EnumMemberAttribute()]
Active = 0,
[System.Runtime.Serialization.EnumMemberAttribute()]
Inactive = 1,
}
/// <summary>
/// Base entity for process Case to Work Order Business Process
/// </summary>
[System.Runtime.Serialization.DataContractAttribute()]
[Microsoft.Xrm.Sdk.Client.EntityLogicalNameAttribute("msdyn_bpf_989e9b1857e24af18787d5143b67523b")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.0.0.9369")]
public partial class msdyn_bpf_989e9b1857e24af18787d5143b67523b : Microsoft.Xrm.Sdk.Entity, System.ComponentModel.INotifyPropertyChanging, System.ComponentModel.INotifyPropertyChanged
{
public static class Fields
{
public const string ActiveStageId = "activestageid";
public const string ActiveStageStartedOn = "activestagestartedon";
public const string bpf_Duration = "bpf_duration";
public const string bpf_incidentid = "bpf_incidentid";
public const string bpf_msdyn_workorderid = "bpf_msdyn_workorderid";
public const string bpf_name = "bpf_name";
public const string BusinessProcessFlowInstanceId = "businessprocessflowinstanceid";
public const string Id = "businessprocessflowinstanceid";
public const string CompletedOn = "completedon";
public const string CreatedBy = "createdby";
public const string CreatedOn = "createdon";
public const string CreatedOnBehalfBy = "createdonbehalfby";
public const string ImportSequenceNumber = "importsequencenumber";
public const string ModifiedBy = "modifiedby";
public const string ModifiedOn = "modifiedon";
public const string ModifiedOnBehalfBy = "modifiedonbehalfby";
public const string OrganizationId = "organizationid";
public const string OverriddenCreatedOn = "overriddencreatedon";
public const string ProcessId = "processid";
public const string StateCode = "statecode";
public const string StatusCode = "statuscode";
public const string TimeZoneRuleVersionNumber = "timezoneruleversionnumber";
public const string TraversedPath = "traversedpath";
public const string UTCConversionTimeZoneCode = "utcconversiontimezonecode";
public const string VersionNumber = "versionnumber";
public const string bpf_incident_msdyn_bpf_989e9b1857e24af18787d5143b67523b = "bpf_incident_msdyn_bpf_989e9b1857e24af18787d5143b67523b";
public const string bpf_msdyn_workorder_msdyn_bpf_989e9b1857e24af18787d5143b67523b = "bpf_msdyn_workorder_msdyn_bpf_989e9b1857e24af18787d5143b67523b";
public const string lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_activestageid = "lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_activestageid";
public const string lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdby = "lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdby";
public const string lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdonbehalfby = "lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdonbehalfby";
public const string lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedby = "lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedby";
public const string lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedonbehalfby = "lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedonbehalfby";
public const string lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_processid = "lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_processid";
public const string organization_msdyn_bpf_989e9b1857e24af18787d5143b67523b = "organization_msdyn_bpf_989e9b1857e24af18787d5143b67523b";
}
/// <summary>
/// Default Constructor.
/// </summary>
[System.Diagnostics.DebuggerNonUserCode()]
public msdyn_bpf_989e9b1857e24af18787d5143b67523b() :
base(EntityLogicalName)
{
}
public const string EntityLogicalName = "msdyn_bpf_989e9b1857e24af18787d5143b67523b";
public const string PrimaryIdAttribute = "businessprocessflowinstanceid";
public const string PrimaryNameAttribute = "bpf_name";
public const int EntityTypeCode = 10118;
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
public event System.ComponentModel.PropertyChangingEventHandler PropertyChanging;
[System.Diagnostics.DebuggerNonUserCode()]
private void OnPropertyChanged(string propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
[System.Diagnostics.DebuggerNonUserCode()]
private void OnPropertyChanging(string propertyName)
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, new System.ComponentModel.PropertyChangingEventArgs(propertyName));
}
}
/// <summary>
/// Unique identifier of the active stage for the Business Process Flow instance.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("activestageid")]
public Microsoft.Xrm.Sdk.EntityReference ActiveStageId
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<Microsoft.Xrm.Sdk.EntityReference>("activestageid");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("ActiveStageId");
this.SetAttributeValue("activestageid", value);
this.OnPropertyChanged("ActiveStageId");
}
}
/// <summary>
/// Date and time when current active stage is started
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("activestagestartedon")]
public System.Nullable<System.DateTime> ActiveStageStartedOn
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<System.Nullable<System.DateTime>>("activestagestartedon");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("ActiveStageStartedOn");
this.SetAttributeValue("activestagestartedon", value);
this.OnPropertyChanged("ActiveStageStartedOn");
}
}
/// <summary>
/// Duration of Business Process Flow
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("bpf_duration")]
public System.Nullable<int> bpf_Duration
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<System.Nullable<int>>("bpf_duration");
}
}
/// <summary>
///
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("bpf_incidentid")]
public Microsoft.Xrm.Sdk.EntityReference bpf_incidentid
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<Microsoft.Xrm.Sdk.EntityReference>("bpf_incidentid");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("bpf_incidentid");
this.SetAttributeValue("bpf_incidentid", value);
this.OnPropertyChanged("bpf_incidentid");
}
}
/// <summary>
///
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("bpf_msdyn_workorderid")]
public Microsoft.Xrm.Sdk.EntityReference bpf_msdyn_workorderid
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<Microsoft.Xrm.Sdk.EntityReference>("bpf_msdyn_workorderid");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("bpf_msdyn_workorderid");
this.SetAttributeValue("bpf_msdyn_workorderid", value);
this.OnPropertyChanged("bpf_msdyn_workorderid");
}
}
/// <summary>
/// Description
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("bpf_name")]
public string bpf_name
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<string>("bpf_name");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("bpf_name");
this.SetAttributeValue("bpf_name", value);
this.OnPropertyChanged("bpf_name");
}
}
/// <summary>
/// Unique identifier for entity instances
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("businessprocessflowinstanceid")]
public System.Nullable<System.Guid> BusinessProcessFlowInstanceId
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<System.Nullable<System.Guid>>("businessprocessflowinstanceid");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("BusinessProcessFlowInstanceId");
this.SetAttributeValue("businessprocessflowinstanceid", value);
if (value.HasValue)
{
base.Id = value.Value;
}
else
{
base.Id = System.Guid.Empty;
}
this.OnPropertyChanged("BusinessProcessFlowInstanceId");
}
}
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("businessprocessflowinstanceid")]
public override System.Guid Id
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return base.Id;
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.BusinessProcessFlowInstanceId = value;
}
}
/// <summary>
/// Date and time when Business Process Flow instance is completed.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("completedon")]
public System.Nullable<System.DateTime> CompletedOn
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<System.Nullable<System.DateTime>>("completedon");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("CompletedOn");
this.SetAttributeValue("completedon", value);
this.OnPropertyChanged("CompletedOn");
}
}
/// <summary>
/// Unique identifier of the user who created the record.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdby")]
public Microsoft.Xrm.Sdk.EntityReference CreatedBy
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<Microsoft.Xrm.Sdk.EntityReference>("createdby");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("CreatedBy");
this.SetAttributeValue("createdby", value);
this.OnPropertyChanged("CreatedBy");
}
}
/// <summary>
/// Date and time when the record was created.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdon")]
public System.Nullable<System.DateTime> CreatedOn
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<System.Nullable<System.DateTime>>("createdon");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("CreatedOn");
this.SetAttributeValue("createdon", value);
this.OnPropertyChanged("CreatedOn");
}
}
/// <summary>
/// Unique identifier of the delegate user who created the record.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdonbehalfby")]
public Microsoft.Xrm.Sdk.EntityReference CreatedOnBehalfBy
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<Microsoft.Xrm.Sdk.EntityReference>("createdonbehalfby");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("CreatedOnBehalfBy");
this.SetAttributeValue("createdonbehalfby", value);
this.OnPropertyChanged("CreatedOnBehalfBy");
}
}
/// <summary>
/// Sequence number of the import that created this record.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("importsequencenumber")]
public System.Nullable<int> ImportSequenceNumber
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<System.Nullable<int>>("importsequencenumber");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("ImportSequenceNumber");
this.SetAttributeValue("importsequencenumber", value);
this.OnPropertyChanged("ImportSequenceNumber");
}
}
/// <summary>
/// Unique identifier of the user who modified the record.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedby")]
public Microsoft.Xrm.Sdk.EntityReference ModifiedBy
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<Microsoft.Xrm.Sdk.EntityReference>("modifiedby");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("ModifiedBy");
this.SetAttributeValue("modifiedby", value);
this.OnPropertyChanged("ModifiedBy");
}
}
/// <summary>
/// Date and time when the record was modified.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedon")]
public System.Nullable<System.DateTime> ModifiedOn
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<System.Nullable<System.DateTime>>("modifiedon");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("ModifiedOn");
this.SetAttributeValue("modifiedon", value);
this.OnPropertyChanged("ModifiedOn");
}
}
/// <summary>
/// Unique identifier of the delegate user who modified the record.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedonbehalfby")]
public Microsoft.Xrm.Sdk.EntityReference ModifiedOnBehalfBy
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<Microsoft.Xrm.Sdk.EntityReference>("modifiedonbehalfby");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("ModifiedOnBehalfBy");
this.SetAttributeValue("modifiedonbehalfby", value);
this.OnPropertyChanged("ModifiedOnBehalfBy");
}
}
/// <summary>
/// Unique identifier for the organization
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("organizationid")]
public Microsoft.Xrm.Sdk.EntityReference OrganizationId
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<Microsoft.Xrm.Sdk.EntityReference>("organizationid");
}
}
/// <summary>
/// Date and time that the record was migrated.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("overriddencreatedon")]
public System.Nullable<System.DateTime> OverriddenCreatedOn
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<System.Nullable<System.DateTime>>("overriddencreatedon");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("OverriddenCreatedOn");
this.SetAttributeValue("overriddencreatedon", value);
this.OnPropertyChanged("OverriddenCreatedOn");
}
}
/// <summary>
/// Unique identifier of the workflow associated to the Business Process Flow instance.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("processid")]
public Microsoft.Xrm.Sdk.EntityReference ProcessId
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<Microsoft.Xrm.Sdk.EntityReference>("processid");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("ProcessId");
this.SetAttributeValue("processid", value);
this.OnPropertyChanged("ProcessId");
}
}
/// <summary>
/// Status of the Case to Work Order Business Process
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statecode")]
public System.Nullable<DLaB.Xrm.Entities.msdyn_bpf_989e9b1857e24af18787d5143b67523bState> StateCode
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
Microsoft.Xrm.Sdk.OptionSetValue optionSet = this.GetAttributeValue<Microsoft.Xrm.Sdk.OptionSetValue>("statecode");
if ((optionSet != null))
{
return ((DLaB.Xrm.Entities.msdyn_bpf_989e9b1857e24af18787d5143b67523bState)(System.Enum.ToObject(typeof(DLaB.Xrm.Entities.msdyn_bpf_989e9b1857e24af18787d5143b67523bState), optionSet.Value)));
}
else
{
return null;
}
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("StateCode");
if ((value == null))
{
this.SetAttributeValue("statecode", null);
}
else
{
this.SetAttributeValue("statecode", new Microsoft.Xrm.Sdk.OptionSetValue(((int)(value))));
}
this.OnPropertyChanged("StateCode");
}
}
/// <summary>
/// Reason for the status of the Case to Work Order Business Process
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statuscode")]
public Microsoft.Xrm.Sdk.OptionSetValue StatusCode
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<Microsoft.Xrm.Sdk.OptionSetValue>("statuscode");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("StatusCode");
this.SetAttributeValue("statuscode", value);
this.OnPropertyChanged("StatusCode");
}
}
/// <summary>
/// For internal use only.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("timezoneruleversionnumber")]
public System.Nullable<int> TimeZoneRuleVersionNumber
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<System.Nullable<int>>("timezoneruleversionnumber");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("TimeZoneRuleVersionNumber");
this.SetAttributeValue("timezoneruleversionnumber", value);
this.OnPropertyChanged("TimeZoneRuleVersionNumber");
}
}
/// <summary>
/// Comma delimited string of process stage ids that represent visited stages of the Business Process Flow instance.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("traversedpath")]
public string TraversedPath
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<string>("traversedpath");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("TraversedPath");
this.SetAttributeValue("traversedpath", value);
this.OnPropertyChanged("TraversedPath");
}
}
/// <summary>
/// Time zone code that was in use when the record was created.
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("utcconversiontimezonecode")]
public System.Nullable<int> UTCConversionTimeZoneCode
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<System.Nullable<int>>("utcconversiontimezonecode");
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("UTCConversionTimeZoneCode");
this.SetAttributeValue("utcconversiontimezonecode", value);
this.OnPropertyChanged("UTCConversionTimeZoneCode");
}
}
/// <summary>
/// Version Number
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("versionnumber")]
public System.Nullable<long> VersionNumber
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetAttributeValue<System.Nullable<long>>("versionnumber");
}
}
/// <summary>
/// 1:N msdyn_bpf_989e9b1857e24af18787d5143b67523b_AsyncOperations
/// </summary>
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("msdyn_bpf_989e9b1857e24af18787d5143b67523b_AsyncOperations")]
public System.Collections.Generic.IEnumerable<DLaB.Xrm.Entities.AsyncOperation> msdyn_bpf_989e9b1857e24af18787d5143b67523b_AsyncOperations
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntities<DLaB.Xrm.Entities.AsyncOperation>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_AsyncOperations", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("msdyn_bpf_989e9b1857e24af18787d5143b67523b_AsyncOperations");
this.SetRelatedEntities<DLaB.Xrm.Entities.AsyncOperation>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_AsyncOperations", null, value);
this.OnPropertyChanged("msdyn_bpf_989e9b1857e24af18787d5143b67523b_AsyncOperations");
}
}
/// <summary>
/// 1:N msdyn_bpf_989e9b1857e24af18787d5143b67523b_BulkDeleteFailures
/// </summary>
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("msdyn_bpf_989e9b1857e24af18787d5143b67523b_BulkDeleteFailures")]
public System.Collections.Generic.IEnumerable<DLaB.Xrm.Entities.BulkDeleteFailure> msdyn_bpf_989e9b1857e24af18787d5143b67523b_BulkDeleteFailures
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntities<DLaB.Xrm.Entities.BulkDeleteFailure>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_BulkDeleteFailures", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("msdyn_bpf_989e9b1857e24af18787d5143b67523b_BulkDeleteFailures");
this.SetRelatedEntities<DLaB.Xrm.Entities.BulkDeleteFailure>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_BulkDeleteFailures", null, value);
this.OnPropertyChanged("msdyn_bpf_989e9b1857e24af18787d5143b67523b_BulkDeleteFailures");
}
}
/// <summary>
/// 1:N msdyn_bpf_989e9b1857e24af18787d5143b67523b_MailboxTrackingFolders
/// </summary>
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("msdyn_bpf_989e9b1857e24af18787d5143b67523b_MailboxTrackingFolders")]
public System.Collections.Generic.IEnumerable<DLaB.Xrm.Entities.MailboxTrackingFolder> msdyn_bpf_989e9b1857e24af18787d5143b67523b_MailboxTrackingFolders
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntities<DLaB.Xrm.Entities.MailboxTrackingFolder>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_MailboxTrackingFolders", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("msdyn_bpf_989e9b1857e24af18787d5143b67523b_MailboxTrackingFolders");
this.SetRelatedEntities<DLaB.Xrm.Entities.MailboxTrackingFolder>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_MailboxTrackingFolders", null, value);
this.OnPropertyChanged("msdyn_bpf_989e9b1857e24af18787d5143b67523b_MailboxTrackingFolders");
}
}
/// <summary>
/// 1:N msdyn_bpf_989e9b1857e24af18787d5143b67523b_PrincipalObjectAttributeAccesses
/// </summary>
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("msdyn_bpf_989e9b1857e24af18787d5143b67523b_PrincipalObjectAttributeAccesses")]
public System.Collections.Generic.IEnumerable<DLaB.Xrm.Entities.PrincipalObjectAttributeAccess> msdyn_bpf_989e9b1857e24af18787d5143b67523b_PrincipalObjectAttributeAccesses
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntities<DLaB.Xrm.Entities.PrincipalObjectAttributeAccess>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_PrincipalObjectAttributeAccesses", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("msdyn_bpf_989e9b1857e24af18787d5143b67523b_PrincipalObjectAttributeAccesses");
this.SetRelatedEntities<DLaB.Xrm.Entities.PrincipalObjectAttributeAccess>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_PrincipalObjectAttributeAccesses", null, value);
this.OnPropertyChanged("msdyn_bpf_989e9b1857e24af18787d5143b67523b_PrincipalObjectAttributeAccesses");
}
}
/// <summary>
/// 1:N msdyn_bpf_989e9b1857e24af18787d5143b67523b_ProcessSession
/// </summary>
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("msdyn_bpf_989e9b1857e24af18787d5143b67523b_ProcessSession")]
public System.Collections.Generic.IEnumerable<DLaB.Xrm.Entities.ProcessSession> msdyn_bpf_989e9b1857e24af18787d5143b67523b_ProcessSession
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntities<DLaB.Xrm.Entities.ProcessSession>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_ProcessSession", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("msdyn_bpf_989e9b1857e24af18787d5143b67523b_ProcessSession");
this.SetRelatedEntities<DLaB.Xrm.Entities.ProcessSession>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_ProcessSession", null, value);
this.OnPropertyChanged("msdyn_bpf_989e9b1857e24af18787d5143b67523b_ProcessSession");
}
}
/// <summary>
/// 1:N msdyn_bpf_989e9b1857e24af18787d5143b67523b_SyncErrors
/// </summary>
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("msdyn_bpf_989e9b1857e24af18787d5143b67523b_SyncErrors")]
public System.Collections.Generic.IEnumerable<DLaB.Xrm.Entities.SyncError> msdyn_bpf_989e9b1857e24af18787d5143b67523b_SyncErrors
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntities<DLaB.Xrm.Entities.SyncError>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_SyncErrors", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("msdyn_bpf_989e9b1857e24af18787d5143b67523b_SyncErrors");
this.SetRelatedEntities<DLaB.Xrm.Entities.SyncError>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_SyncErrors", null, value);
this.OnPropertyChanged("msdyn_bpf_989e9b1857e24af18787d5143b67523b_SyncErrors");
}
}
/// <summary>
/// 1:N msdyn_bpf_989e9b1857e24af18787d5143b67523b_UserEntityInstanceDatas
/// </summary>
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("msdyn_bpf_989e9b1857e24af18787d5143b67523b_UserEntityInstanceDatas")]
public System.Collections.Generic.IEnumerable<DLaB.Xrm.Entities.UserEntityInstanceData> msdyn_bpf_989e9b1857e24af18787d5143b67523b_UserEntityInstanceDatas
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntities<DLaB.Xrm.Entities.UserEntityInstanceData>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_UserEntityInstanceDatas", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("msdyn_bpf_989e9b1857e24af18787d5143b67523b_UserEntityInstanceDatas");
this.SetRelatedEntities<DLaB.Xrm.Entities.UserEntityInstanceData>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_UserEntityInstanceDatas", null, value);
this.OnPropertyChanged("msdyn_bpf_989e9b1857e24af18787d5143b67523b_UserEntityInstanceDatas");
}
}
/// <summary>
/// 1:N msdyn_bpf_989e9b1857e24af18787d5143b67523b_WorkflowLogs
/// </summary>
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("msdyn_bpf_989e9b1857e24af18787d5143b67523b_WorkflowLogs")]
public System.Collections.Generic.IEnumerable<DLaB.Xrm.Entities.WorkflowLog> msdyn_bpf_989e9b1857e24af18787d5143b67523b_WorkflowLogs
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntities<DLaB.Xrm.Entities.WorkflowLog>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_WorkflowLogs", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("msdyn_bpf_989e9b1857e24af18787d5143b67523b_WorkflowLogs");
this.SetRelatedEntities<DLaB.Xrm.Entities.WorkflowLog>("msdyn_bpf_989e9b1857e24af18787d5143b67523b_WorkflowLogs", null, value);
this.OnPropertyChanged("msdyn_bpf_989e9b1857e24af18787d5143b67523b_WorkflowLogs");
}
}
/// <summary>
/// N:1 bpf_incident_msdyn_bpf_989e9b1857e24af18787d5143b67523b
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("bpf_incidentid")]
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("bpf_incident_msdyn_bpf_989e9b1857e24af18787d5143b67523b")]
public DLaB.Xrm.Entities.Incident bpf_incident_msdyn_bpf_989e9b1857e24af18787d5143b67523b
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntity<DLaB.Xrm.Entities.Incident>("bpf_incident_msdyn_bpf_989e9b1857e24af18787d5143b67523b", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("bpf_incident_msdyn_bpf_989e9b1857e24af18787d5143b67523b");
this.SetRelatedEntity<DLaB.Xrm.Entities.Incident>("bpf_incident_msdyn_bpf_989e9b1857e24af18787d5143b67523b", null, value);
this.OnPropertyChanged("bpf_incident_msdyn_bpf_989e9b1857e24af18787d5143b67523b");
}
}
/// <summary>
/// N:1 bpf_msdyn_workorder_msdyn_bpf_989e9b1857e24af18787d5143b67523b
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("bpf_msdyn_workorderid")]
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("bpf_msdyn_workorder_msdyn_bpf_989e9b1857e24af18787d5143b67523b")]
public DLaB.Xrm.Entities.msdyn_workorder bpf_msdyn_workorder_msdyn_bpf_989e9b1857e24af18787d5143b67523b
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntity<DLaB.Xrm.Entities.msdyn_workorder>("bpf_msdyn_workorder_msdyn_bpf_989e9b1857e24af18787d5143b67523b", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("bpf_msdyn_workorder_msdyn_bpf_989e9b1857e24af18787d5143b67523b");
this.SetRelatedEntity<DLaB.Xrm.Entities.msdyn_workorder>("bpf_msdyn_workorder_msdyn_bpf_989e9b1857e24af18787d5143b67523b", null, value);
this.OnPropertyChanged("bpf_msdyn_workorder_msdyn_bpf_989e9b1857e24af18787d5143b67523b");
}
}
/// <summary>
/// N:1 lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_activestageid
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("activestageid")]
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_activestageid")]
public DLaB.Xrm.Entities.ProcessStage lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_activestageid
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntity<DLaB.Xrm.Entities.ProcessStage>("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_activestageid", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_activestageid");
this.SetRelatedEntity<DLaB.Xrm.Entities.ProcessStage>("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_activestageid", null, value);
this.OnPropertyChanged("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_activestageid");
}
}
/// <summary>
/// N:1 lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdby
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdby")]
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdby")]
public DLaB.Xrm.Entities.SystemUser lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdby
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntity<DLaB.Xrm.Entities.SystemUser>("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdby", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdby");
this.SetRelatedEntity<DLaB.Xrm.Entities.SystemUser>("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdby", null, value);
this.OnPropertyChanged("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdby");
}
}
/// <summary>
/// N:1 lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdonbehalfby
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("createdonbehalfby")]
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdonbehalfby")]
public DLaB.Xrm.Entities.SystemUser lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdonbehalfby
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntity<DLaB.Xrm.Entities.SystemUser>("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdonbehalfby", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdonbehalfby");
this.SetRelatedEntity<DLaB.Xrm.Entities.SystemUser>("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdonbehalfby", null, value);
this.OnPropertyChanged("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_createdonbehalfby");
}
}
/// <summary>
/// N:1 lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedby
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedby")]
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedby")]
public DLaB.Xrm.Entities.SystemUser lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedby
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntity<DLaB.Xrm.Entities.SystemUser>("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedby", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedby");
this.SetRelatedEntity<DLaB.Xrm.Entities.SystemUser>("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedby", null, value);
this.OnPropertyChanged("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedby");
}
}
/// <summary>
/// N:1 lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedonbehalfby
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("modifiedonbehalfby")]
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedonbehalfby")]
public DLaB.Xrm.Entities.SystemUser lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedonbehalfby
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntity<DLaB.Xrm.Entities.SystemUser>("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedonbehalfby", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedonbehalfby");
this.SetRelatedEntity<DLaB.Xrm.Entities.SystemUser>("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedonbehalfby", null, value);
this.OnPropertyChanged("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_modifiedonbehalfby");
}
}
/// <summary>
/// N:1 lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_processid
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("processid")]
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_processid")]
public DLaB.Xrm.Entities.Workflow lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_processid
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntity<DLaB.Xrm.Entities.Workflow>("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_processid", null);
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
this.OnPropertyChanging("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_processid");
this.SetRelatedEntity<DLaB.Xrm.Entities.Workflow>("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_processid", null, value);
this.OnPropertyChanged("lk_msdyn_bpf_989e9b1857e24af18787d5143b67523b_processid");
}
}
/// <summary>
/// N:1 organization_msdyn_bpf_989e9b1857e24af18787d5143b67523b
/// </summary>
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("organizationid")]
[Microsoft.Xrm.Sdk.RelationshipSchemaNameAttribute("organization_msdyn_bpf_989e9b1857e24af18787d5143b67523b")]
public DLaB.Xrm.Entities.Organization organization_msdyn_bpf_989e9b1857e24af18787d5143b67523b
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return this.GetRelatedEntity<DLaB.Xrm.Entities.Organization>("organization_msdyn_bpf_989e9b1857e24af18787d5143b67523b", null);
}
}
/// <summary>
/// Constructor for populating via LINQ queries given a LINQ anonymous type
/// <param name="anonymousType">LINQ anonymous type.</param>
/// </summary>
[System.Diagnostics.DebuggerNonUserCode()]
public msdyn_bpf_989e9b1857e24af18787d5143b67523b(object anonymousType) :
this()
{
foreach (var p in anonymousType.GetType().GetProperties())
{
var value = p.GetValue(anonymousType, null);
var name = p.Name.ToLower();
if (name.EndsWith("enum") && value.GetType().BaseType == typeof(System.Enum))
{
value = new Microsoft.Xrm.Sdk.OptionSetValue((int) value);
name = name.Remove(name.Length - "enum".Length);
}
switch (name)
{
case "id":
base.Id = (System.Guid)value;
Attributes["businessprocessflowinstanceid"] = base.Id;
break;
case "businessprocessflowinstanceid":
var id = (System.Nullable<System.Guid>) value;
if(id == null){ continue; }
base.Id = id.Value;
Attributes[name] = base.Id;
break;
case "formattedvalues":
// Add Support for FormattedValues
FormattedValues.AddRange((Microsoft.Xrm.Sdk.FormattedValueCollection)value);
break;
default:
Attributes[name] = value;
break;
}
}
}
[Microsoft.Xrm.Sdk.AttributeLogicalNameAttribute("statuscode")]
public virtual msdyn_bpf_989e9b1857e24af18787d5143b67523b_StatusCode? StatusCodeEnum
{
[System.Diagnostics.DebuggerNonUserCode()]
get
{
return ((msdyn_bpf_989e9b1857e24af18787d5143b67523b_StatusCode?)(EntityOptionSetEnum.GetEnum(this, "statuscode")));
}
[System.Diagnostics.DebuggerNonUserCode()]
set
{
StatusCode = value.HasValue ? new Microsoft.Xrm.Sdk.OptionSetValue((int)value) : null;
}
}
}
}
|
daryllabar/XrmUnitTest
|
DLaB.Xrm.Entities/msdyn_bpf_989e9b1857e24af18787d5143b67523b.cs
|
C#
|
mit
| 38,051
|
/**
Core Front-end Styling for Aqua Page Builder
Themes should include their own styling for the blocks.
That includes for responsive design etc, please don't
ask me to add that for you. I hate responsive designs
DO NOT EDIT THIS
**/
/** MISC **/
.cf:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.cf {
display: block;
}
/** Basic grid columns
-----------------------*/
/**
For those who fancy fixed widths,
copy this into your theme stylesheet
[class*="aq_span"] {
float: left;
margin-left: 20px;
}
.aq-template-wrapper .aq_span12 {width: 940px;}
.aq-template-wrapper .aq_span11 {width: 860px;}
.aq-template-wrapper .aq_span10 {width: 780px;}
.aq-template-wrapper .aq_span9 {width: 700px;}
.aq-template-wrapper .aq_span8 {width: 620px;}
.aq-template-wrapper .aq_span7 {width: 540px;}
.aq-template-wrapper .aq_span6 {width: 460px;}
.aq-template-wrapper .aq_span5 {width: 380px;}
.aq-template-wrapper .aq_span4 {width: 300px;}
.aq-template-wrapper .aq_span3 {width: 220px;}
.aq-template-wrapper .aq_span2 {width: 140px;}
.aq-template-wrapper .aq_span1 {width: 60px;}
*/
[class*="aq_span"] {
float: left;
margin-left: 3%;
}
.aq-block-aq_clear_block{
height: auto;
}
.aq-template-wrapper .aq_span1 {
width: 5.58%;
}
.aq-template-wrapper .aq_span2 {
width: 14.17%;
}
.aq-template-wrapper .aq_span3 {
width: 22.75%;
}
.aq-template-wrapper .aq_span4 {
width: 31.33%;
}
.aq-template-wrapper .aq_span5 {
width: 39.92%;
}
.aq-template-wrapper .aq_span6 {
width: 48.5%;
}
.aq-template-wrapper .aq_span7 {
width: 57.08%;
}
.aq-template-wrapper .aq_span8 {
width: 65.67%;
}
.aq-template-wrapper .aq_span9 {
width: 74.25%;
}
.aq-template-wrapper .aq_span10 {
width: 82.83%;
}
.aq-template-wrapper .aq_span11 {
width: 91.42%;
}
.aq-template-wrapper .aq_span12 {
width: 100%;
}
.aq-template-wrapper .aq-first {
margin-left: 0 !important;
}
/** Blocks
-----------------------*/
.aq-block img {
margin: 0 auto;
display: block;
}
/* clear block */
.aq-block-aq_clear_block {
margin-bottom: 0px;
}
.aq-block-hr-single {
margin-bottom: 20px;
}
.aq-block-hr-double {
margin-bottom: 0px;
}
.aq-block-aq_clear_block {
min-height: auto !important;
}
/* column block */
/* To calculate the widths, use this (PHP):
echo '<pre>';
$columns = range(1,12);
$childcols = array();
foreach($columns as $column) {
$childcols = range(1, $column);
foreach($childcols as $childcol) {
$class = '.aq-template-wrapper .aq_span'.$column.' .aq_span'.$childcol;
$margin = 5;
$width = ( 100 + $margin ) / ( $column ) * ( $childcol ) - ( $margin );
$width = round($width, 2);
print_r($class . ' { width:'. $width .'%; }<br/>');
}
}
echo '</pre>';
**/
/* General
========================================================================*/
h4.aq-block-title {
margin: 0 0 20px;
}
.aq-block-aq_column_block, .block-cr_team_wrapper_block { margin-bottom: 0px; }
/*.aq-template-wrapper .span1 .span1 {
width: 100%;
}
.aq-template-wrapper .span2 .span1 {
width: 47.5%;
}
.aq-template-wrapper .span2 .span2 {
width: 100%;
}
.aq-template-wrapper .span3 .span1 {
width: 30%;
}
.aq-template-wrapper .span3 .span2 {
width: 65%;
}
.aq-template-wrapper .span3 .span3 {
width: 100%;
}
.aq-template-wrapper .span4 .span1 {
width: 21.25%;
}
.aq-template-wrapper .span4 .span2 {
width: 47.5%;
}
.aq-template-wrapper .span4 .span3 {
width: 73.75%;
}
.aq-template-wrapper .span4 .span4 {
width: 100%;
}
.aq-template-wrapper .span5 .span1 {
width: 16%;
}
.aq-template-wrapper .span5 .span2 {
width: 37%;
}
.aq-template-wrapper .span5 .span3 {
width: 58%;
}
.aq-template-wrapper .span5 .span4 {
width: 79%;
}
.aq-template-wrapper .span5 .span5 {
width: 100%;
}
.aq-template-wrapper .span6 .span1 {
width: 12.5%;
}
.aq-template-wrapper .span6 .span2 {
width: 30%;
}
.aq-template-wrapper .span6 .span3 {
width: 47.5%;
}
.aq-template-wrapper .span6 .span4 {
width: 65%;
}
.aq-template-wrapper .span6 .span5 {
width: 82.5%;
}
.aq-template-wrapper .span6 .span6 {
width: 100%;
}
.aq-template-wrapper .span7 .span1 {
width: 10%;
}
.aq-template-wrapper .span7 .span2 {
width: 25%;
}
.aq-template-wrapper .span7 .span3 {
width: 40%;
}
.aq-template-wrapper .span7 .span4 {
width: 55%;
}
.aq-template-wrapper .span7 .span5 {
width: 70%;
}
.aq-template-wrapper .span7 .span6 {
width: 85%;
}
.aq-template-wrapper .span7 .span7 {
width: 100%;
}
.aq-template-wrapper .span8 .span1 {
width: 8.13%;
}
.aq-template-wrapper .span8 .span2 {
width: 21.25%;
}
.aq-template-wrapper .span8 .span3 {
width: 34.38%;
}
.aq-template-wrapper .span8 .span4 {
width: 47.5%;
}
.aq-template-wrapper .span8 .span5 {
width: 60.63%;
}
.aq-template-wrapper .span8 .span6 {
width: 73.75%;
}
.aq-template-wrapper .span8 .span7 {
width: 86.88%;
}
.aq-template-wrapper .span8 .span8 {
width: 100%;
}
.aq-template-wrapper .span9 .span1 {
width: 6.67%;
}
.aq-template-wrapper .span9 .span2 {
width: 18.33%;
}
.aq-template-wrapper .span9 .span3 {
width: 30%;
}
.aq-template-wrapper .span9 .span4 {
width: 41.67%;
}
.aq-template-wrapper .span9 .span5 {
width: 53.33%;
}
.aq-template-wrapper .span9 .span6 {
width: 65%;
}
.aq-template-wrapper .span9 .span7 {
width: 76.67%;
}
.aq-template-wrapper .span9 .span8 {
width: 88.33%;
}
.aq-template-wrapper .span9 .span9 {
width: 100%;
}
.aq-template-wrapper .span10 .span1 {
width: 5.5%;
}
.aq-template-wrapper .span10 .span2 {
width: 16%;
}
.aq-template-wrapper .span10 .span3 {
width: 26.5%;
}
.aq-template-wrapper .span10 .span4 {
width: 37%;
}
.aq-template-wrapper .span10 .span5 {
width: 47.5%;
}
.aq-template-wrapper .span10 .span6 {
width: 58%;
}
.aq-template-wrapper .span10 .span7 {
width: 68.5%;
}
.aq-template-wrapper .span10 .span8 {
width: 79%;
}
.aq-template-wrapper .span10 .span9 {
width: 89.5%;
}
.aq-template-wrapper .span10 .span10 {
width: 100%;
}
.aq-template-wrapper .span11 .span1 {
width: 4.55%;
}
.aq-template-wrapper .span11 .span2 {
width: 14.09%;
}
.aq-template-wrapper .span11 .span3 {
width: 23.64%;
}
.aq-template-wrapper .span11 .span4 {
width: 33.18%;
}
.aq-template-wrapper .span11 .span5 {
width: 42.73%;
}
.aq-template-wrapper .span11 .span6 {
width: 52.27%;
}
.aq-template-wrapper .span11 .span7 {
width: 61.82%;
}
.aq-template-wrapper .span11 .span8 {
width: 71.36%;
}
.aq-template-wrapper .span11 .span9 {
width: 80.91%;
}
.aq-template-wrapper .span11 .span10 {
width: 90.45%;
}
.aq-template-wrapper .span11 .span11 {
width: 100%;
}
.aq-template-wrapper .span12 .span1 {
width: 3.75%;
}
.aq-template-wrapper .span12 .span2 {
width: 12.5%;
}
.aq-template-wrapper .span12 .span3 {
width: 21.25%;
}
.aq-template-wrapper .span12 .span4 {
width: 30%;
}
.aq-template-wrapper .span12 .span5 {
width: 38.75%;
}
.aq-template-wrapper .span12 .span6 {
width: 47.5%;
}
.aq-template-wrapper .span12 .span7 {
width: 56.25%;
}
.aq-template-wrapper .span12 .span8 {
width: 65%;
}
.aq-template-wrapper .span12 .span9 {
width: 73.75%;
}
.aq-template-wrapper .span12 .span10 {
width: 82.5%;
}
.aq-template-wrapper .span12 .span11 {
width: 91.25%;
}
.aq-template-wrapper .span12 .span12 {
width: 100%;
}
.aq-template-wrapper .aq-block .settings2 p {
margin-bottom: 0px;
}*/
/* Alert Boxes
========================================================================*/
.aq_alert {
font-family: 'OpenSansRegular';
font-size: 12px;
border: 1px solid #d8d8d8;
background-color: #FEFEFE;
padding: 10px 20px;
border-radius: 5px;
}
.aq_alert h1, .aq_alert h2, .aq_alert h3, .aq_alert h4, .aq_alert h5, .aq_alert h6 {
margin: 0 0 5px;
}
.aq_alert.info {
background-color: #ecf5fd;
border: 1px solid #d2dae1;
}
.aq_alert.info p{
color: #4074a1;
}
.aq-block-aq_alert_block p {
margin-bottom: 0;
}
.aq_alert.info h1, .aq_alert.info h2, .aq_alert.info h3, .aq_alert.info h4, .aq_alert.info h5, .aq_alert.info h6 {
color: #2b6181;
}
.aq_alert.note {
background-color: #f8f361;
border: 1px solid #e4e187;
color: #777300;
margin: 0 !important;
}
.aq_alert.note p{
color: #777300;
}
.aq_alert.note h1, .aq_alert.note h2, .aq_alert.note h3, .aq_alert.note h4, .aq_alert.note h5, .aq_alert.note h6 {
color: #777300;
}
.aq_alert.warn {
background-color: #e54e4b;
border: 1px solid #bb120f;
color: #ffffff;
}
.aq_alert.warn p {
color: white;
margin-left: 0;
}
.aq_alert.warn h1, .aq_alert.warn h2, .aq_alert.warn h3, .aq_alert.warn h4, .aq_alert.warn h5, .aq_alert.warn h6 {
color: #ffffff;
}
.aq_alert.tips {
background-color: #a7d155;
border: 1px solid #7da828;
}
.aq_alert.tips p{
color: #1b632c
}
.aq_alert.tips h1, .aq_alert.tips h2, .aq_alert.tips h3, .aq_alert.tips h4, .aq_alert.tips h5, .aq_alert.tips h6 {
color: #1b632c;
}
.aq_alert h1, .aq_alert h2, .aq_alert h3 {
margin: 0;
}
.aq-block-cr_text_block {
word-wrap: break-word;
}
/* Contact Details
========================================================================*/
.contactDetailsSection{
margin-bottom: -20px;
}
.contactDetailsSection ul li{
margin-bottom: 0px;
list-style: none;
}
.contactDetailsSection ul li p {
margin-bottom: 0px;
margin-left: 0px;
font-size:13px;
color: #5a5a5a;
font-family: 'OpenSansLight';
}
.contactDetailsSection ul li p span{
font-weight: bold;
}
.contactDetailsSection .contactDetails{
margin-bottom: 20px;
}
.contactDetailsSection ul li p.contactMailText{
/* color: #e32831 */
}
.contactDetailsSection ul li p.contactMailText span{
color: #5a5a5a;
}
.titleBranch{
margin-bottom: 13px;
}
.contactText{
margin-bottom: 10px !important;
}
/* Map Style
========================================================================*/
.cr-map-canvas img {
max-width: none;
}
.cr-map-canvas{
border: 1px solid #eaeaea;
}
.mapLeftMore{
width: 20px;
height: 100%;
background: #f4f4f4;
position: absolute;
z-index: 3;
border: 1px solid #eaeaea;
cursor: pointer;
right: -2px;
box-sizing: border-box;
}
.mapRight .mapLeftMore{
left: 0px;
}
.mapLeftMore:after{
content: "+";
color: #6d6d6d;
font-family: "openSansBold";
font-size: 18px;
margin: 0 auto;
width: 11px;
height: 10px;
display: block;
top: 46%;
position: absolute;
margin-left: 5px;
}
.mapLeftMore.clicked:after{
content: "-";
width: 6px;
}
.mapCont{
float: left;
width: 100%;
z-index: 4;
-webkit-transition: 0.5s ease;
-moz-transition: 0.5s ease;
-o-transition: 0.5s ease;
-ms-transition: 0.5s ease;
transition: 0.5s ease;
position: relative;
}
.cfgm-filters {
margin-top: 20px;
}
/* Features Home
========================================================================*/
.featureHomeText > p {
margin-left: 0px;
display: block;
}
.featuresHome li {
text-align: center;
vertical-align: top;
display: inline-block;
margin-bottom: 30px;
/**
margin-left: 20px;*/
}
.featureHomeImage{
margin-bottom: 30px;
}
.featureHomeImage span{
font-size: 100px;
-webkit-transition: 0.5s ease;
-moz-transition: 0.5s ease;
-o-transition: 0.5s ease;
transition: 0.5s ease;
}
h3.featureHomeTitle {
font-size:21px;
display: block;
-webkit-transition: 0.5s ease;
-moz-transition: 0.5s ease;
-o-transition: 0.5s ease;
transition: 0.5s ease;
margin-bottom:16px;
}
.featuresHome .image_title_wrap:hover .featureHomeImage span, .featuresHome .image_title_wrap:hover .featureHomeTitle {
/* color: #e32831 !important */
}
.featureHomeText{
margin-left: 0;
display: block;
}
/* Features Home 2
========================================================================*/
.featuresHome.gridStyle li {
text-align: left;
}
.featuresHome.gridStyle .image_title_wrap {
display: table;
margin-bottom: 10px;
}
.featuresHome.gridStyle .featureHomeImage.image_added{
text-align: center;
background: none !important;
border: none !important;
box-shadow: none !important;
width: auto;
height: auto;
float: left;
margin-right: 20px;
}
.featuresHome.gridStyle .featureHomeImage.image_added:before {
height: 100%;
content: '';
vertical-align: middle;
display: inline-block !important;
}
.featuresHome.gridStyle .featureHomeImage.image_added:after{
display: none;
}
.featuresHome.gridStyle .featureHomeImage.image_added img {
display: inline-block;
vertical-align: middle;
}
.featuresHome.gridStyle .featureHomeImage span {
display: block;
margin: 0 auto 20px auto;
font-size: 100px;
color: #2a2a2a;
-webkit-transition: -webkit-transform ease-out 0.1s, background 0.2s;
-moz-transition: -moz-transform ease-out 0.1s, background 0.2s;
-o-transition: -o-transform ease-out 0.1s, background 0.2s;
transition: transform ease-out 0.1s, background 0.2s;
}
.featuresHome.gridStyle .featureHomeImage:before{
display: block;
}
.featuresHome.gridStyle .featureHomeImage:after{
top: -2px;
left: -2px;
padding: 2px;
z-index: 1;
/* background: #e32831 */
-webkit-transition: -webkit-transform 0.5s, opacity 0.5s;
-moz-transition: -moz-transform 0.5s, opacity 0.5s;
transition: transform 0.5s, opacity 0.5s;
pointer-events: none;
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
content: '';
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.featuresHome.gridStyle .image_title_wrap:hover .featureHomeImage{
background: white;
}
.featuresHome.gridStyle .image_title_wrap:hover .featureHomeImage span{
/* color: #e32831 !important */
}
.featuresHome.gridStyle .image_title_wrap:hover .featureHomeImage:after{
-webkit-transform: scale(1.3);
-moz-transform: scale(1.3);
-ms-transform: scale(1.3);
transform: scale(1.3);
opacity: 0;
}
.featuresHome.gridStyle .featureHomeImage {
width: 44px;
height: 44px;
border-radius: 50%;
float: left;
position: relative;
margin-bottom: 0;
border: 4px solid #E32831;
margin-right: 20px;
-webkit-transition: 0.3s ease;
-moz-transition: 0.3s ease;
transition: 0.3s ease;
}
.featuresHome.gridStyle .featureHomeImage span {
font-size: 20px;
line-height: 44px;
color: white;
text-align: center;
margin-left: 0px;
position: relative;
z-index: 2;
}
.featuresHome.gridStyle .image_title_wrap:hover .featureHomeImage span {
color: white;
}
.featuresHome.gridStyle .featureHomeTitle {
margin-left: 64px;
font-size: 18px;
display: table-cell;
vertical-align: middle;
}
.featuresHome.gridStyle .image_title_wrap.imageIconBox{
overflow: hidden;
display: table;
margin-bottom: 20px;
}
.featuresHome.gridStyle .image_title_wrap.imageIconBox h3{
display: table-cell;
vertical-align: middle;
}
/*Divider*/
.dotted.divider{
margin-bottom: 1px;
}
.line.divider{
margin-bottom: 1px;
}
/*List*/
.aq-block ul.listStyleImage li:last-child{
margin-bottom:0px;
}
/*Embed Block*/
.aq-block .embedBlock.iframe_container{
padding-bottom: 75%;
height: 0;
position: relative;
}
.aq-block .embedBlock.iframe_container iframe{
width: 100%;
position: absolute;
height: 100%;
}
.backgroundBlock .center_blocks {
display: table;
margin: 0 auto;
}
|
purgesoftwares/purges
|
frontend/wp-content/themes/circleflip/creiden-framework/content-builder/assets/css/aqpb-view.css
|
CSS
|
mit
| 14,864
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition.Primitives;
using System.Diagnostics.Contracts;
using System.Globalization;
using System.Linq;
using Microsoft.Internal;
namespace System.ComponentModel.Composition.Hosting
{
/// <summary>
/// Defines the <see langword="abstract"/> base class for export providers, which provide
/// methods for retrieving <see cref="Export"/> objects.
/// </summary>
public abstract partial class ExportProvider
{
private static readonly Export[] EmptyExports = new Export[] { };
/// <summary>
/// Initializes a new instance of the <see cref="ExportProvider"/> class.
/// </summary>
protected ExportProvider()
{
}
/// <summary>
/// Occurs when the exports in the <see cref="ExportProvider"/> have changed.
/// </summary>
public event EventHandler<ExportsChangeEventArgs> ExportsChanged;
/// <summary>
/// Occurs when the exports in the <see cref="ExportProvider"/> are changing.
/// </summary>
public event EventHandler<ExportsChangeEventArgs> ExportsChanging;
/// <summary>
/// Returns all exports that match the conditions of the specified import.
/// </summary>
/// <param name="definition">
/// The <see cref="ImportDefinition"/> that defines the conditions of the
/// <see cref="Export"/> objects to get.
/// </param>
/// <result>
/// An <see cref="IEnumerable{T}"/> of <see cref="Export"/> objects that match
/// the conditions defined by <see cref="ImportDefinition"/>, if found; otherwise, an
/// empty <see cref="IEnumerable{T}"/>.
/// </result>
/// <exception cref="ArgumentNullException">
/// <paramref name="definition"/> is <see langword="null"/>.
/// </exception>
/// <exception cref="ImportCardinalityMismatchException">
/// <para>
/// <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.ExactlyOne"/> and
/// there are zero <see cref="Export"/> objects that match the conditions of the specified
/// <see cref="ImportDefinition"/>.
/// </para>
/// -or-
/// <para>
/// <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.ZeroOrOne"/> or
/// <see cref="ImportCardinality.ExactlyOne"/> and there are more than one <see cref="Export"/>
/// objects that match the conditions of the specified <see cref="ImportDefinition"/>.
/// </para>
/// </exception>
public IEnumerable<Export> GetExports(ImportDefinition definition)
{
return GetExports(definition, null);
}
/// <summary>
/// Returns all exports that match the conditions of the specified import.
/// </summary>
/// <param name="definition">
/// The <see cref="ImportDefinition"/> that defines the conditions of the
/// <see cref="Export"/> objects to get.
/// </param>
/// <result>
/// An <see cref="IEnumerable{T}"/> of <see cref="Export"/> objects that match
/// the conditions defined by <see cref="ImportDefinition"/>, if found; otherwise, an
/// empty <see cref="IEnumerable{T}"/>.
/// </result>
/// <exception cref="ArgumentNullException">
/// <paramref name="definition"/> is <see langword="null"/>.
/// </exception>
/// <exception cref="ImportCardinalityMismatchException">
/// <para>
/// <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.ExactlyOne"/> and
/// there are zero <see cref="Export"/> objects that match the conditions of the specified
/// <see cref="ImportDefinition"/>.
/// </para>
/// -or-
/// <para>
/// <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.ZeroOrOne"/> or
/// <see cref="ImportCardinality.ExactlyOne"/> and there are more than one <see cref="Export"/>
/// objects that match the conditions of the specified <see cref="ImportDefinition"/>.
/// </para>
/// </exception>
public IEnumerable<Export> GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
{
Requires.NotNull(definition, nameof(definition));
Contract.Ensures(Contract.Result<IEnumerable<Export>>() != null);
IEnumerable<Export> exports;
ExportCardinalityCheckResult result = TryGetExportsCore(definition, atomicComposition, out exports);
switch(result)
{
case ExportCardinalityCheckResult.Match:
return exports;
case ExportCardinalityCheckResult.NoExports:
throw new ImportCardinalityMismatchException(string.Format(CultureInfo.CurrentCulture, SR.CardinalityMismatch_NoExports, definition.ToString()));
default:
Assumes.IsTrue(result == ExportCardinalityCheckResult.TooManyExports);
throw new ImportCardinalityMismatchException(string.Format(CultureInfo.CurrentCulture, SR.CardinalityMismatch_TooManyExports, definition.ToString()));
}
}
/// <summary>
/// Returns all exports that match the conditions of the specified import.
/// </summary>
/// <param name="definition">
/// The <see cref="ImportDefinition"/> that defines the conditions of the
/// <see cref="Export"/> objects to get.
/// </param>
/// <param name="exports">
/// When this method returns, contains an <see cref="IEnumerable{T}"/> of <see cref="Export"/>
/// objects that match the conditions defined by <see cref="ImportDefinition"/>, if found;
/// otherwise, an empty <see cref="IEnumerable{T}"/>.
/// </param>
/// <returns>
/// <see langword="true"/> if <see cref="ImportDefinition.Cardinality"/> is
/// <see cref="ImportCardinality.ZeroOrOne"/> or <see cref="ImportCardinality.ZeroOrMore"/> and
/// there are zero <see cref="Export"/> objects that match the conditions of the specified
/// <see cref="ImportDefinition"/>. <see langword="true"/> if
/// <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.ZeroOrOne"/> or
/// <see cref="ImportCardinality.ExactlyOne"/> and there is exactly one <see cref="Export"/>
/// that matches the conditions of the specified <see cref="ImportDefinition"/>; otherwise,
/// <see langword="false"/>.
/// </returns>
/// <exception cref="ArgumentNullException">
/// <paramref name="definition"/> is <see langword="null"/>.
/// </exception>
public bool TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, out IEnumerable<Export> exports)
{
Requires.NotNull(definition, nameof(definition));
exports = null;
ExportCardinalityCheckResult result = TryGetExportsCore(definition, atomicComposition, out exports);
return (result == ExportCardinalityCheckResult.Match);
}
/// <summary>
/// Returns all exports that match the constraint defined by the specified definition.
/// </summary>
/// <param name="definition">
/// The <see cref="ImportDefinition"/> that defines the conditions of the
/// <see cref="Export"/> objects to return.
/// </param>
/// <result>
/// An <see cref="IEnumerable{T}"/> of <see cref="Export"/> objects that match
/// the conditions defined by <see cref="ImportDefinition"/>, if found; otherwise, an
/// empty <see cref="IEnumerable{T}"/>.
/// </result>
/// <remarks>
/// <note type="inheritinfo">
/// Overriders of this method should not treat cardinality-related mismatches
/// as errors, and should not throw exceptions in those cases. For instance,
/// if <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.ExactlyOne"/>
/// and there are zero <see cref="Export"/> objects that match the conditions of the
/// specified <see cref="ImportDefinition"/>, an <see cref="IEnumerable{T}"/> should be returned.
/// </note>
/// </remarks>
protected abstract IEnumerable<Export> GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition);
/// <summary>
/// Raises the <see cref="ExportsChanged"/> event.
/// </summary>
/// <param name="e">
/// An <see cref="ExportsChangeEventArgs"/> containing the data for the event.
/// </param>
protected virtual void OnExportsChanged(ExportsChangeEventArgs e)
{
EventHandler<ExportsChangeEventArgs> changedEvent = ExportsChanged;
if (changedEvent != null)
{
CompositionResult result = CompositionServices.TryFire(changedEvent, this, e);
result.ThrowOnErrors(e.AtomicComposition);
}
}
/// <summary>
/// Raises the <see cref="ExportsChanging"/> event.
/// </summary>
/// <param name="e">
/// An <see cref="ExportsChangeEventArgs"/> containing the data for the event.
/// </param>
protected virtual void OnExportsChanging(ExportsChangeEventArgs e)
{
EventHandler<ExportsChangeEventArgs> changingEvent = ExportsChanging;
if (changingEvent != null)
{
CompositionResult result = CompositionServices.TryFire(changingEvent, this, e);
result.ThrowOnErrors(e.AtomicComposition);
}
}
private ExportCardinalityCheckResult TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, out IEnumerable<Export> exports)
{
Assumes.NotNull(definition);
exports = GetExportsCore(definition, atomicComposition);
var checkResult = ExportServices.CheckCardinality(definition, exports);
// Export providers treat >1 match as zero for cardinality 0-1 imports
// If this policy is moved we need to revisit the assumption that the
// ImportEngine made during previewing the only required imports to
// now also preview optional imports.
if (checkResult == ExportCardinalityCheckResult.TooManyExports &&
definition.Cardinality == ImportCardinality.ZeroOrOne)
{
checkResult = ExportCardinalityCheckResult.Match;
exports = null;
}
if (exports == null)
{
exports = EmptyExports;
}
return checkResult;
}
}
}
|
fgreinacher/corefx
|
src/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ExportProvider.cs
|
C#
|
mit
| 11,597
|
describe 'declared property classes' do
describe Neo4j::Shared::DeclaredProperty do
before do
clazz = Class.new do
def primitive_type; end
end
stub_const('MyTypeCaster', clazz)
end
let(:clazz) { Neo4j::Shared::DeclaredProperty }
describe Neo4j::Shared::DeclaredProperty do
let(:prop) { clazz.new(:my_prop) }
context 'illegal property names' do
it 'raises an error' do
expect { clazz.new(:from_node) }.to raise_error { Neo4j::Shared::DeclaredProperty::IllegalPropertyError }
end
end
describe 'options' do
let(:prop) { clazz.new(:my_prop, type: String, typecaster: MyTypeCaster, default: 'foo') }
it 'controls method responses' do
expect(prop.type).to eq String
expect(prop.typecaster).to eq MyTypeCaster
expect(prop.default_value).to eq 'foo'
end
end
describe 'magic properties' do
let(:created) { clazz.new(:created_at) }
let(:updated) { clazz.new(:updated_at) }
it 'automatically sets type for created_at and updated_at if unset' do
expect(created.type).to be_nil
expect(updated.type).to be_nil
[created, updated].each(&:register)
expect(created.type).to eq DateTime
expect(updated.type).to eq DateTime
end
end
describe '#index?, #index!, #unindex!' do
it 'returns whether a property has been indexed' do
expect(prop.index?).to eq false
expect { prop.index! }.to change { prop.index? }.from(false).to(true)
expect { prop.unindex! }.to change { prop.index? }.to(false)
end
end
describe '#constraint?, #constraint!, #unconstraint!' do
it 'returns constraint status, changes' do
expect(prop.constraint?).to eq false
expect { prop.constraint! }.to change { prop.constraint? }.to(true)
expect { prop.unconstraint! }.to change { prop.constraint? }.to(false)
end
end
end
end
describe Neo4j::Shared::DeclaredProperties do
before do
clazz = Class.new do
include Neo4j::ActiveNode
property :foo
property :bar, type: String, default: 'foo'
property :baz, type: Neo4j::Shared::Boolean, default: false
validates :baz, inclusion: {in: [true, false]}
end
stub_const('MyModel', clazz)
end
let(:model) { MyModel }
let(:dpm) { MyModel.declared_properties }
it 'is included on each class' do
expect(model.declared_properties).to be_a(Neo4j::Shared::DeclaredProperties)
end
it 'has a convenience method on each instance' do
inst = model.new
expect(inst.declared_properties.object_id).to eq model.declared_properties.object_id
end
it 'delegates #each, #each_key, #each_value to #registered_properties' do
dpm.each do |name, property|
expect(dpm.registered_properties).to have_key(name)
expect(dpm.registered_properties[name]).to eq property
end
expect(dpm.each_key.to_a).to eq(dpm.registered_properties.keys)
expect(dpm.each_value.to_a).to eq(dpm.registered_properties.values)
end
it 'contains information about each declared property' do
[:foo, :bar].each do |key|
expect(dpm.registered_properties[key]).to be_a(Neo4j::Shared::DeclaredProperty)
expect(dpm[key]).to be_a(Neo4j::Shared::DeclaredProperty)
expect(dpm.property?(key)).to be_truthy
end
expect(dpm.property?(:buzz)).to eq false
end
it 'keeps a default hash of nil values for use in initial object wrapping' do
expect(dpm.attributes_nil_hash).to have_key('foo')
expect(dpm.attributes_nil_hash).to have_key('bar')
end
describe 'inheritance' do
before do
clazz = Class.new do
include Neo4j::ActiveNode
property :foo
property :bar, type: String, default: 'foo'
end
stub_const('MyModel', clazz)
clazz = Class.new(MyModel) do
include Neo4j::ActiveNode
end
stub_const('MyInheritedClass', clazz)
end
let(:dpm) { MyModel.declared_properties }
let(:inherited_dpm) { MyInheritedClass.declared_properties }
it 'applies the ancestor\'s props' do
dpm.registered_properties.each_key do |k|
expect(inherited_dpm.registered_properties).to have_key(k)
end
end
end
# This mimics the behavior of active_attr's default property values
describe 'default property values' do
let(:node) { MyModel.new }
it 'sets the default property val at init' do
expect(node.bar).to eq 'foo'
end
context 'with type: Boolean and default: false' do
subject { node.baz }
it { is_expected.to eq false }
context 'model from new with attributes' do
let(:node) { MyModel.new }
it { is_expected.to eq false }
end
context 'model from new with attributes' do
let(:node) { MyModel.new(foo: 'foo') }
it { is_expected.to eq false }
end
context 'model from create' do
let(:node) { MyModel.create }
it { is_expected.to eq false }
end
context 'model from create with attributes' do
let(:node) { MyModel.create(foo: 'foo') }
it { is_expected.to eq false }
end
end
context 'with value not default, not updated' do
before do
node.bar = 'bar'
node.save
node.reload
node.foo = 'foo'
node.save
node.reload
end
it 'does not reset' do
expect(node.bar).to eq 'bar'
end
end
context 'with changed values' do
before do
node.bar = value
node.baz = true
node.save!
node.reload
end
context 'on reload when prop was changed to nil' do
let(:value) { nil }
it 'resets nil default properties on reload' do
expect(node.bar).to eq 'foo'
end
end
context 'on reload when prop was set' do
let(:value) { 'bar' }
it 'does not reset to default' do
expect(node.bar).to eq 'bar'
expect(node.baz).to eq true
end
end
end
end
end
end
|
veetow/neo4j
|
spec/e2e/property_management_spec.rb
|
Ruby
|
mit
| 6,410
|
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="../src/jquery.fb.albumbrowser.js"></script>
<link rel="stylesheet" type="text/css" href="../src/jquery.fb.albumbrowser.css" />
</head>
<body>
<div class="fb-album-container"></div>
<script type="text/javascript">
$(document).ready(function () {
$(".fb-album-container").FacebookAlbumBrowser({
account: "natgeo",
accessToken: "775908159169504|cYEIsh0rs25OQQC8Ex2hXyCOut4",
includeAlbums: ["Profile Pictures", "Timeline Photos"],
showComments: true,
commentsLimit:3,
showAccountInfo: true,
showImageCount: true,
showImageText: true,
shareButton: false,
albumsPageSize: 0,
photosPageSize: 0,
lightbox: true,
photosCheckbox: true,
pluginImagesPath: "../src/",
likeButton: true,
shareButton: true,
addThis:"ra-52638e915dd79612",
photoChecked: function(photo){
console.log("PHOTO CHECKED: " + photo.id + " - " + photo.url + " - " + photo.thumb);
console.log("CHECKED PHOTOS COUNT: " + this.checkedPhotos.length);
},
photoUnchecked: function (photo) {
console.log("PHOTO UNCHECKED: " + photo.id + " - " + photo.url + " - " + photo.thumb);
console.log("CHECKED PHOTOS COUNT: " + this.checkedPhotos.length);
},
albumSelected: function (photo) {
console.log("ALBUM CLICK: " + photo.id + " - " + photo.url + " - " + photo.thumb);
},
photoSelected: function (photo) {
console.log("PHOTO CLICK: " + photo.id + " - " + photo.url + " - " + photo.thumb);
}
});
});
</script>
</body>
</html>
|
dejanstojanovic/Facebook-Album-Browser
|
samples/sample-only-albums.html
|
HTML
|
mit
| 2,238
|
// The MIT License
//
// Copyright (c) 2013 Jordan E. Terrell
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System.Reflection;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace iSynaptic.Serialization
{
public class PrivateSetterAwareContractResolver : DefaultContractResolver
{
protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization)
{
var prop = base.CreateProperty(member, memberSerialization);
if (!prop.Writable)
{
var property = member as PropertyInfo;
if (property != null)
{
var hasPrivateSetter = property.GetSetMethod(true) != null;
prop.Writable = hasPrivateSetter;
}
}
return prop;
}
}
}
|
bbiwer/iSynaptic.Core
|
src/iSynaptic.Core.Serialization/PrivateSetterAwareContractResolver.cs
|
C#
|
mit
| 1,963
|
#region Copyright Simple Injector Contributors
/* The Simple Injector is an easy-to-use Inversion of Control library for .NET
*
* Copyright (c) 2013-2015 Simple Injector Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
* following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial
* portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
* EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#endregion
namespace SimpleInjector.Lifestyles
{
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq.Expressions;
internal sealed class ExpressionRegistration : Registration
{
private readonly Expression expression;
private Type implementationType;
internal ExpressionRegistration(Expression expression, Container container)
: this(expression, GetImplementationTypeFor(expression), GetLifestyleFor(expression), container)
{
}
internal ExpressionRegistration(Expression expression, Type implementationType, Lifestyle lifestyle,
Container container)
: base(lifestyle, container)
{
Requires.IsNotNull(expression, nameof(expression));
Requires.IsNotNull(implementationType, nameof(implementationType));
this.expression = expression;
this.implementationType = implementationType;
}
public override Type ImplementationType
{
get { return this.implementationType; }
}
public override Expression BuildExpression()
{
return this.expression;
}
private static Lifestyle GetLifestyleFor(Expression expression)
{
if (expression is ConstantExpression)
{
return Lifestyle.Singleton;
}
if (expression is NewExpression)
{
return Lifestyle.Transient;
}
return Lifestyle.Unknown;
}
private static Type GetImplementationTypeFor(Expression expression)
{
var newExpression = expression as NewExpression;
if (newExpression != null)
{
return newExpression.Constructor.DeclaringType;
}
return expression.Type;
}
}
}
|
jamesqo/SimpleInjector
|
SimpleInjector/Lifestyles/ExpressionRegistration.cs
|
C#
|
mit
| 3,190
|
\definecolor{blue}{RGB}{41,5,195}
\makeatletter
\hypersetup{
%pagebackref=true,
pdftitle={\@title},
pdfauthor={\@author},
pdfsubject={\imprimirpreambulo},
pdfcreator={LaTeX with abnTeX2},
pdfkeywords={abnt}{latex}{abntex}{abntex2}{trabalho acadêmico},
colorlinks=true, % false: boxed links; true: colored links
linkcolor=blue, % color of internal links
citecolor=blue, % color of links to bibliography
filecolor=magenta, % color of file links
urlcolor=blue,
bookmarksdepth=4
}
\makeatother
\setlength{\parindent}{1.3cm}
\setlength{\parskip}{0.2cm}
\makeindex
|
aldarionsevero/verivarlrels
|
rel1/fixos/setup.tex
|
TeX
|
mit
| 637
|
<hr class="c-divider">
|
wangjinisda/react-webpack-babel-starter
|
src/resources/external_artifacts/MWF_1.6.0/core/templates/components/divider/report/index.html
|
HTML
|
mit
| 22
|
/*++
Module:
@file stringlib.h
Abstract:
@author Joe N. Turner <joe@agavemountain.com>
Copyright (C) 2008 Agave Mountain, Inc.; All right reserved.
*/
/*! \mainpage
Welcome to the C++ String Utility Library
<table>
<tr><th>Library <td>String utility shared library
<tr><th>Author <td>Joe Turner
<tr><th>Version <td>0.0.1
</table>
@section intro INTRODUCTION
This is a shared library designed to capture various design patterns,
utility functions, templates, and reusable code into one
unit tested reusable library.
Topics:
- \subpage requirements
- \subpage history
Questions, comments, concerns, or dissenting opinions should be directed
to Joe Turner, joe@agavemountain.com
\page requirements Requirements
The requirements for code inclusion into this library are relavetly simple:
-# The code has to be useful
-# The code has to be reusable
-# The code has to be optimized for speed or performance
\page history Revision History
<HR>
\section v0_0 Release v0.0
The upcoming v1.0 release is currently under development in the main source trunk.
*/
/**
All of the library's code is confined in the agavecore namespace to avoid
namespace collisions with other namespaces.
*/
namespace stringlib
{
};
|
dblalock/SnapE
|
External/stringlib-read-only/stringlib/include/stringlib.h
|
C
|
mit
| 1,321
|
# The set of languages for which implicit dependencies are needed:
SET(CMAKE_DEPENDS_LANGUAGES
)
# The set of files for implicit dependencies of each language:
# Preprocessor definitions for this target.
SET(CMAKE_TARGET_DEFINITIONS
"GETTEXT_PACKAGE=\"02_getting_an_image_on_the_screen\""
"LOCALE_DIR=\"/usr/local/share/locale\""
"PACKAGE_DATA_DIR=\"/usr/local/share/02_getting_an_image_on_the_screen\""
"PACKAGE_NAME=\"02_getting_an_image_on_the_screen\""
"PACKAGE_UI_DIR=\"/usr/local/share/02_getting_an_image_on_the_screen/ui\""
"PACKAGE_VERSION=\"0.0.0\""
"PIXMAP_DIR=\"/usr/local/share/pixmaps/02_getting_an_image_on_the_screen\""
"VALA_VERSION=\"0.28\""
"_REENTRANT"
)
# Targets to which this target links.
SET(CMAKE_TARGET_LINKED_INFO_FILES
)
# The include file search paths:
SET(CMAKE_C_TARGET_INCLUDE_PATH
"."
)
SET(CMAKE_CXX_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
SET(CMAKE_Fortran_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
SET(CMAKE_ASM_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
|
darkoverlordofdata/sdl2-vala-valama
|
03_event_driven_programming/build/CMakeFiles/ui_copy_02_getting_an_image_on_the_screen.dir/DependInfo.cmake
|
CMake
|
mit
| 1,054
|
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Immutable;
using System.Diagnostics;
using System.Reflection.Metadata.Ecma335;
namespace System.Reflection.Metadata
{
public struct TypeDefinition
{
private readonly MetadataReader _reader;
// Workaround: JIT doesn't generate good code for nested structures, so use RowId.
private readonly uint _treatmentAndRowId;
internal TypeDefinition(MetadataReader reader, uint treatmentAndRowId)
{
Debug.Assert(reader != null);
Debug.Assert(treatmentAndRowId != 0);
_reader = reader;
_treatmentAndRowId = treatmentAndRowId;
}
private uint RowId
{
get { return _treatmentAndRowId & TokenTypeIds.RIDMask; }
}
private TypeDefTreatment Treatment
{
get { return (TypeDefTreatment)(_treatmentAndRowId >> TokenTypeIds.RowIdBitCount); }
}
private TypeDefinitionHandle Handle
{
get { return TypeDefinitionHandle.FromRowId(RowId); }
}
public TypeAttributes Attributes
{
get
{
if (Treatment == 0)
{
return _reader.TypeDefTable.GetFlags(Handle);
}
return GetProjectedFlags();
}
}
/// <summary>
/// Name of the type.
/// </summary>
public StringHandle Name
{
get
{
if (Treatment == 0)
{
return _reader.TypeDefTable.GetName(Handle);
}
return GetProjectedName();
}
}
/// <summary>
/// Namespace of the type, or nil if the type is nested or defined in a root namespace.
/// </summary>
public NamespaceDefinitionHandle Namespace
{
get
{
if (Treatment == 0)
{
return _reader.TypeDefTable.GetNamespace(Handle);
}
return GetProjectedNamespace();
}
}
/// <summary>
/// The base type of the type definition: either
/// <see cref="TypeSpecificationHandle"/>, <see cref="TypeReferenceHandle"/> or <see cref="TypeDefinitionHandle"/>.
/// </summary>
public Handle BaseType
{
get
{
if (Treatment == 0)
{
return _reader.TypeDefTable.GetExtends(Handle);
}
return GetProjectedBaseType();
}
}
public TypeLayout GetLayout()
{
uint classLayoutRowId = _reader.ClassLayoutTable.FindRow(Handle);
if (classLayoutRowId == 0)
{
// NOTE: We don't need a bool/TryGetLayout because zero also means use default:
//
// Spec:
// ClassSize of zero does not mean the class has zero size. It means that no .size directive was specified
// at definition time, in which case, the actual size is calculated from the field types, taking account of
// packing size (default or specified) and natural alignment on the target, runtime platform.
//
// PackingSize shall be one of {0, 1, 2, 4, 8, 16, 32, 64, 128}. (0 means use
// the default pack size for the platform on which the application is
// running.)
return default(TypeLayout);
}
int size = (int)_reader.ClassLayoutTable.GetClassSize(classLayoutRowId);
int packingSize = _reader.ClassLayoutTable.GetPackingSize(classLayoutRowId);
return new TypeLayout(size, packingSize);
}
/// <summary>
/// Returns the enclosing type of a specified nested type or nil handle if the type is not nested.
/// </summary>
public TypeDefinitionHandle GetDeclaringType()
{
return _reader.NestedClassTable.FindEnclosingType(Handle);
}
public GenericParameterHandleCollection GetGenericParameters()
{
return _reader.GenericParamTable.FindGenericParametersForType(Handle);
}
public MethodDefinitionHandleCollection GetMethods()
{
return new MethodDefinitionHandleCollection(_reader, Handle);
}
public FieldDefinitionHandleCollection GetFields()
{
return new FieldDefinitionHandleCollection(_reader, Handle);
}
public PropertyDefinitionHandleCollection GetProperties()
{
return new PropertyDefinitionHandleCollection(_reader, Handle);
}
public EventDefinitionHandleCollection GetEvents()
{
return new EventDefinitionHandleCollection(_reader, Handle);
}
/// <summary>
/// Returns an array of types nested in the specified type.
/// </summary>
public ImmutableArray<TypeDefinitionHandle> GetNestedTypes()
{
return _reader.GetNestedTypes(Handle);
}
public MethodImplementationHandleCollection GetMethodImplementations()
{
return new MethodImplementationHandleCollection(_reader, Handle);
}
public InterfaceImplementationHandleCollection GetInterfaceImplementations()
{
return new InterfaceImplementationHandleCollection(_reader, Handle);
}
public CustomAttributeHandleCollection GetCustomAttributes()
{
return new CustomAttributeHandleCollection(_reader, Handle);
}
public DeclarativeSecurityAttributeHandleCollection GetDeclarativeSecurityAttributes()
{
return new DeclarativeSecurityAttributeHandleCollection(_reader, Handle);
}
#region Projections
private TypeAttributes GetProjectedFlags()
{
var flags = _reader.TypeDefTable.GetFlags(Handle);
var treatment = Treatment;
switch (treatment & TypeDefTreatment.KindMask)
{
case TypeDefTreatment.NormalNonAttribute:
flags |= TypeAttributes.WindowsRuntime | TypeAttributes.Import;
break;
case TypeDefTreatment.NormalAttribute:
flags |= TypeAttributes.WindowsRuntime | TypeAttributes.Sealed;
break;
case TypeDefTreatment.UnmangleWinRTName:
flags = flags & ~TypeAttributes.SpecialName | TypeAttributes.Public;
break;
case TypeDefTreatment.PrefixWinRTName:
flags = flags & ~TypeAttributes.Public | TypeAttributes.Import;
break;
case TypeDefTreatment.RedirectedToClrType:
flags = flags & ~TypeAttributes.Public | TypeAttributes.Import;
break;
case TypeDefTreatment.RedirectedToClrAttribute:
flags &= ~TypeAttributes.Public;
break;
}
if ((treatment & TypeDefTreatment.MarkAbstractFlag) != 0)
{
flags |= TypeAttributes.Abstract;
}
if ((treatment & TypeDefTreatment.MarkInternalFlag) != 0)
{
flags &= ~TypeAttributes.Public;
}
return flags;
}
private StringHandle GetProjectedName()
{
var name = _reader.TypeDefTable.GetName(Handle);
switch (Treatment & TypeDefTreatment.KindMask)
{
case TypeDefTreatment.UnmangleWinRTName:
return name.SuffixRaw(MetadataReader.ClrPrefix.Length);
case TypeDefTreatment.PrefixWinRTName:
return name.WithWinRTPrefix();
}
return name;
}
private NamespaceDefinitionHandle GetProjectedNamespace()
{
// NOTE: NamespaceDefinitionHandle currently relies on never having virtual values. If this ever gets projected
// to a virtual namespace name, then that assumption will need to be removed.
// no change:
return _reader.TypeDefTable.GetNamespace(Handle);
}
private Handle GetProjectedBaseType()
{
// no change:
return _reader.TypeDefTable.GetExtends(Handle);
}
#endregion
}
}
|
FiveTimesTheFun/corefx
|
src/System.Reflection.Metadata/src/System/Reflection/Metadata/TypeDefinition.cs
|
C#
|
mit
| 8,768
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information
namespace Dnn.PersonaBar.Recyclebin.Components.Prompt.Commands
{
using Dnn.PersonaBar.Library.Prompt;
using Dnn.PersonaBar.Library.Prompt.Attributes;
using Dnn.PersonaBar.Library.Prompt.Models;
using Dnn.PersonaBar.Users.Components;
using DotNetNuke.Entities.Portals;
using DotNetNuke.Entities.Users;
using Constants = Dnn.PersonaBar.Recyclebin.Components.Constants;
[ConsoleCommand("restore-user", Constants.RecylcleBinCategory, "Prompt_RestoreUser_Description")]
public class RestoreUser : ConsoleCommandBase
{
[FlagParameter("id", "Prompt_RestoreUser_FlagId", "Integer", true)]
private const string FlagId = "id";
private IUserValidator _userValidator;
private IRecyclebinController _recyclebinController;
public RestoreUser() : this(new UserValidator(), RecyclebinController.Instance)
{
}
public RestoreUser(IUserValidator userValidator, IRecyclebinController instance)
{
this._userValidator = userValidator;
this._recyclebinController = instance;
}
public override string LocalResourceFile => Constants.LocalResourcesFile;
private int UserId { get; set; }
public override void Init(string[] args, PortalSettings portalSettings, UserInfo userInfo, int activeTabId)
{
this.UserId = this.GetFlagValue(FlagId, "User Id", -1, true, true, true);
}
public override ConsoleResultModel Run()
{
UserInfo userInfo;
this._userValidator.ValidateUser(this.UserId, this.PortalSettings, this.User, out userInfo);
if (userInfo == null)
return new ConsoleErrorResultModel(string.Format(this.LocalizeString("UserNotFound"), this.UserId));
if (!userInfo.IsDeleted)
return new ConsoleErrorResultModel(this.LocalizeString("Prompt_RestoreNotRequired"));
string message;
var restoredUser = this._recyclebinController.RestoreUser(userInfo, out message);
return restoredUser
? new ConsoleResultModel(this.LocalizeString("UserRestored")) { Records = 1 }
: new ConsoleErrorResultModel(message);
}
}
}
|
nvisionative/Dnn.Platform
|
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Components/Recyclebin/Prompt/Commands/RestoreUser.cs
|
C#
|
mit
| 2,473
|
/**
* ### Attention please: we don't need the Node Type[folder,leaf], when we use horizontalTree --Anjing
*/
(function ($) {
var thisTool = Dolphin;
function HORIZONTAL_TREE(param) {
this.init(param);
if (this.opts.data) {
this.loadData(this.opts.data);
} else if (this.opts.url) {
this.load(null, null);
}
return this;
}
HORIZONTAL_TREE.defaults = {
//required
panel: null, //
url: null,
data: null,
//options
fluid: false,
idField: "id",
nameField: "name",
childrenField: "children",
loadingFlag: true,
ajax: thisTool.ajax,
mockPathData: null,
levelTitle: null,
singleRoot: false,
itemType: null,
defaultId : -1,
requestKey : 'id',
buttons: [],
buttonDefaultClass: 'btn-primary',
itemButtons: [],
//icon
icon: {},
dataFilter: null
};
HORIZONTAL_TREE.prototype = {
/* ==================== property ================= */
constructor: HORIZONTAL_TREE,
panel: null,
data: null,
selectedItem: null,
itemPanel: {},
/* ===================== method ================== */
init: function (param) {
this.opts = $.extend({}, HORIZONTAL_TREE.defaults, param);
this.initLayout();
return this;
},
initLayout: function () {
var _this = this,
horizontal_tree, table, tbody, tr, td,
i;
horizontal_tree = $('<div class="_horizontal_tree">').appendTo(this.opts.panel);
if (_this.opts.fluid) {
horizontal_tree.addClass('_horizontal_fluid');
}
table = $('<table>').appendTo(horizontal_tree);
tbody = $('<tbody>').appendTo(table);
this.panel = $('<tr>').appendTo(tbody);
return this;
},
loadData: function (node, data) {
var _this = this;
if (node) {
node[_this.opts.childrenField] = data;
} else {
this.data = data;
}
this.renderLevel(data, node);
this.complete();
return this;
},
load: function (node, url, param) {
var _this = this,
data = {};
if (url) {
_this.opts.url = url;
} else {
url = _this.opts.url;
}
if (node) {
data[_this.opts.requestKey] = node[_this.opts.idField];
url = _this.opts.url.replace('{'+_this.opts.requestKey+'}', node[_this.opts.idField]);
} else {
data[_this.opts.requestKey] = _this.opts.defaultId;
url = _this.opts.url.replace('{'+_this.opts.requestKey+'}', _this.opts.defaultId);
}
this.opts.ajax({
url: url,
mockPathData: _this.opts.mockPathData,
loading: _this.opts.loadingFlag,
data: data,
onSuccess: function (reData) {
if (typeof _this.opts.dataFilter == 'function') {
reData = _this.opts.dataFilter.call(_this, reData);
}
if (node) {
node[_this.opts.childrenField] = reData.rows;
} else {
_this.data = reData.rows;
_this.panel.empty();
}
_this.renderLevel(reData.rows, node);
_this.complete();
}
});
},
renderLevel: function (data, parent) {
//在商品新增的品类选择界面,不需要在扩展新的列出来
if(parent!=null
&& this.opts.buttons.length==0
&& parent[this.opts.childrenField].length==0)
return;
var _this = this, _data = data || this.data,
col, title, level, items, item, buttons, button,
i, _level = $(this.panel).children('td').length;
col = $('<td>').appendTo(_this.panel);
level = $('<div class="_level">').attr('data-parentId', parent && parent[_this.opts.idField]).appendTo(col);
if (_data.title) {
title = $('<div class="_title">').html(_data.title).appendTo(level);
} else if (_this.opts.levelTitle) {
title = $('<div class="_title">').appendTo(level);
if (_level < _this.opts.levelTitle.length) {
title.html(_this.opts.levelTitle[_level]);
} else {
title.html("level : " + _level);
}
}
items = $('<div class="_items">').appendTo(level);
$.each(_data, function (i, itemData) {
//将节点拼接起来,使每个叶子节点可以追溯到根节点
itemData.parent = parent;
//设置其type为folder or leaf
if (itemData.children && itemData.children.length > 0) {
itemData.type = 'folder';
} else {
itemData.type = 'leaf';
}
_this.addItem(itemData, items);
});
if (!_this.opts.singleRoot || (_this.opts.singleRoot && parent)) {
buttons = $('<div class="_button">').appendTo(level);
$.each(_this.opts.buttons, function (i, buttonData) {
button = $('<button class="btn btn-xs">').addClass(buttonData.class || _this.opts.buttonDefaultClass)
.html(buttonData.name).attr(buttonData.attr).appendTo(buttons);
if (typeof buttonData.click == 'function') {
button.click(function (event) {
buttonData.click.call(_this, data, parent, this, event);
});
}
});
}
return _this;
},
addItem: function (data, panel, parent) {
var _this = this,
item, i, buttons, name;
item = $('<div class="_item">').attr('id', data[_this.opts.idField]).appendTo(panel);
if (typeof _this.opts.nameField === 'function') {
name = _this.opts.nameField.call(_this, data)
} else {
name = data[_this.opts.nameField];
}
$('<span class="_itemName">').attr('title', name).html(name).appendTo(item);
if (data.type == "folder") {
$('<span class="glyphicon glyphicon-play float-right">').appendTo(item);
}
if (_this.opts.itemButtons) {
buttons = $('<span class="_itemButtons">').appendTo(item);
$.each(_this.opts.itemButtons, function (i, b) {
$('<span class="glyphicon">').addClass(b.icon).click(function (event) {
b.click.call(_this, data, parent, item);
event.stopPropagation();
return false;
}).appendTo(buttons);
});
}
item.click(function (event) {
_this.click.call(_this, data, this, event);
});
if (parent && parent[_this.opts.childrenField]) {
parent[_this.opts.childrenField].push(data);
}
},
reloadItem: function (id, data) {
var _this = this;
var item, itemPanel, name, _url, _data;
if (typeof id === 'string') {
item = _this.findItem(id);
} else {
item = id
}
itemPanel = $('div._item[id="' + item[_this.opts.idField] + '"]');
if (data) {
$.extend(item, data);
if (typeof _this.opts.nameField === 'function') {
name = _this.opts.nameField.call(_this, data)
} else {
name = data[_this.opts.nameField];
}
itemPanel.find('._itemName').attr('title', name).html(name);
itemPanel.click();
} else {
_data = {};
if (item[_this.opts.idField]) {
_data[_this.opts.requestKey] = item[_this.opts.idField];
_url = _this.opts.url.replace('{'+_this.opts.requestKey+'}', item[_this.opts.idField]);
} else {
_data[_this.opts.requestKey] = _this.opts.defaultId;
_url = _this.opts.url.replace('{'+_this.opts.requestKey+'}', _this.opts.defaultId);
}
this.opts.ajax({
url: _url,
data : _data,
mockPathData: _this.opts.mockPathData,
loading: _this.opts.loadingFlag,
onSuccess: function (reData) {
if (reData.rows && reData.rows[0]) {
$.extend(Dolphin.emptyObj(item), reData.rows[0]);
if (typeof _this.opts.nameField === 'function') {
name = _this.opts.nameField.call(_this, item)
} else {
name = item[_this.opts.nameField];
}
itemPanel.find('._itemName').attr('title', name).html(name);
itemPanel.removeClass('active');
itemPanel.click();
}
}
});
}
},
findItem: function (id) {
var item, _this = this;
item = traversal(_this.data);
function traversal(data) {
var i, item;
for (i = 0; i < data.length; i++) {
if (data[i][_this.opts.idField] == id) {
return data[i];
} else {
if (data[i][_this.opts.childrenField]) {
item = arguments.callee(data[i][_this.opts.childrenField]);
if (item) {
return item
}
}
}
}
return null;
}
return item;
},
click: function (itemData, thisItem, event) {
var _this = this;
if (!$(thisItem).hasClass('active')) {
$(thisItem).closest('td').nextAll().remove();
$(thisItem).siblings(".active").removeClass('active');
$(thisItem).addClass('active');
//if(itemData.type == "folder" || _this.opts.buttons.length>0){
if (itemData[_this.opts.childrenField]) {
_this.loadData(itemData, itemData[_this.opts.childrenField]);
} else {
_this.load(itemData);
}
//}
}
$(thisItem).closest('table').find('.selected').removeClass('selected');
$(thisItem).addClass('selected');
_this.selectedItem = itemData;
if (typeof _this.opts.click === 'function') {
_this.opts.click.call(thisItem, itemData, event);
}
},
complete: function () {
}
};
thisTool.HORIZONTAL_TREE = HORIZONTAL_TREE;
})(jQuery);
|
lufing/breezee
|
breezee-site/public/dolphin/js/horizontalTree.js
|
JavaScript
|
mit
| 11,781
|
using System;
namespace Installer.Exceptions
{
public class DeleteFileException
: FileIoException
{
public DeleteFileException(string fileName, string sourceFolder, Exception innerException)
: base(string.Format("Could not delete '{0}' from '{1}': {2}",
fileName,
sourceFolder,
innerException.Message), innerException)
{
}
}
}
|
Kittyfisto/Tailviewer
|
src/Installer/Exceptions/DeleteFileException.cs
|
C#
|
mit
| 416
|
using NetDist.Core;
using System;
namespace WpfServerAdmin.ViewModels
{
public class LogEntryViewModel
{
public string Message { get; set; }
public DateTime Timestamp { get; set; }
public string LogLevel { get; set; }
public LogEntryViewModel(LogInfoEntry logEntry)
{
Message = logEntry.Message;
Timestamp = logEntry.Timestamp;
LogLevel = logEntry.Level;
}
}
}
|
yUnoSTAHP/NetDist
|
src/WpfServerAdmin/ViewModels/LogEntryViewModel.cs
|
C#
|
mit
| 461
|
#include "LogFunction.h"
#include <QThread>
#include <QVariant>
#include "../eirBase/Severity.h"
#include "Log.h"
#include "LogItem.h"
QList<QThread *> LogFunction::depth_threadList;
LogFunction::LogFunction(const bool slot,
const QString & file,
const int line,
const QString & fn,
const QVariant & v1,
const QVariant & v2,
const QVariant & v3,
const QVariant & v4)
: fi_s(file)
, ln_i(line)
, fullFn_s(fn)
{
QVariantList vl;
if ( ! v4.isNull())
vl << v1 << v2 << v3 << v4;
else if ( ! v3.isNull())
vl << v1 << v2 << v3;
else if ( ! v2.isNull())
vl << v1 << v2;
else if ( ! v1.isNull())
vl << v1;
ctor(slot, vl);
}
LogFunction::LogFunction(const bool slot,
const QString & file,
const int line,
const QString & fn,
const QVariantList & vl)
: fi_s(file)
, ln_i(line)
, fullFn_s(fn)
{
ctor(slot, vl);
}
void LogFunction::ctor(const bool slot, const QVariantList varList)
{
_et.start();
splitFuncInfo(fullFn_s);
depth_threadList.append(QThread::currentThread());
int depth = depth_threadList.count(QThread::currentThread());
LogItem li;
li.setSeverity(slot ? Severity::Signal : Severity::Enter);
li.setFileName(fi_s);
li.setFileLine(ln_i);
li.setFunction(fullFn_s);
li.setDepth(depth);
li.set("Entering %2::%1()");
QVariantList vl;
vl << fnName_s << clsName_s;
li.set(vl);
LOG(add(li));
int k = 0;
li.setSeverity(Severity::EnterArg);
li.set("%1 = {%2}");
foreach (QVariant var, varList)
{
QVariantList vl;
vl << QString((fnArgs_qsl.size() > k)
? fnArgs_qsl.at(k++)
: "???");
vl << var;
li.set(vl);
LOG(add(li));
}
} // ctor()
LogFunction::LogFunction(const QString & pretty)
: ln_i(0)
, fullFn_s(pretty)
{
splitFuncInfo(pretty);
} // pretty c'tor
LogFunction::~LogFunction()
{
if (ln_i)
{
LogItem li;
li.setSeverity(Severity::Leave);
li.setFileName(fi_s);
li.setFileLine(ln_i);
li.setFunction(fullFn_s);
li.setDepth(depth_threadList.count(QThread::currentThread()));
li.set(qPrintable("Leaving %3::%1() after %2ms"
+ QString(return_var.isNull() ? "" : " = {%4}")));
QVariantList vl;
vl << fnName_s << _et.elapsed() << clsName_s;
if ( ! return_var.isNull()) vl << return_var;
li.set(vl);
LOG(add(li));
depth_threadList.removeOne(QThread::currentThread());
}
} // d'tor
void LogFunction::setReturn(const QVariant & rv)
{
return_var = rv;
}
QString LogFunction::className(void) const
{
return clsName_s;
}
QString LogFunction::functionName(void) const
{
return fnName_s;
}
qint64 LogFunction::msecs(void) const
{
return _et.elapsed();
}
void LogFunction::splitFuncInfo(const QString & fn)
{
int xRightBrack = fn.lastIndexOf(']');
int xLeftBrack = fn.lastIndexOf('[', xRightBrack);
int xRightParen = fn.lastIndexOf(")");
int xLeftParen = fn.lastIndexOf("(", xRightParen);
if (xRightBrack > xLeftBrack)
tplInfo_s = fn.mid(xLeftBrack, xRightBrack-xLeftBrack-1);
postFn_s = fn.mid(xRightParen+1).simplified();
QString args = fn.mid(xLeftParen+1, xRightParen - xLeftParen - 1);
if (args.isEmpty())
fnArgs_qsl.clear();
else
fnArgs_qsl = args.split(", ");
int xPreName = fn.lastIndexOf(" ", xLeftParen);
QStringList names = fn.mid(xPreName+1, xLeftParen - xPreName - 1).split("::");
if (names.size() > 1)
clsName_s = names.at(0), fnName_s = names.at(1);
else
clsName_s.clear(), fnName_s = names.at(0);
preFn_s = fn.left(xPreName);
} // splitFuncInfo()
|
eirTony/INDI1
|
src4/static/INDI2/oldEIRlibs/eirExe/LogFunction.cpp
|
C++
|
mit
| 4,040
|
<?php
/* 商品咨询管理控制器 */
class My_qaApp extends StoreadminbaseApp
{
var $my_qa_mod;
function __construct()
{
$this->My_qaApp();
}
function My_qaApp()
{
parent::__construct();
$this->my_qa_mod = & m('goodsqa');
}
function index()
{
//dump($_SESSION['user_info']);
$type = (isset($_GET['type']) && $_GET['type'] != '') ? trim($_GET['type']) : 'all_qa';
$conditions = ' AND goods_qa.store_id = '.$_SESSION['user_info']['user_id'];
switch ($type)
{
case 'all_qa':
$conditions .= ' ';
break;
case 'to_reply_qa' :
$conditions .= ' AND reply_content = " " ';
break;
case 'replied' :
$conditions .= ' AND reply_content != " " ';
break;
};
$page = $this->_get_page(8);
$my_qa_data = $this->my_qa_mod->find(array(
'fields' => 'ques_id,question_content,reply_content,goods_qa.user_id,goods_qa.email,time_post,time_reply,user_name,goods_qa.item_id,goods_qa.item_name,goods_qa.type',
'join' => 'belongs_to_store,belongs_to_user',
'conditions' => '1=1 '.$conditions,
'count' => true,
'limit' => $page['limit'],
'order' => 'time_post desc',
));
$page['item_count'] = $this->my_qa_mod->getCount();
$this->_format_page($page);
/* 当前位置 */
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member',
LANG::get('my_qa'), 'index.php?app=my_qa',
LANG::get('my_qa_list'));
/* 当前用户中心菜单 */
$this->_curitem('my_qa');
/* 当前所处子菜单 */
$this->_curmenu('my_qa_list');
$this->assign('_curmenu',$type);
$this->import_resource(array(
'script' => array(
array(
'path' => 'dialog/dialog.js',
'attr' => 'id="dialog_js"',
),
array(
'path' => 'jquery.ui/jquery.ui.js',
'attr' => '',
),
),
'style' => 'jquery.ui/themes/ui-lightness/jquery.ui.css',
));
$this->assign('page_info',$page);
$this->assign('my_qa_data',$my_qa_data);
$this->_config_seo('title', Lang::get('member_center') . ' - ' . Lang::get('my_qa'));
$this->display('my_qa.index.html');
}
function reply()
{
if (!IS_POST)
{
$ques_id = (isset($_GET['ques_id']) && $_GET['ques_id'] !='') ? intval($_GET['ques_id']) : 0;
$conditions = ' AND goods_qa.store_id = '. $_SESSION['user_info']['user_id'] . ' AND ques_id = '.$ques_id;
$my_qa_data = $this->my_qa_mod->get(array(
'fields' => 'question_content,reply_content,goods_qa.user_id,goods_qa.email,time_post,user_name,goods_qa.item_id,goods_qa.item_name,goods_qa.type',
'join' => 'belongs_to_store,belongs_to_user',
'conditions' => '1=1 '.$conditions,
));
if ($my_qa_data['reply_content'] != '')
{
echo Lang::get('already_replied');
return;
}
/* 当前位置 */
$this->_curlocal(LANG::get('member_center'), 'index.php?app=member',
LANG::get('my_qa'), 'index.php?app=my_qa',
LANG::get('reply'));
/* 当前用户中心菜单 */
$this->_curitem('my_qa');
/* 当前所处子菜单 */
$this->_curmenu('reply');
$this->assign('_curmenu','reply');
$this->assign('page_info',$page);
$this->assign('my_qa_data',$my_qa_data);
$this->_config_seo('title', Lang::get('member_center') . ' - ' . Lang::get('reply'));
header('Content-Type:text/html;charset=' . CHARSET);
$this->display('my_qa.form.html');
}
else
{
$act = (isset($_POST['act']) && $_POST['act'] != '') ? trim($_POST['act']) : '';
$ques_id = (isset($_POST['ques_id']) && $_POST['ques_id'] != '') ? intval($_POST['ques_id']) : '';
$content = (isset($_POST['content']) && $_POST['content'] != '') ? trim($_POST['content']) : '';
if ($act != 'reply' || $ques_id =='')
{
$this->pop_warning('Hacking Attempt');
return;
}
if ($content == '')
{
$this->pop_warning('content_not_null');
return;
}
$user_info = $this->my_qa_mod->get(array(
//'join' => 'belongs_to_goods',
'conditions' => '1 = 1 AND ques_id = '.$ques_id,
'fields' => 'user_id,email,item_id,item_name,type'));
extract($user_info);
$data = array(
'reply_content' => $content,
'time_reply' => gmtime(),
'if_new' => '1',
);
if ($this->my_qa_mod->edit($ques_id,$data))
{
$url = '';
switch ($type)
{
case 'goods' : $url = SITE_URL . "/index.php?app={$type}&act=qa&id={$item_id}&ques_id={$ques_id}&new=yes";
break;
case 'groupbuy' : $url = SITE_URL . "/index.php?app={$type}&id={$item_id}&ques_id={$ques_id}&new=yes";
break;
}
$mail = get_mail('tobuyer_question_replied', array(
'item_name' => $item_name,
'type' => Lang::get($type),
'url' => $url
));
$this->_mailto($email, addslashes($mail['subject']), addslashes($mail['message']));
$this->pop_warning('ok', 'my_qa_reply');
}
else
{
$this->pop_warning('reply_failed');
return;
}
}
}
function edit_reply()
{
$ques_id = (isset($_GET['ques_id']) && $_GET['ques_id'] !='') ? intval($_GET['ques_id']) : 0;
if (empty($ques_id))
{
echo Lang::get('no_data');
}
if (!IS_POST)
{
$conditions = ' AND goods_qa.store_id = '. $_SESSION['user_info']['user_id'] . ' AND ques_id = '.$ques_id;
$my_qa_data = $this->my_qa_mod->get(array(
'fields' => 'question_content,reply_content,goods_qa.user_id,goods_qa.email,time_post,user_name,goods_qa.item_id,goods_qa.item_name,goods_qa.type',
'join' => 'belongs_to_store,belongs_to_user',
'conditions' => '1=1 '.$conditions,
));
$this->assign('ques_id', $ques_id);
$this->assign('my_qa_data',$my_qa_data);
header('Content-Type:text/html;charset=' . CHARSET);
$this->display('my_qa.form.html');
}
else
{
$act = (isset($_POST['act']) && $_POST['act'] != '') ? trim($_POST['act']) : '';
$ques_id = (isset($_POST['ques_id']) && $_POST['ques_id'] != '') ? intval($_POST['ques_id']) : '';
$content = (isset($_POST['content']) && $_POST['content'] != '') ? trim($_POST['content']) : '';
if (empty($content))
{
$this->pop_warning('content_not_null');
return;
}
$user_info = $this->my_qa_mod->get(array(
'conditions' => '1 = 1 AND ques_id = '.$ques_id,
'fields' => 'user_id,email,item_id,item_name,type'));
extract($user_info);
$data = array(
'reply_content' => $content,
'time_reply' => gmtime(),
'if_new' => '1',
);
if ($this->my_qa_mod->edit($ques_id,$data))
{
$this->pop_warning('ok', 'my_qa_edit_reply');
$mail = get_mail('tobuyer_question_replied', array('id' => $goods_id, 'ques_id' => $ques_id, 'goods_name' => $goods_name));
$this->_mailto($email, addslashes($mail['subject']), addslashes($mail['message']));
}
else
{
$this->pop_warning('reply_failed');
return;
}
}
}
//删除咨询
function drop()
{
$id = (isset($_GET['id']) && $_GET['id'] != '') ? trim($_GET['id']) : '';
if (!$id)
{
$this->show_warning('no_qa_to_drop');
return;
}
$ids = explode(',', $id);
if (!$this->my_qa_mod->drop($ids))
{
$this->show_warning('drop_failed');
return;
}
$this->show_message('drop_successful');
}
//三级菜单:
function _get_member_submenu()
{
$array = array(
array(
'name' => 'all_qa',
'url' => 'index.php?app=my_qa&type=all_qa',
),
array(
'name' => 'to_reply_qa',
'url' => 'index.php?app=my_qa&type=to_reply_qa',
),
array(
'name' => 'replied',
'url' => 'index.php?app=my_qa&type=replied',
),
/* array(
'name' => 'reply',
'url' => 'index.php?app=my_qa&type=reply',
),*/
);
if (ACT == 'index')
{
unset($array[3]);
}
return $array;
}
}
?>
|
kitboy/docker-shop
|
html/ecmall/upload/app/my_qa.app.php
|
PHP
|
mit
| 10,019
|
/*!
* mifmi-commons4j
* https://github.com/mifmi/mifmi-commons4j
*
* Copyright (c) 2016 mifmi.org and other contributors
* Released under the MIT license
* https://opensource.org/licenses/MIT
*/
package org.mifmi.commons4j.swing;
import java.awt.Component;
import java.awt.Container;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Insets;
import java.awt.image.ImageObserver;
import java.net.URL;
import javax.swing.ImageIcon;
public class AdjustableImageIcon extends ImageIcon {
private static final long serialVersionUID = 1L;
public enum Mode {
Fit,
Fill,
None
}
private Mode mode = Mode.Fit;
public AdjustableImageIcon() {
}
public AdjustableImageIcon(String filename) {
super(filename);
}
public AdjustableImageIcon(URL location) {
super(location);
}
public AdjustableImageIcon(Image image) {
super(image);
}
public AdjustableImageIcon(byte[] imageData) {
super(imageData);
}
public AdjustableImageIcon(String filename, String description) {
super(filename, description);
}
public AdjustableImageIcon(URL location, String description) {
super(location, description);
}
public AdjustableImageIcon(Image image, String description) {
super(image, description);
}
public AdjustableImageIcon(byte[] imageData, String description) {
super(imageData, description);
}
public Mode getMode() {
return mode;
}
public AdjustableImageIcon setMode(Mode mode) {
this.mode = mode;
return this;
}
@Override
public synchronized void paintIcon(Component c, Graphics g, int x, int y) {
if (mode == Mode.None) {
super.paintIcon(c, g, x, y);
return;
}
Image image = getImage();
if (image == null) {
return;
}
Insets insets = ((Container)c).getInsets();
int dx = insets.left;
int dy = insets.top;
int dw = c.getWidth() - dx - insets.right;
int dh = c.getHeight() - dy - insets.bottom;
int iw = image.getWidth(c);
int ih = image.getHeight(c);
if (mode == Mode.Fit) {
if (iw * dh < ih * dw) {
iw = (dh * iw) / ih;
dx += (dw - iw) / 2;
dw = iw;
} else {
ih = (dw * ih) / iw;
dy += (dh - ih) / 2;
dh = ih;
}
}
ImageObserver io = getImageObserver();
g.drawImage(image, dx, dy, dw, dh, (io == null) ? c : io);
}
}
|
mifmi/mifmi-commons-java
|
src/main/java/org/mifmi/commons4j/swing/AdjustableImageIcon.java
|
Java
|
mit
| 2,282
|
<?php
/*
* This file is part of the PHPExifTool package.
*
* (c) Alchemy <support@alchemy.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\Nikon;
use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;
/**
* @ExclusionPolicy("all")
*/
class ExposureProgram extends AbstractTag
{
protected $Id = 17860642;
protected $Name = 'ExposureProgram';
protected $FullName = 'Nikon::NCTG';
protected $GroupName = 'Nikon';
protected $g0 = 'MakerNotes';
protected $g1 = 'Nikon';
protected $g2 = 'Camera';
protected $Type = '?';
protected $Writable = false;
protected $Description = 'Exposure Program';
protected $flag_Permanent = true;
protected $Values = array(
0 => array(
'Id' => 0,
'Label' => 'Not Defined',
),
1 => array(
'Id' => 1,
'Label' => 'Manual',
),
2 => array(
'Id' => 2,
'Label' => 'Program AE',
),
3 => array(
'Id' => 3,
'Label' => 'Aperture-priority AE',
),
4 => array(
'Id' => 4,
'Label' => 'Shutter speed priority AE',
),
5 => array(
'Id' => 5,
'Label' => 'Creative (Slow speed)',
),
6 => array(
'Id' => 6,
'Label' => 'Action (High speed)',
),
7 => array(
'Id' => 7,
'Label' => 'Portrait',
),
8 => array(
'Id' => 8,
'Label' => 'Landscape',
),
);
}
|
bburnichon/PHPExiftool
|
lib/PHPExiftool/Driver/Tag/Nikon/ExposureProgram.php
|
PHP
|
mit
| 1,736
|
# Acknowledgements
This application makes use of the following third party libraries:
## OpenShop
Copyright (c) 2016 Jakub Długosz <dlugosz.jakub@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Generated by CocoaPods - https://cocoapods.org
|
SMTOpenSource/OpenShop
|
Example/Pods/Target Support Files/Pods-OpenShop_TV_Example/Pods-OpenShop_TV_Example-acknowledgements.markdown
|
Markdown
|
mit
| 1,232
|
<?php
/*
* This file is part of the PHPExifTool package.
*
* (c) Alchemy <support@alchemy.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\Qualcomm;
use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;
/**
* @ExclusionPolicy("all")
*/
class AFNearEnd extends AbstractTag
{
protected $Id = 'af_near_end';
protected $Name = 'AFNearEnd';
protected $FullName = 'Qualcomm::Main';
protected $GroupName = 'Qualcomm';
protected $g0 = 'MakerNotes';
protected $g1 = 'Qualcomm';
protected $g2 = 'Camera';
protected $Type = '?';
protected $Writable = false;
protected $Description = 'AF Near End';
protected $flag_Permanent = true;
}
|
bburnichon/PHPExiftool
|
lib/PHPExiftool/Driver/Tag/Qualcomm/AFNearEnd.php
|
PHP
|
mit
| 839
|
<?php
/*
* This file is part of the PHPExifTool package.
*
* (c) Alchemy <support@alchemy.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\CanonRaw;
use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;
/**
* @ExclusionPolicy("all")
*/
class CompressedDataLength extends AbstractTag
{
protected $Id = 3;
protected $Name = 'CompressedDataLength';
protected $FullName = 'CanonRaw::DecoderTable';
protected $GroupName = 'CanonRaw';
protected $g0 = 'MakerNotes';
protected $g1 = 'CanonRaw';
protected $g2 = 'Camera';
protected $Type = 'int32u';
protected $Writable = false;
protected $Description = 'Compressed Data Length';
protected $flag_Permanent = true;
}
|
bburnichon/PHPExiftool
|
lib/PHPExiftool/Driver/Tag/CanonRaw/CompressedDataLength.php
|
PHP
|
mit
| 873
|
#!/bin/sh
WORK_DIR=/tmp
BIN_DIR=/usr/local/bin
arch() {
ARCH=$(uname -m)
case $ARCH in
x86_64) ARCH=amd64;;
esac
}
os() {
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
}
download() {
LATEST_RELEASE_JSON="https://api.github.com/repos/malfunkt/hyperfox/releases/latest"
DOWNLOAD_URL=$(curl --silent -L $LATEST_RELEASE_JSON | grep browser_download_url | sed s/'^.*: "'//g | sed s/'"$'//g | grep "$OS.*$ARCH")
echo "Downloading ${DOWNLOAD_URL}..."
if [ -z "$DOWNLOAD_URL" ]; then
curl --silent -L $LATEST_RELEASE_JSON;
echo "Github API is not working right now. Please try again later.";
exit 1
fi;
BASENAME=$(basename $DOWNLOAD_URL)
wget $DOWNLOAD_URL -O $WORK_DIR/$BASENAME
case $BASENAME in
*.bz2)
bzip2 -d $WORK_DIR/$BASENAME
FILENAME=$WORK_DIR/hyperfox_${OS}_${ARCH}
;;
*.gz)
gzip -dfv $WORK_DIR/$BASENAME
FILENAME=$WORK_DIR/hyperfox_${OS}_${ARCH}
;;
*.zip)
unzip -d $WORK_DIR -o $WORK_DIR/$BASENAME
FILENAME=$WORK_DIR/hyperfox_${OS}_${ARCH}.exe
;;
*)
echo "Don't know how to handle downloaded file $BASENAME" && exit 1
;;
esac
if [ -z "$FILENAME" ]; then
echo "Could not install." && exit 1
fi;
echo "Installing to $BIN_DIR... (it might require sudo password)"
sudo install -v -c -m 0755 $FILENAME $BIN_DIR/hyperfox || echo "This script needs root privileges in order to install into $BIN_DIR."
rm $FILENAME
}
arch
os
download
|
malfunkt/hyperfox
|
install.sh
|
Shell
|
mit
| 1,476
|
using Entitas;
public interface IEnemyWeaponAction {
void Execute(Entity entity, EnemyModel component);
}
|
kicholen/GamePrototype
|
Assets/EditorScript/View/Enemy/Executor/Weapon/IEnemyWeaponAction.cs
|
C#
|
mit
| 119
|
/**
* Visual Blocks Language
*
* Copyright 2012 Google Inc.
* http://blockly.googlecode.com/
*
* Licensed under the Apache License, Version 2.0 (the "License")';
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Simplified Chinese strings.
* @author weihuali0509@gmail.com (Weihua Li)
* @author helen.nie94@gmail.com (Helen Nie)
* @author moyehan@gmail.com (Morton Mok)
* @author roadlabs@gmail.com (roadlabs)
* @author jcjzhl@gmail.com (Congjun Jin)
*/
'use strict';
goog.provide('Blockly.Msg.zh_tw');
/**
* Due to the frequency of long strings, the 80-column wrap rule need not apply
* to message files.
*/
Blockly.Msg.zh_tw.switch_language_to_chinese_tw = {
// Switch language to Simplified Chinese.
category: '',
helpUrl: '',
init: function() {
// Context menus.
Blockly.Msg.DUPLICATE_BLOCK = '復制代碼塊';
Blockly.Msg.REMOVE_COMMENT = '刪除註釋';
Blockly.Msg.ADD_COMMENT = '添加註釋';
Blockly.Msg.EXTERNAL_INPUTS = '外掛輸入項';
Blockly.Msg.INLINE_INPUTS = '內嵌輸入項';
Blockly.Msg.HORIZONTAL_PARAMETERS = '橫向排列參數項';
Blockly.Msg.VERTICAL_PARAMETERS = '縱向排列參數項';
Blockly.Msg.DELETE_BLOCK = '刪除代碼塊';
Blockly.Msg.DELETE_X_BLOCKS = '刪除 %1 個代碼塊';
Blockly.Msg.COLLAPSE_BLOCK = '折疊代碼塊';
Blockly.Msg.EXPAND_BLOCK = '展開代碼塊';
Blockly.Msg.DISABLE_BLOCK = '禁用代碼塊';
Blockly.Msg.ENABLE_BLOCK = '啟用代碼塊';
Blockly.Msg.HELP = '幫助';
Blockly.Msg.COLLAPSE_ALL = '折疊所有塊';
Blockly.Msg.EXPAND_ALL = '展開所有塊';
Blockly.Msg.ARRANGE_H = '橫向排列所有塊';
Blockly.Msg.ARRANGE_V = '縱向排列所有塊';
Blockly.Msg.ARRANGE_S = '斜向排列所有塊';
Blockly.Msg.SORT_W = '按寬度對所有塊排序';
Blockly.Msg.SORT_H = '按高度對所有塊排序';
Blockly.Msg.SORT_C = '按類別對所有塊排序';
Blockly.Msg.YAIL_OPTION = '生成Yail代碼';
Blockly.Msg.DOIT_OPTION = '執行該代碼塊';
// Variable renaming.
Blockly.MSG_CHANGE_VALUE_TITLE = '修改數值:';
Blockly.MSG_NEW_VARIABLE = '新建變量...';
Blockly.MSG_NEW_VARIABLE_TITLE = '新建變量名稱:';
Blockly.MSG_RENAME_VARIABLE = '變量重命名...';
Blockly.MSG_RENAME_VARIABLE_TITLE = '將所有 "%1" 變量重命名為:';
// Toolbox.
Blockly.MSG_VARIABLE_CATEGORY = '變量';
Blockly.MSG_PROCEDURE_CATEGORY = '過程';
// Warnings/Errors
Blockly.ERROR_BLOCK_CANNOT_BE_IN_DEFINTION = '該代碼塊不能被定義';
Blockly.ERROR_SELECT_VALID_ITEM_FROM_DROPDOWN = '請從下拉列表中選擇合適項';
Blockly.ERROR_DUPLICATE_EVENT_HANDLER = '重復的組件事件處理器';
Blockly.ERROR_CAN_NOT_DO_IT_TITLE = '無法執行該代碼塊';
Blockly.ERROR_CAN_NOT_DO_IT_CONTENT = '只有連接助手或模擬器程序,才能執行';
// Colour Blocks.
Blockly.Msg.LANG_COLOUR_PICKER_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/colors#basic';
Blockly.Msg.LANG_COLOUR_PICKER_TOOLTIP = '點擊方塊選取所需顏色';
Blockly.Msg.LANG_COLOUR_BLACK = '黑色';
Blockly.Msg.LANG_COLOUR_WHITE = '白色';
Blockly.Msg.LANG_COLOUR_RED = '紅色';
Blockly.Msg.LANG_COLOUR_PINK = '粉色';
Blockly.Msg.LANG_COLOUR_ORANGE = '橙色';
Blockly.Msg.LANG_COLOUR_YELLOW = '黃色';
Blockly.Msg.LANG_COLOUR_GREEN = '綠色';
Blockly.Msg.LANG_COLOUR_CYAN = '青色';
Blockly.Msg.LANG_COLOUR_BLUE = '藍色';
Blockly.Msg.LANG_COLOUR_MAGENTA = '品紅';
Blockly.Msg.LANG_COLOUR_LIGHT_GRAY = '淺灰';
Blockly.Msg.LANG_COLOUR_DARK_GRAY = '深灰';
Blockly.Msg.LANG_COLOUR_GRAY = '灰色';
Blockly.Msg.LANG_COLOUR_SPLIT_COLOUR = '分解色值';
Blockly.Msg.LANG_COLOUR_SPLIT_COLOUR_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/colors#split';
Blockly.Msg.LANG_COLOUR_SPLIT_COLOUR_TOOLTIP = '返回含紅、綠、藍色值以及透明度值(0-255)的列表';
Blockly.Msg.LANG_COLOUR_MAKE_COLOUR = '合成顏色';
Blockly.Msg.LANG_COLOUR_MAKE_COLOUR_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/colors#make';
Blockly.Msg.LANG_COLOUR_MAKE_COLOUR_TOOLTIP = '返回由指定紅、綠、藍色值以及透明度值合成的顏色。';
// Control Blocks
Blockly.Msg.LANG_CATEGORY_CONTROLS = '控制';
Blockly.Msg.LANG_CONTROLS_IF_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#if';
Blockly.Msg.LANG_CONTROLS_IF_TOOLTIP_1 = '如果值為真,則執行相關語句塊';
Blockly.Msg.LANG_CONTROLS_IF_TOOLTIP_2 = '如果值為真,則執行第壹個語句塊\n' +
'否則, 執行第二個語句塊';
Blockly.Msg.LANG_CONTROLS_IF_TOOLTIP_3 = '如果第壹個值為真,則執行第壹個語句塊,\n' +
'否則,如果第二個值為真,則執行第二個語句塊';
Blockly.Msg.LANG_CONTROLS_IF_TOOLTIP_4 = '如果第壹個值為真,則執行第壹個語句塊,\n' +
'否則,如果第二個值為真,則執行第二個語句塊,\n' +
'如果值皆不為真,則執行最後壹個語句塊';
Blockly.Msg.LANG_CONTROLS_IF_MSG_IF = '如果';
Blockly.Msg.LANG_CONTROLS_IF_MSG_ELSEIF = '否則,如果';
Blockly.Msg.LANG_CONTROLS_IF_MSG_ELSE = '否則';
Blockly.Msg.LANG_CONTROLS_IF_MSG_THEN = '則';
Blockly.Msg.LANG_CONTROLS_IF_IF_TITLE_IF = '如果';
Blockly.Msg.LANG_CONTROLS_IF_IF_TOOLTIP = '添加、移除或重排相關元素,\n' +
'重新設置該“如果”語句塊功能';
Blockly.Msg.LANG_CONTROLS_IF_ELSEIF_TITLE_ELSEIF = '否則,如果';
Blockly.Msg.LANG_CONTROLS_IF_ELSEIF_TOOLTIP = '為“如果”語句塊增設條件';
Blockly.Msg.LANG_CONTROLS_IF_ELSE_TITLE_ELSE = '否則';
Blockly.Msg.LANG_CONTROLS_IF_ELSE_TOOLTIP = '設最終條件,當所有條件均不滿足時執行';
Blockly.Msg.LANG_CONTROLS_WHILEUNTIL_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#while';
Blockly.Msg.LANG_CONTROLS_WHILEUNTIL_TITLE_REPEAT = '重復';
Blockly.Msg.LANG_CONTROLS_WHILEUNTIL_INPUT_DO = '執行';
Blockly.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_WHILE = '只要';
Blockly.Msg.LANG_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = '直到';
Blockly.Msg.LANG_CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = '只要值為真,就重復執行相關語句';
Blockly.Msg.LANG_CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = '只要值為假,就重復執行相關語句';
Blockly.Msg.LANG_CONTROLS_WHILEUNTIL_TOOLTIP_1 = '只要條件為真,就執行”執行“區域所包含的語句塊';
Blockly.Msg.LANG_CONTROLS_FOR_HELPURL = '';
Blockly.Msg.LANG_CONTROLS_FOR_INPUT_WITH = '循環取數到';
Blockly.Msg.LANG_CONTROLS_FOR_INPUT_VAR = 'x';
Blockly.Msg.LANG_CONTROLS_FOR_INPUT_FROM = '範圍從';
Blockly.Msg.LANG_CONTROLS_FOR_INPUT_TO = '到';
Blockly.Msg.LANG_CONTROLS_FOR_INPUT_DO = '執行';
Blockly.Msg.LANG_CONTROLS_FOR_TOOLTIP = '從壹個數字開始取數,到另壹個數結束。\n' +
'每取壹個數,都將其值賦給\n' +
'變量 "%1",並執行語句塊。';
Blockly.Msg.LANG_CONTROLS_FORRANGE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#forrange';
Blockly.Msg.LANG_CONTROLS_FORRANGE_INPUT_ITEM = '循環取';
Blockly.Msg.LANG_CONTROLS_FORRANGE_INPUT_VAR = '數字';
Blockly.Msg.LANG_CONTROLS_FORRANGE_INPUT_START = '範圍從';
Blockly.Msg.LANG_CONTROLS_FORRANGE_INPUT_END = '到';
Blockly.Msg.LANG_CONTROLS_FORRANGE_INPUT_STEP = '間隔為';
Blockly.Msg.LANG_CONTROLS_FORRANGE_INPUT_DO = '執行';
Blockly.Msg.LANG_CONTROLS_FORRANGE_INPUT_COLLAPSED_TEXT = '對壹定範圍內的數字';
Blockly.Msg.LANG_CONTROLS_FORRANGE_INPUT_COLLAPSED_PREFIX = '對於 ';
Blockly.Msg.LANG_CONTROLS_FORRANGE_INPUT_COLLAPSED_SUFFIX = ' 範圍內的';
Blockly.Msg.LANG_CONTROLS_FORRANGE_TOOLTIP = '按指定範圍和增量循環取值,每次循環均將數值賦予指定變量,並運行“執行”區域所包含的代碼塊';
Blockly.Msg.LANG_CONTROLS_FOREACH_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#foreach';
Blockly.Msg.LANG_CONTROLS_FOREACH_INPUT_ITEM = '循環取';
Blockly.Msg.LANG_CONTROLS_FOREACH_INPUT_VAR = '列表項';
Blockly.Msg.LANG_CONTROLS_FOREACH_INPUT_INLIST = '列表為';
Blockly.Msg.LANG_CONTROLS_FOREACH_INPUT_DO = '執行';
Blockly.Msg.LANG_CONTROLS_FOREACH_INPUT_COLLAPSED_TEXT = '對列表中每壹項';
Blockly.Msg.LANG_CONTROLS_FOREACH_INPUT_COLLAPSED_PREFIX = '對於 ';
Blockly.Msg.LANG_CONTROLS_FOREACH_INPUT_COLLAPSED_SUFFIX = ' 列表中的';
Blockly.Msg.LANG_CONTROLS_FOREACH_TOOLTIP = '針對列表中的每壹項運行“執行”區域所包含的代碼塊,'
+ ' 采用指定變量名引用當前列表項。';
Blockly.Msg.LANG_CONTROLS_GET_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#get';
Blockly.Msg.LANG_CONTROLS_FLOW_STATEMENTS_HELPURL = 'http://en.wikipedia.org/wiki/Control_flow';
Blockly.Msg.LANG_CONTROLS_FLOW_STATEMENTS_INPUT_OFLOOP = '循環';
Blockly.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = '中斷';
Blockly.Msg.LANG_CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = '執行下壹個周期';
Blockly.Msg.LANG_CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = '中斷內部循環';
Blockly.Msg.LANG_CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = '跳轉到本循環的其余部分,並且\n' +
'執行下壹個周期';
Blockly.Msg.LANG_CONTROLS_FLOW_STATEMENTS_WARNING = '警告:\n' +
'本代碼塊只能用於\n' +
'循環語句塊';
Blockly.Msg.LANG_CONTROLS_WHILE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#while';
Blockly.Msg.LANG_CONTROLS_WHILE_TITLE = '當';
Blockly.Msg.LANG_CONTROLS_WHILE_INPUT_TEST = '滿足條件';
Blockly.Msg.LANG_CONTROLS_WHILE_INPUT_DO = '執行';
Blockly.Msg.LANG_CONTROLS_WHILE_COLLAPSED_TEXT = '滿足條件';
Blockly.Msg.LANG_CONTROLS_WHILE_TOOLTIP = '“執行”區域中代碼塊被執行的前提是,滿足條件的表達式值為'
+ '真。';
Blockly.Msg.LANG_CONTROLS_CHOOSE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#choose';
Blockly.Msg.LANG_CONTROLS_CHOOSE_TITLE = '如果'
Blockly.Msg.LANG_CONTROLS_CHOOSE_INPUT_TEST = '';
Blockly.Msg.LANG_CONTROLS_CHOOSE_INPUT_THEN_RETURN = '則';
Blockly.Msg.LANG_CONTROLS_CHOOSE_INPUT_ELSE_RETURN = '否則';
Blockly.Msg.LANG_CONTROLS_CHOOSE_COLLAPSED_TEXT = '如果';
Blockly.Msg.LANG_CONTROLS_CHOOSE_TOOLTIP = '如果條件表達式的檢測值為真,' +
'則將關聯的求值表達式運算結果傳遞給“則-返回”語句槽;' +
'否則將關聯的求值表達式運算結果傳遞給“否則-返回”語句槽;' +
'壹般只有壹個返回槽表達式能被求值。';
Blockly.Msg.LANG_CONTROLS_DO_THEN_RETURN_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#doreturn';
Blockly.Msg.LANG_CONTROLS_DO_THEN_RETURN_INPUT_DO = '執行模塊';
Blockly.Msg.LANG_CONTROLS_DO_THEN_RETURN_INPUT_RETURN = '返回結果';
Blockly.Msg.LANG_CONTROLS_DO_THEN_RETURN_TOOLTIP = '運行“執行”區域中的代碼塊並返回壹條語句,用於在賦值前插入執行某個過程。';
Blockly.Msg.LANG_CONTROLS_DO_THEN_RETURN_COLLAPSED_TEXT = '執行語句/返回結果';
Blockly.Msg.LANG_CONTROLS_DO_THEN_RETURN_TITLE = '執行並返回';
Blockly.Msg.LANG_CONTROLS_EVAL_BUT_IGNORE_TITLE = '求值但忽視結果'
Blockly.Msg.LANG_CONTROLS_EVAL_BUT_IGNORE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#evaluate';
Blockly.Msg.LANG_CONTROLS_EVAL_BUT_COLLAPSED_TEXT = '求值但不返回';
Blockly.Msg.LANG_CONTROLS_EVAL_BUT_IGNORE_TOOLTIP = '運行所連接的代碼塊但不返回運算值,用於調用求值過程但不需要其運算值。';
/* [林恩 13/10/14] 現在刪除。可能回來的某壹天。
Blockly.Msg.LANG_CONTROLS_NOTHING_TITLE = '什麽';
Blockly.Msg.LANG_CONTROLS_NOTHING_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#nothing';
Blockly.Msg.LANG_CONTROLS_NOTHING_TOOLTIP = ' 返回 nothing。用來初始化變量或可以插入到返回的插槽中,如果沒有價值需要返回。這是相當於為空或沒有.';
*/
Blockly.Msg.LANG_CONTROLS_OPEN_ANOTHER_SCREEN_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#openscreen';
Blockly.Msg.LANG_CONTROLS_OPEN_ANOTHER_SCREEN_TITLE = '打開屏幕';
Blockly.Msg.LANG_CONTROLS_OPEN_ANOTHER_SCREEN_INPUT_SCREENNAME = '屏幕名稱';
Blockly.Msg.LANG_CONTROLS_OPEN_ANOTHER_SCREEN_COLLAPSED_TEXT = '打開屏幕';
Blockly.Msg.LANG_CONTROLS_OPEN_ANOTHER_SCREEN_TOOLTIP = '在多屏應用中打開壹個新屏幕。';
Blockly.Msg.LANG_CONTROLS_OPEN_ANOTHER_SCREEN_WITH_START_VALUE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#openscreenwithvalue';
Blockly.Msg.LANG_CONTROLS_OPEN_ANOTHER_SCREEN_WITH_START_VALUE_TITLE = '打開屏幕並傳值';
Blockly.Msg.LANG_CONTROLS_OPEN_ANOTHER_SCREEN_WITH_START_VALUE_INPUT_SCREENNAME = '屏幕名稱';
Blockly.Msg.LANG_CONTROLS_OPEN_ANOTHER_SCREEN_WITH_START_VALUE_INPUT_STARTVALUE = '初始值';
Blockly.Msg.LANG_CONTROLS_OPEN_ANOTHER_SCREEN_WITH_START_VALUE_COLLAPSED_TEXT = '打開屏幕並傳值'
Blockly.Msg.LANG_CONTROLS_OPEN_ANOTHER_SCREEN_WITH_START_VALUE_TOOLTIP = '在多屏應用中開啟壹個新屏幕,並'
+ '向其傳入初始值';
Blockly.Msg.LANG_CONTROLS_GET_START_VALUE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#getstartvalue';
Blockly.Msg.LANG_CONTROLS_GET_START_VALUE_TITLE = '獲取初始值';
Blockly.Msg.LANG_CONTROLS_GET_START_VALUE_INPUT_SCREENNAME = '屏幕名稱';
Blockly.Msg.LANG_CONTROLS_GET_START_VALUE_INPUT_STARTVALUE = '初始值';
Blockly.Msg.LANG_CONTROLS_GET_START_VALUE_COLLAPSED_TEXT = '獲取初始值';
Blockly.Msg.LANG_CONTROLS_GET_START_VALUE_TOOLTIP = '屏幕開啟時返回其傳入值,'
+ '在多屏應用中開啟動作壹般由其他屏幕引發。如沒有內容傳入,'
+ '則返回空文本。';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#closescreen';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_TITLE = '關閉屏幕 ';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_COLLAPSED_TEXT = '關閉屏幕 ';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_TOOLTIP = '關閉當前屏幕';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_WITH_VALUE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#closescreenwithvalue';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_WITH_VALUE_TITLE = '關閉屏幕並返回值';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_WITH_VALUE_INPUT_RESULT = '返回值';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_WITH_VALUE_COLLAPSED_TEXT = '關閉屏幕返回值';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_WITH_VALUE_TOOLTIP = ' 關閉當前屏幕並向打開此屏幕者返回結果';
Blockly.Msg.LANG_CONTROLS_CLOSE_APPLICATION_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#closeapp';
Blockly.Msg.LANG_CONTROLS_CLOSE_APPLICATION_TITLE = '退出程序';
Blockly.Msg.LANG_CONTROLS_CLOSE_APPLICATION_COLLAPSED_TEXT = '退出程序';
Blockly.Msg.LANG_CONTROLS_CLOSE_APPLICATION_TOOLTIP = '關閉所有屏幕並終止程序運行';
Blockly.Msg.LANG_CONTROLS_GET_PLAIN_START_TEXT_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#getplainstarttext';
Blockly.Msg.LANG_CONTROLS_GET_PLAIN_START_TEXT_TITLE = '獲取初始文本值';
Blockly.Msg.LANG_CONTROLS_GET_PLAIN_START_TEXT_COLLAPSED_TEXT = '獲取初始文本值';
Blockly.Msg.LANG_CONTROLS_GET_PLAIN_START_TEXT_TOOLTIP = ' 當屏幕被其他應用啟動時返回所傳入的文本值,'
+ '如沒有內容傳入,則返回空文本值。'
+ '對於多屏應用,壹般更多采用獲取初始值的方式,而非獲取純文本值。';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_WITH_PLAIN_TEXT_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/control#closescreenwithplaintext';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_WITH_PLAIN_TEXT_TITLE = '關閉屏幕並返回文本';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_WITH_PLAIN_TEXT_INPUT_TEXT = '文本值';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_WITH_PLAIN_TEXT_COLLAPSED_TEXT = '關閉屏幕返回文本';
Blockly.Msg.LANG_CONTROLS_CLOSE_SCREEN_WITH_PLAIN_TEXT_TOOLTIP = '關閉當前屏幕,並向打開此屏幕的應用返回文本。'
+ '對於多屏應用,則多采用關閉屏幕返回值的方式,'
+ '而不采用關閉屏幕返回文本。';
// Logic Blocks.
Blockly.Msg.LANG_CATEGORY_LOGIC = '邏輯';
Blockly.Msg.LANG_LOGIC_COMPARE_HELPURL = 'http://en.wikipedia.org/wiki/Inequality _(mathematics)';
Blockly.Msg.LANG_LOGIC_COMPARE_HELPURL_EQ = 'http://appinventor.mit.edu/explore/ai2/support/blocks/logic#=';
Blockly.Msg.LANG_LOGIC_COMPARE_HELPURL_NEQ = 'http://appinventor.mit.edu/explore/ai2/support/blocks/logic#not=';
Blockly.Msg.LANG_LOGIC_COMPARE_TOOLTIP_EQ = '判斷二對象是否相等,\n' +
'對象可為任意類型,不限於數字。';
Blockly.Msg.LANG_LOGIC_COMPARE_TOOLTIP_NEQ = '判斷二對象是否互不相等,對象可為任意類型,不限於數字。';
Blockly.Msg.LANG_LOGIC_COMPARE_TRANSLATED_NAME = '比較';
Blockly.Msg.LANG_LOGIC_COMPARE_EQ = '等於';
Blockly.Msg.LANG_LOGIC_COMPARE_NEQ = '不等於';
Blockly.Msg.LANG_LOGIC_OPERATION_HELPURL_AND = 'http://appinventor.mit.edu/explore/ai2/support/blocks/logic#and';
Blockly.Msg.LANG_LOGIC_OPERATION_HELPURL_OR = 'http://appinventor.mit.edu/explore/ai2/support/blocks/logic#or';
Blockly.Msg.LANG_LOGIC_OPERATION_AND = '並且';
Blockly.Msg.LANG_LOGIC_OPERATION_OR = '或者';
Blockly.Msg.LANG_LOGIC_OPERATION_TOOLTIP_AND = '如所有輸入項皆為真則返回真值。';
Blockly.Msg.LANG_LOGIC_OPERATION_TOOLTIP_OR = '只要有輸入項為真則返回真值。';
Blockly.Msg.LANG_LOGIC_NEGATE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/logic#not';
Blockly.Msg.LANG_LOGIC_NEGATE_INPUT_NOT = '否定';
Blockly.Msg.LANG_LOGIC_NEGATE_TOOLTIP = '如輸入項為假則返回真值,\n' +
'如輸入項為真則返回假值。';
Blockly.Msg.LANG_LOGIC_BOOLEAN_TRUE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/logic#true';
Blockly.Msg.LANG_LOGIC_BOOLEAN_FALSE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/logic#false';
Blockly.Msg.LANG_LOGIC_BOOLEAN_TRUE = 'true';
Blockly.Msg.LANG_LOGIC_BOOLEAN_FALSE = 'false';
Blockly.Msg.LANG_LOGIC_BOOLEAN_TOOLTIP_TRUE = '返回true值';
Blockly.Msg.LANG_LOGIC_BOOLEAN_TOOLTIP_FALSE = '返回false值';
// Math Blocks.
Blockly.Msg.LANG_CATEGORY_MATH = '數學';
Blockly.Msg.LANG_MATH_NUMBER_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#number';
Blockly.Msg.LANG_MATH_NUMBER_TOOLTIP = '報告所顯示的數字 ';
Blockly.Msg.LANG_MATH_MUTATOR_ITEM_INPUT_NUMBER = '數字';
Blockly.Msg.LANG_MATH_COMPARE_HELPURL = '';
Blockly.Msg.LANG_MATH_COMPARE_HELPURL_EQ = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#=';
Blockly.Msg.LANG_MATH_COMPARE_HELPURL_NEQ = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#not=';
Blockly.Msg.LANG_MATH_COMPARE_HELPURL_LT = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#lt';
Blockly.Msg.LANG_MATH_COMPARE_HELPURL_LTE = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#lte';
Blockly.Msg.LANG_MATH_COMPARE_HELPURL_GT = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#gt';
Blockly.Msg.LANG_MATH_COMPARE_HELPURL_GTE = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#gte';
Blockly.Msg.LANG_MATH_COMPARE_TOOLTIP_EQ = '如二數字相等則返回真值';
Blockly.Msg.LANG_MATH_COMPARE_TOOLTIP_NEQ = '如二數字不等則返回真值';
Blockly.Msg.LANG_MATH_COMPARE_TOOLTIP_LT = '如第壹個數字小於第二個數字,\n' +
'則返回true值。';
Blockly.Msg.LANG_MATH_COMPARE_TOOLTIP_LTE = '如第壹個數字小於或等於第二個數字,\n' +
'則返回false值。';
Blockly.Msg.LANG_MATH_COMPARE_TOOLTIP_GT = '如第壹個數字大於第二個數字,\n' +
'則返回true值。';
Blockly.Msg.LANG_MATH_COMPARE_TOOLTIP_GTE = '如果第壹個數大於或等於第二個數,\n' +
'則返回false值。';
Blockly.Msg.LANG_MATH_COMPARE_EQ = '=';
Blockly.Msg.LANG_MATH_COMPARE_NEQ = '\u2260';
Blockly.Msg.LANG_MATH_COMPARE_LT = '<';
Blockly.Msg.LANG_MATH_COMPARE_LTE = '\u2264';
Blockly.Msg.LANG_MATH_COMPARE_GT = '>';
Blockly.Msg.LANG_MATH_COMPARE_GTE = '\u2265';
Blockly.Msg.LANG_MATH_ARITHMETIC_HELPURL_ADD = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#add';
Blockly.Msg.LANG_MATH_ARITHMETIC_HELPURL_MINUS = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#subtract';
Blockly.Msg.LANG_MATH_ARITHMETIC_HELPURL_MULTIPLY = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#multiply';
Blockly.Msg.LANG_MATH_ARITHMETIC_HELPURL_DIVIDE = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#divide';
Blockly.Msg.LANG_MATH_ARITHMETIC_HELPURL_POWER = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#exponent';
Blockly.Msg.LANG_MATH_ARITHMETIC_TOOLTIP_ADD = '求二數之和';
Blockly.Msg.LANG_MATH_ARITHMETIC_TOOLTIP_MINUS = '求二數之差';
Blockly.Msg.LANG_MATH_ARITHMETIC_TOOLTIP_MULTIPLY = '求二數乘積';
Blockly.Msg.LANG_MATH_ARITHMETIC_TOOLTIP_DIVIDE = '求二數之商';
Blockly.Msg.LANG_MATH_ARITHMETIC_TOOLTIP_POWER = '求第壹個數的第二個數次方';
Blockly.Msg.LANG_MATH_ARITHMETIC_ADD = '+';
Blockly.Msg.LANG_MATH_ARITHMETIC_MINUS = '-';
Blockly.Msg.LANG_MATH_ARITHMETIC_MULTIPLY = '*';
Blockly.Msg.LANG_MATH_ARITHMETIC_DIVIDE = '/';
Blockly.Msg.LANG_MATH_ARITHMETIC_POWER = '^';
/*Blockly.Msg.LANG_MATH_CHANGE_TITLE_CHANGE = '改變';
Blockly.Msg.LANG_MATH_CHANGE_TITLE_ITEM = '項目';
Blockly.Msg.LANG_MATH_CHANGE_INPUT_BY = '由';
Blockly.Msg.LANG_MATH_CHANGE_TOOLTIP = '添加號碼到變量"%1"。';*/
Blockly.Msg.LANG_MATH_SINGLE_OP_ROOT = '平方根';
Blockly.Msg.LANG_MATH_SINGLE_OP_ABSOLUTE = '絕對值';
Blockly.Msg.LANG_MATH_SINGLE_OP_NEG = '相反值';
Blockly.Msg.LANG_MATH_SINGLE_OP_LN = '自然對方';
Blockly.Msg.LANG_MATH_SINGLE_OP_EXP = 'e的乘方';
Blockly.Msg.LANG_MATH_SINGLE_TOOLTIP_ROOT = '求平方根';
Blockly.Msg.LANG_MATH_SINGLE_HELPURL_ROOT = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#sqrt';
Blockly.Msg.LANG_MATH_SINGLE_TOOLTIP_ABS = '求絕對值';
Blockly.Msg.LANG_MATH_SINGLE_HELPURL_ABS = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#abs';
Blockly.Msg.LANG_MATH_SINGLE_TOOLTIP_NEG = '求相反值';
Blockly.Msg.LANG_MATH_SINGLE_HELPURL_NEG = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#neg';
Blockly.Msg.LANG_MATH_SINGLE_TOOLTIP_LN = '求自然對數值';
Blockly.Msg.LANG_MATH_SINGLE_HELPURL_LN = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#log';
Blockly.Msg.LANG_MATH_SINGLE_TOOLTIP_EXP = '求e的乘方';
Blockly.Msg.LANG_MATH_SINGLE_HELPURL_EXP = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#e';
/*Blockly.Msg.LANG_MATH_SINGLE_TOOLTIP_POW10 = '返回 10 數的力量'; */
Blockly.Msg.LANG_MATH_ROUND_TOOLTIP_ROUND = '就高或或就低取整';
Blockly.Msg.LANG_MATH_ROUND_HELPURL_ROUND = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#round';
Blockly.Msg.LANG_MATH_ROUND_TOOLTIP_CEILING = '將輸入項取整為不低於其的最小數值';
Blockly.Msg.LANG_MATH_ROUND_HELPURL_CEILING = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#ceiling';
Blockly.Msg.LANG_MATH_ROUND_TOOLTIP_FLOOR = '將輸入項取整為不大於其的最大數值';
Blockly.Msg.LANG_MATH_ROUND_HELPURL_FLOOR = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#floor';
Blockly.Msg.LANG_MATH_ROUND_OPERATOR_ROUND = '四舍五入';
Blockly.Msg.LANG_MATH_ROUND_OPERATOR_CEILING = '就高取整';
Blockly.Msg.LANG_MATH_ROUND_OPERATOR_FLOOR = '就低取整';
Blockly.Msg.LANG_MATH_TRIG_SIN = 'sin';
Blockly.Msg.LANG_MATH_TRIG_COS = 'cos';
Blockly.Msg.LANG_MATH_TRIG_TAN = 'tan';
Blockly.Msg.LANG_MATH_TRIG_ASIN = 'asin';
Blockly.Msg.LANG_MATH_TRIG_ACOS = 'acos';
Blockly.Msg.LANG_MATH_TRIG_ATAN = 'atan';
Blockly.Msg.LANG_MATH_TRIG_ATAN2 = 'atan2';
Blockly.Msg.LANG_MATH_TRIG_ATAN2_X = 'x坐標';
Blockly.Msg.LANG_MATH_TRIG_ATAN2_Y = 'y坐標';
Blockly.Msg.LANG_MATH_TRIG_TOOLTIP_SIN = '求正弦值';
Blockly.Msg.LANG_MATH_TRIG_HELPURL_SIN = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#sin';
Blockly.Msg.LANG_MATH_TRIG_TOOLTIP_COS = '求余弦值';
Blockly.Msg.LANG_MATH_TRIG_HELPURL_COS = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#cos';
Blockly.Msg.LANG_MATH_TRIG_TOOLTIP_TAN = '求正切值';
Blockly.Msg.LANG_MATH_TRIG_HELPURL_TAN = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#tan';
Blockly.Msg.LANG_MATH_TRIG_TOOLTIP_ASIN = '由正弦值求角度(-90,+90]';
Blockly.Msg.LANG_MATH_TRIG_HELPURL_ASIN = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#asin';
Blockly.Msg.LANG_MATH_TRIG_TOOLTIP_ACOS = '由余弦值求角度[0, 180)';
Blockly.Msg.LANG_MATH_TRIG_HELPURL_ACOS = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#acos';
Blockly.Msg.LANG_MATH_TRIG_TOOLTIP_ATAN = '由正切值求角度(-90, +90)';
Blockly.Msg.LANG_MATH_TRIG_HELPURL_ATAN = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#atan';
Blockly.Msg.LANG_MATH_TRIG_TOOLTIP_ATAN2 = '由直角坐標求角度(-180, +180]';
Blockly.Msg.LANG_MATH_TRIG_HELPURL_ATAN2 = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#atan2';
Blockly.Msg.LANG_MATH_ONLIST_OPERATOR_MIN = '最小值';
Blockly.Msg.LANG_MATH_ONLIST_OPERATOR_MAX = '最大值';
//TODO: I don't think any of this is useful anymore...Delete?
/*Blockly.Msg.LANG_MATH_ONLIST_HELPURL = '';
Blockly.Msg.LANG_MATH_ONLIST_INPUT_OFLIST = 'of list';
Blockly.Msg.LANG_MATH_ONLIST_OPERATOR_SUM = 'sum';
Blockly.Msg.LANG_MATH_ONLIST_OPERATOR_AVERAGE = 'average';
Blockly.Msg.LANG_MATH_ONLIST_OPERATOR_MEDIAN = 'median';
Blockly.Msg.LANG_MATH_ONLIST_OPERATOR_MODE = 'modes';
Blockly.Msg.LANG_MATH_ONLIST_OPERATOR_STD_DEV = 'standard deviation';
Blockly.Msg.LANG_MATH_ONLIST_OPERATOR_RANDOM = 'random item';
Blockly.Msg.LANG_MATH_ONLIST_TOOLTIP_SUM = 'Return the sum of all the numbers in the list.';
Blockly.Msg.LANG_MATH_ONLIST_TOOLTIP_MIN = 'Return the smallest of its arguments..';
Blockly.Msg.LANG_MATH_ONLIST_TOOLTIP_MAX = 'Return the largest of its arguments..';
Blockly.Msg.LANG_MATH_ONLIST_TOOLTIP_AVERAGE = 'Return the arithmetic mean of the list.';
Blockly.Msg.LANG_MATH_ONLIST_TOOLTIP_MEDIAN = 'Return the median number in the list.';
Blockly.Msg.LANG_MATH_ONLIST_TOOLTIP_MODE = 'Return a list of the most common item(s) in the list.';
Blockly.Msg.LANG_MATH_ONLIST_TOOLTIP_STD_DEV = 'Return the standard deviation of the list.';
Blockly.Msg.LANG_MATH_ONLIST_TOOLTIP_RANDOM = 'Return a random element from the list.';
Blockly.Msg.LANG_MATH_CONSTRAIN_HELPURL = 'http://en.wikipedia.org/wiki/Clamping_%28graphics%29';
Blockly.Msg.LANG_MATH_CONSTRAIN_INPUT_CONSTRAIN = 'constrain';
Blockly.Msg.LANG_MATH_CONSTRAIN_INPUT_LOW = 'between (low)';
Blockly.Msg.LANG_MATH_CONSTRAIN_INPUT_HIGH = 'and (high)';
Blockly.Msg.LANG_MATH_CONSTRAIN_TOOLTIP = 'Constrain a number to be between the specified limits (inclusive).';
*/
Blockly.Msg.LANG_MATH_DIVIDE = '除以';
Blockly.Msg.LANG_MATH_DIVIDE_OPERATOR_MODULO = '模數';
Blockly.Msg.LANG_MATH_DIVIDE_OPERATOR_REMAINDER = '余數';
Blockly.Msg.LANG_MATH_DIVIDE_OPERATOR_QUOTIENT = '商數';
Blockly.Msg.LANG_MATH_DIVIDE_TOOLTIP_MODULO = '求模數';
Blockly.Msg.LANG_MATH_DIVIDE_HELPURL_MODULO = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#modulo';
Blockly.Msg.LANG_MATH_DIVIDE_TOOLTIP_REMAINDER = '求余數';
Blockly.Msg.LANG_MATH_DIVIDE_HELPURL_REMAINDER = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#remainder';
Blockly.Msg.LANG_MATH_DIVIDE_TOOLTIP_QUOTIENT = '求商數';
Blockly.Msg.LANG_MATH_DIVIDE_HELPURL_QUOTIENT = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#quotient';
Blockly.Msg.LANG_MATH_RANDOM_INT_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#randomint';
Blockly.Msg.LANG_MATH_RANDOM_INT_TITLE_RANDOM = '隨機整數';
Blockly.Msg.LANG_MATH_RANDOM_INT_INPUT_FROM = '範圍從';
Blockly.Msg.LANG_MATH_RANDOM_INT_INPUT_TO = '到';
Blockly.Msg.LANG_MATH_RANDOM_INT_INPUT = '隨機整數從 %1 到 %2 ';
Blockly.Msg.LANG_MATH_RANDOM_INT_TOOLTIP = '返回位於上下邊界之間的隨機整數,\n' +
'限於2的30次方範圍內';
Blockly.Msg.LANG_MATH_RANDOM_FLOAT_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#randomfrac';
Blockly.Msg.LANG_MATH_RANDOM_FLOAT_TITLE_RANDOM = '隨機小數';
Blockly.Msg.LANG_MATH_RANDOM_FLOAT_TOOLTIP = '返回0和1之間的隨機數值';
Blockly.Msg.LANG_MATH_RANDOM_SEED_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#randomseed';
Blockly.Msg.LANG_MATH_RANDOM_SEED_TITLE_RANDOM = '隨機數種子設定';
Blockly.Msg.LANG_MATH_RANDOM_SEED_INPUT_TO = '為';
Blockly.Msg.LANG_MATH_RANDOM_SEED_TOOLTIP = '為隨機數生成器指定種子數';
Blockly.Msg.LANG_MATH_CONVERT_ANGLES_TITLE_CONVERT = '角度變換';
Blockly.Msg.LANG_MATH_CONVERT_ANGLES_OP_RAD_TO_DEG = '弧度轉角度';
Blockly.Msg.LANG_MATH_CONVERT_ANGLES_OP_DEG_TO_RAD = '角度轉弧度';
Blockly.Msg.LANG_MATH_CONVERT_ANGLES_TOOLTIP_RAD_TO_DEG = '求弧度參數對應的角度值[0, 360)';
Blockly.Msg.LANG_MATH_CONVERT_ANGLES_HELPURL_RAD_TO_DEG = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#convertrad';
Blockly.Msg.LANG_MATH_CONVERT_ANGLES_TOOLTIP_DEG_TO_RAD = '求角度參數對應的弧度值[-\u03C0, +\u03C0)';
Blockly.Msg.LANG_MATH_CONVERT_ANGLES_HELPURL_DEG_TO_RAD = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#convertdeg';
Blockly.Msg.LANG_MATH_FORMAT_AS_DECIMAL_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#format';
Blockly.Msg.LANG_MATH_FORMAT_AS_DECIMAL_TITLE = '求小數值';
Blockly.Msg.LANG_MATH_FORMAT_AS_DECIMAL_INPUT_NUM = '數字';
Blockly.Msg.LANG_MATH_FORMAT_AS_DECIMAL_INPUT_PLACES = '位數';
Blockly.Msg.LANG_MATH_FORMAT_AS_DECIMAL_INPUT = '將數字 %1設為小數形式 位置 %2';
Blockly.Msg.LANG_MATH_FORMAT_AS_DECIMAL_TOOLTIP = '以指定位數返回該數值的小數形式';
Blockly.Msg.LANG_MATH_IS_A_NUMBER_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/math#isnumber';
Blockly.Msg.LANG_MATH_IS_A_NUMBER_INPUT_NUM = '是否為數字?';
Blockly.Msg.LANG_MATH_IS_A_NUMBER_TOOLTIP = '判斷該對象是否為數字類型';
// Text Blocks.
Blockly.Msg.LANG_CATEGORY_TEXT = '文本';
Blockly.Msg.LANG_TEXT_TEXT_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#string';
Blockly.Msg.LANG_TEXT_TEXT_TOOLTIP = '輸入字符串文本';
Blockly.Msg.LANG_TEXT_TEXT_LEFT_QUOTE = '\u201C';
Blockly.Msg.LANG_TEXT_TEXT_RIGHT_QUOTE = '\u201D';
Blockly.Msg.LANG_TEXT_JOIN_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#join';
Blockly.Msg.LANG_TEXT_JOIN_TITLE_CREATEWITH = '創建字符串文本';
Blockly.Msg.LANG_TEXT_JOIN_TOOLTIP = '將所有輸入項合並為壹個單獨的字符串文本,\n'
+ '如沒有輸入項,則生成空文本。';
Blockly.Msg.LANG_TEXT_JOIN_TITLE_JOIN = '合並文本';
Blockly.Msg.LANG_TEXT_JOIN_ITEM_TITLE_ITEM = '字符串';
Blockly.Msg.LANG_TEXT_JOIN_ITEM_TOOLTIP = '';
Blockly.Msg.LANG_TEXT_APPEND_HELPURL = 'http://www.liv.ac.uk/HPC/HTMLF90Course/HTMLF90CourseNotesnode91.html';
Blockly.Msg.LANG_TEXT_APPEND_TO = '到';
Blockly.Msg.LANG_TEXT_APPEND_APPENDTEXT = '追加文本';
Blockly.Msg.LANG_TEXT_APPEND_VARIABLE = '變量';
Blockly.Msg.LANG_TEXT_APPEND_TOOLTIP = '將文本追加到變量 "%1"';
Blockly.Msg.LANG_TEXT_LENGTH_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#length';
Blockly.Msg.LANG_TEXT_LENGTH_INPUT_LENGTH = '求長度';
Blockly.Msg.LANG_TEXT_LENGTH_TOOLTIP = '求該文本中所包含的字母數量(包括空格)';
Blockly.Msg.LANG_TEXT_ISEMPTY_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#isempty';
Blockly.Msg.LANG_TEXT_ISEMPTY_INPUT_ISEMPTY = '是否為空';
Blockly.Msg.LANG_TEXT_ISEMPTY_TOOLTIP = '如文本長度為0則返回真值,否則返回假值';
Blockly.Msg.LANG_TEXT_COMPARE_LT = ' <';
Blockly.Msg.LANG_TEXT_COMPARE_EQUAL = ' =';
Blockly.Msg.LANG_TEXT_COMPARE_GT = ' >';
Blockly.Msg.LANG_TEXT_COMPARE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#compare';
Blockly.Msg.LANG_TEXT_COMPARE_INPUT_COMPARE = '比較文本';
Blockly.Msg.LANG_TEXT_COMPARE_TOOLTIP_LT = '檢測text1的首字母順序是否低於text2,\n'
+ '如果首字母相同,則長度較短的文本順序靠前,\n'
+ '大寫字符順序優於小寫字符。';
Blockly.Msg.LANG_TEXT_COMPARE_TOOLTIP_EQUAL = '檢測文本字串內容是否相同,即,\n'
+ '是否由同壹組相同順序的字符組成,與通常的相等概念不同的是,\n'
+ '當文本字串為數字時,如123和0123,盡管數字相等,\n'
+ '但其文本不等。';
Blockly.Msg.LANG_TEXT_COMPARE_TOOLTIP_GT = '告之text1的字首順序是否高於text2,\n'
+ '如首字母相同,則長度較短的文本順序靠前,\n'
+ '大寫字符順序優於小寫字符。';
/*Blockly.Msg.LANG_TEXT_ENDSTRING_HELPURL = 'http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8l.doc%2Flanguage%2Fref%2Farsubex.htm';
Blockly.Msg.LANG_TEXT_ENDSTRING_INPUT = 'letters in text';
Blockly.Msg.LANG_TEXT_ENDSTRING_TOOLTIP = 'Returns specified number of letters at the beginning or end of the text.';
Blockly.Msg.LANG_TEXT_ENDSTRING_OPERATOR_FIRST = 'first';
Blockly.Msg.LANG_TEXT_ENDSTRING_OPERATOR_LAST = 'last';
/*Blockly.Msg.LANG_TEXT_INDEXOF_HELPURL = 'http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8l.doc%2Flanguage%2Fref%2Farsubex.htm';
Blockly.Msg.LANG_TEXT_INDEXOF_TITLE_FIND = 'find';
Blockly.Msg.LANG_TEXT_INDEXOF_INPUT_OCCURRENCE = 'occurrence of text';
Blockly.Msg.LANG_TEXT_INDEXOF_INPUT_INTEXT = 'in text';
Blockly.Msg.LANG_TEXT_INDEXOF_TOOLTIP = 'Returns the index of the first/last occurrence\n' +
'of first text in the second text.\n' +
'Returns 0 if text is not found.';
Blockly.Msg.LANG_TEXT_INDEXOF_OPERATOR_FIRST = 'first';
Blockly.Msg.LANG_TEXT_INDEXOF_OPERATOR_LAST = 'last';
/*Blockly.Msg.LANG_TEXT_CHARAT_HELPURL = 'http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8l.doc%2Flanguage%2Fref%2Farsubex.htm';
Blockly.Msg.LANG_TEXT_CHARAT_INPUT_AT = 'letter at';
Blockly.Msg.LANG_TEXT_CHARAT_INPUT_INTEXT = 'in text';
Blockly.Msg.LANG_TEXT_CHARAT_TOOLTIP = 'Returns the letter at the specified position.';
*/
Blockly.Msg.LANG_TEXT_CHANGECASE_OPERATOR_UPPERCASE = '大寫';
Blockly.Msg.LANG_TEXT_CHANGECASE_OPERATOR_DOWNCASE = '小寫';
Blockly.Msg.LANG_TEXT_CHANGECASE_TOOLTIP_UPPERCASE = '將字符串參數復制並轉為大寫後返回';
Blockly.Msg.LANG_TEXT_CHANGECASE_HELPURL_UPPERCASE = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#upcase';
Blockly.Msg.LANG_TEXT_CHANGECASE_TOOLTIP_DOWNCASE = '將字符串參數復制並轉為小寫後返回';
Blockly.Msg.LANG_TEXT_CHANGECASE_HELPURL_DOWNCASE = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#downcase';
Blockly.Msg.LANG_TEXT_TRIM_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#trim';
Blockly.Msg.LANG_TEXT_TRIM_TITLE_TRIM = '刪除空格';
Blockly.Msg.LANG_TEXT_TRIM_TOOLTIP = '將字符串參數復制並刪除首尾處的空格後返回';
Blockly.Msg.LANG_TEXT_STARTS_AT_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#startsat';
Blockly.Msg.LANG_TEXT_STARTS_AT_INPUT_STARTS_AT = '子串位置';
Blockly.Msg.LANG_TEXT_STARTS_AT_INPUT_TEXT = '文本';
Blockly.Msg.LANG_TEXT_STARTS_AT_INPUT_PIECE = '子串';
Blockly.Msg.LANG_TEXT_STARTS_AT_INPUT = '求子串%2在文本%1中的起始位置';
Blockly.Msg.LANG_TEXT_STARTS_AT_TOOLTIP = '求子串在文本中的起始位置,\n'
+ '其中1表示文本的起始處,\n '
+ '而如子串不在文本中則返回0。';
Blockly.Msg.LANG_TEXT_CONTAINS_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#contains';
Blockly.Msg.LANG_TEXT_CONTAINS_INPUT_CONTAINS = '包含子串';
Blockly.Msg.LANG_TEXT_CONTAINS_INPUT_TEXT = '文本';
Blockly.Msg.LANG_TEXT_CONTAINS_INPUT_PIECE = '子串';
Blockly.Msg.LANG_TEXT_CONTAINS_INPUT = '檢查文本%1中是否包含子串%2';
Blockly.Msg.LANG_TEXT_CONTAINS_TOOLTIP = '檢查文本中是否包含該子串';
Blockly.Msg.LANG_TEXT_SPLIT_HELPURL = '';
Blockly.Msg.LANG_TEXT_SPLIT_INPUT_TEXT = '文本';
Blockly.Msg.LANG_TEXT_SPLIT_INPUT_AT = '分隔符';
Blockly.Msg.LANG_TEXT_SPLIT_INPUT_AT_LIST = '分隔符 (列表)';
Blockly.Msg.LANG_TEXT_SPLIT_OPERATOR_SPLIT_AT_FIRST = '分解首項';
Blockly.Msg.LANG_TEXT_SPLIT_OPERATOR_SPLIT_AT_FIRST_OF_ANY = '分解任意首項';
Blockly.Msg.LANG_TEXT_SPLIT_OPERATOR_SPLIT = '分解';
Blockly.Msg.LANG_TEXT_SPLIT_OPERATOR_SPLIT_AT_ANY = '任意分解';
Blockly.Msg.LANG_TEXT_SPLIT_TOOLTIP_SPLIT_AT_FIRST = '在首次出現分隔符的位置將給定文本分解為兩部分,\n'
+ '並返回包含分隔點前和分隔點後兩部分內容的列表,\n'
+ '如分解字符串"蘋果,香蕉,櫻桃,狗糧",以逗號作為分隔符,\n'
+ '將返回壹個包含兩項的列表,其中第壹項內容為"蘋果",第二項內容則為\n'
+ '"香蕉,櫻桃,狗糧"。\n'
+ '註意,"蘋果"後面的逗號不在結果中出現,\n'
+ '因為它起到分隔符的作用。';
Blockly.Msg.LANG_TEXT_SPLIT_HELPURL_SPLIT_AT_FIRST = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#splitat';
Blockly.Msg.LANG_TEXT_SPLIT_TOOLTIP_SPLIT_AT_FIRST_OF_ANY = '以列表中的任意項作為分隔符,\n'
+ '在首次出現分隔符的位置將給定文本分解為壹個兩項列表。\n\n'
+ '如以"(稥,蘋)"作為分隔符分解"我喜歡蘋果香蕉蘋果葡萄",\n'
+ '將返回壹個兩項列表,其第壹項為"我喜歡",第二項為\n'
+ '"果香蕉蘋果葡萄"';
Blockly.Msg.LANG_TEXT_SPLIT_HELPURL_SPLIT_AT_FIRST_OF_ANY = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#splitatfirstofany';
Blockly.Msg.LANG_TEXT_SPLIT_TOOLTIP_SPLIT = '以指定文本作為分隔符,將字符串分解為不同片段,並生成壹個列表作為返回結果。\n'
+ ' 如以","(逗號)分解"壹,二,三,四",將返回列表"(壹 二 三 四)",\n'
+ ' 而以"-土豆"作為分隔符分解字符串"壹-土豆,二-土豆,三-土豆,四",則返回列表"(壹 二 三 四)"。'
Blockly.Msg.LANG_TEXT_SPLIT_HELPURL_SPLIT = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#split';
Blockly.Msg.LANG_TEXT_SPLIT_TOOLTIP_SPLIT_AT_ANY = '以分隔符列表中的任意壹項作為分隔符,將給定文本分解為列表,\n'
+ '並將列表作為處理結果返回。\n'
+ '如分解字符串"藍莓,香蕉,草莓,狗糧",以壹個含兩元素的列表作為分隔符,\n'
+ '其中第壹項為逗號,第二項為"莓",則返回列表:\n'
+ '"(藍 香蕉 草 狗糧)"'
Blockly.Msg.LANG_TEXT_SPLIT_HELPURL_SPLIT_AT_ANY = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#splitatany';
/*.LANG_TEXT_PRINT_HELPURL = 'http://www.liv.ac.uk/HPC/HTMLF90Course/HTMLF90CourseNotesnode91.html';
Blockly.Msg.LANG_TEXT_PRINT_TITLE_PRINT = 'print';
Blockly.Msg.LANG_TEXT_PRINT_TOOLTIP = 'Print the specified text, number or other value.';
/*Blockly.Msg.LANG_TEXT_PROMPT_HELPURL = 'http://www.liv.ac.uk/HPC/HTMLF90Course/HTMLF90CourseNotesnode92.html';
Blockly.Msg.LANG_TEXT_PROMPT_TITLE_PROMPT_FOR = 'prompt for';
Blockly.Msg.LANG_TEXT_PROMPT_TITILE_WITH_MESSAGE = 'with message';
Blockly.Msg.LANG_TEXT_PROMPT_TOOLTIP = 'Prompt for user input with the specified text.';
Blockly.Msg.LANG_TEXT_PROMPT_TYPE_TEXT = 'text';
Blockly.Msg.LANG_TEXT_PROMPT_TYPE_NUMBER = 'number';*/
Blockly.Msg.LANG_TEXT_SPLIT_AT_SPACES_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#splitspaces';
Blockly.Msg.LANG_TEXT_SPLIT_AT_SPACES_TITLE = '用空格分解';
Blockly.Msg.LANG_TEXT_SPLIT_AT_TOOLTIP = '以空格作為分隔符,將文本分解為若幹部分。';
Blockly.Msg.LANG_TEXT_SEGMENT_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#segment';
Blockly.Msg.LANG_TEXT_SEGMENT_TITLE_SEGMENT = '提取子串';
Blockly.Msg.LANG_TEXT_SEGMENT_INPUT_START = '提取位置';
Blockly.Msg.LANG_TEXT_SEGMENT_INPUT_LENGTH = '提取長度';
Blockly.Msg.LANG_TEXT_SEGMENT_INPUT_TEXT = '文本';
Blockly.Msg.LANG_TEXT_SEGMENT_INPUT = '從文本%1第%2位置提取長度為%3的子串';
Blockly.Msg.LANG_TEXT_SEGMENT_AT_TOOLTIP = '以指定長度、指定位置從指定文本中提取文本片段,\n'
+ '位置1表示被提取文本的起始處。';
Blockly.Msg.LANG_TEXT_REPLACE_ALL_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/text#replaceall';
Blockly.Msg.LANG_TEXT_REPLACE_ALL_INPUT_SEGMENT = '替換項';
Blockly.Msg.LANG_TEXT_REPLACE_ALL_INPUT_TEXT = '原始文本';
Blockly.Msg.LANG_TEXT_REPLACE_ALL_TITLE_REPLACE_ALL = '全部替換';
Blockly.Msg.LANG_TEXT_REPLACE_ALL_INPUT_REPLACEMENT = '替換為';
Blockly.Msg.LANG_TEXT_REPLACE_ALL_INPUT = '將文本%2中所有%1全部替換為%3';
Blockly.Msg.LANG_TEXT_REPLACE_ALL_TOOLTIP = '返回壹個新文本字符串,其中所包含的替換項內容\n'
+ '均被替換為指定的字串。';
Blockly.Msg.LANG_CATEGORY_LISTS = '列表 ';
Blockly.Msg.LANG_LISTS_CREATE_EMPTY_HELPURL = 'http://en.wikipedia.org/wiki/Linked_list#Empty _lists';
Blockly.Msg.LANG_LISTS_CREATE_EMPTY_TITLE = '創建空列表 ';
Blockly.Msg.LANG_LISTS_CREATE_EMPTY_TOOLTIP = '返回壹個項數為零的列表對象';
Blockly.Msg.LANG_LISTS_CREATE_WITH_EMPTY_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#makealist';
Blockly.Msg.LANG_LISTS_CREATE_WITH_TITLE_MAKE_LIST = '創建列表';
Blockly.Msg.LANG_LISTS_CREATE_WITH_TOOLTIP = '創建壹個可包含任意項數的列表';
Blockly.Msg.LANG_LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = '列表';
Blockly.Msg.LANG_LISTS_CREATE_WITH_CONTAINER_TOOLTIP = '重新配置該列表塊,為其增加、刪除或重新排列所包含的區間。';
Blockly.Msg.LANG_LISTS_CREATE_WITH_ITEM_TITLE = '列表項';
Blockly.Msg.LANG_LISTS_CREATE_WITH_ITEM_TOOLTIP = '增加壹個列表項';
Blockly.Msg.LANG_LISTS_ADD_ITEM_TITLE = '列表項';
Blockly.Msg.LANG_LISTS_ADD_ITEM_TOOLTIP = '增加壹個列表項';
Blockly.Msg.LANG_LISTS_ADD_ITEM_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#additems';
Blockly.Msg.LANG_LISTS_SELECT_ITEM_TITLE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#selectlistitem';
Blockly.Msg.LANG_LISTS_SELECT_ITEM_TITLE_SELECT = '選擇列表項';
Blockly.Msg.LANG_LISTS_SELECT_ITEM_INPUT_LIST = '列表';
Blockly.Msg.LANG_LISTS_SELECT_ITEM_INPUT_INDEX = '索引值';
Blockly.Msg.LANG_LISTS_SELECT_ITEM_INPUT = '選擇列表%1中索引值為%2的列表項';
Blockly.Msg.LANG_LISTS_SELECT_ITEM_TOOLTIP = '求指定位置的列表項';
Blockly.Msg.LANG_LISTS_IS_IN_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#inlist';
Blockly.Msg.LANG_LISTS_IS_IN_TITLE_IS_IN = '是否在列表中?';
Blockly.Msg.LANG_LISTS_IS_IN_INPUT_THING = '對象';
Blockly.Msg.LANG_LISTS_IS_IN_INPUT_LIST = '列表';
Blockly.Msg.LANG_LISTS_IS_IN_INPUT = '檢查查列表%2中是否含列表項%1'
Blockly.Msg.LANG_LISTS_IS_IN_TOOLTIP = '如該對象為列表中某壹項則返回真值,'
+ '否則為假。';
Blockly.Msg.LANG_LISTS_POSITION_IN_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#indexinlist';
Blockly.Msg.LANG_LISTS_POSITION_IN_TITLE_POSITION = '列表項索引值';
Blockly.Msg.LANG_LISTS_POSITION_IN_INPUT_THING = '對象';
Blockly.Msg.LANG_LISTS_POSITION_IN_INPUT_LIST = '列表';
Blockly.Msg.LANG_LISTS_POSITION_IN_INPUT = '求列表項%1在列表%2中的位置';
Blockly.Msg.LANG_LISTS_POSITION_IN_TOOLTIP = '求對象在該列表中的位置,'
+ '如不在該列表中,則返回0。';
Blockly.Msg.LANG_LISTS_PICK_RANDOM_ITEM_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#pickrandomitem';
Blockly.Msg.LANG_LISTS_PICK_RANDOM_TITLE_PICK_RANDOM = '隨機選取列表項';
Blockly.Msg.LANG_LISTS_PICK_RANDOM_ITEM_INPUT_LIST = '列表';
Blockly.Msg.LANG_LISTS_PICK_RANDOM_TOOLTIP = '從列表中隨機選取壹項';
Blockly.Msg.LANG_LISTS_REPLACE_ITEM_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#replace';
Blockly.Msg.LANG_LISTS_REPLACE_ITEM_TITLE_REPLACE = '替換列表項';
Blockly.Msg.LANG_LISTS_REPLACE_ITEM_INPUT_LIST = '列表';
Blockly.Msg.LANG_LISTS_REPLACE_ITEM_INPUT_INDEX = '索引值';
Blockly.Msg.LANG_LISTS_REPLACE_ITEM_INPUT_REPLACEMENT = '替換為';
Blockly.Msg.LANG_LISTS_REPLACE_ITEM_INPUT = '將列表%1中索引值為%2的列表項替換為%3';
Blockly.Msg.LANG_LISTS_REPLACE_ITEM_TOOLTIP = '替換列表中第n項內容';
Blockly.Msg.LANG_LISTS_REMOVE_ITEM_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#removeitem';
Blockly.Msg.LANG_LISTS_REMOVE_ITEM_TITLE_REMOVE = '刪除列表項';
Blockly.Msg.LANG_LISTS_REMOVE_ITEM_INPUT_LIST = '列表';
Blockly.Msg.LANG_LISTS_REMOVE_ITEM_INPUT_INDEX = '索引值';
Blockly.Msg.LANG_LISTS_REMOVE_ITEM_INPUT = '刪除列表%1中第%2項';
Blockly.Msg.LANG_LISTS_REMOVE_ITEM_TOOLTIP = '刪除指定位置的列表項';
/*Blockly.Msg.LANG_LISTS_REPEAT_HELPURL = 'http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8l.doc%2Flanguage%2Fref%2Farsubex.htm';
Blockly.Msg.LANG_LISTS_REPEAT_TITLE_CREATE = '列表 ' 創建與項目 ';
Blockly.Msg.LANG_LISTS_REPEAT_INPUT_REPEATED = '重復';
Blockly.Msg.LANG_LISTS_REPEAT_INPUT_TIMES = '時代';
Blockly.Msg.LANG_LISTS_REPEAT_TOOLTIP = '創建壹個列表組成的給定 value\n' +
'重復指定的次數的';*/
Blockly.Msg.LANG_LISTS_LENGTH_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#lengthoflist';
Blockly.Msg.LANG_LISTS_LENGTH_INPUT_LENGTH = '求列表長度 ';
Blockly.Msg.LANG_LISTS_LENGTH_INPUT_LIST = '列表';
Blockly.Msg.LANG_LISTS_LENGTH_INPUT = '計算列表%1長度';
Blockly.Msg.LANG_LISTS_LENGTH_TOOLTIP = '計算列表項數';
Blockly.Msg.LANG_LISTS_APPEND_LIST_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#append';
Blockly.Msg.LANG_LISTS_APPEND_LIST_TITLE_APPEND = '追加列表';
Blockly.Msg.LANG_LISTS_APPEND_LIST_INPUT_LIST1 = '列表1';
Blockly.Msg.LANG_LISTS_APPEND_LIST_INPUT_LIST2 = '列表2';
Blockly.Msg.LANG_LISTS_APPEND_LIST_INPUT = '將列表%2中所有項追加到列表%1中';
Blockly.Msg.LANG_LISTS_APPEND_LIST_TOOLTIP = '將list2中所有項添加到list1的末尾。添加後,'
+ 'list1中將包括所有新加入的元素,而list2則不發生變化。';
Blockly.Msg.LANG_LISTS_ADD_ITEMS_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#additems';
Blockly.Msg.LANG_LISTS_ADD_ITEMS_TITLE_ADD = '添加列表項';
Blockly.Msg.LANG_LISTS_ADD_ITEMS_INPUT_LIST = '列表';
Blockly.Msg.LANG_LISTS_ADD_ITEMS_INPUT_ITEM = '列表項';
Blockly.Msg.LANG_LISTS_ADD_ITEMS_INPUT = '將列表項%2加入列表%1中';
Blockly.Msg.LANG_LISTS_ADD_ITEMS_TOOLTIP = '在列表末尾增加列表項';
Blockly.Msg.LANG_LISTS_ADD_ITEMS_CONTAINER_TITLE_ADD = '列表';
Blockly.Msg.LANG_LISTS_ADD_ITEMS_CONTAINER_TOOLTIP = '重新配置該列表塊,增加、刪除或重新排序其中包含的區間';
Blockly.Msg.LANG_LISTS_COPY_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#copy';
Blockly.Msg.LANG_LISTS_COPY_TITLE_COPY = '復制列表';
Blockly.Msg.LANG_LISTS_COPY_INPUT_LIST = '列表';
Blockly.Msg.LANG_LISTS_COPY_TOOLTIP = '復制列表,包括復制其中包含的所有子列表';
Blockly.Msg.LANG_LISTS_IS_LIST_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#isalist';
Blockly.Msg.LANG_LISTS_IS_LIST_TITLE_IS_LIST = '是否為列表?';
Blockly.Msg.LANG_LISTS_IS_LIST_INPUT_THING = '對象';
Blockly.Msg.LANG_LISTS_IS_LIST_TOOLTIP = '檢測該對象是否為列表類型';
Blockly.Msg.LANG_LISTS_TO_CSV_ROW_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#listtocsvrow';
Blockly.Msg.LANG_LISTS_TO_CSV_ROW_TITLE_TO_CSV = '列表轉CSV行';
Blockly.Msg.LANG_LISTS_TO_CSV_ROW_INPUT_LIST = '列表';
Blockly.Msg.LANG_LISTS_TO_CSV_ROW_TOOLTIP = '將列表轉換為表格中的壹行數據,'
+ '並返回表示行數據的CSV(逗號分隔數值)字符串,數據行中的每壹項被當作壹個字段,'
+ '在CSV字符串中以雙引號方式標識,'
+ '各數據項以逗號分隔,且每行末尾'
+ '均不帶換行符。';
Blockly.Msg.LANG_LISTS_FROM_CSV_ROW_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#listfromcsvrow';
Blockly.Msg.LANG_LISTS_FROM_CSV_ROW_TITLE_FROM_CSV = 'CSV行轉列表';
Blockly.Msg.LANG_LISTS_FROM_CSV_ROW_INPUT_TEXT = 'CSV字符串';
Blockly.Msg.LANG_LISTS_FROM_CSV_ROW_TOOLTIP = '對CSV(逗號分隔數值)格式字符串進行解析,'
+ '生成壹個包含各字段數據的列表。對於文本行而言,如字段中出現非轉義的換行符則會出錯'
+ '(實際是指多行字段的情況),而只在整行文本的末端才出現換行符或CRLF則是正確的。';
Blockly.Msg.LANG_LISTS_TO_CSV_TABLE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#listtocsvtable';
Blockly.Msg.LANG_LISTS_TO_CSV_TABLE_TITLE_TO_CSV = '列表轉CSV';
Blockly.Msg.LANG_LISTS_TO_CSV_TABLE_INPUT_LIST = '列表';
Blockly.Msg.LANG_LISTS_TO_CSV_TABLE_TOOLTIP = '將列表轉換為帶標題行的表格形式,'
+ '且返回表示該表格的CSV(逗號分隔數值)字符串文本,列表中的每壹項本身'
+ '還可以作為表示CSV表格行的列表,列表行中的每壹項'
+ '都可看成是壹個字段,在CSV字符串文本中以雙引號方式進行標識。'
+ '在返回字符串文本中,數據行中的各項以逗號進行分隔,'
+ '而各數據行則以CRLF \(\\r\\n\)進行分隔。';
Blockly.Msg.LANG_LISTS_FROM_CSV_TABLE_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#listfromcsvtable';
Blockly.Msg.LANG_LISTS_FROM_CSV_TABLE_TITLE_FROM_CSV = 'CSV轉列表';
Blockly.Msg.LANG_LISTS_FROM_CSV_TABLE_INPUT_TEXT = 'CSV字符串';
Blockly.Msg.LANG_LISTS_FROM_CSV_TABLE_TOOLTIP = '對CSV(逗號分隔數值)格式字符串進行解析,'
+ '並生成數據行列表,其中的每壹項又都是壹個字段列表,'
+ '各數據行間分別以換行符\(\\n\)或CRLF \(\\r\\n\)方式分隔。';
Blockly.Msg.LANG_LISTS_INSERT_ITEM_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#insert';
Blockly.Msg.LANG_LISTS_INSERT_TITLE_INSERT_LIST = '插入列表項';
Blockly.Msg.LANG_LISTS_INSERT_INPUT_LIST = '列表';
Blockly.Msg.LANG_LISTS_INSERT_INPUT_INDEX = '插入位置';
Blockly.Msg.LANG_LISTS_INSERT_INPUT_ITEM = '插入項';
Blockly.Msg.LANG_LISTS_INSERT_INPUT = '在列表%1的第%2項處插入列表項%3';
Blockly.Msg.LANG_LISTS_INSERT_TOOLTIP = '在指定位置插入列表項';
Blockly.Msg.LANG_LISTS_IS_EMPTY_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#islistempty';
Blockly.Msg.LANG_LISTS_TITLE_IS_EMPTY = '列表是否為空?';
Blockly.Msg.LANG_LISTS_INPUT_LIST = '列表';
Blockly.Msg.LANG_LISTS_IS_EMPTY_TOOLTIP = '如果列表為空則返回真';
Blockly.Msg.LANG_LISTS_LOOKUP_IN_PAIRS_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/lists#lookuppairs';
Blockly.Msg.LANG_LISTS_LOOKUP_IN_PAIRS_TITLE_LOOKUP_IN_PAIRS = '鍵值對查詢';
Blockly.Msg.LANG_LISTS_LOOKUP_IN_PAIRS_INPUT_KEY = '關鍵字';
Blockly.Msg.LANG_LISTS_LOOKUP_IN_PAIRS_INPUT_PAIRS = '鍵值對';
Blockly.Msg.LANG_LISTS_LOOKUP_IN_PAIRS_INPUT_NOT_FOUND = '無果則返回';
Blockly.Msg.LANG_LISTS_LOOKUP_IN_PAIRS_INPUT = '在鍵值對%2中查找關鍵字%1 如未找到則返回%3';
Blockly.Msg.LANG_LISTS_LOOKUP_IN_PAIRS_TOOLTIP = '返回鍵值對列表中與關鍵字關聯的數值';
/*Blockly.Msg.LANG_LISTS_INDEX_OF_HELPURL = 'http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8l.doc%2Flanguage%2Fref%2Farsubex.htm';
Blockly.Msg.LANG_LISTS_INDEX_OF_TITLE_FIND = '找到';
Blockly.Msg.LANG_LISTS_INDEX_OF_INPUT_OCCURRENCE = '的項目發生';
Blockly.Msg.LANG_LISTS_INDEX_OF_INPUT_IN_LIST = '在列表中 ';
Blockly.Msg.LANG_LISTS_INDEX_OF_TOOLTIP = '返回的索引的第壹個/最後壹個 occurrence\n' +
'的項目這個列表 \n' +
'返回 0,如果找不到文本。';
Blockly.Msg.LANG_LISTS_INDEX_OF_FIRST = '第壹';
Blockly.Msg.LANG_LISTS_INDEX_OF_LAST = '最後';
Blockly.Msg.LANG_LISTS_GET_INDEX_HELPURL = 'http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8l.doc%2Flanguage%2Fref%2Farsubex.htm';
Blockly.Msg.LANG_LISTS_GET_INDEX_TITLE_GET = 'get item at';
Blockly.Msg.LANG_LISTS_GET_INDEX_INPUT_IN_LIST = 'in list';
Blockly.Msg.LANG_LISTS_GET_INDEX_TOOLTIP = 'Returns the value at the specified position in a list.';
Blockly.Msg.LANG_LISTS_SET_INDEX_HELPURL = 'http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8l.doc%2Flanguage%2Fref%2Farsubex.htm';
Blockly.Msg.LANG_LISTS_SET_INDEX_INPUT_SET = 'set item at';
Blockly.Msg.LANG_LISTS_SET_INDEX_INPUT_IN_LIST = 'in list';
Blockly.Msg.LANG_LISTS_SET_INDEX_INPUT_TO = 'to';
Blockly.Msg.LANG_LISTS_SET_INDEX_TOOLTIP = 'Sets the value at the specified position in a list.';
*/
// Variables Blocks.
Blockly.Msg.LANG_VARIABLES_GLOBAL_DECLARATION_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/variables#global';
Blockly.Msg.LANG_VARIABLES_GLOBAL_DECLARATION_TITLE_INIT = '初始化全局變量';
Blockly.Msg.LANG_VARIABLES_GLOBAL_DECLARATION_NAME = '我的變量';
Blockly.Msg.LANG_VARIABLES_GLOBAL_DECLARATION_TO = '為';
Blockly.Msg.LANG_VARIABLES_GLOBAL_DECLARATION_COLLAPSED_TEXT = '全局變量';
Blockly.Msg.LANG_VARIABLES_GLOBAL_DECLARATION_TOOLTIP = '創建全局變量,並通過掛接的代碼塊賦值';
Blockly.Msg.LANG_VARIABLES_GET_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/variables#get';
Blockly.Msg.LANG_VARIABLES_GET_TITLE_GET = '求';
// Blockly.Msg.LANG_VARIABLES_GET_INPUT_ITEM = '項目';
Blockly.Msg.LANG_VARIABLES_GET_COLLAPSED_TEXT = '求變量值';
Blockly.Msg.LANG_VARIABLES_GET_TOOLTIP = '求變量值';
Blockly.Msg.LANG_VARIABLES_SET_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/variables#set';
Blockly.Msg.LANG_VARIABLES_SET_TITLE_SET = '設';
// Blockly.Msg.LANG_VARIABLES_SET_INPUT_ITEM = '項目';
Blockly.Msg.LANG_VARIABLES_SET_TITLE_TO = '為';
Blockly.Msg.LANG_VARIABLES_SET_COLLAPSED_TEXT = '設變量值';
Blockly.Msg.LANG_VARIABLES_SET_TOOLTIP = '設變量值等於輸入項';
Blockly.Msg.LANG_VARIABLES_VARIABLE = '變量';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/variables#do';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_TITLE_INIT = '初始化局部變量';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_DEFAULT_NAME = '我的變量';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_INPUT_TO = '為';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_IN_DO = '作用範圍';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_COLLAPSED_TEXT = '局部變量';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_TOOLTIP = '創建指定範圍內語句塊所使用的變量';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_TRANSLATED_NAME = '初始化局部變量';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_EXPRESSION_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/variables#return';
// 這些別不同之間的語句和表達式
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_EXPRESSION_TITLE_INIT = '初始化表達式變量';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_EXPRESSION_INPUT_NAME = '我的變量';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_EXPRESSION_INPUT_TO = '為';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_EXPRESSION_IN_RETURN = '作用範圍';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_EXPRESSION_COLLAPSED_TEXT = '表達式變量';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_EXPRESSION_TOOLTIP = '創建指定表達式所使用的變量';
Blockly.Msg.LANG_VARIABLES_LOCAL_DECLARATION_EXPRESSION_TRANSLATED_NAME = '初始化表達式變量';
Blockly.Msg.LANG_VARIABLES_LOCAL_MUTATOR_CONTAINER_TITLE_LOCAL_NAMES = '輸入項';
Blockly.Msg.LANG_VARIABLES_LOCAL_MUTATOR_CONTAINER_TOOLTIP = '';
Blockly.Msg.LANG_VARIABLES_LOCAL_MUTATOR_ARG_TITLE_NAME = '參數';
Blockly.Msg.LANG_VARIABLES_LOCAL_MUTATOR_ARG_DEFAULT_VARIABLE = 'x';
// Procedures Blocks.
Blockly.Msg.LANG_PROCEDURES_DEFNORETURN_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/procedures#do';
Blockly.Msg.LANG_PROCEDURES_DEFNORETURN_DEFINE = '定義過程';
Blockly.Msg.LANG_PROCEDURES_DEFNORETURN_PROCEDURE = '我的過程';
Blockly.Msg.LANG_PROCEDURES_DEFNORETURN_DO = '執行語句';
Blockly.Msg.LANG_PROCEDURES_DEFNORETURN_COLLAPSED_PREFIX = '定義過程';
Blockly.Msg.LANG_PROCEDURES_DEFNORETURN_TOOLTIP = '語句執行完成後,不返回結果';
Blockly.Msg.LANG_PROCEDURES_DOTHENRETURN_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/procedures#doreturn';
Blockly.Msg.LANG_PROCEDURES_DOTHENRETURN_THEN_RETURN = '然後返回';
Blockly.Msg.LANG_PROCEDURES_DOTHENRETURN_DO = '執行語句';
Blockly.Msg.LANG_PROCEDURES_DOTHENRETURN_RETURN = '返回';
Blockly.Msg.LANG_PROCEDURES_DOTHENRETURN_TOOLTIP = '“執行”其中包含的塊並返回壹條語句, 可以實現在過程執行前將返回數據賦值給相關變量';
Blockly.Msg.LANG_PROCEDURES_DOTHENRETURN_COLLAPSED_TEXT = '執行/返回';
Blockly.Msg.LANG_PROCEDURES_DEFRETURN_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/procedures#return';
Blockly.Msg.LANG_PROCEDURES_DEFRETURN_DEFINE = '定義過程';
Blockly.Msg.LANG_PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.LANG_PROCEDURES_DEFNORETURN_PROCEDURE;
Blockly.Msg.LANG_PROCEDURES_DEFRETURN_DO = Blockly.Msg.LANG_PROCEDURES_DEFNORETURN_DO;
Blockly.Msg.LANG_PROCEDURES_DEFRETURN_RETURN = '返回';
Blockly.Msg.LANG_PROCEDURES_DEFRETURN_COLLAPSED_PREFIX = '定義過程';
Blockly.Msg.LANG_PROCEDURES_DEFRETURN_TOOLTIP = '語句執行完成後,會返回結果';
Blockly.Msg.LANG_PROCEDURES_DEF_DUPLICATE_WARNING = '警告:\n' +
'此過程的輸入項\n' +
'出現重復';
Blockly.Msg.LANG_PROCEDURES_GET_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/procedures#get';
Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/procedures#do';
Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_CALL = '調用';
Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_PROCEDURE = '過程';
Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_COLLAPSED_PREFIX = '調用';
Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_TOOLTIP = '調用無返回值過程';
Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_TRANSLATED_NAME = '調用無返回值過程';
Blockly.Msg.LANG_PROCEDURES_CALLRETURN_HELPURL = 'http://appinventor.mit.edu/explore/ai2/support/blocks/procedures#return';
Blockly.Msg.LANG_PROCEDURES_CALLRETURN_CALL = Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_CALL;
Blockly.Msg.LANG_PROCEDURES_CALLRETURN_PROCEDURE = Blockly.Msg.LANG_PROCEDURES_CALLNORETURN_PROCEDURE;
Blockly.Msg.LANG_PROCEDURES_CALLRETURN_COLLAPSED_PREFIX = '調用';
Blockly.Msg.LANG_PROCEDURES_CALLRETURN_TOOLTIP = '調用有返回值過程';
Blockly.Msg.LANG_PROCEDURES_CALLRETURN_TRANSLATED_NAME = '調用有返回值過程';
Blockly.Msg.LANG_PROCEDURES_MUTATORCONTAINER_TITLE = '輸入項';
Blockly.Msg.LANG_PROCEDURES_MUTATORARG_TITLE = '輸入:';
Blockly.Msg.LANG_PROCEDURES_HIGHLIGHT_DEF = '突出顯示過程';
Blockly.Msg.LANG_PROCEDURES_MUTATORCONTAINER_TOOLTIP = '';
Blockly.Msg.LANG_PROCEDURES_MUTATORARG_TOOLTIP = '';
// Components Blocks.
Blockly.Msg.LANG_COMPONENT_BLOCK_HELPURL = '';
Blockly.Msg.LANG_COMPONENT_BLOCK_TITLE_WHEN = '當';
Blockly.Msg.LANG_COMPONENT_BLOCK_TITLE_DO = '執行';
Blockly.Msg.LANG_COMPONENT_BLOCK_METHOD_HELPURL = '';
Blockly.Msg.LANG_COMPONENT_BLOCK_METHOD_TITLE_CALL = '調用';
Blockly.Msg.LANG_COMPONENT_BLOCK_GENERIC_METHOD_HELPURL = '';
Blockly.Msg.LANG_COMPONENT_BLOCK_GENERIC_METHOD_TITLE_CALL = '調用';
Blockly.Msg.LANG_COMPONENT_BLOCK_GENERIC_METHOD_TITLE_FOR_COMPONENT = '組件';
Blockly.Msg.LANG_COMPONENT_BLOCK_GETTER_HELPURL = '';
Blockly.Msg.LANG_COMPONENT_BLOCK_GENERIC_GETTER_HELPURL = '';
Blockly.Msg.LANG_COMPONENT_BLOCK_GENERIC_GETTER_TITLE_OF_COMPONENT = '組件';
Blockly.Msg.LANG_COMPONENT_BLOCK_SETTER_HELPURL = '';
Blockly.Msg.LANG_COMPONENT_BLOCK_SETTER_TITLE_SET = '設';
Blockly.Msg.LANG_COMPONENT_BLOCK_SETTER_TITLE_TO = '為';
Blockly.Msg.LANG_COMPONENT_BLOCK_GENERIC_SETTER_HELPURL = '';
Blockly.Msg.LANG_COMPONENT_BLOCK_GENERIC_SETTER_TITLE_SET = '設';
Blockly.Msg.LANG_COMPONENT_BLOCK_GENERIC_SETTER_TITLE_TO = '為';
Blockly.Msg.LANG_COMPONENT_BLOCK_GENERIC_SETTER_TITLE_OF_COMPONENT = '組件';
///////////////////
/* HelpURLs for Component Blocks */
//User Interface Components
Blockly.Msg.LANG_COMPONENT_BLOCK_BUTTON_HELPURL = '/reference/components/userinterface.html#Button';
Blockly.Msg.LANG_COMPONENT_BLOCK_BUTTON_PROPERTIES_HELPURL = '/reference/components/userinterface.html#buttonproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_BUTTON_EVENTS_HELPURL = '/reference/components/userinterface.html#buttonevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_CHECKBOX_HELPURL = '/reference/components/userinterface.html#CheckBox';
Blockly.Msg.LANG_COMPONENT_BLOCK_CHECKBOX_PROPERTIES_HELPURL = '/reference/components/userinterface.html#checkboxproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_CHECKBOX_EVENTS_HELPURL = '/reference/components/userinterface.html#checkboxevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_CLOCK_HELPURL = '/reference/components/userinterface.html#Clock';
Blockly.Msg.LANG_COMPONENT_BLOCK_CLOCK_PROPERTIES_HELPURL = '/reference/components/userinterface.html#clockproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_CLOCK_EVENTS_HELPURL = '/reference/components/userinterface.html#clockevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_CLOCK_METHODS_HELPURL = '/reference/components/userinterface.html#clockmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_IMAGE_HELPURL = '/reference/components/userinterface.html#Image';
Blockly.Msg.LANG_COMPONENT_BLOCK_IMAGE_PROPERTIES_HELPURL = '/reference/components/userinterface.html#imageproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_IMAGE_EVENTS_HELPURL = '/reference/components/userinterface.html#imageevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_IMAGE_METHODS_HELPURL = '/reference/components/userinterface.html#imagemethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_LABEL_HELPURL = '/reference/components/userinterface.html#Label';
Blockly.Msg.LANG_COMPONENT_BLOCK_LABEL_PROPERTIES_HELPURL = '/reference/components/userinterface.html#labelproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_LABEL_EVENTS_HELPURL = '/reference/components/userinterface.html#labelevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_LABEL_METHODS_HELPURL = '/reference/components/userinterface.html#labelmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_LISTPICKER_HELPURL = '/reference/components/userinterface.html#ListPicker';
Blockly.Msg.LANG_COMPONENT_BLOCK_LISTPICKER_PROPERTIES_HELPURL = '/reference/components/userinterface.html#listpickerproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_LISTPICKER_EVENTS_HELPURL = '/reference/components/userinterface.html#listpickerevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_LISTPICKER_METHODS_HELPURL = '/reference/components/userinterface.html#listpickermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_NOTIFIER_HELPURL = '/reference/components/userinterface.html#Notifier';
Blockly.Msg.LANG_COMPONENT_BLOCK_NOTIFIER_PROPERTIES_HELPURL = '/reference/components/userinterface.html#notifierproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_NOTIFIER_EVENTS_HELPURL = '/reference/components/userinterface.html#notifierevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_NOTIFIER_METHODS_HELPURL = '/reference/components/userinterface.html#notifiermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_PASSWORDTEXTBOX_HELPURL = '/reference/components/userinterface.html#PasswordTextBox';
Blockly.Msg.LANG_COMPONENT_BLOCK_PASSWORDTEXTBOX_PROPERTIES_HELPURL = '/reference/components/userinterface.html#pwdboxproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_PASSWORDTEXTBOX_EVENTS_HELPURL = '/reference/components/userinterface.html#pwdboxevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_PASSWORDTEXTBOX_METHODS_HELPURL = '/reference/components/userinterface.html#pwdboxmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_SCREEN_HELPURL = '/reference/components/userinterface.html#Screen';
Blockly.Msg.LANG_COMPONENT_BLOCK_SCREEN_PROPERTIES_HELPURL = '/reference/components/userinterface.html#screenproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_SCREEN_EVENTS_HELPURL = '/reference/components/userinterface.html#screenevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_SCREEN_METHODS_HELPURL = '/reference/components/userinterface.html#screenmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_SLIDER_HELPURL = '/reference/components/userinterface.html#Slider';
Blockly.Msg.LANG_COMPONENT_BLOCK_SLIDER_PROPERTIES_HELPURL = '/reference/components/userinterface.html#sliderproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_SLIDER_EVENTS_HELPURL = '/reference/components/userinterface.html#sliderevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_SLIDER_METHODS_HELPURL = '/reference/components/userinterface.html#slidermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_TEXTBOX_HELPURL = '/reference/components/userinterface.html#TextBox';
Blockly.Msg.LANG_COMPONENT_BLOCK_TEXTBOX_PROPERTIES_HELPURL = '/reference/components/userinterface.html#textboxproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_TEXTBOX_EVENTS_HELPURL = '/reference/components/userinterface.html#textboxevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_TEXTBOX_METHODS_HELPURL = '/reference/components/userinterface.html#textboxmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_WEBVIEWER_HELPURL = '/reference/components/userinterface.html#WebViewer';
Blockly.Msg.LANG_COMPONENT_BLOCK_WEBVIEWER_PROPERTIES_HELPURL = '/reference/components/userinterface.html#webviewerproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_WEBVIEWER_EVENTS_HELPURL = '/reference/components/userinterface.html#webviewerevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_WEBVIEWER_METHODS_HELPURL = '/reference/components/userinterface.html#webviewermethods';
//Layout components
Blockly.Msg.LANG_COMPONENT_BLOCK_HORIZARRANGE_HELPURL = '/reference/components/layout.html#HorizontalArrangement';
Blockly.Msg.LANG_COMPONENT_BLOCK_HORIZARRANGE_PROPERTIES_HELPURL = '/reference/components/layout.html#horizarrangeproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_VERTARRANGE_HELPURL = '/reference/components/layout.html#VerticalArrangement';
Blockly.Msg.LANG_COMPONENT_BLOCK_VERTARRANGE_PROPERTIES_HELPURL = '/reference/components/layout.html#vertarrangeproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_TABLEARRANGE_HELPURL = '/reference/components/layout.html#TableArrangement';
Blockly.Msg.LANG_COMPONENT_BLOCK_TABLEARRANGE_PROPERTIES_HELPURL = '/reference/components/layout.html#tablearrangeproperties';
//Media components
Blockly.Msg.LANG_COMPONENT_BLOCK_CAMCORDER_HELPURL = '/reference/components/media.html#Camcorder';
Blockly.Msg.LANG_COMPONENT_BLOCK_CAMCORDER_PROPERTIES_HELPURL = '/reference/components/media.html#camcorderproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_CAMCORDER_EVENTS_HELPURL = '/reference/components/media.html#camcorderevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_CAMCORDER_METHODS_HELPURL = '/reference/components/media.html#camcordermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_CAMERA_HELPURL = '/reference/components/media.html#Camera';
Blockly.Msg.LANG_COMPONENT_BLOCK_CAMERA_PROPERTIES_HELPURL = '/reference/components/media.html#cameraproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_CAMERA_EVENTS_HELPURL = '/reference/components/media.html#cameraevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_CAMERA_METHODS_HELPURL = '/reference/components/media.html#cameramethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_IMAGEPICKER_HELPURL = '/reference/components/media.html#ImagePicker';
Blockly.Msg.LANG_COMPONENT_BLOCK_IMAGEPICKER_PROPERTIES_HELPURL = '/reference/components/media.html#imagepickerproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_IMAGEPICKER_EVENTS_HELPURL = '/reference/components/media.html#imagepickerevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_IMAGEPICKER_METHODS_HELPURL = '/reference/components/media.html#imagepickermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_PLAYER_HELPURL = '/reference/components/media.html#Player';
Blockly.Msg.LANG_COMPONENT_BLOCK_PLAYER_PROPERTIES_HELPURL = '/reference/components/media.html#playerproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_PLAYER_EVENTS_HELPURL = '/reference/components/media.html#playerevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_PLAYER_METHODS_HELPURL = '/reference/components/media.html#playermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_SOUND_HELPURL = '/reference/components/media.html#Sound';
Blockly.Msg.LANG_COMPONENT_BLOCK_SOUND_PROPERTIES_HELPURL = '/reference/components/media.html#soundproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_SOUND_EVENTS_HELPURL = '/reference/components/media.html#soundevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_SOUND_METHODS_HELPURL = '/reference/components/media.html#soundmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_SOUNDRECORDER_HELPURL = '/reference/components/media.html#SoundRecorder';
Blockly.Msg.LANG_COMPONENT_BLOCK_SOUNDRECORDER_PROPERTIES_HELPURL = '/reference/components/media.html#soundrecorderproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_SOUNDRECORDER_EVENTS_HELPURL = '/reference/components/media.html#soundrecorderevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_SOUNDRECORDER_METHODS_HELPURL = '/reference/components/media.html#soundrecordermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_SPEECHRECOGNIZER_HELPURL = '/reference/components/media.html#SpeechRecognizer';
Blockly.Msg.LANG_COMPONENT_BLOCK_SPEECHRECOGNIZER_PROPERTIES_HELPURL = '/reference/components/media.html#speechrecognizerproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_SPEECHRECOGNIZER_EVENTS_HELPURL = '/reference/components/media.html#speechrecognizerevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_SPEECHRECOGNIZER_METHODS_HELPURL = '/reference/components/media.html#speechrecognizermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_TEXTTOSPEECH_HELPURL = '/reference/components/media.html#TextToSpeech';
Blockly.Msg.LANG_COMPONENT_BLOCK_TEXTTOSPEECH_PROPERTIES_HELPURL = '/reference/components/media.html#texttospeechproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_TEXTTOSPEECH_EVENTS_HELPURL = '/reference/components/media.html#texttospeechevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_TEXTTOSPEECH_METHODS_HELPURL = '/reference/components/media.html#texttospeechmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_VIDEOPLAYER_HELPURL = '/reference/components/media.html#VideoPlayer';
Blockly.Msg.LANG_COMPONENT_BLOCK_VIDEOPLAYER_PROPERTIES_HELPURL = '/reference/components/media.html#videoplayerproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_VIDEOPLAYER_EVENTS_HELPURL = '/reference/components/media.html#videoplayerevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_VIDEOPLAYER_METHODS_HELPURL = '/reference/components/media.html#videoplayermethods';
// Drawing and Animation components
Blockly.Msg.LANG_COMPONENT_BLOCK_BALL_HELPURL = '/reference/components/animation.html#Ball';
Blockly.Msg.LANG_COMPONENT_BLOCK_BALL_PROPERTIES_HELPURL = '/reference/components/animation.html#ballproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_BALL_EVENTS_HELPURL = '/reference/components/animation.html#ballevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_BALL_METHODS_HELPURL = '/reference/components/animation.html#ballmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_CANVAS_HELPURL = '/reference/components/animation.html#Canvas';
Blockly.Msg.LANG_COMPONENT_BLOCK_CANVAS_PROPERTIES_HELPURL = '/reference/components/animation.html#canvasproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_CANVAS_EVENTS_HELPURL = '/reference/components/animation.html#canvasevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_CANVAS_METHODS_HELPURL = '/reference/components/animation.html#canvasmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_IMAGESPRITE_HELPURL = '/reference/components/animation.html#ImageSprite';
Blockly.Msg.LANG_COMPONENT_BLOCK_IMAGESPRITE_PROPERTIES_HELPURL = '/reference/components/animation.html#imagespriteproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_IMAGESPRITE_EVENTS_HELPURL = '/reference/components/animation.html#imagespriteevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_IMAGESPRITE_METHODS_HELPURL = '/reference/components/animation.html#imagespritemethods';
//Sensor components
Blockly.Msg.LANG_COMPONENT_BLOCK_ACCELEROMETERSENSOR_HELPURL = '/reference/components/sensor.html#AccelerometerSensor';
Blockly.Msg.LANG_COMPONENT_BLOCK_ACCELEROMETERSENSOR_PROPERTIES_HELPURL = '/reference/components/sensor.html#accelerometersensorproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_ACCELEROMETERSENSOR_EVENTS_HELPURL = '/reference/components/sensor.html#accelerometersensorevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_ACCELEROMETERSENSOR_METHODS_HELPURL = '/reference/components/sensor.html#accelerometersensormethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_BARCODESCANNER_HELPURL = '/reference/components/sensor.html#BarcodeScanner';
Blockly.Msg.LANG_COMPONENT_BLOCK_BARCODESCANNER_PROPERTIES_HELPURL = '/reference/components/sensor.html#barcodescannerproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_BARCODESCANNER_EVENTS_HELPURL = '/reference/components/sensor.html#barcodescannerevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_BARCODESCANNER_METHODS_HELPURL = '/reference/components/sensor.html#barcodescannermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_LOCATIONSENSOR_HELPURL = '/reference/components/sensor.html#LocationSensor';
Blockly.Msg.LANG_COMPONENT_BLOCK_LOCATIONSENSOR_PROPERTIES_HELPURL = '/reference/components/sensor.html#locationsensorproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_LOCATIONSENSOR_EVENTS_HELPURL = '/reference/components/sensor.html#locationsensorevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_LOCATIONSENSOR_METHODS_HELPURL = '/reference/components/sensor.html#locationsensormethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_ORIENTATIONSENSOR_HELPURL = '/reference/components/sensor.html#OrientationSensor';
Blockly.Msg.LANG_COMPONENT_BLOCK_ORIENTATIONSENSOR_PROPERTIES_HELPURL = '/reference/components/sensor.html#orientationsensorproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_ORIENTATIONSENSOR_EVENTS_HELPURL = '/reference/components/sensor.html#orientationsensorevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_ORIENTATIONSENSOR_METHODS_HELPURL = '/reference/components/sensor.html#orientationsensormethods';
//Social components
Blockly.Msg.LANG_COMPONENT_BLOCK_CONTACTPICKER_HELPURL = '/reference/components/social.html#ContactPicker';
Blockly.Msg.LANG_COMPONENT_BLOCK_CONTACTPICKER_PROPERTIES_HELPURL = '/reference/components/social.html#contactpickerproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_CONTACTPICKER_EVENTS_HELPURL = '/reference/components/social.html#contactpickerevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_CONTACTPICKER_METHODS_HELPURL = '/reference/components/social.html#contactpickermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_EMAILPICKER_HELPURL = '/reference/components/social.html#EmailPicker';
Blockly.Msg.LANG_COMPONENT_BLOCK_EMAILPICKER_PROPERTIES_HELPURL = '/reference/components/social.html#emailpickerproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_EMAILPICKER_EVENTS_HELPURL = '/reference/components/social.html#emailpickerevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_EMAILPICKER_METHODS_HELPURL = '/reference/components/social.html#emailpickermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_PHONECALL_HELPURL = '/reference/components/social.html#PhoneCall';
Blockly.Msg.LANG_COMPONENT_BLOCK_PHONECALL_PROPERTIES_HELPURL = '/reference/components/social.html#phonecallproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_PHONECALL_EVENTS_HELPURL = '/reference/components/social.html#phonecallevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_PHONECALL_METHODS_HELPURL = '/reference/components/social.html#phonecallmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_PHONENUMBERPICKER_HELPURL = '/reference/components/social.html#PhoneNumberPicker';
Blockly.Msg.LANG_COMPONENT_BLOCK_PHONENUMBERPICKER_PROPERTIES_HELPURL = '/reference/components/social.html#phonenumberpickerproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_PHONENUMBERPICKER_EVENTS_HELPURL = '/reference/components/social.html#phonenumberpickerevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_PHONENUMBERPICKER_METHODS_HELPURL = '/reference/components/social.html#phonenumberpickermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_TEXTING_HELPURL = '/reference/components/social.html#Texting';
Blockly.Msg.LANG_COMPONENT_BLOCK_TEXTING_PROPERTIES_HELPURL = '/reference/components/social.html#textingproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_TEXTING_EVENTS_HELPURL = '/reference/components/social.html#textingevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_TEXTING_METHODS_HELPURL = '/reference/components/social.html#textingmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_TWITTER_HELPURL = '/reference/components/social.html#Twitter';
Blockly.Msg.LANG_COMPONENT_BLOCK_TWITTER_PROPERTIES_HELPURL = '/reference/components/social.html#twitterproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_TWITTER_EVENTS_HELPURL = '/reference/components/social.html#twitterevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_TWITTER_METHODS_HELPURL = '/reference/components/social.html#twittermethods';
//Storage Components
Blockly.Msg.LANG_COMPONENT_BLOCK_FUSIONTABLESCONTROL_HELPURL = '/reference/components/storage.html#FusiontablesControl';
Blockly.Msg.LANG_COMPONENT_BLOCK_FUSIONTABLESCONTROL_PROPERTIES_HELPURL = '/reference/components/storage.html#fusiontablescontrolproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_FUSIONTABLESCONTROL_EVENTS_HELPURL = '/reference/components/storage.html#fusiontablescontrolevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_FUSIONTABLESCONTROL_METHODS_HELPURL = '/reference/components/storage.html#fusiontablescontrolmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_TINYDB_HELPURL = '/reference/components/storage.html#TinyDB';
Blockly.Msg.LANG_COMPONENT_BLOCK_TINYDB_PROPERTIES_HELPURL = '/reference/components/storage.html#tinydbproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_TINYDB_EVENTS_HELPURL = '/reference/components/storage.html#tinydbevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_TINYDB_METHODS_HELPURL = '/reference/components/storage.html#tinydbmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_TINYWEBDB_HELPURL = '/reference/components/storage.html#TinyWebDB';
Blockly.Msg.LANG_COMPONENT_BLOCK_TINYWEBDB_PROPERTIES_HELPURL = '/reference/components/storage.html#tinywebdbproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_TINYWEBDB_EVENTS_HELPURL = '/reference/components/storage.html#tinywebdbevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_TINYWEBDB_METHODS_HELPURL = '/reference/components/storage.html#tinywebdbmethods';
//Connectivity components
Blockly.Msg.LANG_COMPONENT_BLOCK_ACTIVITYSTARTER_HELPURL = '/reference/components/connectivity.html#ActivityStarter';
Blockly.Msg.LANG_COMPONENT_BLOCK_ACTIVITYSTARTER_PROPERTIES_HELPURL = '/reference/components/connectivity.html#activitystarterproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_ACTIVITYSTARTER_EVENTS_HELPURL = '/reference/components/connectivity.html#activitystarterevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_ACTIVITYSTARTER_METHODS_HELPURL = '/reference/components/connectivity.html#activitystartermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_BLUETOOTHCLIENT_HELPURL = '/reference/components/connectivity.html#BluetoothClient';
Blockly.Msg.LANG_COMPONENT_BLOCK_BLUETOOTHCLIENT_PROPERTIES_HELPURL = '/reference/components/connectivity.html#bluetoothclientproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_BLUETOOTHCLIENT_EVENTS_HELPURL = '/reference/components/connectivity.html#bluetoothclientevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_BLUETOOTHCLIENT_METHODS_HELPURL = '/reference/components/connectivity.html#bluetoothclientmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_BLUETOOTHSERVER_HELPURL = '/reference/components/connectivity.html#BluetoothServer';
Blockly.Msg.LANG_COMPONENT_BLOCK_BLUETOOTHSERVER_PROPERTIES_HELPURL = '/reference/components/connectivity.html#bluetoothserverproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_BLUETOOTHSERVER_EVENTS_HELPURL = '/reference/components/connectivity.html#bluetoothserverevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_BLUETOOTHSERVER_METHODS_HELPURL = '/reference/components/connectivity.html#bluetoothservermethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_WEB_HELPURL = '/reference/components/connectivity.html#Web';
Blockly.Msg.LANG_COMPONENT_BLOCK_WEB_PROPERTIES_HELPURL = '/reference/components/connectivity.html#webproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_WEB_EVENTS_HELPURL = '/reference/components/connectivity.html#webevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_WEB_METHODS_HELPURL = '/reference/components/connectivity.html#webmethods';
//Lego mindstorms components
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTDIRECT_HELPURL = '/reference/components/legomindstorms.html#NxtDirectCommands';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTDIRECT_PROPERTIES_HELPURL = '/reference/components/legomindstorms.html#nxtdirectproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTDIRECT_METHODS_HELPURL = '/reference/components/legomindstorms.html#nxtdirectmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTCOLOR_HELPURL = '/reference/components/legomindstorms.html#NxtColorSensor';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTCOLOR_PROPERTIES_HELPURL = '/reference/components/legomindstorms.html#nxtcolorproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTCOLOR_EVENTS_HELPURL = '/reference/components/legomindstorms.html#nxtcolorevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTCOLOR_METHODS_HELPURL = '/reference/components/legomindstorms.html#nxtcolormethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTLIGHT_HELPURL = '/reference/components/legomindstorms.html#NxtLightSensor';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTLIGHT_PROPERTIES_HELPURL = '/reference/components/legomindstorms.html#nxtlightproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTLIGHT_EVENTS_HELPURL = '/reference/components/legomindstorms.html#nxtlightevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTLIGHT_METHODS_HELPURL = '/reference/components/legomindstorms.html#nxtlightmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTSOUND_HELPURL = '/reference/components/legomindstorms.html#NxtSoundSensor';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTSOUND_PROPERTIES_HELPURL = '/reference/components/legomindstorms.html#nxtsoundproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTSOUND_EVENTS_HELPURL = '/reference/components/legomindstorms.html#nxtsoundevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTSOUND_METHODS_HELPURL = '/reference/components/legomindstorms.html#nxtsoundmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTTOUCH_HELPURL = '/reference/components/legomindstorms.html#NxtTouchSensor';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTTOUCH_PROPERTIES_HELPURL = '/reference/components/legomindstorms.html#nxttouchproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTTOUCH_EVENTS_HELPURL = '/reference/components/legomindstorms.html#nxttouchevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTTOUCH_METHODS_HELPURL = '/reference/components/legomindstorms.html#nxttouchmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTULTRASONIC_HELPURL = '/reference/components/legomindstorms.html#NxtUltrasonicSensor';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTULTRASONIC_PROPERTIES_HELPURL = '/reference/components/legomindstorms.html#nxtultrasonicproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTULTRASONIC_EVENTS_HELPURL = '/reference/components/legomindstorms.html#nxtultrasonicevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTULTRASONIC_METHODS_HELPURL = '/reference/components/legomindstorms.html#nxtultrasonicmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTDRIVE_HELPURL = '/reference/components/legomindstorms.html#NxtDrive';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTDRIVE_PROPERTIES_HELPURL = '/reference/components/legomindstorms.html#nxtdriveproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_NXTDRIVE_METHODS_HELPURL = '/reference/components/legomindstorms.html#nxtdrivemethods';
//Internal components
Blockly.Msg.LANG_COMPONENT_BLOCK_GAMECLIENT_HELPURL = '/reference/components/internal.html#GameClient';
Blockly.Msg.LANG_COMPONENT_BLOCK_GAMECLIENT_PROPERTIES_HELPURL = '/reference/components/internal.html#gameclientproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_GAMECLIENT_EVENTS_HELPURL = '/reference/components/internal.html#gameclientevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_GAMECLIENT_METHODS_HELPURL = '/reference/components/internal.html#gameclientmethods';
Blockly.Msg.LANG_COMPONENT_BLOCK_VOTING_HELPURL = '/reference/components/internal.html#Voting';
Blockly.Msg.LANG_COMPONENT_BLOCK_VOTING_PROPERTIES_HELPURL = '/reference/components/internal.html#votingproperties';
Blockly.Msg.LANG_COMPONENT_BLOCK_VOTING_EVENTS_HELPURL = '/reference/components/internal.html#votingevents';
Blockly.Msg.LANG_COMPONENT_BLOCK_VOTING_METHODS_HELPURL = '/reference/components/internal.html#votingmethods';
//Misc
Blockly.Msg.SHOW_WARNINGS = "顯示警告";
Blockly.Msg.HIDE_WARNINGS = "隱藏警告";
Blockly.Msg.MISSING_SOCKETS_WARNINGS = "妳應該為模塊的每個端口都填上模塊";
Blockly.Msg.WRONG_TYPE_BLOCK_WARINGS = "這個模塊應該連上事件或者過程模塊";
//Replmgr.js messages
Blockly.Msg.REPL_ERROR_FROM_COMPANION ="AI伴侶出現錯誤";
Blockly.Msg.REPL_NETWORK_CONNECTION_ERROR ="發生網絡連接故障";
Blockly.Msg.REPL_NETWORK_ERROR ="網絡故障";
Blockly.Msg.REPL_NETWORK_ERROR_RESTART ="與AI伴侶通信故障,<br />請嘗試重啟伴侶程序並重新連接";
Blockly.Msg.REPL_OK ="確定";
Blockly.Msg.REPL_COMPANION_VERSION_CHECK ="檢查伴侶程序版本";
Blockly.Msg.REPL_COMPANION_OUT_OF_DATE = '伴侶程序已過期,點擊確定鍵升級。';
Blockly.Msg.REPL_EMULATORS ="查看模擬器";
Blockly.Msg.REPL_DEVICES ="設備";
Blockly.Msg.REPL_APPROVE_UPDATE ="屏幕,確認升級";
Blockly.Msg.REPL_NOT_NOW ="現在不";
Blockly.Msg.REPL_COMPANION_OUT_OF_DATE1 ="妳使用的伴侶程序已經過期,<br/><br/>本版App Inventor適用的伴侶程序版本為";
Blockly.Msg.REPL_COMPANION_OUT_OF_DATE_IMMEDIATE ="妳正在使用壹個過期版本的伴侶程序,請盡快升級";
Blockly.Msg.REPL_DISMISS ="放棄";
Blockly.Msg.REPL_SOFTWARE_UPDATE ="軟件升級";
Blockly.Msg.REPL_OK_LOWER ="確定";
Blockly.Msg.REPL_GOT_IT ="升級完成";
Blockly.Msg.REPL_UPDATE_INFO = '正在安裝升級包,請在設備(或模擬器)上檢查確認。<br /><br />註意:升級完成後,請選擇“完成”(不要選打開)。然後在瀏覽器中打開並進入App Inventor,點擊“連接設備”並選擇“重置連接”項。';
Blockly.Msg.REPL_UNABLE_TO_UPDATE ="無法將升級包發送給設備或模擬器";
Blockly.Msg.REPL_UNABLE_TO_LOAD ="無法從App Inventor服務器下載升級包";
Blockly.Msg.REPL_UNABLE_TO_LOAD_NO_RESPOND ="無法App Inventor服務器(服務器沒有響應)加載更新信息";
Blockly.Msg.REPL_NOW_DOWNLOADING ="正在從App Inventor服務器下載升級包,請耐心等待。";
Blockly.Msg.REPL_RUNTIME_ERROR ="運行故障";
Blockly.Msg.REPL_NO_ERROR_FIVE_SECONDS ="<br/><i>註意:</i> 5秒鐘後將顯示另壹條錯誤信息。";
Blockly.Msg.REPL_CONNECTING_USB_CABLE ="正在通過USB電纜連接";
Blockly.Msg.REPL_STARTING_EMULATOR ="正在啟動Android模擬器<br/>請等待:可能需要壹至兩分鐘";
Blockly.Msg.REPL_CONNECTING ="連接中...";
Blockly.Msg.REPL_CANCEL ="取消";
Blockly.Msg.REPL_GIVE_UP ="放棄";
Blockly.Msg.REPL_KEEP_TRYING ="重試";
Blockly.Msg.REPL_CONNECTION_FAILURE1 ="連接失敗";
Blockly.Msg.REPL_NO_START_EMULATOR ="無法在模擬器中啟動伴侶程序";
Blockly.Msg.REPL_PLUGGED_IN_Q ="是否已插入電纜?";
Blockly.Msg.REPL_AI_NO_SEE_DEVICE ="AI2沒有看到妳的設備,請確認電纜連接以及驅動程序安裝是否正常。";
Blockly.Msg.REPL_HELPER_Q ="是否運行助手?";
Blockly.Msg.REPL_HELPER_NOT_RUNNING = 'aiStarter助手程序不在執行狀態中,<br />是否需要<a href="http://appinventor.mit.edu" target="_blank">幫助?</a>';
Blockly.Msg.REPL_USB_CONNECTED_WAIT ="已連接USB,請等待";
Blockly.Msg.REPL_SECONDS_ENSURE_RUNNING ="秒,確保相關資源全部加載。";
Blockly.Msg.REPL_EMULATOR_STARTED ="模擬器已運行,請等待";
Blockly.Msg.REPL_STARTING_COMPANION_ON_PHONE ="正在所連接電話設備中啟動伴侶程序";
Blockly.Msg.REPL_STARTING_COMPANION_IN_EMULATOR ="正在模擬器中啟動伴侶程序";
Blockly.Msg.REPL_COMPANION_STARTED_WAITING ="伴侶程序啟動中,請等待";
Blockly.Msg.REPL_VERIFYING_COMPANION ="檢查伴侶程序啟動狀態....";
Blockly.Msg.REPL_CONNECT_TO_COMPANION ="連接伴侶程序";
Blockly.Msg.REPL_TRY_AGAIN1 ="無法連接伴侶程序,請重新連接。";
Blockly.Msg.REPL_YOUR_CODE_IS ="編碼為:";
Blockly.Msg.REPL_DO_YOU_REALLY_Q ="妳真的要這麽做嗎?";
Blockly.Msg.REPL_FACTORY_RESET = "這將使模擬器重置為出廠模式,如果此前升級過伴侶程序,則需要重新升級。";
// Messages from Blockly.js
Blockly.Msg.WARNING_DELETE_X_BLOCKS = "你確定要全部刪除 %1 個這些模塊嗎?";
// Blocklyeditor.js
Blockly.Msg.GENERATE_YAIL = "生成 Yail";
Blockly.Msg.DO_IT = "實現功能";
Blockly.Msg.CAN_NOT_DO_IT = "不能實現功能";
Blockly.Msg.CONNECT_TO_DO_IT = '你必須要連接AI伴侶或者模擬器才能使用"實現功能"';
}
};
// Initalize language definition to English
Blockly.Msg.zh_tw.switch_language_to_chinese_tw.init();
|
satgod/appinventor
|
appinventor/blocklyeditor/src/msg/zh_tw/_messages.js
|
JavaScript
|
mit
| 93,979
|
<html>
<META HTTP-EQUIV=Content-Type Content="text/html; charset=big5">
<!-- Mirrored from lis.ly.gov.tw/lghtml/lawstat/version2/02547/02547101122500.htm by HTTrack Website Copier/3.x [XR&CO'2010], Sun, 24 Mar 2013 09:20:01 GMT -->
<head><title>ªk½s¸¹:02547 ª©¥»:101122500</title>
<link rel="stylesheet" type="text/css" href="../../version.css" >
</HEAD>
<body><left>
<table><tr><td><FONT COLOR=blue SIZE=5>ºò«æÂåÀø±ÏÅ@ªk(02547)</font>
<table><tr><td> </td><td>
<table><tr><td> </td><td>
<table><tr><td> </td>
<tr><td align=left valign=top>
<a href=0254784071400.html target=law02547><nobr><font size=2>¤¤µØ¥Á°ê 84 ¦~ 7 ¤ë 14 ¤é</font></nobr></a>
</td>
<td valign=top><font size=2>¨î©w55±ø</font></td>
<tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 84 ¦~ 8 ¤ë 9 ¤é¤½¥¬</font></nobr></td>
<tr><td align=left valign=top>
<a href=0254789011400.html target=law02547><nobr><font size=2>¤¤µØ¥Á°ê 89 ¦~ 1 ¤ë 14 ¤é</font></nobr></a>
</td>
<td valign=top><font size=2>×¥¿²Ä4, 5, 8¦Ü11, 15, 20, 24, 30, 31, 41, 52±ø</font></td>
<tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 89 ¦~ 2 ¤ë 9 ¤é¤½¥¬</font></nobr></td>
<tr><td align=left valign=top>
<a href=0254791010800.html target=law02547><nobr><font size=2>¤¤µØ¥Á°ê 91 ¦~ 1 ¤ë 8 ¤é</font></nobr></a>
</td>
<td valign=top><font size=2>¼Wq²Ä48¤§1, 53¤§1±ø<br>
×¥¿²Ä15, 41, 48¦Ü50±ø</font></td>
<tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 91 ¦~ 1 ¤ë 30 ¤é¤½¥¬</font></nobr></td>
<tr><td align=left valign=top>
<a href=0254794011400.html target=law02547><nobr><font size=2>¤¤µØ¥Á°ê 94 ¦~ 1 ¤ë 14 ¤é</font></nobr></a>
</td>
<td valign=top><font size=2>×¥¿²Ä6±ø<br>
¼Wq²Ä22¤§1±ø</font></td>
<tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 94 ¦~ 2 ¤ë 5 ¤é¤½¥¬</font></nobr></td>
<tr><td align=left valign=top>
<a href=0254796060800.html target=law02547><nobr><font size=2>¤¤µØ¥Á°ê 96 ¦~ 6 ¤ë 8 ¤é</font></nobr></a>
</td>
<td valign=top><font size=2>×¥¿¥þ¤å58±ø</font></td>
<tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 96 ¦~ 7 ¤ë 11 ¤é¤½¥¬</font></nobr></td>
<tr><td align=left valign=top>
<a href=02547101122500.html target=law02547><nobr><font size=2>¤¤µØ¥Á°ê 101 ¦~ 12 ¤ë 25 ¤é</font></nobr></a>
</td>
<td valign=top><font size=2>¼Wq²Ä14¤§1, 14¤§2±ø<br>
×¥¿²Ä3, 5, 8, 12, 17, 22, 24, 25, 30, 32, 33±ø</font></td>
<tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 102 ¦~ 1 ¤ë 16 ¤é¤½¥¬</font></nobr></td>
</table></table></table></table>
<p><table><tr><td><font color=blue size=4>¥Á°ê101¦~12¤ë25¤é</font></td>
<td><a href=http://lis.ly.gov.tw/lghtml/lawstat/reason2/02547101122500.htm target=reason><font size=2>¥ßªk²z¥Ñ</font></a></td>
<td><a href=http://lis.ly.gov.tw/lgcgi/lglawproc?02547101122500 target=proc><font size=2>¥ßªk¬ö¿ý</font></a></td>
</table>
<table><tr><td> </td>
<td><font color=4000ff size=4>²Ä¤@³¹ Á`«h</font>
<table><tr><td> </td><td><font color=8000ff>²Ä¤@±ø</font>
<font size=2>(¥ßªk¥Øªº)</font>
<table><tr><td> </td>
<td>
¡@¡@¬°°·¥þºò«æÂåÀø±ÏÅ@Åé¨t¡A´£ª@ºò«æÂåÀø±ÏÅ@«~½è¡A¥H½T«Oºò«æ¶Ë¯f±w¤§¥Í©R¤Î°·±d¡A¯S¨î©w¥»ªk¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤G±ø</font>
<font size=2>(¥DºÞ¾÷Ãö)</font>
<table><tr><td> </td>
<td>
¡@¡@¥»ªk©ÒºÙ½Ã¥Í¥DºÞ¾÷Ãö¡G¦b¤¤¥¡¬°¦æ¬F°|½Ã¥Í¸p¡F¦bª½ÁÒ¥«¬°ª½ÁÒ¥«¬F©²¡F¦b¿¤¡]¥«¡^¬°¿¤¡]¥«¡^¬F©²¡C<br>
¡@¡@¥»ªk©ÒºÙ®ø¨¾¥DºÞ¾÷Ãö¡G¦b¤¤¥¡¬°¤º¬F³¡¡F¦bª½ÁÒ¥«¬°ª½ÁÒ¥«¬F©²¡F¦b¿¤¡]¥«¡^¬°¿¤¡]¥«¡^¬F©²¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤T±ø</font>
<font size=2>(ºò«æÂåÀø±ÏÅ@¨Æ¶µ)</font>
<table><tr><td> </td>
<td>
¡@¡@¥»ªk©ÒºÙºò«æÂåÀø±ÏÅ@¡A¥]¬A¤U¦C¨Æ¶µ¡G<br>
¡@¡@¤@¡Bºò«æ¶Ë¯f¡B¤j¶q¶Ë¯f±w©Î³¥¥~¦a°Ï¶Ë¯f¤§²{³õºò«æ±ÏÅ@¤ÎÂåÀø³B²z¡C<br>
¡@¡@¤G¡B°eÂå³~¤¤¤§ºò«æ±ÏÅ@¡C<br>
¡@¡@¤T¡B«¤j¶Ë¯f±w©ÎÂ÷®q¡B°¾»·¦a°ÏÃø¥H¶Eªv¤§¶Ë¯f±w¤§Âà¶E¡C<br>
¡@¡@¥|¡BÂåÀø¾÷ºc¤§ºò«æÂåÀø¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¥|±ø</font>
<font size=2>(ºò«æÂåÀø±ÏÅ@¤Hû¤§½d³ò)</font>
<table><tr><td> </td>
<td>
¡@¡@¥»ªk©ÒºÙºò«æÂåÀø±ÏÅ@¤Hû¡]¥H¤U²ºÙ±ÏÅ@¤Hû¡^¡A«üÂå®v¡BÅ@²z¤Hû¡B±ÏÅ@§Þ³Nû¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td>
<td><font color=4000ff size=4>²Ä¤G³¹ ºò«æÂåÀø±ÏÅ@Åé¨t</font>
<table><tr><td> </td><td><font color=8000ff>²Ä¤±ø</font>
<font size=2>(ºò«æÂåÀø±ÏÅ@Åé¨î¤Î¥þ°êºò«æÂåÀø±ÏÅ@pµe)</font>
<table><tr><td> </td>
<td>
¡@¡@¬°«P¶iºò«æÂåÀø±ÏÅ@³]¬I¤Î¤H¤O§¡¿Åµo®i¡A¤¤¥¡½Ã¥Í¥DºÞ¾÷ÃöÀ³·|¦P¤¤¥¡®ø¨¾¥DºÞ¾÷Ãö¹º©wºò«æÂåÀø±ÏÅ@°Ï°ì¡Aq©w¥þ°êºò«æÂåÀø±ÏÅ@pµe¡C¨ä¤¤¡A³¥¥~¦a°Ïºò«æ±ÏÅ@À³¤©¯Ç¤J¡C<br>
¡@¡@¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö¬°¾ã¦Xºò«æÂåÀø±ÏÅ@¸ê·½¡A±j¤Æºò«æÀ³Åܾ÷¨î¡AÀ³«Ø¥ßºò«æÂåÀø±ÏÅ@°Ï°ì¨ó½Õ«ü´§Åé¨t¡A¨Ã¨C¦~¤½¥¬ºò«æÂåÀø«~½è¬ÛÃö²Îp³ø§i¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤»±ø</font>
<font size=2>(ºò«æÂåÀø±ÏÅ@pµe)</font>
<table><tr><td> </td>
<td>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^¬F©²À³¨ÌÁҰϤº¤§ºò«æÂåÀø±ÏÅ@¸ê·½¡A°t¦X«e±ø²Ä¤@¶µ¤§¥þ°êºò«æÂåÀø±ÏÅ@pµe¡Aq©wºò«æÂåÀø±ÏÅ@¹ê¬I¤è®×¡A¿ì²zºò«æÂåÀø±ÏÅ@·~°È¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤C±ø</font>
<font size=2>(¨a®`¤Î¾Ôª§¤§¹w¨¾À³Åܱ¹¬I)</font>
<table><tr><td> </td>
<td>
¡@¡@¦U¯Å½Ã¥Í¥DºÞ¾÷Ãö¹ï¨a®`¤Î¾Ôª§¤§¹w¨¾À³Åܱ¹¬I¡AÀ³°t¦X³W¹º¿ì²zºò«æÂåÀø±ÏÅ@¦³Ãö¨Æ¶µ¡F¥²n®É¡A±oµ²¦X¥þ¥Á¨¾½Ã°Êû·Ç³ÆÅé¨t¡A¹ê¬Iºò«æÂåÀø±ÏÅ@¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤K±ø</font>
<font size=2>(ºò«æÂåÀø±ÏÅ@·~°È¤§¿Ô¸ß©Î¼f¬d)</font>
<table><tr><td> </td>
<td>
¡@¡@¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö±oÁܶ°ÂåÀø¾÷ºc¡B¹ÎÅé»P¬F©²¾÷Ãö¥Nªí¤Î¾ÇªÌ±M®a¡A¬°¤U¦C¨Æ¶µ¤§¿Ô¸ß©Î¼f¬d¡G<br>
¡@¡@¤@¡Bºò«æÂåÀø±ÏÅ@Åé¨t«Ø¸m¤Îºò«æÂåÀø±ÏÅ@°Ï°ì¹º©w¤§¿Ô¸ß¡C<br>
¡@¡@¤G¡B¤Æ¾Ç¨a®`¡B¿ç®g¨a®`¡B¿N¶Ë¡BªÅ¤¤±ÏÅ@¤Î³¥¥~¦a°Ï¤§ºò«æÂåÀø±ÏÅ@µ¥¯S®íºò«æÂåÀø±ÏÅ@¤§¿Ô¸ß¡C<br>
¡@¡@¤T¡B«æ±Ï±Ð¨|°V½m¤Î«Å¾É¤§¿Ô¸ß¡C<br>
¡@¡@¥|¡B²Ä¤T¤Q¤K±øÂå°|ÂåÀø³B²z¯à¤O¤À¯Å¼Ð·Ç¤Îµû©wµ²ªG¤§¼f¬d¡C<br>
¡@¡@¤¡B¨ä¥L¦³Ãö¤¤¥¡©Îºò«æÂåÀø±ÏÅ@°Ï°ì¤§ºò«æÂåÀø±ÏÅ@·~°È¤§¿Ô¸ß¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤E±ø</font>
<font size=2>(°Ï°ìºò«æÂåÀøÀ³Åܤ¤¤ß¤§²Õ¦¨¤Î¿ì²z·~°È)</font>
<table><tr><td> </td>
<td>
¡@¡@¤¤¥¡½Ã¥Í¥DºÞ¾÷ÃöÀ³¨Ì²Ä¤±ø²Ä¤G¶µ¤§ºò«æÂåÀø±ÏÅ@°Ï°ì¨ó½Õ«ü´§Åé¨t¡A©e°UÂåÀø¾÷ºc©ó¦U°Ï°ì¤º²Õ¦¨°Ï°ìºò«æÂåÀøÀ³Åܤ¤¤ß¡]¥H¤U²ºÙ°Ï°ìÀ³Åܤ¤¤ß¡^¡A¿ì²z¤U¦C·~°È¡G<br>
¡@¡@¤@¡B§Y®ÉºÊ±±°Ï°ì¤º¨a®`¦³Ãöºò«æÂåÀø¤§¨Æ¥ó¡C<br>
¡@¡@¤G¡B§Y®É´x´¤°Ï°ì¤ººò«æÂåÀø¸ê°T¤Î¸ê·½ª¬ªp¡C<br>
¡@¡@¤T¡B«Ø¸m°Ï°ì¤º¨a®`ÂåÀø¸ê·½¤§¸ê®Æ®w¡C<br>
¡@¡@¥|¡B¨ó§U³W¹º¨a®`¦³Ãöºò«æÂåÀø¨Æ¥ó¤§´_°·¤u§@¡C<br>
¡@¡@¤¡B©w´Á¿ì²z¦~«×«¤j¨a®`¦³Ãöºò«æÂåÀø¤§ºt½m¡C<br>
¡@¡@¤»¡B¸óª½ÁÒ¥«¡B¿¤¡]¥«¡^¤§¨a®`µo¥Í®É¡A¨ó§U¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö½Õ«×°Ï°ì¤ººò«æÂåÀø¸ê·½¡A¶i¦æÀ³Åܤu§@¡C<br>
¡@¡@¤C¡B¨ó§U¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö«ü´§°Ï°ì¤º«æ±Ï³d¥ôÂå°|¬£»º¬ÛÃö¤Hû¡A¨ó§U³B²z¤j¶qºò«æ¶Ë¯f±w¡C<br>
¡@¡@¤K¡B¨ä¥L¦³Ãö°Ï°ìºò«æÂåÀø¨a®`À³Åܨƶµ¡C<br>
¡@¡@«e¶µ²Ä¤»´Ú»P²Ä¤C´Ú½Õ«×¡B«ü´§¤§±Ò°Ên¥ó¡B«ü´§Åé¨t¬[ºc¡BÀ³Åܵ{§Ç¤Î¨ä¥LÀ³°t¦X¨Æ¶µ¤§¿ìªk¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö©w¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q±ø</font>
<font size=2>(¦a¤è½Ã¥Í¥DºÞ¾÷Ãö¿Ô¸ß©Î¼f¬d¨Æ¶µ)</font>
<table><tr><td> </td>
<td>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãö±oÁܶ°ÂåÀø¾÷ºc¡B¹ÎÅé»P¬F©²¾÷Ãö¥Nªí¤Î¾ÇªÌ±M®a¡A¬°¤U¦C¨Æ¶µ¤§¿Ô¸ß©Î¼f¬d¡G<br>
¡@¡@¤@¡Bºò«æÂåÀø±ÏÅ@¸ê·½³W¹º¤Î¹ê¬I¤è®×¤§¿Ô¸ß¡C<br>
¡@¡@¤G¡B«æ±Ï³d¥ôÂå°|¤§«ü©w¤è¦¡¤Î¦Ò®Ö¨Æ¶µ¤§¿Ô¸ß¡C<br>
¡@¡@¤T¡BÂà¶Eª§Ä³¨Æ¶µ¤§¼f¬d¡C<br>
¡@¡@¥|¡Bºò«æ¶Ë¯f±w±ÏÅ@§@·~µ{§Ç¤§¿Ô¸ß¡C<br>
¡@¡@¤¡B±ÏÅ@§Þ³Nû·þ¾É¦Ò®Ö¨Æ¶µ¤§¿Ô¸ß¡C<br>
¡@¡@¤»¡B¨ä¥L¦³Ãöºò«æÂåÀø±ÏÅ@¨Æ¶µ¤§¿Ô¸ß¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¤@±ø</font>
<font size=2>(Âå°|ºò«æÂåÀø·~°È¤§µûŲ¨î«×¤Î·þ¾É¦Ò®Ö)</font>
<table><tr><td> </td>
<td>
¡@¡@¤¤¥¡½Ã¥Í¥DºÞ¾÷ÃöÀ³±NÂå°|ºò«æÂåÀø·~°È¤Î¨ó§U¨ì°|«eºò«æÂåÀø·~°È¯Ç¤JÂå°|µûŲ¡C<br>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãö¹ïÁҰϤºÂåÀø¾÷ºc¤§ºò«æÂåÀø·~°È¡AÀ³©w´Á¹ê¬I·þ¾É¦Ò®Ö¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¤G±ø</font>
<font size=2>(±Ï¨a±ÏÅ@«ü´§¤¤¤ß¤§¥ô°È)</font>
<table><tr><td> </td>
<td>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^®ø¨¾¾÷Ãö¤§±Ï¨a±ÏÅ@«ü´§¤¤¤ß¡AÀ³¥Ñ±ÏÅ@¤Hû¤G¤Q¥|¤p®É°õ¶Ô¡A³B²z¤U¦Cºò«æ±ÏÅ@¨Æ¶µ¡G<br>
¡@¡@¤@¡B«Ø¥ßºò«æÂåÀø±ÏÅ@¸ê°T¡C<br>
¡@¡@¤G¡B´£¨Ñºò«æ¶Ë¯f±w°e¹FÂåÀø¾÷ºc«e¤§ºò«æ¶Ë¯f¿Ô¸ß¡C<br>
¡@¡@¤T¡B¨ü²zºò«æÂåÀø±ÏÅ@¥Ó½Ð¡C<br>
¡@¡@¥|¡B«ü´§±ÏÅ@¶¤©Î®ø¨¾¤À¶¤°õ¦æºò«æ¶Ë¯f±w°e¹FÂåÀø¾÷ºc«e¤§ºò«æ±ÏÅ@¡C<br>
¡@¡@¤¡BÁpµ¸ÂåÀø¾÷ºc±µ¨üºò«æ¶Ë¯f±w¡C<br>
¡@¡@¤»¡BÁpµ¸±ÏÅ@¹B¿é¤u¨ã¤§³]¸m¾÷Ãö¡]ºc¡^°õ¦æºò«æ±ÏÅ@·~°È¡C<br>
¡@¡@¤C¡B¨ó½Õ¦³Ãö¾÷Ãö°õ¦æºò«æ±ÏÅ@·~°È¡C<br>
¡@¡@¤K¡B¹Jºò«æ¶Ë¯f¡B¤j¶q¶Ë¯f±w©Î³¥¥~¦a°Ï±ÏÅ@®É¡A¬£»º·í¦a±ÏÅ@¹B¿é¤u¨ã³]¸m¾÷Ãö¡]ºc¡^¤§±ÏÅ@¨®¤Î±ÏÅ@¤Hû¥X¶Ô¡A¨Ã³qª¾ª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãö¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¤T±ø</font>
<font size=2>(Q±ÏÅ@°Ï¤§¹º¤À)</font>
<table><tr><td> </td>
<td>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^®ø¨¾¥DºÞ¾÷ÃöÀ³¨Ì¨äÁҰϤH¤f¤À§G¡B¦a²zÀô¹Ò¡B¥æ³q¤ÎÂåÀø³]¬Iª¬ªp¡A¹º¤À±ÏÅ@°Ï¡A¨Ã¥Ñ±ÏÅ@¶¤©Î®ø¨¾¤À¶¤°õ¦æºò«æ¶Ë¯f±w°e¹FÂåÀø¾÷ºc«e¤§ºò«æ±ÏÅ@·~°È¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¥|±ø</font>
<font size=2>(±ÏÅ@¶¤©Î®ø¨¾¤À¶¤¨C¶¤³Ì°ò¥»¤§°t¸m)</font>
<table><tr><td> </td>
<td>
¡@¡@«e±ø±ÏÅ@¶¤©Î®ø¨¾¤À¶¤¡A¨C¶¤¦Ü¤ÖÀ³°t¸m±ÏÅ@¨®¤@½ø¤Î±ÏÅ@¤Hû¤C¦W¡A¨ä¤¤±M¾¤Hû¤£±o¤Ö©ó¥b¼Æ¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¥|±ø¤§¤@</font>
<font size=2>(¤½¦@³õ©Òºò«æ±ÏÅ@³]³Æ¤§³]¸m)</font>
<table><tr><td> </td>
<td>
¡@¡@¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö¤½§i¤§¤½¦@³õ©Ò¡AÀ³¸m¦³¦Û°ÊÅé¥~¤ßŦ¹qÀ»¥hŸ¾¹©Î¨ä¥L¥²n¤§ºò«æ±ÏÅ@³]³Æ¡C<br>
¡@¡@³õ©ÒºÞ²zÅv¤H©Îªk¤Ht³d¤H©óÁʸm³]³Æ«á¡AÀ³°e½Ã¥Í¥DºÞ¾÷Ãö³Æ¬d«á¡Aµn¿ý©ó±Ï¨a±ÏÅ@«ü´§¤¤¤ß¡C<br>
¡@¡@«e¤G¶µ¥²n¤§ºò«æ±ÏÅ@³]³Æ¤§¶µ¥Ø¡B³]¸m¤è¦¡¡BºÞ²z¡B¨Ï¥Î°V½m¤Î¨ä¥L¦³Ãö¨Æ¶µ¤§¿ìªk¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö©w¤§¡C<br>
¡@¡@²Ä¤@¶µ¤½¦@³õ©ÒÁʸm¦Û°ÊÅé¥~¤ßŦ¹qÀ»¥hŸ¾¹©Î¨ä¥L¥²n¤§ºò«æ±ÏÅ@³]³Æ¡A¥²n®É±o¼úÀy©Î¸É§U¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¥|±ø¤§¤G</font>
<font size=2>(ºò«æÁ×Ãø§K³d¤§³W©w)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@¤Hû¥H¥~¤§¤H¡A¬°§K°£¥L¤H¥Í©R¤§«æ¢¦MÀI¡A¨Ï¥Îºò«æ±ÏÅ@³]³Æ©Î¬I¤©«æ±Ï±¹¬IªÌ¡A¾A¥Î¥Áªk¡B¦Dªkºò«æÁ×Ãø§K³d¤§³W©w¡C<br>
¡@¡@±ÏÅ@¤Hû©ó«DȶԴÁ¶¡¡A«e¶µ³W©w¥ç¾A¥Î¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td>
<td><font color=4000ff size=4>²Ä¤T³¹ ±ÏÅ@¹B¿é¤u¨ã</font>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¤±ø</font>
<font size=2>(±ÏÅ@¨®¤§ºØÃþ)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@¨®¤À¬°¤@¯ë±ÏÅ@¨®¤Î¥[Å@±ÏÅ@¨®¡F¨ä¸Ë³Æ¼Ð·Ç¡B¥Î³~¤Î¦³Ãö¨Æ¶µ¤§ºÞ²z¿ìªk¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö©w¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¤»±ø</font>
<font size=2>(±ÏÅ@¨®¤§³]¸mµn°O¤Î³]¸m³æ¦ì)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@¨®¤§³]¸m¡AÀ³¦V©Ò¦b¦aª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãö¥Ó½Ð³\¥iµn°O¡A¨Ã¦V©Ò¦b¦a¤½¸ôºÊ²z¾÷Ãö¥Ó½Ð¯SÄݱÏÅ@¨®¨®½øµP·Ó¡F¨ä³\¥iµn°O¨Æ¶µÅܧó®É¡A¥ç¦P¡C<br>
¡@¡@±ÏÅ@¨®¤§³]¸m¡A¥H¤U¦C¾÷Ãö¡]ºc¡^¬°¡G<br>
¡@¡@¤@¡B®ø¨¾¾÷Ãö¡C<br>
¡@¡@¤G¡B½Ã¥Í¾÷Ãö¡C<br>
¡@¡@¤T¡Bx¨Æ¾÷Ãö¡C<br>
¡@¡@¥|¡BÂåÀø¾÷ºc¡C<br>
¡@¡@¤¡BÅ@²z¾÷ºc¡C<br>
¡@¡@¤»¡B±ÏÅ@¨®Àç·~¾÷ºc¡C<br>
¡@¡@¤C¡B¸gª½ÁÒ¥«©Î¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãö»{©w»Ýn³]¸m±ÏÅ@¨®¤§¾÷ºc©Î¤½¯q¹ÎÅé¡C<br>
¡@¡@ÂåÀø©ÎÅ@²z¾÷ºc©e°U«e¶µ±ÏÅ@¨®³]¸m¾÷Ãö¡]ºc¡^¸ü°e¶Ë¯f±w¡AÀ³»P¨ü°U¤Ht³s±a³d¥ô¡C<br>
¡@¡@²Ä¤G¶µ²Ä¤T´Ú¦Ü²Ä¤C´Ú¤§±ÏÅ@¨®³]¸m¾÷Ãö¡]ºc¡^¡A¨ä¥Ó½Ð³]¸m±ÏÅ@¨®¤§³\¥i±ø¥ó»Pµ{§Ç¡B¸óª½ÁÒ¥«¡B¿¤¡]¥«¡^Àç¹B¤§ºÞ²z¡B³\¥i¤§´Á»P®i©µ¤§±ø¥ó¡B¼o¤î³\¥i¤§±¡§Î»P±ÏÅ@¨®Àç·~¾÷ºc¤§³]¥ß¤Î¨ä¥LÀ³¿í¦æ¨Æ¶µ¤§¿ìªk¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö©w¤§¡C¦ýx¨Æ¾÷Ãö¤§x¥Î±ÏÅ@¨®³]¸m¤ÎºÞ²z¡A¨Ì°ê¨¾³¡¤§³W©w¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¤C±ø</font>
<font size=2>(±ÏÅ@¨®¥~Æ[°ò¥»¯S¼x¤ÎºÊµø¿ý¼v³]³Æ¤§¸Ë³])</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@¨®À³¸Ë³]ĵ»ï¾¹¡B¨®´[¤º¥~ºÊµø¿ý¼v¾¹¤Î¬õ¦â°{¥ú¿O¡A¨®¨¬°¥Õ¦â¡A¨â°¼º£¬õ¦â¤Q¦r¤Î¾÷Ãö¡]ºc¡^¦WºÙ¡A¨®¨«á³¡À³º£³\¥i¦r¸¹¡C¥¼¸g©Ò¦b¦aª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãö®Öã¡A¤£±o¬°¨ä¥L¼ÐÃÑ¡C<br>
¡@¡@«e¶µ±ÏÅ@¨®«D¦]±¡ªpºò«æ¡A¤£±o¨Ï¥Îĵ»ï¾¹¤Î¬õ¦â°{¥ú¿O¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¤K±ø</font>
<font size=2>(±ÏÅ@¨®ÀH¨®¤Hû¥X¶Ô¤§³Ì§C¼Ð·Ç)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@¨®©ó±ÏÅ@¶Ë¯f±w¤Î¹B°e¯f¤H®É¡AÀ³¦³±ÏÅ@¤Hû¤G¦W¥H¤W¥X¶Ô¡F¥[Å@±ÏÅ@¨®¥X¶Ô¤§±ÏÅ@¤Hû¡A¦Ü¤ÖÀ³¦³¤@¦W¬°Âå®v¡BÅ@²z¤Hû©Î¤¤¯Å¥H¤W±ÏÅ@§Þ³Nû¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¤E±ø</font>
<font size=2>(±ÏÅ@¨®¬I¦æ®ø¬r©Î¥h¦Ã³B²z)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@¨®À³©w´Á¬I¦æ®ø¬r¡A¨Ãºû«ù²M¼ä¡C<br>
¡@¡@±ÏÅ@¨®©ó¹B°e¶Ç¬V¯f©ÎºÃ¦ü¶Ç¬V¯f¤§¯f¤H©Î¹B°e¨ü¤Æ¾Ç¡B¿ç®gª«½è¦Ã¬V¤§¯f¤H«á¡AÀ³¨Ì¨ä±¡ªp¡A¬I¦æ¥²n¤§®ø¬r©Î¥h¦¾³B²z¡C<br>
¡@¡@Âå°|¦¬ªv«e¶µ¶Ç¬V¯f©ÎºÃ¦ü¶Ç¬V¯f¤§¯f¤H¡A©ó¤@©w¶Ç¬V¯f¡A¸g¨Ì¶Ç¬V¯f¨¾ªvªk³W©w³ø§i¸ÓºÞ¥DºÞ¾÷Ãö¨Ã¸g¨äÃÒ¹ê«á¡AÀ³³qª¾¹B°e±ÏÅ@¨®©ÒÄݤ§¾÷Ãö¡]ºc¡^¡A±Ä¦æ¥²n±¹¬I¡F¨ä¤@©w¶Ç¬V¯f¤§½d³ò¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö¦Ò¶q±±¨î¬Ì±¡»P«OÅ@±ÏÅ@¤Hû¤Î²Ä¤T¤H¦w¥þ¤§»Ýn¤½§i¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤G¤Q±ø</font>
<font size=2>(±ÏÅ@¨®°õ¶Ô¦¬¶O)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@¨®°õ¦æ¶Ô°È¡AÀ³¨Ì¾Ú©Ò¦b¦aª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãöq©w¤§¦¬¶O¼Ð·Ç¦¬¶O¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤G¤Q¤@±ø</font>
<font size=2>(±ÏÅ@¨®¤§ºÞ²z)</font>
<table><tr><td> </td>
<td>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãö¹ï©ÒÁÒ±ÏÅ@¨®¤§¤Hû°t¸m¡B³]³Æ¤Î±ÏÅ@·~°È¡AÀ³¨C¦~©w´ÁÀˬd¡F¥²n®É¡A±o¤£©w´Á¬°¤§¡C<br>
¡@¡@±ÏÅ@¨®³]¸m¾÷Ãö¡]ºc¡^¹ï«e¶µÀˬd¡A¤£±o³WÁסB§«Ãª©Î©Úµ´¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤G¤Q¤G±ø</font>
<font size=2>(±ÏÅ@¥Î¹B¿é¤u¨ã¤§ºÞ²z³W©w)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@ª½ª@¾÷¡B±ÏÅ@¸¾÷¡B±ÏÅ@²î¡]Ä¥¡^¤Î¨ä¥L±ÏÅ@¨®¥H¥~¤§±ÏÅ@¹B¿é¤u¨ã¡A¨ä±ÏÅ@¤§½d³ò¡BÀ³°t¸m¤§°t³Æ¡B¬d®Ö¡B¥Ó½Ð»P¬£»º±ÏÅ@¤§µ{§Ç¡B°±°¦aÂI»P±µ»é¤è¦¡¡B±ÏÅ@¤Hû¤§¸ê®æ»P°V½m¡B°õ¶Ô¤H¼Æ¡B°õ¶Ô¬ö¿ý¤§»s§@»P«O¦s¡BÀˬd¤Î¨ä¥LÀ³¿í¦æ¨Æ¶µ¤§¿ìªk¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö·|¦P¦³Ãö¾÷Ãö©w¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤G¤Q¤T±ø</font>
<font size=2>(±ÏÅ@ª½ª@¾÷°±¾÷©W¤§³]¸m)</font>
<table><tr><td> </td>
<td>
¡@¡@¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö¬°¦]À³Â÷®q¡B°¾»·¦a°Ïºò«æÂåÀø±ÏÅ@¤§»Ýn¡A±o·|¦P¦³Ãö¾÷Ãö³W¹º³]¸m±ÏÅ@ª½ª@¾÷¤§°±¾÷©W¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td>
<td><font color=4000ff size=4>²Ä¥|³¹ ±ÏÅ@§Þ³Nû</font>
<table><tr><td> </td><td><font color=8000ff>²Ä¤G¤Q¥|±ø</font>
<font size=2>(±ÏÅ@§Þ³Nû¤§¤À¯Å)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@§Þ³Nû¤À¬°ªì¯Å¡B¤¤¯Å¤Î°ª¯Å¤TÃþ¡C<br>
¡@¡@«e¶µ¦U¯Å±ÏÅ@§Þ³Nû¤§¨ü°V¸ê®æ¡B°V½m¡BÄ~Äò±Ð¨|¡B±o¬I¦æ¤§±ÏÅ@¶µ¥Ø¡BÀ³°t¦X±¹¬I¤Î¨ä¥LÀ³¿í¦æ¨Æ¶µ¤§¿ìªk¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö©w¤§¡C<br>
¡@¡@«e¶µ°V½m¤§°V½m½Òµ{¡AÀ³¥]¬A³¥¥~¦a°Ï¤§±ÏÅ@°V½m¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤G¤Q¤±ø</font>
<font size=2>(ÂåÀø«ü¾É¨î«×¤§«Ø¥ß)</font>
<table><tr><td> </td>
<td>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^®ø¨¾¥DºÞ¾÷Ãö¬°¿ì²z¤U¦C¨Æ¶µ¡AÀ³«ü©wÂåÀø«ü¾ÉÂå®v¡A¨ä¤¤¨Ã±o¼W¥[¨ã³¥¥~Âå¾Ç±M·~ªÌ¡A«Ø¥ßÂåÀø«ü¾É¨î«×¡G<br>
¡@¡@¤@¡B¦U¯Å±ÏÅ@§Þ³Nû°õ¦æºò«æ±ÏÅ@¤§±Ð¨|¡B°V½m¡B·þ¾É¤Î¦Ò®Ö¡C<br>
¡@¡@¤G¡Bq©w¦U¯Å±ÏÅ@§Þ³Nû«~½è«ü¼Ð¡B°õ¦æ«~½èºÊ´ú¡C<br>
¡@¡@¤T¡B®Öñ°ª¯Å±ÏÅ@û¨Ì¾Ú¹w¥ßÂåÀø¬yµ{¬I¦æºò«æ±ÏÅ@¤§±ÏÅ@¬ö¿ýªí¡C<br>
¡@¡@«e¶µ©Ò©wÂåÀø«ü¾ÉÂå®v¤§¸ê®æ¡B°V½m¤Î¨ä¥L¬ÛÃö¨Æ¶µ¤§¿ìªk¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö·|¦P¤¤¥¡®ø¨¾¥DºÞ¾÷Ãö©w¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤G¤Q¤»±ø</font>
<font size=2>(±ÏÅ@§Þ³Nû¬I¦æºò«æ±ÏÅ@¤§¦aÂI)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@§Þ³Nû¬I¦æºò«æ±ÏÅ@¡A¥H¤U¦C¦aÂI¬°¡G<br>
¡@¡@¤@¡Bºò«æ¶Ë¯f©Î¤j¶q¶Ë¯f±w¤§²{³õ¡C<br>
¡@¡@¤G¡B°eÂå©ÎÂà¶E³~¤¤¡C<br>
¡@¡@¤T¡B©è¹F°eÂ奨ªºÂåÀø¾÷ºc¦ÓÂåÅ@¤Hû©|¥¼³B¸m«e¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤G¤Q¤C±ø</font>
<font size=2>(ºò«æ¶Ë¯f±w±ÏÅ@§@·~µ{§Ç)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@§Þ³NûÀ³¨Ìºò«æ¶Ë¯f±w±ÏÅ@§@·~µ{§Ç¡A¬I¦æ±ÏÅ@¡C<br>
¡@¡@«e¶µºò«æ¶Ë¯f±w±ÏÅ@§@·~µ{§Ç¡A¥Ñª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãö©w¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤G¤Q¤K±ø</font>
<font size=2>(¨Ï¥Î±ÏÅ@§Þ³Nû¦WºÙ¤§¨î)</font>
<table><tr><td> </td>
<td>
¡@¡@«D±ÏÅ@§Þ³Nû¤£±o¨Ï¥Î±ÏÅ@§Þ³Nû¦WºÙ¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td>
<td><font color=4000ff size=4>²Ä¤³¹ ±ÏÅ@·~°È</font>
<table><tr><td> </td><td><font color=8000ff>²Ä¤G¤Q¤E±ø</font>
<font size=2>(±ÏÅ@¤Hû¨Ì±Ï¨a±ÏÅ@«ü´§¤¤¤ß«ü¥Ü«e©¹«æ±Ï)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@¤HûÀ³¨Ì±Ï¨a±ÏÅ@«ü´§¤¤¤ß«ü¥Ü«e©¹²{³õ«æ±Ï¡A¨Ã±Nºò«æ¶Ë¯f±w°e¹F´Nªñ¾A·íÂåÀø¾÷ºc¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤T¤Q±ø</font>
<font size=2>(¤j¶q¶Ë¯f±w¤Î³¥¥~¦a°Ïºò«æ±ÏÅ@¿ìªk¤§q©w)</font>
<table><tr><td> </td>
<td>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷ÃöÀ³q©w¤j¶q¶Ë¯f±w±ÏÅ@¡]§t³¥¥~¦a°Ïºò«æ±ÏÅ@¡^¿ìªk¡A¨Ã©w´Á¿ì²zºt²ß¡C<br>
¡@¡@«e¶µºt²ß¡A±oÁp¦X®ø¨¾µ¥¦³Ãö¾÷ÃöÁ|¦æ¡A¨Ã½Ð·í¦aÂåÀø¾÷ºc¤Î±ÏÅ@¨®³]¸m¾÷Ãö¡]ºc¡^°t¦X¿ì²z¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤T¤Q¤@±ø</font>
<font size=2>(¬Û¤¬¤ä´©¤§³d¥ô)</font>
<table><tr><td> </td>
<td>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¤Î®ø¨¾µ¥¦³Ãö¾÷Ãö¹ïµo¥Í©ó¨ä¾Fªñ¦a°Ï¤§¤j¶q¶Ë¯f±w¡AÀ³¤©¤ä´©¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤T¤Q¤G±ø</font>
<font size=2>(¤j¶q¶Ë¯f±w©Î³¥¥~ºò«æ±ÏÅ@²{³õ«ü´§¨ó½Õ¨t²Î¤§«Ø¥ß)</font>
<table><tr><td> </td>
<td>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^¬F©²¹J¤j¶q¶Ë¯f±w©Î³¥¥~ºò«æ±ÏÅ@¡AÀ³¨Ì¨a®`³W¼Ò¤ÎºØÃþ¡A«Ø¥ß²{³õ«ü´§¨ó½Õ¨t²Î¡A¬I¦æ±ÏÅ@¦³Ãö¤u§@¡C<br>
¡@¡@«e¶µ¤j¶q¶Ë¯f±w©Î³¥¥~ºò«æ±ÏÅ@³B²z¯A¤Îx¨Æ¾÷±K®É¡AÀ³·|°Óx¨Æ¾÷Ãö³B²z¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤T¤Q¤T±ø</font>
<font size=2>(¤j¶q¶Ë¯f±w©Î³¥¥~ºò«æ±ÏÅ@²{³õ«ü´§¨ó½Õ¨t²Î¤§«ü´§¨î«×)</font>
<table><tr><td> </td>
<td>
¡@¡@¹J¤j¶q¶Ë¯f±w©Î³¥¥~ºò«æ±ÏÅ@¡A°Ñ»P²{³õ«æ±Ï±ÏÅ@¤Hû¤Î±ÏÅ@¹B¿é¤u¨ã³]¸m¾÷Ãö¡]ºc¡^¡A§¡À³¨Ì²{³õ«ü´§¨ó½Õ¨t²Î¤§«ü´§¡A¬I¦æ±ÏÅ@¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤T¤Q¥|±ø</font>
<font size=2>(±ÏÅ@¬ö¿ýªí«O¦s´Á)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@¤Hû¬I¦æ±ÏÅ@¡AÀ³¶ñ¨ã±ÏÅ@¬ö¿ýªí¡A¤À§O¥æ¥Ñ¸Ó±ÏÅ@¨®³]¸m¾÷Ãö¡]ºc¡^¤ÎÀ³¶E¤§ÂåÀø¾÷ºc«O¦s¦Ü¤Ö¤C¦~¡C<br>
¡@¡@«e¶µÂåÀø¾÷ºcÀ³±N±ÏÅ@¬ö¿ýªí¨Ö¯f¾ú«O¦s¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤T¤Q¤±ø</font>
<font size=2>(±ÏÅ@§Þ³Nû¤Î°Ñ»P±ÏÅ@¤§¤Hû«O±K¸q°È)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@§Þ³Nû¤Î¨ä¥L°Ñ»Pºò«æÂåÀø±ÏÅ@·~°È¤§¾÷Ãö¡]ºc¡^©ÒÄݤHû¡A¦]·~°È¦Óª¾±x©Î«ù¦³¥L¤H¤§¯µ±K¡A¤£±oµL¬G¬ªº|¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td>
<td><font color=4000ff size=4>²Ä¤»³¹ Âå°|ºò«æÂåÀø·~°È</font>
<table><tr><td> </td><td><font color=8000ff>²Ä¤T¤Q¤»±ø</font>
<font size=2>(¹Jºò«æ¶Ë¯f±wÀ³§YÀ˵ø¨Ã¨ó§U¦w±ÆÂà¶E)</font>
<table><tr><td> </td>
<td>
¡@¡@Âå°|¬°¦³®Ä½Õ«×¤H¤O»P³]³Æ¡AÀ³«Ø¥ßºò«æ¶Ë¯f±w³B²z§@·~¬yµ{¤Î¤º³¡¨ó½Õ«ü´§¨t²Î¡A¹J¦³ºò«æ¶Ë¯f±w®ÉÀ³§YÀ˵ø¡A¨Ã¨Ì¨äÂåÀø¯à¤O¤©¥H±Ïªv©Î±Ä¨ú¥²n±¹¬I¡A¤£±oµL¬G©ì©µ¡F¨äµLªk´£¨Ñ¾A¤ÁªvÀø®É¡AÀ³¥ý°µ¾A·í³B¸m¡A¨Ã¨ó§U¦w±ÆÂà¶E¦Ü¾A·í¤§ÂåÀø¾÷ºc©Î³ø½Ð±Ï¨a±ÏÅ@«ü´§¤¤¤ß¨ó§U¡C<br>
¡@¡@«e¶µÂà¶E¡A¨än¥ó¡B¸óª½ÁÒ¥«¡B¿¤¡]¥«¡^¦æ¬F°Ï¤§Âå°|Ápô»P¨ó½Õ¡BÂà¶E¤è¦¡»PÂåÀø·ÓÅ@¤Î¨ä¥LÀ³¿í¦æ¨Æ¶µ¤§¿ìªk¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö©w¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤T¤Q¤C±ø</font>
<font size=2>(¦a°Ï«æ±Ï³d¥ôÂå°|¤§«ü©w¤Î¨Ï¥Î¦WºÙ¨î)</font>
<table><tr><td> </td>
<td>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷ÃöÀ³¨ÌÁҰϤºÂå°|¤§ºò«æÂåÀø³]³Æ¤Î±Mªø¡A«ü©w«æ±Ï³d¥ôÂå°|¡C<br>
¡@¡@«D«æ±Ï³d¥ôÂå°|¡A¤£±o¨Ï¥Î«æ±Ï³d¥ôÂå°|¦WºÙ¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤T¤Q¤K±ø</font>
<font size=2>(Âå°|ºò«æÂåÀø³B²z¯à¤O¤À¯Åµû©w)</font>
<table><tr><td> </td>
<td>
¡@¡@¤¤¥¡½Ã¥Í¥DºÞ¾÷ÃöÀ³¿ì²zÂå°|ºò«æÂåÀø³B²z¯à¤O¤À¯Åµû©w¡FÂå°|À³¨Ìµû©wµ¥¯Å´£¨ÑÂåÀøªA°È¡A¤£±oµL¬G©ì©µ¡C<br>
¡@¡@«e¶µ¤À¯Å¼Ð·Ç¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö¨Ìºò«æÂåÀø¤§ºØÃþ©w¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤T¤Q¤E±ø</font>
<font size=2>(«æ±Ï³d¥ôÂå°|¿ì²z¨Æ¶µ)</font>
<table><tr><td> </td>
<td>
¡@¡@«æ±Ï³d¥ôÂå°|À³¿ì²z¤U¦C¨Æ¶µ¡G<br>
¡@¡@¤@¡B¥þ¤ÑÔ´£¨Ñºò«æ¶Ë¯f±wÂåÀø·ÓÅ@¡C<br>
¡@¡@¤G¡B±µ¨üÂåÀø¾÷ºc¶¡Âà¶E¤§ºò«æ¶Ë¯f±w¡C<br>
¡@¡@¤T¡B«ü¬£±M³dÂå®v«ü¾É±ÏÅ@¤Hû°õ¦æºò«æ±ÏÅ@¤u§@¡C<br>
¡@¡@¥|¡Bºò«æÂåÀø±ÏÅ@°V½m¡C<br>
¡@¡@¤¡B¨Ì¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö³W©w´£¨Ñºò«æÂåÀø±ÏÅ@¸ê°T¡C<br>
¡@¡@¤»¡B¨ä¥L¸g½Ã¥Í¥DºÞ¾÷Ãö«ü¬£¤§ºò«æ±ÏÅ@¬ÛÃö·~°È¡C<br>
¡@¡@«e¶µ²Ä¤´Úºò«æÂåÀø±ÏÅ@¸ê°T¶µ¥Ø¡B³q³ø¤è¦¡¡B®É¶¡¤Î¨ä¥L¬ÛÃö¨Æ¶µ¤§¿ìªk¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö©w¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¥|¤Q±ø</font>
<font size=2>(Âå°|¤£±oµL¬G©Úµ´±Ï¨a±ÏÅ@«ü´§¤¤¤ß¤§¬£»º)</font>
<table><tr><td> </td>
<td>
¡@¡@¹Jºò«æ¶Ë¯f©Î¤j¶q¶Ë¯f±w±ÏÅ@¡A©Î¬°¨ó§U¨äÂà¶EªA°È¡A±Ï¨a±ÏÅ@«ü´§¤¤¤ß±o¬£»º·í¦aÂå°|±ÏÅ@¨®¤Î±ÏÅ@¤Hû¥X¶Ô¡AÂå°|¤£±oµL¬G©Úµ´¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td>
<td><font color=4000ff size=4>²Ä¤C³¹ »@«h</font>
<table><tr><td> </td><td><font color=8000ff>²Ä¥|¤Q¤@±ø</font>
<font size=2>(»@«h)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@¨®³]¸m¾÷Ãö¡]ºc¡^¦³¤U¦C±¡§Î¤§¤@ªÌ¡A³B·s»O¹ô¤Q¸U¤¸¥H¤W¤¤Q¸U¤¸¥H¤U»@Áì¡A¨Ã³qª¾¨ä´Á§ïµ½¡F©¡´Á¥¼§ïµ½ªÌ¡A±o«ö¦¸³B»@¦Ü§ïµ½¬°¤î¡G<br>
¡@¡@¤@¡B¹H¤Ï¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö¨Ì²Ä¤Q¤±ø±ÂÅv©Ò©w¿ìªk¦³Ãö±ÏÅ@¨®¸Ë³Æ¼Ð·Ç¤Î¥Î³~¤§³W©w¡C<br>
¡@¡@¤G¡B¹H¤Ï¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö¨Ì²Ä¤Q¤»±ø²Ä¥|¶µ±ÂÅv©Ò©w¿ìªk¦³Ãö±ÏÅ@¨®³]¸m¡BÀç¹BºÞ²z¤Î±ÏÅ@¨®Àç·~¾÷ºc³]¥ß³W©w¡C<br>
¡@¡@¤T¡B¹H¤Ï²Ä¤Q¤K±ø³W©w¡C<br>
¡@¡@«e¶µ¦U´Ú±¡§Î¡A¨ä±¡¸`«¤jªÌ¡A±oª½±µ¼o¤î¨ä±ÏÅ@¨®¤§³]¸m³\¥i¡A¨Ã¥Ñ©Ò¦b¦aª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãö³qª¾¤½¸ôºÊ²z¾÷Ãö¦Q¾P¨ä¥þ³¡±ÏÅ@¨®¤§µP·Ó¡FÄݱÏÅ@¨®Àç·~¾÷ºcªÌ¡A¨Ã¼o¤î¨ä³]¥ß³\¥i¡C<br>
¡@¡@«DÄݲĤQ¤»±ø²Ä¤G¶µ©Ò©w¤§¾÷Ãö¡]ºc¡^¾Õ¦Û³]¸m±ÏÅ@¨®ªÌ¡A³B·s»O¹ô¤Q¸U¤¸¥H¤W¤¤Q¸U¤¸¥H¤U»@Áì¡F¨Ã¥Ñ©Ò¦b¦aª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãö³qª¾¤½¸ôºÊ²z¾÷Ãö¦Q¾P¨ä¨®½øµP·Ó¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¥|¤Q¤G±ø</font>
<font size=2>(»@«h)</font>
<table><tr><td> </td>
<td>
¡@¡@¦³¤U¦C±¡§Î¤§¤@ªÌ¡A³B·s»O¹ô¤»¸U¤¸¥H¤W¤T¤Q¸U¤¸¥H¤U»@Áì¡G<br>
¡@¡@¤@¡B±ÏÅ@¨®³]¸m¾÷Ãö¡]ºc¡^¹H¤Ï²Ä¤Q¤C±ø²Ä¤G¶µ¡B²Ä¤T¤Q¥|±ø²Ä¤@¶µ©Î¹H¤Ï¨Ì²Ä¤G¤Q±ø©Ò©w¼Ð·Ç¶WÃB¦¬¶O¡C<br>
¡@¡@¤G¡BÂå°|¹H¤Ï²Ä¤T¤Q¤»±ø²Ä¤@¶µ³W©w¡A¥¼¥ß§Y¨Ì¨äÂåÀø¯à¤O±Ïªvºò«æ¶Ë¯f±w©Î¥¼§@¾A·í³B¸m¦Ó³w¤©Âà¶E¡C<br>
¡@¡@¤T¡BÂå°|¹H¤Ï²Ä¤T¤Q¤K±ø²Ä¤@¶µ³W©w¡A¥¼¨Ì¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãöµû©w¤§ºò«æÂåÀø³B²z¯à¤O¤À¯Å´£¨Ñºò«æÂåÀøªA°È¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¥|¤Q¤T±ø</font>
<font size=2>(»@«h)</font>
<table><tr><td> </td>
<td>
¡@¡@¦³¤U¦C±¡§Î¤§¤@ªÌ¡A³B·s»O¹ô¤¸U¤¸¥H¤W¤G¤Q¤¸U¤¸¥H¤U»@Áì¡G<br>
¡@¡@¤@¡B±ÏÅ@¨®³]¸m¾÷Ãö¡]ºc¡^¹H¤Ï²Ä¤G¤Q¤@±ø²Ä¤G¶µ©Î²Ä¤T¤Q¤T±ø³W©w¡C<br>
¡@¡@¤G¡BÂå°|¹H¤Ï²Ä¥|¤Q±ø³W©w¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¥|¤Q¥|±ø</font>
<font size=2>(»@«h)</font>
<table><tr><td> </td>
<td>
¡@¡@¦³¤U¦C±¡§Î¤§¤@ªÌ¡A³B·s»O¹ô¤@¸U¤¸¥H¤W¤¸U¤¸¥H¤U»@Áì¡A¨Ã³qª¾´Á§ïµ½¡F©¡´Á¥¼§ïµ½ªÌ¡A«ö¦¸³B»@¦Ü§ïµ½¬°¤î¡G<br>
¡@¡@¤@¡BÂåÀø¾÷ºc¹H¤Ï²Ä¤T¤Q¥|±ø²Ä¤G¶µ³W©w¡C<br>
¡@¡@¤G¡B«æ±Ï³d¥ôÂå°|¹H¤Ï²Ä¤T¤Q¤E±ø²Ä¤@¶µ³W©w¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¥|¤Q¤±ø</font>
<font size=2>(»@«h)</font>
<table><tr><td> </td>
<td>
¡@¡@¦³¤U¦C±¡§Î¤§¤@ªÌ¡A³B·s»O¹ô¤@¸U¤¸¥H¤W¤¸U¤¸¥H¤U»@Áì¡G<br>
¡@¡@¤@¡B±ÏÅ@§Þ³Nû¹H¤Ï²Ä¤G¤Q¤»±ø©Î²Ä¤G¤Q¤C±ø²Ä¤@¶µ³W©w¡C<br>
¡@¡@¤G¡B±ÏÅ@¤Hû¹H¤Ï²Ä¤G¤Q¤E±ø©Î²Ä¤T¤Q¤T±ø³W©w¡C<br>
¡@¡@¤T¡B±ÏÅ@§Þ³Nû¤Î¨ä¥L°Ñ»Pºò«æÂåÀø±ÏÅ@·~°È¤§¾÷Ãö¡]ºc¡^©ÒÄݤHû¹H¤Ï²Ä¤T¤Q¤±ø³W©w¡C<br>
¡@¡@¥|¡BÂå°|¹H¤Ï²Ä¤T¤Q¤»±ø²Ä¤G¶µ©Ò©wÂà¶E¿ìªk¤§Âà¶En¥ó¡B¤è¦¡¤ÎÀ³¿ì²z¤§Âå°|Ápô»P¨ó½Õ¨Æ¶µ©Î²Ä¤T¤Q¤C±ø²Ä¤G¶µ³W©w¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¥|¤Q¤»±ø</font>
<font size=2>(»@«h)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@¨®³]¸m¾÷Ãö¡]ºc¡^¹H¤Ï²Ä¤Q¤C±ø²Ä¤@¶µ¡B²Ä¤Q¤E±ø²Ä¤@¶µ©Î²Ä¤G¶µ³W©wªÌ¡A³B·s»O¹ô¤¤d¤¸¥H¤W¤G¸U¤¤d¤¸¥H¤U»@Áì¡A¨Ã³qª¾¨ä´Á§ïµ½¡F©¡´Á¥¼§ïµ½ªÌ¡A«ö¦¸³B»@¦Ü§ïµ½¬°¤î¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¥|¤Q¤C±ø</font>
<font size=2>(»@«h)</font>
<table><tr><td> </td>
<td>
¡@¡@¦³¤U¦C±¡§Î¤§¤@ªÌ¡A³B·s»O¹ô¤¤d¤¸¥H¤W¤G¸U¤¤d¤¸¥H¤U»@Áì¡G<br>
¡@¡@¤@¡B¹H¤Ï²Ä¤G¤Q¤K±ø³W©w¡C<br>
¡@¡@¤G¡B±ÏÅ@¤Hû¹H¤Ï²Ä¤T¤Q¥|±ø²Ä¤@¶µ³W©w¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¥|¤Q¤K±ø</font>
<font size=2>(»@«h)</font>
<table><tr><td> </td>
<td>
¡@¡@¹H¤Ï²Ä¤Q¤K±ø¡B²Ä¤T¤Q¤»±ø¡B²Ä¤T¤Q¤K±ø²Ä¤@¶µ©Î²Ä¥|¤Q±ø³W©wªÌ¡A°£¨Ì²Ä¥|¤Q¤@±ø²Ä¤@¶µ¡B²Ä¥|¤Q¤G±ø¡B²Ä¥|¤Q¤T±ø©Î²Ä¥|¤Q¤±ø³W©w³B»@¥~¡A¹ï¨ä¦æ¬°¤H¥ç³B¥H¦U¸Ó±ø¤§»@Áì¡C¦ý¦æ¬°¤H¬°¨p¥ßÂåÀø¾÷ºc¤§t³dÂå®vªÌ¡A¤£¥t³B»@¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¥|¤Q¤E±ø</font>
<font size=2>(»@«h)</font>
<table><tr><td> </td>
<td>
¡@¡@¾A¥Î²Ä¤Q¤»±ø²Ä¥|¶µ©Ò©w¿ìªk¤§±ÏÅ@¨®³]¸m¾÷Ãö¡]ºc¡^¦³¤U¦C±¡§Î¤§¤@ªÌ¡A¼o¤î¨ä¥þ³¡±ÏÅ@¨®¤§³]¸m³\¥i¡F¨äÄݱÏÅ@¨®Àç·~¾÷ºcªÌ¡A¨Ã¼o¤î¨ä³]¥ß³\¥i¡G<br>
¡@¡@¤@¡B®e¯d¥¼¨ã±ÏÅ@¤Hû¸ê®æªÌ¾Õ¦Û°õ¦æ±ÏÅ@·~°È¡C<br>
¡@¡@¤G¡B±q¨Æ¦³¶Ë·¤Æ©Î¦M®`¤HÅé°·±dµ¥¤£¥¿·í·~°È¡C<br>
¡@¡@¤T¡B§Q¥Î±ÏÅ@¨®±q¨Æ¥Ç¸o¦æ¬°¡C<br>
¡@¡@¥|¡B¹H¤Ï²Ä¤G¤Q±ø³W©w¡A¶W¦¬±ÏÅ@¨®ªA°È¶O¥Î¸g¬dÄݹê¡A¦Ó¥¼¨Ì±N¶W¦¬³¡¤À°hÁٶ˯f±w¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤¤Q±ø</font>
<font size=2>(»@«h)</font>
<table><tr><td> </td>
<td>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãö¨Ì«e±ø³W©w¼o¤î±ÏÅ@¨®³]¸m³\¥i®É¡AÀ³³qª¾¤½¸ôºÊ²z¾÷Ãö¦Q¾P¨ä¨®½øµP·Ó¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤¤Q¤@±ø</font>
<font size=2>(»@«h)</font>
<table><tr><td> </td>
<td>
¡@¡@±ÏÅ@¨®³]¸m¾÷Ãö¡]ºc¡^¨ü¼o¤î¨ä±ÏÅ@¨®¤§³]¸m³\¥i³B¤ÀªÌ¡A©ó¤T¦~¤º¤£±o¦A¥Ó½Ð³]¸m¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤¤Q¤G±ø</font>
<font size=2>(»@«h)</font>
<table><tr><td> </td>
<td>
¡@¡@¥»ªk©Ò©w¤§»@Áì¡B±ÏÅ@¨®¤Î¥Á¶¡±ÏÅ@¨®¾÷ºc³]¸m³\¥i¤§¼o¤î¡A¥Ñª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãö¬°¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td>
<td><font color=4000ff size=4>²Ä¤K³¹ ªþ«h</font>
<table><tr><td> </td><td><font color=8000ff>²Ä¤¤Q¤T±ø</font>
<font size=2>(½s¦C¹wºâ)</font>
<table><tr><td> </td>
<td>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¤Î®ø¨¾¥DºÞ¾÷ÃöÀ³½s¦C¹wºâ¡A°õ¦æ¥»ªk©Ò³W©wºò«æÂåÀø±ÏÅ@¤u§@¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤¤Q¥|±ø</font>
<font size=2>(¸É§U¸g¶O)</font>
<table><tr><td> </td>
<td>
¡@¡@¤¤¥¡½Ã¥Í¤Î®ø¨¾¥DºÞ¾÷Ãö¬°§¡¿Å¦U°Ïºò«æÂåÀø±ÏÅ@¤ô·Ç¡A±o¸É§U¦a¤è½Ã¥Í¤Î®ø¨¾¥DºÞ¾÷Ãö¿ì²z¸ÓÁҰϺò«æÂåÀø±ÏÅ@¹ê¬I¤è®×¤§¸g¶O¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤¤Q¤±ø</font>
<font size=2>(³W¶O¤§¦¬¨ú)</font>
<table><tr><td> </td>
<td>
¡@¡@ª½ÁÒ¥«¡B¿¤¡]¥«¡^½Ã¥Í¥DºÞ¾÷Ãö¨Ì¥»ªk¨ü²z±ÏÅ@¨®³]¸mµn°O¤Î±ÏÅ@¨®Àç·~¾÷ºc³]¥ß³\¥i¡AÀ³¦¬¨ú¼f¬d¶O¡Bµn°O¶O¤ÎÃÒ·Ó¶O¡F¨ä¦¬¶O¼Ð·Ç¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö©w¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤¤Q¤»±ø</font>
<font size=2>(¼úÀy±¹¬I)</font>
<table><tr><td> </td>
<td>
¡@¡@¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö¬°§¡¿Åºò«æÂåÀø¸ê·½¡B´£¤Éºò«æÂåÀø·~°È«~½è¤Î®Ä²v¡A¹ï©óºò«æÂåÀø¸ê·½¤£¨¬¦a°Ï¡AÀ³±Ä¨ú¼úÀy±¹¬I¡C<br>
¡@¡@«e¶µºò«æÂåÀø¸ê·½¤£¨¬¦a°Ï¤§»{©w¡B¼úÀy±¹¬I¤§¶µ¥Ø¡B¤è¦¡¤Î¨ä¥LÀ³¿í¦æ¨Æ¶µ¤§¿ìªk¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö©w¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤¤Q¤C±ø</font>
<font size=2>(¬I¦æ²Ó«h)</font>
<table><tr><td> </td>
<td>
¡@¡@¥»ªk¬I¦æ²Ó«h¡A¥Ñ¤¤¥¡½Ã¥Í¥DºÞ¾÷Ãö·|¦P¤¤¥¡®ø¨¾¥DºÞ¾÷Ãö©w¤§¡C<br>
</td>
</table>
</table>
</table>
<table><tr><td> </td><td>
<table><tr><td> </td><td><font color=8000ff>²Ä¤¤Q¤K±ø</font>
<font size=2>(¬I¦æ¤é)</font>
<table><tr><td> </td>
<td>
¡@¡@¥»ªk¦Û¤½¥¬¤é¬I¦æ¡C<br>
</td>
</table>
</table>
</table>
</left>
</body>
<!-- Mirrored from lis.ly.gov.tw/lghtml/lawstat/version2/02547/02547101122500.htm by HTTrack Website Copier/3.x [XR&CO'2010], Sun, 24 Mar 2013 09:20:02 GMT -->
</html>
|
g0v/laweasyread-data
|
rawdata/lawstat/version2/02547/02547101122500.html
|
HTML
|
mit
| 32,568
|
/* Copyright (c) 2008-2015 Dovecot authors, see the included COPYING redis */
#include "lib.h"
#include "array.h"
#include "str.h"
#include "istream.h"
#include "ostream.h"
#include "connection.h"
#include "dict-private.h"
#define REDIS_DEFAULT_PORT 6379
#define REDIS_DEFAULT_LOOKUP_TIMEOUT_MSECS (1000*30)
#define DICT_USERNAME_SEPARATOR '/'
enum redis_input_state {
/* expecting +OK reply for SELECT */
REDIS_INPUT_STATE_SELECT,
/* expecting $-1 / $<size> followed by GET reply */
REDIS_INPUT_STATE_GET,
/* expecting +QUEUED */
REDIS_INPUT_STATE_MULTI,
/* expecting +OK reply for DISCARD */
REDIS_INPUT_STATE_DISCARD,
/* expecting *<nreplies> */
REDIS_INPUT_STATE_EXEC,
/* expecting EXEC reply */
REDIS_INPUT_STATE_EXEC_REPLY
};
struct redis_connection {
struct connection conn;
struct redis_dict *dict;
string_t *last_reply;
unsigned int bytes_left;
bool value_not_found;
bool value_received;
};
struct redis_dict_reply {
unsigned int reply_count;
dict_transaction_commit_callback_t *callback;
void *context;
};
struct redis_dict {
struct dict dict;
char *username, *key_prefix, *expire_value;
unsigned int timeout_msecs, db_id;
struct ioloop *ioloop, *prev_ioloop;
struct redis_connection conn;
ARRAY(enum redis_input_state) input_states;
ARRAY(struct redis_dict_reply) replies;
bool connected;
bool transaction_open;
bool db_id_set;
};
struct redis_dict_transaction_context {
struct dict_transaction_context ctx;
unsigned int cmd_count;
bool failed;
};
static struct connection_list *redis_connections;
static void
redis_input_state_add(struct redis_dict *dict, enum redis_input_state state)
{
array_append(&dict->input_states, &state, 1);
}
static void redis_input_state_remove(struct redis_dict *dict)
{
array_delete(&dict->input_states, 0, 1);
}
static void redis_callback(struct redis_dict *dict,
const struct redis_dict_reply *reply, int ret)
{
if (reply->callback != NULL) {
if (dict->prev_ioloop != NULL) {
/* Don't let callback see that we've created our
internal ioloop in case it wants to add some ios
or timeouts. */
current_ioloop = dict->prev_ioloop;
}
reply->callback(ret, reply->context);
if (dict->prev_ioloop != NULL)
current_ioloop = dict->ioloop;
}
}
static void redis_conn_destroy(struct connection *_conn)
{
struct redis_connection *conn = (struct redis_connection *)_conn;
const struct redis_dict_reply *reply;
conn->dict->db_id_set = FALSE;
conn->dict->connected = FALSE;
connection_disconnect(_conn);
array_foreach(&conn->dict->replies, reply)
redis_callback(conn->dict, reply, -1);
array_clear(&conn->dict->replies);
array_clear(&conn->dict->input_states);
if (conn->dict->ioloop != NULL)
io_loop_stop(conn->dict->ioloop);
}
static void redis_dict_wait_timeout(struct redis_dict *dict)
{
i_error("redis: Commit timed out in %u.%03u secs",
dict->timeout_msecs/1000, dict->timeout_msecs%1000);
io_loop_stop(dict->ioloop);
}
static void redis_wait(struct redis_dict *dict)
{
struct timeout *to;
i_assert(dict->ioloop == NULL);
dict->prev_ioloop = current_ioloop;
dict->ioloop = io_loop_create();
to = timeout_add(dict->timeout_msecs, redis_dict_wait_timeout, dict);
connection_switch_ioloop(&dict->conn.conn);
do {
io_loop_run(dict->ioloop);
} while (array_count(&dict->input_states) > 0);
timeout_remove(&to);
io_loop_set_current(dict->prev_ioloop);
connection_switch_ioloop(&dict->conn.conn);
io_loop_set_current(dict->ioloop);
io_loop_destroy(&dict->ioloop);
dict->prev_ioloop = NULL;
}
static int redis_input_get(struct redis_connection *conn)
{
const unsigned char *data;
size_t size;
const char *line;
if (conn->bytes_left == 0) {
/* read the size first */
line = i_stream_next_line(conn->conn.input);
if (line == NULL)
return 0;
if (strcmp(line, "$-1") == 0) {
conn->value_received = TRUE;
conn->value_not_found = TRUE;
if (conn->dict->ioloop != NULL)
io_loop_stop(conn->dict->ioloop);
redis_input_state_remove(conn->dict);
return 1;
}
if (line[0] != '$' || str_to_uint(line+1, &conn->bytes_left) < 0) {
i_error("redis: Unexpected input (wanted $size): %s",
line);
return -1;
}
conn->bytes_left += 2; /* include trailing CRLF */
}
data = i_stream_get_data(conn->conn.input, &size);
if (size > conn->bytes_left)
size = conn->bytes_left;
str_append_n(conn->last_reply, data, size);
conn->bytes_left -= size;
i_stream_skip(conn->conn.input, size);
if (conn->bytes_left > 0)
return 0;
/* reply fully read - drop trailing CRLF */
conn->value_received = TRUE;
str_truncate(conn->last_reply, str_len(conn->last_reply)-2);
if (conn->dict->ioloop != NULL)
io_loop_stop(conn->dict->ioloop);
redis_input_state_remove(conn->dict);
return 1;
}
static int redis_conn_input_more(struct redis_connection *conn)
{
struct redis_dict *dict = conn->dict;
struct redis_dict_reply *reply;
const enum redis_input_state *states;
enum redis_input_state state;
unsigned int count, num_replies;
const char *line;
states = array_get(&dict->input_states, &count);
if (count == 0) {
line = i_stream_next_line(conn->conn.input);
if (line == NULL)
return 0;
i_error("redis: Unexpected input (expected nothing): %s", line);
return -1;
}
state = states[0];
if (state == REDIS_INPUT_STATE_GET)
return redis_input_get(conn);
line = i_stream_next_line(conn->conn.input);
if (line == NULL)
return 0;
redis_input_state_remove(dict);
switch (state) {
case REDIS_INPUT_STATE_GET:
i_unreached();
case REDIS_INPUT_STATE_SELECT:
case REDIS_INPUT_STATE_MULTI:
case REDIS_INPUT_STATE_DISCARD:
if (line[0] != '+')
break;
return 1;
case REDIS_INPUT_STATE_EXEC:
if (line[0] != '*' || str_to_uint(line+1, &num_replies) < 0)
break;
reply = array_idx_modifiable(&dict->replies, 0);
i_assert(reply->reply_count > 0);
if (reply->reply_count != num_replies) {
i_error("redis: EXEC expected %u replies, not %u",
reply->reply_count, num_replies);
return -1;
}
return 1;
case REDIS_INPUT_STATE_EXEC_REPLY:
if (*line != '+' && *line != ':')
break;
/* success, just ignore the actual reply */
reply = array_idx_modifiable(&dict->replies, 0);
i_assert(reply->reply_count > 0);
if (--reply->reply_count == 0) {
redis_callback(dict, reply, 1);
array_delete(&dict->replies, 0, 1);
/* if we're running in a dict-ioloop, we're handling a
synchronous commit and need to stop now */
if (array_count(&dict->replies) == 0 &&
conn->dict->ioloop != NULL)
io_loop_stop(conn->dict->ioloop);
}
return 1;
}
i_error("redis: Unexpected input (state=%d): %s", state, line);
return -1;
}
static void redis_conn_input(struct connection *_conn)
{
struct redis_connection *conn = (struct redis_connection *)_conn;
int ret;
switch (i_stream_read(_conn->input)) {
case 0:
return;
case -1:
if (conn->dict->ioloop != NULL)
i_error("redis: Disconnected unexpectedly");
redis_conn_destroy(_conn);
return;
default:
break;
}
while ((ret = redis_conn_input_more(conn)) > 0) ;
if (ret < 0)
redis_conn_destroy(_conn);
}
static void redis_conn_connected(struct connection *_conn, bool success)
{
struct redis_connection *conn = (struct redis_connection *)_conn;
if (!success) {
i_error("redis: connect(%s) failed: %m", _conn->name);
} else {
conn->dict->connected = TRUE;
}
if (conn->dict->ioloop != NULL)
io_loop_stop(conn->dict->ioloop);
}
static const struct connection_settings redis_conn_set = {
.input_max_size = (size_t)-1,
.output_max_size = (size_t)-1,
.client = TRUE
};
static const struct connection_vfuncs redis_conn_vfuncs = {
.destroy = redis_conn_destroy,
.input = redis_conn_input,
.client_connected = redis_conn_connected
};
static const char *redis_escape_username(const char *username)
{
const char *p;
string_t *str = t_str_new(64);
for (p = username; *p != '\0'; p++) {
switch (*p) {
case DICT_USERNAME_SEPARATOR:
str_append(str, "\\-");
break;
case '\\':
str_append(str, "\\\\");
break;
default:
str_append_c(str, *p);
}
}
return str_c(str);
}
static int
redis_dict_init(struct dict *driver, const char *uri,
const struct dict_settings *set,
struct dict **dict_r, const char **error_r)
{
struct redis_dict *dict;
struct ip_addr ip;
unsigned int secs, port = REDIS_DEFAULT_PORT;
const char *const *args, *unix_path = NULL;
int ret = 0;
if (redis_connections == NULL) {
redis_connections =
connection_list_init(&redis_conn_set,
&redis_conn_vfuncs);
}
dict = i_new(struct redis_dict, 1);
if (net_addr2ip("127.0.0.1", &ip) < 0)
i_unreached();
dict->timeout_msecs = REDIS_DEFAULT_LOOKUP_TIMEOUT_MSECS;
dict->key_prefix = i_strdup("");
args = t_strsplit(uri, ":");
for (; *args != NULL; args++) {
if (strncmp(*args, "path=", 5) == 0) {
unix_path = *args + 5;
} else if (strncmp(*args, "host=", 5) == 0) {
if (net_addr2ip(*args+5, &ip) < 0) {
*error_r = t_strdup_printf("Invalid IP: %s",
*args+5);
ret = -1;
}
} else if (strncmp(*args, "port=", 5) == 0) {
if (str_to_uint(*args+5, &port) < 0) {
*error_r = t_strdup_printf("Invalid port: %s",
*args+5);
ret = -1;
}
} else if (strncmp(*args, "prefix=", 7) == 0) {
i_free(dict->key_prefix);
dict->key_prefix = i_strdup(*args + 7);
} else if (strncmp(*args, "db=", 3) == 0) {
if (str_to_uint(*args+3, &dict->db_id) < 0) {
*error_r = t_strdup_printf(
"Invalid db number: %s", *args+3);
ret = -1;
}
} else if (strncmp(*args, "expire_secs=", 12) == 0) {
const char *value = *args + 12;
if (str_to_uint(value, &secs) < 0 || secs == 0) {
*error_r = t_strdup_printf(
"Invalid expire_secs: %s", value);
ret = -1;
}
i_free(dict->expire_value);
dict->expire_value = i_strdup(value);
} else if (strncmp(*args, "timeout_msecs=", 14) == 0) {
if (str_to_uint(*args+14, &dict->timeout_msecs) < 0) {
*error_r = t_strdup_printf(
"Invalid timeout_msecs: %s", *args+14);
ret = -1;
}
} else {
*error_r = t_strdup_printf("Unknown parameter: %s",
*args);
ret = -1;
}
}
if (ret < 0) {
i_free(dict->key_prefix);
i_free(dict);
return -1;
}
if (unix_path != NULL) {
connection_init_client_unix(redis_connections, &dict->conn.conn,
unix_path);
} else {
connection_init_client_ip(redis_connections, &dict->conn.conn,
&ip, port);
}
dict->dict = *driver;
dict->conn.last_reply = str_new(default_pool, 256);
dict->conn.dict = dict;
i_array_init(&dict->input_states, 4);
i_array_init(&dict->replies, 4);
if (strchr(set->username, DICT_USERNAME_SEPARATOR) == NULL)
dict->username = i_strdup(set->username);
else {
/* escape the username */
dict->username = i_strdup(redis_escape_username(set->username));
}
*dict_r = &dict->dict;
return 0;
}
static void redis_dict_deinit(struct dict *_dict)
{
struct redis_dict *dict = (struct redis_dict *)_dict;
if (array_count(&dict->input_states) > 0) {
i_assert(dict->connected);
redis_wait(dict);
}
connection_deinit(&dict->conn.conn);
str_free(&dict->conn.last_reply);
array_free(&dict->replies);
array_free(&dict->input_states);
i_free(dict->expire_value);
i_free(dict->key_prefix);
i_free(dict->username);
i_free(dict);
if (redis_connections->connections == NULL)
connection_list_deinit(&redis_connections);
}
static void redis_dict_lookup_timeout(struct redis_dict *dict)
{
i_error("redis: Lookup timed out in %u.%03u secs",
dict->timeout_msecs/1000, dict->timeout_msecs%1000);
io_loop_stop(dict->ioloop);
}
static const char *
redis_dict_get_full_key(struct redis_dict *dict, const char *key)
{
if (strncmp(key, DICT_PATH_SHARED, strlen(DICT_PATH_SHARED)) == 0)
key += strlen(DICT_PATH_SHARED);
else if (strncmp(key, DICT_PATH_PRIVATE, strlen(DICT_PATH_PRIVATE)) == 0) {
key = t_strdup_printf("%s%c%s", dict->username,
DICT_USERNAME_SEPARATOR,
key + strlen(DICT_PATH_PRIVATE));
} else {
i_unreached();
}
if (*dict->key_prefix != '\0')
key = t_strconcat(dict->key_prefix, key, NULL);
return key;
}
static void redis_dict_select_db(struct redis_dict *dict)
{
const char *cmd, *db_str;
if (dict->db_id_set)
return;
dict->db_id_set = TRUE;
if (dict->db_id == 0) {
/* 0 is the default */
return;
}
db_str = dec2str(dict->db_id);
cmd = t_strdup_printf("*2\r\n$6\r\nSELECT\r\n$%d\r\n%s\r\n",
(int)strlen(db_str), db_str);
o_stream_nsend_str(dict->conn.conn.output, cmd);
redis_input_state_add(dict, REDIS_INPUT_STATE_SELECT);
}
static int
redis_dict_lookup_real(struct redis_dict *dict, pool_t pool,
const char *key, const char **value_r)
{
struct timeout *to;
const char *cmd;
key = redis_dict_get_full_key(dict, key);
dict->conn.value_received = FALSE;
dict->conn.value_not_found = FALSE;
i_assert(dict->ioloop == NULL);
dict->prev_ioloop = current_ioloop;
dict->ioloop = io_loop_create();
connection_switch_ioloop(&dict->conn.conn);
if (dict->conn.conn.fd_in == -1 &&
connection_client_connect(&dict->conn.conn) < 0) {
i_error("redis: Couldn't connect to %s", dict->conn.conn.name);
} else {
to = timeout_add(dict->timeout_msecs,
redis_dict_lookup_timeout, dict);
if (!dict->connected) {
/* wait for connection */
io_loop_run(dict->ioloop);
}
if (dict->connected) {
redis_dict_select_db(dict);
cmd = t_strdup_printf("*2\r\n$3\r\nGET\r\n$%d\r\n%s\r\n",
(int)strlen(key), key);
o_stream_nsend_str(dict->conn.conn.output, cmd);
str_truncate(dict->conn.last_reply, 0);
redis_input_state_add(dict, REDIS_INPUT_STATE_GET);
do {
io_loop_run(dict->ioloop);
} while (array_count(&dict->input_states) > 0);
}
timeout_remove(&to);
}
io_loop_set_current(dict->prev_ioloop);
connection_switch_ioloop(&dict->conn.conn);
io_loop_set_current(dict->ioloop);
io_loop_destroy(&dict->ioloop);
dict->prev_ioloop = NULL;
if (!dict->conn.value_received) {
/* we failed in some way. make sure we disconnect since the
connection state isn't known anymore */
redis_conn_destroy(&dict->conn.conn);
return -1;
}
if (dict->conn.value_not_found)
return 0;
*value_r = p_strdup(pool, str_c(dict->conn.last_reply));
return 1;
}
static int redis_dict_lookup(struct dict *_dict, pool_t pool,
const char *key, const char **value_r)
{
struct redis_dict *dict = (struct redis_dict *)_dict;
int ret;
i_assert(!dict->transaction_open);
if (pool->datastack_pool)
ret = redis_dict_lookup_real(dict, pool, key, value_r);
else T_BEGIN {
ret = redis_dict_lookup_real(dict, pool, key, value_r);
} T_END;
return ret;
}
static struct dict_transaction_context *
redis_transaction_init(struct dict *_dict)
{
struct redis_dict *dict = (struct redis_dict *)_dict;
struct redis_dict_transaction_context *ctx;
i_assert(!dict->transaction_open);
dict->transaction_open = TRUE;
ctx = i_new(struct redis_dict_transaction_context, 1);
ctx->ctx.dict = _dict;
if (dict->conn.conn.fd_in == -1 &&
connection_client_connect(&dict->conn.conn) < 0) {
i_error("redis: Couldn't connect to %s",
dict->conn.conn.name);
} else if (!dict->connected) {
/* wait for connection */
redis_wait(dict);
}
if (dict->connected)
redis_dict_select_db(dict);
return &ctx->ctx;
}
static int
redis_transaction_commit(struct dict_transaction_context *_ctx, bool async,
dict_transaction_commit_callback_t *callback,
void *context)
{
struct redis_dict_transaction_context *ctx =
(struct redis_dict_transaction_context *)_ctx;
struct redis_dict *dict = (struct redis_dict *)_ctx->dict;
struct redis_dict_reply *reply;
unsigned int i;
int ret = 1;
i_assert(dict->transaction_open);
dict->transaction_open = FALSE;
if (ctx->failed) {
/* make sure we're disconnected */
redis_conn_destroy(&dict->conn.conn);
ret = -1;
} else if (_ctx->changed) {
i_assert(ctx->cmd_count > 0);
o_stream_nsend_str(dict->conn.conn.output,
"*1\r\n$4\r\nEXEC\r\n");
reply = array_append_space(&dict->replies);
reply->callback = callback;
reply->context = context;
reply->reply_count = ctx->cmd_count;
redis_input_state_add(dict, REDIS_INPUT_STATE_EXEC);
for (i = 0; i < ctx->cmd_count; i++)
redis_input_state_add(dict, REDIS_INPUT_STATE_EXEC_REPLY);
if (async)
return 1;
redis_wait(dict);
}
if (callback != NULL)
callback(ret, context);
i_free(ctx);
return ret;
}
static void redis_transaction_rollback(struct dict_transaction_context *_ctx)
{
struct redis_dict_transaction_context *ctx =
(struct redis_dict_transaction_context *)_ctx;
struct redis_dict *dict = (struct redis_dict *)_ctx->dict;
struct redis_dict_reply *reply;
i_assert(dict->transaction_open);
dict->transaction_open = FALSE;
if (ctx->failed) {
/* make sure we're disconnected */
redis_conn_destroy(&dict->conn.conn);
} else if (_ctx->changed) {
o_stream_nsend_str(dict->conn.conn.output,
"*1\r\n$7\r\nDISCARD\r\n");
reply = array_append_space(&dict->replies);
reply->reply_count = 1;
redis_input_state_add(dict, REDIS_INPUT_STATE_DISCARD);
}
i_free(ctx);
}
static int redis_check_transaction(struct redis_dict_transaction_context *ctx)
{
struct redis_dict *dict = (struct redis_dict *)ctx->ctx.dict;
if (ctx->failed)
return -1;
if (!dict->connected) {
/* disconnected during transaction */
ctx->failed = TRUE;
return -1;
}
if (ctx->ctx.changed)
return 0;
redis_input_state_add(dict, REDIS_INPUT_STATE_MULTI);
if (o_stream_send_str(dict->conn.conn.output,
"*1\r\n$5\r\nMULTI\r\n") < 0) {
ctx->failed = TRUE;
return -1;
}
return 0;
}
static void
redis_append_expire(struct redis_dict_transaction_context *ctx,
string_t *cmd, const char *key)
{
struct redis_dict *dict = (struct redis_dict *)ctx->ctx.dict;
if (dict->expire_value == NULL)
return;
str_printfa(cmd, "*3\r\n$6\r\nEXPIRE\r\n$%u\r\n%s\r\n$%u\r\n%s\r\n",
(unsigned int)strlen(key), key,
(unsigned int)strlen(dict->expire_value),
dict->expire_value);
redis_input_state_add(dict, REDIS_INPUT_STATE_MULTI);
ctx->cmd_count++;
}
static void redis_set(struct dict_transaction_context *_ctx,
const char *key, const char *value)
{
struct redis_dict_transaction_context *ctx =
(struct redis_dict_transaction_context *)_ctx;
struct redis_dict *dict = (struct redis_dict *)_ctx->dict;
string_t *cmd;
if (redis_check_transaction(ctx) < 0)
return;
key = redis_dict_get_full_key(dict, key);
cmd = t_str_new(128);
str_printfa(cmd, "*3\r\n$3\r\nSET\r\n$%u\r\n%s\r\n$%u\r\n%s\r\n",
(unsigned int)strlen(key), key,
(unsigned int)strlen(value), value);
redis_input_state_add(dict, REDIS_INPUT_STATE_MULTI);
ctx->cmd_count++;
redis_append_expire(ctx, cmd, key);
if (o_stream_send(dict->conn.conn.output, str_data(cmd), str_len(cmd)) < 0)
ctx->failed = TRUE;
}
static void redis_unset(struct dict_transaction_context *_ctx,
const char *key)
{
struct redis_dict_transaction_context *ctx =
(struct redis_dict_transaction_context *)_ctx;
struct redis_dict *dict = (struct redis_dict *)_ctx->dict;
const char *cmd;
if (redis_check_transaction(ctx) < 0)
return;
key = redis_dict_get_full_key(dict, key);
cmd = t_strdup_printf("*2\r\n$3\r\nDEL\r\n$%u\r\n%s\r\n",
(unsigned int)strlen(key), key);
if (o_stream_send_str(dict->conn.conn.output, cmd) < 0)
ctx->failed = TRUE;
redis_input_state_add(dict, REDIS_INPUT_STATE_MULTI);
ctx->cmd_count++;
}
static void redis_append(struct dict_transaction_context *_ctx,
const char *key, const char *value)
{
struct redis_dict_transaction_context *ctx =
(struct redis_dict_transaction_context *)_ctx;
struct redis_dict *dict = (struct redis_dict *)_ctx->dict;
const char *cmd;
if (redis_check_transaction(ctx) < 0)
return;
key = redis_dict_get_full_key(dict, key);
cmd = t_strdup_printf("*3\r\n$6\r\nAPPEND\r\n$%u\r\n%s\r\n$%u\r\n%s\r\n",
(unsigned int)strlen(key), key,
(unsigned int)strlen(value), value);
if (o_stream_send_str(dict->conn.conn.output, cmd) < 0)
ctx->failed = TRUE;
redis_input_state_add(dict, REDIS_INPUT_STATE_MULTI);
ctx->cmd_count++;
}
static void redis_atomic_inc(struct dict_transaction_context *_ctx,
const char *key, long long diff)
{
struct redis_dict_transaction_context *ctx =
(struct redis_dict_transaction_context *)_ctx;
struct redis_dict *dict = (struct redis_dict *)_ctx->dict;
const char *diffstr;
string_t *cmd;
if (redis_check_transaction(ctx) < 0)
return;
key = redis_dict_get_full_key(dict, key);
diffstr = t_strdup_printf("%lld", diff);
cmd = t_str_new(128);
str_printfa(cmd, "*3\r\n$6\r\nINCRBY\r\n$%u\r\n%s\r\n$%u\r\n%s\r\n",
(unsigned int)strlen(key), key,
(unsigned int)strlen(diffstr), diffstr);
redis_input_state_add(dict, REDIS_INPUT_STATE_MULTI);
ctx->cmd_count++;
redis_append_expire(ctx, cmd, key);
if (o_stream_send(dict->conn.conn.output, str_data(cmd), str_len(cmd)) < 0)
ctx->failed = TRUE;
}
struct dict dict_driver_redis = {
.name = "redis",
{
redis_dict_init,
redis_dict_deinit,
NULL,
redis_dict_lookup,
NULL,
NULL,
NULL,
redis_transaction_init,
redis_transaction_commit,
redis_transaction_rollback,
redis_set,
redis_unset,
redis_append,
redis_atomic_inc
}
};
|
LTD-Beget/dovecot
|
src/lib-dict/dict-redis.c
|
C
|
mit
| 21,324
|
//
// Created by Austin on 1/21/2016.
//
#ifndef GAMEBOYEMULATOR_NETWORK_HPP
#define GAMEBOYEMULATOR_NETWORK_HPP
// SFML
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Network.hpp>
#include <SFML/System.hpp>
#include <unordered_map>
#include <cstdlib>
#include <iostream>
#include <ctime>
#include <stack>
class MemoryManagementUnit;
class Display;
class Timer;
class Processor;
class Input;
class GameBoy;
/**
* Holds information regarding each client/server on the network.
*/
struct NetworkId {
int uniqueId;
std::string name;
sf::IpAddress address;
unsigned short port;
};
/**
* Represents player's position in the map.
*/
struct PlayerPosition {
uint8_t yPosition;
uint8_t xPosition;
uint8_t yBlockPosition; // Not 100% sure what this is or if it's needed
uint8_t xBlockPosition;
};
/**
* Represents sprite information.
*/
struct SpriteState {
uint8_t spriteIndex; // 0-16 (0 is the player/client's)
uint8_t pictureId; // 0xC1X0
uint8_t moveStatus; // 0xC1X1
uint8_t direction; // 0xC1X9
uint8_t yDisplacement; // 0xC2X2
uint8_t xDisplacement; // 0xC2X3
uint8_t yPosition; // 0xC2X4
uint8_t xPosition; // 0xC2X5
uint8_t canMove; // 0xC2X6
uint8_t inGrass; // 0xC2X7
};
/**
* Holds game state passed from the network for a specific client.
*/
struct NetworkGameState {
int uniqueId; // Populated from NetworkId
std::string name;
int currentMap;
int walkBikeSurfState;
PlayerPosition playerPosition;
std::vector<SpriteState> sprites;
std::array<uint8_t, 0x194> partyMonsters; // The player's pokemon party from 0xd163 to 0xd273
};
/**
* Holds the synchronized game state of all players and the host's sprites.
*/
struct HostGameState {
std::vector<NetworkGameState> playerGameStates;
std::vector<SpriteState> sprites;
};
/**
* All Packets start with PacketType to determine how to deserialize the message.
*/
enum class PacketType {
CONNECT_REQUEST = 1,
CONNECT_RESPONSE = 2,
NETWORK_GAME_STATE = 3,
HOST_GAME_STATE = 4,
GENERIC_REQUEST = 5,
NONE
};
/**
* Indicates what mode the network is in.
*/
enum class NetworkMode {
CONNECTING,
FAILED_CONNECTING,
IDLE,
CONNECTED_AS_CLIENT,
CONNECTED_AS_HOST,
NONE
};
/**
* Used to request a connection to host.
*/
struct ConnectRequest {
std::string name;
};
/**
* Used as a response to a connection request as the host.
*/
struct ConnectResponse {
int uniqueId; // Assigned from server
int serverUniqueId;
};
enum class ResponseType {
REFUSE_BATTLE_REQUEST,
REFUSE_TRADE_REQUEST,
ACCEPT_BATTLE_REQUEST,
ACCEPT_TRADE_REQUEST,
REQUEST_BATTLE,
REQUEST_TRADE,
MOVE_CHOSEN,
NONE
};
/**
* Used for things like responding to a battle request or sending a trade request.
*/
struct GenericRequestResponse {
ResponseType responseType;
std::vector<int> data; // Usually only contains one value, the target player unique id
};
/**
* Handles server and client communication.
*/
class Network {
public:
Network();
void Initialize(MemoryManagementUnit* mmu_, Display* display_,
Timer* timer_, Processor* cpu_, Input* input_, GameBoy* gameboy_, sf::RenderWindow* window_);
bool Host(unsigned short port, const std::string& name);
bool Connect(sf::IpAddress address, unsigned short hostPort, unsigned short port, std::string name);
HostGameState Update(NetworkGameState& localGameState);
NetworkMode networkMode;
bool isHost;
int uniqueId;
std::vector<GenericRequestResponse> pendingRequests; // Treat this as a iterable queue
bool inBattle;
bool moveSent;
int battleTurn;
void CreateBattleRequest(int targetUniqueId);
void AcceptBattleRequest(int targetUniqueId);
void RefuseBattleRequest(int targetUniqueId);
void SendPlayerMove(int targetUniqueId, int move, int action, int whichPokemon);
private:
MemoryManagementUnit* mmu;
Display* display;
Timer* timer;
Processor* cpu;
Input* input;
GameBoy* gameboy;
sf::RenderWindow* window;
sf::UdpSocket socket;
std::string name;
std::unordered_map<int, NetworkId> clients; // UniqueId, NetworkId
// NOTE: This only holds 1 element (0) if you are a client (the host's NetworkId)
std::unordered_map<int, NetworkGameState> clientGameStates; // UniqueId, NetworkGameState
bool SetupSocket(unsigned short port);
HostGameState HostUpdate(const NetworkGameState& localGameState);
void HandleConnectRequest(sf::Packet packet, sf::IpAddress sender, unsigned short port);
NetworkGameState HandleGameStateResponse(sf::Packet gameStatePacket, sf::IpAddress sender, unsigned short port);
HostGameState ClientUpdate(const NetworkGameState& localGameState);
void HandleConnectResponse(sf::Packet gameStatePacket, sf::IpAddress sender, unsigned short port);
void HandlePendingRequests();
void HandleGenericRequestPacket(sf::Packet& packet, sf::IpAddress sender, unsigned short port);
void RemovePendingRequest(ResponseType responseType, int remotePlayerId);
int FindClientUniqueId(sf::IpAddress sender, unsigned short port);
};
#endif //GAMEBOYEMULATOR_NETWORK_HPP
|
Salgat/PokeSynch
|
src/Network.hpp
|
C++
|
mit
| 5,344
|
// JOOS1:TYPE_CHECKING,INSTANTIATE_ABSTRACT_CLASS
// JOOS2:TYPE_CHECKING,INSTANTIATE_ABSTRACT_CLASS
// JAVAC:UNKNOWN
//
/**
* Typecheck:
* - The type in a class instance creation expression must be a
* non-abstract class.
*/
public class Je_6_InstantiateAbstract {
public Je_6_InstantiateAbstract () {}
public static int test() {
Number j = new Number();
return 123;
}
}
|
gregwym/joos-compiler-java
|
testcases/a3/Je_6_InstantiateAbstract.java
|
Java
|
mit
| 393
|
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
const gulp = require('gulp');
const filter = require('gulp-filter');
const es = require('event-stream');
const gulpeslint = require('gulp-eslint');
const tsfmt = require('typescript-formatter');
const VinylFile = require('vinyl');
const vfs = require('vinyl-fs');
const path = require('path');
const fs = require('fs');
const pall = require('p-all');
const task = require('./lib/task');
/**
* Hygiene works by creating cascading subsets of all our files and
* passing them through a sequence of checks. Here are the current subsets,
* named according to the checks performed on them. Each subset contains
* the following one, as described in mathematical notation:
*
* all ⊃ eol ⊇ indentation ⊃ copyright ⊃ typescript
*/
const all = [
'*',
'build/**/*',
'extensions/**/*',
'scripts/**/*',
'src/**/*',
'test/**/*',
'!test/**/out/**',
'!**/node_modules/**'
];
const indentationFilter = [
'**',
// except specific files
'!ThirdPartyNotices.txt',
'!LICENSE.{txt,rtf}',
'!LICENSES.chromium.html',
'!**/LICENSE',
'!src/vs/nls.js',
'!src/vs/nls.build.js',
'!src/vs/css.js',
'!src/vs/css.build.js',
'!src/vs/loader.js',
'!src/vs/base/common/insane/insane.js',
'!src/vs/base/common/marked/marked.js',
'!src/vs/base/node/terminateProcess.sh',
'!src/vs/base/node/cpuUsage.sh',
'!test/unit/assert.js',
// except specific folders
'!test/automation/out/**',
'!test/smoke/out/**',
'!extensions/vscode-api-tests/testWorkspace/**',
'!extensions/vscode-api-tests/testWorkspace2/**',
'!build/monaco/**',
'!build/win32/**',
// except multiple specific files
'!**/package.json',
'!**/yarn.lock',
'!**/yarn-error.log',
// except multiple specific folders
'!**/codicon/**',
'!**/fixtures/**',
'!**/lib/**',
'!extensions/**/out/**',
'!extensions/**/snippets/**',
'!extensions/**/syntaxes/**',
'!extensions/**/themes/**',
'!extensions/**/colorize-fixtures/**',
// except specific file types
'!src/vs/*/**/*.d.ts',
'!src/typings/**/*.d.ts',
'!extensions/**/*.d.ts',
'!**/*.{svg,exe,png,bmp,scpt,bat,cmd,cur,ttf,woff,eot,md,ps1,template,yaml,yml,d.ts.recipe,ico,icns,plist}',
'!build/{lib,download}/**/*.js',
'!build/**/*.sh',
'!build/azure-pipelines/**/*.js',
'!build/azure-pipelines/**/*.config',
'!**/Dockerfile',
'!**/Dockerfile.*',
'!**/*.Dockerfile',
'!**/*.dockerfile',
'!extensions/markdown-language-features/media/*.js'
];
const copyrightFilter = [
'**',
'!**/*.desktop',
'!**/*.json',
'!**/*.html',
'!**/*.template',
'!**/*.md',
'!**/*.bat',
'!**/*.cmd',
'!**/*.ico',
'!**/*.icns',
'!**/*.xml',
'!**/*.sh',
'!**/*.txt',
'!**/*.xpm',
'!**/*.opts',
'!**/*.disabled',
'!**/*.code-workspace',
'!**/*.js.map',
'!build/**/*.init',
'!resources/linux/snap/snapcraft.yaml',
'!resources/linux/snap/electron-launch',
'!resources/win32/bin/code.js',
'!resources/completions/**',
'!extensions/markdown-language-features/media/highlight.css',
'!extensions/html-language-features/server/src/modes/typescript/*',
'!extensions/*/server/bin/*',
'!src/vs/editor/test/node/classification/typescript-test.ts',
'!scripts/code-web.js'
];
const jsHygieneFilter = [
'src/**/*.js',
'build/gulpfile.*.js',
'!src/vs/loader.js',
'!src/vs/css.js',
'!src/vs/nls.js',
'!src/vs/css.build.js',
'!src/vs/nls.build.js',
'!src/**/insane.js',
'!src/**/marked.js',
'!**/test/**'
];
const tsHygieneFilter = [
'src/**/*.ts',
'test/**/*.ts',
'extensions/**/*.ts',
'!**/fixtures/**',
'!**/typings/**',
'!**/node_modules/**',
'!extensions/typescript-basics/test/colorize-fixtures/**',
'!extensions/vscode-api-tests/testWorkspace/**',
'!extensions/vscode-api-tests/testWorkspace2/**',
'!extensions/**/*.test.ts',
'!extensions/html-language-features/server/lib/jquery.d.ts'
];
const copyrightHeaderLines = [
'/*---------------------------------------------------------------------------------------------',
' * Copyright (c) Microsoft Corporation. All rights reserved.',
' * Licensed under the MIT License. See License.txt in the project root for license information.',
' *--------------------------------------------------------------------------------------------*/'
];
gulp.task('eslint', () => {
return vfs.src(all, { base: '.', follow: true, allowEmpty: true })
.pipe(filter(jsHygieneFilter.concat(tsHygieneFilter)))
.pipe(gulpeslint({
configFile: '.eslintrc.json',
rulePaths: ['./build/lib/eslint']
}))
.pipe(gulpeslint.formatEach('compact'))
.pipe(gulpeslint.results(results => {
if (results.warningCount > 0 || results.errorCount > 0) {
throw new Error('eslint failed with warnings and/or errors');
}
}));
});
function checkPackageJSON(actualPath) {
const actual = require(path.join(__dirname, '..', actualPath));
const rootPackageJSON = require('../package.json');
for (let depName in actual.dependencies) {
const depVersion = actual.dependencies[depName];
const rootDepVersion = rootPackageJSON.dependencies[depName];
if (!rootDepVersion) {
// missing in root is allowed
continue;
}
if (depVersion !== rootDepVersion) {
this.emit('error', `The dependency ${depName} in '${actualPath}' (${depVersion}) is different than in the root package.json (${rootDepVersion})`);
}
}
}
const checkPackageJSONTask = task.define('check-package-json', () => {
return gulp.src('package.json')
.pipe(es.through(function () {
checkPackageJSON.call(this, 'remote/package.json');
checkPackageJSON.call(this, 'remote/web/package.json');
}));
});
gulp.task(checkPackageJSONTask);
function hygiene(some) {
let errorCount = 0;
const productJson = es.through(function (file) {
const product = JSON.parse(file.contents.toString('utf8'));
if (product.extensionsGallery) {
console.error('product.json: Contains "extensionsGallery"');
errorCount++;
}
this.emit('data', file);
});
const indentation = es.through(function (file) {
const lines = file.contents.toString('utf8').split(/\r\n|\r|\n/);
file.__lines = lines;
lines
.forEach((line, i) => {
if (/^\s*$/.test(line)) {
// empty or whitespace lines are OK
} else if (/^[\t]*[^\s]/.test(line)) {
// good indent
} else if (/^[\t]* \*/.test(line)) {
// block comment using an extra space
} else {
console.error(file.relative + '(' + (i + 1) + ',1): Bad whitespace indentation');
errorCount++;
}
});
this.emit('data', file);
});
const copyrights = es.through(function (file) {
const lines = file.__lines;
for (let i = 0; i < copyrightHeaderLines.length; i++) {
if (lines[i] !== copyrightHeaderLines[i]) {
console.error(file.relative + ': Missing or bad copyright statement');
errorCount++;
break;
}
}
this.emit('data', file);
});
const formatting = es.map(function (file, cb) {
tsfmt.processString(file.path, file.contents.toString('utf8'), {
verify: false,
tsfmt: true,
// verbose: true,
// keep checkJS happy
editorconfig: undefined,
replace: undefined,
tsconfig: undefined,
tsconfigFile: undefined,
tsfmtFile: undefined,
vscode: undefined,
vscodeFile: undefined
}).then(result => {
let original = result.src.replace(/\r\n/gm, '\n');
let formatted = result.dest.replace(/\r\n/gm, '\n');
if (original !== formatted) {
console.error('File not formatted. Run the \'Format Document\' command to fix it:', file.relative);
errorCount++;
}
cb(null, file);
}, err => {
cb(err);
});
});
let input;
if (Array.isArray(some) || typeof some === 'string' || !some) {
const options = { base: '.', follow: true, allowEmpty: true };
if (some) {
input = vfs.src(some, options).pipe(filter(all)); // split this up to not unnecessarily filter all a second time
} else {
input = vfs.src(all, options);
}
} else {
input = some;
}
const productJsonFilter = filter('product.json', { restore: true });
const result = input
.pipe(filter(f => !f.stat.isDirectory()))
.pipe(productJsonFilter)
.pipe(process.env['BUILD_SOURCEVERSION'] ? es.through() : productJson)
.pipe(productJsonFilter.restore)
.pipe(filter(indentationFilter))
.pipe(indentation)
.pipe(filter(copyrightFilter))
.pipe(copyrights);
const typescript = result
.pipe(filter(tsHygieneFilter))
.pipe(formatting);
const javascript = result
.pipe(filter(jsHygieneFilter.concat(tsHygieneFilter)))
.pipe(gulpeslint({
configFile: '.eslintrc.json',
rulePaths: ['./build/lib/eslint']
}))
.pipe(gulpeslint.formatEach('compact'))
.pipe(gulpeslint.results(results => {
errorCount += results.warningCount;
errorCount += results.errorCount;
}));
let count = 0;
return es.merge(typescript, javascript)
.pipe(es.through(function (data) {
count++;
if (process.env['TRAVIS'] && count % 10 === 0) {
process.stdout.write('.');
}
this.emit('data', data);
}, function () {
process.stdout.write('\n');
if (errorCount > 0) {
this.emit('error', 'Hygiene failed with ' + errorCount + ' errors. Check \'build/gulpfile.hygiene.js\'.');
} else {
this.emit('end');
}
}));
}
function createGitIndexVinyls(paths) {
const cp = require('child_process');
const repositoryPath = process.cwd();
const fns = paths.map(relativePath => () => new Promise((c, e) => {
const fullPath = path.join(repositoryPath, relativePath);
fs.stat(fullPath, (err, stat) => {
if (err && err.code === 'ENOENT') { // ignore deletions
return c(null);
} else if (err) {
return e(err);
}
cp.exec(`git show :${relativePath}`, { maxBuffer: 2000 * 1024, encoding: 'buffer' }, (err, out) => {
if (err) {
return e(err);
}
c(new VinylFile({
path: fullPath,
base: repositoryPath,
contents: out,
stat
}));
});
});
}));
return pall(fns, { concurrency: 4 })
.then(r => r.filter(p => !!p));
}
gulp.task('hygiene', task.series(checkPackageJSONTask, () => hygiene()));
// this allows us to run hygiene as a git pre-commit hook
if (require.main === module) {
const cp = require('child_process');
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
process.exit(1);
});
if (process.argv.length > 2) {
hygiene(process.argv.slice(2)).on('error', err => {
console.error();
console.error(err);
process.exit(1);
});
} else {
cp.exec('git diff --cached --name-only', { maxBuffer: 2000 * 1024 }, (err, out) => {
if (err) {
console.error();
console.error(err);
process.exit(1);
return;
}
const some = out
.split(/\r?\n/)
.filter(l => !!l);
if (some.length > 0) {
console.log('Reading git index versions...');
createGitIndexVinyls(some)
.then(vinyls => new Promise((c, e) => hygiene(es.readArray(vinyls))
.on('end', () => c())
.on('error', e)))
.catch(err => {
console.error();
console.error(err);
process.exit(1);
});
}
});
}
}
|
joaomoreno/vscode
|
build/gulpfile.hygiene.js
|
JavaScript
|
mit
| 11,309
|
class Solution:
def containVirus(self, grid: List[List[int]]) -> int:
current_set_number = 1
grid_set = [[0 for i in range(len(grid[0]))] for j in range(len(grid))]
set_grid = {}
threaten = {}
def getAdjacentCellsSet(row, col) -> List[int]:
answer = []
if row != 0 and grid_set[row-1][col] != 0 and grid_set[row-1][col] not in answer:
answer.append(grid_set[row-1][col])
if col != 0 and grid_set[row][col-1] != 0 and grid_set[row][col-1] not in answer:
answer.append(grid_set[row][col-1])
if row != len(grid)-1 and grid_set[row+1][col] != 0 and grid_set[row+1][col] not in answer:
answer.append(grid_set[row+1][col])
if col != len(grid[0])-1 and grid_set[row][col+1] != 0 and grid_set[row][col+1] not in answer:
answer.append(grid_set[row][col+1])
if -1 in answer:
answer.remove(-1)
if grid_set[row][col] in answer:
answer.remove(grid_set[row][col])
return answer
# Merge all regions to the first one.
def merge(regions: List[int]):
merge_to = regions[0]
for i in range(1, len(regions)):
for x, y in set_grid[regions[i]]:
grid_set[x][y] = merge_to
set_grid[merge_to] += set_grid[regions[i]]
del set_grid[regions[i]]
if regions[i] in threaten:
del threaten[regions[i]]
for i in range(len(grid)):
for j in range(len(grid[0])):
if grid[i][j] == 1:
adjacent_sets = getAdjacentCellsSet(i, j)
set_number = 0
if len(adjacent_sets) == 0:
set_number = current_set_number
current_set_number += 1
elif len(adjacent_sets) == 1:
set_number = adjacent_sets[0]
else: # Merge
merge(adjacent_sets)
set_number = adjacent_sets[0]
grid_set[i][j] = set_number
if set_number not in set_grid:
set_grid[set_number] = []
set_grid[set_number].append((i, j))
def adjacentThreatened(x, y):
answer = []
if x != 0 and grid_set[x-1][y] == 0:
answer.append((x-1, y))
if y != 0 and grid_set[x][y-1] == 0:
answer.append((x, y-1))
if x != len(grid_set)-1 and grid_set[x+1][y] == 0:
answer.append((x+1, y))
if y != len(grid_set[0])-1 and grid_set[x][y+1] == 0:
answer.append((x, y+1))
return answer
def threatenCells():
for i in set_grid:
if i == 0 or i == -1:
continue
threatened = set()
for x, y in set_grid[i]:
threatened = threatened.union(adjacentThreatened(x, y))
threaten[i] = len(threatened)
def contain(set_number):
wall = 0
for x, y in set_grid[set_number]:
grid_set[x][y] = -1
if x != 0 and grid_set[x-1][y] == 0:
wall += 1
if y != 0 and grid_set[x][y-1] == 0:
wall += 1
if x != len(grid_set)-1 and grid_set[x+1][y] == 0:
wall += 1
if y != len(grid_set[0])-1 and grid_set[x][y+1] == 0:
wall += 1
del set_grid[set_number]
del threaten[set_number]
return wall
def spread():
to_spread = deque()
for _, v in set_grid.items():
to_spread.extend(v)
while len(to_spread) > 0:
x, y = to_spread.popleft()
current_set = grid_set[x][y]
if x != 0 and grid_set[x-1][y] == 0:
grid_set[x-1][y] = current_set
set_grid[current_set].append((x-1, y))
adj = getAdjacentCellsSet(x-1, y)
merge([current_set]+adj)
if y != 0 and grid_set[x][y-1] == 0:
grid_set[x][y-1] = current_set
set_grid[current_set].append((x, y-1))
adj = getAdjacentCellsSet(x, y-1)
merge([current_set]+adj)
if x != len(grid_set)-1 and grid_set[x+1][y] == 0:
grid_set[x+1][y] = current_set
set_grid[current_set].append((x+1, y))
adj = getAdjacentCellsSet(x+1, y)
merge([current_set]+adj)
if y != len(grid_set[0])-1 and grid_set[x][y+1] == 0:
grid_set[x][y+1] = current_set
set_grid[current_set].append((x, y+1))
adj = getAdjacentCellsSet(x, y+1)
merge([current_set]+adj)
answer = 0
threatenCells()
# print(grid_set)
# print(answer)
while len(threaten) != 0:
# print(threaten)
largest_infected = sorted(
threaten.items(), key=lambda x: x[1], reverse=True)[0]
answer += contain(largest_infected[0])
spread()
# print(grid_set)
# print(answer)
threatenCells()
return answer
|
jianjunz/online-judge-solutions
|
leetcode/0750-contain-virus.py
|
Python
|
mit
| 5,673
|
//TODO: encapsulate back to private function when card design is done
//typical sizes:
/*
portrait:
iPhone 4,5 375px
iPhone 6 320px
iPhone 6+ 414px
Galaxy S3 360px
landscape:
iPhone 4 480px
iPhone 5 568px
iPhone 6 667px (574px container)
iPhone 6+ 736px (574px container)
Galaxy S3 640px (574px container)
*/
const ContainerWidth = {
XS: 375,
SM: 574,
MD: 728,
LG: 938,
XL: 1148,
XXL: 1384
}
const Breakpoints = {
XS: 0, // Extra small screen / phone
SM: 544, // Small screen / phone
MD: 768, // Medium screen / tablet
LG: 992, // Large screen / desktop
XL: 1200, // Extra large screen / wide desktop
XXL: 1440, // Extra large screen / wide desktop
}
const COLUMNS = 14
//since media query defines smaller base font size in typography.scss we need to calculated gutters properly
const getGutter = containerOrBrowserWidth => (containerOrBrowserWidth > Breakpoints.SM ? 16 : 14)
export default {
ContainerWidth : ContainerWidth,
getFluidContainerWidth(browserWidth) {
return browserWidth - getGutter(browserWidth)
},
getContainerWidth(browserWidth) {
//should match variables from bootstrap
if (browserWidth <= ContainerWidth.SM) {
return browserWidth //container becomes fluid for small size
} else if (browserWidth > ContainerWidth.SM && browserWidth < Breakpoints.MD) {
return ContainerWidth.SM
} else if (browserWidth >= Breakpoints.MD && browserWidth < Breakpoints.LG) {
return ContainerWidth.MD
} else if (browserWidth >= Breakpoints.LG && browserWidth < Breakpoints.XL) {
return ContainerWidth.LG
} else if (browserWidth >= Breakpoints.XL && browserWidth < Breakpoints.XXL) {
return ContainerWidth.XL
} else if (browserWidth >= Breakpoints.XXL) {
return ContainerWidth.XXL
}
},
init(containerWidth) {
return {
//returns width in px of Container's content area (width without paddings)
getColumnContentWidth({numberOfCols}) {
const oneColPercent = (100 / COLUMNS) / 100
const containerGutter = containerWidth >= Breakpoints.SM ? getGutter(containerWidth) : 0
return containerWidth * (oneColPercent * numberOfCols) - containerGutter
}
}
},
}
|
Restuta/rcn.io
|
src/client/styles/grid.js
|
JavaScript
|
mit
| 2,303
|
package geeksforgeeks;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;
/*
* http://www.geeksforgeeks.org/amazon-interview-set-8-2/
* Given an array. Iterate it for the given number of times. And then return the summation of the resultant elements.
* Ex: Array is { 1,2,5,6}, N=2
* After 1st iteration: {2-1, 5-2, 6-5}={1,3,1}
* After 2nd : {3-1, 1-3}={2,-2}
* Sum is 2 + (-2) = 0
* If only one element remains in the array, the element remains the same after applying the iteration. Complete the method.
*/;
public class _01AmazonInterview_09_02 {
public static void main(String[] args) {
Scanner scanner=new Scanner(new InputStreamReader(System.in));
Integer size=Integer.parseInt(scanner.nextLine());
Integer noOfIterations=Integer.parseInt(scanner.nextLine());
scanner.close();
int inputArray[]=new int[size];
inputArray=constructArray(size, inputArray);
System.out.println(Arrays.toString(inputArray));
System.out.println("Sum is : "+getSum(inputArray,noOfIterations));
}
private static int getSum(int[] inputArray, Integer noOfIterations) {
ArrayList<Integer> inputList=new ArrayList<Integer>();
ArrayList<Integer> outputList=new ArrayList<Integer>();
for (int i = 0; i < inputArray.length; i++) {
inputList.add(inputArray[i]);
}
for (int i = 0; i < noOfIterations; i++) {
if(inputList.size()==1)
continue;
for (int j = 0; j < inputList.size()-1; j++) {
outputList.add(inputList.get(j+1)-inputList.get(j));
}
inputList=outputList;
outputList=new ArrayList<Integer>();
}
return getSumFromList(inputList);
}
private static int getSumFromList(ArrayList<Integer> inputList) {
int sum=0;
for (int i = 0; i < inputList.size(); i++) {
sum+=inputList.get(i);
}
return sum;
}
private static int[] constructArray(Integer size, int[] inputArray) {
for (int i = 0; i < inputArray.length; i++) {
inputArray[i]=new Random().nextInt(size*3);
}
return inputArray;
}
}
|
darshanhs90/Java-Coding
|
src/geeksforgeeks/_01AmazonInterview_09_02.java
|
Java
|
mit
| 2,130
|
class Solution(object):
def validWordSquare(self, words):
"""
:type words: List[str]
:rtype: bool
"""
if words is None or len(words) == 0:
return True
ls = len(words)
for i in range(ls):
for j in range(1, len(words[i])):
if j >= ls:
return False
if i >= len(words[j]):
return False
if words[i][j] != words[j][i]:
return False
return True
# def validWordSquare(self, words):
# # https://discuss.leetcode.com/topic/63423/1-liner-python/2
# # The map(None, ...) transposes the "matrix", filling missing spots with None
# return map(None, *words) == map(None, *map(None, *words))
|
qiyuangong/leetcode
|
python/422_Valid_Word_Square.py
|
Python
|
mit
| 805
|
package net.fortytwo.smsn.brain.model.entities;
public interface Entity {
void destroy();
}
|
joshsh/extendo
|
brain/src/main/java/net/fortytwo/smsn/brain/model/entities/Entity.java
|
Java
|
mit
| 97
|
package com.qkyrie.markdown2pdf.internal.exceptions;
/**
* User: Quinten
* Date: 31-3-2014
* Time: 16:50
*
* @author Quinten De Swaef
*/
public class Markdown2PdfLogicException extends Exception {
public static final Markdown2PdfLogicException LOGIC_SETUP_READER = new Markdown2PdfLogicException("Markdown2Pdf logic exception: You didn't specify a reader for your markdown file");
public static final Markdown2PdfLogicException LOGIC_SETUP_WRITER = new Markdown2PdfLogicException("Markdown2Pdf logic exception: You didn't specify a writer for your pdf file");
public Markdown2PdfLogicException() {
}
public Markdown2PdfLogicException(String message) {
super(message);
}
public Markdown2PdfLogicException(String message, Throwable cause) {
super(message, cause);
}
public Markdown2PdfLogicException(Throwable cause) {
super(cause);
}
public Markdown2PdfLogicException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
|
eamonfoy/trello-to-markdown
|
src/main/java/com/qkyrie/markdown2pdf/internal/exceptions/Markdown2PdfLogicException.java
|
Java
|
mit
| 1,116
|
---
page_type: sample
languages:
- csharp
products:
- windows
- windows-uwp
urlFragment: BasicSuspension
extendedZipContent:
- path: SharedContent
target: SharedContent
- path: LICENSE
target: LICENSE
description: "Shows how to suspend, shut down and resume your application using the Suspension Manager."
---
<!---
category: LaunchingAndBackgroundTasks
samplefwlink: http://go.microsoft.com/fwlink/?LinkID=761251
--->
# Basic Suspension Sample
Shows how to suspend, shut down and resume your application using the Suspension Manager.
> **Note:** This sample is part of a large collection of UWP feature samples.
> You can download this sample as a standalone ZIP file
> [from docs.microsoft.com](https://docs.microsoft.com/samples/microsoft/windows-universal-samples/basicsuspension/),
> or you can download the entire collection as a single
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/master.zip), but be
> sure to unzip everything to access shared dependencies. For more info on working with the ZIP file,
> the samples collection, and GitHub, see [Get the UWP samples from GitHub](https://aka.ms/ovu2uq).
> For more samples, see the [Samples portal](https://aka.ms/winsamples) on the Windows Dev Center.
Specifically, this sample covers:
- Saving state when the app is suspended or shut down.
- Restoring state when the app is resumed from suspension or reactivated after being shut down.
From the Visual Studio debugging toolbar, use the Lifecycle Events menu to trigger suspend and resume events.
**Note** The Universal Windows app samples require Visual Studio to build and Windows 10 to execute.
To obtain an insider copy of Windows 10, go to [Windows 10](http://insider.windows.com).
**Note** For Windows 10 app samples, go to [Windows 10 Samples](https://github.com/Microsoft/Windows-universal-samples). The samples for Windows 10 can be built and run using Windows developer [tools](https://developer.windows.com).
## Related topics
[Guidelines for app suspend and resume](https://msdn.microsoft.com/library/windows/apps/hh465088.aspx)
[How to trigger suspend, resume, and background events in Visual Studio](https://msdn.microsoft.com/library/hh974425.aspx)
## System requirements
**Client:** Windows 10
**Server:** Windows Server 2016 Technical Preview
**Phone:** Windows 10
## Build the sample
1. If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with the sample you want to build.
2. Start Microsoft Visual Studio and select **File** \> **Open** \> **Project/Solution**.
3. Starting in the folder where you unzipped the samples, go to the Samples subfolder, then the subfolder for this specific sample, then the subfolder for your preferred language (C++, C#, or JavaScript). Double-click the Visual Studio Solution (.sln) file.
4. Press Ctrl+Shift+B, or select **Build** \> **Build Solution**.
## Run the sample
The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.
### Deploying the sample
- Select Build > Deploy Solution.
### Deploying and running the sample
- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or select Debug > Start Without Debugging.
- On the Debug Location toolbar, choose the event that you want to fire: Suspend, Resume, Suspend and Shutdown
|
japf/Windows-universal-samples
|
Samples/BasicSuspension/README.md
|
Markdown
|
mit
| 3,435
|
#!/usr/bin/env ruby
require 'rubygems'
require 'thin'
require File.expand_path(File.dirname(__FILE__) + '/../lib/libwebsocket')
# This is required due to thin incompatibility with streamming of data
module ThinExtension
def self.included(thin_conn)
thin_conn.class_eval do
alias :pre_process_without_websocket :pre_process
alias :pre_process :pre_process_with_websocket
alias :receive_data_without_websocket :receive_data
alias :receive_data :receive_data_with_websocket
end
end
attr_accessor :websocket_client
def pre_process_with_websocket
@request.env['async.connection'] = self
pre_process_without_websocket
end
def receive_data_with_websocket(data)
if self.websocket_client
self.websocket_client.receive_data(data)
else
receive_data_without_websocket(data)
end
end
end
::Thin::Connection.send(:include, ThinExtension)
class EchoServer
def call(env)
@hs ||= LibWebSocket::OpeningHandshake::Server.new
@connection = env['async.connection']
if !@hs.done?
@hs.parse(env)
if @hs.done?
@connection.websocket_client = self
resp = @hs.to_rack
return resp
end
return
end
end
def receive_data(data)
@frame ||= LibWebSocket::Frame.new
@frame.append(data)
while message = @frame.next
@connection.send_data @frame.new(message).to_s
end
end
end
Thin::Server.start('127.0.0.1', 8080) do
map '/' do
run proc{ |env| EchoServer.new.call(env) }
end
end
|
Jarob22/sc2_app_fyp_backend
|
vendor/bundle/ruby/1.9.1/gems/libwebsocket-0.1.5/examples/thin_server.rb
|
Ruby
|
mit
| 1,552
|
# coding=utf-8
"""
The NfsCollector collects nfs utilization metrics using /proc/net/rpc/nfs.
#### Dependencies
* /proc/net/rpc/nfs
"""
import diamond.collector
import os
class NfsCollector(diamond.collector.Collector):
PROC = '/proc/net/rpc/nfs'
def get_default_config_help(self):
config_help = super(NfsCollector, self).get_default_config_help()
config_help.update({
})
return config_help
def get_default_config(self):
"""
Returns the default collector settings
"""
config = super(NfsCollector, self).get_default_config()
config.update({
'enabled': False,
'path': 'nfs'
})
return config
def collect(self):
"""
Collect stats
"""
if os.access(self.PROC, os.R_OK):
results = {}
# Open file
file = open(self.PROC)
for line in file:
line = line.split()
if line[0] == 'net':
results['net.packets'] = line[1]
results['net.udpcnt'] = line[2]
results['net.tcpcnt'] = line[3]
results['net.tcpconn'] = line[4]
elif line[0] == 'rpc':
results['rpc.calls'] = line[1]
results['rpc.retrans'] = line[2]
results['rpc.authrefrsh'] = line[3]
elif line[0] == 'proc2':
results['v2.null'] = line[1]
results['v2.getattr'] = line[2]
results['v2.setattr'] = line[3]
results['v2.root'] = line[4]
results['v2.lookup'] = line[5]
results['v2.readlink'] = line[6]
results['v2.read'] = line[7]
results['v2.wrcache'] = line[8]
results['v2.write'] = line[9]
results['v2.create'] = line[10]
results['v2.remove'] = line[11]
results['v2.rename'] = line[12]
results['v2.link'] = line[13]
results['v2.symlink'] = line[14]
results['v2.mkdir'] = line[15]
results['v2.rmdir'] = line[16]
results['v2.readdir'] = line[17]
results['v2.fsstat'] = line[18]
elif line[0] == 'proc3':
results['v3.null'] = line[1]
results['v3.getattr'] = line[2]
results['v3.setattr'] = line[3]
results['v3.lookup'] = line[4]
results['v3.access'] = line[5]
results['v3.readlink'] = line[6]
results['v3.read'] = line[7]
results['v3.write'] = line[8]
results['v3.create'] = line[9]
results['v3.mkdir'] = line[10]
results['v3.symlink'] = line[11]
results['v3.mknod'] = line[12]
results['v3.remove'] = line[13]
results['v3.rmdir'] = line[14]
results['v3.rename'] = line[15]
results['v3.link'] = line[16]
results['v3.readdir'] = line[17]
results['v3.readdirplus'] = line[18]
results['v3.fsstat'] = line[19]
results['v3.fsinfo'] = line[20]
results['v3.pathconf'] = line[21]
results['v3.commit'] = line[22]
elif line[0] == 'proc4':
results['v4.null'] = line[1]
results['v4.read'] = line[2]
results['v4.write'] = line[3]
results['v4.commit'] = line[4]
results['v4.open'] = line[5]
results['v4.open_conf'] = line[6]
results['v4.open_noat'] = line[7]
results['v4.open_dgrd'] = line[8]
results['v4.close'] = line[9]
results['v4.setattr'] = line[10]
results['v4.fsinfo'] = line[11]
results['v4.renew'] = line[12]
results['v4.setclntid'] = line[13]
results['v4.confirm'] = line[14]
results['v4.lock'] = line[15]
results['v4.lockt'] = line[16]
results['v4.locku'] = line[17]
results['v4.access'] = line[18]
results['v4.getattr'] = line[19]
results['v4.lookup'] = line[20]
results['v4.lookup_root'] = line[21]
results['v4.remove'] = line[22]
results['v4.rename'] = line[23]
results['v4.link'] = line[24]
results['v4.symlink'] = line[25]
results['v4.create'] = line[26]
results['v4.pathconf'] = line[27]
results['v4.statfs'] = line[28]
results['v4.readlink'] = line[29]
results['v4.readdir'] = line[30]
try:
results['v4.server_caps'] = line[31]
except IndexError:
pass
try:
results['v4.delegreturn'] = line[32]
except IndexError:
pass
try:
results['v4.getacl'] = line[33]
except IndexError:
pass
try:
results['v4.setacl'] = line[34]
except IndexError:
pass
try:
results['v4.fs_locations'] = line[35]
except IndexError:
pass
try:
results['v4.rel_lkowner'] = line[36]
except IndexError:
pass
try:
results['v4.exchange_id'] = line[37]
except IndexError:
pass
try:
results['v4.create_ses'] = line[38]
except IndexError:
pass
try:
results['v4.destroy_ses'] = line[39]
except IndexError:
pass
try:
results['v4.sequence'] = line[40]
except IndexError:
pass
try:
results['v4.get_lease_t'] = line[41]
except IndexError:
pass
try:
results['v4.reclaim_comp'] = line[42]
except IndexError:
pass
try:
results['v4.layoutget'] = line[43]
except IndexError:
pass
try:
results['v4.layoutcommit'] = line[44]
except IndexError:
pass
try:
results['v4.layoutreturn'] = line[45]
except IndexError:
pass
try:
results['v4.getdevlist'] = line[46]
except IndexError:
pass
try:
results['v4.getdevinfo'] = line[47]
except IndexError:
pass
try:
results['v4.ds_write'] = line[48]
except IndexError:
pass
try:
results['v4.ds_commit'] = line[49]
except IndexError:
pass
try:
results['v4.getdevlist'] = line[50]
except IndexError:
pass
# Close File
file.close()
for stat in results.keys():
metric_name = '.' + stat
metric_value = long(float(results[stat]))
metric_value = self.derivative(metric_name, metric_value)
self.publish(metric_name, metric_value)
return True
return False
|
datafiniti/Diamond
|
src/collectors/nfs/nfs.py
|
Python
|
mit
| 8,613
|
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import {Promise} from 'vs/base/common/winjs.base';
import nls = require('vs/nls');
import {Registry} from 'vs/platform/platform';
import {Action} from 'vs/base/common/actions';
import {SyncActionDescriptor} from 'vs/platform/actions/common/actions';
import {IWorkbenchActionRegistry, Extensions} from 'vs/workbench/common/actionRegistry';
import {IPartService} from 'vs/workbench/services/part/common/partService';
import {KeyMod, KeyCode} from 'vs/base/common/keyCodes';
const ID = 'workbench.action.toggleSidebarVisibility';
const LABEL = nls.localize('toggleSidebar', "Toggle Side Bar Visibility");
export class ToggleSidebarVisibilityAction extends Action {
constructor(id: string, label: string, @IPartService private partService: IPartService) {
super(id, label);
this.enabled = !!this.partService;
}
public run(): Promise {
let hideSidebar = !this.partService.isSideBarHidden();
this.partService.setSideBarHidden(hideSidebar);
return Promise.as(null);
}
}
let registry = <IWorkbenchActionRegistry>Registry.as(Extensions.WorkbenchActions);
registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleSidebarVisibilityAction, ID, LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_B }), nls.localize('view', "View"));
|
rick111111/vscode
|
src/vs/workbench/browser/actions/toggleSidebarVisibility.ts
|
TypeScript
|
mit
| 1,610
|
<?php
/**
* FacebookPhoto module helper.
*
* @package sf_sandbox
* @subpackage FacebookPhoto
* @author Your name here
* @version SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class FacebookPhotoGeneratorHelper extends BaseFacebookPhotoGeneratorHelper
{
}
|
phpchap/symfony14-beauty-salon
|
apps/backend/modules/FacebookPhoto/lib/FacebookPhotoGeneratorHelper.class.php
|
PHP
|
mit
| 295
|
using System;
using HydrantWiki.Library.Helpers;
using TreeGecko.Library.Geospatial.Objects;
namespace HydrantWiki.Library.Objects
{
public class TagRow
{
private Guid? m_ImageGuid;
public TagRow()
{
}
public TagRow(Tag _tag)
{
UserGuid = _tag.UserGuid;
Position = _tag.Position;
DeviceDateTime = _tag.DeviceDateTime;
ImageGuid = _tag.ImageGuid;
TagGuid = _tag.Guid;
}
public Guid TagGuid { get; set; }
/// <summary>
///
/// </summary>
public Guid UserGuid { get; set; }
/// <summary>
///
/// </summary>
public DateTime DeviceDateTime { get; set; }
/// <summary>
///
/// </summary>
public Guid? ImageGuid
{
get
{
return m_ImageGuid;
}
set
{
m_ImageGuid = value;
ImageUrl = this.GetUrl(false);
ThumbImageUrl = this.GetUrl(true);
}
}
/// <summary>
///
/// </summary>
public GeoPoint Position { get; set; }
/// <summary>
///
/// </summary>
public string PositionText
{
get
{
if (Position != null)
{
return Position.ToString("####.####");
}
return null;
}
}
/// <summary>
///
/// </summary>
public double? Latitude
{
get
{
if (Position != null)
{
return Position.Y;
}
return null;
}
}
/// <summary>
///
/// </summary>
public double? Longitude
{
get
{
if (Position != null)
{
return Position.X;
}
return null;
}
}
/// <summary>
///
/// </summary>
public string ImageUrl { get; private set; }
/// <summary>
///
/// </summary>
public string ThumbImageUrl { get; private set; }
}
}
|
hydrantwiki/hwMobileAPI
|
src/hwDataLibrary/Objects/TagRow.cs
|
C#
|
mit
| 2,398
|
// -------------------------------------------------------------------------- \\
// File: Transform.js \\
// Module: Foundation \\
// Author: Neil Jenkins \\
// License: © 2010-2015 FastMail Pty Ltd. MIT Licensed. \\
// -------------------------------------------------------------------------- \\
"use strict";
( function ( NS, undefined ) {
/**
Namespace: O.Transform
Holds a number of useful functions for transforming values, for use with
<O.Binding>.
*/
NS.Transform = {
/**
Function: O.Transform.toBoolean
Converts the given value to a Boolean
Parameter:
value - {*} The value to transform.
Returns:
{Boolean} The numerical value.
*/
toBoolean: function ( value ) {
return !!value;
},
/**
Function: O.Transform.toString
Converts the given value to a String
Parameter:
value - {*} The value to transform.
Returns:
{String} The string value.
*/
toString: function ( value ) {
return value != null ? value + '' : '';
},
/**
Function: O.Transform.toInt
Converts the given value to an integer
Parameter:
value - {*} The value to transform.
Returns:
{Number} The integral numerical value.
*/
toInt: function ( value ) {
return parseInt( value, 10 ) || 0;
},
/**
Function: O.Transform.toFloat
Converts the given value to a floating point Number.
Parameter:
value - {*} The value to transform.
Returns:
{Number} The numerical value.
*/
toFloat: function ( value ) {
return parseFloat( value );
},
/**
Function: O.Transform.invert
Converts the given value to a Boolean then inverts it.
Parameter:
value - {*} The value to transform.
Returns:
{Boolean} The inverse Boolean value.
*/
invert: function ( value ) {
return !value;
},
/**
Function: O.Transform#defaultValue
Returns a function which will transform `undefined` into the default
value, but will pass through any other value untouched.
Parameters:
value - {*} The default value to use.
*/
defaultValue: function ( value ) {
return function ( v ) {
return v !== undefined ? v : value;
};
},
/**
Function: O.Transform.undefinedToNull
Converts an undefined value into null, passes others through unchanged.
Parameter:
value - {*} The value to transform.
Returns:
{*} The value or null if the value is undefined.
*/
undefinedToNull: function ( value ) {
return value === undefined ? null : value;
},
/**
Function: O.Transform.isEqualToValue
Returns a function which will compare a given value to the value
Parameter:
value - {*} The value to compare to.
Returns:
{Function} A function which compares its first argument to the value
given to this function, returning true if equal or false otherwise.
Or, if the sync is in reverse, returns the given value if true or
undefined if false.
*/
isEqualToValue: function ( value ) {
return function ( syncValue, syncForward ) {
return syncForward ?
syncValue === value :
syncValue ? value : undefined;
};
}
};
}( O ) );
|
adityab/overture
|
source/Overture/foundation/Transform.js
|
JavaScript
|
mit
| 3,785
|
# This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from sqlalchemy.ext.declarative import declared_attr
from indico.core.db import db
from indico.util.locators import locator_property
from indico.util.string import format_repr, return_ascii
class SessionType(db.Model):
__tablename__ = 'session_types'
@declared_attr
def __table_args__(cls):
return (db.Index('ix_uq_session_types_event_id_name_lower', cls.event_id, db.func.lower(cls.name),
unique=True),
{'schema': 'events'})
id = db.Column(
db.Integer,
primary_key=True
)
event_id = db.Column(
db.Integer,
db.ForeignKey('events.events.id'),
index=True,
nullable=False
)
name = db.Column(
db.String,
nullable=False
)
code = db.Column(
db.String,
nullable=False,
default=''
)
is_poster = db.Column(
db.Boolean,
nullable=False,
default=False
)
event = db.relationship(
'Event',
lazy=True,
backref=db.backref(
'session_types',
cascade='all, delete-orphan',
lazy=True
)
)
# relationship backrefs:
# - sessions (Session.type)
@return_ascii
def __repr__(self):
return format_repr(self, 'id', _text=self.name)
@locator_property
def locator(self):
return dict(self.event.locator, session_type_id=self.id)
|
mvidalgarcia/indico
|
indico/modules/events/sessions/models/types.py
|
Python
|
mit
| 1,690
|
require 'opal'
require 'rack'
require 'webrick'
require 'mspec/opal/special_calls'
module MSpec
module Opal
DEFAULT_BASEDIR = 'spec'
require 'rake'
require 'rake/tasklib'
class RakeTask < ::Rake::TaskLib
include ::Rake::DSL if defined?(::Rake::DSL)
def initialize(name, &task_block)
namespace name do
desc 'Run MSpec::Opal code examples' unless ::Rake.application.last_comment
task :default do
puts 'Starting MSpec Runner...'
runner = Runner.new(&task_block)
runner.run
end
desc 'Build specs to build/specs.js and build/specs.min.js'
task :build do
require 'opal/util'
path = './build/specs.js'
min_path = './build/specs.min.js'
Environment.new.build_specs(path)
min = ::Opal::Util.uglify File.read(path)
File.open(min_path, 'w') { |f| f << min }
end
end
task name => "#{name}:default"
end
end
class Runner
def initialize
@app = Rack::Builder.new do
::Opal::Processor.arity_check_enabled = true
::Opal::Processor.freezing_stubs_enabled = false
::Opal::Processor.tainting_stubs_enabled = false
::Opal::Processor.dynamic_require_severity = :error
use Rack::ShowExceptions
use Rack::ShowStatus
use MSpec::Opal::Index
run MSpec::Opal::Environment.new
end
@port = 9999
end
attr_reader :app, :server
attr_accessor :port
def passed?
@passed
end
def run
start_server
start_phantomjs
exit 1 unless passed?
rescue => e
puts e.message
ensure
stop_server if server
end
def stop_server
server.kill
end
require 'opal/util'
class PhantomJS < ::Opal::Util::Command
require 'shellwords'
def initialize(runner, url)
runner = runner.shellescape
url = url.shellescape
super 'phantomjs', "#{runner} #{url}", '. Please install PhantomJS'
end
def run
system "#{command} #{options}"
end
end
def start_phantomjs
runner = File.expand_path('../sprockets.js', __FILE__).shellescape
url = "http://localhost:#{port}/".shellescape
command = PhantomJS.new(runner, url)
@passed = command.run
end
def start_server
@server = Thread.new { Rack::Server.start(:app => app, :Port => port) }
end
end
class Environment < ::Sprockets::Environment
attr_reader :basedir, :pattern
def initialize(basedir = nil, pattern = nil)
@pattern = pattern
@basedir = basedir = File.expand_path(basedir || DEFAULT_BASEDIR)
::Opal.append_path basedir
::Opal.use_gem 'mspec'
stubs.each do |asset|
::Opal::Processor.stub_file asset
end
ENV['OPAL_SPEC'] ||= files_to_run(pattern).join(',')
super()
::Opal.paths.each { |p| append_path p }
end
def stubs
# missing stdlib
stubs = %w[fileutils iconv yaml]
# use x-strings which generate bad javascript
stubs << 'mspec/helpers/tmp'
stubs << 'mspec/helpers/environment'
stubs << 'mspec/guards/block_device'
stubs << 'mspec/guards/endian'
stubs
end
def specs
@specs ||= self['mspec/opal/main'] || raise("Cannot find mspec/opal/main inside #{paths.inspect}")
end
def build_min file = "#{basedir}/build/specs.min.js"
require 'opal/util'
build ::Opal::Util.uglify(specs.to_s), file
end
def files
@files ||= []
end
def add_files specs, tag = ''
tag = "[#{tag}] "
puts "#{tag}Adding #{specs.size} spec files..."
specs = specs.flatten.map do |path|
dirname = File.join([basedir, path])
if File.directory? dirname
rubyspec_paths_in_dir(dirname, path)
else
path
end
end.flatten
files.concat specs
end
def paths_from_glob pattern
Dir.glob(File.expand_path(pattern)).map do |s|
s.sub(/\A#{basedir}\//, '').sub(/\.rb\z/, '')
end
end
def rubyspec_paths_in_dir(dirname, path)
Dir.entries(dirname).select do |spec|
spec.end_with? '.rb'
end.map do |spec|
File.join path, spec
end
end
def rubyspec_white_list
File.read("#{basedir}/rubyspecs").split("\n").reject do |line|
line.sub(/#.*/, '').strip.empty? ||
(line.start_with?('!') && rubyspec_black_list.push(line.sub('!', '') + '.rb'))
end
end
def rubyspec_black_list
@rubyspec_black_list ||= []
end
def files_to_run(pattern=nil)
# add any filters in spec/filters of specs we dont want to run
add_files paths_from_glob("#{basedir}/filters/**/*.rb"), :filters
if pattern
# add custom opal specs from spec/
add_files paths_from_glob(pattern) & rubyspec_white_list, :rubyspec_custom
add_files paths_from_glob(pattern).grep(/(?!spec\/(rubyspec|stdlib)\/)/), :other_custom
else
# add opal specific specs
add_files paths_from_glob("#{basedir}/opal/**/*_spec.rb"), :shared
add_files paths_from_glob("#{basedir}/lib/lexer_spec.rb"), :lexer
add_files paths_from_glob("#{basedir}/lib/parser/**/*_spec.rb"), :parser
# add any rubyspecs we want to run (defined in spec/rubyspecs)
add_files rubyspec_white_list, :rubyspecs
end
files - rubyspec_black_list
end
def build_specs file = "#{basedir}/build/specs.js"
code = specs.to_s
FileUtils.mkdir_p File.dirname(file)
puts "Building #{file}..."
File.open(file, 'w+') { |o| o << code }
end
end
class Index
HTML = <<-HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Opal Specs</title>
</head>
<body>
<script src="/mspec/opal/main.js"></script>
<script>Opal.load('mspec/opal/main');</script>
</body>
</html>
HTML
def initialize(app)
@app = app
end
def call(env)
if %w[/ /index.html].include? env['PATH_INFO']
[200, { 'Content-Type' => 'text/html' }, [HTML]]
else
@app.call env
end
end
end
end
end
|
Ajedi32/opal
|
lib/mspec/opal/rake_task.rb
|
Ruby
|
mit
| 6,677
|
"""
Minimal example showing the use of the AutoCompleteMode.
"""
import logging
logging.basicConfig(level=logging.DEBUG)
import sys
from pyqode.qt import QtWidgets
from pyqode.core.api import CodeEdit
from pyqode.core.backend import server
from pyqode.core.modes import RightMarginMode
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
editor = CodeEdit()
editor.backend.start(server.__file__)
editor.resize(800, 600)
margin = editor.modes.append(RightMarginMode())
margin.position = 4
editor.file.open(__file__)
editor.show()
app.exec_()
editor.close()
del editor
del app
|
zwadar/pyqode.core
|
examples/modes/right_margin.py
|
Python
|
mit
| 640
|
using System;
using Raksha.Crypto.Parameters;
using Raksha.Crypto.Utilities;
namespace Raksha.Crypto.Engines
{
/**
* A class that provides CAST key encryption operations,
* such as encoding data and generating keys.
*
* All the algorithms herein are from the Internet RFC's
*
* RFC2144 - Cast5 (64bit block, 40-128bit key)
* RFC2612 - CAST6 (128bit block, 128-256bit key)
*
* and implement a simplified cryptography interface.
*/
public class Cast5Engine
: IBlockCipher
{
internal static readonly uint[] S1 =
{
0x30fb40d4, 0x9fa0ff0b, 0x6beccd2f, 0x3f258c7a, 0x1e213f2f, 0x9c004dd3, 0x6003e540, 0xcf9fc949,
0xbfd4af27, 0x88bbbdb5, 0xe2034090, 0x98d09675, 0x6e63a0e0, 0x15c361d2, 0xc2e7661d, 0x22d4ff8e,
0x28683b6f, 0xc07fd059, 0xff2379c8, 0x775f50e2, 0x43c340d3, 0xdf2f8656, 0x887ca41a, 0xa2d2bd2d,
0xa1c9e0d6, 0x346c4819, 0x61b76d87, 0x22540f2f, 0x2abe32e1, 0xaa54166b, 0x22568e3a, 0xa2d341d0,
0x66db40c8, 0xa784392f, 0x004dff2f, 0x2db9d2de, 0x97943fac, 0x4a97c1d8, 0x527644b7, 0xb5f437a7,
0xb82cbaef, 0xd751d159, 0x6ff7f0ed, 0x5a097a1f, 0x827b68d0, 0x90ecf52e, 0x22b0c054, 0xbc8e5935,
0x4b6d2f7f, 0x50bb64a2, 0xd2664910, 0xbee5812d, 0xb7332290, 0xe93b159f, 0xb48ee411, 0x4bff345d,
0xfd45c240, 0xad31973f, 0xc4f6d02e, 0x55fc8165, 0xd5b1caad, 0xa1ac2dae, 0xa2d4b76d, 0xc19b0c50,
0x882240f2, 0x0c6e4f38, 0xa4e4bfd7, 0x4f5ba272, 0x564c1d2f, 0xc59c5319, 0xb949e354, 0xb04669fe,
0xb1b6ab8a, 0xc71358dd, 0x6385c545, 0x110f935d, 0x57538ad5, 0x6a390493, 0xe63d37e0, 0x2a54f6b3,
0x3a787d5f, 0x6276a0b5, 0x19a6fcdf, 0x7a42206a, 0x29f9d4d5, 0xf61b1891, 0xbb72275e, 0xaa508167,
0x38901091, 0xc6b505eb, 0x84c7cb8c, 0x2ad75a0f, 0x874a1427, 0xa2d1936b, 0x2ad286af, 0xaa56d291,
0xd7894360, 0x425c750d, 0x93b39e26, 0x187184c9, 0x6c00b32d, 0x73e2bb14, 0xa0bebc3c, 0x54623779,
0x64459eab, 0x3f328b82, 0x7718cf82, 0x59a2cea6, 0x04ee002e, 0x89fe78e6, 0x3fab0950, 0x325ff6c2,
0x81383f05, 0x6963c5c8, 0x76cb5ad6, 0xd49974c9, 0xca180dcf, 0x380782d5, 0xc7fa5cf6, 0x8ac31511,
0x35e79e13, 0x47da91d0, 0xf40f9086, 0xa7e2419e, 0x31366241, 0x051ef495, 0xaa573b04, 0x4a805d8d,
0x548300d0, 0x00322a3c, 0xbf64cddf, 0xba57a68e, 0x75c6372b, 0x50afd341, 0xa7c13275, 0x915a0bf5,
0x6b54bfab, 0x2b0b1426, 0xab4cc9d7, 0x449ccd82, 0xf7fbf265, 0xab85c5f3, 0x1b55db94, 0xaad4e324,
0xcfa4bd3f, 0x2deaa3e2, 0x9e204d02, 0xc8bd25ac, 0xeadf55b3, 0xd5bd9e98, 0xe31231b2, 0x2ad5ad6c,
0x954329de, 0xadbe4528, 0xd8710f69, 0xaa51c90f, 0xaa786bf6, 0x22513f1e, 0xaa51a79b, 0x2ad344cc,
0x7b5a41f0, 0xd37cfbad, 0x1b069505, 0x41ece491, 0xb4c332e6, 0x032268d4, 0xc9600acc, 0xce387e6d,
0xbf6bb16c, 0x6a70fb78, 0x0d03d9c9, 0xd4df39de, 0xe01063da, 0x4736f464, 0x5ad328d8, 0xb347cc96,
0x75bb0fc3, 0x98511bfb, 0x4ffbcc35, 0xb58bcf6a, 0xe11f0abc, 0xbfc5fe4a, 0xa70aec10, 0xac39570a,
0x3f04442f, 0x6188b153, 0xe0397a2e, 0x5727cb79, 0x9ceb418f, 0x1cacd68d, 0x2ad37c96, 0x0175cb9d,
0xc69dff09, 0xc75b65f0, 0xd9db40d8, 0xec0e7779, 0x4744ead4, 0xb11c3274, 0xdd24cb9e, 0x7e1c54bd,
0xf01144f9, 0xd2240eb1, 0x9675b3fd, 0xa3ac3755, 0xd47c27af, 0x51c85f4d, 0x56907596, 0xa5bb15e6,
0x580304f0, 0xca042cf1, 0x011a37ea, 0x8dbfaadb, 0x35ba3e4a, 0x3526ffa0, 0xc37b4d09, 0xbc306ed9,
0x98a52666, 0x5648f725, 0xff5e569d, 0x0ced63d0, 0x7c63b2cf, 0x700b45e1, 0xd5ea50f1, 0x85a92872,
0xaf1fbda7, 0xd4234870, 0xa7870bf3, 0x2d3b4d79, 0x42e04198, 0x0cd0ede7, 0x26470db8, 0xf881814c,
0x474d6ad7, 0x7c0c5e5c, 0xd1231959, 0x381b7298, 0xf5d2f4db, 0xab838653, 0x6e2f1e23, 0x83719c9e,
0xbd91e046, 0x9a56456e, 0xdc39200c, 0x20c8c571, 0x962bda1c, 0xe1e696ff, 0xb141ab08, 0x7cca89b9,
0x1a69e783, 0x02cc4843, 0xa2f7c579, 0x429ef47d, 0x427b169c, 0x5ac9f049, 0xdd8f0f00, 0x5c8165bf
},
S2 =
{
0x1f201094, 0xef0ba75b, 0x69e3cf7e, 0x393f4380, 0xfe61cf7a, 0xeec5207a, 0x55889c94, 0x72fc0651,
0xada7ef79, 0x4e1d7235, 0xd55a63ce, 0xde0436ba, 0x99c430ef, 0x5f0c0794, 0x18dcdb7d, 0xa1d6eff3,
0xa0b52f7b, 0x59e83605, 0xee15b094, 0xe9ffd909, 0xdc440086, 0xef944459, 0xba83ccb3, 0xe0c3cdfb,
0xd1da4181, 0x3b092ab1, 0xf997f1c1, 0xa5e6cf7b, 0x01420ddb, 0xe4e7ef5b, 0x25a1ff41, 0xe180f806,
0x1fc41080, 0x179bee7a, 0xd37ac6a9, 0xfe5830a4, 0x98de8b7f, 0x77e83f4e, 0x79929269, 0x24fa9f7b,
0xe113c85b, 0xacc40083, 0xd7503525, 0xf7ea615f, 0x62143154, 0x0d554b63, 0x5d681121, 0xc866c359,
0x3d63cf73, 0xcee234c0, 0xd4d87e87, 0x5c672b21, 0x071f6181, 0x39f7627f, 0x361e3084, 0xe4eb573b,
0x602f64a4, 0xd63acd9c, 0x1bbc4635, 0x9e81032d, 0x2701f50c, 0x99847ab4, 0xa0e3df79, 0xba6cf38c,
0x10843094, 0x2537a95e, 0xf46f6ffe, 0xa1ff3b1f, 0x208cfb6a, 0x8f458c74, 0xd9e0a227, 0x4ec73a34,
0xfc884f69, 0x3e4de8df, 0xef0e0088, 0x3559648d, 0x8a45388c, 0x1d804366, 0x721d9bfd, 0xa58684bb,
0xe8256333, 0x844e8212, 0x128d8098, 0xfed33fb4, 0xce280ae1, 0x27e19ba5, 0xd5a6c252, 0xe49754bd,
0xc5d655dd, 0xeb667064, 0x77840b4d, 0xa1b6a801, 0x84db26a9, 0xe0b56714, 0x21f043b7, 0xe5d05860,
0x54f03084, 0x066ff472, 0xa31aa153, 0xdadc4755, 0xb5625dbf, 0x68561be6, 0x83ca6b94, 0x2d6ed23b,
0xeccf01db, 0xa6d3d0ba, 0xb6803d5c, 0xaf77a709, 0x33b4a34c, 0x397bc8d6, 0x5ee22b95, 0x5f0e5304,
0x81ed6f61, 0x20e74364, 0xb45e1378, 0xde18639b, 0x881ca122, 0xb96726d1, 0x8049a7e8, 0x22b7da7b,
0x5e552d25, 0x5272d237, 0x79d2951c, 0xc60d894c, 0x488cb402, 0x1ba4fe5b, 0xa4b09f6b, 0x1ca815cf,
0xa20c3005, 0x8871df63, 0xb9de2fcb, 0x0cc6c9e9, 0x0beeff53, 0xe3214517, 0xb4542835, 0x9f63293c,
0xee41e729, 0x6e1d2d7c, 0x50045286, 0x1e6685f3, 0xf33401c6, 0x30a22c95, 0x31a70850, 0x60930f13,
0x73f98417, 0xa1269859, 0xec645c44, 0x52c877a9, 0xcdff33a6, 0xa02b1741, 0x7cbad9a2, 0x2180036f,
0x50d99c08, 0xcb3f4861, 0xc26bd765, 0x64a3f6ab, 0x80342676, 0x25a75e7b, 0xe4e6d1fc, 0x20c710e6,
0xcdf0b680, 0x17844d3b, 0x31eef84d, 0x7e0824e4, 0x2ccb49eb, 0x846a3bae, 0x8ff77888, 0xee5d60f6,
0x7af75673, 0x2fdd5cdb, 0xa11631c1, 0x30f66f43, 0xb3faec54, 0x157fd7fa, 0xef8579cc, 0xd152de58,
0xdb2ffd5e, 0x8f32ce19, 0x306af97a, 0x02f03ef8, 0x99319ad5, 0xc242fa0f, 0xa7e3ebb0, 0xc68e4906,
0xb8da230c, 0x80823028, 0xdcdef3c8, 0xd35fb171, 0x088a1bc8, 0xbec0c560, 0x61a3c9e8, 0xbca8f54d,
0xc72feffa, 0x22822e99, 0x82c570b4, 0xd8d94e89, 0x8b1c34bc, 0x301e16e6, 0x273be979, 0xb0ffeaa6,
0x61d9b8c6, 0x00b24869, 0xb7ffce3f, 0x08dc283b, 0x43daf65a, 0xf7e19798, 0x7619b72f, 0x8f1c9ba4,
0xdc8637a0, 0x16a7d3b1, 0x9fc393b7, 0xa7136eeb, 0xc6bcc63e, 0x1a513742, 0xef6828bc, 0x520365d6,
0x2d6a77ab, 0x3527ed4b, 0x821fd216, 0x095c6e2e, 0xdb92f2fb, 0x5eea29cb, 0x145892f5, 0x91584f7f,
0x5483697b, 0x2667a8cc, 0x85196048, 0x8c4bacea, 0x833860d4, 0x0d23e0f9, 0x6c387e8a, 0x0ae6d249,
0xb284600c, 0xd835731d, 0xdcb1c647, 0xac4c56ea, 0x3ebd81b3, 0x230eabb0, 0x6438bc87, 0xf0b5b1fa,
0x8f5ea2b3, 0xfc184642, 0x0a036b7a, 0x4fb089bd, 0x649da589, 0xa345415e, 0x5c038323, 0x3e5d3bb9,
0x43d79572, 0x7e6dd07c, 0x06dfdf1e, 0x6c6cc4ef, 0x7160a539, 0x73bfbe70, 0x83877605, 0x4523ecf1
},
S3 =
{
0x8defc240, 0x25fa5d9f, 0xeb903dbf, 0xe810c907, 0x47607fff, 0x369fe44b, 0x8c1fc644, 0xaececa90,
0xbeb1f9bf, 0xeefbcaea, 0xe8cf1950, 0x51df07ae, 0x920e8806, 0xf0ad0548, 0xe13c8d83, 0x927010d5,
0x11107d9f, 0x07647db9, 0xb2e3e4d4, 0x3d4f285e, 0xb9afa820, 0xfade82e0, 0xa067268b, 0x8272792e,
0x553fb2c0, 0x489ae22b, 0xd4ef9794, 0x125e3fbc, 0x21fffcee, 0x825b1bfd, 0x9255c5ed, 0x1257a240,
0x4e1a8302, 0xbae07fff, 0x528246e7, 0x8e57140e, 0x3373f7bf, 0x8c9f8188, 0xa6fc4ee8, 0xc982b5a5,
0xa8c01db7, 0x579fc264, 0x67094f31, 0xf2bd3f5f, 0x40fff7c1, 0x1fb78dfc, 0x8e6bd2c1, 0x437be59b,
0x99b03dbf, 0xb5dbc64b, 0x638dc0e6, 0x55819d99, 0xa197c81c, 0x4a012d6e, 0xc5884a28, 0xccc36f71,
0xb843c213, 0x6c0743f1, 0x8309893c, 0x0feddd5f, 0x2f7fe850, 0xd7c07f7e, 0x02507fbf, 0x5afb9a04,
0xa747d2d0, 0x1651192e, 0xaf70bf3e, 0x58c31380, 0x5f98302e, 0x727cc3c4, 0x0a0fb402, 0x0f7fef82,
0x8c96fdad, 0x5d2c2aae, 0x8ee99a49, 0x50da88b8, 0x8427f4a0, 0x1eac5790, 0x796fb449, 0x8252dc15,
0xefbd7d9b, 0xa672597d, 0xada840d8, 0x45f54504, 0xfa5d7403, 0xe83ec305, 0x4f91751a, 0x925669c2,
0x23efe941, 0xa903f12e, 0x60270df2, 0x0276e4b6, 0x94fd6574, 0x927985b2, 0x8276dbcb, 0x02778176,
0xf8af918d, 0x4e48f79e, 0x8f616ddf, 0xe29d840e, 0x842f7d83, 0x340ce5c8, 0x96bbb682, 0x93b4b148,
0xef303cab, 0x984faf28, 0x779faf9b, 0x92dc560d, 0x224d1e20, 0x8437aa88, 0x7d29dc96, 0x2756d3dc,
0x8b907cee, 0xb51fd240, 0xe7c07ce3, 0xe566b4a1, 0xc3e9615e, 0x3cf8209d, 0x6094d1e3, 0xcd9ca341,
0x5c76460e, 0x00ea983b, 0xd4d67881, 0xfd47572c, 0xf76cedd9, 0xbda8229c, 0x127dadaa, 0x438a074e,
0x1f97c090, 0x081bdb8a, 0x93a07ebe, 0xb938ca15, 0x97b03cff, 0x3dc2c0f8, 0x8d1ab2ec, 0x64380e51,
0x68cc7bfb, 0xd90f2788, 0x12490181, 0x5de5ffd4, 0xdd7ef86a, 0x76a2e214, 0xb9a40368, 0x925d958f,
0x4b39fffa, 0xba39aee9, 0xa4ffd30b, 0xfaf7933b, 0x6d498623, 0x193cbcfa, 0x27627545, 0x825cf47a,
0x61bd8ba0, 0xd11e42d1, 0xcead04f4, 0x127ea392, 0x10428db7, 0x8272a972, 0x9270c4a8, 0x127de50b,
0x285ba1c8, 0x3c62f44f, 0x35c0eaa5, 0xe805d231, 0x428929fb, 0xb4fcdf82, 0x4fb66a53, 0x0e7dc15b,
0x1f081fab, 0x108618ae, 0xfcfd086d, 0xf9ff2889, 0x694bcc11, 0x236a5cae, 0x12deca4d, 0x2c3f8cc5,
0xd2d02dfe, 0xf8ef5896, 0xe4cf52da, 0x95155b67, 0x494a488c, 0xb9b6a80c, 0x5c8f82bc, 0x89d36b45,
0x3a609437, 0xec00c9a9, 0x44715253, 0x0a874b49, 0xd773bc40, 0x7c34671c, 0x02717ef6, 0x4feb5536,
0xa2d02fff, 0xd2bf60c4, 0xd43f03c0, 0x50b4ef6d, 0x07478cd1, 0x006e1888, 0xa2e53f55, 0xb9e6d4bc,
0xa2048016, 0x97573833, 0xd7207d67, 0xde0f8f3d, 0x72f87b33, 0xabcc4f33, 0x7688c55d, 0x7b00a6b0,
0x947b0001, 0x570075d2, 0xf9bb88f8, 0x8942019e, 0x4264a5ff, 0x856302e0, 0x72dbd92b, 0xee971b69,
0x6ea22fde, 0x5f08ae2b, 0xaf7a616d, 0xe5c98767, 0xcf1febd2, 0x61efc8c2, 0xf1ac2571, 0xcc8239c2,
0x67214cb8, 0xb1e583d1, 0xb7dc3e62, 0x7f10bdce, 0xf90a5c38, 0x0ff0443d, 0x606e6dc6, 0x60543a49,
0x5727c148, 0x2be98a1d, 0x8ab41738, 0x20e1be24, 0xaf96da0f, 0x68458425, 0x99833be5, 0x600d457d,
0x282f9350, 0x8334b362, 0xd91d1120, 0x2b6d8da0, 0x642b1e31, 0x9c305a00, 0x52bce688, 0x1b03588a,
0xf7baefd5, 0x4142ed9c, 0xa4315c11, 0x83323ec5, 0xdfef4636, 0xa133c501, 0xe9d3531c, 0xee353783
},
S4 =
{
0x9db30420, 0x1fb6e9de, 0xa7be7bef, 0xd273a298, 0x4a4f7bdb, 0x64ad8c57, 0x85510443, 0xfa020ed1,
0x7e287aff, 0xe60fb663, 0x095f35a1, 0x79ebf120, 0xfd059d43, 0x6497b7b1, 0xf3641f63, 0x241e4adf,
0x28147f5f, 0x4fa2b8cd, 0xc9430040, 0x0cc32220, 0xfdd30b30, 0xc0a5374f, 0x1d2d00d9, 0x24147b15,
0xee4d111a, 0x0fca5167, 0x71ff904c, 0x2d195ffe, 0x1a05645f, 0x0c13fefe, 0x081b08ca, 0x05170121,
0x80530100, 0xe83e5efe, 0xac9af4f8, 0x7fe72701, 0xd2b8ee5f, 0x06df4261, 0xbb9e9b8a, 0x7293ea25,
0xce84ffdf, 0xf5718801, 0x3dd64b04, 0xa26f263b, 0x7ed48400, 0x547eebe6, 0x446d4ca0, 0x6cf3d6f5,
0x2649abdf, 0xaea0c7f5, 0x36338cc1, 0x503f7e93, 0xd3772061, 0x11b638e1, 0x72500e03, 0xf80eb2bb,
0xabe0502e, 0xec8d77de, 0x57971e81, 0xe14f6746, 0xc9335400, 0x6920318f, 0x081dbb99, 0xffc304a5,
0x4d351805, 0x7f3d5ce3, 0xa6c866c6, 0x5d5bcca9, 0xdaec6fea, 0x9f926f91, 0x9f46222f, 0x3991467d,
0xa5bf6d8e, 0x1143c44f, 0x43958302, 0xd0214eeb, 0x022083b8, 0x3fb6180c, 0x18f8931e, 0x281658e6,
0x26486e3e, 0x8bd78a70, 0x7477e4c1, 0xb506e07c, 0xf32d0a25, 0x79098b02, 0xe4eabb81, 0x28123b23,
0x69dead38, 0x1574ca16, 0xdf871b62, 0x211c40b7, 0xa51a9ef9, 0x0014377b, 0x041e8ac8, 0x09114003,
0xbd59e4d2, 0xe3d156d5, 0x4fe876d5, 0x2f91a340, 0x557be8de, 0x00eae4a7, 0x0ce5c2ec, 0x4db4bba6,
0xe756bdff, 0xdd3369ac, 0xec17b035, 0x06572327, 0x99afc8b0, 0x56c8c391, 0x6b65811c, 0x5e146119,
0x6e85cb75, 0xbe07c002, 0xc2325577, 0x893ff4ec, 0x5bbfc92d, 0xd0ec3b25, 0xb7801ab7, 0x8d6d3b24,
0x20c763ef, 0xc366a5fc, 0x9c382880, 0x0ace3205, 0xaac9548a, 0xeca1d7c7, 0x041afa32, 0x1d16625a,
0x6701902c, 0x9b757a54, 0x31d477f7, 0x9126b031, 0x36cc6fdb, 0xc70b8b46, 0xd9e66a48, 0x56e55a79,
0x026a4ceb, 0x52437eff, 0x2f8f76b4, 0x0df980a5, 0x8674cde3, 0xedda04eb, 0x17a9be04, 0x2c18f4df,
0xb7747f9d, 0xab2af7b4, 0xefc34d20, 0x2e096b7c, 0x1741a254, 0xe5b6a035, 0x213d42f6, 0x2c1c7c26,
0x61c2f50f, 0x6552daf9, 0xd2c231f8, 0x25130f69, 0xd8167fa2, 0x0418f2c8, 0x001a96a6, 0x0d1526ab,
0x63315c21, 0x5e0a72ec, 0x49bafefd, 0x187908d9, 0x8d0dbd86, 0x311170a7, 0x3e9b640c, 0xcc3e10d7,
0xd5cad3b6, 0x0caec388, 0xf73001e1, 0x6c728aff, 0x71eae2a1, 0x1f9af36e, 0xcfcbd12f, 0xc1de8417,
0xac07be6b, 0xcb44a1d8, 0x8b9b0f56, 0x013988c3, 0xb1c52fca, 0xb4be31cd, 0xd8782806, 0x12a3a4e2,
0x6f7de532, 0x58fd7eb6, 0xd01ee900, 0x24adffc2, 0xf4990fc5, 0x9711aac5, 0x001d7b95, 0x82e5e7d2,
0x109873f6, 0x00613096, 0xc32d9521, 0xada121ff, 0x29908415, 0x7fbb977f, 0xaf9eb3db, 0x29c9ed2a,
0x5ce2a465, 0xa730f32c, 0xd0aa3fe8, 0x8a5cc091, 0xd49e2ce7, 0x0ce454a9, 0xd60acd86, 0x015f1919,
0x77079103, 0xdea03af6, 0x78a8565e, 0xdee356df, 0x21f05cbe, 0x8b75e387, 0xb3c50651, 0xb8a5c3ef,
0xd8eeb6d2, 0xe523be77, 0xc2154529, 0x2f69efdf, 0xafe67afb, 0xf470c4b2, 0xf3e0eb5b, 0xd6cc9876,
0x39e4460c, 0x1fda8538, 0x1987832f, 0xca007367, 0xa99144f8, 0x296b299e, 0x492fc295, 0x9266beab,
0xb5676e69, 0x9bd3ddda, 0xdf7e052f, 0xdb25701c, 0x1b5e51ee, 0xf65324e6, 0x6afce36c, 0x0316cc04,
0x8644213e, 0xb7dc59d0, 0x7965291f, 0xccd6fd43, 0x41823979, 0x932bcdf6, 0xb657c34d, 0x4edfd282,
0x7ae5290c, 0x3cb9536b, 0x851e20fe, 0x9833557e, 0x13ecf0b0, 0xd3ffb372, 0x3f85c5c1, 0x0aef7ed2
},
S5 =
{
0x7ec90c04, 0x2c6e74b9, 0x9b0e66df, 0xa6337911, 0xb86a7fff, 0x1dd358f5, 0x44dd9d44, 0x1731167f,
0x08fbf1fa, 0xe7f511cc, 0xd2051b00, 0x735aba00, 0x2ab722d8, 0x386381cb, 0xacf6243a, 0x69befd7a,
0xe6a2e77f, 0xf0c720cd, 0xc4494816, 0xccf5c180, 0x38851640, 0x15b0a848, 0xe68b18cb, 0x4caadeff,
0x5f480a01, 0x0412b2aa, 0x259814fc, 0x41d0efe2, 0x4e40b48d, 0x248eb6fb, 0x8dba1cfe, 0x41a99b02,
0x1a550a04, 0xba8f65cb, 0x7251f4e7, 0x95a51725, 0xc106ecd7, 0x97a5980a, 0xc539b9aa, 0x4d79fe6a,
0xf2f3f763, 0x68af8040, 0xed0c9e56, 0x11b4958b, 0xe1eb5a88, 0x8709e6b0, 0xd7e07156, 0x4e29fea7,
0x6366e52d, 0x02d1c000, 0xc4ac8e05, 0x9377f571, 0x0c05372a, 0x578535f2, 0x2261be02, 0xd642a0c9,
0xdf13a280, 0x74b55bd2, 0x682199c0, 0xd421e5ec, 0x53fb3ce8, 0xc8adedb3, 0x28a87fc9, 0x3d959981,
0x5c1ff900, 0xfe38d399, 0x0c4eff0b, 0x062407ea, 0xaa2f4fb1, 0x4fb96976, 0x90c79505, 0xb0a8a774,
0xef55a1ff, 0xe59ca2c2, 0xa6b62d27, 0xe66a4263, 0xdf65001f, 0x0ec50966, 0xdfdd55bc, 0x29de0655,
0x911e739a, 0x17af8975, 0x32c7911c, 0x89f89468, 0x0d01e980, 0x524755f4, 0x03b63cc9, 0x0cc844b2,
0xbcf3f0aa, 0x87ac36e9, 0xe53a7426, 0x01b3d82b, 0x1a9e7449, 0x64ee2d7e, 0xcddbb1da, 0x01c94910,
0xb868bf80, 0x0d26f3fd, 0x9342ede7, 0x04a5c284, 0x636737b6, 0x50f5b616, 0xf24766e3, 0x8eca36c1,
0x136e05db, 0xfef18391, 0xfb887a37, 0xd6e7f7d4, 0xc7fb7dc9, 0x3063fcdf, 0xb6f589de, 0xec2941da,
0x26e46695, 0xb7566419, 0xf654efc5, 0xd08d58b7, 0x48925401, 0xc1bacb7f, 0xe5ff550f, 0xb6083049,
0x5bb5d0e8, 0x87d72e5a, 0xab6a6ee1, 0x223a66ce, 0xc62bf3cd, 0x9e0885f9, 0x68cb3e47, 0x086c010f,
0xa21de820, 0xd18b69de, 0xf3f65777, 0xfa02c3f6, 0x407edac3, 0xcbb3d550, 0x1793084d, 0xb0d70eba,
0x0ab378d5, 0xd951fb0c, 0xded7da56, 0x4124bbe4, 0x94ca0b56, 0x0f5755d1, 0xe0e1e56e, 0x6184b5be,
0x580a249f, 0x94f74bc0, 0xe327888e, 0x9f7b5561, 0xc3dc0280, 0x05687715, 0x646c6bd7, 0x44904db3,
0x66b4f0a3, 0xc0f1648a, 0x697ed5af, 0x49e92ff6, 0x309e374f, 0x2cb6356a, 0x85808573, 0x4991f840,
0x76f0ae02, 0x083be84d, 0x28421c9a, 0x44489406, 0x736e4cb8, 0xc1092910, 0x8bc95fc6, 0x7d869cf4,
0x134f616f, 0x2e77118d, 0xb31b2be1, 0xaa90b472, 0x3ca5d717, 0x7d161bba, 0x9cad9010, 0xaf462ba2,
0x9fe459d2, 0x45d34559, 0xd9f2da13, 0xdbc65487, 0xf3e4f94e, 0x176d486f, 0x097c13ea, 0x631da5c7,
0x445f7382, 0x175683f4, 0xcdc66a97, 0x70be0288, 0xb3cdcf72, 0x6e5dd2f3, 0x20936079, 0x459b80a5,
0xbe60e2db, 0xa9c23101, 0xeba5315c, 0x224e42f2, 0x1c5c1572, 0xf6721b2c, 0x1ad2fff3, 0x8c25404e,
0x324ed72f, 0x4067b7fd, 0x0523138e, 0x5ca3bc78, 0xdc0fd66e, 0x75922283, 0x784d6b17, 0x58ebb16e,
0x44094f85, 0x3f481d87, 0xfcfeae7b, 0x77b5ff76, 0x8c2302bf, 0xaaf47556, 0x5f46b02a, 0x2b092801,
0x3d38f5f7, 0x0ca81f36, 0x52af4a8a, 0x66d5e7c0, 0xdf3b0874, 0x95055110, 0x1b5ad7a8, 0xf61ed5ad,
0x6cf6e479, 0x20758184, 0xd0cefa65, 0x88f7be58, 0x4a046826, 0x0ff6f8f3, 0xa09c7f70, 0x5346aba0,
0x5ce96c28, 0xe176eda3, 0x6bac307f, 0x376829d2, 0x85360fa9, 0x17e3fe2a, 0x24b79767, 0xf5a96b20,
0xd6cd2595, 0x68ff1ebf, 0x7555442c, 0xf19f06be, 0xf9e0659a, 0xeeb9491d, 0x34010718, 0xbb30cab8,
0xe822fe15, 0x88570983, 0x750e6249, 0xda627e55, 0x5e76ffa8, 0xb1534546, 0x6d47de08, 0xefe9e7d4
},
S6 =
{
0xf6fa8f9d, 0x2cac6ce1, 0x4ca34867, 0xe2337f7c, 0x95db08e7, 0x016843b4, 0xeced5cbc, 0x325553ac,
0xbf9f0960, 0xdfa1e2ed, 0x83f0579d, 0x63ed86b9, 0x1ab6a6b8, 0xde5ebe39, 0xf38ff732, 0x8989b138,
0x33f14961, 0xc01937bd, 0xf506c6da, 0xe4625e7e, 0xa308ea99, 0x4e23e33c, 0x79cbd7cc, 0x48a14367,
0xa3149619, 0xfec94bd5, 0xa114174a, 0xeaa01866, 0xa084db2d, 0x09a8486f, 0xa888614a, 0x2900af98,
0x01665991, 0xe1992863, 0xc8f30c60, 0x2e78ef3c, 0xd0d51932, 0xcf0fec14, 0xf7ca07d2, 0xd0a82072,
0xfd41197e, 0x9305a6b0, 0xe86be3da, 0x74bed3cd, 0x372da53c, 0x4c7f4448, 0xdab5d440, 0x6dba0ec3,
0x083919a7, 0x9fbaeed9, 0x49dbcfb0, 0x4e670c53, 0x5c3d9c01, 0x64bdb941, 0x2c0e636a, 0xba7dd9cd,
0xea6f7388, 0xe70bc762, 0x35f29adb, 0x5c4cdd8d, 0xf0d48d8c, 0xb88153e2, 0x08a19866, 0x1ae2eac8,
0x284caf89, 0xaa928223, 0x9334be53, 0x3b3a21bf, 0x16434be3, 0x9aea3906, 0xefe8c36e, 0xf890cdd9,
0x80226dae, 0xc340a4a3, 0xdf7e9c09, 0xa694a807, 0x5b7c5ecc, 0x221db3a6, 0x9a69a02f, 0x68818a54,
0xceb2296f, 0x53c0843a, 0xfe893655, 0x25bfe68a, 0xb4628abc, 0xcf222ebf, 0x25ac6f48, 0xa9a99387,
0x53bddb65, 0xe76ffbe7, 0xe967fd78, 0x0ba93563, 0x8e342bc1, 0xe8a11be9, 0x4980740d, 0xc8087dfc,
0x8de4bf99, 0xa11101a0, 0x7fd37975, 0xda5a26c0, 0xe81f994f, 0x9528cd89, 0xfd339fed, 0xb87834bf,
0x5f04456d, 0x22258698, 0xc9c4c83b, 0x2dc156be, 0x4f628daa, 0x57f55ec5, 0xe2220abe, 0xd2916ebf,
0x4ec75b95, 0x24f2c3c0, 0x42d15d99, 0xcd0d7fa0, 0x7b6e27ff, 0xa8dc8af0, 0x7345c106, 0xf41e232f,
0x35162386, 0xe6ea8926, 0x3333b094, 0x157ec6f2, 0x372b74af, 0x692573e4, 0xe9a9d848, 0xf3160289,
0x3a62ef1d, 0xa787e238, 0xf3a5f676, 0x74364853, 0x20951063, 0x4576698d, 0xb6fad407, 0x592af950,
0x36f73523, 0x4cfb6e87, 0x7da4cec0, 0x6c152daa, 0xcb0396a8, 0xc50dfe5d, 0xfcd707ab, 0x0921c42f,
0x89dff0bb, 0x5fe2be78, 0x448f4f33, 0x754613c9, 0x2b05d08d, 0x48b9d585, 0xdc049441, 0xc8098f9b,
0x7dede786, 0xc39a3373, 0x42410005, 0x6a091751, 0x0ef3c8a6, 0x890072d6, 0x28207682, 0xa9a9f7be,
0xbf32679d, 0xd45b5b75, 0xb353fd00, 0xcbb0e358, 0x830f220a, 0x1f8fb214, 0xd372cf08, 0xcc3c4a13,
0x8cf63166, 0x061c87be, 0x88c98f88, 0x6062e397, 0x47cf8e7a, 0xb6c85283, 0x3cc2acfb, 0x3fc06976,
0x4e8f0252, 0x64d8314d, 0xda3870e3, 0x1e665459, 0xc10908f0, 0x513021a5, 0x6c5b68b7, 0x822f8aa0,
0x3007cd3e, 0x74719eef, 0xdc872681, 0x073340d4, 0x7e432fd9, 0x0c5ec241, 0x8809286c, 0xf592d891,
0x08a930f6, 0x957ef305, 0xb7fbffbd, 0xc266e96f, 0x6fe4ac98, 0xb173ecc0, 0xbc60b42a, 0x953498da,
0xfba1ae12, 0x2d4bd736, 0x0f25faab, 0xa4f3fceb, 0xe2969123, 0x257f0c3d, 0x9348af49, 0x361400bc,
0xe8816f4a, 0x3814f200, 0xa3f94043, 0x9c7a54c2, 0xbc704f57, 0xda41e7f9, 0xc25ad33a, 0x54f4a084,
0xb17f5505, 0x59357cbe, 0xedbd15c8, 0x7f97c5ab, 0xba5ac7b5, 0xb6f6deaf, 0x3a479c3a, 0x5302da25,
0x653d7e6a, 0x54268d49, 0x51a477ea, 0x5017d55b, 0xd7d25d88, 0x44136c76, 0x0404a8c8, 0xb8e5a121,
0xb81a928a, 0x60ed5869, 0x97c55b96, 0xeaec991b, 0x29935913, 0x01fdb7f1, 0x088e8dfa, 0x9ab6f6f5,
0x3b4cbf9f, 0x4a5de3ab, 0xe6051d35, 0xa0e1d855, 0xd36b4cf1, 0xf544edeb, 0xb0e93524, 0xbebb8fbd,
0xa2d762cf, 0x49c92f54, 0x38b5f331, 0x7128a454, 0x48392905, 0xa65b1db8, 0x851c97bd, 0xd675cf2f
},
S7 =
{
0x85e04019, 0x332bf567, 0x662dbfff, 0xcfc65693, 0x2a8d7f6f, 0xab9bc912, 0xde6008a1, 0x2028da1f,
0x0227bce7, 0x4d642916, 0x18fac300, 0x50f18b82, 0x2cb2cb11, 0xb232e75c, 0x4b3695f2, 0xb28707de,
0xa05fbcf6, 0xcd4181e9, 0xe150210c, 0xe24ef1bd, 0xb168c381, 0xfde4e789, 0x5c79b0d8, 0x1e8bfd43,
0x4d495001, 0x38be4341, 0x913cee1d, 0x92a79c3f, 0x089766be, 0xbaeeadf4, 0x1286becf, 0xb6eacb19,
0x2660c200, 0x7565bde4, 0x64241f7a, 0x8248dca9, 0xc3b3ad66, 0x28136086, 0x0bd8dfa8, 0x356d1cf2,
0x107789be, 0xb3b2e9ce, 0x0502aa8f, 0x0bc0351e, 0x166bf52a, 0xeb12ff82, 0xe3486911, 0xd34d7516,
0x4e7b3aff, 0x5f43671b, 0x9cf6e037, 0x4981ac83, 0x334266ce, 0x8c9341b7, 0xd0d854c0, 0xcb3a6c88,
0x47bc2829, 0x4725ba37, 0xa66ad22b, 0x7ad61f1e, 0x0c5cbafa, 0x4437f107, 0xb6e79962, 0x42d2d816,
0x0a961288, 0xe1a5c06e, 0x13749e67, 0x72fc081a, 0xb1d139f7, 0xf9583745, 0xcf19df58, 0xbec3f756,
0xc06eba30, 0x07211b24, 0x45c28829, 0xc95e317f, 0xbc8ec511, 0x38bc46e9, 0xc6e6fa14, 0xbae8584a,
0xad4ebc46, 0x468f508b, 0x7829435f, 0xf124183b, 0x821dba9f, 0xaff60ff4, 0xea2c4e6d, 0x16e39264,
0x92544a8b, 0x009b4fc3, 0xaba68ced, 0x9ac96f78, 0x06a5b79a, 0xb2856e6e, 0x1aec3ca9, 0xbe838688,
0x0e0804e9, 0x55f1be56, 0xe7e5363b, 0xb3a1f25d, 0xf7debb85, 0x61fe033c, 0x16746233, 0x3c034c28,
0xda6d0c74, 0x79aac56c, 0x3ce4e1ad, 0x51f0c802, 0x98f8f35a, 0x1626a49f, 0xeed82b29, 0x1d382fe3,
0x0c4fb99a, 0xbb325778, 0x3ec6d97b, 0x6e77a6a9, 0xcb658b5c, 0xd45230c7, 0x2bd1408b, 0x60c03eb7,
0xb9068d78, 0xa33754f4, 0xf430c87d, 0xc8a71302, 0xb96d8c32, 0xebd4e7be, 0xbe8b9d2d, 0x7979fb06,
0xe7225308, 0x8b75cf77, 0x11ef8da4, 0xe083c858, 0x8d6b786f, 0x5a6317a6, 0xfa5cf7a0, 0x5dda0033,
0xf28ebfb0, 0xf5b9c310, 0xa0eac280, 0x08b9767a, 0xa3d9d2b0, 0x79d34217, 0x021a718d, 0x9ac6336a,
0x2711fd60, 0x438050e3, 0x069908a8, 0x3d7fedc4, 0x826d2bef, 0x4eeb8476, 0x488dcf25, 0x36c9d566,
0x28e74e41, 0xc2610aca, 0x3d49a9cf, 0xbae3b9df, 0xb65f8de6, 0x92aeaf64, 0x3ac7d5e6, 0x9ea80509,
0xf22b017d, 0xa4173f70, 0xdd1e16c3, 0x15e0d7f9, 0x50b1b887, 0x2b9f4fd5, 0x625aba82, 0x6a017962,
0x2ec01b9c, 0x15488aa9, 0xd716e740, 0x40055a2c, 0x93d29a22, 0xe32dbf9a, 0x058745b9, 0x3453dc1e,
0xd699296e, 0x496cff6f, 0x1c9f4986, 0xdfe2ed07, 0xb87242d1, 0x19de7eae, 0x053e561a, 0x15ad6f8c,
0x66626c1c, 0x7154c24c, 0xea082b2a, 0x93eb2939, 0x17dcb0f0, 0x58d4f2ae, 0x9ea294fb, 0x52cf564c,
0x9883fe66, 0x2ec40581, 0x763953c3, 0x01d6692e, 0xd3a0c108, 0xa1e7160e, 0xe4f2dfa6, 0x693ed285,
0x74904698, 0x4c2b0edd, 0x4f757656, 0x5d393378, 0xa132234f, 0x3d321c5d, 0xc3f5e194, 0x4b269301,
0xc79f022f, 0x3c997e7e, 0x5e4f9504, 0x3ffafbbd, 0x76f7ad0e, 0x296693f4, 0x3d1fce6f, 0xc61e45be,
0xd3b5ab34, 0xf72bf9b7, 0x1b0434c0, 0x4e72b567, 0x5592a33d, 0xb5229301, 0xcfd2a87f, 0x60aeb767,
0x1814386b, 0x30bcc33d, 0x38a0c07d, 0xfd1606f2, 0xc363519b, 0x589dd390, 0x5479f8e6, 0x1cb8d647,
0x97fd61a9, 0xea7759f4, 0x2d57539d, 0x569a58cf, 0xe84e63ad, 0x462e1b78, 0x6580f87e, 0xf3817914,
0x91da55f4, 0x40a230f3, 0xd1988f35, 0xb6e318d2, 0x3ffa50bc, 0x3d40f021, 0xc3c0bdae, 0x4958c24c,
0x518f36b2, 0x84b1d370, 0x0fedce83, 0x878ddada, 0xf2a279c7, 0x94e01be8, 0x90716f4b, 0x954b8aa3
},
S8 =
{
0xe216300d, 0xbbddfffc, 0xa7ebdabd, 0x35648095, 0x7789f8b7, 0xe6c1121b, 0x0e241600, 0x052ce8b5,
0x11a9cfb0, 0xe5952f11, 0xece7990a, 0x9386d174, 0x2a42931c, 0x76e38111, 0xb12def3a, 0x37ddddfc,
0xde9adeb1, 0x0a0cc32c, 0xbe197029, 0x84a00940, 0xbb243a0f, 0xb4d137cf, 0xb44e79f0, 0x049eedfd,
0x0b15a15d, 0x480d3168, 0x8bbbde5a, 0x669ded42, 0xc7ece831, 0x3f8f95e7, 0x72df191b, 0x7580330d,
0x94074251, 0x5c7dcdfa, 0xabbe6d63, 0xaa402164, 0xb301d40a, 0x02e7d1ca, 0x53571dae, 0x7a3182a2,
0x12a8ddec, 0xfdaa335d, 0x176f43e8, 0x71fb46d4, 0x38129022, 0xce949ad4, 0xb84769ad, 0x965bd862,
0x82f3d055, 0x66fb9767, 0x15b80b4e, 0x1d5b47a0, 0x4cfde06f, 0xc28ec4b8, 0x57e8726e, 0x647a78fc,
0x99865d44, 0x608bd593, 0x6c200e03, 0x39dc5ff6, 0x5d0b00a3, 0xae63aff2, 0x7e8bd632, 0x70108c0c,
0xbbd35049, 0x2998df04, 0x980cf42a, 0x9b6df491, 0x9e7edd53, 0x06918548, 0x58cb7e07, 0x3b74ef2e,
0x522fffb1, 0xd24708cc, 0x1c7e27cd, 0xa4eb215b, 0x3cf1d2e2, 0x19b47a38, 0x424f7618, 0x35856039,
0x9d17dee7, 0x27eb35e6, 0xc9aff67b, 0x36baf5b8, 0x09c467cd, 0xc18910b1, 0xe11dbf7b, 0x06cd1af8,
0x7170c608, 0x2d5e3354, 0xd4de495a, 0x64c6d006, 0xbcc0c62c, 0x3dd00db3, 0x708f8f34, 0x77d51b42,
0x264f620f, 0x24b8d2bf, 0x15c1b79e, 0x46a52564, 0xf8d7e54e, 0x3e378160, 0x7895cda5, 0x859c15a5,
0xe6459788, 0xc37bc75f, 0xdb07ba0c, 0x0676a3ab, 0x7f229b1e, 0x31842e7b, 0x24259fd7, 0xf8bef472,
0x835ffcb8, 0x6df4c1f2, 0x96f5b195, 0xfd0af0fc, 0xb0fe134c, 0xe2506d3d, 0x4f9b12ea, 0xf215f225,
0xa223736f, 0x9fb4c428, 0x25d04979, 0x34c713f8, 0xc4618187, 0xea7a6e98, 0x7cd16efc, 0x1436876c,
0xf1544107, 0xbedeee14, 0x56e9af27, 0xa04aa441, 0x3cf7c899, 0x92ecbae6, 0xdd67016d, 0x151682eb,
0xa842eedf, 0xfdba60b4, 0xf1907b75, 0x20e3030f, 0x24d8c29e, 0xe139673b, 0xefa63fb8, 0x71873054,
0xb6f2cf3b, 0x9f326442, 0xcb15a4cc, 0xb01a4504, 0xf1e47d8d, 0x844a1be5, 0xbae7dfdc, 0x42cbda70,
0xcd7dae0a, 0x57e85b7a, 0xd53f5af6, 0x20cf4d8c, 0xcea4d428, 0x79d130a4, 0x3486ebfb, 0x33d3cddc,
0x77853b53, 0x37effcb5, 0xc5068778, 0xe580b3e6, 0x4e68b8f4, 0xc5c8b37e, 0x0d809ea2, 0x398feb7c,
0x132a4f94, 0x43b7950e, 0x2fee7d1c, 0x223613bd, 0xdd06caa2, 0x37df932b, 0xc4248289, 0xacf3ebc3,
0x5715f6b7, 0xef3478dd, 0xf267616f, 0xc148cbe4, 0x9052815e, 0x5e410fab, 0xb48a2465, 0x2eda7fa4,
0xe87b40e4, 0xe98ea084, 0x5889e9e1, 0xefd390fc, 0xdd07d35b, 0xdb485694, 0x38d7e5b2, 0x57720101,
0x730edebc, 0x5b643113, 0x94917e4f, 0x503c2fba, 0x646f1282, 0x7523d24a, 0xe0779695, 0xf9c17a8f,
0x7a5b2121, 0xd187b896, 0x29263a4d, 0xba510cdf, 0x81f47c9f, 0xad1163ed, 0xea7b5965, 0x1a00726e,
0x11403092, 0x00da6d77, 0x4a0cdd61, 0xad1f4603, 0x605bdfb0, 0x9eedc364, 0x22ebe6a8, 0xcee7d28a,
0xa0e736a0, 0x5564a6b9, 0x10853209, 0xc7eb8f37, 0x2de705ca, 0x8951570f, 0xdf09822b, 0xbd691a6c,
0xaa12e4f2, 0x87451c0f, 0xe0f6a27a, 0x3ada4819, 0x4cf1764f, 0x0d771c2b, 0x67cdb156, 0x350d8384,
0x5938fa0f, 0x42399ef3, 0x36997b07, 0x0e84093d, 0x4aa93e61, 0x8360d87b, 0x1fa98b0c, 0x1149382c,
0xe97625a5, 0x0614d1b7, 0x0e25244b, 0x0c768347, 0x589e8d82, 0x0d2059d1, 0xa466bb1e, 0xf8da0a82,
0x04f19130, 0xba6e4ec0, 0x99265164, 0x1ee7230d, 0x50b2ad80, 0xeaee6801, 0x8db2a283, 0xea8bf59e
};
//====================================
// Useful constants
//====================================
internal static readonly int MAX_ROUNDS = 16;
internal static readonly int RED_ROUNDS = 12;
private const int BLOCK_SIZE = 8; // bytes = 64 bits
private int[] _Kr = new int[17]; // the rotating round key
private uint[] _Km = new uint[17]; // the masking round key
private bool _encrypting;
private byte[] _workingKey;
private int _rounds = MAX_ROUNDS;
public Cast5Engine()
{
}
/**
* initialise a CAST cipher.
*
* @param forEncryption whether or not we are for encryption.
* @param parameters the parameters required to set up the cipher.
* @exception ArgumentException if the parameters argument is
* inappropriate.
*/
public void Init(
bool forEncryption,
ICipherParameters parameters)
{
if (!(parameters is KeyParameter))
throw new ArgumentException("Invalid parameter passed to "+ AlgorithmName +" init - " + parameters.GetType().ToString());
_encrypting = forEncryption;
_workingKey = ((KeyParameter)parameters).GetKey();
SetKey(_workingKey);
}
public virtual string AlgorithmName
{
get { return "CAST5"; }
}
public virtual bool IsPartialBlockOkay
{
get { return false; }
}
public virtual int ProcessBlock(
byte[] input,
int inOff,
byte[] output,
int outOff)
{
int blockSize = GetBlockSize();
if (_workingKey == null)
throw new InvalidOperationException(AlgorithmName + " not initialised");
if ((inOff + blockSize) > input.Length)
throw new DataLengthException("Input buffer too short");
if ((outOff + blockSize) > output.Length)
throw new DataLengthException("Output buffer too short");
if (_encrypting)
{
return EncryptBlock(input, inOff, output, outOff);
}
else
{
return DecryptBlock(input, inOff, output, outOff);
}
}
public virtual void Reset()
{
}
public virtual int GetBlockSize()
{
return BLOCK_SIZE;
}
//==================================
// Private Implementation
//==================================
/*
* Creates the subkeys using the same nomenclature
* as described in RFC2144.
*
* See section 2.4
*/
internal virtual void SetKey(byte[] key)
{
/*
* Determine the key size here, if required
*
* if keysize <= 80bits, use 12 rounds instead of 16
* if keysize < 128bits, pad with 0
*
* Typical key sizes => 40, 64, 80, 128
*/
if (key.Length < 11)
{
_rounds = RED_ROUNDS;
}
int [] z = new int[16];
int [] x = new int[16];
uint z03, z47, z8B, zCF;
uint x03, x47, x8B, xCF;
/* copy the key into x */
for (int i=0; i< key.Length; i++)
{
x[i] = (int)(key[i] & 0xff);
}
/*
* This will look different because the selection of
* bytes from the input key I've already chosen the
* correct int.
*/
x03 = IntsTo32bits(x, 0x0);
x47 = IntsTo32bits(x, 0x4);
x8B = IntsTo32bits(x, 0x8);
xCF = IntsTo32bits(x, 0xC);
z03 = x03 ^S5[x[0xD]] ^S6[x[0xF]] ^S7[x[0xC]] ^S8[x[0xE]] ^S7[x[0x8]];
Bits32ToInts(z03, z, 0x0);
z47 = x8B ^S5[z[0x0]] ^S6[z[0x2]] ^S7[z[0x1]] ^S8[z[0x3]] ^S8[x[0xA]];
Bits32ToInts(z47, z, 0x4);
z8B = xCF ^S5[z[0x7]] ^S6[z[0x6]] ^S7[z[0x5]] ^S8[z[0x4]] ^S5[x[0x9]];
Bits32ToInts(z8B, z, 0x8);
zCF = x47 ^S5[z[0xA]] ^S6[z[0x9]] ^S7[z[0xB]] ^S8[z[0x8]] ^S6[x[0xB]];
Bits32ToInts(zCF, z, 0xC);
_Km[ 1]= S5[z[0x8]] ^ S6[z[0x9]] ^ S7[z[0x7]] ^ S8[z[0x6]] ^ S5[z[0x2]];
_Km[ 2]= S5[z[0xA]] ^ S6[z[0xB]] ^ S7[z[0x5]] ^ S8[z[0x4]] ^ S6[z[0x6]];
_Km[ 3]= S5[z[0xC]] ^ S6[z[0xD]] ^ S7[z[0x3]] ^ S8[z[0x2]] ^ S7[z[0x9]];
_Km[ 4]= S5[z[0xE]] ^ S6[z[0xF]] ^ S7[z[0x1]] ^ S8[z[0x0]] ^ S8[z[0xC]];
z03 = IntsTo32bits(z, 0x0);
z47 = IntsTo32bits(z, 0x4);
z8B = IntsTo32bits(z, 0x8);
zCF = IntsTo32bits(z, 0xC);
x03 = z8B ^S5[z[0x5]] ^S6[z[0x7]] ^S7[z[0x4]] ^S8[z[0x6]] ^S7[z[0x0]];
Bits32ToInts(x03, x, 0x0);
x47 = z03 ^S5[x[0x0]] ^S6[x[0x2]] ^S7[x[0x1]] ^S8[x[0x3]] ^S8[z[0x2]];
Bits32ToInts(x47, x, 0x4);
x8B = z47 ^S5[x[0x7]] ^S6[x[0x6]] ^S7[x[0x5]] ^S8[x[0x4]] ^S5[z[0x1]];
Bits32ToInts(x8B, x, 0x8);
xCF = zCF ^S5[x[0xA]] ^S6[x[0x9]] ^S7[x[0xB]] ^S8[x[0x8]] ^S6[z[0x3]];
Bits32ToInts(xCF, x, 0xC);
_Km[ 5]= S5[x[0x3]] ^ S6[x[0x2]] ^ S7[x[0xC]] ^ S8[x[0xD]] ^ S5[x[0x8]];
_Km[ 6]= S5[x[0x1]] ^ S6[x[0x0]] ^ S7[x[0xE]] ^ S8[x[0xF]] ^ S6[x[0xD]];
_Km[ 7]= S5[x[0x7]] ^ S6[x[0x6]] ^ S7[x[0x8]] ^ S8[x[0x9]] ^ S7[x[0x3]];
_Km[ 8]= S5[x[0x5]] ^ S6[x[0x4]] ^ S7[x[0xA]] ^ S8[x[0xB]] ^ S8[x[0x7]];
x03 = IntsTo32bits(x, 0x0);
x47 = IntsTo32bits(x, 0x4);
x8B = IntsTo32bits(x, 0x8);
xCF = IntsTo32bits(x, 0xC);
z03 = x03 ^S5[x[0xD]] ^S6[x[0xF]] ^S7[x[0xC]] ^S8[x[0xE]] ^S7[x[0x8]];
Bits32ToInts(z03, z, 0x0);
z47 = x8B ^S5[z[0x0]] ^S6[z[0x2]] ^S7[z[0x1]] ^S8[z[0x3]] ^S8[x[0xA]];
Bits32ToInts(z47, z, 0x4);
z8B = xCF ^S5[z[0x7]] ^S6[z[0x6]] ^S7[z[0x5]] ^S8[z[0x4]] ^S5[x[0x9]];
Bits32ToInts(z8B, z, 0x8);
zCF = x47 ^S5[z[0xA]] ^S6[z[0x9]] ^S7[z[0xB]] ^S8[z[0x8]] ^S6[x[0xB]];
Bits32ToInts(zCF, z, 0xC);
_Km[ 9]= S5[z[0x3]] ^ S6[z[0x2]] ^ S7[z[0xC]] ^ S8[z[0xD]] ^ S5[z[0x9]];
_Km[10]= S5[z[0x1]] ^ S6[z[0x0]] ^ S7[z[0xE]] ^ S8[z[0xF]] ^ S6[z[0xc]];
_Km[11]= S5[z[0x7]] ^ S6[z[0x6]] ^ S7[z[0x8]] ^ S8[z[0x9]] ^ S7[z[0x2]];
_Km[12]= S5[z[0x5]] ^ S6[z[0x4]] ^ S7[z[0xA]] ^ S8[z[0xB]] ^ S8[z[0x6]];
z03 = IntsTo32bits(z, 0x0);
z47 = IntsTo32bits(z, 0x4);
z8B = IntsTo32bits(z, 0x8);
zCF = IntsTo32bits(z, 0xC);
x03 = z8B ^S5[z[0x5]] ^S6[z[0x7]] ^S7[z[0x4]] ^S8[z[0x6]] ^S7[z[0x0]];
Bits32ToInts(x03, x, 0x0);
x47 = z03 ^S5[x[0x0]] ^S6[x[0x2]] ^S7[x[0x1]] ^S8[x[0x3]] ^S8[z[0x2]];
Bits32ToInts(x47, x, 0x4);
x8B = z47 ^S5[x[0x7]] ^S6[x[0x6]] ^S7[x[0x5]] ^S8[x[0x4]] ^S5[z[0x1]];
Bits32ToInts(x8B, x, 0x8);
xCF = zCF ^S5[x[0xA]] ^S6[x[0x9]] ^S7[x[0xB]] ^S8[x[0x8]] ^S6[z[0x3]];
Bits32ToInts(xCF, x, 0xC);
_Km[13]= S5[x[0x8]] ^ S6[x[0x9]] ^ S7[x[0x7]] ^ S8[x[0x6]] ^ S5[x[0x3]];
_Km[14]= S5[x[0xA]] ^ S6[x[0xB]] ^ S7[x[0x5]] ^ S8[x[0x4]] ^ S6[x[0x7]];
_Km[15]= S5[x[0xC]] ^ S6[x[0xD]] ^ S7[x[0x3]] ^ S8[x[0x2]] ^ S7[x[0x8]];
_Km[16]= S5[x[0xE]] ^ S6[x[0xF]] ^ S7[x[0x1]] ^ S8[x[0x0]] ^ S8[x[0xD]];
x03 = IntsTo32bits(x, 0x0);
x47 = IntsTo32bits(x, 0x4);
x8B = IntsTo32bits(x, 0x8);
xCF = IntsTo32bits(x, 0xC);
z03 = x03 ^S5[x[0xD]] ^S6[x[0xF]] ^S7[x[0xC]] ^S8[x[0xE]] ^S7[x[0x8]];
Bits32ToInts(z03, z, 0x0);
z47 = x8B ^S5[z[0x0]] ^S6[z[0x2]] ^S7[z[0x1]] ^S8[z[0x3]] ^S8[x[0xA]];
Bits32ToInts(z47, z, 0x4);
z8B = xCF ^S5[z[0x7]] ^S6[z[0x6]] ^S7[z[0x5]] ^S8[z[0x4]] ^S5[x[0x9]];
Bits32ToInts(z8B, z, 0x8);
zCF = x47 ^S5[z[0xA]] ^S6[z[0x9]] ^S7[z[0xB]] ^S8[z[0x8]] ^S6[x[0xB]];
Bits32ToInts(zCF, z, 0xC);
_Kr[ 1]=(int)((S5[z[0x8]]^S6[z[0x9]]^S7[z[0x7]]^S8[z[0x6]] ^ S5[z[0x2]])&0x1f);
_Kr[ 2]=(int)((S5[z[0xA]]^S6[z[0xB]]^S7[z[0x5]]^S8[z[0x4]] ^ S6[z[0x6]])&0x1f);
_Kr[ 3]=(int)((S5[z[0xC]]^S6[z[0xD]]^S7[z[0x3]]^S8[z[0x2]] ^ S7[z[0x9]])&0x1f);
_Kr[ 4]=(int)((S5[z[0xE]]^S6[z[0xF]]^S7[z[0x1]]^S8[z[0x0]] ^ S8[z[0xC]])&0x1f);
z03 = IntsTo32bits(z, 0x0);
z47 = IntsTo32bits(z, 0x4);
z8B = IntsTo32bits(z, 0x8);
zCF = IntsTo32bits(z, 0xC);
x03 = z8B ^S5[z[0x5]] ^S6[z[0x7]] ^S7[z[0x4]] ^S8[z[0x6]] ^S7[z[0x0]];
Bits32ToInts(x03, x, 0x0);
x47 = z03 ^S5[x[0x0]] ^S6[x[0x2]] ^S7[x[0x1]] ^S8[x[0x3]] ^S8[z[0x2]];
Bits32ToInts(x47, x, 0x4);
x8B = z47 ^S5[x[0x7]] ^S6[x[0x6]] ^S7[x[0x5]] ^S8[x[0x4]] ^S5[z[0x1]];
Bits32ToInts(x8B, x, 0x8);
xCF = zCF ^S5[x[0xA]] ^S6[x[0x9]] ^S7[x[0xB]] ^S8[x[0x8]] ^S6[z[0x3]];
Bits32ToInts(xCF, x, 0xC);
_Kr[ 5]=(int)((S5[x[0x3]]^S6[x[0x2]]^S7[x[0xC]]^S8[x[0xD]]^S5[x[0x8]])&0x1f);
_Kr[ 6]=(int)((S5[x[0x1]]^S6[x[0x0]]^S7[x[0xE]]^S8[x[0xF]]^S6[x[0xD]])&0x1f);
_Kr[ 7]=(int)((S5[x[0x7]]^S6[x[0x6]]^S7[x[0x8]]^S8[x[0x9]]^S7[x[0x3]])&0x1f);
_Kr[ 8]=(int)((S5[x[0x5]]^S6[x[0x4]]^S7[x[0xA]]^S8[x[0xB]]^S8[x[0x7]])&0x1f);
x03 = IntsTo32bits(x, 0x0);
x47 = IntsTo32bits(x, 0x4);
x8B = IntsTo32bits(x, 0x8);
xCF = IntsTo32bits(x, 0xC);
z03 = x03 ^S5[x[0xD]] ^S6[x[0xF]] ^S7[x[0xC]] ^S8[x[0xE]] ^S7[x[0x8]];
Bits32ToInts(z03, z, 0x0);
z47 = x8B ^S5[z[0x0]] ^S6[z[0x2]] ^S7[z[0x1]] ^S8[z[0x3]] ^S8[x[0xA]];
Bits32ToInts(z47, z, 0x4);
z8B = xCF ^S5[z[0x7]] ^S6[z[0x6]] ^S7[z[0x5]] ^S8[z[0x4]] ^S5[x[0x9]];
Bits32ToInts(z8B, z, 0x8);
zCF = x47 ^S5[z[0xA]] ^S6[z[0x9]] ^S7[z[0xB]] ^S8[z[0x8]] ^S6[x[0xB]];
Bits32ToInts(zCF, z, 0xC);
_Kr[ 9]=(int)((S5[z[0x3]]^S6[z[0x2]]^S7[z[0xC]]^S8[z[0xD]]^S5[z[0x9]])&0x1f);
_Kr[10]=(int)((S5[z[0x1]]^S6[z[0x0]]^S7[z[0xE]]^S8[z[0xF]]^S6[z[0xc]])&0x1f);
_Kr[11]=(int)((S5[z[0x7]]^S6[z[0x6]]^S7[z[0x8]]^S8[z[0x9]]^S7[z[0x2]])&0x1f);
_Kr[12]=(int)((S5[z[0x5]]^S6[z[0x4]]^S7[z[0xA]]^S8[z[0xB]]^S8[z[0x6]])&0x1f);
z03 = IntsTo32bits(z, 0x0);
z47 = IntsTo32bits(z, 0x4);
z8B = IntsTo32bits(z, 0x8);
zCF = IntsTo32bits(z, 0xC);
x03 = z8B ^S5[z[0x5]] ^S6[z[0x7]] ^S7[z[0x4]] ^S8[z[0x6]] ^S7[z[0x0]];
Bits32ToInts(x03, x, 0x0);
x47 = z03 ^S5[x[0x0]] ^S6[x[0x2]] ^S7[x[0x1]] ^S8[x[0x3]] ^S8[z[0x2]];
Bits32ToInts(x47, x, 0x4);
x8B = z47 ^S5[x[0x7]] ^S6[x[0x6]] ^S7[x[0x5]] ^S8[x[0x4]] ^S5[z[0x1]];
Bits32ToInts(x8B, x, 0x8);
xCF = zCF ^S5[x[0xA]] ^S6[x[0x9]] ^S7[x[0xB]] ^S8[x[0x8]] ^S6[z[0x3]];
Bits32ToInts(xCF, x, 0xC);
_Kr[13]=(int)((S5[x[0x8]]^S6[x[0x9]]^S7[x[0x7]]^S8[x[0x6]]^S5[x[0x3]])&0x1f);
_Kr[14]=(int)((S5[x[0xA]]^S6[x[0xB]]^S7[x[0x5]]^S8[x[0x4]]^S6[x[0x7]])&0x1f);
_Kr[15]=(int)((S5[x[0xC]]^S6[x[0xD]]^S7[x[0x3]]^S8[x[0x2]]^S7[x[0x8]])&0x1f);
_Kr[16]=(int)((S5[x[0xE]]^S6[x[0xF]]^S7[x[0x1]]^S8[x[0x0]]^S8[x[0xD]])&0x1f);
}
/**
* Encrypt the given input starting at the given offset and place
* the result in the provided buffer starting at the given offset.
*
* @param src The plaintext buffer
* @param srcIndex An offset into src
* @param dst The ciphertext buffer
* @param dstIndex An offset into dst
*/
internal virtual int EncryptBlock(
byte[] src,
int srcIndex,
byte[] dst,
int dstIndex)
{
// process the input block
// batch the units up into a 32 bit chunk and go for it
// the array is in bytes, the increment is 8x8 bits = 64
uint L0 = Pack.BE_To_UInt32(src, srcIndex);
uint R0 = Pack.BE_To_UInt32(src, srcIndex + 4);
uint[] result = new uint[2];
CAST_Encipher(L0, R0, result);
// now stuff them into the destination block
Pack.UInt32_To_BE(result[0], dst, dstIndex);
Pack.UInt32_To_BE(result[1], dst, dstIndex + 4);
return BLOCK_SIZE;
}
/**
* Decrypt the given input starting at the given offset and place
* the result in the provided buffer starting at the given offset.
*
* @param src The plaintext buffer
* @param srcIndex An offset into src
* @param dst The ciphertext buffer
* @param dstIndex An offset into dst
*/
internal virtual int DecryptBlock(
byte[] src,
int srcIndex,
byte[] dst,
int dstIndex)
{
// process the input block
// batch the units up into a 32 bit chunk and go for it
// the array is in bytes, the increment is 8x8 bits = 64
uint L16 = Pack.BE_To_UInt32(src, srcIndex);
uint R16 = Pack.BE_To_UInt32(src, srcIndex + 4);
uint[] result = new uint[2];
CAST_Decipher(L16, R16, result);
// now stuff them into the destination block
Pack.UInt32_To_BE(result[0], dst, dstIndex);
Pack.UInt32_To_BE(result[1], dst, dstIndex + 4);
return BLOCK_SIZE;
}
/**
* The first of the three processing functions for the
* encryption and decryption.
*
* @param D the input to be processed
* @param Kmi the mask to be used from Km[n]
* @param Kri the rotation value to be used
*
*/
internal static uint F1(uint D, uint Kmi, int Kri)
{
uint I = Kmi + D;
I = I << Kri | (I >> (32-Kri));
return ((S1[(I>>24)&0xff]^S2[(I>>16)&0xff])-S3[(I>>8)&0xff])+S4[I&0xff];
}
/**
* The second of the three processing functions for the
* encryption and decryption.
*
* @param D the input to be processed
* @param Kmi the mask to be used from Km[n]
* @param Kri the rotation value to be used
*
*/
internal static uint F2(uint D, uint Kmi, int Kri)
{
uint I = Kmi ^ D;
I = I << Kri | (I >> (32-Kri));
return ((S1[(I>>24)&0xff]-S2[(I>>16)&0xff])+S3[(I>>8)&0xff])^S4[I&0xff];
}
/**
* The third of the three processing functions for the
* encryption and decryption.
*
* @param D the input to be processed
* @param Kmi the mask to be used from Km[n]
* @param Kri the rotation value to be used
*
*/
internal static uint F3(uint D, uint Kmi, int Kri)
{
uint I = Kmi - D;
I = I << Kri | (I >> (32-Kri));
return ((S1[(I>>24)&0xff]+S2[(I>>16)&0xff])^S3[(I>>8)&0xff])-S4[I&0xff];
}
/**
* Does the 16 rounds to encrypt the block.
*
* @param L0 the LH-32bits of the plaintext block
* @param R0 the RH-32bits of the plaintext block
*/
internal void CAST_Encipher(uint L0, uint R0, uint[] result)
{
uint Lp = L0; // the previous value, equiv to L[i-1]
uint Rp = R0; // equivalent to R[i-1]
/*
* numbering consistent with paper to make
* checking and validating easier
*/
uint Li = L0, Ri = R0;
for (int i = 1; i<=_rounds ; i++)
{
Lp = Li;
Rp = Ri;
Li = Rp;
switch (i)
{
case 1:
case 4:
case 7:
case 10:
case 13:
case 16:
Ri = Lp ^ F1(Rp, _Km[i], _Kr[i]);
break;
case 2:
case 5:
case 8:
case 11:
case 14:
Ri = Lp ^ F2(Rp, _Km[i], _Kr[i]);
break;
case 3:
case 6:
case 9:
case 12:
case 15:
Ri = Lp ^ F3(Rp, _Km[i], _Kr[i]);
break;
}
}
result[0] = Ri;
result[1] = Li;
return;
}
internal void CAST_Decipher(uint L16, uint R16, uint[] result)
{
uint Lp = L16; // the previous value, equiv to L[i-1]
uint Rp = R16; // equivalent to R[i-1]
/*
* numbering consistent with paper to make
* checking and validating easier
*/
uint Li = L16, Ri = R16;
for (int i = _rounds; i > 0; i--)
{
Lp = Li;
Rp = Ri;
Li = Rp;
switch (i)
{
case 1:
case 4:
case 7:
case 10:
case 13:
case 16:
Ri = Lp ^ F1(Rp, _Km[i], _Kr[i]);
break;
case 2:
case 5:
case 8:
case 11:
case 14:
Ri = Lp ^ F2(Rp, _Km[i], _Kr[i]);
break;
case 3:
case 6:
case 9:
case 12:
case 15:
Ri = Lp ^ F3(Rp, _Km[i], _Kr[i]);
break;
}
}
result[0] = Ri;
result[1] = Li;
return;
}
internal static void Bits32ToInts(uint inData, int[] b, int offset)
{
b[offset + 3] = (int) (inData & 0xff);
b[offset + 2] = (int) ((inData >> 8) & 0xff);
b[offset + 1] = (int) ((inData >> 16) & 0xff);
b[offset] = (int) ((inData >> 24) & 0xff);
}
internal static uint IntsTo32bits(int[] b, int i)
{
return (uint)(((b[i] & 0xff) << 24) |
((b[i+1] & 0xff) << 16) |
((b[i+2] & 0xff) << 8) |
((b[i+3] & 0xff)));
}
}
}
|
Everbytes/Raksha
|
src/Raksha.Shared/Crypto/Engines/Cast5Engine.cs
|
C#
|
mit
| 45,202
|
// ******************************************************************
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************
namespace Microsoft.Toolkit.Uwp.UI.Animations.Expressions
{
// Ignore warning: 'BooleanNode' defines operator == or operator != but does not override Object.Equals(object o) && Object.GetHashCode()
#pragma warning disable CS0660, CS0661
/// <summary>
/// Class BooleanNode. This class cannot be inherited.
/// </summary>
/// <seealso cref="Microsoft.Toolkit.Uwp.UI.Animations.Expressions.ExpressionNode" />
public sealed class BooleanNode : ExpressionNode
{
/// <summary>
/// Initializes a new instance of the <see cref="BooleanNode"/> class.
/// </summary>
internal BooleanNode()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="BooleanNode"/> class.
/// </summary>
/// <param name="value">if set to <c>true</c> [value].</param>
internal BooleanNode(bool value)
{
_value = value;
NodeType = ExpressionNodeType.ConstantValue;
}
/// <summary>
/// Initializes a new instance of the <see cref="BooleanNode"/> class.
/// </summary>
/// <param name="paramName">Name of the parameter.</param>
internal BooleanNode(string paramName)
{
ParamName = paramName;
NodeType = ExpressionNodeType.ConstantParameter;
}
/// <summary>
/// Initializes a new instance of the <see cref="BooleanNode"/> class.
/// </summary>
/// <param name="paramName">Name of the parameter.</param>
/// <param name="value">if set to <c>true</c> [value].</param>
internal BooleanNode(string paramName, bool value)
{
ParamName = paramName;
_value = value;
NodeType = ExpressionNodeType.ConstantParameter;
SetBooleanParameter(paramName, value);
}
/// <summary>
/// Performs an implicit conversion from <see cref="bool"/> to <see cref="BooleanNode"/>.
/// </summary>
/// <param name="value">if set to <c>true</c> [value].</param>
/// <returns>The result of the conversion.</returns>
public static implicit operator BooleanNode(bool value)
{
return new BooleanNode(value);
}
/// <summary>
/// Implements the == operator.
/// </summary>
/// <param name="left">The left.</param>
/// <param name="right">The right.</param>
/// <returns>The result of the operator.</returns>
public static BooleanNode operator ==(BooleanNode left, BooleanNode right)
{
return ExpressionFunctions.Function<BooleanNode>(ExpressionNodeType.Equals, left, right);
}
/// <summary>
/// Implements the != operator.
/// </summary>
/// <param name="left">The left.</param>
/// <param name="right">The right.</param>
/// <returns>The result of the operator.</returns>
public static BooleanNode operator !=(BooleanNode left, BooleanNode right)
{
return ExpressionFunctions.Function<BooleanNode>(ExpressionNodeType.NotEquals, left, right);
}
/// <summary>
/// Implements the & operator.
/// </summary>
/// <param name="left">The left.</param>
/// <param name="right">The right.</param>
/// <returns>The result of the operator.</returns>
public static BooleanNode operator &(BooleanNode left, BooleanNode right)
{
return ExpressionFunctions.Function<BooleanNode>(ExpressionNodeType.And, left, right);
}
/// <summary>
/// Implements the | operator.
/// </summary>
/// <param name="left">The left.</param>
/// <param name="right">The right.</param>
/// <returns>The result of the operator.</returns>
public static BooleanNode operator |(BooleanNode left, BooleanNode right)
{
return ExpressionFunctions.Function<BooleanNode>(ExpressionNodeType.Or, left, right);
}
/// <summary>
/// Implements the ! operator.
/// </summary>
/// <param name="value">The value.</param>
/// <returns>The result of the operator.</returns>
public static BooleanNode operator !(BooleanNode value)
{
return ExpressionFunctions.Function<BooleanNode>(ExpressionNodeType.Not, value);
}
/// <summary>
/// Gets the value.
/// </summary>
/// <returns>System.String.</returns>
protected internal override string GetValue()
{
return _value ? "true" : "false";
}
private bool _value;
}
#pragma warning restore CS0660, CS0661
}
|
bkaankose/UWPCommunityToolkit
|
Microsoft.Toolkit.Uwp.UI.Animations/Expressions/ExpressionNodes/BooleanNode.cs
|
C#
|
mit
| 5,484
|
(function(){
var worker = new ProtocolWorker('web+profile');
navigator.webProfile = {
registerProvider: function(name, uri){
navigator.registerProtocolHandler('web+profile', uri + '?%s', name);
},
getID: function(){
return worker.request({ action: 'get:id' }).then(function(response){
navigator.webProfile.id = response.id;
return response;
})
},
authenticate: function(){
if (!this.id) throw 'Not Connected: you must connect before sending Web Profile requests';
},
getProfile: function(username){
/*
This should be performed by the browser,
platform, or OS so it comes directly from
the blockchain instead of relying on a
third-party middleman.
*/
var name = username || this.id;
return fetch('https://api.onename.com/v1/users/' + name + '?app-id=11783753c820c2004667f4b17efb376d&app-secret=a31496483fa18b96b39845d66d62d15d37f5eea29aca6f161b2f6bcc0a7d8d91')
.then(function(response){
return response.json();
}).then(function(json){
return json[name].profile;
});
}
};
})();
|
Web-Profile/prollyfills
|
navigator.webProfile.js
|
JavaScript
|
mit
| 1,183
|
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {
employeesSource: any =
{
datatype: 'xml',
datafields: [
{ name: 'FirstName', type: 'string' },
{ name: 'LastName', type: 'string' }
],
root: 'Employees',
record: 'Employee',
id: 'EmployeeID',
url: '../sampledata/employees.xml'
};
employeesAdapter: any = new jqx.dataAdapter(this.employeesSource, {
autoBind: true,
beforeLoadComplete: (records: any[]): any[] => {
let data = new Array();
// update the loaded records. Dynamically add EmployeeName and EmployeeID fields.
for (let i = 0; i < records.length; i++) {
let employee = records[i];
employee.EmployeeName = employee.FirstName + ' ' + employee.LastName;
employee.EmployeeID = employee.uid;
data.push(employee);
}
return data;
}
});
ordersSource =
{
datatype: 'xml',
datafields: [
// name - determines the field's name.
// values - specifies the field's values.
// values.source - specifies the foreign source. The expected value is an array.
// values.name - specifies the field's name in the foreign source.
// When the ordersAdapter is loaded, each record will have a field called 'EmployeeID'. The 'EmployeeID' for each record will come from the employeesAdapter where the record's 'EmployeeID' from orders.xml matches to the 'EmployeeID' from employees.xml.
{ name: 'EmployeeID', map: 'm\\:properties>d\\:EmployeeID', values: { source: this.employeesAdapter.records, name: 'EmployeeName' } },
{ name: 'ShippedDate', map: 'm\\:properties>d\\:ShippedDate', type: 'date' },
{ name: 'Freight', map: 'm\\:properties>d\\:Freight', type: 'float' },
{ name: 'ShipName', map: 'm\\:properties>d\\:ShipName' },
{ name: 'ShipAddress', map: 'm\\:properties>d\\:ShipAddress' },
{ name: 'ShipCity', map: 'm\\:properties>d\\:ShipCity' },
{ name: 'ShipCountry', map: 'm\\:properties>d\\:ShipCountry' }
],
root: 'entry',
record: 'content',
id: 'm\\:properties>d\\:OrderID',
url: '../sampledata/orders.xml',
pager: (pagenum: any, pagesize: any, oldpagenum: any): void => {
// callback called when a page or page size is changed.
}
};
ordersAdapter: any = new jqx.dataAdapter(this.ordersSource);
columns: any[] =
[
{ text: 'Employee Name', datafield: 'EmployeeID', width: 150 },
{ text: 'Ship City', datafield: 'ShipCity', width: 150 },
{ text: 'Ship Country', datafield: 'ShipCountry', width: 150 },
{ text: 'Ship Name', datafield: 'ShipName' }
];
}
|
juannelisalde/holter
|
assets/jqwidgets/demos/angular/app/grid/foreignkeycolumn/app.component.ts
|
TypeScript
|
mit
| 2,990
|
using System.Web.Mvc;
using System.Web.Routing;
namespace CodeCamper.Web
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
//PAPA: Commented this out because we wont be using MVC views
//routes.MapRoute(
// name: "Default",
// url: "{controller}/{action}/{id}",
// defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
//);
}
}
}
|
cmcginn/CodeCamper
|
CodeCamper.Web/App_Start/RouteConfig.cs
|
C#
|
mit
| 582
|
//
// UploadService.cs
//
// Author:
// Ventsislav Mladenov <vmladenov.mladenov@gmail.com>
//
// Copyright (c) 2013 Ventsislav Mladenov
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using Microsoft.TeamFoundation.Client;
using System.Net;
using System.IO;
using System.Text;
using System.IO.Compression;
using System.Security.Cryptography;
using Microsoft.TeamFoundation.VersionControl.Client.Objects;
using Microsoft.TeamFoundation.Client.Services;
namespace Microsoft.TeamFoundation.VersionControl.Client
{
public class UploadService: TFSCollectionService
{
const string NewLine = "\r\n";
const string Boundary = "----------------------------8e5m2D6l5Q4h6";
const int ChunkSize = 512 * 1024; //Chunk Size 512 K
private static readonly string uncompressedContentType = "application/octet-stream";
// private static readonly string compressedContentType = "application/gzip";
class UploadServiceResolver : IServiceResolver
{
public string Id
{
get
{
return "1c04c122-7ad1-4f02-87ba-979b9d278bee";
}
}
public string ServiceType
{
get
{
return "Upload";
}
}
}
#region implemented abstract members of TfsService
public override System.Xml.Linq.XNamespace MessageNs
{
get
{
throw new NotImplementedException();
}
}
public override IServiceResolver ServiceResolver
{
get
{
return new UploadServiceResolver();
}
}
#endregion
private void CopyStream(Stream source, Stream destination)
{
byte[] buffer = new byte[ChunkSize];
int cnt;
while((cnt = source.Read(buffer, 0, ChunkSize)) > 0)
{
destination.Write(buffer, 0, cnt);
}
destination.Flush();
}
private void CopyBytes(byte[] source, Stream destination)
{
using (var memorySource = new MemoryStream(source))
{
CopyStream(memorySource, destination);
}
}
public void UploadFile(string workspaceName, string workspaceOwner, PendingChange change)
{
var fileContent = File.ReadAllBytes(change.LocalItem);
var fileHash = Hash(fileContent);
string contentType = uncompressedContentType;
using (var memory = new MemoryStream(fileContent))
{
byte[] buffer = new byte[ChunkSize];
int cnt;
while((cnt = memory.Read(buffer, 0, ChunkSize)) > 0)
{
var range = GetRange(memory.Position - cnt, memory.Position, fileContent.Length);
UploadPart(change.ServerItem, workspaceName, workspaceOwner, fileContent.Length, fileHash, range, contentType, buffer, cnt);
}
}
}
private void UploadPart(string fileName, string workspaceName, string workspaceOwner, int fileSize, string fileHash, string range, string contentType, byte[] bytes, int copyBytes)
{
var request = (HttpWebRequest)WebRequest.Create(this.Url);
request.Method = "POST";
if (this.Collection.Server is INetworkServer)
{
var server = (INetworkServer)this.Collection.Server;
request.Credentials = server.Credentials;
}
else if (this.Collection.Server is IAuthServer)
{
var server = (IAuthServer)this.Collection.Server;
request.Headers.Add(HttpRequestHeader.Authorization, server.AuthString);
}
else
{
throw new Exception("Known server");
}
request.AllowWriteStreamBuffering = true;
request.ContentType = "multipart/form-data; boundary=" + Boundary.Substring(2);
var template = GetTemplate();
var content = string.Format(template, fileName, workspaceName, workspaceOwner, fileSize, fileHash, range, "item", contentType);
var contentBytes = Encoding.UTF8.GetBytes(content.Replace(Environment.NewLine, NewLine));
using (var stream = new MemoryStream())
{
stream.Write(contentBytes, 0, contentBytes.Length);
stream.Write(bytes, 0, copyBytes);
var footContent = Encoding.UTF8.GetBytes(NewLine + Boundary + "--" + NewLine);
stream.Write(footContent, 0, footContent.Length);
stream.Flush();
contentBytes = stream.ToArray();
}
//request.ContentLength = contentBytes.Length;
using (var requestStream = request.GetRequestStream())
{
CopyBytes(contentBytes, requestStream);
}
request.GetResponse();
}
private string GetTemplate()
{
var builder = new StringBuilder();
builder.AppendLine(Boundary);
builder.Append("Content-Disposition: form-data; name=\"");
builder.Append("item");
builder.AppendLine("\"");
builder.AppendLine();
builder.Append("{0}");
builder.AppendLine();
builder.AppendLine(Boundary);
builder.Append("Content-Disposition: form-data; name=\"");
builder.Append("wsname");
builder.AppendLine("\"");
builder.AppendLine();
builder.Append("{1}");
builder.AppendLine();
builder.AppendLine(Boundary);
builder.Append("Content-Disposition: form-data; name=\"");
builder.Append("wsowner");
builder.AppendLine("\"");
builder.AppendLine();
builder.Append("{2}");
builder.AppendLine();
builder.AppendLine(Boundary);
builder.Append("Content-Disposition: form-data; name=\"");
builder.Append("filelength");
builder.AppendLine("\"");
builder.AppendLine();
builder.Append("{3}");
builder.AppendLine();
builder.AppendLine(Boundary);
builder.Append("Content-Disposition: form-data; name=\"");
builder.Append("hash");
builder.AppendLine("\"");
builder.AppendLine();
builder.Append("{4}");
builder.AppendLine();
builder.AppendLine(Boundary);
builder.Append("Content-Disposition: form-data; name=\"");
builder.Append("range");
builder.AppendLine("\"");
builder.AppendLine();
builder.Append("{5}");
builder.AppendLine();
builder.AppendLine(Boundary);
builder.Append("Content-Disposition: form-data; name=\"");
builder.Append("content");
builder.Append("\"; filename=\"");
builder.Append("{6}");
builder.AppendLine("\"");
builder.Append("Content-Type: ");
builder.Append("{7}");
builder.AppendLine();
builder.AppendLine();
// builder.Append("{8}");
// builder.AppendLine();
// builder.Append("----------------------------8e5m2D6l5Q4h6");
// builder.AppendLine("--");
return builder.ToString();
}
private byte[] Compress(byte[] input)
{
using (var memoryStream = new MemoryStream())
{
using (GZipStream stream = new GZipStream(memoryStream, CompressionMode.Compress))
{
stream.Write(input, 0, input.Length);
stream.Flush();
}
return memoryStream.ToArray();
}
}
private string Hash(byte[] input)
{
using (var md5 = new MD5CryptoServiceProvider())
{
return Convert.ToBase64String(md5.ComputeHash(input));
}
}
private string GetRange(long start, long end, long length)
{
var builder = new StringBuilder(100);
builder.Append("bytes=");
builder.Append(start);
builder.Append('-');
builder.Append(end - 1);
builder.Append('/');
builder.Append(length);
builder.AppendLine();
return builder.ToString();
}
}
}
|
kentkost/monodevelop-tfs-addin
|
MonoDevelop.VersionControl.TFS/Microsoft.TeamFoundation.VersionControl.Client/UploadService.cs
|
C#
|
mit
| 9,777
|
define([
'jquery',
'find/app/util/database-name-resolver'
], function($, databaseNameResolver) {
return {
/**
* Get the view document URL for a document in a text index.
* @param {String} reference
* @param {String} model
* @param {Boolean} highlightExpressions
* @return {String}
*/
getHref: function(reference, model, highlightExpressions) {
var database = databaseNameResolver.resolveDatabaseNameForDocumentModel(model);
return 'api/public/view/viewDocument?' + $.param({
reference: reference,
index: database,
highlightExpressions: highlightExpressions || null
}, true);
},
/**
* Get the view document URL for a search result triggered by a static content promotion
* @param {String} reference Reference of the search result
* @return {String}
*/
getStaticContentPromotionHref: function(reference) {
return 'api/public/view/viewStaticContentPromotion?' + $.param({
reference: reference
});
}
};
});
|
hpe-idol/find
|
webapp/core/src/main/public/static/js/find/app/util/view-server-client.js
|
JavaScript
|
mit
| 1,221
|
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Web;
namespace Auth0.Owin
{
internal static class HttpUtilities
{
internal static NameValueCollection ParseQueryString(string query)
{
NameValueCollection queryParameters = new NameValueCollection();
string[] querySegments = query.Split('&');
foreach (string segment in querySegments)
{
string[] parts = segment.Split('=');
if (parts.Length > 1)
{
string key = parts[0].Trim('?', ' ');
string val = parts[1].Trim();
queryParameters.Add(key, WebUtility.UrlDecode(val));
}
}
return queryParameters;
}
}
}
|
auth0/auth0-aspnet-owin
|
src/Auth0.Owin/HttpUtilities.cs
|
C#
|
mit
| 926
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table Of Contents
- [Testing](#testing)
- [Event Handlers - Part 1](#event-handlers---part-1)
- [Event Handlers - Part 2](#event-handlers---part-2)
- [Subscription Handlers](#subscription-handlers)
- [Components- Part 1](#components--part-1)
- [Components - Part 2A](#components---part-2a)
- [Components - Part 2B](#components---part-2b)
- [Components - Part 2C](#components---part-2c)
- [Summary](#summary)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
> IGNORE THIS DOCUMENT. IT IS WIP
## Testing
With a re-frame app, there's principally three things to test:
1. Event handlers
2. Subscription handlers
3. View functions
## Event Handlers - Part 1
Event Handlers are pure functions and consequently easy to test.
First, create an event handler like this:
```clj
(defn my-db-handler
[db v]
... return a modified version of db)
```
Then, register it in a separate step:
```clj
(re-event-db
:some-id
[some-interceptors]
my-handler)
```
With this setup, `my-db-handler` is available for direct testing.
Your unittests will pass in certain values for `db` and `v`, and then ensure it returns the right (modified version of) `db`.
## Event Handlers - Part 2
Event handlers mutate the value in `app-db` - that's their job.
I'd recommend defining a [Prismatic Schema](https://github.com/Prismatic/schema)
for the value in `app-db` and then checking for correctness after every,
single event handler. Every single one.
Using `after` middleware, this is easy to arrange. The todomvc example shows how:
- [define a Schema](https://github.com/Day8/re-frame/blob/2ba8914d8dd5f0cf2b09d6f3942823a798c2ef5c/examples/todomvc/src/todomvc/db.cljs#L6-L28) for the value in `app-db`
- [create some middleware](https://github.com/Day8/re-frame/blob/2ba8914d8dd5f0cf2b09d6f3942823a798c2ef5c/examples/todomvc/src/todomvc/handlers.cljs#L11-L19)
- [add the middleware](https://github.com/Day8/re-frame/blob/2ba8914d8dd5f0cf2b09d6f3942823a798c2ef5c/examples/todomvc/src/todomvc/handlers.cljs#L46) to your event handlers
## Subscription Handlers
Here's a subscription handler from [the todomvc example](https://github.com/Day8/re-frame/blob/master/examples/todomvc/src/todomvc/subs.cljs):
```clj
(reg-sub
:completed-count
(fn [db _]
(completed-count (:todos db))))
```
How do we test this?
We could split the handler function from its registration, like this:
```clj
(defn get-completed-count
[app-db _]
(reaction (completed-count (:todos @app-db))))
(register-sub
:completed-count
get-completed-count)
```
That makes `get-completed-count` available for direct testing. But you'll note it isn't a pure function.
It isn't values in, values out. Instead, it is atoms in, atoms out.
If this function was on a paint chart, they'd call in "Arctic Fusion" to indicate its
proximity to pure white, while hinting at taints.
We could accept this. We could create tests by passing in a `reagent/atom` holding the
certain values and then checking the values in what's returned. That would work.
The more pragmatic among us might even approve.
But let's assume that's not good enough. Let's refactor for pureness:
The 1st step in this refactor is to create a pure function which actually does ALL the hard work ...
```clj
(defn completed-count-handler
[db v] ;; db is a value, not an atom
..... return a value here based on the values db and v)
```
The 2nd step in the refactor is to register using a thin `reaction` wrapper:
```clj
(register-sub
:completed-count
(fn [app-db v]
(reaction (completed-count-handler @app-db v))))
```
Because `completed-count-handler` is now doing all the work, it is the thing we want
to test, and it is now a pure function. So I think we are there.
## Components- Part 1
Components/views are slightly more tricky. There's a few options.
First, I have to admit an ugly secret. I don't tend to write tests for my views.
Hey, don't give me that disproving frown! I have my reasons.
Remember that every line of code you write is a liability. So tests have to earn
their keep - they have to deliver a good cost / benefit ratio. And, in my experience
with the re-frame architecture, the Reagent view components tend to be an unlikely
source of bugs. There's just not much logic in them for me to get wrong.
Okay, fine, don't believe me, then!!
Here's how, theoretically, I'd write tests if I wasn't me ...
If a Components is a [Form-1](https://github.com/Day8/re-frame/wiki/Creating-Reagent-Components#form-1-a-simple-function) structure, then it is fairly easy to test.
A trivial example:
```clj
(defn greet
[name]
[:div "Hello " name])
(greet "Wiki")
;;=> [:div "Hello " "Wiki"]
```
So, here, testing involves passing values into the function and checking the data structure returned for correctness.
What's returned is hiccup, of course. So how do you test hiccup for correctness?
hiccup is just a clojure data structure - vectors containing keywords, and maps, and other vectors, etc. Perhaps you'd use https://github.com/nathanmarz/specter to declaratively check on the presence of certain values and structures? Or do it more manually.
## Components - Part 2A
But what if the Component has a subscription (via a [Form-2](https://github.com/Day8/re-frame/wiki/Creating-Reagent-Components#form-2--a-function-returning-a-function) structure)?
```clj
(defn my-view
[something]
(let [val (subscribe [:query-id])] <-- reactive subscription
(fn [something] <-- returns the render function
[:div .... using @val in here])))
```
There's no immediately obvious way to test this as a lovely pure function. Because it is not pure.
Of course, less pure ways are very possible. For example, a plan might be:
1. setup `app-db` with some values in the right places (for the subscription)
2. call `my-view` (with a parameter) which will return `the renderer`
3. call `the renderer` (with a parameter) which will return hiccup
4. check the hiccup structure for correctness.
Continuing on, in a second phase you could then:
5. change the value in `app-db` (which will cause the subscription to fire)
6. call `the renderer` again (hiccup returned).
7. check that the hiccup
Which is all possible, if a little messy, and with one gotcha. After you change the value in `app-db` the subscription won't hold the new value straight away. It won't get calculated until the next animationFrame. And the next animationFrame won't happen until you hand back control to the browser. I think. Untested. Please report back here if you try. And you might also be able to use `reagent.core/flush` to force the view to be updated.
## Components - Part 2B
Or ... instead of the not-very-pure method above, you could use `with-redefs` on `subscribe` to stub out re-frame altogether:
```clj
(defn subscription-stub [x]
(atom
(case x
[:query-id] 42)))
(deftest some-test
(with-redefs [re-frame/subscribe (subscription-stub)]
(testing "some rendering"
..... somehow call or render the component and check the output)))
```
For more integration level testing, you can use `with-mounted-component` from the [reagent-template](https://github.com/reagent-project/reagent-template/blob/master/src/leiningen/new/reagent/test/cljs/reagent/core_test.cljs) to render the component in the browser and validate the generated DOM.
## Components - Part 2C
Or ... you can structure in the first place for easier testing and pure functions.
The trick here is to create an outer and inner component. The outer sources the data
(via a subscription), and passes it onto the inner as props (parameters).
As a result, the inner component, which does the testable work, is pure and
easily tested. The outer is fairly trivial.
To get a more concrete idea, I'll direct you to another page on this Wiki
which has nothing to do with testing, but it does use this `simple-outer-subscribe-with-complicated-inner-render`
pattern for a different purpose: [[Using-Stateful-JS-Components]]
Note this technique could be made simple and almost invisible via the
use of macros. (Contribute one if you have it).
This pattern has been independently discovered by many. For example, here
it is called the [Container/Component pattern](https://medium.com/@learnreact/container-components-c0e67432e005#.mb0hzgm3l).
## Summary
So, we stumbled slightly at the final hurdle with Form-2 Components. But prior
to this, the testing story for re-frame was as good as it gets: you are testing
a bunch of simple, pure functions. No dependency injection in sight!
|
richardharrington/re-frame
|
docs/Testing.md
|
Markdown
|
mit
| 8,859
|
<?php
namespace Tests\Integration;
use App\Article;
use App\Tag;
use Tests\TestCase;
class ManyToManyTest extends TestCase
{
/**
* @var Article
*/
protected $article;
/**
* @var Tag
*/
protected $tag;
/**
* Seed with a tag and article
*
* @return void
*/
protected function setUp() {
parent::setUp();
$this->auth();
$this->tag = factory(Tag::class)->create();
$this->article = factory(Article::class)->create([
'title' => 'Example',
]);
}
/**
* Test the autocomplete response
*
* @return void
*/
public function testAutocomplete()
{
$params = http_build_query([
'query' => 'amp',
'parent_controller' => 'App\Http\Controllers\Admin\Tags',
'parent_id' => $this->tag->id,
]);
$response = $this->json('GET', 'admin/articles/autocomplete?'.$params);
$response->assertJson([
[
'id' => 1,
'title' => 'Example',
'columns' => [
'getAdminTitleHtmlAttribute' => 'Example',
'getAdminFeaturedAttribute' => '',
'created_at' => date('m/d/y'),
]
]
]);
}
/**
* Test attach of a many to many relationship from the sidebar
*
* @return void
*/
public function testSidebarAttach()
{
$this->post('admin/articles/1/attach', [
'parent_controller' => 'App\Http\Controllers\Admin\Tags',
'parent_id' => $this->tag->id,
], $this->ajaxHeader());
$this->assertEquals(1, $this->tag->articles()->count());
$this->assertEquals($this->article->id, $this->tag->articles()->first()->id);
}
/**
* Test detaching (deleting) of a many to many relationship from the sidebar
*
* @return void
*/
public function testSidebarDetach()
{
$this->tag->articles()->attach($this->article->id);
$this->assertEquals(1, $this->article->tags()->count());
$this->delete('admin/admin/articles/1/remove', [
'parent_controller' => 'App\Http\Controllers\Admin\Tags',
'parent_id' => $this->tag->id,
], $this->ajaxHeader());
$this->assertEquals(0, $this->tag->articles()->count());
}
/**
* Test bulk detaching of a many to many relationship from the sidebar
*
* @return void
*/
public function testSidebarBulkDetach()
{
$article = factory(Article::class)->create();
$this->tag->articles()->attach([$article->id, $this->article->id]);
$this->assertEquals(2, $this->tag->articles()->count());
$this->delete('admin/admin/articles/1/remove', [
'parent_controller' => 'App\Http\Controllers\Admin\Tags',
'parent_id' => $this->tag->id,
'ids' => $this->article->id.','.$article->id,
], $this->ajaxHeader());
$this->assertEquals(0, $this->tag->articles()->count());
}
/**
* Test adding relations via the many to many checklist field
*
* @return void
*/
public function testManyToManyChecklistAttach()
{
$this->post('admin/articles/'.$this->article->id.'/edit', [
'_many_to_many_tags' => [ $this->tag->id ],
]);
$this->assertEquals(1, $this->article->tags()->count());
$this->assertEquals($this->tag->id, $this->article->tags()->first()->id);
}
/**
* Test removing relations via the many to many checklist field
*
* @return void
*/
public function testManyToManyChecklistDetach()
{
$this->article->tags()->attach($this->tag->id);
$this->assertEquals(1, $this->article->tags()->count());
$this->post('admin/articles/'.$this->article->id.'/edit', [
'_many_to_many_tags' => [ ],
]);
$this->assertEquals(0, $this->article->tags()->count());
}
}
|
SomosAMambo/decoy
|
tests/Integration/ManyToManyTest.php
|
PHP
|
mit
| 4,051
|
// Copyright (C) 2014 Andrzej Krzemienski.
//
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/lib/optional for documentation.
//
// You are welcome to contact the author at:
// akrzemi1@gmail.com
#include "boost/optional/optional.hpp"
#ifdef BOOST_BORLANDC
#pragma hdrstop
#endif
#include <string>
#include "boost/core/lightweight_test.hpp"
#include "boost/none.hpp"
//#ifndef BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT
//#ifndef BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR
using boost::optional;
using boost::none;
using boost::in_place_init;
using boost::in_place_init_if;
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
class Guard
{
public:
int which_ctor;
Guard () : which_ctor(0) { }
Guard (int&, double&&) : which_ctor(1) { }
Guard (int&&, double&) : which_ctor(2) { }
Guard (int&&, double&&) : which_ctor(3) { }
Guard (int&, double&) : which_ctor(4) { }
Guard (std::string const&) : which_ctor(5) { }
Guard (std::string &) : which_ctor(6) { }
Guard (std::string &&) : which_ctor(7) { }
private:
Guard(Guard&&);
Guard(Guard const&);
void operator=(Guard &&);
void operator=(Guard const&);
};
void test_emplace()
{
int i = 0;
double d = 0.0;
const std::string cs;
std::string ms;
optional<Guard> o;
o.emplace();
BOOST_TEST(o);
BOOST_TEST(0 == o->which_ctor);
o.emplace(i, 2.0);
BOOST_TEST(o);
BOOST_TEST(1 == o->which_ctor);
o.emplace(1, d);
BOOST_TEST(o);
BOOST_TEST(2 == o->which_ctor);
o.emplace(1, 2.0);
BOOST_TEST(o);
BOOST_TEST(3 == o->which_ctor);
o.emplace(i, d);
BOOST_TEST(o);
BOOST_TEST(4 == o->which_ctor);
o.emplace(cs);
BOOST_TEST(o);
BOOST_TEST(5 == o->which_ctor);
o.emplace(ms);
BOOST_TEST(o);
BOOST_TEST(6 == o->which_ctor);
o.emplace(std::string());
BOOST_TEST(o);
BOOST_TEST(7 == o->which_ctor);
}
void test_in_place_ctor()
{
int i = 0;
double d = 0.0;
const std::string cs;
std::string ms;
{
optional<Guard> o (in_place_init);
BOOST_TEST(o);
BOOST_TEST(0 == o->which_ctor);
}
{
optional<Guard> o (in_place_init, i, 2.0);
BOOST_TEST(o);
BOOST_TEST(1 == o->which_ctor);
}
{
optional<Guard> o (in_place_init, 1, d);
BOOST_TEST(o);
BOOST_TEST(2 == o->which_ctor);
}
{
optional<Guard> o (in_place_init, 1, 2.0);
BOOST_TEST(o);
BOOST_TEST(3 == o->which_ctor);
}
{
optional<Guard> o (in_place_init, i, d);
BOOST_TEST(o);
BOOST_TEST(4 == o->which_ctor);
}
{
optional<Guard> o (in_place_init, cs);
BOOST_TEST(o);
BOOST_TEST(5 == o->which_ctor);
}
{
optional<Guard> o (in_place_init, ms);
BOOST_TEST(o);
BOOST_TEST(6 == o->which_ctor);
}
{
optional<Guard> o (in_place_init, std::string());
BOOST_TEST(o);
BOOST_TEST(7 == o->which_ctor);
}
}
void test_in_place_if_ctor()
{
int i = 0;
double d = 0.0;
const std::string cs;
std::string ms;
{
optional<Guard> o (in_place_init_if, true);
BOOST_TEST(o);
BOOST_TEST(0 == o->which_ctor);
}
{
optional<Guard> o (in_place_init_if, true, i, 2.0);
BOOST_TEST(o);
BOOST_TEST(1 == o->which_ctor);
}
{
optional<Guard> o (in_place_init_if, true, 1, d);
BOOST_TEST(o);
BOOST_TEST(2 == o->which_ctor);
}
{
optional<Guard> o (in_place_init_if, true, 1, 2.0);
BOOST_TEST(o);
BOOST_TEST(3 == o->which_ctor);
}
{
optional<Guard> o (in_place_init_if, true, i, d);
BOOST_TEST(o);
BOOST_TEST(4 == o->which_ctor);
}
{
optional<Guard> o (in_place_init_if, true, cs);
BOOST_TEST(o);
BOOST_TEST(5 == o->which_ctor);
}
{
optional<Guard> o (in_place_init_if, true, ms);
BOOST_TEST(o);
BOOST_TEST(6 == o->which_ctor);
}
{
optional<Guard> o (in_place_init_if, true, std::string());
BOOST_TEST(o);
BOOST_TEST(7 == o->which_ctor);
}
{
optional<Guard> o (in_place_init_if, false, 1, 2.0);
BOOST_TEST(!o);
}
}
#endif
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
struct ThrowOnMove
{
ThrowOnMove(ThrowOnMove&&) { throw int(); }
ThrowOnMove(ThrowOnMove const&) { throw int(); }
ThrowOnMove(int){}
};
void test_no_moves_on_emplacement()
{
try {
optional<ThrowOnMove> o;
o.emplace(1);
BOOST_TEST(o);
}
catch (...) {
BOOST_TEST(false);
}
}
void test_no_moves_on_in_place_ctor()
{
try {
optional<ThrowOnMove> o (in_place_init, 1);
BOOST_TEST(o);
optional<ThrowOnMove> p (in_place_init_if, true, 1);
BOOST_TEST(p);
optional<ThrowOnMove> q (in_place_init_if, false, 1);
BOOST_TEST(!q);
}
catch (...) {
BOOST_TEST(false);
}
}
#endif
struct Thrower
{
Thrower(bool throw_) { if (throw_) throw int(); }
private:
Thrower(Thrower const&);
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
Thrower(Thrower&&);
#endif
};
void test_clear_on_throw()
{
optional<Thrower> ot;
try {
ot.emplace(false);
BOOST_TEST(ot);
} catch(...) {
BOOST_TEST(false);
}
try {
ot.emplace(true);
BOOST_TEST(false);
} catch(...) {
BOOST_TEST(!ot);
}
}
void test_no_assignment_on_emplacement()
{
optional<const std::string> os, ot;
BOOST_TEST(!os);
os.emplace("wow");
BOOST_TEST(os);
BOOST_TEST_EQ(*os, "wow");
BOOST_TEST(!ot);
ot.emplace();
BOOST_TEST(ot);
BOOST_TEST_EQ(*ot, "");
}
namespace no_rvalue_refs {
class Guard
{
public:
int which_ctor;
Guard () : which_ctor(0) { }
Guard (std::string const&) : which_ctor(5) { }
Guard (std::string &) : which_ctor(6) { }
private:
Guard(Guard const&);
void operator=(Guard const&);
};
void test_emplace()
{
const std::string cs;
std::string ms;
optional<Guard> o;
o.emplace();
BOOST_TEST(o);
BOOST_TEST(0 == o->which_ctor);
o.emplace(cs);
BOOST_TEST(o);
BOOST_TEST(5 == o->which_ctor);
o.emplace(ms);
BOOST_TEST(o);
BOOST_TEST(6 == o->which_ctor);
}
void test_in_place_ctor()
{
const std::string cs;
std::string ms;
{
optional<Guard> o (in_place_init);
BOOST_TEST(o);
BOOST_TEST(0 == o->which_ctor);
}
{
optional<Guard> o (in_place_init, cs);
BOOST_TEST(o);
BOOST_TEST(5 == o->which_ctor);
}
{
optional<Guard> o (in_place_init, ms);
BOOST_TEST(o);
BOOST_TEST(6 == o->which_ctor);
}
}
void test_in_place_if_ctor()
{
const std::string cs;
std::string ms;
{
optional<Guard> n (in_place_init_if, false);
BOOST_TEST(!n);
optional<Guard> o (in_place_init_if, true);
BOOST_TEST(o);
BOOST_TEST(0 == o->which_ctor);
}
{
optional<Guard> n (in_place_init_if, false, cs);
BOOST_TEST(!n);
optional<Guard> o (in_place_init_if, true, cs);
BOOST_TEST(o);
BOOST_TEST(5 == o->which_ctor);
}
{
optional<Guard> n (in_place_init_if, false, ms);
BOOST_TEST(!n);
optional<Guard> o (in_place_init_if, true, ms);
BOOST_TEST(o);
BOOST_TEST(6 == o->which_ctor);
}
}
} // namespace no_rvalue_ref
int main()
{
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
test_emplace();
test_in_place_ctor();
test_in_place_if_ctor();
#endif
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
test_no_moves_on_emplacement();
test_no_moves_on_in_place_ctor();
#endif
test_clear_on_throw();
test_no_assignment_on_emplacement();
no_rvalue_refs::test_emplace();
no_rvalue_refs::test_in_place_ctor();
no_rvalue_refs::test_in_place_if_ctor();
return boost::report_errors();
}
|
davehorton/drachtio-server
|
deps/boost_1_77_0/libs/optional/test/optional_test_emplace.cpp
|
C++
|
mit
| 8,130
|
<?php
return [
'additional_fields'=> 'Additional Fields',
'category' => 'Categoria Articolo',
'content' => 'Contenuto Articolo',
'details' => 'Dettagli Articolo',
'excerpt' => 'Estratto <small>Piccola descrizione di questo articolo</small>',
'image' => 'Immagine Articolo',
'meta_description' => 'Meta Description',
'meta_keywords' => 'Meta Keywords',
'new' => 'Crea Nuovo Articolo',
'seo_content' => 'Contenuto SEO',
'seo_title' => 'Titolo SEO',
'slug' => 'URL slug',
'status' => 'Stato Articolo',
'status_draft' => 'bozza',
'status_pending' => 'in attesa',
'status_published' => 'pubblicato',
'title' => 'Titolo Articolo',
'title_sub' => 'Il titolo per il tuo articolo',
'update' => 'Aggiorna Articolo',
];
|
the-control-group/voyager
|
publishable/lang/it/post.php
|
PHP
|
mit
| 916
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Mon Oct 07 06:41:31 UTC 2013 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Uses of Class org.apache.hadoop.mapred.SequenceFileInputFilter (Apache Hadoop Main 2.2.0 API)
</TITLE>
<META NAME="date" CONTENT="2013-10-07">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.apache.hadoop.mapred.SequenceFileInputFilter (Apache Hadoop Main 2.2.0 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/apache/hadoop/mapred/SequenceFileInputFilter.html" title="class in org.apache.hadoop.mapred"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/hadoop/mapred//class-useSequenceFileInputFilter.html" target="_top"><B>FRAMES</B></A>
<A HREF="SequenceFileInputFilter.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>org.apache.hadoop.mapred.SequenceFileInputFilter</B></H2>
</CENTER>
No usage of org.apache.hadoop.mapred.SequenceFileInputFilter
<P>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/apache/hadoop/mapred/SequenceFileInputFilter.html" title="class in org.apache.hadoop.mapred"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/hadoop/mapred//class-useSequenceFileInputFilter.html" target="_top"><B>FRAMES</B></A>
<A HREF="SequenceFileInputFilter.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 2013 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>
|
ashish-17/playback
|
hadoop-2.2.0/share/doc/hadoop/api/org/apache/hadoop/mapred/class-use/SequenceFileInputFilter.html
|
HTML
|
mit
| 6,240
|
//Logged in
function checkRestricted (UserService, $q, $location) {
var deferred = $q.defer();
if (UserService.getToken()) {
deferred.resolve();
} else {
deferred.reject();
$location.url('/');
}
return deferred.promise;
}
function checkedLoggedIn (UserService, $q, $location) {
var deferred = $q.defer();
if (!UserService.getToken()) {
deferred.resolve();
} else {
deferred.reject();
$location.url('/tasks');
}
return deferred.promise;
}
//Bootstrapping the app
angular.module('TasksApp', ['ngMaterial','LocalStorageModule','ngRoute', 'ngMessages'])
//Routes
.config(['$routeProvider', function($routeProvider){
$routeProvider
.when('/',
{
templateUrl:'views/login.html',
resolve: {
'loggedIn': ['UserService', '$q', '$location', checkedLoggedIn]
}
}
)
.when('/signup',
{
templateUrl:'views/signup.html',
resolve: {
'loggedIn': ['UserService', '$q', '$location', checkedLoggedIn]
}
}
)
.when('/tasks',
{
templateUrl:'views/tasks.html',
controller: 'TasksCtrl as tc',
resolve: {
'loggedIn': ['UserService', '$q', '$location', checkRestricted]
}
}
)
.otherwise({redirectTo:'/'});
/*
resolve: {
'check': function(UserService,$location) {
if (UserService.getUserToken()) {
return true;
}
$location.path('/');
return false;
}
}
*/
}])
//Themes
.config(['$mdThemingProvider',function($mdThemingProvider) {
$mdThemingProvider.theme('default')
.primaryPalette('blue-grey')
.accentPalette('light-green')
.backgroundPalette('blue-grey');
// .dark();
}]);
|
danielfbm/thrift-demo
|
client/app/scripts/app.js
|
JavaScript
|
mit
| 1,779
|
import os
import json
from nose.tools import assert_equal
from .project import load_lsdsng
from .utils import temporary_file
SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
def _test_load_store_instrument(source_lsdsng, lsdinst_path, original_index):
proj = load_lsdsng(source_lsdsng)
proj.song.instruments.import_from_file(0x2a, lsdinst_path)
target_instr = proj.song.instruments[0x2a]
original_instr = proj.song.instruments[original_index]
assert_equal(original_instr, target_instr)
with temporary_file() as tmpfile:
original_instr.export_to_file(tmpfile)
with open(tmpfile, 'r') as fp:
saved_inst = json.load(fp)
with open(lsdinst_path, 'r') as fp:
original_inst = json.load(fp)
assert_equal(original_inst, saved_inst)
def test_load_store_wave_instrument():
_test_load_store_instrument(
os.path.join(SCRIPT_DIR, 'test_data', 'UNTOLDST.lsdsng'),
os.path.join(SCRIPT_DIR, 'test_data', 'UNTOLDST_0x00_wave.lsdinst'),
0x00)
def test_load_store_pulse_instrument():
_test_load_store_instrument(
os.path.join(SCRIPT_DIR, 'test_data', 'UNTOLDST.lsdsng'),
os.path.join(SCRIPT_DIR, 'test_data', 'UNTOLDST_0x03_pulse.lsdinst'),
0x03)
def test_load_store_kit_instrument():
_test_load_store_instrument(
os.path.join(SCRIPT_DIR, 'test_data', 'UNTOLDST.lsdsng'),
os.path.join(SCRIPT_DIR, 'test_data', 'UNTOLDST_0x16_kit.lsdinst'),
0x16)
def test_load_store_noise_instrument():
_test_load_store_instrument(
os.path.join(SCRIPT_DIR, 'test_data', 'ANNARKTE.lsdsng'),
os.path.join(SCRIPT_DIR, 'test_data', 'ANNARKTE_0x06_noise.lsdinst'),
0x06)
def test_load_store_arduinoboy():
_test_load_store_instrument(
os.path.join(SCRIPT_DIR, 'test_data', 'ARDBOYxx.lsdsng'),
os.path.join(SCRIPT_DIR, 'test_data', 'MIDI.lsdinst'),
0x01)
|
alexras/pylsdj
|
pylsdj/test_instrument.py
|
Python
|
mit
| 1,954
|
<html>
<META HTTP-EQUIV=Content-Type Content="text/html; charset=big5">
<!-- Mirrored from lis.ly.gov.tw/lghtml/lawstat/version2/90027/9002761012500.htm by HTTrack Website Copier/3.x [XR&CO'2010], Sun, 24 Mar 2013 09:27:02 GMT -->
<head><title>ªk½s¸¹:90027 ª©¥»:061012500</title>
<link rel="stylesheet" type="text/css" href="../../version.css" >
</HEAD>
<body><left>
<table><tr><td><FONT COLOR=blue SIZE=5>¤ÀÃþ¾¦ì¤½°È¤Hû¦Ò¸Õªk(90027)</font>
<table><tr><td> </td><td>
<table><tr><td> </td><td>
<table><tr><td> </td>
<tr><td align=left valign=top>
<a href=9002756052300.html target=law90027><nobr><font size=2>¤¤µØ¥Á°ê 56 ¦~ 5 ¤ë 23 ¤é</font></nobr></a>
</td>
<td valign=top><font size=2>¨î©w16±ø</font></td>
<tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 56 ¦~ 6 ¤ë 8 ¤é¤½¥¬</font></nobr></td>
<tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 57 ¦~ 1 ¤ë 15 ¤é¬I¦æ</font></nobr></td>
<tr><td align=left valign=top>
<a href=9002757042600.html target=law90027><nobr><font size=2>¤¤µØ¥Á°ê 57 ¦~ 4 ¤ë 26 ¤é</font></nobr></a>
</td>
<td valign=top><font size=2>×¥¿²Ä1±ø</font></td>
<tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 57 ¦~ 5 ¤ë 9 ¤é¤½¥¬</font></nobr></td>
<tr><td align=left valign=top>
<a href=9002758080500.html target=law90027><nobr><font size=2>¤¤µØ¥Á°ê 58 ¦~ 8 ¤ë 5 ¤é</font></nobr></a>
</td>
<td valign=top><font size=2>×¥¿²Ä1, 3, 4, 8, 12±ø</font></td>
<tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 58 ¦~ 8 ¤ë 25 ¤é¤½¥¬</font></nobr></td>
<tr><td align=left valign=top>
<a href=9002761012500.html target=law90027><nobr><font size=2>¤¤µØ¥Á°ê 61 ¦~ 1 ¤ë 25 ¤é</font></nobr></a>
</td>
<td valign=top><font size=2>×¥¿²Ä3, 4±ø</font></td>
<tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 61 ¦~ 2 ¤ë 5 ¤é¤½¥¬</font></nobr></td>
<tr><td align=left valign=top>
<a href=9002767101700.html target=law90027><nobr><font size=2>¤¤µØ¥Á°ê 67 ¦~ 10 ¤ë 17 ¤é</font></nobr></a>
</td>
<td valign=top><font size=2>×¥¿²Ä3, 4±ø<br>
¼Wq²Ä3¤§1±ø</font></td>
<tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 67 ¦~ 10 ¤ë 27 ¤é¤½¥¬</font></nobr></td>
<tr><td align=left valign=top>
<nobr><font size=2>¤¤µØ¥Á°ê 75 ¦~ 1 ¤ë 10 ¤é</font></nobr>
</td>
<td valign=top><font size=2>¼o¤î17±ø</font></td>
<tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 75 ¦~ 1 ¤ë 24 ¤é¤½¥¬</font></nobr></td>
</table></table></table></table>
<p><table><tr><td><font color=blue size=4>¥Á°ê61¦~1¤ë25¤é(«D²{¦æ±ø¤å)</font></td>
<td><a href=http://lis.ly.gov.tw/lghtml/lawstat/reason2/9002761012500.htm target=reason><font size=2>¥ßªk²z¥Ñ</font></a></td>
<td><a href=http://lis.ly.gov.tw/lgcgi/lglawproc?9002761012500 target=proc><font size=2>¥ßªk¬ö¿ý</font></a></td>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤@±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@¤ÀÃþ¾¦ì¤½°È¤Hû¤§¦Ò¸Õ¡A¨Ì¥»ªk¦æ¤§¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤G±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@¤ÀÃþ¾¦ì¤½°È¤Hû¤§¦Ò¸Õ¡AÀ³¥»¬°¨Æ¾Ü¤H¡A¦Ò¥Î¦X¤@¤§¦®¡A¥H¤½¶}Ävª§¤è¦¡¦æ¤§¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤T±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@¤ÀÃþ¾¦ì¤½°È¤Hûªì¥ô¦Ò¸Õ¡A¨Ì¾¨t¤À¤Q¾µ¥Á|¦æ¡A¨äÀ³¦Ò¸ê®æ¦p¥ª¡G<br>
¡@¡@¤@¡B¨ã¦³°ê¥Á¤¤¾Ç¦Pµ¥¾Ç¤OªÌ¡A±oÀ³²Ä¤@¾µ¥¦Ò¸Õ¡C<br>
¡@¡@¤G¡B°ê¥Á¤¤¾Ç¡Bªì¯Å¤¤µ¥¾Ç®Õ²¦·~¡A©Î´¿¥ô²Ä¤@¾µ¥Â¾°Èº¡¤T¦~¡A¦ÒÁZ¦¨ÁZÀu¨}ªÌ¡A±oÀ³²Ä¤G¾µ¥¦Ò¸Õ¡C<br>
¡@¡@¤T¡B°ª¯Å¤¤µ¥¾Ç®Õ²¦·~¡A©Î¦P¾µ¥ÀË©w¦Ò¸Õ¤Î®æ¡A©Î´¿¥ô²Ä¤G¾µ¥Â¾°Èº¡¤T¦~¡A¦ÒÁZ¦¨ÁZÀu¨}ªÌ¡A±oÀ³²Ä¤T¾µ¥¦Ò¸Õ¡C<br>
¡@¡@¥|¡B±M¬ì¾Ç®Õ¦³Ãö¾Ç¬ì²¦·~©Î¦P¾µ¥ÀË©w¦Ò¸Õ¤Î®æªÌ¡A©Î´¿¥ô²Ä¥|¾µ¥Â¾°Èº¡¤T¦~¡A¦ÒÁZ¦¨ÁZÀu¨}ªÌ¡A±oÀ³²Ä¤Â¾µ¥¦Ò¸Õ¡C<br>
¡@¡@¤¡B¤j¾Ç¦³Ãö¾Ç¨t²¦·~ªÌ¡A±oÀ³²Ä¤»Â¾µ¥¦Ò¸Õ¡A¨äݦ³¤G¦~¥H¤WªA°È¦~¸êªÌ¡A±oÀ³²Ä¤C¾µ¥¦Ò¸Õ¡C<br>
¡@¡@¤»¡B¬ã¨s°|¡B©Ò¦³Ãö¾Ç¨t²¦·~¡A±o¦³ºÓ¤h¾Ç¦ìªÌ¡A±oÀ³²Ä¤K¾µ¥¦Ò¸Õ¡C<br>
¡@¡@¤C¡B¬ã¨s°|¡B©Ò¦³Ãö¾Ç¨t²¦·~¡A±o¦³³Õ¤h¾Ç¦ì¡A©Î±o¦³ºÓ¤h¾Ç¦ì¨Ã¦³¤G¦~¥H¤WªA°È¦~¸êªÌ¡A±oÀ³²Ä¤E¾µ¥¦Ò¸Õ¡C<br>
¡@¡@¤K¡B¬ã¨s°|¡B©Ò¦³Ãö¾Ç¨t²¦·~¡A±o¦³³Õ¤h¾Ç¦ì¡A¨Ã¥ô±M§ð¾Ç¬ì¦³Ãö¤u§@¤G¦~¥H¤W¡A¦¨ÁZÀu¨}ªÌ¡A©Î±o¦³ºÓ¤h¾Ç¦ì¡A¨Ã¥ô±M§ð¾Ç¬ì¦³Ãö¤u§@¥|¦~¥H¤W¡A¦¨ÁZÀu¨}ªÌ¡A©Î¤j¾Ç¦³Ãö¾Ç¨t²¦·~¡A¨Ã¥ô±M§ð¾Ç¬ì¦³Ãö¤u§@¤»¦~¥H¤W¡A¦¨ÁZÀu¨}ªÌ¡A©Î´¿¥ô¤½¥ß©Î¥ß®×¤§¨p¥ß±M¬ì¥H¤W¾Ç®Õ±Ð±Â©Î¦³´¿¥ô°Æ±Ð±Â¤G¦~¥H¤W¡A¸g±Ð¨|³¡¼f¬d¦X®æªÌ¡A±oÀ³²Ä¤Q¾µ¥¦Ò¸Õ¡C<br>
¡@¡@¤E¡B¬ã¨s°|¡B©Ò¦³Ãö¾Ç¨t²¦·~¡A±o¦³³Õ¤h¾Ç¦ì¡A¨Ã¥ô±M§ð¾Ç¬ì¦³Ãö¤u§@¥|¦~¥H¤W¡A¦¨ÁZÀu¨}ªÌ¡A©Î±o¦³ºÓ¤h¾Ç¦ì¡A¨Ã¥ô±M§ð¾Ç¬ì¦³Ãö¤u§@¤»¦~¥H¤W¦¨ÁZÀu¨}ªÌ¡A©Î´¿¥ô¤½¥ß©Î¥ß®×¤§¨p¥ß±M¬ì¥H¤W¾Ç®Õ±Ð±Â©Î´¿¥ô°Æ±Ð±Â¥|¦~¥H¤W¡A¸g±Ð¨|³¡¼f¬d¦X®æªÌ¡A±oÀ³²Ä¤Q¤@¾µ¥¦Ò¸Õ¡C<br>
¡@¡@«e¶µÀ³²Ä¤T¡B²Ä¤Â¾µ¥¦Ò¸Õ¤§ÀË©w¦Ò¸Õ¡A¨ä³W«h¥Ñ¦Ò¸Õ°|©w¤§¡C<br>
¡@¡@<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¥|±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@¤ÀÃþ¾¦ì¤½°È¤Hû¦Ò¸Õ¡A±o´Nµ§¸Õ¡B¤f¸Õ¡B´ú¸Õ¡B¹ê¦a¦Ò¸Õ¤ÎµÛ§@¡Bµo©ú¼f¬dµ¥¤è¦¡¡A¿ï¾ÜÁ|¦æ¡C°£µ§¸Õ±o±Ä¥Î¤@ºØ¤è¦¡¥~¡A¨ä¥LÀ³¥H¤GºØ¥H¤W¤è¦¡¦æ¤§¡C<br>
¡@¡@¤ÀÃþ¾¦ì¤½°È¤Hû¦Ò¸Õ²Ä¤E¾µ¥¥H¤W¤§¦Ò¸Õ¡A±o¥HµÛ§@¡Bµo©ú¼f¬d¤Î¤f¸Õ¤è¦¡Á|¦æ¡A©Î¥HÀËòò¦æ¤§¡A¨äÀËòò¿ìªk¡A¥Ñ¦Ò¸Õ°|©w¤§¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@¤ÀÃþ¾¦ì¤½°È¤Hû¦Ò¸Õ¤§À³¸Õ¬ì¥Ø¡A¥Ñ¦Ò¸Õ°|°Ñ·Ó¾¯Å³W½d©Ò©w¤§¸ê®æ±ø¥ó¡A¤Î±Mªùª¾¯à¡A¤À§O©w¤§¡CÀ³¦Ò¤H¤§¦~ÄÖ¡A¥Ñ¦Ò¸Õ°|¨Ì¾µ¥Â¾¨t¤§»Ýn©w¤§¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤»±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@¤ÀÃþ¾¦ì¤½°È¤Hû¦Ò¸Õ¡AÀ³¦Ò¤H©ó¦Ò¸Õ«eÀ³¨üÅ鮿Àˬd¡F¤£¦X®æªÌ¡A¤£±oÀ³¦Ò¡C<br>
¡@¡@Å鮿Àˬd¼Ð·Ç¡A¥Ñ¦Ò¸Õ°|©w¤§¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤C±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@¤¤µØ¥Á°ê°ê¥Á¨ã¦³¥»ªk©Ò©wÀ³¦Ò¸ê®æªÌ¡A±oÀ³¥»ªk¤§¦Ò¸Õ¡C¦ý¦³¥ª¦C¦U´Ú±¡¨Æ¤§¤@ªÌ¡A¤£±oÀ³¦Ò¡G<br>
¡@¡@¤@¡B¥Ç¤º¶Ã¸o¡B¥~±w¸o¡A¸g§P¨M½T©wªÌ¡C<br>
¡@¡@¤G¡B´¿ªA¤½°È¦³«I¥e¤½¦³°]ª«©Î¦¬¨ü¸ì¸ï¦æ¬°¡A¸g§P¨M½T©wªÌ¡C<br>
¡@¡@¤T¡B¿É¹Ü¤½Åv¡A©|¥¼´_ÅvªÌ¡C<br>
¡@¡@¥|¡B¨ü¸Tªv²£¤§«Å§i¡A©|¥¼ºM¾PªÌ¡C<br>
¡@¡@¤¡B§l¥Î¾~¤ù©Î¨ä¥N¥Î«~ªÌ¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤K±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@Á|¦æ¤ÀÃþ¾¦ì¤½°È¤Hû¦Ò¸Õ¡A¨ä¦Ò¸Õ¾µ¥¡BÃþ¬ì¤Î¿ý¨ú¤H¼Æ¡AÀ³®Ú¾Ú¥ô¥Î¾÷Ãö¤§»Ýn©w¤§¡C<br>
¡@¡@«e¶µ¦Ò¸Õ±o¦X¨Ö©Î¤À§O¿ì²z¡A¨Ã±o¤À¸ÕÁ|¦æ¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤E±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@Á|¦æ¤ÀÃþ¾¦ì¤½°È¤Hû¦Ò¸Õ®É¡A²Õ´¨å¸Õ©eû·|¡A¥D«ù¨å¸Õ¨Æ©y¡C¦Ò¸Õ°|»{¬°¥²n®É¡A±o¤£²Õ´¨å¸Õ©eû·|¡A¥Ñ°|¬£û©Î¥æ¥Ñ¦Ò¿ï¾÷Ãö¡A©Î©e°U¦³Ãö¾÷Ãö¿ì²z¤§¡C<br>
¡@¡@¤ÀÃþ¾¦ì¤½°È¤Hû¨å¸Õªk¥t©w¤§¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@Á|¦æ¤ÀÃþ¾¦ì¤½°È¤Hû¦Ò¸Õ¡A²Õ´¨å¸Õ©eû·|®É¡A¥ÑºÊ¹î°|¬£ûºÊ¸Õ¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¤@±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@¹ï©ó¦Ò¸Õ¤Î®æ¤Hû¡A¨Æ«áµo²{¦³²Ä¤C±ø¦U´Ú±¡¨Æ¤§¤@¡A©Î«_¦W¡B©Î¼ç³qÃö¸`¡B©Î°°³y¡BÅܳyÃҥ󱡨ƪ̡A¥Ñ¦Ò¸Õ°|ºM¾P¨ä¦Ò¸Õ¤Î®æ¸ê®æ¡A¨Ã½Õ¾P¨ä¤Î®æÃҮѡF¦p¯A¤Î¦D¨Æ¡A±o²¾°eªk°|¿ì²z¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¤G±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@ªì¥ô¦Ò¸Õ¤Î®æ¤Hû¡A±oµøÂ¾µ¥¡B¾¨t¤§»Ýn¡A¤©¥H¹ê²ß©Î°V½m¡F¨ä¿ìªk¥Ñ¦Ò¸Õ°|·|¦P¦³Ãö¾÷Ãö©w¤§¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¤T±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@Á|¦æ¤ÀÃþ¾¦ì¤½°È¤Hû¦Ò¸Õ®É¡A¨ä¦Ò¸Õ¾µ¥¡B¾¨t¡B¦aÂI¤Î¤é´Áµ¥¡AÀ³¥Ñ¿ì²z¦Ò¸Õ¾÷Ãö©ó¸Õ´Á«e¤½§i¤§¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¥|±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@¤½Àç¨Æ·~¾÷ºc¤ÀÃþ¾¦ì¤Hû¤§¦Ò¸Õ¡A¥t¥Hªk«ß©w¤§¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¤±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@¥»ªk¬I¦æ²Ó«h¡A¥Ñ¦Ò¸Õ°|©w¤§¡C<br>
</td>
</table>
</table>
<table><tr><td> </td><td><font color=8000ff>²Ä¤Q¤»±ø</font>
</font>
<table><tr><td> </td>
<td>
¡@¡@¥»ªk¬I¦æ¤é´Á¡A¥H©R¥O©w¤§¡C<br>
</td>
</table>
</table>
</left>
</body>
<!-- Mirrored from lis.ly.gov.tw/lghtml/lawstat/version2/90027/9002761012500.htm by HTTrack Website Copier/3.x [XR&CO'2010], Sun, 24 Mar 2013 09:27:02 GMT -->
</html>
|
czchen/laweasyread-data
|
rawdata/lawstat/version2/90027/9002761012500.html
|
HTML
|
mit
| 8,703
|
---
layout: post
title: 'About Me: Lauren Haldeman'
date: 2015-09-08 15:53:33.000000000 -05:00
type: post
published: true
status: publish
categories:
- Bios
tags: []
meta:
_wpas_done_all: '1'
sharing_disabled: '1'
_rest_api_published: '1'
_rest_api_client_id: '-1'
_publicize_job_id: '14567138500'
geo_public: '0'
_thumbnail_id: '155'
_mk_post_love: '0'
_theme_options_build: ''
_dynamic_styles: Tjs=
author:
login: wlftn
email: laurenhaldeman@yahoo.com
display_name: lauren
first_name: Lauren
last_name: ''
---
<p><a href="https://uiowafys.files.wordpress.com/2015/09/lauren-haldeman.jpg"><img class="alignleft wp-image-130 size-medium" src="{{ site.baseurl }}/assets/lauren-haldeman.jpg?w=300" alt="lauren-haldeman" width="300" height="200" /></a>Hi! I’m Lauren Haldeman. I am the author of the poetry collection <em>Calenday</em> (Rescue Press, 2014). I work as the web developer, web designer and editor for this website, as well as several other websites, including the Writing University website at the University of Iowa and the Iowa Review. I received my M.F.A. from the Iowa Writers’ Workshop, and have been a finalist for the Walt Whitman award and the Colorado Prize for Poetry. Also: I’m a mom and make paintings.</p>
<p><a href="https://uiowafys.files.wordpress.com/2015/09/11296880_494105167418084_141088528_n.jpg"><img class="alignleft wp-image-155 size-medium" src="{{ site.baseurl }}/assets/11296880_494105167418084_141088528_n.jpg?w=300" alt="11296880_494105167418084_141088528_n" width="300" height="300" /></a>I also play soccer. I played semi-professionally all through high school, on three different teams. When I was 17, I had a collision with a goalie and lost the PCL in my right knee. It took a long time to heal and begin playing again.</p>
<div class="clearboth"></div>
|
wlftn/wlftn.github.io
|
_posts/2015-09-08-about-me-lauren-haldeman.html
|
HTML
|
mit
| 1,838
|
#silly_blocks.rb
def reverser
array = yield.split(' ')
array.map! {|word| word.reverse}
array.join(' ')
end
def adder(a = 1)
yield + a
end
def repeater(n = 1)
n.times do
yield
end
end
|
nleoutsa/Ruby_TDD
|
05_silly_blocks/silly_blocks.rb
|
Ruby
|
mit
| 197
|
<!DOCTYPE html>
<html lang='en'>
<head>
<title>VPKVeepEditorDelegate Protocol Reference</title>
<link rel='stylesheet' type='text/css' href='../css/jazzy.css' />
<link rel='stylesheet' type='text/css' href='../css/highlight.css' />
<meta charset='utf-8'>
<script src='../js/jquery.min.js' defer></script>
<script src='../js/jazzy.js' defer></script>
</head>
<body>
<a name='//apple_ref/objc/Protocol/VPKVeepEditorDelegate' class='dashAnchor'></a>
<a title='VPKVeepEditorDelegate Protocol Reference'></a>
<header class='header'>
<p class='header-col header-col--primary'>
<a class='header-link' href='../index.html'>
VPKit Docs
</a>
(47% documented)
</p>
<p class='header-col header-col--secondary'>
<a class='header-link' href='https://github.com/veepionyc/VPKitDemo/tree/2.6.3'>
<img class='header-icon' src='../img/gh.png'/>
View on GitHub
</a>
</p>
</header>
<p class='breadcrumbs'>
<a class='breadcrumb' href='../index.html'>VPKit Reference</a>
<img class='carat' src='../img/carat.png' />
VPKVeepEditorDelegate Protocol Reference
</p>
<div class='content-wrapper'>
<nav class='navigation'>
<ul class='nav-groups'>
<li class='nav-group-name'>
<a class='nav-group-name-link' href='../Classes.html'>Classes</a>
<ul class='nav-group-tasks'>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKApp.html'>VPKApp</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKColorStyles.html'>VPKColorStyles</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKDevice.html'>VPKDevice</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKEnvironment.html'>VPKEnvironment</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKFontStyles.html'>VPKFontStyles</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKImage.html'>VPKImage</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKPreview.html'>VPKPreview</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKPublicVeep.html'>VPKPublicVeep</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKSdk.html'>VPKSdk</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKStyles.html'>VPKStyles</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKUser.html'>VPKUser</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKVeepEditor.html'>VPKVeepEditor</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKVeepViewer.html'>VPKVeepViewer</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Classes/VPKit.html'>VPKit</a>
</li>
</ul>
</li>
<li class='nav-group-name'>
<a class='nav-group-name-link' href='../Constants.html'>Constants</a>
<ul class='nav-group-tasks'>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoComplete'>VPKEventVideoComplete</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoFramesPerSecondKey'>VPKEventVideoFramesPerSecondKey</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoLoad'>VPKEventVideoLoad</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoNumberOfDroppedVideoFrames'>VPKEventVideoNumberOfDroppedVideoFrames</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoObservedBitrateKey'>VPKEventVideoObservedBitrateKey</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoPause'>VPKEventVideoPause</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoPlay'>VPKEventVideoPlay</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoPlayRequested'>VPKEventVideoPlayRequested</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoPlaybackBitrateKey'>VPKEventVideoPlaybackBitrateKey</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoPlaybackTypeKey'>VPKEventVideoPlaybackTypeKey</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoSeekComplete'>VPKEventVideoSeekComplete</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoSeekStart'>VPKEventVideoSeekStart</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoStartupTimeKey'>VPKEventVideoStartupTimeKey</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKEventVideoUnload'>VPKEventVideoUnload</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@VPKIdentifierKey'>VPKIdentifierKey</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@vpkErrorKey'>vpkErrorKey</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@vpkErrorNotification'>vpkErrorNotification</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Constants.html#/c:@vpkPresentErrorKey'>vpkPresentErrorKey</a>
</li>
</ul>
</li>
<li class='nav-group-name'>
<a class='nav-group-name-link' href='../Enumerations.html'>Enumerations</a>
<ul class='nav-group-tasks'>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Enums/VPKServerEnvironment.html'>VPKServerEnvironment</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Enums/VPKUserType.html'>VPKUserType</a>
</li>
</ul>
</li>
<li class='nav-group-name'>
<a class='nav-group-name-link' href='../Protocols.html'>Protocols</a>
<ul class='nav-group-tasks'>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Protocols/VPKPreviewDelegate.html'>VPKPreviewDelegate</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Protocols/VPKPreviewPassThroughDelegate.html'>VPKPreviewPassThroughDelegate</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Protocols/VPKVeepEditorDelegate.html'>VPKVeepEditorDelegate</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Protocols/VPKVeepViewerDelegate.html'>VPKVeepViewerDelegate</a>
</li>
</ul>
</li>
<li class='nav-group-name'>
<a class='nav-group-name-link' href='../Type Definitions.html'>Type Definitions</a>
<ul class='nav-group-tasks'>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Type Definitions.html#/c:VPKitClass.h@T@VPKBOOLErrorBlock'>VPKBOOLErrorBlock</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Type Definitions.html#/c:VPKitClass.h@T@VPKCompetitiveStatsBlock'>VPKCompetitiveStatsBlock</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Type Definitions.html#/c:VPKitClass.h@T@VPKDailyStatsBlock'>VPKDailyStatsBlock</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Type Definitions.html#/c:VPKitClass.h@T@VPKNetworkResponseBlock'>VPKNetworkResponseBlock</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Type Definitions.html#/c:VPKitClass.h@T@VPKUserStatsErrorBlock'>VPKUserStatsErrorBlock</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Type Definitions.html#/c:VPKitClass.h@T@VPKVeepIdentifierErrorCompletionBlock'>VPKVeepIdentifierErrorCompletionBlock</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Type Definitions.html#/c:VPKitClass.h@T@VPKitConsumerIdCompletionBlock'>VPKitConsumerIdCompletionBlock</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Type Definitions.html#/c:VPKitClass.h@T@VPKitPublicVeepErrorCompletionBlock'>VPKitPublicVeepErrorCompletionBlock</a>
</li>
<li class='nav-group-task'>
<a class='nav-group-task-link' href='../Type Definitions.html#/c:VPKitClass.h@T@VPKitVeepErrorCompletionBlock'>VPKitVeepErrorCompletionBlock</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class='main-content'>
<section class='section'>
<div class='section-content'>
<h1>VPKVeepEditorDelegate</h1>
<div class='declaration'>
<div class='language'>
<pre class="highlight objective_c"><code><span class="k">@protocol</span> <span class="nc">VPKVeepEditorDelegate</span> <span class="o"><</span><span class="n">NSObject</span><span class="o">></span>
<span class="o">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">veepEditor</span><span class="o">:</span><span class="p">(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/VPKVeepEditor.html">VPKVeepEditor</a></span><span class="o">*</span><span class="p">)</span><span class="n">editor</span> <span class="n">didPublishVeep</span><span class="o">:</span><span class="p">(</span><span class="n">nonnull</span> <span class="n">NSString</span><span class="o">*</span><span class="p">)</span><span class="n">veepId</span><span class="p">;</span>
<span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">veepEditorDidCancel</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/VPKVeepEditor.html">VPKVeepEditor</a></span><span class="o">*</span><span class="p">)</span><span class="nv">editor</span><span class="p">;</span>
<span class="k">@end</span></code></pre>
</div>
</div>
<p>Undocumented</p>
</div>
</section>
<section class='section'>
<div class='section-content'>
<div class="task-group">
<ul class='item-container'>
<li class="item">
<div class="item-heading">
<code>
<a name="/c:objc(pl)VPKVeepEditorDelegate(im)veepEditor:didPublishVeep:"></a>
<a name="//apple_ref/objc/Method/-veepEditor:didPublishVeep:" class="dashAnchor"></a>
<a class="token" href="#/c:objc(pl)VPKVeepEditorDelegate(im)veepEditor:didPublishVeep:">-veepEditor:didPublishVeep:</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h5>Declaration</h5>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">veepEditor</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/VPKVeepEditor.html">VPKVeepEditor</a></span><span class="o">*</span><span class="p">)</span><span class="nv">editor</span> <span class="nf">didPublishVeep</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSString</span><span class="o">*</span><span class="p">)</span><span class="nv">veepId</span><span class="p">;</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/veepionyc/VPKitDemo/tree/2.6.3/VPKit.framework/Headers/VPKVeepEditor.h#L" class="button">Show on GitHub</a>
</div>
</section>
</div>
</li>
<li class="item">
<div class="item-heading">
<code>
<a name="/c:objc(pl)VPKVeepEditorDelegate(im)veepEditorDidCancel:"></a>
<a name="//apple_ref/objc/Method/-veepEditorDidCancel:" class="dashAnchor"></a>
<a class="token" href="#/c:objc(pl)VPKVeepEditorDelegate(im)veepEditorDidCancel:">-veepEditorDidCancel:</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h5>Declaration</h5>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">veepEditorDidCancel</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Classes/VPKVeepEditor.html">VPKVeepEditor</a></span><span class="o">*</span><span class="p">)</span><span class="nv">editor</span><span class="p">;</span></code></pre>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/veepionyc/VPKitDemo/tree/2.6.3/VPKit.framework/Headers/VPKVeepEditor.h#L" class="button">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
</div>
</section>
</article>
</div>
<section class='footer'>
<p>© 2018 <a class="link" href="https://veep.io" target="_blank" rel="external">Veepio</a>. All rights reserved.</p>
<p>Generated by <a class='link' href='https://github.com/realm/jazzy' target='_blank' rel='external'>jazzy ♪♫ v0.9.1</a>, a <a class='link' href='http://realm.io' target='_blank' rel='external'>Realm</a> project.</p>
</section>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-114402605-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-114402605-1');
</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
<!-- End Google Analytics -->
</body>
</div>
</html>
|
veepionyc/veepionyc.github.io
|
reference/ios/2/6/3/docsets/VPKit.docset/Contents/Resources/Documents/Protocols/VPKVeepEditorDelegate.html
|
HTML
|
mit
| 17,750
|
require_relative '../board'
describe Board do
subject(:board) { Board.new(5,3) }
it { is_expected.to respond_to(:row_count).with(0).arguments }
it { is_expected.to respond_to(:column_count).with(0).arguments }
it { is_expected.to respond_to(:get).with(2).arguments }
it { is_expected.to respond_to(:place).with(3).arguments }
it { is_expected.to respond_to(:remove).with(2).arguments }
describe '.new' do
context 'when dimensions are valid' do
it 'returns an instance of Board' do
board = Board.new(5,3)
expect(board).to be_instance_of(Board)
end
end
context 'when dimensions are not positive' do
it 'raises a DimensionError on row' do
expect {
Board.new(0,10)
}.to raise_error(Board::DimensionError)
end
it 'raises a DimensionError on column' do
expect {
Board.new(10,0)
}.to raise_error(Board::DimensionError)
end
end
end
describe '#row_count' do
it 'returns the number of rows on the board' do
board = Board.new(5,3)
expect(board.row_count).to eq(5)
end
end
describe '#column_count' do
it 'returns the number of columns on the board' do
board = Board.new(5,3)
expect(board.column_count).to eq(3)
end
end
describe '#get' do
let(:board) { Board.new(5,3) }
context 'when dimensions are valid' do
it 'returns nil if cell is empty' do
expect(board.get(0,0)).to eq(nil)
end
it 'returns the value of the specified cell' do
board.place(0,0,'X')
expect(board.get(0,0)).to eq('X')
end
end
context 'when dimensions are too large' do
it 'raises a DimensionError on row' do
expect {
board.get(board.row_count, 0)
}.to raise_error(Board::DimensionError)
end
it 'raises a DimensionError on column' do
expect {
board.get(0, board.column_count)
}.to raise_error(Board::DimensionError)
end
end
end
describe '#place' do
let(:board) { Board.new(5,3) }
context 'when dimensions are valid' do
it 'sets the value of the specified cell' do
expect {
board.place(0,0,'X')
}.to change { board.get(0,0) }.from(nil).to('X')
end
it 'raises a CellError if cell is already occupied' do
expect {
board.place(0,0,'X')
board.place(0,0,'X')
}.to raise_error(Board::CellError)
end
end
context 'when dimensions are too large' do
it 'raises a DimensionError on row' do
expect {
board.place(board.row_count, 0, 'X')
}.to raise_error(Board::DimensionError)
end
it 'raises a DimensionError on column' do
expect {
board.place(0, board.column_count, 'X')
}.to raise_error(Board::DimensionError)
end
end
end
describe '#remove' do
let(:board) { Board.new(5,3) }
context 'when dimensions are valid' do
it 'removes the value from the specified cell' do
board.place(0,0,'X')
expect {
board.remove(0,0)
}.to change { board.get(0,0) }.from('X').to(nil)
end
it 'raises a CellError if cell is already empty' do
expect {
board.remove(0,0)
}.to raise_error(Board::CellError)
end
end
context 'when dimensions are too large' do
it 'raises a DimensionError on row' do
expect {
board.remove(board.row_count, 0)
}.to raise_error(Board::DimensionError)
end
it 'raises a DimensionError on column' do
expect {
board.remove(0, board.column_count)
}.to raise_error(Board::DimensionError)
end
end
end
end
|
chrisswk/pro-engineering-katas
|
week-01/specs/board_spec.rb
|
Ruby
|
mit
| 3,767
|
---
title: Day 33
date: 22:50 07/14/2015
taxonomy:
category: 'Morning Mutty'
tag: [journal]
---
Dear Mutty,
I wrote once this morning but then I accidentally deleted it. No recovery on Facebook...its kind of like you...here one minute, gone the next. Done deal.
===
Today was a good day, Heather. Probably the best alone day I have had since you left. Minimal tears, but then I cried at least once a day before you died so I will look at that as progress.
I have decided that I am just going to take it as it comes for a while. The empty places where you were are okay as empty...and in those places I plan to fill them with things that we talked of doing...or things that will bring this all to a close for me so I can move forward. You know me, not long on patience, eh Mutty? I feel like I should be doing something and not that I am doing nothing but I have never done things for just me, you know? I don't know how to be Karen-centric. So I have some work to do. That's the hardest part I think in all of this- missing you, and having to find me. I don't know if I have ever been Karen-centric in my life.
You know - married at 17, kids at 22... and not that its just me now cuz I still have Dad on a daily basis, but on the alone days it is just me. Being alone never scared me before - I actually remember the first time I had a weekend to myself after you kids came along and the sheer bliss of it ... but now that I see the mortality of all those I love I am scared shitless something will happen to one you and then what... I will go insane, that's what. I cannot take one more major loss in my life.
I call dying next.
Yesterday wasn't a complete loss either. I slept. Jamie cleaned out the car for me over the weekend in hopes it would help me to get in it to drive it. I still can't do it. She left your sweater by my chair so I held it and went to sleep with it on your sofa you slept on for that year you were yellow. I am afraid of the day your scent will be gone even tho someone sprayed it with Fabreeze. I woke up and weeded both flower beds, and watered your tree, and dad and I swam in the murky pool.
Cleaner than the lake...but not as clean as I would like. Stupid iron.
Work is slow, but I think that is actually okay. I am just taking it as it comes...finding my legs again. Taking a few online courses. My heart is in very little these days. How am I gonna find the same passion that I had in helping you to be okay? What a colossal shit sandwich to have to swallow...to work so hard and then you die anyways. Dad and I talked about how if you had died on the last xplant how much easier we think it would have been.
No going back.
I heard the katydids sing for the first time today.... 6 weeks til first frost. I don't mind saying I need the flowers for a lot longer than six weeks before the days turn to snow.
Time will slip by just as fast as it always has...and I wonder Heather, I wonder if the ache I feel in my heart will be as intense ten years from now as it is today? Or will I think in ten years that I am that much closer to seeing you again? I hope I still have the ability to see the glass as half full.
> But I must admit, I miss you quite terribly. The world is too quiet without you nearby. I go to bed early and rise late and I feel as if I have hardly slept." ~<cite> Lemony Snicket</cite>
I love you, Mutty. So much, I love you.
Love, Mom
|
jacknjeanstudios/myempty
|
user/pages/01.blog/day-thirty-three/item.md
|
Markdown
|
mit
| 3,410
|
using Expenses.Data.CommunicationModels;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;
namespace Expenses.Data
{
[DataContract(Name = "ExpenseReportStatus")]
public enum DbExpenseReportStatus
{
[EnumMember]
Submitted,
[EnumMember]
Saved,
[EnumMember]
Approved
}
[DataContract(Name = "ExpenseReport", IsReference = true)]
public class DbExpenseReport
{
public DbExpenseReport()
{
this.Charges = new HashSet<DbCharge>();
}
public DbExpenseReport(ExpenseReport expenseReport)
{
this.Amount = expenseReport.Amount;
this.Approver = expenseReport.Approver;
this.CostCenter = expenseReport.CostCenter;
this.DateResolved = expenseReport.DateResolved;
this.DateSubmitted = expenseReport.DateSubmitted;
this.EmployeeId = expenseReport.EmployeeId;
this.ExpenseReportId = expenseReport.ExpenseReportId;
this.Notes = expenseReport.Notes;
this.Status = (DbExpenseReportStatus)expenseReport.Status;
this.Charges = new HashSet<DbCharge>();
}
[DataMember]
[Key]
public int ExpenseReportId { get; set; }
[DataMember]
public int EmployeeId { get; set; }
public virtual DbEmployee Employee { get; set; }
[DataMember]
public virtual ICollection<DbCharge> Charges { get; set; }
[DataMember]
public DbExpenseReportStatus Status { get; set; }
[DataMember]
[Column(TypeName = "smallmoney")]
public decimal Amount { get; set; }
[DataMember]
public int CostCenter { get; set; }
[DataMember]
[Required]
[StringLength(250)]
public string Notes { get; set; }
[DataMember]
[Required]
[StringLength(25)]
public string Approver { get; set; }
[DataMember]
[Column(TypeName = "date")]
public DateTime DateSubmitted { get; set; }
[DataMember]
[Column(TypeName = "date")]
public DateTime DateResolved { get; set; }
}
}
|
digitaldrummerj/DeveloperProductivityTalk
|
ExpensesDemo/Expenses.Data/Models/DbExpenseReport.cs
|
C#
|
mit
| 2,317
|
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Guido Tack <tack@gecode.org>
*
* Copyright:
* Guido Tack, 2014
*
* Last modified:
* $Date: 2014-11-04 13:28:32 +0100 (Tue, 04 Nov 2014) $ by $Author: schulte $
* $Revision: 14287 $
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#include "test/flatzinc.hh"
namespace Test { namespace FlatZinc {
namespace {
/// Helper class to create and register tests
class Create {
public:
/// Perform creation and registration
Create(void) {
(void) new FlatZincTest("2DPacking",
"predicate bool_lin_ge(array [int] of int: a, array [int] of var bool: x, var int: c);\n\
predicate bool_lin_gt(array [int] of int: a, array [int] of var bool: x, var int: c);\n\
predicate bool_lin_lt(array [int] of int: a, array [int] of var bool: x, var int: c);\n\
predicate bool_lin_ne(array [int] of int: a, array [int] of var bool: x, var int: c);\n\
array [1..4] of int: ItemHeight = [4, 4, 4, 3];\n\
array [1..4] of int: ItemWidth = [1, 1, 2, 3];\n\
var 0..2: INT____00001 :: is_defined_var :: var_is_introduced;\n\
array [1..2] of var 0..1: bin;\n\
array [1..8] of var 0..1: item :: output_array([1..2, 1..4]);\n\
var 0..2: obj :: output_var = INT____00001;\n\
array [1..16] of var 0..1: x____00002;\n\
array [1..16] of var 0..1: x____00003;\n\
constraint int_eq(x____00002[5], 0);\n\
constraint int_eq(x____00002[9], 0);\n\
constraint int_eq(x____00002[10], 0);\n\
constraint int_eq(x____00002[13], 0);\n\
constraint int_eq(x____00002[14], 0);\n\
constraint int_eq(x____00002[15], 0);\n\
constraint int_eq(x____00003[5], 0);\n\
constraint int_eq(x____00003[9], 0);\n\
constraint int_eq(x____00003[10], 0);\n\
constraint int_eq(x____00003[13], 0);\n\
constraint int_eq(x____00003[14], 0);\n\
constraint int_eq(x____00003[15], 0);\n\
constraint int_lin_eq([1, -1], [item[1], x____00002[1]], 0);\n\
constraint int_lin_eq([1, -1], [item[5], x____00003[1]], 0);\n\
constraint int_lin_eq([1, 1], [item[1], item[5]], 1);\n\
constraint int_lin_eq([1, 1], [item[2], item[6]], 1);\n\
constraint int_lin_eq([1, 1], [item[3], item[7]], 1);\n\
constraint int_lin_eq([1, 1], [item[4], item[8]], 1);\n\
constraint int_lin_eq([1, -1, -1], [item[1], x____00002[2], x____00002[6]], 0);\n\
constraint int_lin_eq([1, -1, -1], [item[5], x____00003[2], x____00003[6]], 0);\n\
constraint int_lin_eq([1, -1, -1, -1], [item[1], x____00002[3], x____00002[7], x____00002[11]], 0);\n\
constraint int_lin_eq([1, -1, -1, -1], [item[5], x____00003[3], x____00003[7], x____00003[11]], 0);\n\
constraint int_lin_eq([1, -1, -1, -1, -1], [item[1], x____00002[4], x____00002[8], x____00002[12], x____00002[16]], 0);\n\
constraint int_lin_eq([1, -1, -1, -1, -1], [item[5], x____00003[4], x____00003[8], x____00003[12], x____00003[16]], 0);\n\
constraint int_lin_le([-2], [x____00002[16]], 0);\n\
constraint int_lin_le([-2], [x____00003[16]], 0);\n\
constraint int_lin_le([-3, 3], [x____00002[11], x____00002[12]], 0);\n\
constraint int_lin_le([-3, 3], [x____00003[11], x____00003[12]], 0);\n\
constraint int_lin_le([-4, 2, 3], [x____00002[6], x____00002[7], x____00002[8]], 0);\n\
constraint int_lin_le([-4, 2, 3], [x____00003[6], x____00003[7], x____00003[8]], 0);\n\
constraint int_lin_le([-4, 1, 2, 3], [x____00002[1], x____00002[2], x____00002[3], x____00002[4]], 0);\n\
constraint int_lin_le([-4, 1, 2, 3], [x____00003[1], x____00003[2], x____00003[3], x____00003[4]], 0);\n\
constraint int_lin_le([-10, 4, 4, 4, 3], [bin[1], x____00002[1], x____00002[6], x____00002[11], x____00002[16]], 0);\n\
constraint int_lin_le([-10, 4, 4, 4, 3], [bin[2], x____00003[1], x____00003[6], x____00003[11], x____00003[16]], 0);\n\
constraint int_plus(bin[1], bin[2], INT____00001) :: defines_var(INT____00001);\n\
solve minimize INT____00001;\n\
",
"item = array2d(1..2, 1..4, [1, 1, 1, 1, 0, 0, 0, 0]);\n\
obj = 1;\n\
----------\n\
==========\n\
");
}
};
Create c;
}
}}
// STATISTICS: test-flatzinc
|
SaGagnon/gecode-4.4.0-cbs
|
test/flatzinc/2dpacking.cpp
|
C++
|
mit
| 5,171
|
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
{% include nav.html %}
<div id="wrapper" class="divided">
<section class="spotlight style1 orient-left content-align-left image-position-right onscroll-image-fade-in">
<div class="content">
<div id="breadcrumbs">
<ol itemscope itemtype="http://schema.org/BreadcrumbList" class="breadcrumbs-ol">
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/">
<span itemprop="name">Home</span></a>
<meta itemprop="position" content="1" />
</li>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="/projects/">
<span itemprop="name">Projects</span></a>
<meta itemprop="position" content="2" />
</li>
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a itemprop="item" href="{{ page.url }}">
<span itemprop="name">{{ page.title }}</span></a>
<meta itemprop="position" content="3" />
</li>
</ol>
<hr>
</div>
<h2>{{ page.title }}</h2>
<p class="major">{{ page.headline }}</p>
<p>{{ page.description }}</p>
</div>
<div class="image">
<img src="{{ page.image }}" alt=" {{page.name}} " />
</div>
</section>
<section class="style1 wrapper container">
<div class="inner">
<h2>Project</h2>
<div class="box">
<p>{{ page.box }}</p>
</div>
</div>
</section>
<section class="style1 wrapper">
<div class="inner">
<div class="index">
<section>
<header>
<h3>Project Details</h3>
</header>
<div class="content">
{{ content }}
</div>
</section>
</div>
</div>
</section>
<section class="style1 wrapper">
<div class="inner">
<div class="index">
<section>
<header>
<h3>Team Members</h3>
</header>
<div class="content align-center">
<div class="items style3 small onload-fade-in">
{% assign members = site.members | sort: 'subweight' %}
{% for member in members %}
{% if member.project == page.project %}
<section>
<a href="{{ member.url }}"><img alt="{{member.name}}" src="{{ member.img | prepend: site.baseurl | prepend: site.url }}" class="img-team"></a>
<h4><b>{{ member.name }}</b>
<br>
<i>{{ member.title }}</i></h4>
</section>
{% endif %}
{% endfor %}
</div>
</div>
</section>
</div>
</div>
</section>
{% include footer.html %}
</div>
</body>
</html>
|
Corneliuscob/UBCEnvision.github.io
|
_layouts/project.html
|
HTML
|
mit
| 3,379
|
"""
# A Better Where
WHERE2 is a near-linear time top-down clustering alogithm.
WHERE2 updated an older where with new Python tricks.
## Standard Header Stuff
"""
from __future__ import division,print_function
import sys
sys.dont_write_bytecode = True
from lib import *
from nasa93 import *
"""
## Dimensionality Reduction with Fastmp
Project data.dat in N dimensions down to a single dimension connecting
twp distant points. Divide that data.dat at the median of those projects.
"""
def fastmap(m,data):
"Divide data.dat into two using distance to two distant items."
import random
random.seed(1)
one = any(data) # 1) pick anything
west = furthest(m,one,data) # 2) west is as far as you can go from anything
east = furthest(m,west,data) # 3) east is as far as you can go from west
c = dist(m,west,east)
# now find everyone's distance
lst = []
for one in data:
a = dist(m,one,west)
b = dist(m,one,east)
x = (a*a + c*c - b*b)/(2*c) # cosine rule
y = max(0, a**2 - x**2)**0.5 # not used, here for a demo
lst += [(x,one)]
lst = sorted(lst)
mid = len(lst)//2
wests = map(second,lst[:mid])
easts = map(second,lst[mid:])
return wests,west, easts,east,c
def gt(x,y): return x > y
def lt(x,y): return x < y
"""
In the above:
+ _m_ is some model that generates candidate
solutions that we wish to niche.
+ _(west,east)_ are not _the_ most distant points
(that would require _N*N) distance
calculations). But they are at least very distant
to each other.
This code needs some helper functions. _Dist_ uses
the standard Euclidean measure. Note that you tune
what it uses to define the niches (decisions or
objectives) using the _what_ parameter:
"""
def dist(m,i,j,
what = lambda m: m.decisions):
"Euclidean distance 0 <= d <= 1 between decisions"
n = len(i.cells)
deltas = 0
for c in what(m):
n1 = norm(m, c, i.cells[c])
n2 = norm(m, c, j.cells[c])
inc = (n1-n2)**2
deltas += inc
n += abs(m.w[c])
return deltas**0.5 / n**0.5
"""
The _Dist_ function normalizes all the raw values zero to one.
"""
def norm(m,c,val) :
"Normalizes val in col c within model m 0..1"
return (val- m.lo[c]) / (m.hi[c]- m.lo[c]+ 0.0001)
"""
Now we can define _furthest_:
"""
def furthest(m,i,all,
init = 0,
better = gt):
"find which of all is furthest from 'i'"
out,d= i,init
for j in all:
if i == j: continue
tmp = dist(m,i,j)
if better(tmp,d):
out,d = j,tmp
return out
"""
And of course, _closest_:
"""
def closest(m,i,all):
return furthest(m,i,all,init=10**32,better=lt)
"""
## WHERE2 = Recursive Fastmap
WHERE2 finds everyone's else's distance from the poles
and divide the data.dat on the mean point of those
distances. This all stops if:
+ Any division has _tooFew_ solutions (say,
less than _sqrt_ of the total number of
solutions).
+ Something has gone horribly wrong and you are
recursing _tooDeep_
This code is controlled by the options in [_The_ settings](settingspy). For
example, if _The.pruning_ is true, we may ignore
some sub-tree (this process is discussed, later on).
Also, if _The.verbose_ is true, the _show_
function prints out a little tree showing the
progress (and to print indents in that tree, we use
the string _The.b4_). For example, here's WHERE2
dividing 93 examples from NASA93.
---| _where |-----------------
93
|.. 46
|.. |.. 23
|.. |.. |.. 11
|.. |.. |.. |.. 5.
|.. |.. |.. |.. 6.
|.. |.. |.. 12
|.. |.. |.. |.. 6.
|.. |.. |.. |.. 6.
|.. |.. 23
|.. |.. |.. 11
|.. |.. |.. |.. 5.
|.. |.. |.. |.. 6.
|.. |.. |.. 12
|.. |.. |.. |.. 6.
|.. |.. |.. |.. 6.
|.. 47
|.. |.. 23
|.. |.. |.. 11
|.. |.. |.. |.. 5.
|.. |.. |.. |.. 6.
|.. |.. |.. 12
|.. |.. |.. |.. 6.
|.. |.. |.. |.. 6.
|.. |.. 24
|.. |.. |.. 12
|.. |.. |.. |.. 6.
|.. |.. |.. |.. 6.
|.. |.. |.. 12
|.. |.. |.. |.. 6.
|.. |.. |.. |.. 6.
WHERE2 returns clusters, where each cluster contains
multiple solutions.
"""
def where2(m, data, lvl=0, up=None):
node = o(val=None,_up=up,_kids=[])
def tooDeep(): return lvl > The.what.depthMax
def tooFew() : return len(data) < The.what.minSize
def show(suffix):
if The.verbose:
print(The.what.b4*lvl,len(data),
suffix,' ; ',id(node) % 1000,sep='')
if tooDeep() or tooFew():
show(".")
node.val = data
else:
show("")
wests,west, easts,east,c = fastmap(m,data)
node.update(c=c,east=east,west=west)
goLeft, goRight = maybePrune(m,lvl,west,east)
if goLeft:
node._kids += [where2(m, wests, lvl+1, node)]
if goRight:
node._kids += [where2(m, easts, lvl+1, node)]
return node
"""
## An Experimental Extensions
Lately I've been experimenting with a system that
prunes as it divides the data.dat. GALE checks for
domination between the poles and ignores data.dat in
halves with a dominated pole. This means that for
_N_ solutions we only ever have to evaluate
_2*log(N)_ of them- which is useful if each
evaluation takes a long time.
The niches found in this way
contain non-dominated poles; i.e. they are
approximations to the Pareto frontier.
Preliminary results show that this is a useful
approach but you should treat those results with a
grain of salt.
In any case, this code supports that pruning as an
optional extra (and is enabled using the
_slots.pruning_ flag). In summary, this code says if
the scores for the poles are more different that
_slots.wriggle_ and one pole has a better score than
the other, then ignore the other pole.
"""
def maybePrune(m,lvl,west,east):
"Usually, go left then right, unless dominated."
goLeft, goRight = True,True # default
if The.prune and lvl >= The.what.depthMin:
sw = scores(m, west)
se = scores(m, east)
if abs(sw - se) > The.wriggle: # big enough to consider
if se > sw: goLeft = False # no left
if sw > se: goRight = False # no right
return goLeft, goRight
"""
Note that I do not allow pruning until we have
descended at least _slots.depthMin_ into the tree.
### Model-specific Stuff
WHERE2 talks to models via the the following model-specific variables:
+ _m.cols_: list of indices in a list
+ _m.names_: a list of names for each column.
+ _m.decisions_: the subset of cols relating to decisions.
+ _m.obectives_: the subset of cols relating to objectives.
+ _m.eval(m,eg)_: function for computing variables from _eg_.
+ _m.lo[c]_ : the lowest value in column _c_.
+ _m.hi[c]_ : the highest value in column _c_.
+ _m.w[c]_: the weight for each column. Usually equal to one.
If an objective and if we are minimizing that objective, then the weight is negative.
### Model-general stuff
Using the model-specific stuff, WHERE2 defines some
useful general functions.
"""
def some(m,x) :
"with variable x of model m, pick one value at random"
return m.lo[x] + by(m.hi[x] - m.lo[x])
def scores(m,it):
"Score an individual."
if not it.scored:
m.eval(m,it)
new, w = 0, 0
for c in m.objectives:
val = it.cells[c]
w += abs(m.w[c])
tmp = norm(m,c,val)
if m.w[c] < 0:
tmp = 1 - tmp
new += (tmp**2)
it.score = (new**0.5) / (w**0.5)
it.scored = True
return it.score
"""
## Tree Code
Tools for manipulating the tree returned by _where2_.
### Primitive: Walk the nodes
"""
def nodes(tree,seen=None,steps=0):
if seen is None: seen=[]
if tree:
if not id(tree) in seen:
seen.append(id(tree))
yield tree,steps
for kid in tree._kids:
for sub,steps1 in nodes(kid,seen,steps+1):
yield sub,steps1
"""
### Return nodes that are leaves
"""
def leaves(tree,seen=None,steps=0):
for node,steps1 in nodes(tree,seen,steps):
if not node._kids:
yield node,steps1
"""
### Return nodes nearest to furthest
"""
def neighbors(leaf,seen=None,steps=-1):
"""Walk the tree from 'leaf' increasingly
distant leaves. """
if seen is None: seen=[]
for down,steps1 in leaves(leaf,seen,steps+1):
yield down,steps1
if leaf:
for up,steps1 in neighbors(leaf._up, seen,steps+1):
yield up,steps1
"""
### Return nodes in Groups, Closest to Furthest
"""
def around(leaf, f=lambda x: x):
tmp,last = [], None
for node,dist in neighbors(leaf):
if dist > 0:
if dist == last:
tmp += [f(node)]
else:
if tmp:
yield last,tmp
tmp = [f(node)]
last = dist
if tmp:
yield last,tmp
"""
## Demo Code
### Code Showing the scores
"""
#@go
def _scores():
m = nasa93()
out = []
for row in m._rows:
scores(m,row)
out += [(row.score, [row.cells[c] for c in m.objectives])]
for s,x in sorted(out):
print(s,x)
"""
### Code Showing the Distances
"""
#@go
def _distances(m=nasa93):
m=m()
seed(The.seed)
for i in m._rows:
j = closest(m,i, m._rows)
k = furthest(m,i, m._rows)
idec = [i.cells[c] for c in m.decisions]
jdec = [j.cells[c] for c in m.decisions]
kdec = [k.cells[c] for c in m.decisions]
print("\n",
gs(idec), g(scores(m,i)),"\n",
gs(jdec),"closest ", g(dist(m,i,j)),"\n",
gs(kdec),"furthest", g(dist(m,i,k)))
"""
### A Demo for Where2.
"""
"""
@go
def _where(m=nasa93):
m= m()
seed(1)
told=N()
for r in m._rows:
s = scores(m,r)
told += s
global The
The=defaults().update(verbose = True,
minSize = len(m._rows)**0.5,
prune = False,
wriggle = 0.3*told.sd())
tree = where2(m, m._rows)
n=0
for node,_ in leaves(tree):
m = len(node.val)
#print(m,' ',end="")
n += m
print(id(node) % 1000, ' ',end='')
for near,dist in neighbors(node):
print(dist,id(near) % 1000,' ',end='')
print("")
print(n)
filter = lambda z: id(z) % 1000
for node,_ in leaves(tree):
print(filter(node),
[x for x in around(node,filter)])
"""
|
rahlk/WarnPlan
|
warnplan/commons/tools/axe/where2.py
|
Python
|
mit
| 10,028
|
/**
* The MIT License
*
* Original work sponsored and donated by National Board of e-Health (NSI), Denmark
* (http://www.nsi.dk)
*
* Copyright (C) 2011 National Board of e-Health (NSI), Denmark (http://www.nsi.dk)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package dk.nsi.haiba.epimibaimporter.status;
import org.joda.time.DateTime;
public interface TimeSource {
DateTime now();
}
|
trifork/HAIBA-EPIMIBA-classification
|
src/main/java/dk/nsi/haiba/epimibaimporter/status/TimeSource.java
|
Java
|
mit
| 1,426
|
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
namespace mshtml
{
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[ComImport, InterfaceType((short) 1), Guid("3050F69D-98B5-11CF-BB82-00AA00BDCE0B")]
public interface IDisplayServices
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
void CreateDisplayPointer([MarshalAs(UnmanagedType.Interface)] out IDisplayPointer ppDispPointer);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
void TransformRect([In, Out] ref tagRECT pRect, [In] _COORD_SYSTEM eSource, [In] _COORD_SYSTEM eDestination, [In, MarshalAs(UnmanagedType.Interface)] IHTMLElement pIElement);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
void TransformPoint([In, Out] ref tagPOINT pPoint, [In] _COORD_SYSTEM eSource, [In] _COORD_SYSTEM eDestination, [In, MarshalAs(UnmanagedType.Interface)] IHTMLElement pIElement);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
void GetCaret([MarshalAs(UnmanagedType.Interface)] out IHTMLCaret ppCaret);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
void GetComputedStyle([In, MarshalAs(UnmanagedType.Interface)] IMarkupPointer pPointer, [MarshalAs(UnmanagedType.Interface)] out IHTMLComputedStyle ppComputedStyle);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
void ScrollRectIntoView([In, MarshalAs(UnmanagedType.Interface)] IHTMLElement pIElement, [In] tagRECT rect);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
void HasFlowLayout([In, MarshalAs(UnmanagedType.Interface)] IHTMLElement pIElement, out int pfHasFlowLayout);
}
}
|
gduncan411/OpenLiveWriter
|
src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IDisplayServices.cs
|
C#
|
mit
| 2,018
|
XMate
==============
Plugin for Xcode that adds some handy TextMate and Emacs actions to the `Edit` menu. Works in Xcode 5.1 or above.

##Demos
###Select Scope:

###Ace Jump mode:

###Ace Jump Word mode:

## Installation
### Build It Yourself
1. Make sure the file path of Xcode is `/Applications/Xcode.app`, because some Xcode frameworks need to be linked from the Xcode app itself.
2. Clone this repo, build it, then restart Xcode.
### Or Use My Build
1. Download [XMate-1.02.zip](http://www.indieworks.org/files/XMate-1.02.zip)
2. Unzip it, move `XMate.xcplugin` into `~/Library/Application Support/Developer/Shared/Xcode/Plug-ins`.
3. Restart Xcode.
You can find XMate's actions under Xcode's `Edit` menu if it's loaded.
## Usage
### Set Your Own Keyboard Shortcuts
All available actions are under Xcode's `Edit` menu. There aren't any keyboard shortcuts by default in case of conflicts. You can assign your favorite keyboard shortcuts in `System Preferences` -> `Keyboard`.

Here're all available actions, to save you some typing: `XMate:Select Scope`, `XMate:Select between Brackets`, `XMate:Ace Jump`, `XMate:Ace Jump Word`.
### Selecting Actions
Select scope action selects inside quotes, or dot notation, or part of method calls.
Keep activating the same action will extend the selection to a acceptable range.
e.g inside quotes to including quotes.
Select brackets action is similar to select scope action, but it will only extend selection to paired square brackets, curly brackets and parentheses.
### Ace Jump
1. Press the Ace Jump menu item or the hotkey you assigned. A little text field will pop up at the lower left corner of your current active editing area.
2. Input the character you want to jump to (case sensitive, can be letters or symbols), all the same characters will be covered by a yellow label with a lowercased indicating letter. In the word-mode, only words' first characters will be highlighted.
3. Input the indicating letter, the caret will be moved to that location.
4. If you input uppercased indicating letter, a selection from current caret location to the indicating letter's location will be made.
5. Sometimes there're too many same characters on the screen, 26 letters are not enough to represent all of them, you can push `tab` or `return` to switch to next group.
6. You can always push `esc` or the Ace Jump hotkey you assigned to quit Ace Jump mode.
## XVim Compatibility
They can work together without crashing each other. Ace Jump Mode works fine since it just moves the caret to another position. Selecting actions are a little bit tricky, I don't recommend using XMate's selecting actions if you're using XVim.
## Credits
#### [ParseKit](http://parsekit.com/)
I have no idea about how to write a syntax parser, ParseKit did all the heavy lifting for me behind the scene.
(For my Chinese fellas)
####[Xcode 4 插件制作入门](http://onevcat.com/2013/02/xcode-plugin/)
[@onevcat](https://twitter.com/onevcat) 的好文章,学习制作 Xcode 插件必看。
## License
XMate is available under the MIT license. See the LICENSE.txt file for more information.
|
PrideChung/XMate
|
README.md
|
Markdown
|
mit
| 3,446
|
using System;
public class Program
{
public static void Main()
{
// Name of static method
Console.WriteLine(nameof(Main));
// Name of parameter when creating ArgumentNullException
try
{
var person = new Person(null, null);
}
catch (ArgumentNullException ex)
{
Console.WriteLine(ex.Message);
}
// Name of instance property
new Program().NonStaticMethod();
// Name of methods
Console.WriteLine(nameof(string.Empty.Normalize));
}
public int NonStaticProperty { get; set; }
public void NonStaticMethod()
{
Console.WriteLine(nameof(this.NonStaticProperty));
}
}
|
NikolayIT/CSharp-New-Features
|
CSharp-6.0-New-Features/05. NameofExpressions/Program.cs
|
C#
|
mit
| 730
|
use {TryRead, TryWrite};
use mio::*;
use mio::deprecated::{EventLoop, Handler};
use mio::deprecated::unix::*;
use bytes::{Buf, ByteBuf, MutByteBuf, SliceBuf};
use slab;
use std::path::PathBuf;
use std::io;
use tempdir::TempDir;
const SERVER: Token = Token(10_000_000);
const CLIENT: Token = Token(10_000_001);
struct EchoConn {
sock: UnixStream,
buf: Option<ByteBuf>,
mut_buf: Option<MutByteBuf>,
token: Option<Token>,
interest: Ready,
}
type Slab<T> = slab::Slab<T, Token>;
impl EchoConn {
fn new(sock: UnixStream) -> EchoConn {
EchoConn {
sock: sock,
buf: None,
mut_buf: Some(ByteBuf::mut_with_capacity(2048)),
token: None,
interest: Ready::hup(),
}
}
fn writable(&mut self, event_loop: &mut EventLoop<Echo>) -> io::Result<()> {
let mut buf = self.buf.take().unwrap();
match self.sock.try_write_buf(&mut buf) {
Ok(None) => {
debug!("client flushing buf; WOULDBLOCK");
self.buf = Some(buf);
self.interest.insert(Ready::writable());
}
Ok(Some(r)) => {
debug!("CONN : we wrote {} bytes!", r);
self.mut_buf = Some(buf.flip());
self.interest.insert(Ready::readable());
self.interest.remove(Ready::writable());
}
Err(e) => debug!("not implemented; client err={:?}", e),
}
assert!(self.interest.is_readable() || self.interest.is_writable(), "actual={:?}", self.interest);
event_loop.reregister(&self.sock, self.token.unwrap(), self.interest, PollOpt::edge() | PollOpt::oneshot())
}
fn readable(&mut self, event_loop: &mut EventLoop<Echo>) -> io::Result<()> {
let mut buf = self.mut_buf.take().unwrap();
match self.sock.try_read_buf(&mut buf) {
Ok(None) => {
debug!("CONN : spurious read wakeup");
self.mut_buf = Some(buf);
}
Ok(Some(r)) => {
debug!("CONN : we read {} bytes!", r);
// prepare to provide this to writable
self.buf = Some(buf.flip());
self.interest.remove(Ready::readable());
self.interest.insert(Ready::writable());
}
Err(e) => {
debug!("not implemented; client err={:?}", e);
self.interest.remove(Ready::readable());
}
};
assert!(self.interest.is_readable() || self.interest.is_writable(), "actual={:?}", self.interest);
event_loop.reregister(&self.sock, self.token.unwrap(), self.interest, PollOpt::edge() | PollOpt::oneshot())
}
}
struct EchoServer {
sock: UnixListener,
conns: Slab<EchoConn>
}
impl EchoServer {
fn accept(&mut self, event_loop: &mut EventLoop<Echo>) -> io::Result<()> {
debug!("server accepting socket");
let sock = self.sock.accept().unwrap();
let conn = EchoConn::new(sock);
let tok = self.conns.insert(conn)
.ok().expect("could not add connection to slab");
// Register the connection
self.conns[tok].token = Some(tok);
event_loop.register(&self.conns[tok].sock, tok, Ready::readable(), PollOpt::edge() | PollOpt::oneshot())
.ok().expect("could not register socket with event loop");
Ok(())
}
fn conn_readable(&mut self, event_loop: &mut EventLoop<Echo>, tok: Token) -> io::Result<()> {
debug!("server conn readable; tok={:?}", tok);
self.conn(tok).readable(event_loop)
}
fn conn_writable(&mut self, event_loop: &mut EventLoop<Echo>, tok: Token) -> io::Result<()> {
debug!("server conn writable; tok={:?}", tok);
self.conn(tok).writable(event_loop)
}
fn conn<'a>(&'a mut self, tok: Token) -> &'a mut EchoConn {
&mut self.conns[tok]
}
}
struct EchoClient {
sock: UnixStream,
msgs: Vec<&'static str>,
tx: SliceBuf<'static>,
rx: SliceBuf<'static>,
mut_buf: Option<MutByteBuf>,
token: Token,
interest: Ready,
}
// Sends a message and expects to receive the same exact message, one at a time
impl EchoClient {
fn new(sock: UnixStream, tok: Token, mut msgs: Vec<&'static str>) -> EchoClient {
let curr = msgs.remove(0);
EchoClient {
sock: sock,
msgs: msgs,
tx: SliceBuf::wrap(curr.as_bytes()),
rx: SliceBuf::wrap(curr.as_bytes()),
mut_buf: Some(ByteBuf::mut_with_capacity(2048)),
token: tok,
interest: Ready::none(),
}
}
fn readable(&mut self, event_loop: &mut EventLoop<Echo>) -> io::Result<()> {
debug!("client socket readable");
let mut buf = self.mut_buf.take().unwrap();
match self.sock.try_read_buf(&mut buf) {
Ok(None) => {
debug!("CLIENT : spurious read wakeup");
self.mut_buf = Some(buf);
}
Ok(Some(r)) => {
debug!("CLIENT : We read {} bytes!", r);
// prepare for reading
let mut buf = buf.flip();
debug!("CLIENT : buf = {:?} -- rx = {:?}", buf.bytes(), self.rx.bytes());
while buf.has_remaining() {
let actual = buf.read_byte().unwrap();
let expect = self.rx.read_byte().unwrap();
assert!(actual == expect, "actual={}; expect={}", actual, expect);
}
self.mut_buf = Some(buf.flip());
self.interest.remove(Ready::readable());
if !self.rx.has_remaining() {
self.next_msg(event_loop).unwrap();
}
}
Err(e) => {
panic!("not implemented; client err={:?}", e);
}
};
if !self.interest.is_none() {
assert!(self.interest.is_readable() || self.interest.is_writable(), "actual={:?}", self.interest);
event_loop.reregister(&self.sock, self.token, self.interest, PollOpt::edge() | PollOpt::oneshot())?;
}
Ok(())
}
fn writable(&mut self, event_loop: &mut EventLoop<Echo>) -> io::Result<()> {
debug!("client socket writable");
match self.sock.try_write_buf(&mut self.tx) {
Ok(None) => {
debug!("client flushing buf; WOULDBLOCK");
self.interest.insert(Ready::writable());
}
Ok(Some(r)) => {
debug!("CLIENT : we wrote {} bytes!", r);
self.interest.insert(Ready::readable());
self.interest.remove(Ready::writable());
}
Err(e) => debug!("not implemented; client err={:?}", e)
}
assert!(self.interest.is_readable() || self.interest.is_writable(), "actual={:?}", self.interest);
event_loop.reregister(&self.sock, self.token, self.interest, PollOpt::edge() | PollOpt::oneshot())
}
fn next_msg(&mut self, event_loop: &mut EventLoop<Echo>) -> io::Result<()> {
if self.msgs.is_empty() {
event_loop.shutdown();
return Ok(());
}
let curr = self.msgs.remove(0);
debug!("client prepping next message");
self.tx = SliceBuf::wrap(curr.as_bytes());
self.rx = SliceBuf::wrap(curr.as_bytes());
self.interest.insert(Ready::writable());
assert!(self.interest.is_readable() || self.interest.is_writable(), "actual={:?}", self.interest);
event_loop.reregister(&self.sock, self.token, self.interest, PollOpt::edge() | PollOpt::oneshot())
}
}
struct Echo {
server: EchoServer,
client: EchoClient,
}
impl Echo {
fn new(srv: UnixListener, client: UnixStream, msgs: Vec<&'static str>) -> Echo {
Echo {
server: EchoServer {
sock: srv,
conns: Slab::with_capacity(128)
},
client: EchoClient::new(client, CLIENT, msgs)
}
}
}
impl Handler for Echo {
type Timeout = usize;
type Message = ();
fn ready(&mut self, event_loop: &mut EventLoop<Echo>, token: Token, events: Ready) {
if events.is_readable() {
match token {
SERVER => self.server.accept(event_loop).unwrap(),
CLIENT => self.client.readable(event_loop).unwrap(),
i => self.server.conn_readable(event_loop, i).unwrap()
};
}
if events.is_writable() {
match token {
SERVER => panic!("received writable for token 0"),
CLIENT => self.client.writable(event_loop).unwrap(),
_ => self.server.conn_writable(event_loop, token).unwrap()
};
}
}
}
#[test]
pub fn test_unix_echo_server() {
debug!("Starting TEST_UNIX_ECHO_SERVER");
let mut event_loop = EventLoop::new().unwrap();
let tmp_dir = TempDir::new("mio").unwrap();
let addr = tmp_dir.path().join(&PathBuf::from("sock"));
let srv = UnixListener::bind(&addr).unwrap();
info!("listen for connections");
event_loop.register(&srv, SERVER, Ready::readable(), PollOpt::edge() | PollOpt::oneshot()).unwrap();
let sock = UnixStream::connect(&addr).unwrap();
// Connect to the server
event_loop.register(&sock, CLIENT, Ready::writable(), PollOpt::edge() | PollOpt::oneshot()).unwrap();
// Start the event loop
event_loop.run(&mut Echo::new(srv, sock, vec!["foo", "bar"])).unwrap();
}
|
mneumann/mio
|
test/test_unix_echo_server.rs
|
Rust
|
mit
| 9,602
|
package org.vitrivr.adampro.storage.engine
import java.io.File
import com.databricks.spark.avro._
import org.apache.commons.io.FileUtils
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.{FileSystem, Path}
import org.apache.spark.sql.{DataFrame, SaveMode}
import org.vitrivr.adampro.config.AdamConfig
import org.vitrivr.adampro.data.datatypes.AttributeTypes
import org.vitrivr.adampro.data.entity.AttributeDefinition
import org.vitrivr.adampro.process.SharedComponentContext
import org.vitrivr.adampro.query.query.Predicate
import org.vitrivr.adampro.utils.Logging
import org.vitrivr.adampro.utils.exception.GeneralAdamException
import scala.util.{Failure, Success, Try}
/**
* ADAMpro
*
* Ivan Giangreco
* November 2016
*/
class AvroEngine(@transient override implicit val ac: SharedComponentContext) extends Engine()(ac) with Logging with Serializable {
override val name = "avro"
override def supports = Seq(AttributeTypes.AUTOTYPE, AttributeTypes.INTTYPE, AttributeTypes.LONGTYPE, AttributeTypes.FLOATTYPE, AttributeTypes.DOUBLETYPE, AttributeTypes.STRINGTYPE, AttributeTypes.TEXTTYPE, AttributeTypes.BOOLEANTYPE, AttributeTypes.VECTORTYPE)
override def specializes = Seq(AttributeTypes.VECTORTYPE)
var subengine: GenericAvroEngine = _
override val repartitionable = false
/**
*
* @param props
*/
def this(props: Map[String, String])(implicit ac: SharedComponentContext) {
this()(ac)
if (!props.contains("storage")) {
subengine = new AvroLocalStorage(AdamConfig.cleanPath(props.get("path").get))
} else {
subengine = props.get("storage").get match {
case "hadoop" => new AvroHadoopStorage(props.get("basepath").get, props.get("datapath").get)
case "local" => new AvroLocalStorage(AdamConfig.cleanPath(props.get("path").get))
}
}
}
/**
* Create the entity.
*
* @param storename adapted entityname to store feature to
* @param attributes attributes of the entity (w.r.t. handler)
* @param params creation parameters
* @return options to store
*/
override def create(storename: String, attributes: Seq[AttributeDefinition], params: Map[String, String])(implicit ac: SharedComponentContext): Try[Map[String, String]] = {
log.trace("avro create operation")
Success(Map())
}
/**
* Check if entity exists.
*
* @param storename adapted entityname to store feature to
* @return
*/
override def exists(storename: String)(implicit ac: SharedComponentContext): Try[Boolean] = {
log.trace("avro exists operation")
subengine.exists(storename)
}
/**
* Read entity.
*
* @param storename adapted entityname to store feature to
* @param attributes the attributes to read
* @param predicates filtering predicates (only applied if possible)
* @param params reading parameters
* @return
*/
override def read(storename: String, attributes: Seq[AttributeDefinition], predicates: Seq[Predicate], params: Map[String, String])(implicit ac: SharedComponentContext): Try[DataFrame] = {
log.trace("avro read operation")
try {
val res = subengine.read(storename)
if (res.isSuccess) {
Success(res.get)
} else {
res
}
} catch {
case e: Exception =>
log.error("fatal error when reading from avro", e)
Failure(e)
}
}
/**
* Write entity.
*
* @param storename adapted entityname to store feature to
* @param df data
* @param attributes attributes to store
* @param mode save mode (append, overwrite, ...)
* @param params writing parameters
* @return new options to store
*/
override def write(storename: String, df: DataFrame, attributes: Seq[AttributeDefinition], mode: SaveMode = SaveMode.Append, params: Map[String, String])(implicit ac: SharedComponentContext): Try[Map[String, String]] = {
log.trace("avro write operation")
val allowRepartitioning = params.getOrElse("allowRepartitioning", "false").toBoolean
import org.apache.spark.sql.functions.col
var data = df
if (allowRepartitioning) {
val partitioningKey = params.get("partitioningKey")
if (partitioningKey.isDefined) {
data = data.repartition(ac.config.defaultNumberOfPartitions, col(partitioningKey.get))
} else {
data = data.repartition(ac.config.defaultNumberOfPartitions)
}
}
val res = subengine.write(storename, data, mode)
if (res.isSuccess) {
Success(Map())
} else {
Failure(res.failed.get)
}
}
/**
* Drop the entity.
*
* @param storename adapted entityname to store feature to
* @return
*/
def drop(storename: String)(implicit ac: SharedComponentContext): Try[Void] = {
log.trace("avro drop operation")
subengine.drop(storename)
}
override def equals(other: Any): Boolean =
other match {
case that: AvroEngine => this.subengine.equals(that.subengine)
case _ => false
}
override def hashCode: Int = subengine.hashCode
}
/**
*
*/
trait GenericAvroEngine extends Logging with Serializable {
def read(filename: String)(implicit ac: SharedComponentContext): Try[DataFrame]
def write(filename: String, df: DataFrame, mode: SaveMode = SaveMode.Append)(implicit ac: SharedComponentContext): Try[Void]
def exists(path: String)(implicit ac: SharedComponentContext): Try[Boolean]
def drop(path: String)(implicit ac: SharedComponentContext): Try[Void]
}
/**
*
*/
class AvroLocalStorage(private val path: String) extends GenericAvroEngine with Logging with Serializable {
val sparkPath = "file://" + path
val datafolder = new File(path)
if (!datafolder.exists()) {
datafolder.mkdirs
}
/**
*
* @param filename
* @return
*/
def read(filename: String)(implicit ac: SharedComponentContext): Try[DataFrame] = {
try {
if (!exists(filename).get) {
throw new GeneralAdamException("no file found at " + path + filename)
}
Success(ac.sqlContext.read.avro(sparkPath + filename))
} catch {
case e: Exception => Failure(e)
}
}
/**
*
* @param filename
* @param df
* @param mode
* @return
*/
def write(filename: String, df: DataFrame, mode: SaveMode = SaveMode.Append)(implicit ac: SharedComponentContext): Try[Void] = {
try {
df.write.mode(mode).avro(sparkPath + filename)
Success(null)
} catch {
case e: Exception => Failure(e)
}
}
/**
*
* @param filename
* @return
*/
override def drop(filename: String)(implicit ac: SharedComponentContext): Try[Void] = {
try {
FileUtils.deleteDirectory(new File(path, filename))
Success(null)
} catch {
case e: Exception => Failure(e)
}
}
/**
*
* @param filename
* @return
*/
override def exists(filename: String)(implicit ac: SharedComponentContext): Try[Boolean] = {
try {
Success(new File(path, filename).exists())
} catch {
case e: Exception => Failure(e)
}
}
override def equals(other: Any): Boolean =
other match {
case that: AvroLocalStorage => this.path.equals(that.path)
case _ => false
}
override def hashCode(): Int = path.hashCode
}
/**
*
*/
class AvroHadoopStorage(private val basepath: String, private val datapath: String) extends GenericAvroEngine with Logging with Serializable {
@transient private val hadoopConf = new Configuration()
hadoopConf.set("fs.defaultFS", basepath)
if (!FileSystem.get(new Path("/").toUri, hadoopConf).exists(new Path(datapath))) {
FileSystem.get(new Path("/").toUri, hadoopConf).mkdirs(new Path(datapath))
}
//we assume:
// basepath (hdfs://...) ends on "/"
// datapath (/.../.../) is given absolutely and starts with "/" and ends with "/"
private val fullHadoopPath = basepath + datapath.substring(1)
/**
*
* @param filename
* @return
*/
def read(filename: String)(implicit ac: SharedComponentContext): Try[DataFrame] = {
try {
if (!exists(filename).get) {
throw new GeneralAdamException("no file found at " + fullHadoopPath)
}
Success(ac.sqlContext.read.avro(fullHadoopPath + filename))
} catch {
case e: Exception => Failure(e)
}
}
/**
*
* @param filename
* @param df
* @param mode
* @return
*/
def write(filename: String, df: DataFrame, mode: SaveMode = SaveMode.Append)(implicit ac: SharedComponentContext): Try[Void] = {
try {
df.write.mode(mode).avro(fullHadoopPath + filename)
Success(null)
} catch {
case e: Exception => Failure(e)
}
}
/**
*
* @param filename
* @return
*/
override def drop(filename: String)(implicit ac: SharedComponentContext): Try[Void] = {
try {
val hdfs = FileSystem.get(new Path(datapath).toUri, hadoopConf)
val drop = hdfs.delete(new Path(datapath, filename), true)
if (drop) {
Success(null)
} else {
Failure(new Exception("unknown error in dropping file " + filename))
}
} catch {
case e: Exception => Failure(e)
}
}
/**
*
* @param filename
* @return
*/
override def exists(filename: String)(implicit ac: SharedComponentContext): Try[Boolean] = {
try {
val hdfs = FileSystem.get(new Path(datapath).toUri, hadoopConf)
val exists = hdfs.exists(new Path(datapath, filename))
Success(exists)
} catch {
case e: Exception => Failure(e)
}
}
override def equals(other: Any): Boolean =
other match {
case that: AvroHadoopStorage => this.basepath.equals(that.basepath) && this.datapath.equals(that.datapath)
case _ => false
}
override def hashCode(): Int = {
val prime = 31
var result = 1
result = prime * result + basepath.hashCode
result = prime * result + datapath.hashCode
result
}
}
|
dbisUnibas/ADAMpro
|
src/main/scala/org/vitrivr/adampro/storage/engine/AvroEngine.scala
|
Scala
|
mit
| 10,001
|
/*
* Copyright (c) 2013 Apple Inc. All rights reserved.
*
* @APPLE_APACHE_LICENSE_HEADER_START@
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @APPLE_APACHE_LICENSE_HEADER_END@
*/
/*
* IMPORTANT: This header file describes INTERNAL interfaces to libplatform
* which are subject to change in future releases of Mac OS X. Any applications
* relying on these interfaces WILL break.
*/
#ifndef __OS_YIELD__
#define __OS_YIELD__
#include <TargetConditionals.h>
#pragma mark -
#pragma mark _os_wait_until
#if OS_ATOMIC_UP
#define _os_wait_until(c) do { \
int _spins = 0; \
while (unlikely(!(c))) { \
_spins++; \
_os_preemption_yield(_spins); \
} } while (0)
#elif TARGET_OS_EMBEDDED
// <rdar://problem/15508918>
#ifndef OS_WAIT_SPINS
#define OS_WAIT_SPINS 1024
#endif
#define _os_wait_until(c) do { \
int _spins = -(OS_WAIT_SPINS); \
while (unlikely(!(c))) { \
if (unlikely(_spins++ >= 0)) { \
_os_preemption_yield(_spins); \
} else { \
os_hardware_pause(); \
} \
} } while (0)
#else
#define _os_wait_until(c) do { \
while (!(c)) { \
os_hardware_pause(); \
} } while (0)
#endif
#pragma mark -
#pragma mark os_hardware_pause
#if defined(__x86_64__) || defined(__i386__)
#define os_hardware_pause() __asm__("pause")
#elif (defined(__arm__) && defined(_ARM_ARCH_7) && defined(__thumb__)) || \
defined(__arm64__)
#define os_hardware_pause() __asm__("yield")
#define os_hardware_wfe() __asm__("wfe")
#else
#define os_hardware_pause() __asm__("")
#endif
#pragma mark -
#pragma mark _os_preemption_yield
#if defined(SWITCH_OPTION_OSLOCK_DEPRESS) && !(TARGET_IPHONE_SIMULATOR && \
IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED < 1090)
#define OS_YIELD_THREAD_SWITCH_OPTION SWITCH_OPTION_OSLOCK_DEPRESS
#else
#define OS_YIELD_THREAD_SWITCH_OPTION SWITCH_OPTION_DEPRESS
#endif
#define _os_preemption_yield(n) thread_switch(MACH_PORT_NULL, \
OS_YIELD_THREAD_SWITCH_OPTION, (mach_msg_timeout_t)(n))
#endif // __OS_YIELD__
|
e-t-h-a-n/esdarwin
|
macos-10124/esdarwin-destroot-b1/usr/local/include/os/yield.h
|
C
|
mit
| 2,486
|
IPython Notebooks
=================
A folder for notebooks demoing things, or for exploring data before
writing it up.
|
Cadair/Thesis
|
notebooks/README.md
|
Markdown
|
mit
| 120
|
package net.glowstone.block.blocktype;
import net.glowstone.block.GlowBlock;
import net.glowstone.block.GlowBlockState;
import net.glowstone.entity.GlowPlayer;
import org.bukkit.block.BlockFace;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.Vector;
import org.jetbrains.annotations.NotNull;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class BlockRails extends BlockNeedsAttached {
private static final int NORTH = 0;
private static final int SOUTH = 1;
private static final int EAST = 2;
private static final int WEST = 3;
private static final int ASCENDING_NORTH = 4;
private static final int ASCENDING_SOUTH = 5;
private static final int ASCENDING_EAST = 6;
private static final int ASCENDING_WEST = 7;
private static boolean isConnected(GlowBlock rail, GlowBlock neighborRail) {
return RailDirection.getRailDirection(rail).getNeighborRails(rail).contains(neighborRail)
&& RailDirection.getRailDirection(neighborRail).getNeighborRails(neighborRail)
.contains(rail);
}
private static boolean isUnstable(GlowBlock block, GlowBlock neighborRail) {
if (!isRailBlock(block)) {
return false;
}
Set<GlowBlock> neighborRails = RailDirection.getRailDirection(block)
.getNeighborRails(block);
// equals because blocks at the same location are not the same at the moment.
// TODO: !rail.equals(neighborRail) -> rail != neighborRail
return neighborRails.stream()
.filter(rail -> !rail.equals(neighborRail) && isConnected(block, rail)).count() != 2;
}
private static RailDirection getRailDirection(GlowBlock rail) {
// north - 0, south - 1, east - 2, west - 3, ascending_north - 4, ascending_south - 5,
// ascending_east - 6, ascending_west - 7
boolean[] unstableRails = new boolean[8];
GlowBlock north = rail.getRelative(BlockFace.NORTH);
unstableRails[NORTH] =
isUnstable(north, rail) || isUnstable(north.getRelative(BlockFace.DOWN), rail);
GlowBlock south = rail.getRelative(BlockFace.SOUTH);
unstableRails[SOUTH] =
isUnstable(south, rail) || isUnstable(south.getRelative(BlockFace.DOWN), rail);
GlowBlock east = rail.getRelative(BlockFace.EAST);
unstableRails[EAST] =
isUnstable(east, rail) || isUnstable(east.getRelative(BlockFace.DOWN), rail);
GlowBlock west = rail.getRelative(BlockFace.WEST);
unstableRails[WEST] =
isUnstable(west, rail) || isUnstable(west.getRelative(BlockFace.DOWN), rail);
unstableRails[ASCENDING_NORTH] = isUnstable(north.getRelative(BlockFace.UP), rail);
unstableRails[ASCENDING_SOUTH] = isUnstable(south.getRelative(BlockFace.UP), rail);
unstableRails[ASCENDING_WEST] = isUnstable(east.getRelative(BlockFace.UP), rail);
unstableRails[ASCENDING_EAST] = isUnstable(west.getRelative(BlockFace.UP), rail);
// north && east || ascending_north && ascending_east || north && ascending_east
// || ascending_north && east
if (unstableRails[NORTH] && unstableRails[EAST]
|| unstableRails[ASCENDING_NORTH] && unstableRails[ASCENDING_EAST]
|| unstableRails[NORTH] && unstableRails[ASCENDING_EAST]
|| unstableRails[ASCENDING_NORTH] && unstableRails[EAST]) {
return RailDirection.NORTH_EAST;
}
// north && west || ascending_north && ascending_west || north && ascending_west
// || ascending_north && west
if (unstableRails[NORTH] && unstableRails[WEST]
|| unstableRails[ASCENDING_NORTH] && unstableRails[ASCENDING_WEST]
|| unstableRails[NORTH] && unstableRails[ASCENDING_WEST]
|| unstableRails[ASCENDING_NORTH] && unstableRails[WEST]) {
return RailDirection.NORTH_WEST;
}
// south && west || ascending_south && ascending_west || south && ascending_west
// || ascending_south && west
if (unstableRails[SOUTH] && unstableRails[WEST]
|| unstableRails[ASCENDING_SOUTH] && unstableRails[ASCENDING_WEST]
|| unstableRails[SOUTH] && unstableRails[ASCENDING_WEST]
|| unstableRails[ASCENDING_SOUTH] && unstableRails[WEST]) {
return RailDirection.SOUTH_WEST;
}
// south && east || ascending_south && ascending_east || south && ascending_east
// || ascending_south && east
if (unstableRails[SOUTH] && unstableRails[EAST]
|| unstableRails[ASCENDING_SOUTH] && unstableRails[ASCENDING_EAST]
|| unstableRails[SOUTH] && unstableRails[ASCENDING_EAST]
|| unstableRails[ASCENDING_SOUTH] && unstableRails[EAST]) {
return RailDirection.SOUTH_EAST;
}
// ascending_north && south || ascending_north
if (unstableRails[ASCENDING_NORTH] && unstableRails[SOUTH]
|| unstableRails[ASCENDING_NORTH]) {
return RailDirection.ASCENDING_NORTH;
}
// ascending_south && north || ascending_south
if (unstableRails[ASCENDING_SOUTH] && unstableRails[NORTH]
|| unstableRails[ASCENDING_SOUTH]) {
return RailDirection.ASCENDING_SOUTH;
}
// ascending_east && west || ascending_east
if (unstableRails[ASCENDING_EAST] && unstableRails[WEST] || unstableRails[ASCENDING_EAST]) {
return RailDirection.ASCENDING_EAST;
}
// ascending_west && east || ascending_west
if (unstableRails[ASCENDING_WEST] && unstableRails[EAST] || unstableRails[ASCENDING_WEST]) {
return RailDirection.ASCENDING_WEST;
}
// north || south
if (unstableRails[NORTH] || unstableRails[SOUTH]) {
return RailDirection.NORTH_SOUTH;
}
// east || west
if (unstableRails[EAST] || unstableRails[WEST]) {
return RailDirection.EAST_WEST;
}
// return current rail direction.
return RailDirection.getRailDirection(rail);
}
private static boolean isRailBlock(GlowBlock block) {
// TODO: 1.13 rail types
return block.getType().name().contains("RAIL");
}
@NotNull
@Override
public Collection<ItemStack> getDrops(GlowBlock block, ItemStack tool) {
return Arrays.asList(new ItemStack(block.getType()));
}
@Override
public void placeBlock(GlowPlayer player, GlowBlockState state, BlockFace face,
ItemStack holding, Vector clickedLoc) {
super.placeBlock(player, state, face, holding, clickedLoc);
GlowBlock block = state.getBlock();
RailDirection direction = getRailDirection(block);
state.setRawData((byte) direction.ordinal());
state.update(true, false);
updateNeighbors(block, direction);
}
private void updateNeighbors(GlowBlock block, RailDirection direction) {
direction.getNeighborRails(block).forEach(rail -> {
// check if the rail is stable
if (isUnstable(rail, block) && !isConnected(rail, block)) {
rail.setData((byte) getRailDirection(rail).ordinal());
}
});
}
private enum RailDirection {
NORTH_SOUTH {
@Override
public Set<GlowBlock> getNeighborRails(GlowBlock rail) {
Set<GlowBlock> rails = new HashSet<>();
GlowBlock north = rail.getRelative(BlockFace.NORTH);
GlowBlock south = rail.getRelative(BlockFace.SOUTH);
if (isRailBlock(north)) {
rails.add(north);
}
if (isRailBlock(south)) {
rails.add(south);
}
if (rails.size() != 2) {
GlowBlock descendingNorth = north.getRelative(BlockFace.DOWN);
GlowBlock descendingSouth = south.getRelative(BlockFace.DOWN);
if (isRailBlock(descendingNorth)) {
rails.add(descendingNorth);
}
if (isRailBlock(descendingSouth)) {
rails.add(descendingSouth);
}
}
return rails;
}
},
EAST_WEST {
@Override
public Set<GlowBlock> getNeighborRails(GlowBlock rail) {
Set<GlowBlock> rails = new HashSet<>();
GlowBlock east = rail.getRelative(BlockFace.EAST);
GlowBlock west = rail.getRelative(BlockFace.WEST);
if (isRailBlock(east)) {
rails.add(east);
}
if (isRailBlock(west)) {
rails.add(west);
}
if (rails.size() != 2) {
GlowBlock descendingEast = east.getRelative(BlockFace.DOWN);
GlowBlock descendingWest = west.getRelative(BlockFace.DOWN);
if (isRailBlock(descendingEast)) {
rails.add(descendingEast);
}
if (isRailBlock(descendingWest)) {
rails.add(descendingWest);
}
}
return rails;
}
},
ASCENDING_EAST {
@Override
public Set<GlowBlock> getNeighborRails(GlowBlock rail) {
Set<GlowBlock> rails = new HashSet<>();
GlowBlock west = rail.getRelative(BlockFace.WEST);
GlowBlock ascendingEast = rail.getRelative(BlockFace.EAST)
.getRelative(BlockFace.UP);
GlowBlock descendingWest = west.getRelative(BlockFace.DOWN);
if (isRailBlock(ascendingEast)) {
rails.add(ascendingEast);
}
if (isRailBlock(descendingWest)) {
rails.add(descendingWest);
}
if (rails.size() != 2) {
if (isRailBlock(west)) {
rails.add(west);
}
}
return rails;
}
},
ASCENDING_WEST {
@Override
public Set<GlowBlock> getNeighborRails(GlowBlock rail) {
Set<GlowBlock> rails = new HashSet<>();
GlowBlock east = rail.getRelative(BlockFace.EAST);
GlowBlock ascendingWest = rail.getRelative(BlockFace.WEST)
.getRelative(BlockFace.UP);
GlowBlock descendingEast = east.getRelative(BlockFace.DOWN);
if (isRailBlock(ascendingWest)) {
rails.add(ascendingWest);
}
if (isRailBlock(descendingEast)) {
rails.add(descendingEast);
}
if (rails.size() != 2) {
if (isRailBlock(east)) {
rails.add(east);
}
}
return rails;
}
},
ASCENDING_NORTH {
@Override
public Set<GlowBlock> getNeighborRails(GlowBlock rail) {
Set<GlowBlock> rails = new HashSet<>();
GlowBlock south = rail.getRelative(BlockFace.SOUTH);
GlowBlock ascendingNorth = rail.getRelative(BlockFace.NORTH)
.getRelative(BlockFace.UP);
GlowBlock descendingSouth = south.getRelative(BlockFace.DOWN);
if (isRailBlock(ascendingNorth)) {
rails.add(ascendingNorth);
}
if (isRailBlock(descendingSouth)) {
rails.add(descendingSouth);
}
if (rails.size() != 2) {
if (isRailBlock(south)) {
rails.add(south);
}
}
return rails;
}
},
ASCENDING_SOUTH {
@Override
public Set<GlowBlock> getNeighborRails(GlowBlock rail) {
Set<GlowBlock> rails = new HashSet<>();
GlowBlock north = rail.getRelative(BlockFace.NORTH);
GlowBlock ascendingSouth = rail.getRelative(BlockFace.SOUTH)
.getRelative(BlockFace.UP);
GlowBlock descendingNorth = north.getRelative(BlockFace.DOWN);
if (isRailBlock(ascendingSouth)) {
rails.add(ascendingSouth);
}
if (isRailBlock(descendingNorth)) {
rails.add(descendingNorth);
}
if (rails.size() != 2) {
if (isRailBlock(north)) {
rails.add(north);
}
}
return rails;
}
},
SOUTH_EAST {
@Override
public Set<GlowBlock> getNeighborRails(GlowBlock rail) {
Set<GlowBlock> rails = new HashSet<>();
GlowBlock south = rail.getRelative(BlockFace.SOUTH);
GlowBlock east = rail.getRelative(BlockFace.EAST);
if (isRailBlock(south)) {
rails.add(south);
}
if (isRailBlock(east)) {
rails.add(east);
}
if (rails.size() != 2) {
GlowBlock descendingSouth = south.getRelative(BlockFace.DOWN);
GlowBlock descendingEast = east.getRelative(BlockFace.DOWN);
if (isRailBlock(descendingSouth)) {
rails.add(descendingSouth);
}
if (isRailBlock(descendingEast)) {
rails.add(descendingEast);
}
}
return rails;
}
},
SOUTH_WEST {
@Override
public Set<GlowBlock> getNeighborRails(GlowBlock rail) {
Set<GlowBlock> rails = new HashSet<>();
GlowBlock south = rail.getRelative(BlockFace.SOUTH);
GlowBlock west = rail.getRelative(BlockFace.WEST);
if (isRailBlock(south)) {
rails.add(south);
}
if (isRailBlock(west)) {
rails.add(west);
}
if (rails.size() != 2) {
GlowBlock descendingSouth = south.getRelative(BlockFace.DOWN);
GlowBlock descendingWest = west.getRelative(BlockFace.DOWN);
if (isRailBlock(descendingSouth)) {
rails.add(descendingSouth);
}
if (isRailBlock(descendingWest)) {
rails.add(descendingWest);
}
}
return rails;
}
},
NORTH_WEST {
@Override
public Set<GlowBlock> getNeighborRails(GlowBlock rail) {
Set<GlowBlock> rails = new HashSet<>();
GlowBlock north = rail.getRelative(BlockFace.NORTH);
GlowBlock west = rail.getRelative(BlockFace.WEST);
if (isRailBlock(north)) {
rails.add(north);
}
if (isRailBlock(west)) {
rails.add(west);
}
if (rails.size() != 2) {
GlowBlock descendingNorth = north.getRelative(BlockFace.DOWN);
GlowBlock descendingWest = west.getRelative(BlockFace.DOWN);
if (isRailBlock(descendingNorth)) {
rails.add(descendingNorth);
}
if (isRailBlock(descendingWest)) {
rails.add(descendingWest);
}
}
return rails;
}
},
NORTH_EAST {
@Override
public Set<GlowBlock> getNeighborRails(GlowBlock rail) {
Set<GlowBlock> rails = new HashSet<>();
GlowBlock north = rail.getRelative(BlockFace.NORTH);
GlowBlock east = rail.getRelative(BlockFace.EAST);
if (isRailBlock(north)) {
rails.add(north);
}
if (isRailBlock(east)) {
rails.add(east);
}
if (rails.size() != 2) {
GlowBlock descendingNorth = north.getRelative(BlockFace.DOWN);
GlowBlock descendingEast = east.getRelative(BlockFace.DOWN);
if (isRailBlock(descendingNorth)) {
rails.add(descendingNorth);
}
if (isRailBlock(descendingEast)) {
rails.add(descendingEast);
}
}
return rails;
}
};
private static final Map<Byte, RailDirection> dataValues = new HashMap<>();
static {
for (RailDirection direction : RailDirection.values()) {
dataValues.put((byte) direction.ordinal(), direction);
}
}
public static RailDirection getRailDirection(GlowBlock rail) {
return dataValues.get(rail.getData());
}
public abstract Set<GlowBlock> getNeighborRails(GlowBlock rail);
}
}
|
GlowstonePlusPlus/GlowstonePlusPlus
|
src/main/java/net/glowstone/block/blocktype/BlockRails.java
|
Java
|
mit
| 17,768
|
module.exports={A:{A:{"2":"M D H F A B mB"},B:{"1":"K","2":"C E q L O I J"},C:{"1":"0 1 2 3 4 6 8 9 O I J P Q R S T U V W X Y Z a b c d f g h i j k l m n o p N r s t u v w x y z LB BB CB DB EB FB HB IB JB","2":"5 jB AB G M D H F A eB cB","33":"B C E q L"},D:{"1":"0 1 2 3 4 6 8 9 a b c d f g h i j k l m n o p N r s t u v w x y z LB BB CB DB EB FB HB IB JB bB VB PB oB K QB RB SB TB","2":"5 G M D H F A B C E q L O I J P Q R S T U V W X Y Z"},E:{"2":"5 7 G M D H F A B C E UB NB WB XB YB ZB aB e dB KB"},F:{"1":"0 1 2 3 4 8 I J P Q R S T U V W X Y Z a b c d f g h i j k l m n o p N r s t u v w x y z","2":"7 F B C L O fB gB hB iB e MB kB"},G:{"2":"H E NB lB GB nB OB pB qB rB sB tB uB vB wB xB yB KB"},H:{"2":"zB"},I:{"1":"K 4B 5B","2":"AB G 0B 1B 2B 3B GB"},J:{"1":"A","2":"D"},K:{"1":"N","2":"7 A B C e MB"},L:{"1":"K"},M:{"1":"6"},N:{"2":"A B"},O:{"1":"6B"},P:{"1":"G 7B 8B 9B AC BC"},Q:{"1":"CC"},R:{"1":"DC"},S:{"1":"EC"}},B:2,C:"Vibration API"};
|
emccosky/emccosky.github.io
|
node_modules/caniuse-lite/data/features/vibration.js
|
JavaScript
|
mit
| 952
|
// Copyright 2015 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package git
import (
"bytes"
"container/list"
"errors"
"os"
"path"
"path/filepath"
"strings"
"time"
"github.com/Unknwon/com"
)
// Repository represents a Git repository.
type Repository struct {
Path string
commitCache *objectCache
tagCache *objectCache
}
const _PRETTY_LOG_FORMAT = `--pretty=format:%H`
func (repo *Repository) parsePrettyFormatLogToList(logs []byte) (*list.List, error) {
l := list.New()
if len(logs) == 0 {
return l, nil
}
parts := bytes.Split(logs, []byte{'\n'})
for _, commitId := range parts {
commit, err := repo.GetCommit(string(commitId))
if err != nil {
return nil, err
}
l.PushBack(commit)
}
return l, nil
}
type NetworkOptions struct {
URL string
Timeout time.Duration
}
// IsRepoURLAccessible checks if given repository URL is accessible.
func IsRepoURLAccessible(opts NetworkOptions) bool {
cmd := NewCommand("ls-remote", "-q", "-h", opts.URL, "HEAD")
if opts.Timeout <= 0 {
opts.Timeout = -1
}
_, err := cmd.RunTimeout(opts.Timeout)
if err != nil {
return false
}
return true
}
// InitRepository initializes a new Git repository.
func InitRepository(repoPath string, bare bool) error {
os.MkdirAll(repoPath, os.ModePerm)
cmd := NewCommand("init")
if bare {
cmd.AddArguments("--bare")
}
_, err := cmd.RunInDir(repoPath)
return err
}
// OpenRepository opens the repository at the given path.
func OpenRepository(repoPath string) (*Repository, error) {
repoPath, err := filepath.Abs(repoPath)
if err != nil {
return nil, err
} else if !isDir(repoPath) {
return nil, errors.New("no such file or directory")
}
return &Repository{
Path: repoPath,
commitCache: newObjectCache(),
tagCache: newObjectCache(),
}, nil
}
type CloneRepoOptions struct {
Mirror bool
Bare bool
Quiet bool
Branch string
Timeout time.Duration
}
// Clone clones original repository to target path.
func Clone(from, to string, opts CloneRepoOptions) (err error) {
toDir := path.Dir(to)
if err = os.MkdirAll(toDir, os.ModePerm); err != nil {
return err
}
cmd := NewCommand("clone")
if opts.Mirror {
cmd.AddArguments("--mirror")
}
if opts.Bare {
cmd.AddArguments("--bare")
}
if opts.Quiet {
cmd.AddArguments("--quiet")
}
if len(opts.Branch) > 0 {
cmd.AddArguments("-b", opts.Branch)
}
cmd.AddArguments(from, to)
if opts.Timeout <= 0 {
opts.Timeout = -1
}
_, err = cmd.RunTimeout(opts.Timeout)
return err
}
type FetchRemoteOptions struct {
Prune bool
Timeout time.Duration
}
// Fetch fetches changes from remotes without merging.
func Fetch(repoPath string, opts FetchRemoteOptions) error {
cmd := NewCommand("fetch")
if opts.Prune {
cmd.AddArguments("--prune")
}
if opts.Timeout <= 0 {
opts.Timeout = -1
}
_, err := cmd.RunInDirTimeout(opts.Timeout, repoPath)
return err
}
type PullRemoteOptions struct {
All bool
Rebase bool
Remote string
Branch string
Timeout time.Duration
}
// Pull pulls changes from remotes.
func Pull(repoPath string, opts PullRemoteOptions) error {
cmd := NewCommand("pull")
if opts.Rebase {
cmd.AddArguments("--rebase")
}
if opts.All {
cmd.AddArguments("--all")
} else {
cmd.AddArguments(opts.Remote)
cmd.AddArguments(opts.Branch)
}
if opts.Timeout <= 0 {
opts.Timeout = -1
}
_, err := cmd.RunInDirTimeout(opts.Timeout, repoPath)
return err
}
// Push pushs local commits to given remote branch.
func Push(repoPath, remote, branch string) error {
_, err := NewCommand("push", remote, branch).RunInDir(repoPath)
return err
}
type CheckoutOptions struct {
Branch string
OldBranch string
Timeout time.Duration
}
// Checkout checkouts a branch
func Checkout(repoPath string, opts CheckoutOptions) error {
cmd := NewCommand("checkout")
if len(opts.OldBranch) > 0 {
cmd.AddArguments("-b")
}
cmd.AddArguments(opts.Branch)
if len(opts.OldBranch) > 0 {
cmd.AddArguments(opts.OldBranch)
}
if opts.Timeout <= 0 {
opts.Timeout = -1
}
_, err := cmd.RunInDirTimeout(opts.Timeout, repoPath)
return err
}
// ResetHEAD resets HEAD to given revision or head of branch.
func ResetHEAD(repoPath string, hard bool, revision string) error {
cmd := NewCommand("reset")
if hard {
cmd.AddArguments("--hard")
}
_, err := cmd.AddArguments(revision).RunInDir(repoPath)
return err
}
// MoveFile moves a file to another file or directory.
func MoveFile(repoPath, oldTreeName, newTreeName string) error {
_, err := NewCommand("mv").AddArguments(oldTreeName, newTreeName).RunInDir(repoPath)
return err
}
// CountObject represents disk usage report of Git repository.
type CountObject struct {
Count int64
Size int64
InPack int64
Packs int64
SizePack int64
PrunePackable int64
Garbage int64
SizeGarbage int64
}
const (
_STAT_COUNT = "count: "
_STAT_SIZE = "size: "
_STAT_IN_PACK = "in-pack: "
_STAT_PACKS = "packs: "
_STAT_SIZE_PACK = "size-pack: "
_STAT_PRUNE_PACKABLE = "prune-packable: "
_STAT_GARBAGE = "garbage: "
_STAT_SIZE_GARBAGE = "size-garbage: "
)
// GetRepoSize returns disk usage report of repository in given path.
func GetRepoSize(repoPath string) (*CountObject, error) {
cmd := NewCommand("count-objects", "-v")
stdout, err := cmd.RunInDir(repoPath)
if err != nil {
return nil, err
}
countObject := new(CountObject)
for _, line := range strings.Split(stdout, "\n") {
switch {
case strings.HasPrefix(line, _STAT_COUNT):
countObject.Count = com.StrTo(line[7:]).MustInt64()
case strings.HasPrefix(line, _STAT_SIZE):
countObject.Size = com.StrTo(line[6:]).MustInt64() * 1024
case strings.HasPrefix(line, _STAT_IN_PACK):
countObject.InPack = com.StrTo(line[9:]).MustInt64() * 1024
case strings.HasPrefix(line, _STAT_PACKS):
countObject.Packs = com.StrTo(line[7:]).MustInt64()
case strings.HasPrefix(line, _STAT_SIZE_PACK):
countObject.SizePack = com.StrTo(line[11:]).MustInt64() * 1024
case strings.HasPrefix(line, _STAT_PRUNE_PACKABLE):
countObject.PrunePackable = com.StrTo(line[16:]).MustInt64()
case strings.HasPrefix(line, _STAT_GARBAGE):
countObject.Garbage = com.StrTo(line[9:]).MustInt64()
case strings.HasPrefix(line, _STAT_SIZE_GARBAGE):
countObject.SizeGarbage = com.StrTo(line[14:]).MustInt64() * 1024
}
}
return countObject, nil
}
|
liliexuan/gogs
|
vendor/github.com/gogits/git-module/repo.go
|
GO
|
mit
| 6,511
|
/* ----------------
ResponsiveTabs.js
Author: Pete Love | www.petelove.com
Version: 1.10
------------------- */
var RESPONSIVEUI = {};
(function($) {
RESPONSIVEUI.responsiveTabs = function () {
var $tabSets = $('.responsive-tabs');
if (!$tabSets.hasClass('responsive-tabs--enabled')) { // if we haven't already called this function and enabled tabs
$tabSets.addClass('responsive-tabs--enabled');
//loop through all sets of tabs on the page
var tablistcount = 1;
$tabSets.each(function() {
var $tabs = $(this);
// add tab heading and tab panel classes
$tabs.children(':header').addClass('responsive-tabs__heading');
$tabs.children('div').addClass('responsive-tabs__panel');
// determine if markup already identifies the active tab panel for this set of tabs
// if not then set first heading and tab to be the active one
var $activePanel = $tabs.find('.responsive-tabs__panel--active');
if(!$activePanel.length) {
$activePanel = $tabs.find('.responsive-tabs__panel').first().addClass('responsive-tabs__panel--active');
}
$tabs.find('.responsive-tabs__panel').not('.responsive-tabs__panel--active').hide().attr('aria-hidden','true'); //hide all except active panel
$activePanel.attr('aria-hidden', 'false');
/* make active tab panel hidden for mobile */
$activePanel.addClass('responsive-tabs__panel--closed-accordion-only');
// wrap tabs in container - to be dynamically resized to help prevent page jump
var $tabsWrapper = $('<div/>', {'class': 'responsive-tabs-wrapper' });
$tabs.wrap($tabsWrapper);
var highestHeight = 0;
// determine height of tallest tab panel. Used later to prevent page jump when tabs are clicked
$tabs.find('.responsive-tabs__panel').each(function() {
var tabHeight = $(this).height();
if (tabHeight > highestHeight) {
highestHeight = tabHeight;
}
});
//create the tab list
var $tabList = $('<ul/>', { 'class': 'responsive-tabs__list', 'role': 'tablist' });
//loop through each heading in set
var tabcount = 1;
$tabs.find('.responsive-tabs__heading').each(function() {
var $tabHeading = $(this);
var $tabPanel = $(this).next();
$tabHeading.attr('tabindex', 0);
// CREATE TAB ITEMS (VISIBLE ON DESKTOP)
//create tab list item from heading
//associate tab list item with tab panel
var $tabListItem = $('<li/>', {
'class': 'responsive-tabs__list__item',
id: 'tablist' + tablistcount + '-tab' + tabcount,
'aria-controls': 'tablist' + tablistcount +'-panel' + tabcount,
'role': 'tab',
tabindex: 0,
text: $tabHeading.text(),
keydown: function (objEvent) {
if (objEvent.keyCode === 13) { // if user presses 'enter'
$tabListItem.click();
}
},
click: function() {
//Show associated panel
//set height of tab container to highest panel height to avoid page jump
$tabsWrapper.css('height', highestHeight);
// remove hidden mobile class from any other panel as we'll want that panel to be open at mobile size
$tabs.find('.responsive-tabs__panel--closed-accordion-only').removeClass('responsive-tabs__panel--closed-accordion-only');
// close current panel and remove active state from its (hidden on desktop) heading
$tabs.find('.responsive-tabs__panel--active').toggle().removeClass('responsive-tabs__panel--active').attr('aria-hidden','true').prev().removeClass('responsive-tabs__heading--active');
//make this tab panel active
$tabPanel.toggle().addClass('responsive-tabs__panel--active').attr('aria-hidden','false');
//make the hidden heading active
$tabHeading.addClass('responsive-tabs__heading--active');
//remove active state from currently active tab list item
$tabList.find('.responsive-tabs__list__item--active').removeClass('responsive-tabs__list__item--active');
//make this tab active
$tabListItem.addClass('responsive-tabs__list__item--active');
//reset height of tab panels to auto
$tabsWrapper.css('height', 'auto');
}
});
//associate tab panel with tab list item
$tabPanel.attr({
'role': 'tabpanel',
'aria-labelledby': $tabListItem.attr('id'),
id: 'tablist' + tablistcount + '-panel' + tabcount
});
// if this is the active panel then make it the active tab item
if($tabPanel.hasClass('responsive-tabs__panel--active')) {
$tabListItem.addClass('responsive-tabs__list__item--active');
}
// add tab item
$tabList.append($tabListItem);
// TAB HEADINGS (VISIBLE ON MOBILE)
// if user presses 'enter' on tab heading trigger the click event
$tabHeading.keydown(function(objEvent) {
if (objEvent.keyCode === 13) {
$tabHeading.click();
}
});
//toggle tab panel if click heading (on mobile)
$tabHeading.click(function() {
// remove any hidden mobile class
$tabs.find('.responsive-tabs__panel--closed-accordion-only').removeClass('responsive-tabs__panel--closed-accordion-only');
// if this isn't currently active
if (!$tabHeading.hasClass('responsive-tabs__heading--active')){
var oldActivePos,
$activeHeading = $tabs.find('.responsive-tabs__heading--active');
// if there is an active heading, get its position
if($activeHeading.length) {
oldActivePos = $activeHeading.offset().top;
}
// close currently active panel and remove active state from any hidden heading
$tabs.find('.responsive-tabs__panel--active').slideToggle().removeClass('responsive-tabs__panel--active').prev().removeClass('responsive-tabs__heading--active');
//close all tabs
$tabs.find('.responsive-tabs__panel').hide().attr('aria-hidden','true');
//open this panel
$tabPanel.slideToggle().addClass('responsive-tabs__panel--active').attr('aria-hidden','false');
// make this heading active
$tabHeading.addClass('responsive-tabs__heading--active');
var $currentActive = $tabs.find('.responsive-tabs__list__item--active');
//set the active tab list item (for desktop)
$currentActive.removeClass('responsive-tabs__list__item--active');
var panelId = $tabPanel.attr('id');
var tabId = panelId.replace('panel','tab');
$('#' + tabId).addClass('responsive-tabs__list__item--active');
//scroll to active heading only if it is below previous one
var tabsPos = $tabs.offset().top;
var newActivePos = ($tabHeading.offset().top) - 15;
if(oldActivePos < newActivePos) {
$('html, body').animate({ scrollTop: tabsPos }, 0).animate({ scrollTop: newActivePos }, 400);
}
}
// if this tab panel is already active
else {
// hide panel but give it special responsive-tabs__panel--closed-accordion-only class so that it can be visible at desktop size
$tabPanel.removeClass('responsive-tabs__panel--active').slideToggle(function () { $(this).addClass('responsive-tabs__panel--closed-accordion-only'); });
//remove active heading class
$tabHeading.removeClass('responsive-tabs__heading--active');
//don't alter classes on tabs as we want it active if put back to desktop size
}
});
tabcount ++;
});
// add finished tab list to its container
$tabs.prepend($tabList);
// next set of tabs on page
tablistcount ++;
});
}
};
})(jQuery);
|
anniyananeesh/avenirevents
|
js/assets/responsiveTabs.js
|
JavaScript
|
mit
| 7,818
|
// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System.Diagnostics.Contracts;
using System;
using System.Collections.Generic;
using Perspex.Interactivity;
namespace Perspex.Input
{
/// <summary>
/// Defines input-related functionality for a control.
/// </summary>
public interface IInputElement : IInteractive, IVisual
{
/// <summary>
/// Occurs when the control receives focus.
/// </summary>
event EventHandler<RoutedEventArgs> GotFocus;
/// <summary>
/// Occurs when the control loses focus.
/// </summary>
event EventHandler<RoutedEventArgs> LostFocus;
/// <summary>
/// Occurs when a key is pressed while the control has focus.
/// </summary>
event EventHandler<KeyEventArgs> KeyDown;
/// <summary>
/// Occurs when a key is released while the control has focus.
/// </summary>
event EventHandler<KeyEventArgs> KeyUp;
/// <summary>
/// Occurs when a user typed some text while the control has focus.
/// </summary>
event EventHandler<TextInputEventArgs> TextInput;
/// <summary>
/// Occurs when the pointer enters the control.
/// </summary>
event EventHandler<PointerEventArgs> PointerEnter;
/// <summary>
/// Occurs when the pointer leaves the control.
/// </summary>
event EventHandler<PointerEventArgs> PointerLeave;
/// <summary>
/// Occurs when the pointer is pressed over the control.
/// </summary>
event EventHandler<PointerPressEventArgs> PointerPressed;
/// <summary>
/// Occurs when the pointer moves over the control.
/// </summary>
event EventHandler<PointerEventArgs> PointerMoved;
/// <summary>
/// Occurs when the pointer is released over the control.
/// </summary>
event EventHandler<PointerReleasedEventArgs> PointerReleased;
/// <summary>
/// Occurs when the mouse wheen is scrolled over the control.
/// </summary>
event EventHandler<PointerWheelEventArgs> PointerWheelChanged;
/// <summary>
/// Gets or sets a value indicating whether the control can receive keyboard focus.
/// </summary>
bool Focusable { get; }
/// <summary>
/// Gets or sets a value indicating whether the control is enabled for user interaction.
/// </summary>
bool IsEnabled { get; }
/// <summary>
/// Gets or sets the associated mouse cursor.
/// </summary>
Cursor Cursor { get; }
/// <summary>
/// Gets a value indicating whether the control is effectively enabled for user interaction.
/// </summary>
/// <remarks>
/// The <see cref="IsEnabled"/> property is used to toggle the enabled state for individual
/// controls. The <see cref="IsEnabledCore"/> property takes into account the
/// <see cref="IsEnabled"/> value of this control and its parent controls.
/// </remarks>
bool IsEnabledCore { get; }
/// <summary>
/// Gets or sets a value indicating whether the control is focused.
/// </summary>
bool IsFocused { get; }
/// <summary>
/// Gets or sets a value indicating whether the control is considered for hit testing.
/// </summary>
bool IsHitTestVisible { get; }
/// <summary>
/// Gets or sets a value indicating whether the pointer is currently over the control.
/// </summary>
bool IsPointerOver { get; }
/// <summary>
/// Focuses the control.
/// </summary>
void Focus();
/// <summary>
/// Gets the key bindings for the element.
/// </summary>
List<KeyBinding> KeyBindings { get; }
}
}
|
danwalmsley/Perspex
|
src/Perspex.Input/IInputElement.cs
|
C#
|
mit
| 4,050
|
const glob = require('glob');
const fs = require('fs');
const path = require('path');
const request = require('request');
const checkedUrls = {
'src/archive/index.php': '',
};
function getUrlContents(url) {
return new Promise(function(resolve, reject) {
request(
url,
{ followRedirect: false, followAllRedirects: false, headers: { 'Cache-Control': 'no-cache' } },
(error, response, body) => resolve([response.statusCode, body]));
});
}
function createUrl(file) {
return 'http://localhost:8080/' + file.replace('src/', '');
}
async function isValidUrl(file, url, id) {
let isValid = false;
const currentDirectory = path.dirname(file);
let targetPath;
if (url.startsWith('#')) {
targetPath = file;
} else {
targetPath = path.join(url.startsWith('/') ? 'src' : currentDirectory, url.split('?')[0]);
}
if (targetPath.endsWith('/')) {
targetPath = path.join(targetPath, 'index.php');
}
if (checkedUrls[targetPath] !== undefined || fs.existsSync(targetPath)) {
if (id) {
if (!checkedUrls[targetPath]) {
const [statusCode, contents] = await getUrlContents(createUrl(targetPath));
if (statusCode === 200) {
checkedUrls[targetPath] = contents;
}
}
const html = checkedUrls[targetPath];
const idExists = new RegExp(`id=["']${id}["']`).test(html);
const generatedIds = [];
if (!idExists) {
const headerPattern = /<h([1-4])>(.+)<\/h\1>/g;
let matches;
while ((matches = headerPattern.exec(html))) {
const generatedId = matches[2]
.replace(/<\/?[^\>]+\>/g, '')
.replace(/[^\w\d\s\(\.\-]/g, '')
.replace(/[\s\(\.]/g, '-')
.toLowerCase();
generatedIds.push(generatedId);
}
}
isValid = idExists || generatedIds.indexOf(id) >= 0;
} else {
isValid = true;
if (checkedUrls[targetPath] === undefined) {
checkedUrls[targetPath] = '';
}
}
}
return isValid;
}
async function verifyFile(file) {
const regex = /<a.*href=['"]([^'"]+)['"]/g;
const [statusCode, contents] = await getUrlContents(createUrl(file));
if (statusCode !== 200) {
//console.log(`\u2753 Ignoring ${file} (${statusCode})`);
}
let matches;
let urlCount = 0;
let validUrls = [];
let invalidUrls = [];
let ignoredUrls = [];
while ((matches = regex.exec(contents))) {
const [urlMatch] = matches.slice(1);
const [url, id] = urlMatch.split('#');
const ignoreList = ['mailto:', 'dist/', 'http'];
if (ignoreList.some(x => url.startsWith(x)) || (id && id.startsWith('example-'))) {
ignoredUrls.push(url);
} else {
const isValid = await isValidUrl(file, url, id);
if (isValid) {
validUrls.push(urlMatch);
} else {
invalidUrls.push(urlMatch);
}
}
urlCount++;
}
if (invalidUrls.length) {
console.log(`\u274C Found errors in ${file}. Invalid URLs found linking to:\n-> ${invalidUrls.join('\n-> ')}`);
} else {
//console.log(`\u2714 Verified ${validUrls.length} links in ${file} (ignored ${ignoredUrls.length})`);
}
}
async function asyncForEach(array, callback) {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
}
}
glob('src/javascript-*/*.php', {}, async (_, files) => await asyncForEach(files, verifyFile));
|
ceolter/angular-grid
|
grid-packages/ag-grid-docs/link-checker.js
|
JavaScript
|
mit
| 3,830
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.