repo_name
stringlengths
4
116
path
stringlengths
3
942
size
stringlengths
1
7
content
stringlengths
3
1.05M
license
stringclasses
15 values
nvngithub/nvntest
NvnTest.Employer/schedules/report/datagrid print/PrintBlock.cs
788
using System.Collections.Generic; using System.Drawing; namespace NvnTest.Employer { /// <author>Blaise Braye</author> /// <summary> /// GridDrawer is able to draw object inherited from this class, /// a common use case for GridDraw is to call GetSize method first, /// then setting a Rectangle in which the Draw method will be allowed to print. /// It's usefull for everyone because it allows to defines some blocks to be printed /// without modifying library core /// </summary> public abstract class PrintBlock { public virtual RectangleF Rectangle { get; set; } public abstract SizeF GetSize(Graphics g, DocumentMetrics metrics); public abstract void Draw(Graphics g, Dictionary<CodeEnum, string> codes); } }
gpl-3.0
UnsafeDriving/JDIY
web/jdiy/admin/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.js
10258
/* jshint expr: true */ !(function($, wysi) { 'use strict'; var templates = function(key, locale, options) { return wysi.tpl[key]({locale: locale, options: options}); }; var Wysihtml5 = function(el, options) { this.el = el; var toolbarOpts = options || defaultOptions; for(var t in toolbarOpts.customTemplates) { wysi.tpl[t] = toolbarOpts.customTemplates[t]; } this.toolbar = this.createToolbar(el, toolbarOpts); this.editor = this.createEditor(options); window.editor = this.editor; $('iframe.wysihtml5-sandbox').each(function(i, el){ $(el.contentWindow).off('focus.wysihtml5').on({ 'focus.wysihtml5' : function(){ $('li.dropdown').removeClass('open'); } }); }); }; Wysihtml5.prototype = { constructor: Wysihtml5, createEditor: function(options) { options = options || {}; // Add the toolbar to a clone of the options object so multiple instances // of the WYISYWG don't break because 'toolbar' is already defined options = $.extend(true, {}, options); options.toolbar = this.toolbar[0]; var editor = new wysi.Editor(this.el[0], options); if(options && options.events) { for(var eventName in options.events) { editor.on(eventName, options.events[eventName]); } } return editor; }, createToolbar: function(el, options) { var self = this; var toolbar = $('<ul/>', { 'class' : 'wysihtml5-toolbar', 'style': 'display:none' }); var culture = options.locale || defaultOptions.locale || 'en'; for(var key in defaultOptions) { var value = false; if(options[key] !== undefined) { if(options[key] === true) { value = true; } } else { value = defaultOptions[key]; } if(value === true) { toolbar.append(templates(key, locale[culture], options)); if(key === 'html') { this.initHtml(toolbar); } if(key === 'link') { this.initInsertLink(toolbar); } if(key === 'image') { this.initInsertImage(toolbar); } } } if(options.toolbar) { for(key in options.toolbar) { toolbar.append(options.toolbar[key]); } } toolbar.find('a[data-wysihtml5-command="formatBlock"]').click(function(e) { var target = e.target || e.srcElement; var el = $(target); self.toolbar.find('.current-font').text(el.html()); }); toolbar.find('a[data-wysihtml5-command="foreColor"]').click(function(e) { var target = e.target || e.srcElement; var el = $(target); self.toolbar.find('.current-color').text(el.html()); }); this.el.before(toolbar); return toolbar; }, initHtml: function(toolbar) { var changeViewSelector = 'a[data-wysihtml5-action="change_view"]'; toolbar.find(changeViewSelector).click(function(e) { toolbar.find('a.btn').not(changeViewSelector).toggleClass('disabled'); }); }, initInsertImage: function(toolbar) { var self = this; var insertImageModal = toolbar.find('.bootstrap-wysihtml5-insert-image-modal'); var urlInput = insertImageModal.find('.bootstrap-wysihtml5-insert-image-url'); var insertButton = insertImageModal.find('a.btn-primary'); var initialValue = urlInput.val(); var caretBookmark; var insertImage = function() { var url = urlInput.val(); urlInput.val(initialValue); self.editor.currentView.element.focus(); if (caretBookmark) { self.editor.composer.selection.setBookmark(caretBookmark); caretBookmark = null; } self.editor.composer.commands.exec('insertImage', url); }; urlInput.keypress(function(e) { if(e.which == 13) { insertImage(); insertImageModal.modal('hide'); } }); insertButton.click(insertImage); insertImageModal.on('shown', function() { urlInput.focus(); }); insertImageModal.on('hide', function() { self.editor.currentView.element.focus(); }); toolbar.find('a[data-wysihtml5-command=insertImage]').click(function() { var activeButton = $(this).hasClass('wysihtml5-command-active'); if (!activeButton) { self.editor.currentView.element.focus(false); caretBookmark = self.editor.composer.selection.getBookmark(); insertImageModal.appendTo('body').modal('show'); insertImageModal.on('click.dismiss.modal', '[data-dismiss="modal"]', function(e) { e.stopPropagation(); }); return false; } else { return true; } }); }, initInsertLink: function(toolbar) { var self = this; var insertLinkModal = toolbar.find('.bootstrap-wysihtml5-insert-link-modal'); var urlInput = insertLinkModal.find('.bootstrap-wysihtml5-insert-link-url'); var targetInput = insertLinkModal.find('.bootstrap-wysihtml5-insert-link-target'); var insertButton = insertLinkModal.find('a.btn-primary'); var initialValue = urlInput.val(); var caretBookmark; var insertLink = function() { var url = urlInput.val(); urlInput.val(initialValue); self.editor.currentView.element.focus(); if (caretBookmark) { self.editor.composer.selection.setBookmark(caretBookmark); caretBookmark = null; } var newWindow = targetInput.prop('checked'); self.editor.composer.commands.exec('createLink', { 'href' : url, 'target' : (newWindow ? '_blank' : '_self'), 'rel' : (newWindow ? 'nofollow' : '') }); }; var pressedEnter = false; urlInput.keypress(function(e) { if(e.which == 13) { insertLink(); insertLinkModal.modal('hide'); } }); insertButton.click(insertLink); insertLinkModal.on('shown', function() { urlInput.focus(); }); insertLinkModal.on('hide', function() { self.editor.currentView.element.focus(); }); toolbar.find('a[data-wysihtml5-command=createLink]').click(function() { var activeButton = $(this).hasClass('wysihtml5-command-active'); if (!activeButton) { self.editor.currentView.element.focus(false); caretBookmark = self.editor.composer.selection.getBookmark(); insertLinkModal.appendTo('body').modal('show'); insertLinkModal.on('click.dismiss.modal', '[data-dismiss="modal"]', function(e) { e.stopPropagation(); }); return false; } else { return true; } }); } }; // these define our public api var methods = { resetDefaults: function() { $.fn.wysihtml5.defaultOptions = $.extend(true, {}, $.fn.wysihtml5.defaultOptionsCache); }, bypassDefaults: function(options) { return this.each(function () { var $this = $(this); $this.data('wysihtml5', new Wysihtml5($this, options)); }); }, shallowExtend: function (options) { var settings = $.extend({}, $.fn.wysihtml5.defaultOptions, options || {}, $(this).data()); var that = this; return methods.bypassDefaults.apply(that, [settings]); }, deepExtend: function(options) { var settings = $.extend(true, {}, $.fn.wysihtml5.defaultOptions, options || {}); var that = this; return methods.bypassDefaults.apply(that, [settings]); }, init: function(options) { var that = this; return methods.shallowExtend.apply(that, [options]); } }; $.fn.wysihtml5 = function ( method ) { if ( methods[method] ) { return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 )); } else if ( typeof method === 'object' || ! method ) { return methods.init.apply( this, arguments ); } else { $.error( 'Method ' + method + ' does not exist on jQuery.wysihtml5' ); } }; $.fn.wysihtml5.Constructor = Wysihtml5; var defaultOptions = $.fn.wysihtml5.defaultOptions = { 'font-styles': true, 'color': false, 'emphasis': true, 'lists': true, 'html': false, 'link': true, 'image': true, events: {}, parserRules: { classes: { 'wysiwyg-color-silver' : 1, 'wysiwyg-color-gray' : 1, 'wysiwyg-color-white' : 1, 'wysiwyg-color-maroon' : 1, 'wysiwyg-color-red' : 1, 'wysiwyg-color-purple' : 1, 'wysiwyg-color-fuchsia' : 1, 'wysiwyg-color-green' : 1, 'wysiwyg-color-lime' : 1, 'wysiwyg-color-olive' : 1, 'wysiwyg-color-yellow' : 1, 'wysiwyg-color-navy' : 1, 'wysiwyg-color-blue' : 1, 'wysiwyg-color-teal' : 1, 'wysiwyg-color-aqua' : 1, 'wysiwyg-color-orange' : 1 }, tags: { 'b': {}, 'i': {}, 'strong': {}, 'em': {}, 'p': {}, 'br': {}, 'ol': {}, 'ul': {}, 'li': {}, 'h1': {}, 'h2': {}, 'h3': {}, 'h4': {}, 'h5': {}, 'h6': {}, 'blockquote': {}, 'u': 1, 'img': { 'check_attributes': { 'width': 'numbers', 'alt': 'alt', 'src': 'url', 'height': 'numbers' } }, 'a': { check_attributes: { 'href': 'url' // important to avoid XSS }, 'set_attributes': { 'target': '_blank', 'rel': 'nofollow' } }, 'span': 1, 'div': 1, // to allow save and edit files with code tag hacks 'code': 1, 'pre': 1 } }, locale: 'fr' }; if (typeof $.fn.wysihtml5.defaultOptionsCache === 'undefined') { $.fn.wysihtml5.defaultOptionsCache = $.extend(true, {}, $.fn.wysihtml5.defaultOptions); } var locale = $.fn.wysihtml5.locale = {}; })(window.jQuery, window.wysihtml5);
gpl-3.0
aarmenia830/Auxiliorum
README.md
74
Auxiliorum ========== a mod that should add helpful things that are cool
gpl-3.0
ohad258/sof2utils
FairplayRequester.py
471
import requests import re def request_by_ip(ip): response = {} request = requests.get("http://www.fairplay.ac/lookup/address/{}".format(ip)) assert request.status_code == 200 output = re.findall("Fairplay Guid: ([a-zA-Z0-9]{5})", request.text) if len(output) == 0: return None response["guid"] = output[0] response["fairshots"] = re.findall("reportFairshot\('(.*?)','(.*?)','(.*?)','(.*?)','(.*?)'", request.text) return response
gpl-3.0
Microsoft/o365-moodle
local/o365/classes/utils.php
15728
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * @package local_o365 * @author James McQuillan <james.mcquillan@remote-learner.net> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @copyright (C) 2014 onwards Microsoft, Inc. (http://microsoft.com/) */ namespace local_o365; /** * General purpose utility class. */ class utils { /** * Determine whether the plugins are configured. * * Determines whether essential configuration has been completed. * * @return bool Whether the plugins are configured. */ public static function is_configured() { $cfg = get_config('auth_oidc'); if (empty($cfg) || !is_object($cfg)) { return false; } if (empty($cfg->clientid) || empty($cfg->clientsecret) || empty($cfg->authendpoint) || empty($cfg->tokenendpoint)) { return false; } return true; } /** * Determine whether the local_msaccount plugin is configured. * * @return bool Whether the plugins are configured. */ public static function is_configured_msaccount() { if (!class_exists('\local_msaccount\client')) { return false; } $cfg = get_config('local_msaccount'); if (empty($cfg) || !is_object($cfg)) { return false; } if (empty($cfg->clientid) || empty($cfg->clientsecret) || empty($cfg->authendpoint) || empty($cfg->tokenendpoint)) { return false; } return true; } /** * Get an app token if available or fall back to system API user token. * * @param string $tokenresource The desired resource. * @param \local_o365\oauth2\clientdata $clientdata Client credentials. * @param \local_o365\httpclientinterface $httpclient An HTTP client. * @param bool $forcecreate * * @return \local_o365\oauth2\apptoken|\local_o365\oauth2\systemapiusertoken An app or system token. */ public static function get_app_or_system_token($tokenresource, $clientdata, $httpclient, $forcecreate = false) { $token = null; try { if (static::is_configured_apponlyaccess() === true) { $token = \local_o365\oauth2\apptoken::instance(null, $tokenresource, $clientdata, $httpclient, $forcecreate); } } catch (\Exception $e) { static::debug($e->getMessage(), 'get_app_or_system_token (app)', $e); } if (empty($token)) { try { $token = \local_o365\oauth2\systemapiusertoken::instance(null, $tokenresource, $clientdata, $httpclient); } catch (\Exception $e) { static::debug($e->getMessage(), 'get_app_or_system_token (system)', $e); } } if (!empty($token)) { return $token; } else { throw new \Exception('Could not get app or system token'); } } /** * Get the tenant from an ID Token. * * @param \auth_oidc\jwt $idtoken The ID token. * @return string|null The tenant, or null is failure. */ public static function get_tenant_from_idtoken(\auth_oidc\jwt $idtoken) { $iss = $idtoken->claim('iss'); $parsediss = parse_url($iss); if (!empty($parsediss['path'])) { $tenant = trim($parsediss['path'], '/'); if (!empty($tenant)) { return $tenant; } } return null; } /** * Determine whether app-only access is enabled. * * @return bool Enabled/disabled. */ public static function is_enabled_apponlyaccess() { $apponlyenabled = get_config('local_o365', 'enableapponlyaccess'); return (!empty($apponlyenabled)) ? true : false; } /** * Determine whether the app only access is configured. * * @return bool Whether the app only access is configured. */ public static function is_configured_apponlyaccess() { // App only access requires unified api to be enabled. $apponlyenabled = static::is_enabled_apponlyaccess(); if (empty($apponlyenabled)) { return false; } $aadtenant = get_config('local_o365', 'aadtenant'); $aadtenantid = get_config('local_o365', 'aadtenantid'); if (empty($aadtenant) && empty($aadtenantid)) { return false; } return true; } /** * Determine whether app-only access is both configured and active. * * @return bool Whether app-only access is active. */ public static function is_active_apponlyaccess() { return (static::is_configured_apponlyaccess() === true && \local_o365\rest\unified::is_configured() === true) ? true : false; } /** * Filters an array of userids to users that are currently connected to O365. * * @param array $userids The full array of userids. * @return array Array of userids that are o365 connected. */ public static function limit_to_o365_users($userids) { global $DB; if (empty($userids)) { return []; } $aadresource = \local_o365\rest\azuread::get_tokenresource(); list($idsql, $idparams) = $DB->get_in_or_equal($userids); $sql = 'SELECT u.id as userid FROM {user} u LEFT JOIN {local_o365_token} localtok ON localtok.user_id = u.id LEFT JOIN {auth_oidc_token} authtok ON authtok.tokenresource = ? AND authtok.userid = u.id WHERE u.id ' . $idsql . ' AND (localtok.id IS NOT NULL OR authtok.id IS NOT NULL)'; $params = [$aadresource]; $params = array_merge($params, $idparams); $records = $DB->get_recordset_sql($sql, $params); $return = []; foreach ($records as $record) { $return[$record->userid] = (int)$record->userid; } return array_values($return); } /** * Get the UPN of the connected Microsoft 365 account. * * @param int $userid The Moodle user id. * @return string|null The UPN of the connected Microsoft 365 account, or null if none found. */ public static function get_o365_upn($userid) { $o365user = \local_o365\obj\o365user::instance_from_muserid($userid); return (!empty($o365user)) ? $o365user->upn : null; } /** * Determine if a user is connected to Microsoft 365. * * @param int $userid The user's ID. * @return bool Whether they are connected (true) or not (false). */ public static function is_o365_connected($userid) { global $DB; $o365user = \local_o365\obj\o365user::instance_from_muserid($userid); return (!empty($o365user)) ? true : false; } /** * Convert any value into a debuggable string. * * @param mixed $val The variable to convert. * @return string A string representation. */ public static function tostring($val) { if (is_scalar($val)) { if (is_bool($val)) { return '(bool)'.(string)(int)$val; } else { return '('.gettype($val).')'.(string)$val; } } else if (is_null($val)) { return '(null)'; } else if ($val instanceof \Exception) { $valinfo = [ 'file' => $val->getFile(), 'line' => $val->getLine(), 'message' => $val->getMessage(), ]; if ($val instanceof \moodle_exception) { $valinfo['debuginfo'] = $val->debuginfo; $valinfo['errorcode'] = $val->errorcode; $valinfo['module'] = $val->module; } return print_r($valinfo, true); } else { return print_r($val, true); } } /** * Record a debug message. * * @param string $message The debug message to log. */ public static function debug($message, $where = '', $debugdata = null) { $debugmode = (bool)get_config('local_o365', 'debugmode'); if ($debugmode === true) { $fullmessage = (!empty($where)) ? $where : 'Unknown function'; $fullmessage .= ': '.$message; $fullmessage .= ' Data: '.static::tostring($debugdata); $event = \local_o365\event\api_call_failed::create(['other' => $fullmessage]); $event->trigger(); } } /** * Construct an API client. * * @return \local_o365\rest\o365api|bool A constructed user API client (unified or legacy), or throw an error. */ public static function get_api($userid = null, $forcelegacy = false, $caller = 'get_api') { if ($forcelegacy) { $unifiedconfigured = false; } else { $unifiedconfigured = \local_o365\rest\unified::is_configured(); } if ($unifiedconfigured === true) { $tokenresource = \local_o365\rest\unified::get_tokenresource(); } else { $tokenresource = \local_o365\rest\azuread::get_tokenresource(); } $clientdata = \local_o365\oauth2\clientdata::instance_from_oidc(); $httpclient = new \local_o365\httpclient(); if (!empty($userid)) { $token = \local_o365\oauth2\token::instance($userid, $tokenresource, $clientdata, $httpclient); } else { $token = \local_o365\utils::get_app_or_system_token($tokenresource, $clientdata, $httpclient); } if (empty($token)) { throw new \Exception('No token available for system user. Please run local_o365 health check.'); } if ($unifiedconfigured === true) { $apiclient = new \local_o365\rest\unified($token, $httpclient); } else { $apiclient = new \local_o365\rest\azuread($token, $httpclient); } return $apiclient; } /** * Enable an additional Microsoft 365 tenant/ */ public static function enableadditionaltenant($tenant) { $configuredtenants = get_config('local_o365', 'multitenants'); if (!empty($configuredtenants)) { $configuredtenants = json_decode($configuredtenants, true); if (!is_array($configuredtenants)) { $configuredtenants = []; } } $configuredtenants[] = $tenant; $configuredtenants = array_unique($configuredtenants); set_config('multitenants', json_encode($configuredtenants), 'local_o365'); // Generate restrictions. $newrestrictions = []; $o365config = get_config('local_o365'); array_unshift($configuredtenants, $o365config->aadtenant); foreach ($configuredtenants as $configuredtenant) { $newrestriction = '@'; $newrestriction .= str_replace('.', '\.', $configuredtenant); $newrestriction .= '$'; $newrestrictions[] = $newrestriction; } $userrestrictions = get_config('auth_oidc', 'userrestrictions'); $userrestrictions = explode("\n", $userrestrictions); $userrestrictions = array_merge($userrestrictions, $newrestrictions); $userrestrictions = array_unique($userrestrictions); $userrestrictions = implode("\n", $userrestrictions); set_config('userrestrictions', $userrestrictions, 'auth_oidc'); } /** * Disable an additional Microsoft 365 tenant. */ public static function disableadditionaltenant($tenant) { $o365config = get_config('local_o365'); if (empty($o365config->multitenants)) { return true; } $configuredtenants = json_decode($o365config->multitenants, true); if (!is_array($configuredtenants)) { $configuredtenants = []; } $configuredtenants = array_diff($configuredtenants, [$tenant]); set_config('multitenants', json_encode($configuredtenants), 'local_o365'); // Update restrictions. $userrestrictions = get_config('auth_oidc', 'userrestrictions'); $userrestrictions = (!empty($userrestrictions)) ? explode("\n", $userrestrictions) : []; $regex = '@'.str_replace('.', '\.', $tenant).'$'; $userrestrictions = array_diff($userrestrictions, [$regex]); $userrestrictions = implode("\n", $userrestrictions); set_config('userrestrictions', $userrestrictions, 'auth_oidc'); } /** * Get the tenant for a user. * * @param int $userid The ID of the user. * @return string The tenant for the user. Empty string unless different from the host tenant. */ public static function get_tenant_for_user($userid) { try { $clientdata = \local_o365\oauth2\clientdata::instance_from_oidc(); $httpclient = new \local_o365\httpclient(); $tokenresource = (\local_o365\rest\unified::is_enabled() === true) ? \local_o365\rest\unified::get_tokenresource() : \local_o365\rest\discovery::get_tokenresource(); $token = \local_o365\oauth2\token::instance($userid, $tokenresource, $clientdata, $httpclient); if (!empty($token)) { $apiclient = (\local_o365\rest\unified::is_enabled() === true) ? new \local_o365\rest\unified($token, $httpclient) : new \local_o365\rest\discovery($token, $httpclient); $tenant = $apiclient->get_tenant(); $tenant = clean_param($tenant, PARAM_TEXT); return ($tenant != get_config('local_o365', 'aadtenant')) ? $tenant : ''; } } catch (\Exception $e) { } return ''; } /** * Get the OneDrive for Business URL for a user. * * @param int $userid The ID of the user. * @return string The OneDrive for Business URL for the user. */ public static function get_odburl_for_user($userid) { try { $clientdata = \local_o365\oauth2\clientdata::instance_from_oidc(); $httpclient = new \local_o365\httpclient(); $tokenresource = (\local_o365\rest\unified::is_enabled() === true) ? \local_o365\rest\unified::get_tokenresource() : \local_o365\rest\discovery::get_tokenresource(); $token = \local_o365\oauth2\token::instance($userid, $tokenresource, $clientdata, $httpclient); if (!empty($token)) { $apiclient = (\local_o365\rest\unified::is_enabled() === true) ? new \local_o365\rest\unified($token, $httpclient) : new \local_o365\rest\discovery($token, $httpclient); $tenant = $apiclient->get_odburl(); $tenant = clean_param($tenant, PARAM_TEXT); return ($tenant != get_config('local_o365', 'odburl')) ? $tenant : ''; } } catch (\Exception $e) { } return ''; } }
gpl-3.0
Bourbbbon/PickleRi6
actions/leave_voice_channel.js
3272
module.exports = { //--------------------------------------------------------------------- // Action Name // // This is the name of the action displayed in the editor. //--------------------------------------------------------------------- name: "Leave Voice Channel", //--------------------------------------------------------------------- // Action Section // // This is the section the action will fall into. //--------------------------------------------------------------------- section: "Audio Control", //--------------------------------------------------------------------- // Action Subtitle // // This function generates the subtitle displayed next to the name. //--------------------------------------------------------------------- subtitle: function(data) { return 'The bot leaves voice channel.'; }, //--------------------------------------------------------------------- // Action Fields // // These are the fields for the action. These fields are customized // by creating elements with corresponding IDs in the HTML. These // are also the names of the fields stored in the action's JSON data. //--------------------------------------------------------------------- fields: [], //--------------------------------------------------------------------- // Command HTML // // This function returns a string containing the HTML used for // editting actions. // // The "isEvent" parameter will be true if this action is being used // for an event. Due to their nature, events lack certain information, // so edit the HTML to reflect this. // // The "data" parameter stores constants for select elements to use. // Each is an array: index 0 for commands, index 1 for events. // The names are: sendTargets, members, roles, channels, // messages, servers, variables //--------------------------------------------------------------------- html: function(isEvent, data) { return ''; }, //--------------------------------------------------------------------- // Action Editor Init Code // // When the HTML is first applied to the action editor, this code // is also run. This helps add modifications or setup reactionary // functions for the DOM elements. //--------------------------------------------------------------------- init: function() { }, //--------------------------------------------------------------------- // Action Bot Function // // This is the function for the action within the Bot's Action class. // Keep in mind event calls won't have access to the "msg" parameter, // so be sure to provide checks for variable existance. //--------------------------------------------------------------------- action: function(cache) { const server = cache.server; if(server && server.me.voiceChannel) { server.me.voiceChannel.leave(); } this.callNextAction(cache); }, //--------------------------------------------------------------------- // Action Bot Mod // // Upon initialization of the bot, this code is run. Using the bot's // DBM namespace, one can add/modify existing functions if necessary. // In order to reduce conflictions between mods, be sure to alias // functions you wish to overwrite. //--------------------------------------------------------------------- mod: function(DBM) { } }; // End of module
gpl-3.0
Effervex/CycDAG
src/graph/module/cli/PruneCyclesCommand.java
3427
package graph.module.cli; import graph.core.CommonConcepts; import graph.core.CycDAG; import graph.core.DAGEdge; import graph.core.Edge; import graph.core.ErrorEdge; import graph.core.Node; import graph.core.cli.DAGPortHandler; import graph.module.TransitiveIntervalSchemaModule; import java.io.BufferedReader; import java.util.Collection; import org.apache.commons.lang3.StringUtils; import util.Pair; import core.Command; public class PruneCyclesCommand extends Command { @Override public String helpText() { return "{0} : Prompt the knowledge engineer to prune cyclic " + "edges. The user will receive prompts for every cycle " + "and remove an edge by selecting the edge number for " + "every found cycle."; } @Override public String shortDescription() { return "Prompt the knowledge engineer to prune cyclic edges."; } @Override protected void executeImpl() { DAGPortHandler dagHandler = (DAGPortHandler) handler; CycDAG dag = (CycDAG) dagHandler.getDAG(); TransitiveIntervalSchemaModule module = (TransitiveIntervalSchemaModule) dag .getModule(TransitiveIntervalSchemaModule.class); if (module == null) { print("-1|Transitive Interval Schema Module is not in use for this DAG.\n"); return; } print("Scanning DAG for transitive cycles (this may take a few minutes)... "); flushOut(); // Scan the DAG Collection<Pair<DAGEdge, DAGEdge>> cycles = module.identifyCycles(dag .getNodes()); print(cycles.size() + " found!\n"); // For every cycle BufferedReader in = getPortHandler().getReader(); for (Pair<DAGEdge, DAGEdge> cycleEdges : cycles) { try { Node[] rewriteA = new Node[] { CommonConcepts.REWRITE_OF.getNode(dag), cycleEdges.objA_.getNodes()[1], cycleEdges.objA_.getNodes()[2] }; Node[] rewriteB = new Node[] { CommonConcepts.REWRITE_OF.getNode(dag), cycleEdges.objA_.getNodes()[2], cycleEdges.objA_.getNodes()[1] }; print("Ignore (0)\n" + "Remove edge (1): " + cycleEdges.objA_.toString(false) + "\n" + "Remove edge (2): " + cycleEdges.objB_.toString() + "\n" + "Add rewrite (" + StringUtils.join(rewriteA, ' ') + ") (3)\n" + "Add rewrite (" + StringUtils.join(rewriteB, ' ') + ") (4)\n" + "Enter number: "); flushOut(); String index = in.readLine().trim(); int decision = Integer.parseInt(index); DAGEdge edge = null; if (decision == 0) continue; else if (decision == 1) edge = cycleEdges.objA_; else if (decision == 2) edge = cycleEdges.objB_; else if (decision == 3) { Edge result = dag.findOrCreateEdge(rewriteA, null, null, true, false, false); if (result instanceof ErrorEdge) print ("Error adding rewriteEdge: " + result.toString(false)); } else if (decision == 4) { Edge result = dag.findOrCreateEdge(rewriteB, null, null, true, false, false); if (result instanceof ErrorEdge) print ("Error adding rewriteEdge: " + result.toString(false)); } // Removing the edge if (edge != null) { if (!dag.removeEdge(edge, true)) print("Could not removed edge " + cycleEdges.objA_ + "!\n"); print("Removed edge " + cycleEdges.objA_ + "\n"); } } catch (Exception e) { print("Error! Proceeding to next cycle.\n"); } } } }
gpl-3.0
The-Three-Otakus/Joint-Animator
loveframes/skins/Blue/skin.lua
64104
--[[------------------------------------------------ -- Love Frames - A GUI library for LOVE -- -- Copyright (c) 2012-2014 Kenny Shields -- --]]------------------------------------------------ -- get the current require path local path = string.sub(..., 1, string.len(...) - string.len(".skins.Blue.skin")) local loveframes = require(path .. ".libraries.common") -- skin table local skin = {} -- skin info (you always need this in a skin) skin.name = "Blue" skin.author = "Nikolai Resokav" skin.version = "1.0" local smallfont = love.graphics.newFont(10) local imagebuttonfont = love.graphics.newFont(15) local bordercolor = {143, 143, 143, 255} -- add skin directives to this table skin.directives = {} -- controls skin.controls = {} -- frame skin.controls.frame_body_color = {232, 232, 232, 255} skin.controls.frame_name_color = {255, 255, 255, 255} skin.controls.frame_name_font = smallfont -- button skin.controls.button_text_down_color = {255, 255, 255, 255} skin.controls.button_text_nohover_color = {0, 0, 0, 200} skin.controls.button_text_hover_color = {255, 255, 255, 255} skin.controls.button_text_nonclickable_color = {0, 0, 0, 100} skin.controls.button_text_font = smallfont -- imagebutton skin.controls.imagebutton_text_down_color = {255, 255, 255, 255} skin.controls.imagebutton_text_nohover_color = {255, 255, 255, 200} skin.controls.imagebutton_text_hover_color = {255, 255, 255, 255} skin.controls.imagebutton_text_font = imagebuttonfont -- closebutton skin.controls.closebutton_body_down_color = {255, 255, 255, 255} skin.controls.closebutton_body_nohover_color = {255, 255, 255, 255} skin.controls.closebutton_body_hover_color = {255, 255, 255, 255} -- progressbar skin.controls.progressbar_body_color = {255, 255, 255, 255} skin.controls.progressbar_text_color = {0, 0, 0, 255} skin.controls.progressbar_text_font = smallfont -- list skin.controls.list_body_color = {232, 232, 232, 255} -- scrollarea skin.controls.scrollarea_body_color = {220, 220, 220, 255} -- scrollbody skin.controls.scrollbody_body_color = {0, 0, 0, 0} -- panel skin.controls.panel_body_color = {232, 232, 232, 255} -- tabpanel skin.controls.tabpanel_body_color = {232, 232, 232, 255} -- tabbutton skin.controls.tab_text_nohover_color = {0, 0, 0, 200} skin.controls.tab_text_hover_color = {255, 255, 255, 255} skin.controls.tab_text_font = smallfont -- multichoice skin.controls.multichoice_body_color = {240, 240, 240, 255} skin.controls.multichoice_text_color = {0, 0, 0, 255} skin.controls.multichoice_text_font = smallfont -- multichoicelist skin.controls.multichoicelist_body_color = {240, 240, 240, 200} -- multichoicerow skin.controls.multichoicerow_body_nohover_color = {240, 240, 240, 255} skin.controls.multichoicerow_body_hover_color = {51, 204, 255, 255} skin.controls.multichoicerow_text_nohover_color = {0, 0, 0, 150} skin.controls.multichoicerow_text_hover_color = {255, 255, 255, 255} skin.controls.multichoicerow_text_font = smallfont -- tooltip skin.controls.tooltip_body_color = {255, 255, 255, 255} -- textinput skin.controls.textinput_body_color = {250, 250, 250, 255} skin.controls.textinput_indicator_color = {0, 0, 0, 255} skin.controls.textinput_text_normal_color = {0, 0, 0, 255} skin.controls.textinput_text_placeholder_color = {127, 127, 127, 255} skin.controls.textinput_text_selected_color = {255, 255, 255, 255} skin.controls.textinput_highlight_bar_color = {51, 204, 255, 255} -- slider skin.controls.slider_bar_outline_color = {220, 220, 220, 255} -- checkbox skin.controls.checkbox_body_color = {255, 255, 255, 255} skin.controls.checkbox_check_color = {128, 204, 255, 255} skin.controls.checkbox_text_font = smallfont -- radiobutton skin.controls.radiobutton_body_color = {255, 255, 255, 255} skin.controls.radiobutton_check_color = {128, 204, 255, 255} skin.controls.radiobutton_inner_border_color = {77, 184, 255, 255} skin.controls.radiobutton_text_font = smallfont -- collapsiblecategory skin.controls.collapsiblecategory_text_color = {255, 255, 255, 255} -- columnlist skin.controls.columnlist_body_color = {232, 232, 232, 255} -- columlistarea skin.controls.columnlistarea_body_color = {232, 232, 232, 255} -- columnlistheader skin.controls.columnlistheader_text_down_color = {255, 255, 255, 255} skin.controls.columnlistheader_text_nohover_color = {0, 0, 0, 200} skin.controls.columnlistheader_text_hover_color = {255, 255, 255, 255} skin.controls.columnlistheader_text_font = smallfont -- columnlistrow skin.controls.columnlistrow_body1_color = {245, 245, 245, 255} skin.controls.columnlistrow_body2_color = {255, 255, 255, 255} skin.controls.columnlistrow_body_selected_color = {26, 198, 255, 255} skin.controls.columnlistrow_body_hover_color = {102, 217, 255, 255} skin.controls.columnlistrow_text_color = {100, 100, 100, 255} skin.controls.columnlistrow_text_hover_color = {255, 255, 255, 255} skin.controls.columnlistrow_text_selected_color = {255, 255, 255, 255} -- modalbackground skin.controls.modalbackground_body_color = {255, 255, 255, 100} -- linenumberspanel skin.controls.linenumberspanel_text_color = {170, 170, 170, 255} skin.controls.linenumberspanel_body_color = {235, 235, 235, 255} -- grid skin.controls.grid_body_color = {230, 230, 230, 255} -- form skin.controls.form_text_color = {0, 0, 0, 255} skin.controls.form_text_font = smallfont -- menu skin.controls.menu_body_color = {255, 255, 255, 255} -- menuoption skin.controls.menuoption_body_hover_color = {51, 204, 255, 255} skin.controls.menuoption_text_hover_color = {255, 255, 255, 255} skin.controls.menuoption_text_color = {180, 180, 180, 255} local function ParseHeaderText(str, hx, hwidth, tx) local font = love.graphics.getFont() local twidth = love.graphics.getFont():getWidth(str) if (tx + twidth) - hwidth/2 > hx + hwidth then if #str > 1 then return ParseHeaderText(str:sub(1, #str - 1), hx, hwidth, tx, twidth) else return str end else return str end end local function ParseRowText(str, rx, rwidth, tx1, tx2) local twidth = love.graphics.getFont():getWidth(str) if (tx1 + tx2) + twidth > rx + rwidth then if #str > 1 then return ParseRowText(str:sub(1, #str - 1), rx, rwidth, tx1, tx2) else return str end else return str end end --[[ local function DrawColumnHeaderText(text, hx, hwidth, tx, twidth) local new = "" if tx + width > hx + hwidth then --]] --[[--------------------------------------------------------- - func: OutlinedRectangle(x, y, width, height, ovt, ovb, ovl, ovr) - desc: creates and outlined rectangle --]]--------------------------------------------------------- function skin.OutlinedRectangle(x, y, width, height, ovt, ovb, ovl, ovr) local ovt = ovt or false local ovb = ovb or false local ovl = ovl or false local ovr = ovr or false -- top if not ovt then love.graphics.rectangle("fill", x, y, width, 1) end -- bottom if not ovb then love.graphics.rectangle("fill", x, y + height - 1, width, 1) end -- left if not ovl then love.graphics.rectangle("fill", x, y, 1, height) end -- right if not ovr then love.graphics.rectangle("fill", x + width - 1, y, 1, height) end end --[[--------------------------------------------------------- - func: DrawFrame(object) - desc: draws the frame object --]]--------------------------------------------------------- function skin.DrawFrame(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local hover = object:GetHover() local name = object:GetName() local icon = object:GetIcon() local bodycolor = skin.controls.frame_body_color local topcolor = skin.controls.frame_top_color local namecolor = skin.controls.frame_name_color local font = skin.controls.frame_name_font local topbarimage = skin.images["frame-topbar.png"] local topbarimage_width = topbarimage:getWidth() local topbarimage_height = topbarimage:getHeight() local topbarimage_scalex = width/topbarimage_width local topbarimage_scaley = 25/topbarimage_height local bodyimage = skin.images["frame-body.png"] local bodyimage_width = bodyimage:getWidth() local bodyimage_height = bodyimage:getHeight() local bodyimage_scalex = width/bodyimage_width local bodyimage_scaley = height/bodyimage_height -- frame body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(bodyimage, x, y, 0, bodyimage_scalex, bodyimage_scaley) -- frame top bar love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(topbarimage, x, y, 0, topbarimage_scalex, topbarimage_scaley) -- frame name section love.graphics.setFont(font) if icon then local iconwidth = icon:getWidth() local iconheight = icon:getHeight() icon:setFilter("nearest", "nearest") love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(icon, x + 5, y + 5) love.graphics.setColor(namecolor) love.graphics.print(name, x + iconwidth + 10, y + 5) else love.graphics.setColor(namecolor) love.graphics.print(name, x + 5, y + 5) end -- frame border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) love.graphics.setColor(255, 255, 255, 70) skin.OutlinedRectangle(x + 1, y + 1, width - 2, 24) love.graphics.setColor(220, 220, 220, 255) skin.OutlinedRectangle(x + 1, y + 25, width - 2, height - 26) end --[[--------------------------------------------------------- - func: DrawButton(object) - desc: draws the button object --]]--------------------------------------------------------- function skin.DrawButton(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local hover = object:GetHover() local text = object:GetText() local font = skin.controls.button_text_font local twidth = font:getWidth(object.text) local theight = font:getHeight(object.text) local down = object:GetDown() local enabled = object:GetEnabled() local clickable = object:GetClickable() local textdowncolor = skin.controls.button_text_down_color local texthovercolor = skin.controls.button_text_hover_color local textnohovercolor = skin.controls.button_text_nohover_color local textnonclickablecolor = skin.controls.button_text_nonclickable_color local image_hover = skin.images["button-hover.png"] local scaley = height/image_hover:getHeight() if not enabled or not clickable then -- button body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(skin.images["button-unclickable.png"], x, y, 0, width, scaley) -- button text love.graphics.setFont(font) love.graphics.setColor(textnonclickablecolor) love.graphics.print(text, x + width/2 - twidth/2, y + height/2 - theight/2) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) return end if object.toggleable then if hover then if down then -- button body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(skin.images["button-down.png"], x, y, 0, width, scaley) -- button text love.graphics.setFont(font) love.graphics.setColor(textdowncolor) love.graphics.print(text, x + width/2 - twidth/2, y + height/2 - theight/2) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) else -- button body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image_hover, x, y, 0, width, scaley) -- button text love.graphics.setFont(font) love.graphics.setColor(texthovercolor) love.graphics.print(text, x + width/2 - twidth/2, y + height/2 - theight/2) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end else if object.toggle then -- button body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(skin.images["button-down.png"], x, y, 0, width, scaley) -- button text love.graphics.setFont(font) love.graphics.setColor(textdowncolor) love.graphics.print(text, x + width/2 - twidth/2, y + height/2 - theight/2) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) else -- button body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(skin.images["button-nohover.png"], x, y, 0, width, scaley) -- button text love.graphics.setFont(font) love.graphics.setColor(textnohovercolor) love.graphics.print(text, x + width/2 - twidth/2, y + height/2 - theight/2) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end end else if down then -- button body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(skin.images["button-down.png"], x, y, 0, width, scaley) -- button text love.graphics.setFont(font) love.graphics.setColor(textdowncolor) love.graphics.print(text, x + width/2 - twidth/2, y + height/2 - theight/2) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) elseif hover then -- button body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image_hover, x, y, 0, width, scaley) -- button text love.graphics.setFont(font) love.graphics.setColor(texthovercolor) love.graphics.print(text, x + width/2 - twidth/2, y + height/2 - theight/2) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) else -- button body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(skin.images["button-nohover.png"], x, y, 0, width, scaley) -- button text love.graphics.setFont(font) love.graphics.setColor(textnohovercolor) love.graphics.print(text, x + width/2 - twidth/2, y + height/2 - theight/2) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end end love.graphics.setColor(255, 255, 255, 150) skin.OutlinedRectangle(x + 1, y + 1, width - 2, height - 2) end --[[--------------------------------------------------------- - func: DrawCloseButton(object) - desc: draws the close button object --]]--------------------------------------------------------- function skin.DrawCloseButton(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local parent = object.parent local parentwidth = parent:GetWidth() local hover = object:GetHover() local down = object.down local image = skin.images["close.png"] local bodydowncolor = skin.controls.closebutton_body_down_color local bodyhovercolor = skin.controls.closebutton_body_hover_color local bodynohovercolor = skin.controls.closebutton_body_nohover_color image:setFilter("nearest", "nearest") if down then -- button body love.graphics.setColor(bodydowncolor) love.graphics.draw(image, x, y) elseif hover then -- button body love.graphics.setColor(bodyhovercolor) love.graphics.draw(image, x, y) else -- button body love.graphics.setColor(bodynohovercolor) love.graphics.draw(image, x, y) end end --[[--------------------------------------------------------- - func: DrawImage(object) - desc: draws the image object --]]--------------------------------------------------------- function skin.DrawImage(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local orientation = object:GetOrientation() local scalex = object:GetScaleX() local scaley = object:GetScaleY() local offsetx = object:GetOffsetX() local offsety = object:GetOffsetY() local shearx = object:GetShearX() local sheary = object:GetShearY() local image = object.image local color = object.imagecolor if color then love.graphics.setColor(color) love.graphics.draw(image, x, y, orientation, scalex, scaley, offsetx, offsety, shearx, sheary) else love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, orientation, scalex, scaley, offsetx, offsety, shearx, sheary) end end --[[--------------------------------------------------------- - func: DrawImageButton(object) - desc: draws the image button object --]]--------------------------------------------------------- function skin.DrawImageButton(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local text = object:GetText() local hover = object:GetHover() local image = object:GetImage() local imagecolor = object.imagecolor or {255, 255, 255, 255} local down = object.down local font = skin.controls.imagebutton_text_font local twidth = font:getWidth(object.text) local theight = font:getHeight(object.text) local textdowncolor = skin.controls.imagebutton_text_down_color local texthovercolor = skin.controls.imagebutton_text_hover_color local textnohovercolor = skin.controls.imagebutton_text_nohover_color if down then if image then love.graphics.setColor(imagecolor) love.graphics.draw(image, x + 1, y + 1) end love.graphics.setFont(font) love.graphics.setColor(0, 0, 0, 255) love.graphics.print(text, x + width/2 - twidth/2 + 1, y + height - theight - 5 + 1) love.graphics.setColor(textdowncolor) love.graphics.print(text, x + width/2 - twidth/2 + 1, y + height - theight - 6 + 1) elseif hover then if image then love.graphics.setColor(imagecolor) love.graphics.draw(image, x, y) end love.graphics.setFont(font) love.graphics.setColor(0, 0, 0, 255) love.graphics.print(text, x + width/2 - twidth/2, y + height - theight - 5) love.graphics.setColor(texthovercolor) love.graphics.print(text, x + width/2 - twidth/2, y + height - theight - 6) else if image then love.graphics.setColor(imagecolor) love.graphics.draw(image, x, y) end love.graphics.setFont(font) love.graphics.setColor(0, 0, 0, 255) love.graphics.print(text, x + width/2 - twidth/2, y + height - theight - 5) love.graphics.setColor(textnohovercolor) love.graphics.print(text, x + width/2 - twidth/2, y + height - theight - 6) end end --[[--------------------------------------------------------- - func: DrawProgressBar(object) - desc: draws the progress bar object --]]--------------------------------------------------------- function skin.DrawProgressBar(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local value = object:GetValue() local max = object:GetMax() local text = object:GetText() local barwidth = object:GetBarWidth() local font = skin.controls.progressbar_text_font local twidth = font:getWidth(text) local theight = font:getHeight("a") local bodycolor = skin.controls.progressbar_body_color local barcolor = skin.controls.progressbar_bar_color local textcolor = skin.controls.progressbar_text_color local image = skin.images["progressbar.png"] local imageheight = image:getHeight() local scaley = height/imageheight -- progress bar body love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, barwidth, scaley) love.graphics.setFont(font) love.graphics.setColor(textcolor) love.graphics.print(text, x + width/2 - twidth/2, y + height/2 - theight/2) -- progress bar border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) object:SetText(value .. "/" ..max) end --[[--------------------------------------------------------- - func: DrawScrollArea(object) - desc: draws the scroll area object --]]--------------------------------------------------------- function skin.DrawScrollArea(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local bartype = object:GetBarType() local bodycolor = skin.controls.scrollarea_body_color love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) love.graphics.setColor(bordercolor) if bartype == "vertical" then --skin.OutlinedRectangle(x, y, width, height, true, true) elseif bartype == "horizontal" then --skin.OutlinedRectangle(x, y, width, height, false, false, true, true) end end --[[--------------------------------------------------------- - func: DrawScrollBar(object) - desc: draws the scroll bar object --]]--------------------------------------------------------- function skin.DrawScrollBar(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local dragging = object:IsDragging() local hover = object:GetHover() local bartype = object:GetBarType() local bodydowncolor = skin.controls.scrollbar_body_down_color local bodyhovercolor = skin.controls.scrollbar_body_hover_color local bodynohvercolor = skin.controls.scrollbar_body_nohover_color if dragging then local image = skin.images["button-down.png"] local imageheight = image:getHeight() local scaley = height/imageheight love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) elseif hover then local image = skin.images["button-hover.png"] local imageheight = image:getHeight() local scaley = height/imageheight love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) else local image = skin.images["button-nohover.png"] local imageheight = image:getHeight() local scaley = height/imageheight love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end end --[[--------------------------------------------------------- - func: DrawScrollBody(object) - desc: draws the scroll body object --]]--------------------------------------------------------- function skin.DrawScrollBody(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local bodycolor = skin.controls.scrollbody_body_color love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) end --[[--------------------------------------------------------- - func: DrawPanel(object) - desc: draws the panel object --]]--------------------------------------------------------- function skin.DrawPanel(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local bodycolor = skin.controls.panel_body_color love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) love.graphics.setColor(255, 255, 255, 200) skin.OutlinedRectangle(x + 1, y + 1, width - 2, height - 2) love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end --[[--------------------------------------------------------- - func: DrawList(object) - desc: draws the list object --]]--------------------------------------------------------- function skin.DrawList(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local bodycolor = skin.controls.list_body_color love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) end --[[--------------------------------------------------------- - func: DrawList(object) - desc: used to draw over the object and its children --]]--------------------------------------------------------- function skin.DrawOverList(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end --[[--------------------------------------------------------- - func: DrawTabPanel(object) - desc: draws the tab panel object --]]--------------------------------------------------------- function skin.DrawTabPanel(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local buttonheight = object:GetHeightOfButtons() local bodycolor = skin.controls.tabpanel_body_color love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y + buttonheight, width, height - buttonheight) love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y + buttonheight - 1, width, height - buttonheight + 2) object:SetScrollButtonSize(15, buttonheight) end --[[--------------------------------------------------------- - func: DrawOverTabPanel(object) - desc: draws over the tab panel object --]]--------------------------------------------------------- function skin.DrawOverTabPanel(object) end --[[--------------------------------------------------------- - func: DrawTabButton(object) - desc: draws the tab button object --]]--------------------------------------------------------- function skin.DrawTabButton(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local hover = object:GetHover() local text = object:GetText() local image = object:GetImage() local tabnumber = object:GetTabNumber() local parent = object:GetParent() local ptabnumber = parent:GetTabNumber() local font = skin.controls.tab_text_font local twidth = font:getWidth(object.text) local theight = font:getHeight(object.text) local imagewidth = 0 local imageheight = 0 local texthovercolor = skin.controls.button_text_hover_color local textnohovercolor = skin.controls.button_text_nohover_color if image then image:setFilter("nearest", "nearest") imagewidth = image:getWidth() imageheight = image:getHeight() object.width = imagewidth + 15 + twidth if imageheight > theight then parent:SetTabHeight(imageheight + 5) object.height = imageheight + 5 else object.height = parent.tabheight end else object.width = 10 + twidth object.height = parent.tabheight end local width = object:GetWidth() local height = object:GetHeight() if tabnumber == ptabnumber then -- button body local gradient = skin.images["button-hover.png"] local gradientheight = gradient:getHeight() local scaley = height/gradientheight love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(gradient, x, y, 0, width, scaley) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) if image then -- button image love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x + 5, y + height/2 - imageheight/2) -- button text love.graphics.setFont(font) love.graphics.setColor(texthovercolor) love.graphics.print(text, x + imagewidth + 10, y + height/2 - theight/2) else -- button text love.graphics.setFont(font) love.graphics.setColor(texthovercolor) love.graphics.print(text, x + 5, y + height/2 - theight/2) end else -- button body local gradient = skin.images["button-nohover.png"] local gradientheight = gradient:getHeight() local scaley = height/gradientheight love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(gradient, x, y, 0, width, scaley) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) if image then -- button image love.graphics.setColor(255, 255, 255, 150) love.graphics.draw(image, x + 5, y + height/2 - imageheight/2) -- button text love.graphics.setFont(font) love.graphics.setColor(textnohovercolor) love.graphics.print(text, x + imagewidth + 10, y + height/2 - theight/2) else -- button text love.graphics.setFont(font) love.graphics.setColor(textnohovercolor) love.graphics.print(text, x + 5, y + height/2 - theight/2) end end end --[[--------------------------------------------------------- - func: DrawMultiChoice(object) - desc: draws the multi choice object --]]--------------------------------------------------------- function skin.DrawMultiChoice(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local text = object:GetText() local choice = object:GetChoice() local image = skin.images["multichoice-arrow.png"] local font = skin.controls.multichoice_text_font local theight = font:getHeight("a") local bodycolor = skin.controls.multichoice_body_color local textcolor = skin.controls.multichoice_text_color image:setFilter("nearest", "nearest") love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x + 1, y + 1, width - 2, height - 2) love.graphics.setColor(textcolor) love.graphics.setFont(font) if choice == "" then love.graphics.print(text, x + 5, y + height/2 - theight/2) else love.graphics.print(choice, x + 5, y + height/2 - theight/2) end love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x + width - 20, y + 5) love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end --[[--------------------------------------------------------- - func: DrawMultiChoiceList(object) - desc: draws the multi choice list object --]]--------------------------------------------------------- function skin.DrawMultiChoiceList(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local bodycolor = skin.controls.multichoicelist_body_color love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) end --[[--------------------------------------------------------- - func: DrawOverMultiChoiceList(object) - desc: draws over the multi choice list object --]]--------------------------------------------------------- function skin.DrawOverMultiChoiceList(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y - 1, width, height + 1) end --[[--------------------------------------------------------- - func: DrawMultiChoiceRow(object) - desc: draws the multi choice row object --]]--------------------------------------------------------- function skin.DrawMultiChoiceRow(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local text = object:GetText() local font = skin.controls.multichoicerow_text_font local bodyhovecolor = skin.controls.multichoicerow_body_hover_color local texthovercolor = skin.controls.multichoicerow_text_hover_color local bodynohovercolor = skin.controls.multichoicerow_body_nohover_color local textnohovercolor = skin.controls.multichoicerow_text_nohover_color love.graphics.setFont(font) if object.hover then love.graphics.setColor(bodyhovecolor) love.graphics.rectangle("fill", x, y, width, height) love.graphics.setColor(texthovercolor) love.graphics.print(text, x + 5, y + 5) else love.graphics.setColor(bodynohovercolor) love.graphics.rectangle("fill", x, y, width, height) love.graphics.setColor(textnohovercolor) love.graphics.print(text, x + 5, y + 5) end end --[[--------------------------------------------------------- - func: DrawToolTip(object) - desc: draws the tool tip object --]]--------------------------------------------------------- function skin.DrawToolTip(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local bodycolor = skin.controls.tooltip_body_color love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end --[[--------------------------------------------------------- - func: DrawText(object) - desc: draws the text object --]]--------------------------------------------------------- function skin.DrawText(object) end --[[--------------------------------------------------------- - func: DrawTextInput(object) - desc: draws the text input object --]]--------------------------------------------------------- function skin.DrawTextInput(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local font = object:GetFont() local focus = object:GetFocus() local showindicator = object:GetIndicatorVisibility() local alltextselected = object:IsAllTextSelected() local textx = object:GetTextX() local texty = object:GetTextY() local text = object:GetText() local multiline = object:GetMultiLine() local lines = object:GetLines() local placeholder = object:GetPlaceholderText() local offsetx = object:GetOffsetX() local offsety = object:GetOffsetY() local indicatorx = object:GetIndicatorX() local indicatory = object:GetIndicatorY() local vbar = object:HasVerticalScrollBar() local hbar = object:HasHorizontalScrollBar() local linenumbers = object:GetLineNumbersEnabled() local itemwidth = object:GetItemWidth() local masked = object:GetMasked() local theight = font:getHeight("a") local bodycolor = skin.controls.textinput_body_color local textnormalcolor = skin.controls.textinput_text_normal_color local textplaceholdercolor = skin.controls.textinput_text_placeholder_color local textselectedcolor = skin.controls.textinput_text_selected_color local highlightbarcolor = skin.controls.textinput_highlight_bar_color local indicatorcolor = skin.controls.textinput_indicator_color love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) if alltextselected then local bary = 0 if multiline then for i=1, #lines do local str = lines[i] if masked then str = str:gsub(".", "*") end local twidth = font:getWidth(str) if twidth == 0 then twidth = 5 end love.graphics.setColor(highlightbarcolor) love.graphics.rectangle("fill", textx, texty + bary, twidth, theight) bary = bary + theight end else local twidth = 0 if masked then local maskchar = object:GetMaskChar() twidth = font:getWidth(text:gsub(".", maskchar)) else twidth = font:getWidth(text) end love.graphics.setColor(highlightbarcolor) love.graphics.rectangle("fill", textx, texty, twidth, theight) end end if showindicator and focus then love.graphics.setColor(indicatorcolor) love.graphics.rectangle("fill", indicatorx, indicatory, 1, theight) end if not multiline then object:SetTextOffsetY(height/2 - theight/2) if offsetx ~= 0 then object:SetTextOffsetX(0) else object:SetTextOffsetX(5) end else if vbar then if offsety ~= 0 then if hbar then object:SetTextOffsetY(5) else object:SetTextOffsetY(-5) end else object:SetTextOffsetY(5) end else object:SetTextOffsetY(5) end if hbar then if offsety ~= 0 then if linenumbers then local panel = object:GetLineNumbersPanel() if vbar then object:SetTextOffsetX(5) else object:SetTextOffsetX(-5) end else if vbar then object:SetTextOffsetX(5) else object:SetTextOffsetX(-5) end end else object:SetTextOffsetX(5) end else object:SetTextOffsetX(5) end end textx = object:GetTextX() texty = object:GetTextY() love.graphics.setFont(font) if alltextselected then love.graphics.setColor(textselectedcolor) elseif #lines == 1 and lines[1] == "" then love.graphics.setColor(textplaceholdercolor) else love.graphics.setColor(textnormalcolor) end local str = "" if multiline then for i=1, #lines do str = lines[i] if masked then local maskchar = object:GetMaskChar() str = str:gsub(".", maskchar) end love.graphics.print(#str > 0 and str or (#lines == 1 and placeholder or ""), textx, texty + theight * i - theight) end else str = lines[1] if masked then local maskchar = object:GetMaskChar() str = str:gsub(".", maskchar) end love.graphics.print(#str > 0 and str or placeholder, textx, texty) end love.graphics.setColor(230, 230, 230, 255) skin.OutlinedRectangle(x + 1, y + 1, width - 2, height - 2) end --[[--------------------------------------------------------- - func: DrawOverTextInput(object) - desc: draws over the text input object --]]--------------------------------------------------------- function skin.DrawOverTextInput(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end --[[--------------------------------------------------------- - func: DrawScrollButton(object) - desc: draws the scroll button object --]]--------------------------------------------------------- function skin.DrawScrollButton(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local hover = object:GetHover() local scrolltype = object:GetScrollType() local down = object.down local bodydowncolor = skin.controls.button_body_down_color local bodyhovercolor = skin.controls.button_body_hover_color local bodynohovercolor = skin.controls.button_body_nohover_color if down then -- button body local image = skin.images["button-down.png"] local imageheight = image:getHeight() local scaley = height/imageheight love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) elseif hover then -- button body local image = skin.images["button-hover.png"] local imageheight = image:getHeight() local scaley = height/imageheight love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) else -- button body local image = skin.images["button-nohover.png"] local imageheight = image:getHeight() local scaley = height/imageheight love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end if scrolltype == "up" then local image = skin.images["arrow-up.png"] local imagewidth = image:getWidth() local imageheight = image:getHeight() image:setFilter("nearest", "nearest") if hover then love.graphics.setColor(255, 255, 255, 255) else love.graphics.setColor(255, 255, 255, 150) end love.graphics.draw(image, x + width/2 - imagewidth/2, y + height/2 - imageheight/2) elseif scrolltype == "down" then local image = skin.images["arrow-down.png"] local imagewidth = image:getWidth() local imageheight = image:getHeight() image:setFilter("nearest", "nearest") if hover then love.graphics.setColor(255, 255, 255, 255) else love.graphics.setColor(255, 255, 255, 150) end love.graphics.draw(image, x + width/2 - imagewidth/2, y + height/2 - imageheight/2) elseif scrolltype == "left" then local image = skin.images["arrow-left.png"] local imagewidth = image:getWidth() local imageheight = image:getHeight() image:setFilter("nearest", "nearest") if hover then love.graphics.setColor(255, 255, 255, 255) else love.graphics.setColor(255, 255, 255, 150) end love.graphics.draw(image, x + width/2 - imagewidth/2, y + height/2 - imageheight/2) elseif scrolltype == "right" then local image = skin.images["arrow-right.png"] local imagewidth = image:getWidth() local imageheight = image:getHeight() image:setFilter("nearest", "nearest") if hover then love.graphics.setColor(255, 255, 255, 255) else love.graphics.setColor(255, 255, 255, 150) end love.graphics.draw(image, x + width/2 - imagewidth/2, y + height/2 - imageheight/2) end end --[[--------------------------------------------------------- - func: skin.DrawSlider(object) - desc: draws the slider object --]]--------------------------------------------------------- function skin.DrawSlider(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local slidtype = object:GetSlideType() local baroutlinecolor = skin.controls.slider_bar_outline_color if slidtype == "horizontal" then love.graphics.setColor(baroutlinecolor) love.graphics.rectangle("fill", x, y + height/2 - 5, width, 10) love.graphics.setColor(bordercolor) love.graphics.rectangle("fill", x + 5, y + height/2, width - 10, 1) elseif slidtype == "vertical" then love.graphics.setColor(baroutlinecolor) love.graphics.rectangle("fill", x + width/2 - 5, y, 10, height) love.graphics.setColor(bordercolor) love.graphics.rectangle("fill", x + width/2, y + 5, 1, height - 10) end end --[[--------------------------------------------------------- - func: skin.DrawSliderButton(object) - desc: draws the slider button object --]]--------------------------------------------------------- function skin.DrawSliderButton(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local hover = object:GetHover() local down = object.down local parent = object:GetParent() local enabled = parent:GetEnabled() local bodydowncolor = skin.controls.button_body_down_color local bodyhovercolor = skin.controls.button_body_hover_color local bodynohvercolor = skin.controls.button_body_nohover_color if not enabled then local image = skin.images["button-unclickable.png"] local imageheight = image:getHeight() local scaley = height/imageheight -- button body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) return end if down then -- button body local image = skin.images["button-down.png"] local imageheight = image:getHeight() local scaley = height/imageheight love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) elseif hover then -- button body local image = skin.images["button-hover.png"] local imageheight = image:getHeight() local scaley = height/imageheight love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) else -- button body local image = skin.images["button-nohover.png"] local imageheight = image:getHeight() local scaley = height/imageheight love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) -- button border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end end --[[--------------------------------------------------------- - func: skin.DrawCheckBox(object) - desc: draws the check box object --]]--------------------------------------------------------- function skin.DrawCheckBox(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetBoxWidth() local height = object:GetBoxHeight() local checked = object:GetChecked() local hover = object:GetHover() local bodycolor = skin.controls.checkbox_body_color local checkcolor = skin.controls.checkbox_check_color love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) if checked then love.graphics.setColor(checkcolor) love.graphics.rectangle("fill", x + 4, y + 4, width - 8, height - 8) end if hover then love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x + 4, y + 4, width - 8, height - 8) end end --[[--------------------------------------------------------- - func: skin.DrawCheckBox(object) - desc: draws the radio button object --]]--------------------------------------------------------- function skin.DrawRadioButton(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetBoxWidth() local height = object:GetBoxHeight() local checked = object:GetChecked() local hover = object:GetHover() local bodycolor = skin.controls.radiobutton_body_color local checkcolor = skin.controls.radiobutton_check_color local inner_border = skin.controls.radiobutton_inner_border_color love.graphics.setColor(bordercolor) love.graphics.setLineStyle("smooth") love.graphics.setLineWidth(1) love.graphics.circle("line", x + 10, y + 10, 8, 15) if checked then love.graphics.setColor(checkcolor) love.graphics.circle("fill", x + 10, y + 10, 5, 360) love.graphics.setColor(inner_border) love.graphics.circle("line", x + 10, y + 10, 5, 360) end if hover then love.graphics.setColor(bordercolor) love.graphics.circle("line", x + 10, y + 10, 5, 360) end end --[[--------------------------------------------------------- - func: skin.DrawCollapsibleCategory(object) - desc: draws the collapsible category object --]]--------------------------------------------------------- function skin.DrawCollapsibleCategory(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local text = object:GetText() local open = object:GetOpen() local textcolor = skin.controls.collapsiblecategory_text_color local font = smallfont local image = skin.images["button-nohover.png"] local topbarimage = skin.images["frame-topbar.png"] local topbarimage_width = topbarimage:getWidth() local topbarimage_height = topbarimage:getHeight() local topbarimage_scalex = width/topbarimage_width local topbarimage_scaley = 25/topbarimage_height local imageheight = image:getHeight() local scaley = height/imageheight love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(topbarimage, x, y, 0, topbarimage_scalex, topbarimage_scaley) love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) love.graphics.setColor(255, 255, 255, 255) if open then local icon = skin.images["collapse.png"] icon:setFilter("nearest", "nearest") love.graphics.draw(icon, x + width - 21, y + 5) love.graphics.setColor(255, 255, 255, 70) skin.OutlinedRectangle(x + 1, y + 1, width - 2, 24) else local icon = skin.images["expand.png"] icon:setFilter("nearest", "nearest") love.graphics.draw(icon, x + width - 21, y + 5) love.graphics.setColor(255, 255, 255, 70) skin.OutlinedRectangle(x + 1, y + 1, width - 2, 23) end love.graphics.setFont(font) love.graphics.setColor(textcolor) love.graphics.print(text, x + 5, y + 5) end --[[--------------------------------------------------------- - func: skin.DrawColumnList(object) - desc: draws the column list object --]]--------------------------------------------------------- function skin.DrawColumnList(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local bodycolor = skin.controls.columnlist_body_color love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) end --[[--------------------------------------------------------- - func: skin.DrawColumnListHeader(object) - desc: draws the column list header object --]]--------------------------------------------------------- function skin.DrawColumnListHeader(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local hover = object:GetHover() local down = object.down local font = skin.controls.columnlistheader_text_font local theight = font:getHeight(object.name) local bodydowncolor = skin.controls.columnlistheader_body_down_color local textdowncolor = skin.controls.columnlistheader_text_down_color local bodyhovercolor = skin.controls.columnlistheader_body_hover_color local textdowncolor = skin.controls.columnlistheader_text_hover_color local nohovercolor = skin.controls.columnlistheader_body_nohover_color local textnohovercolor = skin.controls.columnlistheader_text_nohover_color local name = ParseHeaderText(object:GetName(), x, width, x + width/2, twidth) local twidth = font:getWidth(name) if down then local image = skin.images["button-down.png"] local imageheight = image:getHeight() local scaley = height/imageheight -- header body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) -- header name love.graphics.setFont(font) love.graphics.setColor(textdowncolor) love.graphics.print(name, x + width/2 - twidth/2, y + height/2 - theight/2) -- header border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) elseif hover then local image = skin.images["button-hover.png"] local imageheight = image:getHeight() local scaley = height/imageheight -- header body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) -- header name love.graphics.setFont(font) love.graphics.setColor(textdowncolor) love.graphics.print(name, x + width/2 - twidth/2, y + height/2 - theight/2) -- header border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) else local image = skin.images["button-nohover.png"] local imageheight = image:getHeight() local scaley = height/imageheight -- header body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) -- header name love.graphics.setFont(font) love.graphics.setColor(textnohovercolor) love.graphics.print(name, x + width/2 - twidth/2, y + height/2 - theight/2) -- header border love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end end --[[--------------------------------------------------------- - func: skin.DrawColumnListArea(object) - desc: draws the column list area object --]]--------------------------------------------------------- function skin.DrawColumnListArea(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local bodycolor = skin.controls.columnlistarea_body_color love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) local cheight = 0 local columns = object:GetParent():GetChildren() if #columns > 0 then cheight = columns[1]:GetHeight() end local image = skin.images["button-nohover.png"] local scaley = cheight/image:getHeight() -- header body love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, x, y, 0, width, scaley) love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, cheight, true, false, true, true) end --[[--------------------------------------------------------- - func: skin.DrawOverColumnListArea(object) - desc: draws over the column list area object --]]--------------------------------------------------------- function skin.DrawOverColumnListArea(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end --[[--------------------------------------------------------- - func: skin.DrawColumnListRow(object) - desc: draws the column list row object --]]--------------------------------------------------------- function skin.DrawColumnListRow(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local colorindex = object:GetColorIndex() local font = object:GetFont() local columndata = object:GetColumnData() local textx = object:GetTextX() local texty = object:GetTextY() local parent = object:GetParent() local theight = font:getHeight("a") local hover = object:GetHover() local selected = object:GetSelected() local body1color = skin.controls.columnlistrow_body1_color local body2color = skin.controls.columnlistrow_body2_color local bodyhovercolor = skin.controls.columnlistrow_body_hover_color local bodyselectedcolor = skin.controls.columnlistrow_body_selected_color local textcolor = skin.controls.columnlistrow_text_color local texthovercolor = skin.controls.columnlistrow_text_hover_color local textselectedcolor = skin.controls.columnlistrow_text_selected_color object:SetTextPos(5, height/2 - theight/2) if selected then love.graphics.setColor(bodyselectedcolor) love.graphics.rectangle("fill", x, y, width, height) elseif hover then love.graphics.setColor(bodyhovercolor) love.graphics.rectangle("fill", x, y, width, height) elseif colorindex == 1 then love.graphics.setColor(body1color) love.graphics.rectangle("fill", x, y, width, height) else love.graphics.setColor(body2color) love.graphics.rectangle("fill", x, y, width, height) end love.graphics.setFont(font) if selected then love.graphics.setColor(textselectedcolor) elseif hover then love.graphics.setColor(texthovercolor) else love.graphics.setColor(textcolor) end for k, v in ipairs(columndata) do local rwidth = parent.parent:GetColumnWidth(k) if rwidth then local text = ParseRowText(v, x, rwidth, x, textx) love.graphics.print(text, x + textx, y + texty) x = x + parent.parent.children[k]:GetWidth() else break end end end --[[--------------------------------------------------------- - func: skin.DrawModalBackground(object) - desc: draws the modal background object --]]--------------------------------------------------------- function skin.DrawModalBackground(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local bodycolor = skin.controls.modalbackground_body_color love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) end --[[--------------------------------------------------------- - func: skin.DrawLineNumbersPanel(object) - desc: draws the line numbers panel object --]]--------------------------------------------------------- function skin.DrawLineNumbersPanel(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local offsety = object:GetOffsetY() local parent = object:GetParent() local lines = parent:GetLines() local font = parent:GetFont() local theight = font:getHeight("a") local textcolor = skin.controls.linenumberspanel_text_color local bodycolor = skin.controls.linenumberspanel_body_color object:SetWidth(10 + font:getWidth(#lines)) love.graphics.setFont(font) love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) love.graphics.setColor(bordercolor) --skin.OutlinedRectangle(x, y, width, height, true, true, true, false) local startline = math.ceil(offsety / theight) if startline < 1 then startline = 1 end local endline = math.ceil(startline + (height / theight)) + 1 if endline > #lines then endline = #lines end for i=startline, endline do love.graphics.setColor(textcolor) love.graphics.print(i, x + 5, (y + (theight * (i - 1))) - offsety) end end --[[--------------------------------------------------------- - func: skin.DrawNumberBox(object) - desc: draws the numberbox object --]]--------------------------------------------------------- function skin.DrawNumberBox(object) end --[[--------------------------------------------------------- - func: skin.DrawGrid(object) - desc: draws the grid object --]]--------------------------------------------------------- function skin.DrawGrid(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local bodycolor = skin.controls.grid_body_color love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) local cx = x local cy = y local cw = object.cellwidth + (object.cellpadding * 2) local ch = object.cellheight + (object.cellpadding * 2) for i=1, object.rows do for n=1, object.columns do local ovt = false local ovl = false if i > 1 then ovt = true end if n > 1 then ovl = true end love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", cx, cy, cw, ch) love.graphics.setColor(bordercolor) skin.OutlinedRectangle(cx, cy, cw, ch, ovt, false, ovl, false) cx = cx + cw end cx = x cy = cy + ch end end --[[--------------------------------------------------------- - func: skin.DrawForm(object) - desc: draws the form object --]]--------------------------------------------------------- function skin.DrawForm(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local topmargin = object.topmargin local name = object.name local font = skin.controls.form_text_font local textcolor = skin.controls.form_text_color local twidth = font:getWidth(name) love.graphics.setFont(font) love.graphics.setColor(textcolor) love.graphics.print(name, x + 7, y) love.graphics.setColor(bordercolor) love.graphics.rectangle("fill", x, y + 7, 5, 1) love.graphics.rectangle("fill", x + twidth + 9, y + 7, width - (twidth + 9), 1) love.graphics.rectangle("fill", x, y + height, width, 1) love.graphics.rectangle("fill", x, y + 7, 1, height - 7) love.graphics.rectangle("fill", x + width - 1, y + 7, 1, height - 7) end --[[--------------------------------------------------------- - func: skin.DrawMenu(object) - desc: draws the menu object --]]--------------------------------------------------------- function skin.DrawMenu(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local bodycolor = skin.controls.menu_body_color love.graphics.setColor(bodycolor) love.graphics.rectangle("fill", x, y, width, height) love.graphics.setColor(bordercolor) skin.OutlinedRectangle(x, y, width, height) end --[[--------------------------------------------------------- - func: skin.DrawMenuOption(object) - desc: draws the menuoption object --]]--------------------------------------------------------- function skin.DrawMenuOption(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() local hover = object:GetHover() local text = object:GetText() local icon = object:GetIcon() local option_type = object.option_type local body_hover_color = skin.controls.menuoption_body_hover_color local text_hover_color = skin.controls.menuoption_text_hover_color local text_color = skin.controls.menuoption_text_color local twidth = smallfont:getWidth(text) if option_type == "divider" then love.graphics.setColor(200, 200, 200, 255) love.graphics.rectangle("fill", x + 4, y + 2, width - 8, 1) object.contentheight = 10 else love.graphics.setFont(smallfont) if hover then love.graphics.setColor(body_hover_color) love.graphics.rectangle("fill", x + 2, y + 2, width - 4, height - 4) love.graphics.setColor(text_hover_color) love.graphics.print(text, x + 26, y + 5) else love.graphics.setColor(text_color) love.graphics.print(text, x + 26, y + 5) end if icon then love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(icon, x + 5, y + 5) end object.contentwidth = twidth + 31 object.contentheight = 25 end end function skin.DrawTree(object) local skin = object:GetSkin() local x = object:GetX() local y = object:GetY() local width = object:GetWidth() local height = object:GetHeight() love.graphics.setColor(200, 200, 200, 255) love.graphics.rectangle("fill", x, y, width, height) end function skin.DrawTreeNode(object) local icon = object.icon local buttonimage = skin.images["tree-node-button-open.png"] local width = 0 local x = object.x local leftpadding = 15 * object.level if object.level > 0 then leftpadding = leftpadding + buttonimage:getWidth() + 5 else leftpadding = buttonimage:getWidth() + 5 end local iconwidth = 0 if icon then iconwidth = icon:getWidth() end local twidth = loveframes.basicfont:getWidth(object.text) local theight = loveframes.basicfont:getHeight(object.text) if object.tree.selectednode == object then love.graphics.setColor(102, 140, 255, 255) love.graphics.rectangle("fill", x + leftpadding + 2 + iconwidth, object.y + 2, twidth, theight) end width = width + iconwidth + loveframes.basicfont:getWidth(object.text) + leftpadding love.graphics.setColor(255, 255, 255, 255) if icon then love.graphics.draw(icon, x + leftpadding, object.y) end love.graphics.setFont(loveframes.basicfont) love.graphics.setColor(0, 0, 0, 255) love.graphics.print(object.text, x + leftpadding + 2 + iconwidth, object.y + 2) object:SetWidth(width + 5) end function skin.DrawTreeNodeButton(object) local leftpadding = 15 * object.parent.level local image if object.parent.open then image = skin.images["tree-node-button-close.png"] else image = skin.images["tree-node-button-open.png"] end image:setFilter("nearest", "nearest") love.graphics.setColor(255, 255, 255, 255) love.graphics.draw(image, object.x, object.y) object:SetPos(2 + leftpadding, 3) object:SetSize(image:getWidth(), image:getHeight()) end -- register the skin loveframes.skins.Register(skin)
gpl-3.0
ElegantLin/My-CPU
project_4/project_4.sim/sim_1/behav/simulate.bat
306
@echo off set xv_path=D:\\Xilinx\\Vivado\\2016.4\\bin call %xv_path%/xsim openmips_min_sopc_tb_behav -key {Behavioral:sim_1:Functional:openmips_min_sopc_tb} -tclbatch openmips_min_sopc_tb.tcl -log simulate.log if "%errorlevel%"=="0" goto SUCCESS if "%errorlevel%"=="1" goto END :END exit 1 :SUCCESS exit 0
gpl-3.0
EpicGuy4000/Sudoku
SodukuConsoleApp/Commands/AddTileCommand.cs
1155
using Sudoku; using System; using System.Text.RegularExpressions; namespace SodukuConsoleApp.Command { public class AddTileCommand : SudokuCommand { private const string RowIndexGroupName = "rowIndex"; private const string ColumnIndexGroupName = "columnIndex"; private const string TileValueGroupName = "tileValue"; protected override string CommandPattern => @"add (?<" + RowIndexGroupName + @">\d) (?<" + ColumnIndexGroupName + @">\d) (?<" + TileValueGroupName + @">\d)"; public AddTileCommand(Board board) : base(board) { } public override Action<string> Execute => command => { var arguments = Regex.Match(command, CommandPattern); var rowIndex = int.Parse(arguments.Groups[RowIndexGroupName].Value); var columnIndex = int.Parse(arguments.Groups[ColumnIndexGroupName].Value); var value = int.Parse(arguments.Groups[TileValueGroupName].Value); _board.SetTileValue(rowIndex, columnIndex, value); }; public override string Description => $"Add values using \"{CommandPattern}\""; } }
gpl-3.0
germanux/cursomeanstack
02_js/18_figuras_poo/18_figuras.js
1253
calculaAreaRectangulo = function() { this.resultado.value = parseInt(this.alto.value) * parseInt(this.ancho.value); this.metodoCompartido("EEEEEAH!"); } calculaAreaTriangulo = function() { this.resultado.value = parseInt(this.alto.value) * parseInt(this.ancho.value) / 2; this.metodoCompartido("OOOOOH!"); } calculaAreaElipse = function() { this.resultado.value = (parseInt(this.alto.value) / 2) * (parseInt(this.ancho.value) / 2) * Math.PI; this.metodoCompartido("OOOOOH!"); } function callbackGenerica(mensaje1, mensaje2) { alert("Ya estáaaaa!! \n" + mensaje1 + " - " + mensaje2); } function callbackErrorRe(mensaje1, mensaje2) { alert("¡¡callbackError Rectangulo!! \n" + mensaje1 + " - " + mensaje2); this.kjkj = "" } function callbackErrorTri(mensaje1, mensaje2) { alert("¡¡callbackError Triangulo!! \n" + mensaje1 + " - " + mensaje2); this.kjkj = "" } // Rectangulo var Rectangulo = Figura.Heredar(calculaAreaRectangulo, "Rectangulo", callbackGenerica, callbackErrorRe); // Triangulo var Triangulo = Figura.Heredar(calculaAreaTriangulo, "Triangulo", callbackGenerica, callbackErrorTri); // Elipse var Elipse = Figura.Heredar(calculaAreaElipse, "Elipse", callbackGenerica);
gpl-3.0
ZeroOne71/ql
02_ECCentral/02_Portal/UI/ECCentral.Portal.UI.IM/Resources/ResProductSellerPortalMaintainDetail.Designer.cs
17569
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.17929 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace ECCentral.Portal.UI.IM.Resources { using System; /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class ResProductSellerPortalMaintainDetail { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] public ResProductSellerPortalMaintainDetail() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ECCentral.Portal.UI.IM.Resources.ResProductSellerPortalMaintainDetail", typeof(ResProductSellerPortalMaintainDetail).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// <summary> /// Looks up a localized string similar to 审核通过. /// </summary> public static string Btn_Audit { get { return ResourceManager.GetString("Btn_Audit", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 取消. /// </summary> public static string Btn_Cancel { get { return ResourceManager.GetString("Btn_Cancel", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 创建ID. /// </summary> public static string Btn_CreateID { get { return ResourceManager.GetString("Btn_CreateID", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 退回. /// </summary> public static string Btn_Deny { get { return ResourceManager.GetString("Btn_Deny", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 更新. /// </summary> public static string Btn_Update { get { return ResourceManager.GetString("Btn_Update", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 保存. /// </summary> public static string Button_Save { get { return ResourceManager.GetString("Button_Save", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 新品创建. /// </summary> public static string Dialog_AddProduct { get { return ResourceManager.GetString("Dialog_AddProduct", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 文件图片:. /// </summary> public static string Expander_FileInfo { get { return ResourceManager.GetString("Expander_FileInfo", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 产品图片:. /// </summary> public static string Expander_ImageInfo { get { return ResourceManager.GetString("Expander_ImageInfo", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 普通信息:. /// </summary> public static string Expander_NormalInfo { get { return ResourceManager.GetString("Expander_NormalInfo", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 操作. /// </summary> public static string Expander_Oper { get { return ResourceManager.GetString("Expander_Oper", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 详细信息. /// </summary> public static string Expander_ProductDescLong { get { return ResourceManager.GetString("Expander_ProductDescLong", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 产品信息:. /// </summary> public static string Expander_ProductInfo { get { return ResourceManager.GetString("Expander_ProductInfo", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 属性信息:. /// </summary> public static string Expander_PropertyInfo { get { return ResourceManager.GetString("Expander_PropertyInfo", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 质保信息:. /// </summary> public static string Expander_WarrantyInfo { get { return ResourceManager.GetString("Expander_WarrantyInfo", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 文件描述. /// </summary> public static string Grid_FileDesc { get { return ResourceManager.GetString("Grid_FileDesc", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 文件链接. /// </summary> public static string Grid_FileLink { get { return ResourceManager.GetString("Grid_FileLink", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 人工输入. /// </summary> public static string Grid_ManualInput { get { return ResourceManager.GetString("Grid_ManualInput", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 属性名. /// </summary> public static string Grid_PropertyName { get { return ResourceManager.GetString("Grid_PropertyName", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 属性值. /// </summary> public static string Grid_PropertyValue { get { return ResourceManager.GetString("Grid_PropertyValue", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 线下市场价:. /// </summary> public static string Label_BasicPrice { get { return ResourceManager.GetString("Label_BasicPrice", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 品牌:. /// </summary> public static string Label_BrandChName { get { return ResourceManager.GetString("Label_BrandChName", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 商品类别:. /// </summary> public static string Label_Category { get { return ResourceManager.GetString("Label_Category", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 泰隆优选售价:. /// </summary> public static string Label_CurrentPrice { get { return ResourceManager.GetString("Label_CurrentPrice", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 毛利率:. /// </summary> public static string Label_GrossMarginRate { get { return ResourceManager.GetString("Label_GrossMarginRate", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 高度:. /// </summary> public static string Label_Height { get { return ResourceManager.GetString("Label_Height", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 主机保修期:. /// </summary> public static string Label_HostWarrantyDay { get { return ResourceManager.GetString("Label_HostWarrantyDay", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 代销属性:. /// </summary> public static string Label_IsConsign { get { return ResourceManager.GetString("Label_IsConsign", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 是否拍照:. /// </summary> public static string Label_IsTakePictures { get { return ResourceManager.GetString("Label_IsTakePictures", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 长度:. /// </summary> public static string Label_Length { get { return ResourceManager.GetString("Label_Length", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 生产商:. /// </summary> public static string Label_ManufacturerName { get { return ResourceManager.GetString("Label_ManufacturerName", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 最小包装数量:. /// </summary> public static string Label_MinPackNumber { get { return ResourceManager.GetString("Label_MinPackNumber", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 备注:. /// </summary> public static string Label_Note { get { return ResourceManager.GetString("Label_Note", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 产地:. /// </summary> public static string Label_OrginName { get { return ResourceManager.GetString("Label_OrginName", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 商品包装描述:. /// </summary> public static string Label_PackageList { get { return ResourceManager.GetString("Label_PackageList", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 零部件保修期:. /// </summary> public static string Label_PartWarrantyDay { get { return ResourceManager.GetString("Label_PartWarrantyDay", resourceCulture); } } /// <summary> /// Looks up a localized string similar to PM:. /// </summary> public static string Label_PM { get { return ResourceManager.GetString("Label_PM", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 详细描述:. /// </summary> public static string Label_ProductDescLong { get { return ResourceManager.GetString("Label_ProductDescLong", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 商品型号:. /// </summary> public static string Label_ProductModel { get { return ResourceManager.GetString("Label_ProductModel", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 商品名称:. /// </summary> public static string Label_ProductName { get { return ResourceManager.GetString("Label_ProductName", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 促销信息:. /// </summary> public static string Label_PromotionTitle { get { return ResourceManager.GetString("Label_PromotionTitle", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 售后服务中心网址:. /// </summary> public static string Label_ServiceInfo { get { return ResourceManager.GetString("Label_ServiceInfo", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 厂商售后电话:. /// </summary> public static string Label_ServicePhone { get { return ResourceManager.GetString("Label_ServicePhone", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 厂商名称:. /// </summary> public static string Label_VendorName { get { return ResourceManager.GetString("Label_VendorName", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 厂商站点:. /// </summary> public static string Label_VendorSite { get { return ResourceManager.GetString("Label_VendorSite", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 预览. /// </summary> public static string Label_View { get { return ResourceManager.GetString("Label_View", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 正常采购价格:. /// </summary> public static string Label_VirtualPrice { get { return ResourceManager.GetString("Label_VirtualPrice", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 保修细则:. /// </summary> public static string Label_Warranty { get { return ResourceManager.GetString("Label_Warranty", resourceCulture); } } /// <summary> /// Looks up a localized string similar to 宽度:. /// </summary> public static string Label_Width { get { return ResourceManager.GetString("Label_Width", resourceCulture); } } } }
gpl-3.0
arobenko/mqtt-sn
client/src/basic/details/WriteBufStorageType.h
1942
// // Copyright 2016 - 2020 (C). Alex Robenko. All rights reserved. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #pragma once #include "comms/comms.h" namespace mqttsn { namespace client { namespace details { template <typename TOpts, bool TAllStatic> class WriteBufStorageType; template <typename TOpts> class WriteBufStorageType<TOpts, true> { static_assert( TOpts::HasGwAddStaticStorageSize && TOpts::HasClientIdStaticStorageSize && TOpts::HasTopicNameStaticStorageSize && TOpts::HasMessageDataStaticStorageSize, "Not all static storages"); static const std::size_t Size1 = (TOpts::GwAddStaticStorageSize > TOpts::ClientIdStaticStorageSize) ? TOpts::GwAddStaticStorageSize : TOpts::ClientIdStaticStorageSize; static const std::size_t Size2 = (Size1 > TOpts::TopicNameStaticStorageSize) ? Size1 : TOpts::TopicNameStaticStorageSize; static const std::size_t Size3 = (Size2 > TOpts::MessageDataStaticStorageSize) ? Size2 : TOpts::MessageDataStaticStorageSize; static const std::size_t FinalSize = Size3; static const std::size_t MaxOverhead = 10U; public: typedef comms::util::StaticVector<std::uint8_t, FinalSize + MaxOverhead> Type; }; template <typename TOpts> class WriteBufStorageType<TOpts, false> { public: typedef std::vector<std::uint8_t> Type; }; template <typename TOpts> using WriteBufStorageTypeT = typename WriteBufStorageType< TOpts, TOpts::HasGwAddStaticStorageSize && TOpts::HasClientIdStaticStorageSize && TOpts::HasTopicNameStaticStorageSize && TOpts::HasMessageDataStaticStorageSize >::Type; } // namespace details } // namespace client } // namespace mqttsn
gpl-3.0
Koziolek/Lottomat
src/main/java/pl/koziolekweb/lottomat/machine/Machine.java
1156
package pl.koziolekweb.lottomat.machine; import pl.koziolekweb.fun.Function0; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.function.BiFunction; import java.util.function.Function; import java.util.stream.Collectors; /** * TODO write JAVADOC!!! * User: koziolek */ public abstract class Machine<IN, T> { public T pick() { return getData() .andThen(defensiveCopy()) .andThen(shuffle()) .andThen(drawN()) .andThen(mapToResult()) .apply(null); } protected Function<Collection<IN>, List<IN>> defensiveCopy() { return ArrayList::new; } protected Function<List<IN>, List<IN>> shuffle() { return l -> { Collections.shuffle(l); return l; }; } protected BiFunction<List<IN>, Integer, List<IN>> draw() { return (c, l) -> c.stream().limit(l).collect(Collectors.toList()); } protected Function<List<IN>, List<IN>> drawN() { return l -> draw().apply(l, limit()); } protected abstract Function0<Collection<IN>> getData(); protected abstract Function<Collection<IN>, T> mapToResult(); protected abstract Integer limit(); }
gpl-3.0
sapia-oss/corus
modules/server/src/main/java/org/sapia/corus/database/persistence/TemplateMatcher.java
694
package org.sapia.corus.database.persistence; import org.sapia.corus.client.services.database.RecordMatcher; import org.sapia.corus.client.services.database.persistence.Record; /** * This class implements the {@link RecordMatcher} interface over the * {@link Template} class. * * @author yduchesne * */ public class TemplateMatcher<T> implements RecordMatcher<T> { private Template<T> template; public TemplateMatcher(Template<T> template) { this.template = template; } /** * This method delegates matching to its internal {@link Template}. * * @see Template */ @Override public boolean matches(Record<T> rec) { return template.matches(rec); } }
gpl-3.0
ChenSD/ChenSD.github.io
_posts/2019-10-6-认知干预和训练.md
3847
--- layout: post title: 认知和情绪调节的干预和训练 date: 2019-10-6 9:10:20 tags: [Emotion] --- # 什么是认知干预 认知干预(Cognitive Intervention)是为了帮助想要摆脱心理问题的个体而设计的心理治疗方法, 主要是通过改变个体对于问题的觉知水平、主观体验和思考方式方法来进行。 Cognitive intervention is designed to help people with cognitive impairments (difficulties in the way that they think or perceive) to re-engineer themselves back toward a healthy and productive life. ## 干预对象 认知受损(cognitive impairments), 并且需要他人帮助其解决心理问题以便重新回归正常生活的个体。 ## 前提假设 心理上的认知干预假设通过改变对自己以往经验或当前经历的看法, 我们的情绪、行为和生理活动是可以被自我掌握的,或者至少可以被自己所影响。 也就是说,患者首先需要相信自我的心理和生理活动可以被自己所调节(自我调节信念)。 ## 基本干预手段 1. 引导个体将注意力集中在自己的问题上,让患者对自我问题进行评估和分析; 2. 通过有效的提问和聆听,引导个体理解其对待心理问题的方式,并引导其用言语表述其观点。 3. 通过将观点的语言化,干预者就能够帮助患者分析观点中逻辑上的优势和缺陷;患者使用了哪些证据来 强化其观点,哪些证据是不可靠的?其观点是合理的吗,对于患者是有利的吗? 4. 在交流中,尝试转变患者的认知,让患者用一种新的观点来看待其遭遇的问题。 # 认知训练 1. 认知训练(cognitive training),也称为大脑训练(Brain training)的目的是帮助个体维持或提高其认知能力(cognitive abilities)。 2. 认知训练和认知干预的差别在于:认知训练的个体并不一定是具有心理问题的患者,正常个体贯穿其一生都可以接受 第一,认知训练的个体并不一定是具有心理问题的患者,正常个体贯穿其一生都可以接受 认知训练。我们的义务教育,高等教育以及继续教育除了传授知识,也包含了一部分认知训练的内容,例如如何使用辩证法看待问题和解决问题。 第二,训练(training)的侧重点在于训练者通过有效地沟通让被训练者产生学习活动,类似于教师和学生的关系;而认知干预侧重于矫正患者的心理问题,类似于医生和患者的关系。 第三,目的不同。认知训练往往集中在如何通过系统的训练来提高个体的记忆能力(速度,容量还是持续性)、注意力、语言能力或者自我调节能力等等;认知干预的目的在于矫正患者的心理问题, 帮助其重构更具有适应性的认知框架。 3. 认知训练和认知干预的相同点在于,两者都假设认知能力是可以通过训练或干预的方法来矫正、维持或提高,即我们的认知是具有可塑性的。 从认知神经科学的角度讲,就是认为大脑是具有可塑的(neuroplasticity)。 Our brains can keep adapting and developing new abilities throughout our lifetime. # 认知训练干预(cognitive training interventions) 认知训练和认知干预也可以相结合。 # 情绪调节干预 1. Denny B. T. (2020). Getting better over time: A framework for examining the impact of emotion regulation training. Emotion (Washington, D.C.), 20(1), 110–114. https://doi.org/10.1037/emo0000641 # 参考资料 1. http://www.knowledgebank.irri.org/training/fact-sheets/conducting-training/item/designing-effective-training-interventions-fact-sheet 2. https://www.braintrain.com/what-is-cognitive-training/ 3. https://en.wikipedia.org/wiki/Brain_training
gpl-3.0
crisferlop/DNASequenceAlignment
doc/html/search/pages_0.js
231
var searchData= [ ['dnasequencealignment_20_26_25_20dnasequencegenerator',['DNASequenceAlignment &amp;% DNASequenceGenerator',['../md__home_cristianfernando__documentos_git__d_n_a_sequence_alignment__r_e_a_d_m_e.html',1,'']]] ];
gpl-3.0
fchauvel/XSCF
tests/test_agent.cpp
6182
/* * This file is part of XCSF. * * XCSF is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * XCSF is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public * License for more details. * * You should have received a copy of the GNU General Public License * along with XCSF. If not, see <http://www.gnu.org/licenses/>. * */ #include "CppUTest/TestHarness.h" #include <cmath> #include <sstream> #include "agent.h" #include "rule.h" #include "helpers.h" using namespace std; using namespace xcsf; TEST_GROUP(OneRuleAgent) { Covering *covering; RewardFunction *reward; TestRuleFactory evolution; Agent* agent; vector<int> predictions = { 4 }; MetaRule *rule; void setup(void) { covering = new FakeCovering(); reward = new WilsonReward(0.25, 500, 2); rule = new MetaRule(Rule({Interval(0, 50)}, predictions), Performance(1.0, 1.0, 1.0)); evolution.define(*rule); agent = new Agent(evolution, *covering, *reward); } void teardown(void) { delete agent; delete reward; delete covering; } }; TEST(OneRuleAgent, test_predict_the_single_active_rule) { const Vector context({ 1 }); const Vector& actual = agent->predict(context); CHECK(Vector(predictions) == actual); } TEST(OneRuleAgent, test_reward) { const Vector context({ 1 }); agent->predict(context); agent->reward(10); DOUBLES_EQUAL(3.25, rule->weighted_payoff(), 1e-6); } TEST_GROUP(TwoRulesAgent) { Covering *covering; RewardFunction *reward; TestRuleFactory evolution; Agent* agent; MetaRule *rule_1, *rule_2; void setup(void) { covering = new FakeCovering(); reward = new WilsonReward(0.25, 500, 2); rule_1 = new MetaRule(Rule({Interval(0, 49)}, { 4 }), Performance(1.0, 1.0, 1.0)); evolution.define(*rule_1); rule_2 = new MetaRule(Rule({Interval(40, 100)}, { 3 }), Performance(1.0, 1.0, 1.0)); evolution.define(*rule_2); agent = new Agent(evolution, *covering, *reward); } void teardown(void) { delete agent; delete reward; delete covering; } }; TEST(TwoRulesAgent, test_display) { stringstream out; agent->display_on(out); stringstream expected; expected << " F. P. E. Rule" << endl << "---------------------------------------------" << endl << " 1.0 1.0 1.0 ([ 0, 49]) => ( 4)" << endl << " 1.0 1.0 1.0 ([ 40, 100]) => ( 3)" << endl << "---------------------------------------------" << endl << "2 rule(s)." << endl; CHECK_EQUAL(expected.str(), out.str()); } TEST(TwoRulesAgent, test_predict_active_rule) { const Vector context({ 25 }); const Vector& actual = agent->predict(context); CHECK(Vector({ 4 }) == actual); } TEST_GROUP(OverlappingRulesAgent) { Covering *covering; RewardFunction *reward; TestRuleFactory evolution; Agent *agent; MetaRule *rule_1, *rule_2, *rule_3; void setup(void) { covering = new FakeCovering(); reward = new WilsonReward(0.25, 500, 2); rule_1 = new MetaRule(Rule({Interval(0, 100)}, { 4 }), Performance(1.0, 1.0, 1.0)); rule_2 = new MetaRule(Rule({Interval(0, 100)}, { 4 }), Performance(0.8, 0.8, 1.0)); rule_3 = new MetaRule(Rule({Interval(0, 100)}, { 3 }), Performance(0.5, 0.5, 1.0)); evolution.define(*rule_1); evolution.define(*rule_2); evolution.define(*rule_3); agent = new Agent(evolution, *covering, *reward); } void teardown(void) { delete agent; delete covering; delete reward; } }; TEST(OverlappingRulesAgent, test_predict_the_most_relevant_rule) { const Vector& actual = agent->predict(Vector({ 50 })); CHECK(Vector({ 4 }) == actual); } TEST(OverlappingRulesAgent, test_reward) { const Vector context({ 50 }); agent->predict(context); agent->reward(10); DOUBLES_EQUAL(2.84375, rule_1->weighted_payoff(), 1e-6); DOUBLES_EQUAL(2.2475, rule_2->weighted_payoff(), 1e-6); } TEST_GROUP(TestAgentEvolution) { MetaRulePool pool; RewardFunction *reward; Randomizer randomizer; Decision *decisions; Selection *selection; Crossover *crossover; AlleleMutation *mutation; DefaultEvolution *evolution; EvolutionListener *listener; Covering *covering; Agent *agent; Codec *codec; void setup(void) { reward = new WilsonReward(0.25, 500, 2); decisions = new RandomDecision(randomizer, 0.25, 0.1); selection = new RouletteWheel(randomizer); crossover = new TwoPointCrossover(randomizer); mutation = new RandomAlleleMutation(randomizer); listener = new LogListener(cout); codec = new Codec(pool); evolution = new DefaultEvolution(pool, *codec, *decisions, *crossover, *selection, *mutation, *listener); covering = new FakeCovering(); agent = new Agent(*evolution, *covering, *reward); } void teardown(void) { delete codec; delete decisions; delete selection; delete crossover; delete mutation; delete listener; delete evolution; delete agent; delete covering; delete reward; } static constexpr double MAX_REWARD = 100; static constexpr double TOLERANCE = 25; double compute_reward(double expected, double actual) { double error = expected - actual; return MAX_REWARD * exp(-pow(error, 2) / (2 * pow(TOLERANCE, 2))); } }; IGNORE_TEST(TestAgentEvolution, test_long_run) { for (int round=0 ; round< 10 ; ++round){ for (int value=0 ; value < 100 ; ++value) { Vector prediction = agent->predict(Vector({ value })); unsigned int actual = static_cast<unsigned int>(prediction[0]); double prize = compute_reward(value, actual); cout << "X=" << value << " ; P=" << actual << "; R=" << prize << endl; agent->reward(prize); } } }
gpl-3.0
onzlak42/PokemonGo-api-cpp
proto/proto_cpp/POGOProtos/Data/AssetDigestEntry.pb.cc
28078
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: POGOProtos/Data/AssetDigestEntry.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "POGOProtos/Data/AssetDigestEntry.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/port.h> #include <google/protobuf/stubs/once.h> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/wire_format_lite_inl.h> #include <google/protobuf/descriptor.h> #include <google/protobuf/generated_message_reflection.h> #include <google/protobuf/reflection_ops.h> #include <google/protobuf/wire_format.h> // @@protoc_insertion_point(includes) namespace POGOProtos { namespace Data { namespace { const ::google::protobuf::Descriptor* AssetDigestEntry_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* AssetDigestEntry_reflection_ = NULL; } // namespace void protobuf_AssignDesc_POGOProtos_2fData_2fAssetDigestEntry_2eproto() GOOGLE_ATTRIBUTE_COLD; void protobuf_AssignDesc_POGOProtos_2fData_2fAssetDigestEntry_2eproto() { protobuf_AddDesc_POGOProtos_2fData_2fAssetDigestEntry_2eproto(); const ::google::protobuf::FileDescriptor* file = ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( "POGOProtos/Data/AssetDigestEntry.proto"); GOOGLE_CHECK(file != NULL); AssetDigestEntry_descriptor_ = file->message_type(0); static const int AssetDigestEntry_offsets_[6] = { GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AssetDigestEntry, asset_id_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AssetDigestEntry, bundle_name_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AssetDigestEntry, version_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AssetDigestEntry, checksum_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AssetDigestEntry, size_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AssetDigestEntry, key_), }; AssetDigestEntry_reflection_ = ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( AssetDigestEntry_descriptor_, AssetDigestEntry::default_instance_, AssetDigestEntry_offsets_, -1, -1, -1, sizeof(AssetDigestEntry), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AssetDigestEntry, _internal_metadata_), GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AssetDigestEntry, _is_default_instance_)); } namespace { GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); inline void protobuf_AssignDescriptorsOnce() { ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, &protobuf_AssignDesc_POGOProtos_2fData_2fAssetDigestEntry_2eproto); } void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD; void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( AssetDigestEntry_descriptor_, &AssetDigestEntry::default_instance()); } } // namespace void protobuf_ShutdownFile_POGOProtos_2fData_2fAssetDigestEntry_2eproto() { delete AssetDigestEntry::default_instance_; delete AssetDigestEntry_reflection_; } void protobuf_AddDesc_POGOProtos_2fData_2fAssetDigestEntry_2eproto() GOOGLE_ATTRIBUTE_COLD; void protobuf_AddDesc_POGOProtos_2fData_2fAssetDigestEntry_2eproto() { static bool already_here = false; if (already_here) return; already_here = true; GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( "\n&POGOProtos/Data/AssetDigestEntry.proto" "\022\017POGOProtos.Data\"w\n\020AssetDigestEntry\022\020\n" "\010asset_id\030\001 \001(\t\022\023\n\013bundle_name\030\002 \001(\t\022\017\n\007" "version\030\003 \001(\003\022\020\n\010checksum\030\004 \001(\007\022\014\n\004size\030" "\005 \001(\005\022\013\n\003key\030\006 \001(\014b\006proto3", 186); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "POGOProtos/Data/AssetDigestEntry.proto", &protobuf_RegisterTypes); AssetDigestEntry::default_instance_ = new AssetDigestEntry(); AssetDigestEntry::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_POGOProtos_2fData_2fAssetDigestEntry_2eproto); } // Force AddDescriptors() to be called at static initialization time. struct StaticDescriptorInitializer_POGOProtos_2fData_2fAssetDigestEntry_2eproto { StaticDescriptorInitializer_POGOProtos_2fData_2fAssetDigestEntry_2eproto() { protobuf_AddDesc_POGOProtos_2fData_2fAssetDigestEntry_2eproto(); } } static_descriptor_initializer_POGOProtos_2fData_2fAssetDigestEntry_2eproto_; // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int AssetDigestEntry::kAssetIdFieldNumber; const int AssetDigestEntry::kBundleNameFieldNumber; const int AssetDigestEntry::kVersionFieldNumber; const int AssetDigestEntry::kChecksumFieldNumber; const int AssetDigestEntry::kSizeFieldNumber; const int AssetDigestEntry::kKeyFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 AssetDigestEntry::AssetDigestEntry() : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); // @@protoc_insertion_point(constructor:POGOProtos.Data.AssetDigestEntry) } void AssetDigestEntry::InitAsDefaultInstance() { _is_default_instance_ = true; } AssetDigestEntry::AssetDigestEntry(const AssetDigestEntry& from) : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); MergeFrom(from); // @@protoc_insertion_point(copy_constructor:POGOProtos.Data.AssetDigestEntry) } void AssetDigestEntry::SharedCtor() { _is_default_instance_ = false; ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; asset_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); bundle_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); version_ = GOOGLE_LONGLONG(0); checksum_ = 0u; size_ = 0; key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } AssetDigestEntry::~AssetDigestEntry() { // @@protoc_insertion_point(destructor:POGOProtos.Data.AssetDigestEntry) SharedDtor(); } void AssetDigestEntry::SharedDtor() { asset_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); bundle_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != default_instance_) { } } void AssetDigestEntry::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* AssetDigestEntry::descriptor() { protobuf_AssignDescriptorsOnce(); return AssetDigestEntry_descriptor_; } const AssetDigestEntry& AssetDigestEntry::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_POGOProtos_2fData_2fAssetDigestEntry_2eproto(); return *default_instance_; } AssetDigestEntry* AssetDigestEntry::default_instance_ = NULL; AssetDigestEntry* AssetDigestEntry::New(::google::protobuf::Arena* arena) const { AssetDigestEntry* n = new AssetDigestEntry; if (arena != NULL) { arena->Own(n); } return n; } void AssetDigestEntry::Clear() { // @@protoc_insertion_point(message_clear_start:POGOProtos.Data.AssetDigestEntry) #if defined(__clang__) #define ZR_HELPER_(f) \ _Pragma("clang diagnostic push") \ _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \ __builtin_offsetof(AssetDigestEntry, f) \ _Pragma("clang diagnostic pop") #else #define ZR_HELPER_(f) reinterpret_cast<char*>(\ &reinterpret_cast<AssetDigestEntry*>(16)->f) #endif #define ZR_(first, last) do {\ ::memset(&first, 0,\ ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\ } while (0) ZR_(version_, size_); asset_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); bundle_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); #undef ZR_HELPER_ #undef ZR_ } bool AssetDigestEntry::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:POGOProtos.Data.AssetDigestEntry) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string asset_id = 1; case 1: { if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_asset_id())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->asset_id().data(), this->asset_id().length(), ::google::protobuf::internal::WireFormatLite::PARSE, "POGOProtos.Data.AssetDigestEntry.asset_id")); } else { goto handle_unusual; } if (input->ExpectTag(18)) goto parse_bundle_name; break; } // optional string bundle_name = 2; case 2: { if (tag == 18) { parse_bundle_name: DO_(::google::protobuf::internal::WireFormatLite::ReadString( input, this->mutable_bundle_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->bundle_name().data(), this->bundle_name().length(), ::google::protobuf::internal::WireFormatLite::PARSE, "POGOProtos.Data.AssetDigestEntry.bundle_name")); } else { goto handle_unusual; } if (input->ExpectTag(24)) goto parse_version; break; } // optional int64 version = 3; case 3: { if (tag == 24) { parse_version: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( input, &version_))); } else { goto handle_unusual; } if (input->ExpectTag(37)) goto parse_checksum; break; } // optional fixed32 checksum = 4; case 4: { if (tag == 37) { parse_checksum: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>( input, &checksum_))); } else { goto handle_unusual; } if (input->ExpectTag(40)) goto parse_size; break; } // optional int32 size = 5; case 5: { if (tag == 40) { parse_size: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( input, &size_))); } else { goto handle_unusual; } if (input->ExpectTag(50)) goto parse_key; break; } // optional bytes key = 6; case 6: { if (tag == 50) { parse_key: DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( input, this->mutable_key())); } else { goto handle_unusual; } if (input->ExpectAtEnd()) goto success; break; } default: { handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: // @@protoc_insertion_point(parse_success:POGOProtos.Data.AssetDigestEntry) return true; failure: // @@protoc_insertion_point(parse_failure:POGOProtos.Data.AssetDigestEntry) return false; #undef DO_ } void AssetDigestEntry::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // @@protoc_insertion_point(serialize_start:POGOProtos.Data.AssetDigestEntry) // optional string asset_id = 1; if (this->asset_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->asset_id().data(), this->asset_id().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "POGOProtos.Data.AssetDigestEntry.asset_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->asset_id(), output); } // optional string bundle_name = 2; if (this->bundle_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->bundle_name().data(), this->bundle_name().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "POGOProtos.Data.AssetDigestEntry.bundle_name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->bundle_name(), output); } // optional int64 version = 3; if (this->version() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->version(), output); } // optional fixed32 checksum = 4; if (this->checksum() != 0) { ::google::protobuf::internal::WireFormatLite::WriteFixed32(4, this->checksum(), output); } // optional int32 size = 5; if (this->size() != 0) { ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->size(), output); } // optional bytes key = 6; if (this->key().size() > 0) { ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( 6, this->key(), output); } // @@protoc_insertion_point(serialize_end:POGOProtos.Data.AssetDigestEntry) } ::google::protobuf::uint8* AssetDigestEntry::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:POGOProtos.Data.AssetDigestEntry) // optional string asset_id = 1; if (this->asset_id().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->asset_id().data(), this->asset_id().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "POGOProtos.Data.AssetDigestEntry.asset_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->asset_id(), target); } // optional string bundle_name = 2; if (this->bundle_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->bundle_name().data(), this->bundle_name().length(), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "POGOProtos.Data.AssetDigestEntry.bundle_name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->bundle_name(), target); } // optional int64 version = 3; if (this->version() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->version(), target); } // optional fixed32 checksum = 4; if (this->checksum() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(4, this->checksum(), target); } // optional int32 size = 5; if (this->size() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->size(), target); } // optional bytes key = 6; if (this->key().size() > 0) { target = ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( 6, this->key(), target); } // @@protoc_insertion_point(serialize_to_array_end:POGOProtos.Data.AssetDigestEntry) return target; } int AssetDigestEntry::ByteSize() const { // @@protoc_insertion_point(message_byte_size_start:POGOProtos.Data.AssetDigestEntry) int total_size = 0; // optional string asset_id = 1; if (this->asset_id().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->asset_id()); } // optional string bundle_name = 2; if (this->bundle_name().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->bundle_name()); } // optional int64 version = 3; if (this->version() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int64Size( this->version()); } // optional fixed32 checksum = 4; if (this->checksum() != 0) { total_size += 1 + 4; } // optional int32 size = 5; if (this->size() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->size()); } // optional bytes key = 6; if (this->key().size() > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( this->key()); } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } void AssetDigestEntry::MergeFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:POGOProtos.Data.AssetDigestEntry) if (GOOGLE_PREDICT_FALSE(&from == this)) { ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); } const AssetDigestEntry* source = ::google::protobuf::internal::DynamicCastToGenerated<const AssetDigestEntry>( &from); if (source == NULL) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:POGOProtos.Data.AssetDigestEntry) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:POGOProtos.Data.AssetDigestEntry) MergeFrom(*source); } } void AssetDigestEntry::MergeFrom(const AssetDigestEntry& from) { // @@protoc_insertion_point(class_specific_merge_from_start:POGOProtos.Data.AssetDigestEntry) if (GOOGLE_PREDICT_FALSE(&from == this)) { ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__); } if (from.asset_id().size() > 0) { asset_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.asset_id_); } if (from.bundle_name().size() > 0) { bundle_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.bundle_name_); } if (from.version() != 0) { set_version(from.version()); } if (from.checksum() != 0) { set_checksum(from.checksum()); } if (from.size() != 0) { set_size(from.size()); } if (from.key().size() > 0) { key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_); } } void AssetDigestEntry::CopyFrom(const ::google::protobuf::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:POGOProtos.Data.AssetDigestEntry) if (&from == this) return; Clear(); MergeFrom(from); } void AssetDigestEntry::CopyFrom(const AssetDigestEntry& from) { // @@protoc_insertion_point(class_specific_copy_from_start:POGOProtos.Data.AssetDigestEntry) if (&from == this) return; Clear(); MergeFrom(from); } bool AssetDigestEntry::IsInitialized() const { return true; } void AssetDigestEntry::Swap(AssetDigestEntry* other) { if (other == this) return; InternalSwap(other); } void AssetDigestEntry::InternalSwap(AssetDigestEntry* other) { asset_id_.Swap(&other->asset_id_); bundle_name_.Swap(&other->bundle_name_); std::swap(version_, other->version_); std::swap(checksum_, other->checksum_); std::swap(size_, other->size_); key_.Swap(&other->key_); _internal_metadata_.Swap(&other->_internal_metadata_); std::swap(_cached_size_, other->_cached_size_); } ::google::protobuf::Metadata AssetDigestEntry::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; metadata.descriptor = AssetDigestEntry_descriptor_; metadata.reflection = AssetDigestEntry_reflection_; return metadata; } #if PROTOBUF_INLINE_NOT_IN_HEADERS // AssetDigestEntry // optional string asset_id = 1; void AssetDigestEntry::clear_asset_id() { asset_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } const ::std::string& AssetDigestEntry::asset_id() const { // @@protoc_insertion_point(field_get:POGOProtos.Data.AssetDigestEntry.asset_id) return asset_id_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void AssetDigestEntry::set_asset_id(const ::std::string& value) { asset_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:POGOProtos.Data.AssetDigestEntry.asset_id) } void AssetDigestEntry::set_asset_id(const char* value) { asset_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:POGOProtos.Data.AssetDigestEntry.asset_id) } void AssetDigestEntry::set_asset_id(const char* value, size_t size) { asset_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast<const char*>(value), size)); // @@protoc_insertion_point(field_set_pointer:POGOProtos.Data.AssetDigestEntry.asset_id) } ::std::string* AssetDigestEntry::mutable_asset_id() { // @@protoc_insertion_point(field_mutable:POGOProtos.Data.AssetDigestEntry.asset_id) return asset_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } ::std::string* AssetDigestEntry::release_asset_id() { // @@protoc_insertion_point(field_release:POGOProtos.Data.AssetDigestEntry.asset_id) return asset_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void AssetDigestEntry::set_allocated_asset_id(::std::string* asset_id) { if (asset_id != NULL) { } else { } asset_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), asset_id); // @@protoc_insertion_point(field_set_allocated:POGOProtos.Data.AssetDigestEntry.asset_id) } // optional string bundle_name = 2; void AssetDigestEntry::clear_bundle_name() { bundle_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } const ::std::string& AssetDigestEntry::bundle_name() const { // @@protoc_insertion_point(field_get:POGOProtos.Data.AssetDigestEntry.bundle_name) return bundle_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void AssetDigestEntry::set_bundle_name(const ::std::string& value) { bundle_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:POGOProtos.Data.AssetDigestEntry.bundle_name) } void AssetDigestEntry::set_bundle_name(const char* value) { bundle_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:POGOProtos.Data.AssetDigestEntry.bundle_name) } void AssetDigestEntry::set_bundle_name(const char* value, size_t size) { bundle_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast<const char*>(value), size)); // @@protoc_insertion_point(field_set_pointer:POGOProtos.Data.AssetDigestEntry.bundle_name) } ::std::string* AssetDigestEntry::mutable_bundle_name() { // @@protoc_insertion_point(field_mutable:POGOProtos.Data.AssetDigestEntry.bundle_name) return bundle_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } ::std::string* AssetDigestEntry::release_bundle_name() { // @@protoc_insertion_point(field_release:POGOProtos.Data.AssetDigestEntry.bundle_name) return bundle_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void AssetDigestEntry::set_allocated_bundle_name(::std::string* bundle_name) { if (bundle_name != NULL) { } else { } bundle_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), bundle_name); // @@protoc_insertion_point(field_set_allocated:POGOProtos.Data.AssetDigestEntry.bundle_name) } // optional int64 version = 3; void AssetDigestEntry::clear_version() { version_ = GOOGLE_LONGLONG(0); } ::google::protobuf::int64 AssetDigestEntry::version() const { // @@protoc_insertion_point(field_get:POGOProtos.Data.AssetDigestEntry.version) return version_; } void AssetDigestEntry::set_version(::google::protobuf::int64 value) { version_ = value; // @@protoc_insertion_point(field_set:POGOProtos.Data.AssetDigestEntry.version) } // optional fixed32 checksum = 4; void AssetDigestEntry::clear_checksum() { checksum_ = 0u; } ::google::protobuf::uint32 AssetDigestEntry::checksum() const { // @@protoc_insertion_point(field_get:POGOProtos.Data.AssetDigestEntry.checksum) return checksum_; } void AssetDigestEntry::set_checksum(::google::protobuf::uint32 value) { checksum_ = value; // @@protoc_insertion_point(field_set:POGOProtos.Data.AssetDigestEntry.checksum) } // optional int32 size = 5; void AssetDigestEntry::clear_size() { size_ = 0; } ::google::protobuf::int32 AssetDigestEntry::size() const { // @@protoc_insertion_point(field_get:POGOProtos.Data.AssetDigestEntry.size) return size_; } void AssetDigestEntry::set_size(::google::protobuf::int32 value) { size_ = value; // @@protoc_insertion_point(field_set:POGOProtos.Data.AssetDigestEntry.size) } // optional bytes key = 6; void AssetDigestEntry::clear_key() { key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } const ::std::string& AssetDigestEntry::key() const { // @@protoc_insertion_point(field_get:POGOProtos.Data.AssetDigestEntry.key) return key_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void AssetDigestEntry::set_key(const ::std::string& value) { key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:POGOProtos.Data.AssetDigestEntry.key) } void AssetDigestEntry::set_key(const char* value) { key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:POGOProtos.Data.AssetDigestEntry.key) } void AssetDigestEntry::set_key(const void* value, size_t size) { key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast<const char*>(value), size)); // @@protoc_insertion_point(field_set_pointer:POGOProtos.Data.AssetDigestEntry.key) } ::std::string* AssetDigestEntry::mutable_key() { // @@protoc_insertion_point(field_mutable:POGOProtos.Data.AssetDigestEntry.key) return key_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } ::std::string* AssetDigestEntry::release_key() { // @@protoc_insertion_point(field_release:POGOProtos.Data.AssetDigestEntry.key) return key_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } void AssetDigestEntry::set_allocated_key(::std::string* key) { if (key != NULL) { } else { } key_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), key); // @@protoc_insertion_point(field_set_allocated:POGOProtos.Data.AssetDigestEntry.key) } #endif // PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) } // namespace Data } // namespace POGOProtos // @@protoc_insertion_point(global_scope)
gpl-3.0
usametov/TagSortService
TagSortService/web/src/app/tagBundle/AssociatedTags-deprecated.html
8963
<!DOCTYPE html> <html ng-app="TagBundleUtil"> <head> <title>Tag Bundle Util</title> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap --> <link href="../../assets/bootstrap.min.css" rel="stylesheet" /> <link href="../../assets/styles.css" rel="stylesheet" /> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.2/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <script src="../../common/jquery-2.2.1.min.js"></script> <script src="../../common/bootstrap.min.js"></script> <script src="../../common/angular.min.js"></script> <script src="../../common/rx.lite.min.js"></script> <script src="../../common/angular-clipboard.js"></script> <script src="../app.js"></script> <script> var states_dict = new Map(); //save states transition table in $window service, it will be used inside SetStateTranstions states_dict.set('#topTagsList', { '39': ['topTags', 'associatedTags'] }); states_dict.set('#associatedTagsList', { '37': ['associatedTags', 'topTags'], '39': ['associatedTags', 'exclTags'] }); states_dict.set('#excludeTagsList', { '37': ['exclTags', 'associatedTags'] }); </script> </head> <body ng-controller="tagBundleCtrl" ng-init='InitAssociatedTagsModel()'> <div class="container-fluid"> <nav class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#"> <span class="glyphicon glyphicon-tags"></span> &nbsp;Tag Bundle Util </a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> <li><a href="manageBookmarks.html"> <span class="glyphicon glyphicon-link"></span> Manage Bookmarks</a> </li> <li><a href="FreqTags.html">Process Frequent Tags</a></li> <li class="active"><a href="#">Process Associated Tags</a></li> <li><a href="addEditTagBundle.html"> <span class="glyphicon glyphicon-plus"></span> Add/Edit Tag Bundle</a> </li> </ul> <!--TODO: may need later--> <!--<ul class="nav navbar-nav navbar-right"> <li><a href="#">Link</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li class="divider"></li> <li><a href="#">Separated link</a></li> </ul> </li> </ul>--> </div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav> <br /> <h1 class="col-lg-offset-4">Process Associated Tags</h1> <div class="col-lg-offset-4"> Use arrows <span class="glyphicon glyphicon-arrow-left"></span> and <span class="glyphicon glyphicon-arrow-right"></span> to move tags between lists. </div> <br/> <div class="row"> <div class="col-md-4"> <div class="col-md-2"></div> <div class="col-md-10"> <span class="label label-pill label-success"> :: Select existing tag bundle :: </span> <select class="form-control" id="tagBundles" ng-model="selectedTagBundle" ng-change="ReloadPage(selectedTagBundle)"> <option ng-repeat="tagBundle in existingTagBundles" value="{{tagBundle}}">{{tagBundle}}</option> </select> </div> </div> <div class="col-md-4"> <div class="col-md-1"></div> <div class="col-md-10"> </div> <div class="col-md-1"></div> </div> <div class="col-md-4"></div> </div> <br /> <div class="row"> <div class="col-md-4"> <div class="col-md-2"></div> <div class="col-md-10"> <h4> <span class="label label-pill label-success"> :: Tag Bundle (Processed) :: </span> </h4> <select id="topTagsList" class="form-control" multiple size="20"> <option ng-repeat="tag in topTags" value="{{tag}}">{{tag}}</option> </select> </div> </div> <div class="col-md-4"> <div class="col-md-1"></div> <div class="col-md-10"> <h4> <span class="label label-pill label-success"> :: Calculated Associations :: </span> </h4> <select id="associatedTagsList" class="form-control" multiple size="20"> <option ng-repeat="tag in associatedTags" value="{{tag}}">{{tag}}</option> </select> </div> <div class="col-md-1"></div> </div> <div class="col-md-4"> <div class="col-md-1"></div> <div class="col-md-10"> <h4> <span class="label label-pill label-success"> :: Tags To Exclude from Calculation :: </span> </h4> <select id="excludeTagsList" class="form-control" multiple size="20"> <option ng-repeat="tag in exclTags" value="{{tag}}">{{tag}}</option> </select> </div> <div class="col-md-1"></div> </div> </div> <br /> <div class="col-md-3"></div> <div class="col-md-3"> <button type="button" class="btn btn-info form-control" ng-click="SaveTagBundleAndExcludeList();"> <span class="glyphicon glyphicon-save"></span> Save </button> </div> <div class="col-md-3"> <button type="button" class="btn btn-info form-control" ng-click="SetTagAssociations();"> <span class="glyphicon glyphicon-play-circle"></span> ReCalculate Tag Associations</button> </div> <div class="col-md-3"></div> <br/> </div> </body> </html>
gpl-3.0
irares/WirelessHart-Gateway
Stack/WHartStack/WHartTypes.h
4175
/* * Copyright (C) 2013 Nivis LLC. * Email: opensource@nivis.com * Website: http://www.nivis.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 3 of the License. * * Redistribution and use in source and binary forms must retain this * copyright notice. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ /* * WHartTypes.h * * Created on: Nov 26, 2008 * Author: nicu.dascalu */ #ifndef WHART_TYPES_H_ #define WHART_TYPES_H_ #ifdef HAVE_STDINT # include <stdint.h> #else typedef unsigned char uint8_t; typedef char int8_t; typedef unsigned short uint16_t; typedef short int16_t; typedef unsigned int uint32_t; typedef int int32_t; #endif typedef uint8_t bool_t; static const bool_t BOOL_TRUE = 1; static const bool_t BOOL_FALSE = 0; #ifdef WIRELESS_HART_DEVICE typedef uint8_t WHartCommandSize; #else typedef uint16_t WHartCommandSize; #endif typedef struct { uint8_t bytes[5]; // is unsigned 40 } WHartUniqueID; typedef uint16_t WHartShortAddress;//or nickname /** *The Date consists of three 8-bit binary unsigned integers representing, respectively, *the day, month, and year minus 1900. Date is transmitted day first followed by the month and year bytes. */ typedef struct { uint8_t day; uint8_t month; uint8_t year; } WHartDate; /** *The Time consists of a unsigned 32-bit binary integer, * with the least significant bit representing 1/32 of a millisecond (i.e., 0.03125 milliseconds). */ typedef union { uint32_t u32; struct { uint32_t scalemiliseconds :5; //represents 1/32 of a millisecond uint32_t miliseconds :27; } tm; } WHartTime; struct DeviceIndicatedStatus { uint8_t deviceStatus; uint8_t deviceExtendedStatus; }; /** * */ typedef struct { uint8_t hi; uint32_t u32; } WHartTime40; // or ASN #define RESET_WHART7_TIME40(value)\ {\ (value)->hi = 0;\ (value)->u32 = 0;\ } #define RESET_WHART7_TIME40_RAW(var_time)\ {\ memset(&var_time,0,5);\ } typedef uint8_t _device_address_t[5]; //far back compatibility typedef WHartCommandSize _command_size_t; typedef WHartDate _date_t; typedef WHartTime _time_t; typedef uint8_t _time40_t[5]; #define MAX_VALUE(x, y) ((x > y) ? (x) : (y)) #define MIN_VALUE(x, y) ((x < y) ? (x) : (y)) #define COPY_FIXED_ARRAY(dest, src) memcpy(dest, src, MIN_VALUE(sizeof(src), sizeof(dest))) //need #include <stdio.h> #define COMPARE_FIXED_ARRAY(left, right) memcmp(left, right, MIN_VALUE(sizeof(left), sizeof(right))) //need #include <stdio.h> //extension for c++ only #ifdef __cplusplus #include <string> namespace hart7 { namespace stack { WHartUniqueID MakeUniqueID(uint16_t deviceCode, uint32_t deviceID); bool operator==(const WHartUniqueID& left, const WHartUniqueID& right); bool operator==(const _device_address_t& left, const WHartUniqueID& right); bool operator==(const WHartUniqueID& left, const _device_address_t& right); bool operator<(const WHartUniqueID& left, const WHartUniqueID& right); void ResetWHartTime40(WHartTime40& value); std::string ToStringHexa(uint8_t value); std::string ToStringHexa(uint16_t value); std::string ToStringHexa(uint32_t value); std::string ToString(WHartTime* value); std::string ToString(WHartTime40* value); class CompareUniqueID { public: bool operator()(const WHartUniqueID& p_oFirst, const WHartUniqueID& p_oSecond); }; } // namespace stack } // namespace hart7 std::ostream& operator<< (std::ostream& out, const WHartUniqueID& p_rUniqueId ); std::ostream& operator<<(std::ostream& out, const DeviceIndicatedStatus& status); #endif //__cplusplus #endif /* WHART_TYPES_H_ */
gpl-3.0
phatn/lapdftext
src/main/java/edu/isi/bmkeg/lapdf/parser/RuleBasedParser.java
35574
package edu.isi.bmkeg.lapdf.parser; import java.io.File; import java.io.FileReader; import java.io.Reader; import java.io.StringReader; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.TreeSet; import java.util.concurrent.LinkedBlockingQueue; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.log4j.Logger; import edu.isi.bmkeg.lapdf.extraction.JPedalExtractor; import edu.isi.bmkeg.lapdf.extraction.exceptions.InvalidPopularSpaceValueException; import edu.isi.bmkeg.lapdf.features.HorizontalSplitFeature; import edu.isi.bmkeg.lapdf.model.Block; import edu.isi.bmkeg.lapdf.model.ChunkBlock; import edu.isi.bmkeg.lapdf.model.LapdfDocument; import edu.isi.bmkeg.lapdf.model.PageBlock; import edu.isi.bmkeg.lapdf.model.WordBlock; import edu.isi.bmkeg.lapdf.model.factory.AbstractModelFactory; import edu.isi.bmkeg.lapdf.model.ordering.SpatialOrdering; import edu.isi.bmkeg.lapdf.model.spatial.SpatialEntity; import edu.isi.bmkeg.lapdf.utils.PageImageOutlineRenderer; import edu.isi.bmkeg.lapdf.xml.model.LapdftextXMLChunk; import edu.isi.bmkeg.lapdf.xml.model.LapdftextXMLDocument; import edu.isi.bmkeg.lapdf.xml.model.LapdftextXMLFontStyle; import edu.isi.bmkeg.lapdf.xml.model.LapdftextXMLPage; import edu.isi.bmkeg.lapdf.xml.model.LapdftextXMLWord; import edu.isi.bmkeg.utils.FrequencyCounter; import edu.isi.bmkeg.utils.IntegerFrequencyCounter; import edu.isi.bmkeg.utils.xml.XmlBindingTools; public class RuleBasedParser implements Parser { private static Logger logger = Logger.getLogger(RuleBasedParser.class); private boolean debugImages = false; private ArrayList<PageBlock> pageList; protected JPedalExtractor pageExtractor; //private PDFBoxExtractor pageExtractor; private int idGenerator; private IntegerFrequencyCounter avgHeightFrequencyCounter; private FrequencyCounter fontFrequencyCounter; private int northSouthSpacing; private int eastWestSpacing; private boolean quickly = false; protected AbstractModelFactory modelFactory; protected String path; // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public String getPath() { return path; } public void setPath(String path) { this.path = path; } private boolean isDebugImages() { return debugImages; } private void setDebugImages(boolean debugImages) { this.debugImages = debugImages; } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public RuleBasedParser(AbstractModelFactory modelFactory) throws Exception { pageList = new ArrayList<PageBlock>(); pageExtractor = new JPedalExtractor(modelFactory); idGenerator = 1; this.avgHeightFrequencyCounter = new IntegerFrequencyCounter(1); this.fontFrequencyCounter = new FrequencyCounter(); this.modelFactory = modelFactory; } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @Override public LapdfDocument parse(File file) throws Exception { if( file.getName().endsWith( ".pdf") ) { return this.parsePdf(file); } else if(file.getName().endsWith( "_lapdf.xml")) { return this.parseXml(file); } else { throw new Exception("File type of " + file.getName() + " not *.pdf or *_lapdf.xml"); } } public LapdfDocument parsePdf(File file) throws Exception { LapdfDocument document = null; init(file); List<WordBlock> pageWordBlockList = null; PageBlock pageBlock = null; int pageCounter = 1; document = new LapdfDocument(file); document.setjPedalDecodeFailed(true); String pth = file.getPath(); pth = pth.substring(0, pth.lastIndexOf(".pdf")); File imgDir = new File(pth); if (isDebugImages()) { imgDir.mkdir(); } // // Calling 'hasNext()' get the text from the extractor. // while (pageExtractor.hasNext()) { document.setjPedalDecodeFailed(false); pageBlock = modelFactory.createPageBlock( pageCounter++, pageExtractor.getCurrentPageBoxWidth(), pageExtractor.getCurrentPageBoxHeight(), document); pageList.add(pageBlock); pageWordBlockList = pageExtractor.next(); if(!pageWordBlockList.isEmpty()) { idGenerator = pageBlock.initialize(pageWordBlockList, idGenerator); this.eastWestSpacing = (pageBlock.getMostPopularWordHeightPage()) / 2 + pageBlock.getMostPopularHorizontalSpaceBetweenWordsPage(); this.northSouthSpacing = (pageBlock.getMostPopularWordHeightPage() ) / 2 + pageBlock.getMostPopularVerticalSpaceBetweenWordsPage(); if( this.quickly ) { buildChunkBlocksQuickly(pageWordBlockList, pageBlock); } else { buildChunkBlocksSlowly(pageWordBlockList, pageBlock); } mergeHighlyOverlappedChunkBlocks(pageBlock); if (isDebugImages()) { PageImageOutlineRenderer.dumpChunkTypePageImageToFile( pageBlock, new File(pth + "/_01_afterBuildBlocks" + pageBlock.getPageNumber() + ".png"), file.getName() + "afterBuildBlocks" + pageBlock.getPageNumber() + ".png"); } } } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (!document.hasjPedalDecodeFailed()) { // initial parse is commplete. String s = file.getName().replaceAll("\\.pdf", ""); Pattern p = Pattern.compile("(\\d+)"); Matcher m = p.matcher(file.getName()); if( m.find() ) { s = m.group(1); } /*for (PageBlock page : pageList) { if (isDebugImages()) { PageImageOutlineRenderer.dumpPageImageToFile(page, new File(pth + "/_02_beforeBuildBlocksOverlapDeletion_" + page.getPageNumber() + ".png"), file.getName() + "beforeBuildBlocksOverlapDeletion_" + s + "_" + page.getPageNumber() + ".png", 0); } this.deleteHighlyOverlappedChunkBlocks(page); if (isDebugImages()) { PageImageOutlineRenderer.dumpPageImageToFile(page, new File(pth + "/_03_afterBuildBlocksOverlapDeletion_" + page.getPageNumber() + ".png"), file.getName() + "afterBuildBlocksOverlapDeletion_" + s + "_" + page.getPageNumber() + ".png", 0); } this.divideBlocksVertically(page); if (isDebugImages()) { PageImageOutlineRenderer.dumpPageImageToFile(page, new File(pth + "/_04_afterVerticalDivide_" + page.getPageNumber() + ".png"), file.getName() + "afterVerticalDivide_" + s + "_" + page.getPageNumber() + ".png", 0); } this.joinLines(page); if (isDebugImages()) { PageImageOutlineRenderer.dumpPageImageToFile(page, new File(pth + "/_05_afterJoinLines_" + page.getPageNumber() + ".png"), file.getName() + "afterJoinLines_" + s + "_" + page.getPageNumber() + ".png", 0); } this.divideBlocksHorizontally(page); if (isDebugImages()) { PageImageOutlineRenderer.dumpPageImageToFile(page, new File(pth + "/_06_afterHorizontalDivide_" + page.getPageNumber() + ".png"), file.getName() + "afterHorizontalDivide_" + s + "_" + page.getPageNumber() + ".png", 0); } this.deleteHighlyOverlappedChunkBlocks(page); if (isDebugImages()) { PageImageOutlineRenderer.dumpPageImageToFile(page, new File(pth + "/_07_afterOverlapDeletion_" + page.getPageNumber() + ".png"), file.getName() + "/afterOverlapDeletion_" + s + "_" + page.getPageNumber() + ".png", 0); } }*/ document.addPages(pageList); document.calculateBodyTextFrame(); document.calculateMostPopularFontStyles(); } return document; } public LapdfDocument parseXml(File file) throws Exception { FileReader reader = new FileReader(file); return this.parseXml(reader); } public LapdfDocument parseXml(String str) throws Exception { StringReader reader = new StringReader(str); return this.parseXml(reader); } private LapdfDocument parseXml(Reader reader) throws Exception { LapdftextXMLDocument xmlDoc = XmlBindingTools.parseXML(reader, LapdftextXMLDocument.class); List<WordBlock> pageWordBlockList = null; int pageCounter = 1; int id = 0; List<PageBlock> pageList = new ArrayList<PageBlock>(); LapdfDocument document = new LapdfDocument(); Map<Integer, String> fsMap = new HashMap<Integer,String>(); for( LapdftextXMLFontStyle xmlFs : xmlDoc.getFontStyles() ) { fsMap.put( xmlFs.getId(), xmlFs.getFontStyle() ); } for( LapdftextXMLPage xmlPage : xmlDoc.getPages() ) { PageBlock pageBlock = modelFactory.createPageBlock(pageCounter, xmlPage.getW(), xmlPage.getH(), document); pageList.add(pageBlock); List<ChunkBlock> chunkBlockList = new ArrayList<ChunkBlock>(); for( LapdftextXMLChunk xmlChunk : xmlPage.getChunks() ) { String font = xmlChunk.getFont(); List<WordBlock> chunkWords = new ArrayList<WordBlock>(); for( LapdftextXMLWord xmlWord : xmlChunk.getWords() ) { int x1 = xmlWord.getX(); int y1 = xmlWord.getY(); int x2 = xmlWord.getX() + xmlWord.getW(); int y2 = xmlWord.getY() + xmlWord.getH(); WordBlock wordBlock = modelFactory.createWordBlock(x1, y1, x2, y2, 1, font, "", xmlWord.getT(), xmlWord.getI() ); chunkWords.add(wordBlock); pageBlock.add(wordBlock, xmlWord.getId()); wordBlock.setPage(pageBlock); String f = fsMap.get( xmlWord.getfId() ); wordBlock.setFont( f ); String s = fsMap.get( xmlWord.getsId() ); wordBlock.setFontStyle( s ); // add this word's height and font to the counts. document.getAvgHeightFrequencyCounter().add( xmlWord.getH()); document.getFontFrequencyCounter().add( f + ";" + s ); } ChunkBlock chunkBlock = buildChunkBlock(chunkWords, pageBlock); chunkBlockList.add(chunkBlock); pageBlock.add(chunkBlock, xmlChunk.getId()); chunkBlock.setPage(pageBlock); } pageCounter++; } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ document.addPages(pageList); document.calculateBodyTextFrame(); document.calculateMostPopularFontStyles(); return document; } private void init(File file) throws Exception { pageExtractor.init(file); idGenerator = 1; this.avgHeightFrequencyCounter.reset(); this.fontFrequencyCounter.reset(); pageList.clear(); } /** * Here we build the blocks based on speed, assuming the ordering of words on the page is * in the correct reading order. Thus we start a new block when you move to a new line * with a is if the next line * starts with a different width and a different * @param wordBlocksLeftInPage * @param page */ private void buildChunkBlocksQuickly(List<WordBlock> wordBlocksLeftInPage, PageBlock page) { List<WordBlock> chunkWords = new ArrayList<WordBlock>(); List<ChunkBlock> chunkBlockList1 = new ArrayList<ChunkBlock>(); int minX = 1000, maxX = 0, minY = 1000, maxY = 0; WordBlock prev = null; for( WordBlock word : wordBlocksLeftInPage ) { // add this word's height and font to the counts. page.getDocument().getAvgHeightFrequencyCounter().add( word.getHeight()); page.getDocument().getFontFrequencyCounter().add( word.getFont() + ";" + word.getFontStyle() ); // Is this a new line or // a very widely separated block on the same line? if( prev != null && (word.getY2() > maxY || word.getX1() - maxX > word.getHeight() * 1.5) ) { // 1. Is this new line more than // 0.75 x word.getHeight() // from the chunk so far? boolean lineSeparation = word.getY1() - maxY > word.getHeight() * 0.75; // 2. Is this new line a different font // or a different font size than the // chunk so far? boolean newFont = (word.getFont() != null && !word.getFont().equals(prev.getFont())); boolean newStyle = (word.getFont() != null && !word.getFontStyle().equals(prev.getFontStyle())); // 3. Is this new line outside the // existing minX...maxX limit? boolean outsideX = word.getX1() < minX || word.getX2() > maxX; if( lineSeparation || newFont || newStyle || outsideX ) { ChunkBlock cb1 = buildChunkBlock(chunkWords, page); chunkBlockList1.add(cb1); chunkWords = new ArrayList<WordBlock>(); minX = 1000; maxX = 0; minY = 1000; maxY = 0; prev = null; } } chunkWords.add(word); word.setOrderAddedToChunk(chunkWords.size()); prev = word; if( word.getX1() < minX) minX = word.getX1(); if( word.getX2() > maxX) maxX = word.getX2(); if( word.getY1() < minY) minY = word.getY1(); if( word.getY2() > maxY) maxY = word.getY2(); } ChunkBlock cb1 = buildChunkBlock(chunkWords, page); chunkBlockList1.add(cb1); idGenerator = page.addAll(new ArrayList<SpatialEntity>( chunkBlockList1), idGenerator); } private void buildChunkBlocksSlowly(List<WordBlock> wordBlocksLeftInPage, PageBlock page) { LinkedBlockingQueue<WordBlock> wordBlocksLeftToCheckInChunk = new LinkedBlockingQueue<WordBlock>(); List<WordBlock> chunkWords = new ArrayList<WordBlock>(); List<WordBlock> rotatedWords = new ArrayList<WordBlock>(); int counter; List<ChunkBlock> chunkBlockList1 = new ArrayList<ChunkBlock>(); while (wordBlocksLeftInPage.size() > 0) { int minX = 1000, maxX = 0, minY = 1000, maxY = 0; wordBlocksLeftToCheckInChunk.clear(); // Start off with this word block wordBlocksLeftToCheckInChunk.add(wordBlocksLeftInPage.get(0)); counter = 0; int extra; // Here are all the words we've come across in this run chunkWords.clear(); int chunkTextHeight = -1; // Build a single Chunk here based on overlapping words // keep going while there are still words to work through while (wordBlocksLeftToCheckInChunk.size() != 0) { // // get the top of the stack of words in the queue, // note that we have not yet looked at this word // // look at the top word in the queue WordBlock word = wordBlocksLeftToCheckInChunk.peek(); if( chunkTextHeight == -1 ) { chunkTextHeight = word.getHeight(); } // add this word's height and font to the counts. page.getDocument().getAvgHeightFrequencyCounter().add( word.getHeight()); page.getDocument().getFontFrequencyCounter().add( word.getFont() + ";" + word.getFontStyle() ); // remove this word from the global search wordBlocksLeftInPage.remove(word); // heuristic to correct missing blocking errors for large fonts int eastWest = (int) Math.ceil(word.getHeight() * 0.75); int northSouth = (int) Math.ceil(word.getHeight() * 0.85); // what other words on the page are close to this word // and are still in the block? List<WordBlock> wordsToAddThisIteration = word.readNearbyWords( eastWest, eastWest, northSouth, northSouth); // TODO how to add more precise word features without //word.writeFlushArray(wordsToAddThisIteration); wordsToAddThisIteration.retainAll(wordBlocksLeftInPage); // remove the words we've already looked at wordsToAddThisIteration.removeAll(wordBlocksLeftToCheckInChunk); // or they've already been seen wordsToAddThisIteration.removeAll(chunkWords); // // TODO Add criteria here to improve blocking by // dropping newly found words that should be excluded. // List<WordBlock> wordsToKill = new ArrayList<WordBlock>(); for( WordBlock w : wordsToAddThisIteration) { // They are a different height from the height // of the first word in this chunk +/- 1px // (and outside the current line for the chunk) if( (w.getHeight() > chunkTextHeight + 1 || w.getHeight() < chunkTextHeight - 1) && (w.getY1() < minY || w.getY2() > maxY) ) { wordsToKill.add(w); } } wordsToAddThisIteration.removeAll(wordsToKill); // At this point, these words will be added to this chunk. wordBlocksLeftToCheckInChunk.addAll(wordsToAddThisIteration); // get this word from the queue and add it. WordBlock wb = wordBlocksLeftToCheckInChunk.poll(); chunkWords.add(wb); wb.setOrderAddedToChunk(chunkWords.size()); if( wb.getX1() < minX) minX = wb.getX1(); if( wb.getX2() > maxX) maxX = wb.getX2(); if( wb.getY1() < minY) minY = wb.getY1(); if( wb.getY2() > maxY) maxY = wb.getY2(); } wordBlocksLeftInPage.removeAll(chunkWords); ChunkBlock cb1 = buildChunkBlock(chunkWords, page); chunkBlockList1.add(cb1); } idGenerator = page.addAll(new ArrayList<SpatialEntity>( chunkBlockList1), idGenerator); } private void divideBlocksVertically(PageBlock page) throws InvalidPopularSpaceValueException { List<ChunkBlock> chunkBlockList; String leftRightMidline; boolean leftFlush; boolean rightFlush; chunkBlockList = new ArrayList<ChunkBlock>(page.getAllChunkBlocks(null)); for (ChunkBlock chunky : chunkBlockList) { leftRightMidline = chunky.readLeftRightMidLine(); leftFlush = chunky.isFlush(ChunkBlock.LEFT, chunky.getMostPopularWordHeight() * 2); rightFlush = chunky.isFlush(ChunkBlock.RIGHT, chunky.getMostPopularWordHeight() * 2); int deltaH = chunky.getMostPopularWordHeight() - page.getDocument().readMostPopularWordHeight(); if (ChunkBlock.MIDLINE.equalsIgnoreCase(leftRightMidline) && (leftFlush || rightFlush) && deltaH < 3) { if (verticalSplitCandidate(chunky)) this.splitBlockDownTheMiddle(chunky); } } } private boolean verticalSplitCandidate(ChunkBlock block) throws InvalidPopularSpaceValueException { // 0:x,1:width ArrayList<Integer[]> spaceList = new ArrayList<Integer[]>(); int prevX = 0; int prevW = 0; int currX = 0; int currY = 0; int currW = 0; Integer[] currSpace = new Integer[] { -100, -100 }; Integer[] currWidest = new Integer[] { -100, -100 }; PageBlock parent = (PageBlock) block.getContainer(); List<SpatialEntity> wordBlockList = parent.containsByType(block, SpatialOrdering.MIXED_MODE, WordBlock.class); int pageWidth = parent.getMargin()[2] - parent.getMargin()[0]; int marginHeight = parent.getMargin()[3] - parent.getMargin()[1]; int averageWidth = 0; float spaceWidthToPageWidth = 0; for (int i = 0; i < wordBlockList.size(); i++) { WordBlock wb = (WordBlock) wordBlockList.get(i); // New line started if (i == 0 || Math.abs(((double) (wb.getY1() - currY) / (double) marginHeight)) > 0.01) { currY = wb.getY1(); currX = wb.getX1(); currW = wb.getWidth(); if (currWidest[1] > 0) { spaceList.add(new Integer[] { currWidest[0], currWidest[1] }); } currWidest[0] = -100; currWidest[1] = -100; continue; } // Continuing current line prevX = currX; prevW = currW; currY = wb.getY1(); currX = wb.getX1(); currW = wb.getWidth(); currSpace[1] = currX - (prevX + prevW); currSpace[0] = currX + currW; if (currWidest[1] == -100 || currSpace[1] > currWidest[1]) { currWidest[0] = currSpace[0]; currWidest[1] = currSpace[1]; } } // Criterium for whether the widest spaces are properly lined up: // At least 20% of them have an x position within that differ with less // than 1% to the x position of the previous space. // The average x position doesn't matter! if (spaceList.size() <= 0) return false; // Find average width of the widest spaces and make sure it's at least // as wide as 2.5% of the page width. for (int i = 0; i < spaceList.size(); i++) averageWidth += spaceList.get(i)[1]; averageWidth = averageWidth / spaceList.size(); // spaceWidthToPageWidth = (float) averageWidth / (float) pageWidth; /* * if (spaceWidthToPageWidth > 0.015) return true; else return false; */ if (averageWidth > parent.getMostPopularHorizontalSpaceBetweenWordsPage()) return true; else return false; } private void splitBlockDownTheMiddle(ChunkBlock block) { PageBlock parent = (PageBlock) block.getContainer(); int median = parent.getMedian(); ArrayList<WordBlock> leftBlocks = new ArrayList<WordBlock>(); ArrayList<WordBlock> rigthBlocks = new ArrayList<WordBlock>(); List<SpatialEntity> wordBlockList = parent.containsByType(block, SpatialOrdering.MIXED_MODE, WordBlock.class); String wordBlockLeftRightMidLine; for (int i = 0; i < wordBlockList.size(); i++) { WordBlock wordBlock = (WordBlock) wordBlockList.get(i); wordBlockLeftRightMidLine = wordBlock.readLeftRightMidLine(); if (wordBlockLeftRightMidLine.equals(Block.LEFT)) leftBlocks.add(wordBlock); else if (wordBlockLeftRightMidLine.equals(Block.RIGHT)) rigthBlocks.add(wordBlock); else if (wordBlockLeftRightMidLine.equals(Block.MIDLINE)) { // Assign the current word to the left or right side depending // upon // whether most of the word is on the left or right side of the // median. if (Math.abs(median - wordBlock.getX1()) > Math.abs(wordBlock .getX2() - median)) { wordBlock.resize(wordBlock.getX1(), wordBlock.getY1(), median - wordBlock.getX1(), wordBlock.getHeight()); } else { wordBlock.resize(median, wordBlock.getY1(), wordBlock.getX2() - median, wordBlock.getHeight()); rigthBlocks.add(wordBlock); } } }// END for if (leftBlocks.size() == 0 || rigthBlocks.size() == 0) return; ChunkBlock leftChunkBlock = buildChunkBlock(leftBlocks, parent); ChunkBlock rightChunkBlock = buildChunkBlock(rigthBlocks, parent); SpatialEntity entity = modelFactory.createWordBlock( leftChunkBlock.getX2() + 1, leftChunkBlock.getY1(), rightChunkBlock.getX1() - 1, rightChunkBlock.getY2(), 0, null, null, null, -1); if (parent.intersectsByType(entity, null, WordBlock.class).size() >= 1) { if (block == null) { logger.info("null null"); } for (SpatialEntity wordBlockEntity : wordBlockList) ((Block) wordBlockEntity).setContainer(block); return; } double relative_overlap = leftChunkBlock .getRelativeOverlap(rightChunkBlock); if (relative_overlap < 0.1) { parent.delete(block, block.getId()); parent.add(leftChunkBlock, idGenerator++); parent.add(rightChunkBlock, idGenerator++); } } private ChunkBlock buildChunkBlock(List<WordBlock> wordBlockList, PageBlock pageBlock) { ChunkBlock chunkBlock = null; IntegerFrequencyCounter lineHeightFrequencyCounter = new IntegerFrequencyCounter(1); IntegerFrequencyCounter spaceFrequencyCounter = new IntegerFrequencyCounter(0); FrequencyCounter fontFrequencyCounter = new FrequencyCounter(); FrequencyCounter styleFrequencyCounter = new FrequencyCounter(); for (WordBlock wordBlock : wordBlockList) { lineHeightFrequencyCounter.add(wordBlock.getHeight()); spaceFrequencyCounter.add(wordBlock.getSpaceWidth()); avgHeightFrequencyCounter.add(wordBlock.getHeight()); if( wordBlock.getFont() != null ) { fontFrequencyCounter.add(wordBlock.getFont()); } else { fontFrequencyCounter.add(""); } if( wordBlock.getFont() != null ) { styleFrequencyCounter.add(wordBlock.getFontStyle()); } else { styleFrequencyCounter.add(""); } if (chunkBlock == null) { chunkBlock = modelFactory .createChunkBlock(wordBlock.getX1(), wordBlock.getY1(), wordBlock.getX2(), wordBlock.getY2(), wordBlock.getOrder()); } else { SpatialEntity spatialEntity = chunkBlock.union(wordBlock); chunkBlock.resize(spatialEntity.getX1(), spatialEntity.getY1(), spatialEntity.getWidth(), spatialEntity.getHeight()); } wordBlock.setContainer(chunkBlock); } chunkBlock.setMostPopularWordFont( (String) fontFrequencyCounter.getMostPopular() ); chunkBlock.setMostPopularWordStyle( (String) styleFrequencyCounter.getMostPopular() ); chunkBlock.setMostPopularWordHeight( lineHeightFrequencyCounter.getMostPopular() ); chunkBlock.setMostPopularWordSpaceWidth( spaceFrequencyCounter.getMostPopular() ); chunkBlock.setContainer(pageBlock); return chunkBlock; } private void divideBlocksHorizontally(PageBlock page) { List<ChunkBlock> chunkBlockList; ArrayList<Integer> breaks; chunkBlockList = page.getAllChunkBlocks(SpatialOrdering.MIXED_MODE); for (ChunkBlock chunky : chunkBlockList) { breaks = this.getBreaks(chunky); if (breaks.size() > 0) this.splitBlockByBreaks(chunky, breaks); } } private ArrayList<Integer> getBreaks(ChunkBlock block) { ArrayList<Integer> breaks = new ArrayList<Integer>(); PageBlock parent = (PageBlock) block.getContainer(); int mostPopulareWordHeightOverCorpora = parent.getDocument() .readMostPopularWordHeight(); List<SpatialEntity> wordBlockList = parent.containsByType(block, SpatialOrdering.MIXED_MODE, WordBlock.class); WordBlock firstWordOnLine = (WordBlock) wordBlockList.get(0); WordBlock lastWordOnLine = firstWordOnLine; int lastY = firstWordOnLine.getY1() + firstWordOnLine.getHeight() / 2; int currentY = lastY; String chunkBlockString = ""; ArrayList<Integer> breakCandidates = new ArrayList<Integer>(); ArrayList<HorizontalSplitFeature> featureList = new ArrayList<HorizontalSplitFeature>(); HorizontalSplitFeature feature = new HorizontalSplitFeature(); for (SpatialEntity entity : wordBlockList) { lastY = currentY; WordBlock wordBlock = (WordBlock) entity; currentY = wordBlock.getY1() + wordBlock.getHeight() / 2; if (currentY > lastY + wordBlock.getHeight() / 2) { feature.calculateFeatures(block, firstWordOnLine, lastWordOnLine, chunkBlockString); featureList.add(feature); feature = new HorizontalSplitFeature(); breakCandidates .add((lastWordOnLine.getY2() + wordBlock.getY1()) / 2); firstWordOnLine = wordBlock; lastWordOnLine = wordBlock; chunkBlockString = ""; } feature.addToFrequencyCounters(wordBlock.getFont(), wordBlock.getFontStyle()); chunkBlockString = chunkBlockString + " " + wordBlock.getWord(); lastWordOnLine = wordBlock; } feature.calculateFeatures(block, firstWordOnLine, lastWordOnLine, chunkBlockString); featureList.add(feature); feature = null; HorizontalSplitFeature featureMinusOne; // // What kind of column is this? // // a. Titles and large-font blocks // b. centered titles // c. centered blocks // d. text & titles in left or right columns // e. references // f. figure legends // for (int i = 1; i < featureList.size(); i++) { featureMinusOne = featureList.get(i - 1); feature = featureList.get(i); if (featureMinusOne.isAllCapitals() && !feature.isAllCapitals()) { breaks.add(breakCandidates.get(i - 1)); } else if (!featureMinusOne.isAllCapitals() && feature.isAllCapitals()) { breaks.add(breakCandidates.get(i - 1)); } else if (featureMinusOne.getMostPopularFont() != null && feature.getMostPopularFont() == null) { breaks.add(breakCandidates.get(i - 1)); } else if (featureMinusOne.getMostPopularFont() == null && feature.getMostPopularFont() != null) { breaks.add(breakCandidates.get(i - 1)); } else if (!featureMinusOne.getMostPopularFont().equals( feature.getMostPopularFont()) && !feature.isMixedFont() && !featureMinusOne.isMixedFont()) { breaks.add(breakCandidates.get(i - 1)); } else if (Math.abs(feature.getFirstWordOnLineHeight() - featureMinusOne.getFirstWordOnLineHeight()) > 2) { breaks.add(breakCandidates.get(i - 1)); } else if (Math.abs(feature.getMidYOfLastWordOnLine() - featureMinusOne.getMidYOfLastWordOnLine()) > (feature .getFirstWordOnLineHeight() + featureMinusOne .getFirstWordOnLineHeight()) * 0.75) { breaks.add(breakCandidates.get(i - 1)); } else if (Math.abs(featureMinusOne.getFirstWordOnLineHeight() - mostPopulareWordHeightOverCorpora) <= 2 && Math.abs(feature.getFirstWordOnLineHeight() - mostPopulareWordHeightOverCorpora) <= 2 && Math.abs(featureMinusOne.getMidOffset()) < 10 && Math.abs(featureMinusOne.getExtremLeftOffset()) > 10 && Math.abs(featureMinusOne.getExtremeRightOffset()) > 10 && Math.abs(feature.getExtremLeftOffset()) < 20 && Math.abs(feature.getExtremeRightOffset()) < 10) { breaks.add(breakCandidates.get(i - 1)); } else if (Math.abs(feature.getFirstWordOnLineHeight() - mostPopulareWordHeightOverCorpora) <= 2 && Math.abs(feature.getMidOffset()) < 10 && Math.abs(feature.getExtremLeftOffset()) > 10 && Math.abs(feature.getExtremeRightOffset()) > 10 && Math.abs(featureMinusOne.getExtremLeftOffset()) < 10) { breaks.add(breakCandidates.get(i - 1)); } else if (featureMinusOne.isEndOFLine() && Math.abs(featureMinusOne.getFirstWordOnLineHeight() - mostPopulareWordHeightOverCorpora) <= 2 && (Math.abs(featureMinusOne.getExtremeRightOffset()) > 10 || Math .abs(feature.getExtremLeftOffset()) > 10)) { breaks.add(breakCandidates.get(i - 1)); } } return breaks; } private void splitBlockByBreaks(ChunkBlock block, ArrayList<Integer> breaks) { Collections.sort(breaks); PageBlock parent = (PageBlock) block.getContainer(); List<SpatialEntity> wordBlockList = parent.containsByType(block, SpatialOrdering.MIXED_MODE, WordBlock.class); int y; int breakIndex; List<List<WordBlock>> bigBlockList = new ArrayList<List<WordBlock>>(); for (int j = 0; j < breaks.size() + 1; j++) { List<WordBlock> littleBlockList = new ArrayList<WordBlock>(); bigBlockList.add(littleBlockList); } for (SpatialEntity entity : wordBlockList) { WordBlock wordBlock = (WordBlock) entity; y = wordBlock.getY1() + wordBlock.getHeight() / 2; breakIndex = Collections.binarySearch(breaks, y); if (breakIndex < 0) { breakIndex = -1 * breakIndex - 1; bigBlockList.get(breakIndex).add(wordBlock); } else { bigBlockList.get(breakIndex).add(wordBlock); } } ChunkBlock chunky; TreeSet<ChunkBlock> chunkBlockList = new TreeSet<ChunkBlock>( new SpatialOrdering(SpatialOrdering.MIXED_MODE)); for (List<WordBlock> list : bigBlockList) { if (list.size() == 0) continue; chunky = this.buildChunkBlock(list, parent); chunkBlockList.add(chunky); } parent.delete(block, block.getId()); idGenerator = parent.addAll( new ArrayList<SpatialEntity>(chunkBlockList), idGenerator); } private void joinLines(PageBlock page) { LinkedBlockingQueue<ChunkBlock> chunkBlockList = new LinkedBlockingQueue<ChunkBlock>( page.getAllChunkBlocks(SpatialOrdering.MIXED_MODE)); List wordBlockList; int midY; ChunkBlock chunky = null; List<SpatialEntity> neighbouringChunkBlockList; ChunkBlock neighbouringChunkBlock; ArrayList<SpatialEntity> removalList = new ArrayList<SpatialEntity>(); while (chunkBlockList.size() > 0) { chunky = chunkBlockList.peek(); wordBlockList = page.containsByType(chunky, null, WordBlock.class); if (wordBlockList.size() < 4 && chunky.readNumberOfLine() == 1) { neighbouringChunkBlockList = page.intersectsByType( calculateBoundariesForJoin(chunky, page), SpatialOrdering.MIXED_MODE, ChunkBlock.class); if (neighbouringChunkBlockList.size() <= 1) { chunkBlockList.poll(); continue; } for (SpatialEntity entity : neighbouringChunkBlockList) { neighbouringChunkBlock = (ChunkBlock) entity; if (neighbouringChunkBlock.equals(chunky)) continue; midY = chunky.getY1() + chunky.getHeight() / 2; if (neighbouringChunkBlock.getY1() < midY && neighbouringChunkBlock.getY2() > midY && ((neighbouringChunkBlock.getX2() < chunky .getX1() && neighbouringChunkBlock .readNumberOfLine() < 3) || (neighbouringChunkBlock .getX1() > chunky.getX2() && neighbouringChunkBlock .readNumberOfLine() == 1))) { removalList.add(neighbouringChunkBlock); wordBlockList.addAll(page.containsByType( neighbouringChunkBlock, null, WordBlock.class)); } } if (removalList.size() > 0) { ChunkBlock newChunkBlock = this.buildChunkBlock( wordBlockList, page); page.add(newChunkBlock, idGenerator++); page.delete(chunky, chunky.getId()); chunkBlockList.removeAll(removalList); for (SpatialEntity forDeleteEntity : removalList) { page.delete(forDeleteEntity, forDeleteEntity.getId()); } } } removalList.clear(); chunkBlockList.poll(); } } private SpatialEntity calculateBoundariesForJoin(ChunkBlock chunk, PageBlock parent) { SpatialEntity entity = null; int x1 = 0, x2 = 0, y1 = 0, y2 = 0; int width = parent.getMargin()[2] - parent.getMargin()[0]; int height = parent.getMargin()[3] - parent.getMargin()[1]; String lrm = chunk.readLeftRightMidLine(); width = (int) (width * 0.25); y1 = chunk.getY1(); y2 = chunk.getY2(); if (Block.LEFT.equalsIgnoreCase(lrm)) { // TODO:Use reflection x1 = (chunk.getX1() - width <= 0) ? parent.getMargin()[0] : chunk .getX1() - width; x2 = (chunk.getX2() + width >= parent.getMedian()) ? parent .getMedian() : chunk.getX2() + width; entity = modelFactory.createChunkBlock(x1, y1, x2, y2, 0); } else if (Block.RIGHT.equalsIgnoreCase(lrm)) { x1 = (chunk.getX1() - width <= parent.getMedian()) ? parent .getMedian() : chunk.getX1() - width; x2 = (chunk.getX2() + width >= parent.getMargin()[2]) ? parent .getMargin()[2] : chunk.getX2() + width; entity = modelFactory.createChunkBlock(x1, y1, x2, y2, 0 ); } else { x1 = (chunk.getX1() - width <= 0) ? parent.getMargin()[0] : chunk .getX1() - width; x2 = (chunk.getX2() + width >= parent.getMargin()[2]) ? parent .getMargin()[2] : chunk.getX2() + width; entity = modelFactory.createChunkBlock(x1, y1, x2, y2, 0); } return entity; } private void mergeHighlyOverlappedChunkBlocks(PageBlock page) { List<ChunkBlock> chunkBlockList = page.getAllChunkBlocks( SpatialOrdering.MIXED_MODE); List<SpatialEntity> wordList; SpatialEntity intersectingRectangle; for (SpatialEntity entity : chunkBlockList) { ChunkBlock sourceChunk = (ChunkBlock) entity; List<SpatialEntity> neighbouringChunkBlockList = page.intersectsByType(sourceChunk, SpatialOrdering.MIXED_MODE, ChunkBlock.class); for (SpatialEntity neighbourEntity : neighbouringChunkBlockList) { ChunkBlock neighbourChunk = (ChunkBlock) neighbourEntity; if( neighbourChunk == sourceChunk ) continue; intersectingRectangle = sourceChunk .getIntersectingRectangle(neighbourChunk); double intersectionArea = intersectingRectangle.getHeight() * intersectingRectangle.getWidth(); double sourceArea = (double) (sourceChunk.getWidth() * sourceChunk.getHeight()); double neighborArea = (double) (neighbourChunk.getWidth() * neighbourChunk .getHeight()); double propOfNeighbor = intersectionArea / neighborArea; if (propOfNeighbor > 0.7) { wordList = page.containsByType(neighbourChunk, null, WordBlock.class); for (SpatialEntity wordEntity : wordList) ((Block) wordEntity).setContainer(sourceChunk); page.delete(neighbourChunk, neighbourChunk.getId()); } int pause = 0; } } } }
gpl-3.0
michelesr/ingsw-project
project/doc/html/search/properties_e.html
1045
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html><head><title></title> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta name="generator" content="Doxygen 1.8.8"/> <link rel="stylesheet" type="text/css" href="search.css"/> <script type="text/javascript" src="properties_e.js"></script> <script type="text/javascript" src="search.js"></script> </head> <body class="SRPage"> <div id="SRIndex"> <div class="SRStatus" id="Loading">Caricamento in corso...</div> <div id="SRResults"></div> <script type="text/javascript"><!-- createResults(); --></script> <div class="SRStatus" id="Searching">Ricerca in corso...</div> <div class="SRStatus" id="NoMatches">Nessun risultato</div> <script type="text/javascript"><!-- document.getElementById("Loading").style.display="none"; document.getElementById("NoMatches").style.display="none"; var searchResults = new SearchResults("searchResults"); searchResults.Search(); --></script> </div> </body> </html>
gpl-3.0
botsazn/Management-Group
libs/feedparser.lua
11998
local LOM = assert(require("lxp.lom"), "LuaExpat doesn't seem to be installed. feedparser kind of needs it to work...") local XMLElement = (loadfile "./libs/XMLElement.lua")() local dateparser = (loadfile "./libs/dateparser.lua")() local URL = (loadfile "./libs/url.lua")() local tinsert, tremove, tconcat = table.insert, table.remove, table.concat local pairs, ipairs = pairs, ipairs --- feedparser, similar to the Universal Feed Parser for python, but a good deal weaker. -- see http://feedparser.org for details about the Universal Feed Parser local feedparser= { _DESCRIPTION = "RSS and Atom feed parser", _VERSION = "feedparser 0.71" } local blanky = XMLElement.new() --useful in a whole bunch of places local function resolve(url, base_url) return URL.absolute(base_url, url) end local function rebase(el, base_uri) local xml_base = el:getAttr('xml:base') if not xml_base then return base_uri end return resolve(xml_base, base_uri) end local function parse_entries(entries_el, format_str, base) local entries = {} for i, entry_el in ipairs(entries_el) do local entry = {enclosures={}, links={}, contributors={}} local entry_base = rebase(entry_el, base) for i, el in ipairs(entry_el:getChildren('*')) do local tag = el:getTag() local el_base = rebase(el, entry_base) --title if tag == 'title' or tag == 'dc:title' or tag =='rdf:title' then --'dc:title' doesn't occur in atom feeds, but whatever. entry.title=el:getText() --link(s) elseif format_str == 'rss' and tag=='link' then entry.link=resolve(el:getText(), el_base) tinsert(entry.links, {href=entry.link}) elseif (format_str=='atom' and tag == 'link') or (format_str == 'rss' and tag=='atom:link') then local link = {} for i, attr in ipairs{'rel','type', 'href','title'} do link[attr]= (attr=='href') and resolve(el:getAttr(attr), el_base) or el:getAttr(attr) --uri end tinsert(entry.links, link) if link.rel=='enclosure' then tinsert(entry.enclosures, { href=link.href, length=el:getAttr('length'), type=el:getAttr('type') }) end --rss enclosures elseif format_str == 'rss' and tag=='enclosure' then tinsert(entry.enclosures, { url=el:getAttr('url'), length=el:getAttr('length'), type=el:getAttr('type') }) --summary elseif (format_str=='atom' and tag=='summary') or (format_str=='rss' and(tag=='description' or tag=='dc:description' or tag=='rdf:description')) then entry.summary=el:getText() --TODO: summary_detail --content elseif (format_str=='atom' and tag=='content') or (format_str=='rss' and (tag=='body' or tag=='xhtml:body' or tag == 'fullitem' or tag=='content:encoded')) then entry.content=el:getText() --TODO: content_detail --published elseif (format_str == 'atom' and (tag=='published' or tag=='issued')) or (format_str == 'rss' and (tag=='dcterms:issued' or tag=='atom:published' or tag=='atom:issued')) then entry.published = el:getText() entry.published_parsed=dateparser.parse(entry.published) --updated elseif (format_str=='atom' and (tag=='updated' or tag=='modified')) or (format_str=='rss' and (tag=='dc:date' or tag=='pubDate' or tag=='dcterms:modified')) then entry.updated=el:getText() entry.updated_parsed=dateparser.parse(entry.updated) elseif tag=='created' or tag=='atom:created' or tag=='dcterms:created' then entry.created=el:getText() entry.created_parsed=dateparser.parse(entry.created) --id elseif (format_str =='atom' and tag=='id') or (format_str=='rss' and tag=='guid') then entry.id=resolve(el:getText(), el_base) -- this is a uri, right?... --author elseif format_str=='rss' and (tag=='author' or tag=='dc:creator') then --author tag should give the author's email. should I respect this? entry.author=(el:getChild('name') or el):getText() entry.author_detail={ name=entry.author } elseif format_str=='atom' and tag=='author' then entry.author=(el:getChild('name') or el):getText() entry.author_detail = { name=entry.author, email=(el:getChild('email') or blanky):getText() } local author_url = (el:getChild('url') or blanky):getText() if author_url and author_url ~= "" then entry.author_detail.href=resolve(author_url, rebase(el:getChild('url'), el_base)) end elseif tag=='category' or tag=='dc:subject' then --todo elseif tag=='source' then --todo end end --wrap up rss guid if format_str == 'rss' and (not entry.id) and entry_el:getAttr('rdf:about') then entry.id=resolve(entry_el:getAttr('rdf:about'), entry_base) --uri end --wrap up entry.link for i, link in pairs(entry.links) do if link.rel=="alternate" or (not link.rel) or link.rel=="" then entry.link=link.href --already resolved. break end end if not entry.link and format_str=='rss' then entry.link=entry.id end tinsert(entries, entry) end return entries end local function atom_person_construct(person_el, base_uri) local dude ={ name= (person_el:getChild('name') or blanky):getText(), email=(person_el:getChild('email') or blanky):getText() } local url_el = person_el:getChild('url') if url_el then dude.href=resolve(url_el:getText(), rebase(url_el, base_uri)) end return dude end local function parse_atom(root, base_uri) local res = {} local feed = { links = {}, contributors={}, language = root:getAttr('lang') or root:getAttr('xml:lang') } local root_base = rebase(root, base_uri) res.feed=feed res.format='atom' local version=(root:getAttr('version') or ''):lower() if version=="1.0" or root:getAttr('xmlns')=='http://www.w3.org/2005/Atom' then res.version='atom10' elseif version=="0.3" then res.version='atom03' else res.version='atom' end for i, el in ipairs(root:getChildren('*')) do local tag = el:getTag() local el_base=rebase(el, root_base) if tag == 'title' or tag == 'dc:title' or tag == 'atom10:title' or tag == 'atom03:title' then feed.title=el:getText() --sanitize! --todo: feed.title_detail --link stuff elseif tag=='link' then local link = {} for i, attr in ipairs{'rel','type', 'href','title'} do link[attr]= (attr=='href') and resolve(el:getAttr(attr), el_base) or el:getAttr(attr) end tinsert(feed.links, link) --subtitle elseif tag == 'subtitle' then feed.subtitle=el:getText() --sanitize! elseif not feed.subtitle and (tag == 'tagline' or tag =='atom03:tagline' or tag=='dc:description') then feed.subtitle=el:getText() --sanitize! --rights elseif tag == 'copyright' or tag == 'rights' then feed.rights=el:getText() --sanitize! --generator elseif tag == 'generator' then feed.generator=el:getText() --sanitize! elseif tag == 'admin:generatorAgent' then feed.generator = feed.generator or el:getAttr('rdf:resource') --info elseif tag == 'info' then --whatever, nobody cared, anyway. feed.info = el:getText() --id elseif tag=='id' then feed.id=resolve(el:getText(), el_base) --this is a url, right?.,, --updated elseif tag == 'updated' or tag == 'dc:date' or tag == 'modified' or tag=='rss:pubDate' then feed.updated = el:getText() feed.updated_parsed=dateparser.parse(feed.updated) --author elseif tag=='author' or tag=='atom:author' then feed.author_detail=atom_person_construct(el, el_base) feed.author=feed.author_detail.name --contributors elseif tag=='contributor' or tag=='atom:contributor' then tinsert(feed.contributors, atom_person_construct(el, el_base)) --icon elseif tag=='icon' then feed.icon=resolve(el:getText(), el_base) --logo elseif tag=='logo' then feed.logo=resolve(el:getText(), el_base) --language elseif tag=='language' or tag=='dc:language' then feed.language=feed.language or el:getText() --licence end end --feed.link (already resolved) for i, link in pairs(feed.links) do if link.rel=='alternate' or not link.rel or link.rel=='' then feed.link=link.href break end end res.entries=parse_entries(root:getChildren('entry'),'atom', root_base) return res end local function parse_rss(root, base_uri) local channel = root:getChild({'channel', 'rdf:channel'}) local channel_base = rebase(channel, base_uri) if not channel then return nil, "can't parse that." end local feed = {links = {}, contributors={}} local res = { feed=feed, format='rss', entries={} } --this isn't quite right at all. if root:getTag():lower()=='rdf:rdf' then res.version='rss10' else res.version='rss20' end for i, el in ipairs(channel:getChildren('*')) do local el_base=rebase(el, channel_base) local tag = el:getTag() if tag=='link' then feed.link=resolve(el:getText(), el_base) tinsert(feed.links, {href=feed.link}) --title elseif tag == 'title' or tag == 'dc:title' then feed.title=el:getText() --sanitize! --subtitle elseif tag == 'description' or tag =='dc:description' or tag=='itunes:subtitle' then feed.subtitle=el:getText() --sanitize! --rights elseif tag == 'copyright' or tag == 'dc:rights' then feed.rights=el:getText() --sanitize! --generator elseif tag == 'generator' then feed.generator=el:getText() elseif tag == 'admin:generatorAgent' then feed.generator = feed.generator or el:getAttr('rdf:resource') --info (nobody cares...) elseif tag == 'feedburner:browserFriendly' then feed.info = el:getText() --updated elseif tag == 'pubDate' or tag == 'dc:date' or tag == 'dcterms:modified' then feed.updated = el:getText() feed.updated_parsed = dateparser.parse(feed.updated) --author elseif tag=='managingEditor' or tag =='dc:creator' or tag=='itunes:author' or tag =='dc:creator' or tag=='dc:author' then feed.author=tconcat(el:getChildren('text()')) feed.author_details={name=feed.author} elseif tag=='atom:author' then feed.author_details = atom_person_construct(el, el_base) feed.author = feed.author_details.name --contributors elseif tag == 'dc:contributor' then tinsert(feed.contributors, {name=el:getText()}) elseif tag == 'atom:contributor' then tinsert(feed.contributors, atom_person_construct(el, el_base)) --image elseif tag=='image' or tag=='rdf:image' then feed.image={ title=el:getChild('title'):getText(), link=(el:getChild('link') or blanky):getText(), width=(el:getChild('width') or blanky):getText(), height=(el:getChild('height') or blanky):getText() } local url_el = el:getChild('url') if url_el then feed.image.href = resolve(url_el:getText(), rebase(url_el, el_base)) end --language elseif tag=='language' or tag=='dc:language' then feed.language=el:getText() --licence --publisher --tags end end res.entries=parse_entries(channel:getChildren('item'),'rss', channel_base) return res end --- parse feed xml -- @param xml_string feed xml, as a string -- @param base_url (optional) source url of the feed. useful when resolving relative links found in feed contents -- @return table with parsed feed info, or nil, error_message on error. -- the format of the returned table is much like that on http://feedparser.org, with the major difference that -- dates are parsed into unixtime. Most other fields are very much the same. function feedparser.parse(xml_string, base_url) local lom, err = LOM.parse(xml_string) if not lom then return nil, "couldn't parse xml. lxp says: " .. err or "nothing" end local rootElement = XMLElement.new(lom) local root_tag = rootElement:getTag():lower() if root_tag=='rdf:rdf' or root_tag=='rss' then return parse_rss(rootElement, base_url) elseif root_tag=='feed' then return parse_atom(rootElement, base_url) else return nil, "unknown feed format" end end --for the sake of backwards-compatibility, feedparser will export a global reference for lua < 5.3 if _VERSION:sub(-3) < "5.3" then _G.feedparser=feedparser end return feedparser -- @PequeRobotCH -- http://pequerobot.com
gpl-3.0
fikri007/django-fikoStatik
fikoStatik/icerikIsleyici/fikoStatik.py
1063
""" """ from __future__ import unicode_literals from django.conf import settings def fikoStatik(request): """ Fiko Statik Adresini(url) Döndürür... Örnek: <script src="{{ FIKO_STATIK_URL }}/pkt/angular/angular.js"></script> Bu İçerik İşleyicinin Aktif Olabilmewsi İçin Aşağıdaki Kodları Settings Dosyanıza Uyarlamanız Gerekmektedir. ```urls.py urlpatterns = [ ... url(r'^fikoStatik/', include(fikoStatik.urls)), ... ] ``` ``` settings.py TEMPLATES = [ { ... 'OPTIONS': { 'context_processors': [ ... 'fikoStatik.icerikIsleyici.fikoStatik.fikoStatik' ... ], }, }, ] ``` """ return dict( FIKO_STATIK_URL=settings.FIKO_STATIK_URL if hasattr(settings, "FIKO_STATIK_URL") else "fikoStatik" )
gpl-3.0
geier/alot
alot/commands/__init__.py
6105
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from __future__ import absolute_import import argparse import glob import logging import os import re from ..settings.const import settings from ..helper import split_commandstring, string_decode class Command(object): """base class for commands""" repeatable = False def __init__(self): self.prehook = None self.posthook = None self.undoable = False self.help = self.__doc__ def apply(self, caller): """code that gets executed when this command is applied""" pass class CommandCanceled(Exception): """ Exception triggered when an interactive command has been cancelled """ pass COMMANDS = { 'search': {}, 'envelope': {}, 'bufferlist': {}, 'taglist': {}, 'thread': {}, 'global': {}, } def lookup_command(cmdname, mode): """ returns commandclass, argparser and forced parameters used to construct a command for `cmdname` when called in `mode`. :param cmdname: name of the command to look up :type cmdname: str :param mode: mode identifier :type mode: str :rtype: (:class:`Command`, :class:`~argparse.ArgumentParser`, dict(str->dict)) """ if cmdname in COMMANDS[mode]: return COMMANDS[mode][cmdname] elif cmdname in COMMANDS['global']: return COMMANDS['global'][cmdname] else: return None, None, None def lookup_parser(cmdname, mode): """ returns the :class:`CommandArgumentParser` used to construct a command for `cmdname` when called in `mode`. """ return lookup_command(cmdname, mode)[1] class CommandParseError(Exception): """could not parse commandline string""" pass class CommandArgumentParser(argparse.ArgumentParser): """ :class:`~argparse.ArgumentParser` that raises :class:`CommandParseError` instead of printing to `sys.stderr`""" def exit(self, message): raise CommandParseError(message) def error(self, message): raise CommandParseError(message) class registerCommand(object): """ Decorator used to register a :class:`Command` as handler for command `name` in `mode` so that it can be looked up later using :func:`lookup_command`. Consider this example that shows how a :class:`Command` class definition is decorated to register it as handler for 'save' in mode 'thread' and add boolean and string arguments:: .. code-block:: @registerCommand('thread', 'save', arguments=[ (['--all'], {'action': 'store_true', 'help':'save all'}), (['path'], {'nargs':'?', 'help':'path to save to'})], help='save attachment(s)') class SaveAttachmentCommand(Command): pass """ def __init__(self, mode, name, help=None, usage=None, forced=None, arguments=None): """ :param mode: mode identifier :type mode: str :param name: command name to register as :type name: str :param help: help string summarizing what this command does :type help: str :param usage: overides the auto generated usage string :type usage: str :param forced: keyword parameter used for commands constructor :type forced: dict (str->str) :param arguments: list of arguments given as pairs (args, kwargs) accepted by :meth:`argparse.ArgumentParser.add_argument`. :type arguments: list of (list of str, dict (str->str) """ self.mode = mode self.name = name self.help = help self.usage = usage self.forced = forced or {} self.arguments = arguments or [] def __call__(self, klass): helpstring = self.help or klass.__doc__ argparser = CommandArgumentParser(description=helpstring, usage=self.usage, prog=self.name, add_help=False) for args, kwargs in self.arguments: argparser.add_argument(*args, **kwargs) COMMANDS[self.mode][self.name] = (klass, argparser, self.forced) return klass def commandfactory(cmdline, mode='global'): """ parses `cmdline` and constructs a :class:`Command`. :param cmdline: command line to interpret :type cmdline: str :param mode: mode identifier :type mode: str """ # split commandname and parameters if not cmdline: return None logging.debug('mode:%s got commandline "%s"', mode, cmdline) # allow to shellescape without a space after '!' if cmdline.startswith('!'): cmdline = 'shellescape \'%s\'' % cmdline[1:] cmdline = re.sub(r'"(.*)"', r'"\\"\1\\""', cmdline) try: args = split_commandstring(cmdline) except ValueError as e: raise CommandParseError(str(e)) args = [string_decode(x, 'utf-8') for x in args] logging.debug('ARGS: %s', args) cmdname = args[0] args = args[1:] # unfold aliases # TODO: read from settingsmanager # get class, argparser and forced parameter (cmdclass, parser, forcedparms) = lookup_command(cmdname, mode) if cmdclass is None: msg = 'unknown command: %s' % cmdname logging.debug(msg) raise CommandParseError(msg) parms = vars(parser.parse_args(args)) parms.update(forcedparms) logging.debug('cmd parms %s', parms) # create Command cmd = cmdclass(**parms) # set pre and post command hooks get_hook = settings.get_hook cmd.prehook = get_hook('pre_%s_%s' % (mode, cmdname)) or \ get_hook('pre_global_%s' % cmdname) cmd.posthook = get_hook('post_%s_%s' % (mode, cmdname)) or \ get_hook('post_global_%s' % cmdname) return cmd pyfiles = glob.glob1(os.path.dirname(__file__), '*.py') __all__ = list(filename[:-3] for filename in pyfiles)
gpl-3.0
lidaobing/itcc
itcc/core/tools.py
4560
# $Id$ import sys import random import math import numpy from itcc.core import ctools __revision__ = '$Rev$' __all__ = ['length', 'angle', 'torsionangle', 'imptor', 'combinecombine', 'xyzatm', 'minidx', 'maxidx', 'weightedmean', 'weightedsd', 'datafreq', 'random_vector', 'all', 'any', 'dissq', 'lensq', 'distance', 'normal'] def normal(a): return a / length(a) def datafreq(data, min_, max_, num): result = [0] * num step = float(max_ - min_)/num for x in data: type_ = int((x - min_)/step) if 0 <= type_ < num: result[type_] += 1 return result def distance(a, b): return length(a-b) def dissq(a, b): return lensq(a-b) def length(a): return math.sqrt(sum(a*a)) def lensq(a): return sum(a*a) def angle(a, b, c): return ctools.angle(tuple(a), tuple(b), tuple(c)) def torsionangle(a, b, c, d): """torsionangle(a, b, c, d) -> angle a, b, c, d are 4 numpy.array return the torsionangle of a-b-c-d in radian, range is (-pi, pi]. if torsionangle is invalid, for example, a == b or b == c or c == d or a == c or b == d, then return float("nan"). """ return ctools.torsionangle(tuple(a), tuple(b), tuple(c), tuple(d)) def imptor(a, b, c, d): '''imptor(a, b, c, d) -> angle a, b, c, d are 4 Scientific.Geometry.Vector return the imptor of a-b-c-d imptor(abcd) is the angle between vector ad and plane abc, crossmulti(ab, ac) is the positive direction. ''' ad = d - a ab = b - a ac = c - a abc = numpy.cross(ab, ac) angle_ = ad.angle(abc) return math.pi - angle_ def combinecombine(cmbs): if not cmbs: yield [] return for x in cmbs[0]: for cc in combinecombine(cmbs[1:]): yield [x] + cc def xyzatm(p1, p2, p3, r, theta, phi): ''' >>> from Scientific.Geometry import Vector >>> import math >>> xyzatm(Vector(0,0,1), Vector(0,0,0), Vector(1,0,0), ... 1, math.radians(90), 0) Vector(1.0,0.0,0.99999999999999989) ''' r12 = normal(p1 - p2) r23 = normal(p2 - p3) rt = numpy.cross(r23, r12) cosine = r12 * r23 sine = math.sqrt(max(1.0 - cosine*cosine, 0.0)) rt /= sine ru = numpy.cross(rt, r12) ts = math.sin(theta) tc = math.cos(theta) ps = math.sin(phi) pc = math.cos(phi) return p1 + (ru * (ts * pc) + rt * (ts * ps) - r12 * tc) * r def minidx(iterable): iterable = iter(iterable) idx = 0 item = iterable.next() for i, x in enumerate(iterable): if x < item: idx = i+1 item = x return idx, item def maxidx(iterable): iterable = iter(iterable) idx = 0 item = iterable.next() for i, x in enumerate(iterable): if x > item: idx = i+1 item = x return idx, item def swapaxes(matrix): rank1 = len(matrix) if rank1 == 0: return [] rank2 = len(matrix[0]) for row in matrix: assert len(row) == rank2 result = [[None] * rank1 for i in range(rank2)] for i in range(rank2): for j in range(rank1): result[i][j] = matrix[j][i] return result def weightedmean(datas, weights): assert len(datas) == len(weights) sum_ = sum([data * weight for data, weight in zip(datas, weights)]) totalweight = sum(weights) return sum_/totalweight def weightedsd(datas, weights): assert len(datas) == len(weights) assert len(datas) > 1 mean_ = weightedmean(datas, weights) sum_ = sum([(data - mean_)**2 * weight \ for data, weight in zip(datas, weights)]) totalweight = sum(weights) return math.sqrt(sum_/totalweight) def any(iterable): for element in iterable: if element: return True return False def all(iterable): for element in iterable: if not element: return False return True def random_vector(length_=1.0): z = random.uniform(-length_, length_) s = math.sqrt(length_*length_ - z*z) theta = random.uniform(0.0, math.pi*2) x = s * math.cos(theta) y = s * math.sin(theta) return (x, y, z) def open_file_or_stdin(ifname): if ifname == '-': return sys.stdin else: return file(ifname) def sorted_(iterable): '''python 2.3 does not support sorted''' res = list(iterable) res.sort() return res def _test(): import doctest doctest.testmod() if __name__ == '__main__': _test()
gpl-3.0
livingobjects/neo4j-lo-extensions
src/main/java/com/livingobjects/neo4j/model/export/PropertyNameComparator.java
994
package com.livingobjects.neo4j.model.export; import com.livingobjects.neo4j.model.iwan.GraphModelConstants; import java.util.Comparator; public final class PropertyNameComparator implements Comparator<String> { public static final PropertyNameComparator PROPERTY_NAME_COMPARATOR = new PropertyNameComparator(); private PropertyNameComparator() { } @Override public int compare(String o1, String o2) { int result = propertyPrecedence(o1) - propertyPrecedence(o2); if (result == 0) { return o1.toLowerCase().compareTo(o2.toLowerCase()); } else { return result; } } public int propertyPrecedence(String prop) { switch (prop) { case GraphModelConstants.TAG: return 0; case GraphModelConstants.ID: return 1; case GraphModelConstants.NAME: return 2; default: return 3; } } }
gpl-3.0
rinor/cgrates
engine/pstr_amqpv1.go
3986
/* Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments Copyright (C) ITsysCOM GmbH This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/> */ package engine import ( "context" "fmt" "net" "sync" "time" "github.com/cgrates/cgrates/utils" amqpv1 "pack.ag/amqp" ) // NewAMQPv1Poster creates a poster for amqpv1 func NewAMQPv1Poster(dialURL string, attempts int) (Poster, error) { URL, qID, err := parseURL(dialURL) if err != nil { return nil, err } return &AMQPv1Poster{ dialURL: URL, queueID: "/" + qID, attempts: attempts, }, nil } // AMQPv1Poster a poster for amqpv1 type AMQPv1Poster struct { sync.Mutex dialURL string queueID string // identifier of the CDR queue where we publish attempts int client *amqpv1.Client } // Close closes the connections func (pstr *AMQPv1Poster) Close() { pstr.Lock() if pstr.client != nil { pstr.client.Close() } pstr.client = nil pstr.Unlock() } // Post is the method being called when we need to post anything in the queue func (pstr *AMQPv1Poster) Post(content []byte, _ string) (err error) { var s *amqpv1.Session fib := utils.Fib() for i := 0; i < pstr.attempts; i++ { if s, err = pstr.newPosterSession(); err == nil { break } // reset client and try again // used in case of closed connection because of idle time if pstr.client != nil { pstr.client.Close() // Make shure the connection is closed before reseting it } pstr.client = nil if i+1 < pstr.attempts { time.Sleep(time.Duration(fib()) * time.Second) } } if err != nil { utils.Logger.Warning(fmt.Sprintf("<AMQPv1Poster> creating new post channel, err: %s", err.Error())) return err } ctx := context.Background() for i := 0; i < pstr.attempts; i++ { sender, err := s.NewSender( amqpv1.LinkTargetAddress(pstr.queueID), ) if err != nil { if i+1 < pstr.attempts { time.Sleep(time.Duration(fib()) * time.Second) } // if pstr.isRecoverableError(err) { // s.Close(ctx) // pstr.client.Close() // pstr.client = nil // stmp, err := pstr.newPosterSession() // if err == nil { // s = stmp // } // } continue } // Send message err = sender.Send(ctx, amqpv1.NewMessage(content)) sender.Close(ctx) if err == nil { break } if i+1 < pstr.attempts { time.Sleep(time.Duration(fib()) * time.Second) } // if pstr.isRecoverableError(err) { // s.Close(ctx) // pstr.client.Close() // pstr.client = nil // stmp, err := pstr.newPosterSession() // if err == nil { // s = stmp // } // } } if err != nil { return } if s != nil { s.Close(ctx) } return } func (pstr *AMQPv1Poster) newPosterSession() (s *amqpv1.Session, err error) { pstr.Lock() defer pstr.Unlock() if pstr.client == nil { var client *amqpv1.Client client, err = amqpv1.Dial(pstr.dialURL) if err != nil { return nil, err } pstr.client = client } return pstr.client.NewSession() } func isRecoverableCloseError(err error) bool { return err == amqpv1.ErrConnClosed || err == amqpv1.ErrLinkClosed || err == amqpv1.ErrSessionClosed } func (pstr *AMQPv1Poster) isRecoverableError(err error) bool { switch err.(type) { case *amqpv1.Error, *amqpv1.DetachError, net.Error: if netErr, ok := err.(net.Error); ok { if !netErr.Temporary() { return false } } default: if !isRecoverableCloseError(err) { return false } } return true }
gpl-3.0
softwarekid/OpenFlipper
ObjectTypes/Skeleton/PoseT.hh
9581
/*===========================================================================*\ * * * OpenFlipper * * Copyright (C) 2001-2011 by Computer Graphics Group, RWTH Aachen * * www.openflipper.org * * * *--------------------------------------------------------------------------- * * This file is part of OpenFlipper. * * * * OpenFlipper is free software: you can redistribute it and/or modify * * it under the terms of the GNU Lesser General Public License as * * published by the Free Software Foundation, either version 3 of * * the License, or (at your option) any later version with the * * following exceptions: * * * * If other files instantiate templates or use macros * * or inline functions from this file, or you compile this file and * * link it with other files to produce an executable, this file does * * not by itself cause the resulting executable to be covered by the * * GNU Lesser General Public License. This exception does not however * * invalidate any other reasons why the executable file might be * * covered by the GNU Lesser General Public License. * * * * OpenFlipper is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU Lesser General Public License for more details. * * * * You should have received a copy of the GNU LesserGeneral Public * * License along with OpenFlipper. If not, * * see <http://www.gnu.org/licenses/>. * * * \*===========================================================================*/ /*===========================================================================*\ * * * $Revision: 15021 $ * * $LastChangedBy: moebius $ * * $Date: 2012-07-16 17:18:19 +0800 (Mon, 16 Jul 2012) $ * * * \*===========================================================================*/ #ifndef POSET_HH #define POSET_HH #include "ACG/Math/Matrix4x4T.hh" #include "ACG/Math/VectorT.hh" #include "ACG/Math/QuaternionT.hh" #include "ACG/Math/DualQuaternionT.hh" template<typename PointT> class SkeletonT; /** * @brief A general pose, used to store the frames of the animation * */ template<typename PointT> class PoseT { template<typename> friend class SkeletonT; template<typename> friend class AnimationT; template<typename> friend class FrameAnimationT; protected: typedef PointT Point; typedef typename Point::value_type Scalar; typedef typename ACG::VectorT<Scalar, 3> Vector; typedef typename ACG::Matrix4x4T<Scalar> Matrix; typedef typename ACG::QuaternionT<Scalar> Quaternion; typedef typename ACG::DualQuaternionT<Scalar> DualQuaternion; public: /// Constructor PoseT(SkeletonT<Point>* _skeleton); /// Copy Constructor PoseT(const PoseT<PointT>& _other); /// Destructor virtual ~PoseT(); // ======================================================================================= /** @anchor PoseEditing * @name Pose editing * These methods update the other coordinate systems, changing the local coordinates will also change the global and vice versa. * @{ */ // ======================================================================================= /// local matrix manipulation /// the local matrix represents a joints orientation/translation in the coordinate frame of the parent joint inline const Matrix& localMatrix(unsigned int _joint) const; void setLocalMatrix(unsigned int _joint, const Matrix &_local, bool _keepLocalChildPositions=true); inline Vector localTranslation(unsigned int _joint); void setLocalTranslation(unsigned int _joint, const Vector &_position, bool _keepLocalChildPositions=true); inline Matrix localMatrixInv(unsigned int _joint) const; /// global matrix manipulation /// the global matrix represents a joints orientation/translation in global coordinates inline const Matrix& globalMatrix(unsigned int _joint) const; void setGlobalMatrix(unsigned int _joint, const Matrix &_global, bool _keepGlobalChildPositions=true); inline Vector globalTranslation(unsigned int _joint); void setGlobalTranslation(unsigned int _joint, const Vector &_position, bool _keepGlobalChildPositions=true); virtual Matrix globalMatrixInv(unsigned int _joint) const; /** @} */ // ======================================================================================= /** * @name Synchronization * Use these methods to keep the pose in sync with the number (and indices) of the joints. * @{ */ // ======================================================================================= /** * \brief Called by the skeleton/animation as a new joint is inserted * * To keep the vectors storing the matrices for the joints in sync with the joints a new entry has to be inserted * in exactly the same place if a new joint is added to the skeleton. This is done here. Derived classes * have to overwrite this method to keep their data members in sync as well. Always call the base class * method first. * * @param _index The new joint is inserted at this position. Insert new joints at the end by passing * SkeletonT<>::jointCount() as parameter. */ virtual void insertJointAt(unsigned int _index); /** * \brief Called by the skeleton/animation as a joint is removed * * To keep the vectors storing the matrices for the joints in sync with the joints exactly the same entry * has to be removed as a joint is removed from the skeleton. This is done here. Derived classes * have to overwrite this method to keep their data members in sync as well. Always call the base class * method first. * * @param _index The new joint is inserted at this position. Insert new joints at the end by passing * SkeletonT<>::jointCount() as parameter. */ virtual void removeJointAt(unsigned int _index); /** @} */ protected: // ======================================================================================= /** @name Coordinate system update methods * These methods propagate the change in one of the coordinate systems into the other. This will * keep intact the children nodes' positions per default (by recursively updating all children.). * This behavior can be influenced via the _keepChildPositions parameter. * @{ */ // ======================================================================================= void updateFromLocal(unsigned int _joint, bool _keepChildPositions=true); void updateFromGlobal(unsigned int _joint, bool _keepChildPositions=true); /** @} */ public: // ======================================================================================= /** @anchor UnifiedMatrices * @name Unified Matrices * Use these methods to gain access to the precalculations performed by this derivation. * @{ */ // ======================================================================================= inline const Matrix& unifiedMatrix(unsigned int _joint); inline const Quaternion& unifiedRotation(unsigned int _joint); inline const DualQuaternion& unifiedDualQuaternion(unsigned int _joint); /** @} */ protected: /// a pointer to the skeleton SkeletonT<PointT>* skeleton_; /// the pose in local coordinates std::vector<Matrix> local_; /// the pose in global coordinates std::vector<Matrix> global_; /// the global pose matrix left-multiplied to the inverse global reference matrix: \f$ M_{pose} \cdot M^{-1}_{reference} \f$ std::vector<Matrix> unified_; /// JointT::PoseT::unified in DualQuaternion representation /// note: the real part of the dual quaternion is the rotation part of the transformation as quaternion std::vector<DualQuaternion> unifiedDualQuaternion_; }; //============================================================================= //============================================================================= #if defined(INCLUDE_TEMPLATES) && !defined(POSET_C) #define POSET_TEMPLATES #include "PoseT.cc" #endif //============================================================================= #endif //=============================================================================
gpl-3.0
ahvigil/MultiQC
docs/modules/fastqc.md
3284
--- Name: FastQC URL: http://www.bioinformatics.babraham.ac.uk/projects/fastqc/ Description: > FastQC is a quality control tool for high throughput sequence data, written by Simon Andrews at the Babraham Institute in Cambridge. --- The FastQC module parses results generated by [FastQC](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/), a quality control tool for high throughput sequence data written by Simon Andrews at the Babraham Institute. FastQC generates a HTML report which is what most people use when they run the program. However, it also helpfully generates a file called `fastqc_data.txt` which is relatively easy to parse. A typical run will produce the following files: ``` mysample_fastqc.html mysample_fastqc/ Icons/ Images/ fastqc.fo fastqc_data.txt fastqc_report.html summary.txt ``` Sometimes the directory is zipped, with just `mysample_fastqc.zip`. The FastQC MultiQC module looks for files called `fastqc_data.txt` or ending in `_fastqc.zip`. If the zip files are found, they are read in memory and `fastqc_data.txt` parsed. > **Note:** The directory and zip file are often both present. To speed > up MultiQC execution, zip files will be skipped if the file name suggests > that they will share a sample name with data that has already been parsed. You can customise the patterns used for finding these files in your MultiQC config using the following base - see the docs for more details.. ```yaml sp: fastqc: data: fn: 'fastqc_data.txt' zip: fn: '_fastqc.zip' ``` > **Note:** Sample names are discovered by parsing the line beginning > `Filename` in `fastqc_data.txt`, _not_ based on the FastQC report names. ### Theoretical GC Content It is possible to plot a dashed line showing the theoretical GC content for a reference genome. MultiQC comes with genome and transcriptome guides for Human and Mouse. You can use these in your reports by adding the following MultiQC config keys (see [Configuring MultiQC](http://multiqc.info/docs/#configuring-multiqc)): ```yaml fastqc_config: fastqc_theoretical_gc: 'hg38_genome' ``` Only one theoretical distribution can be plotted. The following guides are available: `hg38_genome`, `hg38_txome`, `mm10_genome`, `mm10_txome` (txome = transcriptome). Alternatively, a custom theoretical guide can be used in reports. To do this, create a file with `fastqc_theoretical_gc` in the filename and place it with your analysis files. It should be tab delimited with the following format (column 1 = %GC, column 2 = % of genome): ```bash # FastQC theoretical GC content curve: YOUR REFERENCE NAME 0 0.005311768 1 0.004108502 2 0.004060371 3 0.005066476 [...] ``` You can generate these files using an R package called [fastqcTheoreticalGC](https://github.com/mikelove/fastqcTheoreticalGC) written by [Mike Love](https://github.com/mikelove). Please see the [package readme](https://github.com/mikelove/fastqcTheoreticalGC) for more details. If you want to always use your custom file for MultiQC reports without having to add it to the analysis directory, add the full file path to the same MultiQC config variable described above: ```yaml fastqc_config: fastqc_theoretical_gc: '/path/to/your/custom_fastqc_theoretical_gc.txt' ```
gpl-3.0
ustegrew/ppm-java
doc/javadoc/html/d2/df2/classppm__java_1_1__dev_1_1concept_1_1trial_1_1_t_atomic_buffer_1_1_t_dev___trial___atomic_buffed45a420e4fba64d481cf2bcce0c03f63.js
2396
var classppm__java_1_1__dev_1_1concept_1_1trial_1_1_t_atomic_buffer_1_1_t_dev___trial___atomic_buffed45a420e4fba64d481cf2bcce0c03f63 = [ [ "TConsumer", "d2/df2/classppm__java_1_1__dev_1_1concept_1_1trial_1_1_t_atomic_buffer_1_1_t_dev___trial___atomic_buffed45a420e4fba64d481cf2bcce0c03f63.html#abd01c6ae70c7d4e0aac565b280bb3cfb", null ], [ "PrintCorrupted", "d2/df2/classppm__java_1_1__dev_1_1concept_1_1trial_1_1_t_atomic_buffer_1_1_t_dev___trial___atomic_buffed45a420e4fba64d481cf2bcce0c03f63.html#a9edee8617d13374fa8aa82e67a4ebd39", null ], [ "PrintLogEntry", "d2/df2/classppm__java_1_1__dev_1_1concept_1_1trial_1_1_t_atomic_buffer_1_1_t_dev___trial___atomic_buffed45a420e4fba64d481cf2bcce0c03f63.html#a4035704e5f4a02efe4b769057a3a2265", null ], [ "PrintReport", "d2/df2/classppm__java_1_1__dev_1_1concept_1_1trial_1_1_t_atomic_buffer_1_1_t_dev___trial___atomic_buffed45a420e4fba64d481cf2bcce0c03f63.html#a42ea98defca7469e63b1514e3284548d", null ], [ "run", "d2/df2/classppm__java_1_1__dev_1_1concept_1_1trial_1_1_t_atomic_buffer_1_1_t_dev___trial___atomic_buffed45a420e4fba64d481cf2bcce0c03f63.html#a13a43e6d814de94978c515cb084873b1", null ], [ "TestNums", "d2/df2/classppm__java_1_1__dev_1_1concept_1_1trial_1_1_t_atomic_buffer_1_1_t_dev___trial___atomic_buffed45a420e4fba64d481cf2bcce0c03f63.html#a0de49dd1e46b63af57a0186b160b2a9f", null ], [ "fAtBuffer", "d2/df2/classppm__java_1_1__dev_1_1concept_1_1trial_1_1_t_atomic_buffer_1_1_t_dev___trial___atomic_buffed45a420e4fba64d481cf2bcce0c03f63.html#a1431fdcc7f817086fcc007ecb088993a", null ], [ "fDelay", "d2/df2/classppm__java_1_1__dev_1_1concept_1_1trial_1_1_t_atomic_buffer_1_1_t_dev___trial___atomic_buffed45a420e4fba64d481cf2bcce0c03f63.html#a06f10ece1037468fb0e4cf8e1cda4528", null ], [ "fID", "d2/df2/classppm__java_1_1__dev_1_1concept_1_1trial_1_1_t_atomic_buffer_1_1_t_dev___trial___atomic_buffed45a420e4fba64d481cf2bcce0c03f63.html#aa73ca4a4129d8b99c2d350691e61e38c", null ], [ "fNCorruptions", "d2/df2/classppm__java_1_1__dev_1_1concept_1_1trial_1_1_t_atomic_buffer_1_1_t_dev___trial___atomic_buffed45a420e4fba64d481cf2bcce0c03f63.html#ae958bd76eeba95a504975db1e46cafc0", null ], [ "fNEmptyFrames", "d2/df2/classppm__java_1_1__dev_1_1concept_1_1trial_1_1_t_atomic_buffer_1_1_t_dev___trial___atomic_buffed45a420e4fba64d481cf2bcce0c03f63.html#aa167347f6dd115d6a485856871edb4cd", null ] ];
gpl-3.0
wp-plugins/wp-e-commerce-products-quick-view
admin/tabs/custom-template/gallery-tab.php
4074
<?php /* "Copyright 2012 A3 Revolution Web Design" This software is distributed under the terms of GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 */ // File Security Check if ( ! defined( 'ABSPATH' ) ) exit; ?> <?php /*----------------------------------------------------------------------------------- WPEC Quick View Custom Template Gallery Tab TABLE OF CONTENTS - var parent_page - var position - var tab_data - __construct() - tab_init() - tab_data() - add_tab() - settings_include() - tab_manager() -----------------------------------------------------------------------------------*/ class WPEC_QV_Custom_Template_Gallery_Tab extends WPEC_QV_Admin_UI { /** * @var string */ private $parent_page = 'wpec-quick-view-custom-template'; /** * @var string * You can change the order show of this tab in list tabs */ private $position = 2; /** * @var array */ private $tab_data; /*-----------------------------------------------------------------------------------*/ /* __construct() */ /* Settings Constructor */ /*-----------------------------------------------------------------------------------*/ public function __construct() { $this->settings_include(); $this->tab_init(); } /*-----------------------------------------------------------------------------------*/ /* tab_init() */ /* Tab Init */ /*-----------------------------------------------------------------------------------*/ public function tab_init() { add_filter( $this->plugin_name . '-' . $this->parent_page . '_settings_tabs_array', array( $this, 'add_tab' ), $this->position ); } /** * tab_data() * Get Tab Data * ============================================= * array ( * 'name' => 'my_tab_name' : (required) Enter your tab name that you want to set for this tab * 'label' => 'My Tab Name' : (required) Enter the tab label * 'callback_function' => 'my_callback_function' : (required) The callback function is called to show content of this tab * ) * */ public function tab_data() { $tab_data = array( 'name' => 'gallery-settings', 'label' => __( 'Gallery Settings', 'wpecquickview' ), 'callback_function' => 'wpec_qv_custom_template_gallery_tab_manager', ); if ( $this->tab_data ) return $this->tab_data; return $this->tab_data = $tab_data; } /*-----------------------------------------------------------------------------------*/ /* add_tab() */ /* Add tab to Admin Init and Parent Page /*-----------------------------------------------------------------------------------*/ public function add_tab( $tabs_array ) { if ( ! is_array( $tabs_array ) ) $tabs_array = array(); $tabs_array[] = $this->tab_data(); return $tabs_array; } /*-----------------------------------------------------------------------------------*/ /* panels_include() */ /* Include form settings panels /*-----------------------------------------------------------------------------------*/ public function settings_include() { // Includes Settings file include_once( $this->admin_plugin_dir() . '/settings/custom-template/gallery-style-settings.php' ); include_once( $this->admin_plugin_dir() . '/settings/custom-template/thumbnails-settings.php' ); } /*-----------------------------------------------------------------------------------*/ /* tab_manager() */ /* Call tab layout from Admin Init /*-----------------------------------------------------------------------------------*/ public function tab_manager() { global $wpec_qv_admin_init; $wpec_qv_admin_init->admin_settings_tab( $this->parent_page, $this->tab_data() ); } } global $wpec_qv_custom_template_gallery_tab; $wpec_qv_custom_template_gallery_tab = new WPEC_QV_Custom_Template_Gallery_Tab(); /** * wpec_qv_custom_template_gallery_tab_manager() * Define the callback function to show tab content */ function wpec_qv_custom_template_gallery_tab_manager() { global $wpec_qv_custom_template_gallery_tab; $wpec_qv_custom_template_gallery_tab->tab_manager(); } ?>
gpl-3.0
lig/pystardict
examples/demo.py
2522
# -*- coding: utf-8 -*- """ Copyright 2008 Serge Matveenko This file is part of PyStarDict. PyStarDict is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PyStarDict is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with PyStarDict. If not, see <http://www.gnu.org/licenses/>. @author: Serge Matveenko <s@matveenko.ru> """ import datetime import os import sys """hack in local sources if requested and handle import crash""" if '--local' in sys.argv: sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'src')) try: from pystardict import Dictionary except ImportError, e: if __name__ == '__main__': print Exception('No pystardict in PYTHONPATH. Try --local parameter.') exit(1) else: raise e def demo(): milestone1 = datetime.datetime.today() dicts_dir = os.path.join(os.path.dirname(__file__)) dict1 = Dictionary(os.path.join(dicts_dir, 'stardict-quick_eng-rus-2.4.2', 'quick_english-russian')) dict2 = Dictionary(os.path.join(dicts_dir, 'stardict-quick_rus-eng-2.4.2', 'quick_russian-english')) milestone2 = datetime.datetime.today() print '2 dicts load:', milestone2-milestone1 print dict1.idx['test'] print dict2.idx['проверка'] milestone3 = datetime.datetime.today() print '2 cords getters:', milestone3-milestone2 print dict1.dict['test'] print dict2.dict['проверка'] milestone4 = datetime.datetime.today() print '2 direct data getters (w\'out cache):', milestone4-milestone3 print dict1['test'] print dict2['проверка'] milestone5 = datetime.datetime.today() print '2 high level data getters (not cached):', milestone5-milestone4 print dict1['test'] print dict2['проверка'] milestone6 = datetime.datetime.today() print '2 high level data getters (cached):', milestone6-milestone5 # list dictionary keys and dictionary content according to the key for key in dict1.ids.keys(): print dict1.dict[key] if __name__ == '__main__': demo()
gpl-3.0
ckaestne/CIDE
CIDE_Language_JavaCC/src/tmp/generated_javacc/AnnotationTypeMemberDeclaration1.java
1471
package tmp.generated_javacc; import cide.gast.*; import cide.gparser.*; import cide.greferences.*; import java.util.*; public class AnnotationTypeMemberDeclaration1 extends AnnotationTypeMemberDeclaration { public AnnotationTypeMemberDeclaration1(Modifiers modifiers, Type type, JavaIdentifier javaIdentifier, DefaultValue defaultValue, Token firstToken, Token lastToken) { super(new Property[] { new PropertyOne<Modifiers>("modifiers", modifiers), new PropertyOne<Type>("type", type), new PropertyOne<JavaIdentifier>("javaIdentifier", javaIdentifier), new PropertyZeroOrOne<DefaultValue>("defaultValue", defaultValue) }, firstToken, lastToken); } public AnnotationTypeMemberDeclaration1(Property[] properties, IToken firstToken, IToken lastToken) { super(properties,firstToken,lastToken); } public IASTNode deepCopy() { return new AnnotationTypeMemberDeclaration1(cloneProperties(),firstToken,lastToken); } public Modifiers getModifiers() { return ((PropertyOne<Modifiers>)getProperty("modifiers")).getValue(); } public Type getType() { return ((PropertyOne<Type>)getProperty("type")).getValue(); } public JavaIdentifier getJavaIdentifier() { return ((PropertyOne<JavaIdentifier>)getProperty("javaIdentifier")).getValue(); } public DefaultValue getDefaultValue() { return ((PropertyZeroOrOne<DefaultValue>)getProperty("defaultValue")).getValue(); } }
gpl-3.0
jerryyjr/cosc445_project
simulation/source/io.cpp
26892
/* Simulation for zebrafish segmentation Copyright (C) 2013 Ahmet Ay, Jack Holland, Adriana Sperlea, Sebastian Sangervasi This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* io.cpp contains functions for input and output of files and pipes. All I/O related functions should be placed in this file. */ #include <cerrno> // Needed for errno, EEXIST #include <cstdio> // Needed for fopen, fclose, fseek, ftell, rewind #include <sys/stat.h> // Needed for mkdir #include <unistd.h> // Needed for read, write, close #include "io.hpp" // Function declarations #include "sim.hpp" // Needed for anterior_time #include "main.hpp" using namespace std; extern terminal* term; // Declared in init.cpp /* not_EOL returns whether or not a given character is the end of a line or file (i.e. '\n' or '\0', respectively) parameters: c: the character to check returns: true if c is the end of a line or file, false otherwise notes: When reading input file strings, use this instead of a straight newline check to avoid EOF (end of file) issues. todo: */ bool not_EOL (char c) { return c != '\n' && c != '\0'; } /* store_filename stores the given value in the given field parameters: field: a pointer to the filename's field value: the filename to store returns: nothing notes: The previous field value is freed before assigning the new one. todo: */ void store_filename (char** field, const char* value) { mfree(*field); *field = copy_str(value); } /* create_dir creates a directory with the given path and name parameters: dir: the path and name of the directory to create returns: nothing notes: If the directory already exists, the error about it is suppressed. todo: */ void create_dir (char* dir) { cout << term->blue << "Creating " << term->reset << dir << " directory if necessary . . . "; // Create a directory, allowing the owner and group to read and write but others to only read if (mkdir(dir, 0775) != 0 && errno != EEXIST) { // If the error is that the directory already exists, ignore it cout << term->red << "Couldn't create '" << dir << "' directory!" << term->reset << endl; exit(EXIT_FILE_WRITE_ERROR); } term->done(); } /* open_file opens the file with the given name and stores it in the given output file stream parameters: file_pointer: a pointer to the output file stream to open the file with file_name: the path and name of the file to open append: if true, the file will appended to, otherwise any existing data will be overwritten returns: nothing notes: todo: */ void open_file (ofstream* file_pointer, char* file_name, bool append) { try { if (append) { cout << term->blue << "Opening " << term->reset << file_name << " . . . "; file_pointer->open(file_name, fstream::app); } else { cout << term->blue << "Creating " << term->reset << file_name << " . . . "; file_pointer->open(file_name, fstream::out); } } catch (ofstream::failure) { cout << term->red << "Couldn't write to " << file_name << "!" << term->reset << endl; exit(EXIT_FILE_WRITE_ERROR); } term->done(); } /* read_file takes an input_data struct and stores the contents of the associated file in a string parameters: ifd: the input_data struct to contain the file name, buffer to store the contents, size of the file, and current index returns: nothing notes: The buffer in ifd will be sized large enough to fit the file todo: */ void read_file (input_data* ifd) { cout << term->blue << "Reading file " << term->reset << ifd->filename << " . . . "; // Open the file for reading FILE* file = fopen(ifd->filename, "r"); if (file == NULL) { cout << term->red << "Couldn't open " << ifd->filename << "!" << term->reset << endl; exit(EXIT_FILE_READ_ERROR); } // Seek to the end of the file, grab its size, and then rewind fseek(file, 0, SEEK_END); long size = ftell(file); ifd->size = size; rewind(file); // Allocate enough memory to contain the whole file ifd->buffer = (char*)mallocate(sizeof(char) * size + 1); // Copy the file's contents into the buffer long result = fread(ifd->buffer, 1, size, file); if (result != size) { cout << term->red << "Couldn't read from " << ifd->filename << term->reset << endl; exit(EXIT_FILE_READ_ERROR); } ifd->buffer[size] = '\0'; // Close the file if (fclose(file) != 0) { cout << term->red << "Couldn't close " << ifd->filename << term->reset << endl; exit(EXIT_FILE_READ_ERROR); } term->done(); } /* parse_param_line reads a line in the given parameter sets buffer and stores it in the given array of doubles parameters: params: the array of doubles to store the parameters in buffer_line: the buffer with the line to read index_buffer: the index of the buffer to start from returns: true if a line was found, false if the end of the file was reached without finding a valid line notes: The buffer should contain one parameter set per line, each set containing comma-separated floating point parameters. Blank lines and lines starting with # will be ignored. Each line must contain the correct number of parameters or the program will exit. index_buffer is a reference, allowing this function to store where it finished parsing. todo: */ bool parse_param_line (double* params, char* buffer_line, int& index_buffer) { static const char* usage_message = "There was an error reading the given parameter sets file."; int index_params = 0; // Current index in params int index_digits = index_buffer; // Index of the start of the digits to read int i = index_buffer; // Current index in buffer_line int line_start = i; // The start of the line, used to tell whether or not a line is empty for (; not_EOL(buffer_line[i]); i++) { if (buffer_line[i] == '#') { // Skip any lines starting with # for(; not_EOL(buffer_line[i]); i++); i++; } else if (buffer_line[i] == ',') { // Indicates the end of the digits to read if (sscanf(buffer_line + index_digits, "%lf", &(params[index_params++])) < 1) { // Convert the string of digits to a double when storing it in params usage(usage_message); } index_digits = i + 1; } } index_buffer = i + 1; if (i - line_start > 0) { // This line has content if (sscanf(buffer_line + index_digits, "%lf", &(params[index_params++])) < 1) { usage(usage_message); } if (index_params != NUM_RATES) { cout << term->red << "The given parameter sets file contains sets with an incorrect number of rates! This simulation requires " << NUM_RATES << " per set but at least one line contains " << index_params << " per set." << term->reset << endl; exit(EXIT_INPUT_ERROR); } return true; } else if (buffer_line[index_buffer] != '\0') { // There are more lines to try to parse return parse_param_line(params, buffer_line, index_buffer); } else { // The end of the buffer was found return false; } } /* parse_ranges_file reads the given buffer and stores every range found in the given ranges array parameters: ranges: the array of pairs in which to store the lower and upper bounds of each range buffer: the buffer with the ranges to read returns: nothing notes: The buffer should contain one range per line, starting the name of the parameter followed by the bracked enclosed lower and then upper bound optionally followed by comments. e.g. 'msh1 [30, 65] comment' The name of the parameter is so humans can conveniently read the file and has no semantic value to this parser. Blank lines and lines starting with # will be ignored. Anything after the upper bound is ignored. todo: */ void parse_ranges_file (pair <double, double> ranges[], char* buffer) { int i = 0; int rate = 0; for (; buffer[i] != '\0'; i++) { // Ignore lines starting with # while (buffer[i] == '#') { while (buffer[i] != '\n' && buffer[i] != '\0') {i++;} i++; } // Ignore whitespace before the opening bracket while (buffer[i] != '[' && buffer[i] != '\0') {i++;} if (buffer[i] == '\0') {break;} i++; // Read the bounds ranges[rate].first = atof(buffer + i); while (buffer[i] != ',') {i++;} i++; ranges[rate].second = atof(buffer + i); if (ranges[rate].first < 0 || ranges[rate].second < 0) { // If the ranges are invalid then set them to 0 ranges[rate].first = 0; ranges[rate].second = 0; } rate++; // Skip any comments until the end of the line while (buffer[i] != '\n' && buffer[i] != '\0') {i++;} } } /* print_passed prints the parameter sets that passed all required conditions of all required mutants parameters: ip: the program's input parameters file_passed: a pointer to the output file stream to open the file with rs: the current simulation's rates to pull the parameter sets from returns: nothing notes: This function prints each parameter separated by a comma, one set per line. todo: */ void print_passed (input_params& ip, ofstream* file_passed, rates& rs) { if (ip.print_passed) { // Print which sets passed only if the user specified it try { *file_passed << rs.rates_base[0]; for (int i = 1; i < NUM_RATES; i++) { *file_passed << "," << rs.rates_base[i]; } *file_passed << endl; } catch (ofstream::failure) { cout << term->red << "Couldn't write to " << ip.passed_file << "!" << term->reset << endl; exit(EXIT_FILE_WRITE_ERROR); } } } /* print_concentrations prints the concentration values of every cell at every time step of the given mutant for the given run parameters: ip: the program's input parameters sd: the current simulation's data cl: the current simulation's concentration levels md: mutant data filename_cons: the path and name of the file in which to store the concentration levels set_num: the index of the parameter set whose concentration levels are being printed returns: nothing notes: The first line of the file is the total width then a space then the height of the simulation. Each line after starts with the time step then a space then space-separated concentration levels for every cell ordered by their position relative to the active start of the PSM. If binary mode is set, the file will get the extension .bcons and print raw binary values, not ASCII text. The concentration printed is mutant dependent, but usually mh1. todo: */ void print_concentrations (input_params& ip, sim_data& sd, con_levels& cl, mutant_data& md, char* filename_cons, int set_num) { if (ip.print_cons) { // Print the concentrations only if the user specified it int strlen_set_num = INT_STRLEN(set_num); // How many bytes the ASCII representation of set_num takes char* str_set_num = (char*)mallocate(sizeof(char) * (strlen_set_num + 1)); sprintf(str_set_num, "%d", set_num); char* extension; if (ip.binary_cons_output) { // Binary files get the extension .bcons extension = copy_str(".bcons"); } else { // ASCII files (the default option) get the extension specified by the user extension = copy_str(".cons"); } char* filename_set = (char*)mallocate(sizeof(char) * (strlen(filename_cons) + strlen("set_") + strlen_set_num + strlen(extension) + 1)); sprintf(filename_set, "%sset_%s%s", filename_cons, str_set_num, extension); cout << " "; // Offset the open_file message to preserve horizontal spacing ofstream file_cons; open_file(&file_cons, filename_set, sd.section == SEC_ANT); mfree(filename_set); mfree(str_set_num); mfree(extension); // If the file was just created then prepend the concentration levels with the simulation size if (sd.section == SEC_POST) { if (ip.binary_cons_output) { file_cons.write((char*)(&sd.width_total), sizeof(int)); file_cons.write((char*)(&sd.height), sizeof(int)); } else { file_cons << sd.width_total << " " << sd.height << "\n"; } } // Calculate which time steps to print int step_offset = (sd.section == SEC_ANT) * ((sd.steps_til_growth - sd.time_start) / sd.big_gran + 1); // If the file is being appended to then offset the time steps int start = sd.time_start / sd.big_gran; int end = sd.time_end / sd.big_gran; // Print the concentration levels of every cell at every time step if (ip.binary_cons_output) { for (int j = start; j < end; j++) { int time_step = (j + step_offset) * sd.big_gran; file_cons.write((char*)(&time_step), sizeof(int)); for (int i = 0; i < sd.height; i++) { int num_printed = 0; for (int k = cl.active_start_record[j]; num_printed < sd.width_total; k = WRAP(k - 1, sd.width_total), num_printed++) { float con = cl.cons[md.print_con][j][i * sd.width_total + k]; file_cons.write((char*)(&con), sizeof(float)); } } } } else { for (int j = start; j < end; j++) { int time_step = (j + step_offset) * sd.big_gran; file_cons << time_step << " "; for (int i = 0; i < sd.height; i++) { int num_printed = 0; for (int k = cl.active_start_record[j]; num_printed < sd.width_total; k = WRAP(k - 1, sd.width_total), num_printed++) { file_cons << cl.cons[md.print_con][j][i * sd.width_total + k] << " "; } } file_cons << "\n"; } } } } /* print_cell columns prints the concentrations of a number of columns of cells given by the user to an output file for plotting from the cells birth to their death: ip: the program's input parameters sd: the current simulation's data cl: the current simulation's concentration levels filename_cons: the path and name of the file in which to store the file being created set_num: the index of the parameter set whose concentration levels are being printed returns: nothing notes: The first line of the file is the number of columns printed then a space then the total height of the simulation Each line after starts with the time step then a space then space-separated concentration levels for every cell ordered by their position relative to the active start of the PSM. The number of columns given is relative to the start of the PSM and the cells are traced until one of the columns enters the determined region and is overwritten. The concentration printed is mutant dependent, but usually mh1. todo: */ void print_cell_columns (input_params& ip, sim_data& sd, con_levels &cl, char* filename_cons, int set_num) { if (ip.num_colls_print) { // Print the cells only if the user specified it //cerr << "But why are we here" << endl; int strlen_set_num = INT_STRLEN(set_num); // How many bytes the ASCII representation of set_num takes char* str_set_num = (char*)mallocate(sizeof(char) * (strlen_set_num + 1)); sprintf(str_set_num, "%d", set_num); char* filename_set = (char*)mallocate(sizeof(char) * (strlen(filename_cons) + strlen("set_") + strlen_set_num + strlen(".cells") + 1)); sprintf(filename_set, "%sset_%s.cells", filename_cons, str_set_num); cout << " "; // Offset the open_file message to preserve horizontal spacing ofstream file_cons; open_file(&file_cons, filename_set, false); file_cons << sd.height << " " << ip.num_colls_print << endl; mfree(filename_set); mfree(str_set_num); int time_full = anterior_time(sd, sd.steps_til_growth + (sd.width_total - sd.width_initial - 1) * sd.steps_split) ; // Time after which the PSM is full of cells int time = time_full; double time_point[sd.height * ip.num_colls_print]; // Array for storing all the cells that need to be printed at each time point memset(time_point, 0, sizeof(double) * sd.height * ip.num_colls_print); int first_active_start = cl.active_start_record[time_full]; while ((time < time_full + sd.steps_split) || cl.active_start_record[time] != first_active_start) { file_cons << time - time_full << " "; int col = 0; for (; col < ip.num_colls_print; col++) { int cur_col = WRAP(first_active_start + col, sd.width_total); for (int line = 0; line < sd.height; line++) { time_point[line * ip.num_colls_print + col] = cl.cons[CMH1][time][line * sd.width_total + cur_col]; } if (cur_col == cl.active_start_record[time]) { col++; break; } } // If not all the cells we're following are born yet, fill the rest of the slots with -1 for no data for (; col < ip.num_colls_print; col++) { for (int line = 0; line < sd.height; line++) { time_point[line * ip.num_colls_print + col] = -1; } } for (int cell = 0; cell < sd.height * ip.num_colls_print; cell++) { file_cons << time_point[cell] << " "; } file_cons << endl; time++; } int end_col = WRAP(first_active_start + ip.num_colls_print - 1, sd.width_total); while (cl.active_start_record[time] != WRAP(end_col, sd.width_total)) { int col = 0; file_cons << time - time_full << " "; for (; col < ip.num_colls_print; col++) { int cur_col = WRAP(end_col - col, sd.width_total); if (cur_col == cl.active_start_record[time]) { break; } for (int line = 0; line < sd.height; line++) { time_point[line * ip.num_colls_print + (ip.num_colls_print - col - 1)] = cl.cons[CMH1][time][line * sd.width_total + cur_col]; } } // If not all the cells we're following are still alive, fill the rest of the slots with -1 for no data for (; col < ip.num_colls_print; col++) { for (int line = 0; line < sd.height; line++) { time_point[line * ip.num_colls_print + (ip.num_colls_print - col - 1)] = -1; } } for (int cell = 0; cell < sd.height * ip.num_colls_print; cell++) { file_cons << time_point[cell] << " "; } file_cons << endl; time++; } file_cons.close(); } } /* print_osc_features prints the oscillation features for every mutant of the given run parameters: ip: the program's input parameters file_features: a pointer to the output file stream to open the file with mds: an array of the mutant_data structs for every mutant set_num: the index of the parameter set whose features are being printed num_passed: the number of mutants that passed the parameter set returns: nothing notes: This function sets the precision of file_features to 30, which is higher than the default value. This function prints each feature for each mutant, each feature separated by a comma, one set per line. todo: TODO Print anterior scores. */ void print_osc_features (input_params& ip, ofstream* file_features, mutant_data mds[], int set_num, int num_passed) { if (ip.print_features) { // Print the features only if the user specified it file_features->precision(30); try { *file_features << set_num << ","; for (int i = 0; i < ip.num_active_mutants; i++) { *file_features << mds[i].feat.sync_score_post[IMH1] << "," << mds[i].feat.period_post[IMH1] << "," << mds[i].feat.amplitude_post[IMH1] << "," << (mds[i].feat.period_post[IMH1]) / (mds[MUTANT_WILDTYPE].feat.period_post[IMH1]) << "," << (mds[i].feat.amplitude_post[IMH1]) / (mds[MUTANT_WILDTYPE].feat.amplitude_post[IMH1]) << ","; *file_features << mds[i].feat.sync_score_ant[IMH1] << "," << mds[i].feat.period_ant[IMH1] << "," << mds[i].feat.amplitude_ant[IMH1] << "," << (mds[i].feat.period_ant[IMH1]) / (mds[MUTANT_WILDTYPE].feat.period_ant[IMH1]) << "," << (mds[i].feat.amplitude_ant[IMH1]) / (mds[MUTANT_WILDTYPE].feat.amplitude_ant[IMH1]) << ","; } if (num_passed == ip.num_active_mutants) { *file_features << "PASSED" << endl; } else { *file_features << "FAILED" << endl; } } catch (ofstream::failure) { cout << term->red << "Couldn't write to " << ip.features_file << "!" << term->reset << endl; exit(EXIT_FILE_WRITE_ERROR); } } } /* print_conditions prints which conditions each mutant of the given run passed parameters: ip: the program's input parameters file_conditions: a pointer to the output file stream to open the file with mds: an array of the mutant data structs for every mutant set_num: the index of the parameter set whose conditions are being printed returns: nothing notes: This function prints -1, 0, or 1 for each condition for each mutant, each condition separated by a comma, one set per line. todo: */ void print_conditions (input_params& ip, ofstream* file_conditions, mutant_data mds[], int set_num) { if (ip.print_conditions) { // Print the conditions only if the user specified it try { *file_conditions << set_num << ","; for (int i = 0; i < ip.num_active_mutants; i++) { *file_conditions << mds[i].print_name << ","; for (int j = 0; j < NUM_SECTIONS; j++) { for (int k = 0; k < mds[i].num_conditions[j]; k++) { if (mds[i].secs_passed[j]) { // If the mutant was run, print 1 if it passed, 0 if it failed *file_conditions << mds[i].conds_passed[j][k] << ","; } else { // If the mutant was not run, print -1 *file_conditions << "-1,"; } } } } *file_conditions << endl; } catch (ofstream::failure) { cout << term->red << "Couldn't write to " << ip.conditions_file << "!" << term->reset << endl; exit(EXIT_FILE_WRITE_ERROR); } } } /* print_scores prints the scores of each mutant run for the given set parameters: ip: the program's input parameters file_scores: a pointer to the output file stream to open the file with set_num: the index of the parameter set whose conditions are being printed scores: the array of scores to print total_score: the sum of all the scores returns: nothing notes: This function prints the set index then score for each mutant then the total score, all separated by commas, one set per line. todo: */ void print_scores (input_params& ip, ofstream* file_scores, int set_num, double scores[], double total_score) { if (ip.print_scores) { try { *file_scores << set_num << ","; for (int i = 0; i < NUM_SECTIONS * ip.num_active_mutants; i++) { *file_scores << scores[i] << ","; } *file_scores << total_score << endl; } catch (ofstream::failure) { cout << term->red << "Couldn't write to " << ip.scores_file << "!" << term->reset << endl; exit(EXIT_FILE_WRITE_ERROR); } } } /* close_if_open closes the given output file stream if it is open parameters: file: a pointer to the output file stream to close returns: nothing notes: todo: */ void close_if_open (ofstream* file) { if (file->is_open()) { file->close(); } } /* read_pipe reads parameter sets from a pipe created by a program interacting with this one parameters: sets: the array of parameter sets in which to store any received sets ip: the program's input parameters returns: nothing notes: The first information piped in must be an integer specifying the number of rates (i.e. parameters) per set that will be piped in. If this number differs from what is expected, the program will exit. The next information piped in must be an integer specifying the number of parameter sets that will be piped in. Each set to be piped in should be sent as a stream of doubles, with each set boundary determined by the previously sent number of rates per set. This function does not create a pipe; it must be created by an external program interfacing with this one. todo: */ void read_pipe (double**& sets, input_params& ip) { // Read how many rates per set will be piped in int num_pars = 0; read_pipe_int(ip.pipe_in, &num_pars); if (num_pars != NUM_RATES) { cout << term->red << "An incorrect number of rates will be piped in! This simulation requires " << NUM_RATES << " rates per set but the sampler is sending " << num_pars << " per set." << term->reset << endl; exit(EXIT_INPUT_ERROR); } // Read how many sets will be piped in int num_sets = 0; read_pipe_int(ip.pipe_in, &num_sets); if (num_sets <= 0) { cout << term->red << "An invalid number of parameter sets will be piped in! The number of sets must be a positive integer but the sampler is sending " << num_sets << "." << term->reset << endl; exit(EXIT_INPUT_ERROR); } ip.num_sets = num_sets; // Read every set and store it as an array of doubles sets = new double*[num_sets]; for (int i = 0; i < num_sets; i++) { sets[i] = new double[NUM_RATES]; read_pipe_set(ip.pipe_in, sets[i]); } } /* read_pipe_int reads an integer from the given pipe and stores it in the given address parameters: fd: the file descriptor identifying the pipe address: the address to store the integer read from the pipe returns: nothing notes: This function assumes that fd identifies a valid pipe end and will exit with an error if it does not. todo: */ void read_pipe_int (int fd, int* address) { if (read(fd, address, sizeof(int)) == -1) { term->failed_pipe_read(); exit(EXIT_PIPE_READ_ERROR); } } /* read_pipe_set reads a parameter set from the given pipe and stores it in the given address parameters: fd: the file descriptor identifying the pipe pars: the array in which to store the set read from the pipe returns: nothing notes: This function assumes that fd identifies a valid pipe end and will exit with an error if it does not. todo: */ void read_pipe_set (int fd, double pars[]) { if (read(fd, pars, sizeof(double) * NUM_RATES) == -1) { term->failed_pipe_read(); exit(EXIT_PIPE_READ_ERROR); } } /* write_pipe writes run scores to a pipe created by a program interacting with this one parameters: score: the array of scores to send ip: the program's input parameters sd: the current simulation's data returns: nothing notes: This function assumes that fd points to a valid pipe and will exit with an error if it does not. todo: */ void write_pipe (double score[], input_params& ip, sim_data& sd) { // Write the maximum possible score an single run can achieve to the pipe write_pipe_double(ip.pipe_out, (sd.no_growth ? sd.max_scores[SEC_POST] : sd.max_score_all)); // Write the scores to the pipe for (int i = 0; i < ip.num_sets; i++) { write_pipe_double(ip.pipe_out, score[i]); } // Close the pipe if (close(ip.pipe_out) == -1) { term->failed_pipe_write(); exit(EXIT_PIPE_WRITE_ERROR); } } /* write_pipe_int writes the given integer to the given pipe parameters: fd: the file descriptor identifying the pipe value: the integer to write to the pipe returns: nothing notes: This function assumes that fd points to a valid pipe and will exit with an error if it does not. todo: */ void write_pipe_double (int fd, double value) { if (write(fd, &value, sizeof(double)) == -1) { term->failed_pipe_write(); exit(EXIT_PIPE_WRITE_ERROR); } }
gpl-3.0
pokebyte/Spark360
app/src/main/java/com/akop/bach/configurations/ProdConfig.java
212
package com.akop.bach.configurations; public class ProdConfig extends AppConfig { @Override public boolean logToConsole() { return false; } @Override public boolean logHttp() { return false; } }
gpl-3.0
helfred/raspberrypi
README.md
59
raspberrypi =========== Raspberry Pi scripts and software
gpl-3.0
MishaUliutin/MuPDF.WinRT
Src/LinkInfoURI.cpp
254
// LinkInfoURI.cpp #include "LinkInfo.h" using namespace MuPDFWinRT; LinkInfoURI::LinkInfoURI(RectF rect, Platform::String^ uri) { m_rect = rect; m_uri = uri; } void LinkInfoURI::AcceptVisitor(LinkInfoVisitor^ visitor) { visitor->VisitURI(this); }
gpl-3.0
jdgarciauc3m/useparpat
src/dotproduct/omp_dotproduct.h
327
#ifndef SEQ_DOTPRODUCT_H #define SEQ_DOTPRODUCT_H #include <vector> double omp_dotproduct(const std::vector<double> & x, const std::vector<double> & y) { double result = 0.0; #pragma omp parallel for reduction(+:result) for (std::size_t i=0; i<x.size(); ++i) { result += x[i] * y[i]; } return result; } #endif
gpl-3.0
lalviarez/thor_hospedaje
site/views/productor/tmpl/default.php
3180
<?php /** * @version $Id: default.php 2013-10-29 * @copyright Copyright (C) 2013 Leonardo Alviarez - Edén Arreaza. All Rights Reserved. * @license GNU General Public License version 3, or later * @note Note : All ini files need to be saved as UTF-8 - No BOM */ defined('_JEXEC') or die; // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT.'/helpers'); JHtml::_('behavior.framework'); JHtml::_('bootstrap.framework'); JHtml::_('bootstrap.framework'); $document = JFactory::getDocument(); $document->addStyleSheet('media/com_thorhospedaje/css/th_productor.css'); $document->addStyleSheet('media/com_thorhospedaje/css/jquery-themes/jquery-ui.min.css'); $document->addStyleSheet(JURI::base().'media/jui/css/chosen.css'); $document->addScript('media/com_thorhospedaje/js/jquery-ui.min.js'); $document->addScript(JURI::base().'media/jui/js/chosen.jquery.js'); ?> <div class="mod_th_productor"> <div class="span3"> <br><br><br /><br /> <img style="width:80%;" src="media/com_thorhospedaje/images/posaderos/te_ofrecemos.png" /> </div> <div class="span9"> <br><br> <div class="row-fluid"> <img src="media/com_thorhospedaje/images/productor/ruta_productor.png" /> </div> <h2><?php echo JText::_('TH_POSADERO_MESSAGE_TITLE'); ?></h2> <p><?php echo JText::_('TH_POSADERO_MESSAGE_P1'); ?></p> <p><?php echo JText::_('TH_POSADERO_MESSAGE_P2'); ?></p> <form action="<?php echo JRoute::_("");?>" method="POST" class="form-inline"> <div class="row-fluid box"> <h2><?php echo JText::_('TH_POSADERO_TITLE_LANGUAGE'); ?></h2> <div class="hr"></div> <div class="row-fluid"> <div class="span6"> <div class="control-label"><label title="" for="client-language"><?php echo JText::_('TH_POSADERO_CLIENT_LANGUAGE_LABEL'); ?></label></div> <div class="controls"> <div class="input-append"> <select name="client-language" id="client-language"> <option value=""><?php echo JText::_('TH_POSADERO_CLIENT_LANGUAGE_SELECT'); ?></option> <option value="1"><?php echo JText::_('TH_POSADERO_CLIENT_LANGUAGE_PT'); ?></option> <option value="2"><?php echo JText::_('TH_POSADERO_CLIENT_LANGUAGE_EN'); ?></option> <option value="3"><?php echo JText::_('TH_POSADERO_CLIENT_LANGUAGE_ES'); ?></option> </select> </div> </div> </div> <div class="span5"> <img src="media/com_thorhospedaje/images/posaderos/tip_ayuda_idioma.png" width="100%"/> </div> </div> </div> <!-- Datos de cliente --> <?php echo $this->loadTemplate('client'); ?> <!-- Dirección --> <?php echo $this->loadTemplate('address'); ?> <!-- Hotel --> <?php echo $this->loadTemplate('asset'); ?> <!-- Hotel --> <?php echo $this->loadTemplate('conditions'); ?> <div class="row-fluid"> <div class="span6"> <a href="index.php/contrate-con-nosotros?id=15" target="_self"> <img style="width:60%; float: left;" src="media/com_thorhospedaje/images/comunes/atras.png" width="60%"/> </a> </div> <div class="span6"> <a href="index.php?option=com_thorhospedaje&view=productor&layout=pay" target="_self"> <img style="width:60%; float: right;" src="media/com_thorhospedaje/images/comunes/siguiente.png" width="60%"/> </a> </div> </div> </form> </div> </div>
gpl-3.0
bozhink/ProcessingTools
src/ProcessingTools/Infrastructure/Contracts/Services.Data/Geo/IPostCodesDataService.cs
263
namespace ProcessingTools.Contracts.Services.Data.Geo { using ProcessingTools.Contracts.Filters.Geo; using ProcessingTools.Contracts.Models.Geo; public interface IPostCodesDataService : IDataServiceAsync<IPostCode, IPostCodesFilter> { } }
gpl-3.0
SaturnSDK/Saturn-SDK-IDE
src/plugins/contrib/headerfixup/defaults.cpp
97104
/* * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3 * http://www.gnu.org/licenses/gpl-3.0.html * * $Revision$ * $Id$ * $HeadURL$ */ #include "bindings.h" #include "globals.h" // ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- void Bindings::SetDefaults() { SetDefaultsCodeBlocks(); SetDefaultsWxWidgets(); SetDefaultsSTL(); SetDefaultsCLibrary(); } void Bindings::SetDefaultsCodeBlocks() { wxString strCodeBlocks = _T( "AbstractJob;backgroundthread.h|" "AddBuildTarget;projectbuildtarget.h|" "AddFile;projectfile.h|" "Agony;backgroundthread.h|" "AnnoyingDialog;annoyingdialog.h|" "AppendArray;globals.h|" "AutoDetectCompilers;autodetectcompilers.h|" "BackgroundThread;backgroundthread.h|" "BackgroundThreadPool;backgroundthread.h|" "BlkAllc;blockallocated.h|" "BlockAllocated;blockallocated.h|" "BlockAllocator;blockallocated.h|" "cbAssert;cbexception.h|" "cbC2U;globals.h|" "cbCodeCompletionPlugin;cbplugin.h|" "cbCompilerPlugin;cbplugin.h|" "cbConfigurationDialog;configurationpanel.h|" "cbConfigurationPanel;configurationpanel.h|" "cbDebuggerPlugin;cbplugin.h|" "cbDirAccessCheck;globals.h|" "cbEditor;cbeditor.h|" "cbEditorPrintout;cbeditorprintout.h|" "cbEventFunctor;cbfunctor.h|" "cbException;cbexception.h|" "cbExecuteProcess;cbexecute.h|" "cbLoadBitmap;globals.h|" "cbMessageBox;globals.h|" "cbMimePlugin;cbplugin.h|" "cbPlugin;cbplugin.h|" "cbProject;cbproject.h|" "cbRead;globals.h|" "cbReadFileContents;globals.h|" "cbSaveTinyXMLDocument;globals.h|" "cbSaveToFile;globals.h|" "cbStyledTextCtrl;cbeditor.h|" "cbSyncExecute;cbexecute.h|" "cbThreadedTask;cbthreadtask.h|" "cbThreadPool;cbthreadpool.h|" "cbThrow;cbexception.h|" "cbTool;cbtool.h|" "cbToolPlugin;cbplugin.h|" "cbU2C;globals.h|" "cbWizardPlugin;cbplugin.h|" "cbWorkerThread;cbthreadpool_extras.h|" "cbWorkspace;cbworkspace.h|" "cbWrite;globals.h|" "CfgMgrBldr;configmanager.h|" "cgCompiler;cbplugin.h|" "cgContribPlugin;cbplugin.h|" "cgCorePlugin;cbplugin.h|" "cgEditor;cbplugin.h|" "cgUnknown;cbplugin.h|" "ChooseDirectory;globals.h|" "clogFull;compiler.h|" "clogNone;compiler.h|" "clogSimple;compiler.h|" "cltError;compiler.h|" "cltInfo;compiler.h|" "cltNormal;compiler.h|" "cltWarning;compiler.h|" "CodeBlocksDockEvent;sdk_events.h|" "CodeBlocksEvent;sdk_events.h|" "CodeBlocksLayoutEvent;sdk_events.h|" "CodeBlocksLogEvent;sdk_events.h|" "CompileOptionsBase;compileoptionsbase.h|" "Compiler;compiler.h|" "CompilerCommandGenerator;compilercommandgenerator.h|" "CompilerFactory;compilerfactory.h|" "CompilerOptions;compileroptions.h|" "CompilerPrograms;compiler.h|" "CompilerSwitches;compiler.h|" "CompilerTool;compiler.h|" "CompilerToolsVector;compiler.h|" "CompileTargetBase;compiletargetbase.h|" "CompOption;compileroptions.h|" "ConfigManager;configmanager.h|" "ConfigureToolsDlg;configuretoolsdlg.h|" "ConfigManagerContainer;configmanager.h|" "ConfirmReplaceDlg;confirmreplacedlg.h|" "CreateDir;globals.h|" "CreateDirRecursively;globals.h|" "CSS;loggers.h|" "Death;backgroundthread.h|" "DelayedDelete;filemanager.h|" "DetectEncodingAndConvert;globals.h|" "DuplicateBuildTarget;projectbuildtarget.h|" "EditArrayFileDlg;editarrayfiledlg.h|" "EditArrayOrderDlg;editarrayorderdlg.h|" "EditArrayStringDlg;editarraystringdlg.h|" "EditKeywordsDlg;editkeywordsdlg.h|" "EditorBase;editorbase.h|" "EditorColourSet;editorcolourset.h|" "EditorConfigurationDlg;editorconfigurationdlg.h|" "EditorHooks;editor_hooks.h|" "EditorLexerLoader;editorlexerloader.h|" "EditorManager;editormanager.h|" "EditPairDlg;editpairdlg.h|" "EditPathDlg;editpathdlg.h|" "EditToolDlg;edittooldlg.h|" "EncodingDetector;encodingdetector.h|" "ExternalDepsDlg;externaldepsdlg.h|" "FileGroups;filegroupsandmasks.h|" "FileLoader;filemanager.h|" "FileLogger;loggers.h|" "FileManager;filemanager.h|" "FileSet;projecttemplateloader.h|" "FileSetFile;projecttemplateloader.h|" "FilesGroupsAndMasks;filegroupsandmasks.h|" "FileTreeData;cbproject.h|" "FileType;globals.h|" "FileTypeOf;globals.h|" "FindDlg;finddlg.h|" "FindReplaceBase;findreplacebase.h|" "GenericMultiLineNotesDlg;genericmultilinenotesdlg.h|" "GetActiveEditor;editorbase.h|" "GetActiveProject;cbproject.h|" "GetArrayFromString;globals.h|" "GetBuiltinActiveEditor;cbeditor.h|" "GetBuiltinEditor;cbeditor.h|" "GetBuildTarget;projectbuildtarget.h|" "GetColourSet;editorcolourset.h|" "GetConfigManager;configmanager.h|" "GetConfigurationPanel;configurationpanel.h|" "GetCurrentlyCompilingTarget;projectbuildtarget.h|" "GetEditor;editorbase.h|" "GetEditorManager;editormanager.h|" "GetFile;projectfile.h|" "GetFileByFilename;projectfile.h|" "GetFileManager;filemanager.h|" "GetLogManager;logmanager.h|" "GetMacrosManager;macrosmanager.h|" "GetMessageManager;messagemanager.h|" "GetNotebook;wx/wxFlatNotebook/wxFlatNotebook.h|" "GetParentProject;cbproject.h|" "GetPersonalityManager;personalitymanager.h|" "GetPlatformsFromString;globals.h|" "GetPluginManager;pluginmanager.h|" "GetProjectConfigurationPanel;configurationpanel.h|" "GetProjectFile;projectfile.h|" "GetProjectManager;projectmanager.h|" "GetProjects;cbproject.h|" "GetScriptingManager;scriptingmanager.h|" "GetStringFromArray;globals.h|" "GetStringFromPlatforms;globals.h|" "GetToolsManager;toolsmanager.h|" "GetTopEditor;gettopeditor.h|" "GetUserVariableManager;uservarmanager.h|" "GetWorkspace;cbworkspace.h|" "HTMLFileLogger;loggers.h|" "IBaseLoader;ibaseloader.h|" "IBaseWorkspaceLoader;ibaseworkspaceloader.h|" "ID;id.h|" "IEventFunctorBase;cbfunctor.h|" "IFunctorBase;cbfunctor.h|" "ImportersGlobals;importer_globals.h|" "IncrementalSelectListDlg;incrementalselectlistdlg.h|" "InfoWindow;infowindow.h|" "IsBuiltinOpen;cbeditor.h|" "ISerializable;configmanager.h|" "IsOpen;cbproject.h|" "IsWindowReallyShown;globals.h|" "JobQueue;backgroundthread.h|" "FileLoader;filemanager.h|" "FileTreeData;cbproject.h|" "ListCtrlLogger;loggers.h|" "LoaderBase;filemanager.h|" "LoadPNGWindows2000Hack;globals.h|" "LoadProject;cbproject.h|" "Logger;logger.h|" "LogManager;logmanager.h|" "LogSlot;logmanager.h|" "MacrosManager;macrosmanager.h|" "MakeCommand;compiletargetbase.h|" "ManagedThread;managerthread.h|" "Manager;manager.h|" "MenuItemsManager;menuitemsmanager.h|" "MessageManager;messagemanager.h|" "Mgr;manager.h|" "MiscTreeItemData;misctreeitemdata.h|" "MultiSelectDlg;multiselectdlg.h|" "NewFromTemplateDlg;newfromtemplatedlg.h|" "NewProject;cbproject.h|" "NormalizePath;globals.h|" "NotifyMissingFile;globals.h|" "NullLoader;filemanager.h|" "NullLogger;logger.h|" "OptionColour;editorcolourset.h|" "OptionSet;editorcolourset.h|" "PCHMode;cbproject.h|" "pchObjectDir;cbproject.h|" "pchSourceDir;cbproject.h|" "pchSourceFile;cbproject.h|" "PlaceWindow;globals.h|" "PersonalityManager;personalitymanager.h|" "pfCustomBuild;projectfile.h|" "pfDetails;projectfile.h|" "PipedProcess;pipedprocess.h|" "PluginElement;pluginmanager.h|" "PluginInfo;pluginmanager.h|" "PluginManager;pluginmanager.h|" "PluginRegistrant;cbplugin.h|" "PluginsConfigurationDlg;pluginsconfigurationdlg.h|" "PluginType;globals.h|" "ProjectBuildTarget;projectbuildtarget.h|" "ProjectDepsDlg;projectdepsdlg.h|" "ProjectFile;projectfile.h|" "ProjectFileOptionsDlg;projectfileoptionsdlg.h|" "ProjectFilesVector;projectfile.h|" "ProjectLayoutLoader;projectlayoutloader.h|" "ProjectLoader;projectloader.h|" "ProjectLoaderHooks;projectloader_hooks.h|" "ProjectManager;projectmanager.h|" "ProjectOptionsDlg;projectoptionsdlg.h|" "ProjectsFileMasksDlg;projectsfilemasksdlg.h|" "ProjectTemplateLoader;projecttemplateloader.h|" "ptCodeCompletion;globals.h|" "ptCompiler;globals.h|" "ptDebugger;globals.h|" "ptMime;globals.h|" "ptNone;globals.h|" "ptOther;globals.h|" "ptTool;globals.h|" "ptWizard;globals.h|" "QuoteStringIfNeeded;globals.h|" "RegExStruct;compiler.h|" "ReplaceDlg;replacedlg.h|" "RestoreTreeState;globals.h|" "SaveTreeState;globals.h|" "ScriptingManager;scriptingmanager.h|" "ScriptSecurityWarningDlg;scriptsecuritywarningdlg.h|" "sdAllGlobal;configmanager.h|" "sdAllKnown;configmanager.h|" "sdAllUser;configmanager.h|" "sdBase;configmanager.h|" "sdConfig;configmanager.h|" "sdCurrent;configmanager.h|" "sdDataGlobal;configmanager.h|" "sdDataUser;configmanager.h|" "sdHome;configmanager.h|" "sdPath;configmanager.h|" "sdPluginsGlobal;configmanager.h|" "sdPluginsUser;configmanager.h|" "sdScriptsGlobal;configmanager.h|" "sdScriptsUser;configmanager.h|" "sdTemp;configmanager.h|" "SearchDirs;configmanager.h|" "SearchResultsLog;searchresultslog.h|" "SelectTargetDlg;selecttargetdlg.h|" "SeqDelete;safedelete.h|" "Stacker;infowindow.h|" "StdoutLogger;loggers.h|" "TemplateManager;templatemanager.h|" "TemplateOption;projecttemplateloader.h|" "TextCtrlLogger;loggers.h|" "TimestampTextCtrlLogger;loggers.h|" "ToolsManager;toolsmanager.h|" "ttCommandsOnly;compiletargetbase.h|" "ttConsoleOnly;compiletargetbase.h|" "ttDynamicLib;compiletargetbase.h|" "ttExecutable;compiletargetbase.h|" "ttNative;compiletargetbase.h|" "ttStaticLib;compiletargetbase.h|" "UnixFilename;globals.h|" "URLEncode;globals.h|" "URLLoader;filemanager.h|" "UsesCommonControls6;globals.h|" "UserVariableManager;uservarmanager.h|" "VirtualBuildTargetsDlg;virtualbuildtargetsdlg.h|" "WorkspaceLoader;workspaceloader.h|" "wxToolBarAddOnXmlHandler;xtra_res.h|" "wxBase64;base64.h|" "wxCrc32;crc32.h"); const wxArrayString arCodeBlocks = GetArrayFromString(strCodeBlocks, _T("|")); for(std::size_t i = 0; i < arCodeBlocks.GetCount(); ++i) { const wxArrayString arTmp = GetArrayFromString(arCodeBlocks.Item(i), _T(";")); AddBinding(_T("CodeBlocks"), arTmp.Item(0), arTmp.Item(1) ); } }// SetDefaultsCodeBlocks void Bindings::SetDefaultsWxWidgets() { ///////////// // v 2.6.4 // ///////////// // All macros wxString strWxWidgets_2_6_4 = _T( "DECLARE_APP;wx/app.h|" "DECLARE_CLASS;wx/object.h|" "DECLARE_ABSTRACT_CLASS;wx/object.h|" "DECLARE_DYNAMIC_CLASS;wx/object.h|" "DECLARE_EVENT_TYPE;wx/event.h|" "DECLARE_EVENT_MACRO;wx/event.h|" "DECLARE_EVENT_TABLE_ENTRY;wx/event.h|" "IMPLEMENT_APP;wx/app.h|" "IMPLEMENT_ABSTRACT_CLASS;wx/object.h|" "IMPLEMENT_ABSTRACT_CLASS2;wx/object.h|" "IMPLEMENT_CLASS;wx/object.h|" "IMPLEMENT_CLASS2;wx/object.h|" "IMPLEMENT_DYNAMIC_CLASS;wx/object.h|" "IMPLEMENT_DYNAMIC_CLASS2;wx/object.h|" "DEFINE_EVENT_TYPE;wx/event.h|" "BEGIN_EVENT_TABLE;wx/event.h|" "END_EVENT_TABLE;wx/event.h|" "EVT_CUSTOM;wx/event.h|" "EVT_CUSTOM_RANGE;wx/event.h|" "EVT_COMMAND;wx/event.h|" "EVT_COMMAND_RANGE;wx/event.h|" "EVT_NOTIFY;wx/event.h|" "EVT_NOTIFY_RANGE;wx/event.h|" "EVT_BUTTON;wx/button.h|" "EVT_CHECKBOX;wx/checkbox.h|" "EVT_CHOICE;wx/choice.h|" "EVT_CHOICE;wx/choice.h|" "EVT_COMBOBOX;wx/combobox.h|" "EVT_LISTBOX;wx/listbox.h|" "EVT_LISTBOX_DCLICK;wx/listbox.h|" "EVT_RADIOBOX;wx/radiobox.h|" "EVT_RADIOBUTTON;wx/radiobut.h|" "EVT_SCROLLBAR;wx/scrolbar.h|" "EVT_SLIDER;wx/slider.h|" "EVT_TOGGLEBUTTON;wx/tglbtn.h|" "WX_APPEND_ARRAY;wx/dynarray.h|" "WX_CLEAR_ARRAY;wx/dynarray.h|" "WX_DECLARE_OBJARRAY;wx/dynarray.h|" "WX_DEFINE_ARRAY;wx/dynarray.h|" "WX_DEFINE_OBJARRAY;wx/dynarray.h|" "WX_DEFINE_SORTED_ARRAY;wx/dynarray.h|" "WX_DECLARE_STRING_HASH_MAP;wx/hashmap.h|" "WX_DECLARE_HASH_MAP;wx/hashmap.h|" "wxASSERT;wx/debug.h|" "wxASSERT_MIN_BITSIZE;wx/debug.h|" "wxASSERT_MSG;wx/debug.h|" "wxBITMAP;wx/gdicmn.h|" "wxCOMPILE_TIME_ASSERT;wx/debug.h|" "wxCOMPILE_TIME_ASSERT2;wx/debug.h|" "wxCRIT_SECT_DECLARE;wx/thread.h|" "wxCRIT_SECT_DECLARE_MEMBER;wx/thread.h|" "wxCRIT_SECT_LOCKER;wx/thread.h|" "wxDYNLIB_FUNCTION;wx/dynlib.h|" "wxENTER_CRIT_SECT;wx/thread.h|" "wxFAIL;wx/debug.h|" "wxFAIL_MSG;wx/debug.h|" "wxICON;wx/gdicmn.h|" "wxLEAVE_CRIT_SECT;wx/thread.h|" "wxLL;wx/longlong.h|" "wxTRANSLATE;wx/intl.h|" "wxULL;wx/longlong.h|" // All ::wx methods "wxBeginBusyCursor;wx/utils.h|" "wxBell;wx/utils.h|" "wxClientDisplayRect;wx/gdicmn.h|" "wxClipboardOpen;wx/clipbrd.h|" "wxCloseClipboard;wx/clipbrd.h|" "wxColourDisplay;wx/gdicmn.h|" "wxConcatFiles;wx/filefn.h|" "wxCopyFile;wx/filefn.h|" "wxCreateDynamicObject;wx/object.h|" "wxCreateFileTipProvider;wx/tipdlg.h|" "wxDDECleanUp;wx/dde.h|" "wxDDEInitialize;wx/dde.h|" "wxDebugMsg;wx/utils.h|" "wxDirExists;wx/filefn.h|" "wxDirSelector;wx/dirdlg.h|" "wxDisplayDepth;wx/gdicmn.h|" "wxDisplaySize;wx/gdicmn.h|" "wxDisplaySizeMM;wx/gdicmn.h|" "wxDos2UnixFilename;wx/filefn.h|" "wxDROP_ICON;wx/dnd.h|" "wxEmptyClipboard;wx/clipbrd.h|" "wxEnableTopLevelWindows;wx/utils.h|" "wxEndBusyCursor;wx/utils.h|" "wxEntry;wx/app.h|" "wxEnumClipboardFormats;wx/clipbrd.h|" "wxError;wx/utils.h|" "wxExecute;wx/utils.h|" "wxExit;wx/app.h|" "wxFatalError;wx/utils.h|" "wxFileExists;wx/filefn.h|" "wxFileModificationTime;wx/filefn.h|" "wxFileNameFromPath;wx/filefn.h|" "wxFileSelector;wx/filedlg.h|" "wxFindFirstFile;wx/filefn.h|" "wxFindMenuItemId;wx/utils.h|" "wxFindNextFile;wx/filefn.h|" "wxFindWindowAtPoint;wx/utils.h|" "wxFindWindowAtPointer;wx/windows.h|" "wxFindWindowByLabel;wx/utils.h|" "wxFindWindowByName;wx/utils.h|" "wxGetActiveWindow;wx/windows.h|" "wxGetApp;wx/app.h|" "wxGetBatteryState;wx/utils.h|" "wxGetClipboardData;wx/clipbrd.h|" "wxGetClipboardFormatName;wx/clipbrd.h|" "wxGetColourFromUser;wx/colordlg.h|" "wxGetCwd;wx/filefn.h|" "wxGetDiskSpace;wx/filefn.h|" "wxGetDisplayName;wx/utils.h|" "wxGetElapsedTime;wx/timer.h|" "wxGetEmailAddress;wx/utils.h|" "wxGetFileKind;wx/filefn.h|" "wxGetFontFromUser;wx/fontdlg.h|" "wxGetFreeMemory;wx/utils.h|" "wxGetFullHostName;wx/utils.h|" "wxGetHomeDir;wx/utils.h|" "wxGetHostName;wx/utils.h|" "wxGetKeyState;wx/utils.h|" "wxGetLocalTime;wx/timer.h|" "wxGetLocalTimeMillis;wx/timer.h|" "wxGetMousePosition;wx/utils.h|" "wxGetMouseState;wx/utils.h|" "wxGetMultipleChoice;wx/choicdlg.h|" "wxGetMultipleChoices;wx/choicdlg.h|" "wxGetNumberFromUser;wx/numdlg.h|" "wxGetOsDescription;wx/utils.h|" "wxGetOSDirectory;wx/filefn.h|" "wxGetOsVersion;wx/utils.h|" "wxGetPasswordFromUser;wx/textdlg.h|" "wxGetPowerType;wx/utils.h|" "wxGetPrinterCommand;wx/dcps.h|" "wxGetPrinterFile;wx/dcps.h|" "wxGetPrinterMode;wx/dcps.h|" "wxGetPrinterOptions;wx/dcps.h|" "wxGetPrinterOrientation;wx/dcps.h|" "wxGetPrinterPreviewCommand;wx/dcps.h|" "wxGetPrinterScaling;wx/dcps.h|" "wxGetPrinterTranslation;wx/dcps.h|" "wxGetProcessId;wx/utils.h|" "wxGetResource;wx/utils.h|" "wxGetSingleChoice;wx/choicdlg.h|" "wxGetSingleChoiceData;wx/choicdlg.h|" "wxGetSingleChoiceIndex;wx/choicdlg.h|" "wxGetStockLabel;wx/stockitem.h|" "wxGetTempFileName;wx/filefn.h|" "wxGetTextFromUser;wx/textdlg.h|" "wxGetTopLevelParent;wx/window.h|" "wxGetTranslation;wx/intl.h|" "wxGetUserHome;wx/utils.h|" "wxGetUserId;wx/utils.h|" "wxGetUserName;wx/utils.h|" "wxGetUTCTime;wx/timer.h|" "wxGetWorkingDirectory;wx/filefn.h|" "wxHandleFatalExceptions;wx/app.h|" "wxInitAllImageHandlers;wx/image.h|" "wxInitialize;wx/app.h|" "wxIsAbsolutePath;wx/filefn.h|" "wxIsBusy;wx/utils.h|" "wxIsClipboardFormatAvailable;wx/clipbrd.h|" "wxIsDebuggerRunning;wx/debug.h|" "wxIsEmpty;wx/wxchar.h|" "wxIsMainThread;wx/thread.h|" "wxIsWild;wx/filefn.h|" "wxKill;wx/app.h|" "wxLaunchDefaultBrowser;wx/utils.h|" "wxLoadUserResource;wx/utils.h|" "wxLogDebug;wx/log.h|" "wxLogError;wx/log.h|" "wxLogFatalError;wx/log.h|" "wxLogMessage;wx/log.h|" "wxLogStatus;wx/log.h|" "wxLogSysError;wx/log.h|" "wxLogTrace;wx/log.h|" "wxLogVerbose;wx/log.h|" "wxLogWarning;wx/log.h|" "wxMakeMetafilePlaceable;wx/gdicmn.h|" "wxMatchWild;wx/filefn.h|" "wxMessageBox;wx/msgdlg.h|" "wxMicroSleep;wx/utils.h|" "wxMilliSleep;wx/utils.h|" "wxMkdir;wx/filefn.h|" "wxMutexGuiEnter;wx/thread.h|" "wxMutexGuiLeave;wx/thread.h|" "wxNewId;wx/utils.h|" "wxNow;wx/utils.h|" "wxOnAssert;wx/debug.h|" "wxOpenClipboard;wx/clipbrd.h|" "wxParseCommonDialogsFilter;wx/filefn.h|" "wxPathOnly;wx/filefn.h|" "wxPostDelete;wx/utils.h|" "wxPostEvent;wx/app.h|" "wxRegisterClipboardFormat;wx/clipbrd.h|" "wxRegisterId;wx/utils.h|" "wxRemoveFile;wx/filefn.h|" "wxRenameFile;wx/filefn.h|" "wxRmdir;wx/filefn.h|" "wxSafeShowMessage;wx/log.h|" "wxSafeYield;wx/utils.h|" "wxSetClipboardData;wx/clipbrd.h|" "wxSetCursor;wx/gdicmn.h|" "wxSetDisplayName;wx/utils.h|" "wxSetPrinterCommand;wx/dcps.h|" "wxSetPrinterFile;wx/dcps.h|" "wxSetPrinterMode;wx/dcps.h|" "wxSetPrinterOptions;wx/dcps.h|" "wxSetPrinterOrientation;wx/dcps.h|" "wxSetPrinterPreviewCommand;wx/dcps.h|" "wxSetPrinterScaling;wx/dcps.h|" "wxSetPrinterTranslation;wx/dcps.h|" "wxSetWorkingDirectory;wx/filefn.h|" "wxShell;wx/utils.h|" "wxShowTip;wx/tipdlg.h|" "wxShutdown;wx/utils.h|" "wxSleep;wx/utils.h|" "wxSnprintf;wx/wxchar.h|" "wxSplitPath;wx/filefn.h|" "wxStartTimer;wx/timer.h|" "wxStrcmp;wx/wxchar.h|" "wxStricmp;wx/wxchar.h|" "wxStringEq;wx/utils.h|" "wxStripMenuCodes;wx/utils.h|" "wxStrlen;wx/wxchar.h|" "wxSysErrorCode;wx/log.h|" "wxSysErrorMsg;wx/log.h|" "wxTrace;wx/memory.h|" "wxTraceLevel;wx/memory.h|" "wxTransferFileToStream;wx/docview.h|" "wxTransferStreamToFile;wx/docview.h|" "wxTrap;wx/debug.h|" "wxUninitialize;wx/app.h|" "wxUnix2DosFilename;wx/filefn.h|" "wxUsleep;wx/utils.h|" "wxVsnprintf;wx/wxchar.h|" "wxWakeUpIdle;wx/app.h|" "wxWriteResource;wx/utils.h|" "wxYield;wx/app.h|" // All ::wx classes "wxAcceleratorEntry;wx/accel.h|" "wxAcceleratorTable;wx/accel.h|" "wxAccessible;wx/access.h|" "wxActivateEvent;wx/event.h|" "wxApp;wx/app.h|" "wxArchiveClassFactory;wx/archive.h|" "wxArchiveEntry;wx/archive.h|" "wxArchiveInputStream;wx/archive.h|" "wxArchiveIterator;wx/archive.h|" "wxArchiveNotifier;wx/archive.h|" "wxArchiveOutputStream;wx/archive.h|" "wxArray;wx/dynarray.h|" "wxArrayString;wx/arrstr.h|" "wxArtProvider;wx/artprov.h|" "wxAutomationObject;wx/msw/ole/automtn.h|" "wxBitmap;wx/bitmap.h|" "wxBitmapButton;wx/bmpbuttn.h|" "wxBitmapDataObject;wx/dataobj.h|" "wxBitmapHandler;wx/bitmap.h|" "wxBoxSizer;wx/sizer.h|" "wxBrush;wx/brush.h|" "wxBrushList;wx/gdicmn.h|" "wxBufferedDC;wx/dcbuffer.h|" "wxBufferedInputStream;wx/stream.h|" "wxBufferedOutputStream;wx/stream.h|" "wxBufferedPaintDC;wx/dcbuffer.h|" "wxBusyCursor;wx/utils.h|" "wxBusyInfo;wx/busyinfo.h|" "wxButton;wx/button.h|" "wxCalculateLayoutEvent;wx/laywin.h|" "wxCalendarCtrl;wx/calctrl.h|" "wxCalendarDateAttr;wx/calctrl.h|" "wxCalendarEvent;wx/calctrl.h|" "wxCaret;wx/caret.h|" "wxCheckBox;wx/checkbox.h|" "wxCheckListBox;wx/checklst.h|" "wxChoice;wx/choice.h|" "wxChoicebook;wx/choicebk.h|" "wxClassInfo;wx/object.h|" "wxClient;wx/ipc.h|" "wxClientData;wx/clntdata.h|" "wxClientDataContainer;wx/clntdata.h|" "wxClientDC;wx/dcclient.h|" "wxClipboard;wx/clipbrd.h|" "wxCloseEvent;wx/event.h|" "wxCmdLineParser;wx/cmdline.h|" "wxColour;wx/colour.h|" "wxColourData;wx/cmndata.h|" "wxColourDatabase;wx/gdicmn.h|" "wxColourDialog;wx/colordlg.h|" "wxComboBox;wx/combobox.h|" "wxCommand;wx/cmdproc.h|" "wxCommandEvent;wx/event.h|" "wxCommandProcessor;wx/cmdproc.h|" "wxCondition;wx/thread.h|" "wxConfigBase;wx/config.h|" "wxConnection;wx/ipc.h|" "wxContextHelp;wx/cshelp.h|" "wxContextHelpButton;wx/cshelp.h|" "wxContextMenuEvent;wx/event.h|" "wxControl;wx/control.h|" "wxControlWithItems;wx/ctrlsub.h|" "wxCountingOutputStream;wx/stream.h|" "wxCriticalSection;wx/thread.h|" "wxCriticalSectionLocker;wx/thread.h|" "wxCSConv;wx/strconv.h|" "wxCurrentTipProvider;wx/tipdlg.h|" "wxCursor;wx/cursor.h|" "wxCustomDataObject;wx/dataobj.h|" "wxDataFormat;wx/dataobj.h|" "wxDataInputStream;wx/datstrm.h|" "wxDataObject;wx/dataobj.h|" "wxDataObjectComposite;wx/dataobj.h|" "wxDataObjectSimple;wx/dataobj.h|" "wxDataOutputStream;wx/datstrm.h|" "wxDateEvent;wx/dateevt.h|" "wxDatePickerCtrl;wx/datectrl.h|" "wxDateSpan;wx/datetime.h|" "wxDateTime;wx/datetime.h|" "wxDb;wx/db.h|" "wxDbColDataPtr;wx/db.h|" "wxDbColDef;wx/db.h|" "wxDbColFor;wx/db.h|" "wxDbColInf;wx/db.h|" "wxDbConnectInf;wx/db.h|" "wxDbGridColInfo;wx/dbgrid.h|" "wxDbGridTableBase;wx/dbgrid.h|" "wxDbIdxDef;wx/db.h|" "wxDbInf;wx/db.h|" "wxDbTable;wx/dbtable.h|" "wxDbTableInf;wx/db.h|" "wxDC;wx/dc.h|" "wxDCClipper;wx/dc.h|" "wxDDEClient;wx/dde.h|" "wxDDEConnection;wx/dde.h|" "wxDDEServer;wx/dde.h|" "wxDebugContext;wx/memory.h|" "wxDebugReport;wx/debugrpt.h|" "wxDebugReportCompress;wx/debugrpt.h|" "wxDebugReportPreview;wx/debugrpt.h|" "wxDebugReportUpload;wx/debugrpt.h|" "wxDebugStreamBuf;wx/memory.h|" "wxDelegateRendererNative;wx/renderer.h|" "wxDialog;wx/dialog.h|" "wxDialUpEvent;wx/dialup.h|" "wxDialUpManager;wx/dialup.h|" "wxDir;wx/dir.h|" "wxDirDialog;wx/dirdlg.h|" "wxDirTraverser;wx/dir.h|" "wxDisplay;wx/display.h|" "wxDllLoader;wx/dynlib.h|" "wxDocChildFrame;wx/docview.h|" "wxDocManager;wx/docview.h|" "wxDocMDIChildFrame;wx/docmdi.h|" "wxDocMDIParentFrame;wx/docmdi.h|" "wxDocParentFrame;wx/docview.h|" "wxDocTemplate;wx/docview.h|" "wxDocument;wx/docview.h|" "wxDragImage;wx/dragimag.h|" "wxDragResult;wx/dnd.h|" "wxDropFilesEvent;wx/event.h|" "wxDropSource;wx/dnd.h|" "wxDropTarget;wx/dnd.h|" "wxDynamicLibrary;wx/dynlib.h|" "wxDynamicLibraryDetails;wx/dynlib.h|" "wxEncodingConverter;wx/encconv.h|" "wxEraseEvent;wx/event.h|" "wxEvent;wx/event.h|" "wxEvtHandler;wx/event.h|" "wxFFile;wx/ffile.h|" "wxFFileInputStream;wx/wfstream.h|" "wxFFileOutputStream;wx/wfstream.h|" "wxFFileStream;wx/wfstream.h|" "wxFile;wx/file.h|" "wxFileConfig;wx/fileconf.h|" "wxFileDataObject;wx/dataobj.h|" "wxFileDialog;wx/filedlg.h|" "wxFileDropTarget;wx/dnd.h|" "wxFileHistory;wx/docview.h|" "wxFileInputStream;wx/wfstream.h|" "wxFileName;wx/filename.h|" "wxFileOutputStream;wx/wfstream.h|" "wxFileStream;wx/wfstream.h|" "wxFileSystem;wx/filesys.h|" "wxFileSystemHandler;wx/filesys.h|" "wxFileType;wx/mimetype.h|" "wxFilterInputStream;wx/stream.h|" "wxFilterOutputStream;wx/stream.h|" "wxFindDialogEvent;wx/fdrepdlg.h|" "wxFindReplaceData;wx/fdrepdlg.h|" "wxFindReplaceDialog;wx/fdrepdlg.h|" "wxFinite;wx/math.h|" "wxFlexGridSizer;wx/sizer.h|" "wxFocusEvent;wx/event.h|" "wxFont;wx/font.h|" "wxFontData;wx/cmndata.h|" "wxFontDialog;wx/fontdlg.h|" "wxFontEnumerator;wx/fontenum.h|" "wxFontList;wx/gdicmn.h|" "wxFontMapper;wx/fontmap.h|" "wxFrame;wx/frame.h|" "wxFSFile;wx/filesys.h|" "wxFTP;wx/protocol/ftp.h|" "wxGauge;wx/gauge.h|" "wxGBPosition;wx/gbsizer.h|" "wxGBSizerItem;wx/gbsizer.h|" "wxGBSpan;wx/gbsizer.h|" "wxGDIObject;wx/gdiobj.h|" "wxGenericDirCtrl;wx/dirctrl.h|" "wxGenericValidator;wx/valgen.h|" "wxGetenv;wx/utils.h|" "wxGetVariantCast;wx/variant.h|" "wxGLCanvas;wx/glcanvas.h|" "wxGLContext;wx/glcanvas.h|" "wxGrid;wx/grid.h|" "wxGridBagSizer;wx/gbsizer.h|" "wxGridCellAttr;wx/grid.h|" "wxGridCellBoolEditor;wx/grid.h|" "wxGridCellBoolRenderer;wx/grid.h|" "wxGridCellChoiceEditor;wx/grid.h|" "wxGridCellEditor;wx/grid.h|" "wxGridCellFloatEditor;wx/grid.h|" "wxGridCellFloatRenderer;wx/grid.h|" "wxGridCellNumberEditor;wx/grid.h|" "wxGridCellNumberRenderer;wx/grid.h|" "wxGridCellRenderer;wx/grid.h|" "wxGridCellStringRenderer;wx/grid.h|" "wxGridCellTextEditor;wx/grid.h|" "wxGridEditorCreatedEvent;wx/grid.h|" "wxGridEvent;wx/grid.h|" "wxGridRangeSelectEvent;wx/grid.h|" "wxGridSizeEvent;wx/grid.h|" "wxGridSizer;wx/sizer.h|" "wxGridTableBase;wx/grid.h|" "wxHashMap;wx/hashmap.h|" "wxHashSet;wx/hashset.h|" "wxHashTable;wx/hash.h|" "wxHelpController;wx/help.h|" "wxHelpControllerHelpProvider;wx/cshelp.h|" "wxHelpEvent;wx/event.h|" "wxHelpProvider;wx/cshelp.h|" "wxHtmlCell;wx/html/htmlcell.h|" "wxHtmlColourCell;wx/html/htmlcell.h|" "wxHtmlContainerCell;wx/html/htmlcell.h|" "wxHtmlDCRenderer;wx/html/htmprint.h|" "wxHtmlEasyPrinting;wx/html/htmprint.h|" "wxHtmlFilter;wx/html/htmlfilt.h|" "wxHtmlHelpController;wx/html/helpctrl.h|" "wxHtmlHelpData;wx/html/helpdata.h|" "wxHtmlHelpFrame;wx/html/helpfrm.h|" "wxHtmlLinkInfo;wx/html/htmlcell.h|" "wxHtmlListBox;wx/htmllbox.h|" "wxHtmlParser;wx/html/htmlpars.h|" "wxHtmlPrintout;wx/html/htmprint.h|" "wxHtmlTag;wx/html/htmltag.h|" "wxHtmlTagHandler;wx/html/htmlpars.h|" "wxHtmlTagsModule;wx/html/winpars.h|" "wxHtmlWidgetCell;wx/html/htmlcell.h|" "wxHtmlWindow;wx/html/htmlwin.h|" "wxHtmlWinParser;wx/html/winpars.h|" "wxHtmlWinTagHandler;wx/html/winpars.h|" "wxHTTP;wx/protocol/http.h|" "wxIcon;wx/icon.h|" "wxIconBundle;wx/iconbndl.h|" "wxIconizeEvent;wx/event.h|" "wxIconLocation;wx/iconloc.h|" "wxIdleEvent;wx/event.h|" "wxImage;wx/image.h|" "wxImageHandler;wx/image.h|" "wxImageList;wx/imaglist.h|" "wxIndividualLayoutConstraint;wx/layout.h|" "wxInitDialogEvent;wx/event.h|" "wxInputStream;wx/stream.h|" "wxIPaddress;wx/socket.h|" "wxIPV4address;wx/socket.h|" "wxIsNaN;wx/math.h|" "wxJoystick;wx/joystick.h|" "wxJoystickEvent;wx/event.h|" "wxKeyEvent;wx/event.h|" "wxLayoutAlgorithm;wx/laywin.h|" "wxLayoutConstraints;wx/layout.h|" "wxList;wx/list.h|" "wxListbook;wx/listbook.h|" "wxListCtrl;wx/listctrl.h|" "wxListEvent;wx/listctrl.h|" "wxListItem;wx/listctrl.h|" "wxListItemAttr;wx/listctrl.h|" "wxListView;wx/listctrl.h|" "wxLocale;wx/intl.h|" "wxLog;wx/log.h|" "wxLogChain;wx/log.h|" "wxLogGui;wx/log.h|" "wxLogNull;wx/log.h|" "wxLogPassThrough;wx/log.h|" "wxLogStderr;wx/log.h|" "wxLogStream;wx/log.h|" "wxLogTextCtrl;wx/log.h|" "wxLogWindow;wx/log.h|" "wxLongLong;wx/longlong.h|" "wxLongLongFmtSpec;wx/longlong.h|" "wxMask;wx/bitmap.h|" "wxMaximizeEvent;wx/event.h|" "wxMBConv;wx/strconv.h|" "wxMBConvFile;wx/strconv.h|" "wxMBConvUTF16;wx/strconv.h|" "wxMBConvUTF32;wx/strconv.h|" "wxMBConvUTF7;wx/strconv.h|" "wxMBConvUTF8;wx/strconv.h|" "wxMDIChildFrame;wx/mdi.h|" "wxMDIClientWindow;wx/mdi.h|" "wxMDIParentFrame;wx/mdi.h|" "wxMediaCtrl;wx/mediactrl.h|" "wxMediaEvent;wx/mediactrl.h|" "wxMemoryBuffer;wx/buffer.h|" "wxMemoryDC;wx/dcmemory.h|" "wxMemoryFSHandler;wx/fs_mem.h|" "wxMemoryInputStream;wx/mstream.h|" "wxMemoryOutputStream;wx/mstream.h|" "wxMenu;wx/menu.h|" "wxMenuBar;wx/menu.h|" "wxMenuEvent;wx/event.h|" "wxMenuItem;wx/menuitem.h|" "wxMessageDialog;wx/msgdlg.h|" "wxMetafile;wx/metafile.h|" "wxMetafileDC;wx/metafile.h|" "wxMimeTypesManager;wx/mimetype.h|" "wxMiniFrame;wx/minifram.h|" "wxMirrorDC;wx/dcmirror.h|" "wxModule;wx/module.h|" "wxMouseCaptureChangedEvent;wx/event.h|" "wxMouseEvent;wx/event.h|" "wxMoveEvent;wx/event.h|" "wxMultiChoiceDialog;wx/choicdlg.h|" "wxMutex;wx/thread.h|" "wxMutexLocker;wx/thread.h|" "wxNode;wx/list.h|" "wxNotebook;wx/notebook.h|" "wxNotebookEvent;wx/notebook.h|" "wxNotebookSizer;wx/sizer.h|" "wxNotifyEvent;wx/event.h|" "wxObjArray;wx/dynarray.h|" "wxObject;wx/object.h|" "wxObjectRefData;wx/object.h|" "wxOpenErrorTraverser;wx/dir.h|" "wxOutputStream;wx/stream.h|" "wxPageSetupDialog;wx/printdlg.h|" "wxPageSetupDialogData;wx/cmndata.h|" "wxPaintDC;wx/dcclient.h|" "wxPaintEvent;wx/event.h|" "wxPalette;wx/palette.h|" "wxPanel;wx/panel.h|" "wxPaperSize;wx/cmndata.h|" "wxPasswordEntryDialog;wx/textdlg.h|" "wxPathList;wx/filefn.h|" "wxPen;wx/pen.h|" "wxPenList;wx/gdicmn.h|" "wxPoint;wx/gdicmn.h|" "wxPostScriptDC;wx/dcps.h|" "wxPreviewCanvas;wx/print.h|" "wxPreviewControlBar;wx/print.h|" "wxPreviewFrame;wx/print.h|" "wxPrintData;wx/cmndata.h|" "wxPrintDialog;wx/printdlg.h|" "wxPrintDialogData;wx/cmndata.h|" "wxPrinter;wx/print.h|" "wxPrinterDC;wx/dcprint.h|" "wxPrintout;wx/print.h|" "wxPrintPreview;wx/print.h|" "wxProcess;wx/process.h|" "wxProgressDialog;wx/progdlg.h|" "wxPropertySheetDialog;wx/propdlg.h|" "wxProtocol;wx/protocol/protocol.h|" "wxQuantize;wx/quantize.h|" "wxQueryLayoutInfoEvent;wx/laywin.h|" "wxRadioBox;wx/radiobox.h|" "wxRadioButton;wx/radiobut.h|" "wxRealPoint;wx/gdicmn.h|" "wxRect;wx/gdicmn.h|" "wxRecursionGuard;wx/recguard.h|" "wxRecursionGuardFlag;wx/recguard.h|" "wxRegEx;wx/regex.h|" "wxRegion;wx/region.h|" "wxRegionIterator;wx/region.h|" "wxRegKey;wx/msw/registry.h|" "wxRendererNative;wx/renderer.h|" "wxRendererVersion;wx/renderer.h|" "wxSashEvent;wx/sashwin.h|" "wxSashLayoutWindow;wx/laywin.h|" "wxSashWindow;wx/sashwin.h|" "wxScopedArray;wx/ptr_scpd.h|" "wxScopedPtr;wx/ptr_scpd.h|" "wxScopedTiedPtr;wx/ptr_scpd.h|" "wxScreenDC;wx/dcscreen.h|" "wxScrollBar;wx/scrolbar.h|" "wxScrolledWindow;wx/scrolwin.h|" "wxScrollEvent;wx/event.h|" "wxScrollWinEvent;wx/event.h|" "wxSemaphore;wx/thread.h|" "wxServer;wx/ipc.h|" "wxSetCursorEvent;wx/event.h|" "wxSetEnv;wx/utils.h|" "wxSimpleHelpProvider;wx/cshelp.h|" "wxSingleChoiceDialog;wx/choicdlg.h|" "wxSingleInstanceChecker;wx/snglinst.h|" "wxSize;wx/gdicmn.h|" "wxSizeEvent;wx/event.h|" "wxSizer;wx/sizer.h|" "wxSizerFlags;wx/sizer.h|" "wxSizerItem;wx/sizer.h|" "wxSlider;wx/slider.h|" "wxSockAddress;wx/socket.h|" "wxSocketBase;wx/socket.h|" "wxSocketClient;wx/socket.h|" "wxSocketEvent;wx/socket.h|" "wxSocketInputStream;wx/sckstrm.h|" "wxSocketOutputStream;wx/sckstrm.h|" "wxSocketServer;wx/socket.h|" "wxSound;wx/sound.h|" "wxSpinButton;wx/spinbutt.h|" "wxSpinCtrl;wx/spinctrl.h|" "wxSpinEvent;wx/spinctrl.h|" "wxSplashScreen;wx/splash.h|" "wxSplitterEvent;wx/splitter.h|" "wxSplitterRenderParams;wx/renderer.h|" "wxSplitterWindow;wx/splitter.h|" "wxStackFrame;wx/stackwalk.h|" "wxStackWalker;wx/stackwalk.h|" "wxStandardPaths;wx/stdpaths.h|" "wxStaticBitmap;wx/statbmp.h|" "wxStaticBox;wx/statbox.h|" "wxStaticLine;wx/statline.h|" "wxStaticText;wx/stattext.h|" "wxStatusBar;wx/statusbr.h|" "wxStdDialogButtonSizer;wx/sizer.h|" "wxStopWatch;wx/stopwatch.h|" "wxStreamBase;wx/stream.h|" "wxStreamBuffer;wx/stream.h|" "wxStreamToTextRedirector;wx/textctrl.h|" "wxString;wx/string.h|" "wxStringBuffer;wx/string.h|" "wxStringBufferLength;wx/string.h|" "wxStringClientData;clntdata.h|" "wxStringInputStream;wx/sstream.h|" "wxStringOutputStream;wx/sstream.h|" "wxStringTokenizer;wx/tokenzr.h|" "wxSystemOptions;wx/sysopt.h|" "wxSystemSettings;wx/settings.h|" "wxTaskBarIcon;wx/taskbar.h|" "wxTCPClient;wx/sckipc.h|" "wxTCPServer;wx/sckipc.h|" "wxTempFile;wx/file.h|" "wxTempFileOutputStream;wx/wfstream.h|" "wxTextAttr;wx/textctrl.h|" "wxTextCtrl;wx/textctrl.h|" "wxTextDataObject;wx/dataobj.h|" "wxTextDropTarget;wx/dnd.h|" "wxTextEntryDialog;wx/textdlg.h|" "wxTextFile;wx/textfile.h|" "wxTextInputStream;wx/txtstrm.h|" "wxTextOutputStream;wx/txtstrm.h|" "wxTextValidator;wx/valtext.h|" "wxTheClipboard;wx/clipbrd.h|" "wxThread;wx/thread.h|" "wxThreadHelper;wx/thread.h|" "wxTimer;wx/timer.h|" "wxTimerEvent;wx/timer.h|" "wxTimeSpan;wx/datetime.h|" "wxTipProvider;wx/tipdlg.h|" "wxTipWindow;wx/tipwin.h|" "wxToggleButton;wx/tglbtn.h|" "wxToolBar;wx/toolbar.h|" "wxToolTip;wx/tooltip.h|" "wxTopLevelWindow;wx/toplevel.h|" "wxTreeCtrl;wx/treectrl.h|" "wxTreeEvent;wx/treectrl.h|" "wxTreeItemData;wx/treectrl.h|" "wxUnsetEnv;wx/utils.h|" "wxUpdateUIEvent;wx/event.h|" "wxURI;wx/uri.h|" "wxURL;wx/url.h|" "wxVaCopy;wx/defs.h|" "wxValidator;wx/validate.h|" "wxVariant;wx/variant.h|" "wxVariantData;wx/variant.h|" "wxView;wx/docview.h|" "wxVListBox;wx/vlbox.h|" "wxVScrolledWindow;wx/vscroll.h|" "wxWindow;wx/window.h|" "wxWizard;wx/wizard.h|" "wxWizardEvent;wx/wizard.h|" "wxWizardPage;wx/wizard.h|" "wxWizardPageSimple;wx/wizard.h|" "wxXmlResource;wx/xrc/xmlres.h|" "wxXmlResourceHandler;wx/xrc/xmlres.h|" "wxZipClassFactory;wx/zipstrm.h|" "wxZipEntry;wx/zipstrm.h|" "wxZipInputStream;wx/zipstrm.h|" "wxZipNotifier;wx/zipstrm.h|" "wxZipOutputStream;wx/zipstrm.h|" "wxZlibInputStream;wx/zstream.h|" "wxZlibOutputStream;wx/zstream.h"); const wxArrayString arWxWidgets_2_6_4 = GetArrayFromString(strWxWidgets_2_6_4, _T("|")); for(std::size_t i = 0; i < arWxWidgets_2_6_4.GetCount(); ++i) { const wxArrayString arTmp = GetArrayFromString(arWxWidgets_2_6_4.Item(i), _T(";")); AddBinding(_T("wxWidgets_2_6_4"), arTmp.Item(0), arTmp.Item(1) ); } ///////////// // v 2.8.8 // ///////////// // All macros wxString strWxWidgets_2_8_8 = _T( "DECLARE_APP;wx/app.h|" "DECLARE_ABSTRACT_CLASS;wx/object.h|" "DECLARE_CLASS;wx/object.h|" "DECLARE_DYNAMIC_CLASS;wx/object.h|" "IMPLEMENT_APP;wx/app.h|" "IMPLEMENT_ABSTRACT_CLASS;wx/object.h|" "IMPLEMENT_ABSTRACT_CLASS2;wx/object.h|" "IMPLEMENT_CLASS;wx/object.h|" "IMPLEMENT_CLASS2;wx/object.h|" "IMPLEMENT_DYNAMIC_CLASS;wx/object.h|" "IMPLEMENT_DYNAMIC_CLASS2;wx/object.h|" "DECLARE_EVENT_TYPE;wx/event.h|" "DECLARE_EVENT_MACRO;wx/event.h|" "DECLARE_EVENT_TABLE_ENTRY;wx/event.h|" "DEFINE_EVENT_TYPE;wx/event.h|" "BEGIN_EVENT_TABLE;wx/event.h|" "END_EVENT_TABLE;wx/event.h|" "EVT_CUSTOM;wx/event.h|" "EVT_CUSTOM_RANGE;wx/event.h|" "EVT_COMMAND;wx/event.h|" "EVT_COMMAND_RANGE;wx/event.h|" "EVT_NOTIFY;wx/event.h|" "EVT_NOTIFY_RANGE;wx/event.h|" "EVT_BUTTON;wx/button.h|" "EVT_CHECKBOX;wx/checkbox.h|" "EVT_CHOICE;wx/choice.h|" "EVT_CHOICE;wx/choice.h|" "EVT_COMBOBOX;wx/combobox.h|" "EVT_LISTBOX;wx/listbox.h|" "EVT_LISTBOX_DCLICK;wx/listbox.h|" "EVT_RADIOBOX;wx/radiobox.h|" "EVT_RADIOBUTTON;wx/radiobut.h|" "EVT_SCROLLBAR;wx/scrolbar.h|" "EVT_SLIDER;wx/slider.h|" "EVT_TOGGLEBUTTON;wx/tglbtn.h|" "WX_APPEND_ARRAY;wx/dynarray.h|" "WX_PREPEND_ARRAY;wx/dynarray.h|" "WX_CLEAR_ARRAY;wx/dynarray.h|" "WX_DECLARE_OBJARRAY;wx/dynarray.h|" "WX_DEFINE_ARRAY;wx/dynarray.h|" "WX_DEFINE_OBJARRAY;wx/dynarray.h|" "WX_DEFINE_SORTED_ARRAY;wx/dynarray.h|" "WX_DECLARE_STRING_HASH_MAP;wx/hashmap.h|" "WX_DECLARE_HASH_MAP;wx/hashmap.h|" "wxASSERT;wx/debug.h|" "wxASSERT_MIN_BITSIZE;wx/debug.h|" "wxASSERT_MSG;wx/debug.h|" "wxBITMAP;wx/gdicmn.h|" "wxCOMPILE_TIME_ASSERT;wx/debug.h|" "wxCOMPILE_TIME_ASSERT2;wx/debug.h|" "wxCRIT_SECT_DECLARE;wx/thread.h|" "wxCRIT_SECT_DECLARE_MEMBER;wx/thread.h|" "wxCRIT_SECT_LOCKER;wx/thread.h|" "wxDYNLIB_FUNCTION;wx/dynlib.h|" "wxENTER_CRIT_SECT;wx/thread.h|" "wxFAIL;wx/debug.h|" "wxFAIL_MSG;wx/debug.h|" "wxICON;wx/gdicmn.h|" "wxLEAVE_CRIT_SECT;wx/thread.h|" "wxLL;wx/longlong.h|" "wxTRANSLATE;wx/intl.h|" "wxULL;wx/longlong.h|" // All ::wx methods "wxAboutBox;wx/aboutdlg.h|" "wxBeginBusyCursor;wx/utils.h|" "wxBell;wx/utils.h|" "wxClientDisplayRect;wx/gdicmn.h|" "wxClipboardOpen;wx/clipbrd.h|" "wxCloseClipboard;wx/clipbrd.h|" "wxColourDisplay;wx/gdicmn.h|" "wxConcatFiles;wx/filefn.h|" "wxCopyFile;wx/filefn.h|" "wxCreateDynamicObject;wx/object.h|" "wxCreateFileTipProvider;wx/tipdlg.h|" "wxDDECleanUp;wx/dde.h|" "wxDDEInitialize;wx/dde.h|" "wxDebugMsg;wx/utils.h|" "wxDirExists;wx/filefn.h|" "wxDirSelector;wx/dirdlg.h|" "wxDisplayDepth;wx/gdicmn.h|" "wxDisplaySize;wx/gdicmn.h|" "wxDisplaySizeMM;wx/gdicmn.h|" "wxDos2UnixFilename;wx/filefn.h|" "wxDROP_ICON;wx/dnd.h|" "wxEmptyClipboard;wx/clipbrd.h|" "wxEnableTopLevelWindows;wx/utils.h|" "wxEndBusyCursor;wx/utils.h|" "wxEntry;wx/app.h|" "wxEntryCleanup;wx/init.h|" "wxEntryStart;wx/init.h|" "wxEnumClipboardFormats;wx/clipbrd.h|" "wxError;wx/utils.h|" "wxExecute;wx/utils.h|" "wxExit;wx/app.h|" "wxFatalError;wx/utils.h|" "wxFileExists;wx/filefn.h|" "wxFileModificationTime;wx/filefn.h|" "wxFileNameFromPath;wx/filefn.h|" "wxFileSelector;wx/filedlg.h|" "wxFindFirstFile;wx/filefn.h|" "wxFindMenuItemId;wx/utils.h|" "wxFindNextFile;wx/filefn.h|" "wxFindWindowAtPoint;wx/utils.h|" "wxFindWindowAtPointer;wx/windows.h|" "wxFindWindowByLabel;wx/utils.h|" "wxFindWindowByName;wx/utils.h|" "wxGenericAboutBox;wx/aboutdlg.h\nwx/generic/aboutdlgg.h|" "wxGetActiveWindow;wx/windows.h|" "wxGetApp;wx/app.h|" "wxGetBatteryState;wx/utils.h|" "wxGetClipboardData;wx/clipbrd.h|" "wxGetClipboardFormatName;wx/clipbrd.h|" "wxGetColourFromUser;wx/colordlg.h|" "wxGetCwd;wx/filefn.h|" "wxGetDiskSpace;wx/filefn.h|" "wxGetDisplayName;wx/utils.h|" "wxGetElapsedTime;wx/timer.h|" "wxGetEmailAddress;wx/utils.h|" "wxGetFileKind;wx/filefn.h|" "wxGetFontFromUser;wx/fontdlg.h|" "wxGetFreeMemory;wx/utils.h|" "wxGetFullHostName;wx/utils.h|" "wxGetHomeDir;wx/utils.h|" "wxGetHostName;wx/utils.h|" "wxGetKeyState;wx/utils.h|" "wxGetLocalTime;wx/timer.h|" "wxGetLocalTimeMillis;wx/timer.h|" "wxGetMousePosition;wx/utils.h|" "wxGetMouseState;wx/utils.h|" "wxGetMultipleChoice;wx/choicdlg.h|" "wxGetMultipleChoices;wx/choicdlg.h|" "wxGetNumberFromUser;wx/numdlg.h|" "wxGetOsDescription;wx/utils.h|" "wxGetOSDirectory;wx/filefn.h|" "wxGetOsVersion;wx/utils.h|" "wxGetPasswordFromUser;wx/textdlg.h|" "wxGetPowerType;wx/utils.h|" "wxGetPrinterCommand;wx/dcps.h|" "wxGetPrinterFile;wx/dcps.h|" "wxGetPrinterMode;wx/dcps.h|" "wxGetPrinterOptions;wx/dcps.h|" "wxGetPrinterOrientation;wx/dcps.h|" "wxGetPrinterPreviewCommand;wx/dcps.h|" "wxGetPrinterScaling;wx/dcps.h|" "wxGetPrinterTranslation;wx/dcps.h|" "wxGetProcessId;wx/utils.h|" "wxGetResource;wx/utils.h|" "wxGetSingleChoice;wx/choicdlg.h|" "wxGetSingleChoiceData;wx/choicdlg.h|" "wxGetSingleChoiceIndex;wx/choicdlg.h|" "wxGetStockLabel;wx/stockitem.h|" "wxGetTempFileName;wx/filefn.h|" "wxGetTextFromUser;wx/textdlg.h|" "wxGetTopLevelParent;wx/window.h|" "wxGetTranslation;wx/intl.h|" "wxGetUserHome;wx/utils.h|" "wxGetUserId;wx/utils.h|" "wxGetUserName;wx/utils.h|" "wxGetUTCTime;wx/timer.h|" "wxGetWorkingDirectory;wx/filefn.h|" "wxHandleFatalExceptions;wx/app.h|" "wxInitAllImageHandlers;wx/image.h|" "wxInitialize;wx/app.h|" "wxIsAbsolutePath;wx/filefn.h|" "wxIsBusy;wx/utils.h|" "wxIsClipboardFormatAvailable;wx/clipbrd.h|" "wxIsDebuggerRunning;wx/debug.h|" "wxIsEmpty;wx/wxchar.h|" "wxIsMainThread;wx/thread.h|" "wxIsPlatform64Bit;wx/utils.h|" "wxIsPlatformLittleEndian;wx/utils.h|" "wxIsWild;wx/filefn.h|" "wxKill;wx/app.h|" "wxLaunchDefaultBrowser;wx/utils.h|" "wxLoadUserResource;wx/utils.h|" "wxLogDebug;wx/log.h|" "wxLogError;wx/log.h|" "wxLogFatalError;wx/log.h|" "wxLogMessage;wx/log.h|" "wxLogStatus;wx/log.h|" "wxLogSysError;wx/log.h|" "wxLogTrace;wx/log.h|" "wxLogVerbose;wx/log.h|" "wxLogWarning;wx/log.h|" "wxMakeMetafilePlaceable;wx/gdicmn.h|" "wxMatchWild;wx/filefn.h|" "wxMessageBox;wx/msgdlg.h|" "wxMicroSleep;wx/utils.h|" "wxMilliSleep;wx/utils.h|" "wxMkdir;wx/filefn.h|" "wxMutexGuiEnter;wx/thread.h|" "wxMutexGuiLeave;wx/thread.h|" "wxNewId;wx/utils.h|" "wxNow;wx/utils.h|" "wxOnAssert;wx/debug.h|" "wxOpenClipboard;wx/clipbrd.h|" "wxParseCommonDialogsFilter;wx/filefn.h|" "wxPathOnly;wx/filefn.h|" "wxPostDelete;wx/utils.h|" "wxPostEvent;wx/app.h|" "wxRegisterClipboardFormat;wx/clipbrd.h|" "wxRegisterId;wx/utils.h|" "wxRemoveFile;wx/filefn.h|" "wxRenameFile;wx/filefn.h|" "wxRmdir;wx/filefn.h|" "wxSafeShowMessage;wx/log.h|" "wxSafeYield;wx/utils.h|" "wxSetClipboardData;wx/clipbrd.h|" "wxSetCursor;wx/gdicmn.h|" "wxSetDisplayName;wx/utils.h|" "wxSetPrinterCommand;wx/dcps.h|" "wxSetPrinterFile;wx/dcps.h|" "wxSetPrinterMode;wx/dcps.h|" "wxSetPrinterOptions;wx/dcps.h|" "wxSetPrinterOrientation;wx/dcps.h|" "wxSetPrinterPreviewCommand;wx/dcps.h|" "wxSetPrinterScaling;wx/dcps.h|" "wxSetPrinterTranslation;wx/dcps.h|" "wxSetWorkingDirectory;wx/filefn.h|" "wxShell;wx/utils.h|" "wxShowTip;wx/tipdlg.h|" "wxShutdown;wx/utils.h|" "wxSleep;wx/utils.h|" "wxSnprintf;wx/wxchar.h|" "wxSplitPath;wx/filefn.h|" "wxStartTimer;wx/timer.h|" "wxStrcmp;wx/wxchar.h|" "wxStricmp;wx/wxchar.h|" "wxStringEq;wx/string.h|" "wxStringMatch;wx/string.h|" "wxStringTokenize;wx/string.h|" "wxStripMenuCodes;wx/utils.h|" "wxStrlen;wx/wxchar.h|" "wxSysErrorCode;wx/log.h|" "wxSysErrorMsg;wx/log.h|" "wxTrace;wx/memory.h|" "wxTraceLevel;wx/memory.h|" "wxTransferFileToStream;wx/docview.h|" "wxTransferStreamToFile;wx/docview.h|" "wxTrap;wx/debug.h|" "wxUninitialize;wx/app.h|" "wxUnix2DosFilename;wx/filefn.h|" "wxUsleep;wx/utils.h|" "wxVsnprintf;wx/wxchar.h|" "wxWakeUpIdle;wx/app.h|" "wxWriteResource;wx/utils.h|" "wxYield;wx/app.h|" // All ::wx classes "wxAboutDialogInfo;wx/aboutdlg.h|" "wxAcceleratorEntry;wx/accel.h|" "wxAcceleratorTable;wx/accel.h|" "wxAccessible;wx/access.h|" "wxActivateEvent;wx/event.h|" "wxActiveXContainer;wx/msw/ole/activex.h|" "wxActiveXEvent;wx/msw/ole/activex.h|" "wxAnimation;wx/animate.h|" "wxAnimationCtrl;wx/animate.h|" "wxApp;wx/app.h|" "wxAppTraits;wx/apptrait.h|" "wxArchiveClassFactory;wx/archive.h|" "wxArchiveEntry;wx/archive.h|" "wxArchiveInputStream;wx/archive.h|" "wxArchiveIterator;wx/archive.h|" "wxArchiveNotifier;wx/archive.h|" "wxArchiveOutputStream;wx/archive.h|" "wxArray;wx/dynarray.h|" "wxArrayString;wx/arrstr.h|" "wxArtProvider;wx/artprov.h|" "wxAuiDockArt;wx/aui/dockart.h|" "wxAuiTabArt;wx/aui/auibook.h|" "wxAuiManager;wx/aui/aui.h|" "wxAuiNotebook;wx/aui/auibook.h|" "wxAuiPaneInfo;wx/aui/aui.h|" "wxAutomationObject;wx/msw/ole/automtn.h|" "wxBitmap;wx/bitmap.h|" "wxBitmapButton;wx/bmpbuttn.h|" "wxBitmapComboBox;wx/bmpcbox.h|" "wxBitmapDataObject;wx/dataobj.h|" "wxBitmapHandler;wx/bitmap.h|" "wxBoxSizer;wx/sizer.h|" "wxBrush;wx/brush.h|" "wxBrushList;wx/gdicmn.h|" "wxBufferedDC;wx/dcbuffer.h|" "wxBufferedInputStream;wx/stream.h|" "wxBufferedOutputStream;wx/stream.h|" "wxBufferedPaintDC;wx/dcbuffer.h|" "wxBusyCursor;wx/utils.h|" "wxBusyInfo;wx/busyinfo.h|" "wxButton;wx/button.h|" "wxCalculateLayoutEvent;wx/laywin.h|" "wxCalendarCtrl;wx/calctrl.h|" "wxCalendarDateAttr;wx/calctrl.h|" "wxCalendarEvent;wx/calctrl.h|" "wxCaret;wx/caret.h|" "wxCheckBox;wx/checkbox.h|" "wxCheckListBox;wx/checklst.h|" "wxChildFocusEvent;wx/event.h|" "wxChoice;wx/choice.h|" "wxChoicebook;wx/choicebk.h|" "wxClassInfo;wx/object.h|" "wxClient;wx/ipc.h|" "wxClientData;wx/clntdata.h|" "wxClientDataContainer;wx/clntdata.h|" "wxClientDC;wx/dcclient.h|" "wxClipboard;wx/clipbrd.h|" "wxClipboardTextEvent;wx/event.h|" "wxCloseEvent;wx/event.h|" "wxCmdLineParser;wx/cmdline.h|" "wxCollapsiblePane;wx/collpane.h|" "wxCollapsiblePaneEvent;wx/collpane.h|" "wxColour;wx/colour.h|" "wxColourData;wx/cmndata.h|" "wxColourDatabase;wx/gdicmn.h|" "wxColourDialog;wx/colordlg.h|" "wxColourPickerCtrl;wx/clrpicker.h|" "wxColourPickerEvent;wx/clrpicker.h|" "wxComboBox;wx/combobox.h|" "wxComboCtrl;wx/combo.h|" "wxComboPopup;wx/combo.h|" "wxCommand;wx/cmdproc.h|" "wxCommandEvent;wx/event.h|" "wxCommandProcessor;wx/cmdproc.h|" "wxCondition;wx/thread.h|" "wxConfigBase;wx/config.h|" "wxConnection;wx/ipc.h|" "wxContextHelp;wx/cshelp.h|" "wxContextHelpButton;wx/cshelp.h|" "wxContextMenuEvent;wx/event.h|" "wxControl;wx/control.h|" "wxControlWithItems;wx/ctrlsub.h|" "wxCountingOutputStream;wx/stream.h|" "wxCriticalSection;wx/thread.h|" "wxCriticalSectionLocker;wx/thread.h|" "wxCSConv;wx/strconv.h|" "wxCursor;wx/cursor.h|" "wxCustomDataObject;wx/dataobj.h|" "wxDataFormat;wx/dataobj.h|" "wxDatagramSocket;wx/socket.h|" "wxDataInputStream;wx/datstrm.h|" "wxDataObject;wx/dataobj.h|" "wxDataObjectComposite;wx/dataobj.h|" "wxDataObjectSimple;wx/dataobj.h|" "wxDataOutputStream;wx/datstrm.h|" "wxDataViewColumn;wx/dataview.h|" "wxDataViewCtrl;wx/dataview.h|" "wxDataViewEvent;wx/dataview.h|" "wxDataViewListModelNotifier;wx/dataview.h|" "wxDataViewModel;wx/dataview.h|" "wxDataViewListModel;wx/dataview.h|" "wxDataViewSortedListModel;wx/dataview.h|" "wxDataViewRenderer;wx/dataview.h|" "wxDataViewTextRenderer;wx/dataview.h|" "wxDataViewProgressRenderer;wx/dataview.h|" "wxDataViewToggleRenderer;wx/dataview.h|" "wxDataViewBitmapRenderer;wx/dataview.h|" "wxDataViewDateRenderer;wx/dataview.h|" "wxDataViewCustomRenderer;wx/dataview.h|" "wxDateEvent;wx/dateevt.h|" "wxDatePickerCtrl;wx/datectrl.h|" "wxDateSpan;wx/datetime.h|" "wxDateTime;wx/datetime.h|" "wxDb;wx/db.h|" "wxDbColDataPtr;wx/db.h|" "wxDbColDef;wx/db.h|" "wxDbColFor;wx/db.h|" "wxDbColInf;wx/db.h|" "wxDbConnectInf;wx/db.h|" "wxDbGridColInfo;wx/dbgrid.h|" "wxDbGridTableBase;wx/dbgrid.h|" "wxDbIdxDef;wx/db.h|" "wxDbInf;wx/db.h|" "wxDbTable;wx/dbtable.h|" "wxDbTableInf;wx/db.h|" "wxDC;wx/dc.h|" "wxDCClipper;wx/dc.h|" "wxDDEClient;wx/dde.h|" "wxDDEConnection;wx/dde.h|" "wxDDEServer;wx/dde.h|" "wxDebugContext;wx/memory.h|" "wxDebugReport;wx/debugrpt.h|" "wxDebugReportCompress;wx/debugrpt.h|" "wxDebugReportPreview;wx/debugrpt.h|" "wxDebugReportPreviewStd;wx/debugrpt.h|" "wxDebugReportUpload;wx/debugrpt.h|" "wxDebugStreamBuf;wx/memory.h|" "wxDelegateRendererNative;wx/renderer.h|" "wxDialog;wx/dialog.h|" "wxDialUpEvent;wx/dialup.h|" "wxDialUpManager;wx/dialup.h|" "wxDir;wx/dir.h|" "wxDirDialog;wx/dirdlg.h|" "wxDirPickerCtrl;wx/filepicker.h|" "wxDirTraverser;wx/dir.h|" "wxDisplay;wx/display.h|" "wxDllLoader;wx/dynlib.h|" "wxDocChildFrame;wx/docview.h|" "wxDocManager;wx/docview.h|" "wxDocMDIChildFrame;wx/docmdi.h|" "wxDocMDIParentFrame;wx/docmdi.h|" "wxDocParentFrame;wx/docview.h|" "wxDocTemplate;wx/docview.h|" "wxDocument;wx/docview.h|" "wxDragImage;wx/dragimag.h|" "wxDragResult;wx/dnd.h|" "wxDropFilesEvent;wx/event.h|" "wxDropSource;wx/dnd.h|" "wxDropTarget;wx/dnd.h|" "wxDynamicLibrary;wx/dynlib.h|" "wxDynamicLibraryDetails;wx/dynlib.h|" "wxEncodingConverter;wx/encconv.h|" "wxEraseEvent;wx/event.h|" "wxEvent;wx/event.h|" "wxEvtHandler;wx/event.h|" "wxFFile;wx/ffile.h|" "wxFFileInputStream;wx/wfstream.h|" "wxFFileOutputStream;wx/wfstream.h|" "wxFFileStream;wx/wfstream.h|" "wxFile;wx/file.h|" "wxFileConfig;wx/fileconf.h|" "wxFileDataObject;wx/dataobj.h|" "wxFileDialog;wx/filedlg.h|" "wxFileDropTarget;wx/dnd.h|" "wxFileHistory;wx/docview.h|" "wxFileInputStream;wx/wfstream.h|" "wxFileName;wx/filename.h|" "wxFileOutputStream;wx/wfstream.h|" "wxFilePickerCtrl;wx/filepicker.h|" "wxFileDirPickerEvent;wx/filepicker.h|" "wxFileStream;wx/wfstream.h|" "wxFileSystem;wx/filesys.h|" "wxFileSystemHandler;wx/filesys.h|" "wxFileType;wx/mimetype.h|" "wxFilterClassFactory;wx/stream.h|" "wxFilterInputStream;wx/stream.h|" "wxFilterOutputStream;wx/stream.h|" "wxFindDialogEvent;wx/fdrepdlg.h|" "wxFindReplaceData;wx/fdrepdlg.h|" "wxFindReplaceDialog;wx/fdrepdlg.h|" "wxFinite;wx/math.h|" "wxFlexGridSizer;wx/sizer.h|" "wxFocusEvent;wx/event.h|" "wxFont;wx/font.h|" "wxFontData;wx/cmndata.h|" "wxFontDialog;wx/fontdlg.h|" "wxFontEnumerator;wx/fontenum.h|" "wxFontList;wx/gdicmn.h|" "wxFontMapper;wx/fontmap.h|" "wxFontPickerCtrl;wx/fontpicker.h|" "wxFontPickerEvent;wx/fontpicker.h|" "wxFrame;wx/frame.h|" "wxFSFile;wx/filesys.h|" "wxFTP;wx/protocol/ftp.h|" "wxGauge;wx/gauge.h|" "wxGBPosition;wx/gbsizer.h|" "wxGBSizerItem;wx/gbsizer.h|" "wxGBSpan;wx/gbsizer.h|" "wxGDIObject;wx/gdiobj.h|" "wxGenericDirCtrl;wx/dirctrl.h|" "wxGenericValidator;wx/valgen.h|" "wxGetenv;wx/utils.h|" "wxGetVariantCast;wx/variant.h|" "wxGLCanvas;wx/glcanvas.h|" "wxGLContext;wx/glcanvas.h|" "wxGraphicsBrush;wx/graphics.h|" "wxGraphicsContext;wx/graphics.h|" "wxGraphicsFont;wx/graphics.h|" "wxGraphicsMatrix;wx/graphics.h|" "wxGraphicsObject;wx/graphics.h|" "wxGraphicsPath;wx/graphics.h|" "wxGraphicsPen;wx/graphics.h|" "wxGraphicsRenderer;wx/graphics.h|" "wxGrid;wx/grid.h|" "wxGridBagSizer;wx/gbsizer.h|" "wxGridCellAttr;wx/grid.h|" "wxGridCellBoolEditor;wx/grid.h|" "wxGridCellBoolRenderer;wx/grid.h|" "wxGridCellChoiceEditor;wx/grid.h|" "wxGridCellEditor;wx/grid.h|" "wxGridCellRenderer;wx/grid.h|" "wxGridCellFloatEditor;wx/grid.h|" "wxGridCellFloatRenderer;wx/grid.h|" "wxGridCellNumberEditor;wx/grid.h|" "wxGridCellNumberRenderer;wx/grid.h|" "wxGridCellStringRenderer;wx/grid.h|" "wxGridCellTextEditor;wx/grid.h|" "wxGridEditorCreatedEvent;wx/grid.h|" "wxGridEvent;wx/grid.h|" "wxGridRangeSelectEvent;wx/grid.h|" "wxGridSizeEvent;wx/grid.h|" "wxGridSizer;wx/sizer.h|" "wxGridTableBase;wx/grid.h|" "wxHashMap;wx/hashmap.h|" "wxHashSet;wx/hashset.h|" "wxHashTable;wx/hash.h|" "wxHelpController;wx/help.h|" "wxHelpControllerHelpProvider;wx/cshelp.h|" "wxHelpEvent;wx/event.h|" "wxHelpProvider;wx/cshelp.h|" "wxHtmlCell;wx/html/htmlcell.h|" "wxHtmlCellEvent;wx/html/htmlwin.h|" "wxHtmlColourCell;wx/html/htmlcell.h|" "wxHtmlContainerCell;wx/html/htmlcell.h|" "wxHtmlDCRenderer;wx/html/htmprint.h|" "wxHtmlEasyPrinting;wx/html/htmprint.h|" "wxHtmlFilter;wx/html/htmlfilt.h|" "wxHtmlHelpController;wx/html/helpctrl.h|" "wxHtmlHelpData;wx/html/helpdata.h|" "wxHtmlHelpDialog;wx/html/helpdlg.h|" "wxHtmlHelpFrame;wx/html/helpfrm.h|" "wxHtmlHelpWindow;wx/html/helpwnd.h|" "wxHtmlModalHelp;wx/html/helpctrl.h|" "wxHtmlLinkInfo;wx/html/htmlcell.h|" "wxHtmlLinkEvent;wx/html/htmlwin.h|" "wxHtmlListBox;wx/htmllbox.h|" "wxHtmlParser;wx/html/htmlpars.h|" "wxHtmlPrintout;wx/html/htmprint.h|" "wxHtmlTag;wx/html/htmltag.h|" "wxHtmlTagHandler;wx/html/htmlpars.h|" "wxHtmlTagsModule;wx/html/winpars.h|" "wxHtmlWidgetCell;wx/html/htmlcell.h|" "wxHtmlWindow;wx/html/htmlwin.h|" "wxHtmlWinParser;wx/html/winpars.h|" "wxHtmlWinTagHandler;wx/html/winpars.h|" "wxHTTP;wx/protocol/http.h|" "wxHyperlinkCtrl;wx/hyperlink.h|" "wxHyperlinkEvent;wx/hyperlink.h|" "wxIcon;wx/icon.h|" "wxIconBundle;wx/iconbndl.h|" "wxIconizeEvent;wx/event.h|" "wxIconLocation;wx/iconloc.h|" "wxIdleEvent;wx/event.h|" "wxImage;wx/image.h|" "wxImageHandler;wx/image.h|" "wxImageList;wx/imaglist.h|" "wxIndividualLayoutConstraint;wx/layout.h|" "wxInitDialogEvent;wx/event.h|" "wxInputStream;wx/stream.h|" "wxIPaddress;wx/socket.h|" "wxIPV4address;wx/socket.h|" "wxIsNaN;wx/math.h|" "wxJoystick;wx/joystick.h|" "wxJoystickEvent;wx/event.h|" "wxKeyEvent;wx/event.h|" "wxLayoutAlgorithm;wx/laywin.h|" "wxLayoutConstraints;wx/layout.h|" "wxList;wx/list.h|" "wxListbook;wx/listbook.h|" "wxListBox;wx/listbox.h|" "wxListCtrl;wx/listctrl.h|" "wxListEvent;wx/listctrl.h|" "wxListItem;wx/listctrl.h|" "wxListItemAttr;wx/listctrl.h|" "wxListView;wx/listctrl.h|" "wxLocale;wx/intl.h|" "wxLog;wx/log.h|" "wxLogChain;wx/log.h|" "wxLogGui;wx/log.h|" "wxLogNull;wx/log.h|" "wxLogPassThrough;wx/log.h|" "wxLogStderr;wx/log.h|" "wxLogStream;wx/log.h|" "wxLogTextCtrl;wx/log.h|" "wxLogWindow;wx/log.h|" "wxLongLong;wx/longlong.h|" "wxLongLongFmtSpec;wx/longlong.h|" "wxMask;wx/bitmap.h|" "wxMaximizeEvent;wx/event.h|" "wxMBConv;wx/strconv.h|" "wxMBConvFile;wx/strconv.h|" "wxMBConvUTF16;wx/strconv.h|" "wxMBConvUTF32;wx/strconv.h|" "wxMBConvUTF7;wx/strconv.h|" "wxMBConvUTF8;wx/strconv.h|" "wxMDIChildFrame;wx/mdi.h|" "wxMDIClientWindow;wx/mdi.h|" "wxMDIParentFrame;wx/mdi.h|" "wxMediaCtrl;wx/mediactrl.h|" "wxMediaEvent;wx/mediactrl.h|" "wxMemoryBuffer;wx/buffer.h|" "wxMemoryDC;wx/dcmemory.h|" "wxMemoryFSHandler;wx/fs_mem.h|" "wxMemoryInputStream;wx/mstream.h|" "wxMemoryOutputStream;wx/mstream.h|" "wxMenu;wx/menu.h|" "wxMenuBar;wx/menu.h|" "wxMenuEvent;wx/event.h|" "wxMenuItem;wx/menuitem.h|" "wxMessageDialog;wx/msgdlg.h|" "wxMetafile;wx/metafile.h|" "wxMetafileDC;wx/metafile.h|" "wxMimeTypesManager;wx/mimetype.h|" "wxMiniFrame;wx/minifram.h|" "wxMirrorDC;wx/dcmirror.h|" "wxModule;wx/module.h|" "wxMouseCaptureChangedEvent;wx/event.h|" "wxMouseCaptureLostEvent;wx/event.h|" "wxMouseEvent;wx/event.h|" "wxMoveEvent;wx/event.h|" "wxMultiChoiceDialog;wx/choicdlg.h|" "wxMutex;wx/thread.h|" "wxMutexLocker;wx/thread.h|" "wxNode;wx/list.h|" "wxNotebook;wx/notebook.h|" "wxNotebookEvent;wx/notebook.h|" "wxNotebookSizer;wx/sizer.h|" "wxNotifyEvent;wx/event.h|" "wxObjArray;wx/dynarray.h|" "wxObject;wx/object.h|" "wxObjectRefData;wx/object.h|" "wxOpenErrorTraverser;wx/dir.h|" "wxOutputStream;wx/stream.h|" "wxOwnerDrawnComboBox;wx/odcombo.h|" "wxPageSetupDialog;wx/printdlg.h|" "wxPageSetupDialogData;wx/cmndata.h|" "wxPaintDC;wx/dcclient.h|" "wxPaintEvent;wx/event.h|" "wxPalette;wx/palette.h|" "wxPanel;wx/panel.h|" "wxPaperSize;wx/cmndata.h|" "wxPasswordEntryDialog;wx/textdlg.h|" "wxPathList;wx/filefn.h|" "wxPen;wx/pen.h|" "wxPenList;wx/gdicmn.h|" "wxPickerBase;wx/pickerbase.h|" "wxPlatformInfo;wx/platinfo.h|" "wxPoint;wx/gdicmn.h|" "wxPostScriptDC;wx/dcps.h|" "wxPowerEvent;wx/power.h|" "wxPreviewCanvas;wx/print.h|" "wxPreviewControlBar;wx/print.h|" "wxPreviewFrame;wx/print.h|" "wxPrintData;wx/cmndata.h|" "wxPrintDialog;wx/printdlg.h|" "wxPrintDialogData;wx/cmndata.h|" "wxPrinter;wx/print.h|" "wxPrinterDC;wx/dcprint.h|" "wxPrintout;wx/print.h|" "wxPrintPreview;wx/print.h|" "wxProcess;wx/process.h|" "wxProcessEvent;wx/process.h|" "wxProgressDialog;wx/progdlg.h|" "wxPropertySheetDialog;wx/propdlg.h|" "wxProtocol;wx/protocol/protocol.h|" "wxQuantize;wx/quantize.h|" "wxQueryLayoutInfoEvent;wx/laywin.h|" "wxRadioBox;wx/radiobox.h|" "wxRadioButton;wx/radiobut.h|" "wxRealPoint;wx/gdicmn.h|" "wxRect;wx/gdicmn.h|" "wxRecursionGuard;wx/recguard.h|" "wxRecursionGuardFlag;wx/recguard.h|" "wxRegEx;wx/regex.h|" "wxRegion;wx/region.h|" "wxRegionIterator;wx/region.h|" "wxRegKey;wx/msw/registry.h|" "wxRendererNative;wx/renderer.h|" "wxRendererVersion;wx/renderer.h|" "wxRichTextAttr;wx/richtext/richtextbuffer.h|" "wxRichTextBuffer;wx/richtext/richtextbuffer.h|" "wxRichTextCharacterStyleDefinition;wx/richtext/richtextstyles.h|" "wxRichTextCtrl;wx/richtext/richtextctrl.h|" "wxRichTextEvent;wx/richtext/richtextctrl.h|" "wxRichTextFileHandler;wx/richtext/richtextbuffer.h|" "wxRichTextFormattingDialog;wx/richtext/richtextformatdlg.h|" "wxRichTextFormattingDialogFactory;wx/richtext/richtextformatdlg.h|" "wxRichTextHeaderFooterData;wx/richtext/richtextprint.h|" "wxRichTextHTMLHandler;wx/richtext/richtexthtml.h|" "wxRichTextListStyleDefinition;wx/richtext/richtextstyles.h|" "wxRichTextParagraphStyleDefinition;wx/richtext/richtextstyles.h|" "wxRichTextPrinting;wx/richtext/richtextprint.h|" "wxRichTextPrintout;wx/richtext/richtextprint.h|" "wxRichTextRange;wx/richtext/richtextbuffer.h|" "wxRichTextStyleDefinition;wx/richtext/richtextstyles.h|" "wxRichTextStyleComboCtrl;wx/richtext/richtextstyles.h|" "wxRichTextStyleListBox;wx/richtext/richtextstyles.h|" "wxRichTextStyleListCtrl;wx/richtext/richtextstyles.h|" "wxRichTextStyleOrganiserDialog;wx/richtext/richtextstyledlg.h|" "wxRichTextStyleSheet;wx/richtext/richtextstyles.h|" "wxRichTextXMLHandler;wx/richtext/richtextxml.h|" "wxSashEvent;wx/sashwin.h|" "wxSashLayoutWindow;wx/laywin.h|" "wxSashWindow;wx/sashwin.h|" "wxScopedArray;wx/ptr_scpd.h|" "wxScopedPtr;wx/ptr_scpd.h|" "wxScopedTiedPtr;wx/ptr_scpd.h|" "wxScreenDC;wx/dcscreen.h|" "wxScrollBar;wx/scrolbar.h|" "wxScrolledWindow;wx/scrolwin.h|" "wxScrollEvent;wx/event.h|" "wxScrollWinEvent;wx/event.h|" "wxSearchCtrl;wx/srchctrl.h|" "wxSemaphore;wx/thread.h|" "wxServer;wx/ipc.h|" "wxSetCursorEvent;wx/event.h|" "wxSetEnv;wx/utils.h|" "wxSimpleHelpProvider;wx/cshelp.h|" "wxSimpleHtmlListBox;wx/htmllbox.h|" "wxSingleChoiceDialog;wx/choicdlg.h|" "wxSingleInstanceChecker;wx/snglinst.h|" "wxSize;wx/gdicmn.h|" "wxSizeEvent;wx/event.h|" "wxSizer;wx/sizer.h|" "wxSizerFlags;wx/sizer.h|" "wxSizerItem;wx/sizer.h|" "wxSlider;wx/slider.h|" "wxSockAddress;wx/socket.h|" "wxSocketBase;wx/socket.h|" "wxSocketClient;wx/socket.h|" "wxSocketEvent;wx/socket.h|" "wxSocketInputStream;wx/sckstrm.h|" "wxSocketOutputStream;wx/sckstrm.h|" "wxSocketServer;wx/socket.h|" "wxSound;wx/sound.h|" "wxSpinButton;wx/spinbutt.h|" "wxSpinCtrl;wx/spinctrl.h|" "wxSpinEvent;wx/spinctrl.h|" "wxSplashScreen;wx/splash.h|" "wxSplitterEvent;wx/splitter.h|" "wxSplitterRenderParams;wx/renderer.h|" "wxSplitterWindow;wx/splitter.h|" "wxStackFrame;wx/stackwalk.h|" "wxStackWalker;wx/stackwalk.h|" "wxStandardPaths;wx/stdpaths.h|" "wxStaticBitmap;wx/statbmp.h|" "wxStaticBox;wx/statbox.h|" "wxStaticBoxSizer;wx/sizer.h|" "wxStaticLine;wx/statline.h|" "wxStaticText;wx/stattext.h|" "wxStatusBar;wx/statusbr.h|" "wxStdDialogButtonSizer;wx/sizer.h|" "wxStopWatch;wx/stopwatch.h|" "wxStreamBase;wx/stream.h|" "wxStreamBuffer;wx/stream.h|" "wxStreamToTextRedirector;wx/textctrl.h|" "wxString;wx/string.h|" "wxStringBuffer;wx/string.h|" "wxStringBufferLength;wx/string.h|" "wxStringClientData;clntdata.h|" "wxStringInputStream;wx/sstream.h|" "wxStringOutputStream;wx/sstream.h|" "wxStringTokenizer;wx/tokenzr.h|" "wxSymbolPickerDialog;wx/richtext/richtextsymboldlg.h|" "wxSysColourChangedEvent;wx/event.h|" "wxSystemOptions;wx/sysopt.h|" "wxSystemSettings;wx/settings.h|" "wxTarClassFactory;wx/tarstrm.h|" "wxTarEntry;wx/tarstrm.h|" "wxTarInputStream;wx/tarstrm.h|" "wxTarOutputStream;wx/tarstrm.h|" "wxTaskBarIcon;wx/taskbar.h|" "wxTCPClient;wx/sckipc.h|" "wxTCPServer;wx/sckipc.h|" "wxTempFile;wx/file.h|" "wxTempFileOutputStream;wx/wfstream.h|" "wxTextAttr;wx/textctrl.h|" "wxTextAttrEx;wx/richtext/richtextbuffer.h|" "wxTextCtrl;wx/textctrl.h|" "wxTextDataObject;wx/dataobj.h|" "wxTextDropTarget;wx/dnd.h|" "wxTextEntryDialog;wx/textdlg.h|" "wxTextFile;wx/textfile.h|" "wxTextInputStream;wx/txtstrm.h|" "wxTextOutputStream;wx/txtstrm.h|" "wxTextValidator;wx/valtext.h|" "wxTheClipboard;wx/clipbrd.h|" "wxThread;wx/thread.h|" "wxThreadHelper;wx/thread.h|" "wxTimer;wx/timer.h|" "wxTimerEvent;wx/timer.h|" "wxTimeSpan;wx/datetime.h|" "wxTipProvider;wx/tipdlg.h|" "wxTipWindow;wx/tipwin.h|" "wxToggleButton;wx/tglbtn.h|" "wxToolBar;wx/toolbar.h|" "wxToolbook;wx/toolbook.h|" "wxToolTip;wx/tooltip.h|" "wxTopLevelWindow;wx/toplevel.h|" "wxTreebook;wx/treebook.h|" "wxTreebookEvent;wx/treebook.h|" "wxTreeCtrl;wx/treectrl.h|" "wxTreeEvent;wx/treectrl.h|" "wxTreeItemData;wx/treectrl.h|" "wxTreeItemId;wx/treebase.h|" "wxUnsetEnv;wx/utils.h|" "wxUpdateUIEvent;wx/event.h|" "wxURI;wx/uri.h|" "wxURL;wx/url.h|" "wxURLDataObject;wx/dataobj.h|" "wxVaCopy;wx/defs.h|" "wxValidator;wx/validate.h|" "wxVariant;wx/variant.h|" "wxVariantData;wx/variant.h|" "wxView;wx/docview.h|" "wxVListBox;wx/vlbox.h|" "wxVScrolledWindow;wx/vscroll.h|" "wxWindow;wx/window.h|" "wxWindowUpdateLocker;wx/wupdlock.h|" "wxWindowCreateEvent;wx/event.h|" "wxWindowDC;wx/dcclient.h|" "wxWindowDestroyEvent;wx/event.h|" "wxWindowDisabler;wx/utils.h|" "wxWizard;wx/wizard.h|" "wxWizardEvent;wx/wizard.h|" "wxWizardPage;wx/wizard.h|" "wxWizardPageSimple;wx/wizard.h|" "wxXmlDocument;wx/xml/xml.h|" "wxXmlNode;wx/xml/xml.h|" "wxXmlProperty;wx/xml/xml.h|" "wxXmlResource;wx/xrc/xmlres.h|" "wxXmlResourceHandler;wx/xrc/xmlres.h|" "wxZipClassFactory;wx/zipstrm.h|" "wxZipEntry;wx/zipstrm.h|" "wxZipInputStream;wx/zipstrm.h|" "wxZipNotifier;wx/zipstrm.h|" "wxZipOutputStream;wx/zipstrm.h|" "wxZlibInputStream;wx/zstream.h|" "wxZlibOutputStream;wx/zstream.h"); const wxArrayString arWxWidgets_2_8_8 = GetArrayFromString(strWxWidgets_2_8_8, _T("|")); for(std::size_t i = 0; i < arWxWidgets_2_8_8.GetCount(); ++i) { const wxArrayString arTmp = GetArrayFromString(arWxWidgets_2_8_8.Item(i), _T(";")); AddBinding(_T("wxWidgets_2_8_8"), arTmp.Item(0), arTmp.Item(1) ); } }// SetDefaultsWxWidgets void Bindings::SetDefaultsSTL() { AddBinding(_T("STL"),_T("adjacent_find"), _T("algorithm")); AddBinding(_T("STL"),_T("binary_search"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_copy_backward"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_fill_n"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_generate_n"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_merge"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_remove_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_remove_copy_if"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_replace_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_replace_copy_if"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_reverse_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_rotate_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_set_difference"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_set_intersection"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_set_symmetric_difference"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_set_union"), _T("algorithm")); AddBinding(_T("STL"),_T("checked_unique_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("copy"), _T("algorithm")); AddBinding(_T("STL"),_T("copy_backward"), _T("algorithm")); AddBinding(_T("STL"),_T("count"), _T("algorithm")); AddBinding(_T("STL"),_T("count_if"), _T("algorithm")); AddBinding(_T("STL"),_T("equal"), _T("algorithm")); AddBinding(_T("STL"),_T("equal_range"), _T("algorithm")); AddBinding(_T("STL"),_T("fill"), _T("algorithm")); AddBinding(_T("STL"),_T("fill_n"), _T("algorithm")); AddBinding(_T("STL"),_T("find"), _T("algorithm")); AddBinding(_T("STL"),_T("find_end"), _T("algorithm")); AddBinding(_T("STL"),_T("find_first_of"), _T("algorithm")); AddBinding(_T("STL"),_T("find_if"), _T("algorithm")); AddBinding(_T("STL"),_T("for_each"), _T("algorithm")); AddBinding(_T("STL"),_T("generate"), _T("algorithm")); AddBinding(_T("STL"),_T("generate_n"), _T("algorithm")); AddBinding(_T("STL"),_T("includes"), _T("algorithm")); AddBinding(_T("STL"),_T("inplace_merge"), _T("algorithm")); AddBinding(_T("STL"),_T("iter_swap"), _T("algorithm")); AddBinding(_T("STL"),_T("lexicographical_compare"), _T("algorithm")); AddBinding(_T("STL"),_T("lower_bound"), _T("algorithm")); AddBinding(_T("STL"),_T("make_heap"), _T("algorithm")); AddBinding(_T("STL"),_T("max"), _T("algorithm")); AddBinding(_T("STL"),_T("max_element"), _T("algorithm")); AddBinding(_T("STL"),_T("merge"), _T("algorithm")); AddBinding(_T("STL"),_T("min"), _T("algorithm")); AddBinding(_T("STL"),_T("min_element"), _T("algorithm")); AddBinding(_T("STL"),_T("mismatch"), _T("algorithm")); AddBinding(_T("STL"),_T("next_permutation"), _T("algorithm")); AddBinding(_T("STL"),_T("nth_element"), _T("algorithm")); AddBinding(_T("STL"),_T("partial_sort"), _T("algorithm")); AddBinding(_T("STL"),_T("partial_sort_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("partition"), _T("algorithm")); AddBinding(_T("STL"),_T("pop_heap"), _T("algorithm")); AddBinding(_T("STL"),_T("prev_permutation"), _T("algorithm")); AddBinding(_T("STL"),_T("push_heap"), _T("algorithm")); AddBinding(_T("STL"),_T("random_shuffle"), _T("algorithm")); AddBinding(_T("STL"),_T("remove"), _T("algorithm")); AddBinding(_T("STL"),_T("remove_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("remove_copy_if"), _T("algorithm")); AddBinding(_T("STL"),_T("remove_if"), _T("algorithm")); AddBinding(_T("STL"),_T("replace"), _T("algorithm")); AddBinding(_T("STL"),_T("replace_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("replace_copy_if"), _T("algorithm")); AddBinding(_T("STL"),_T("replace_if"), _T("algorithm")); AddBinding(_T("STL"),_T("reverse"), _T("algorithm")); AddBinding(_T("STL"),_T("reverse_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("rotate"), _T("algorithm")); AddBinding(_T("STL"),_T("rotate_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("search"), _T("algorithm")); AddBinding(_T("STL"),_T("search_n"), _T("algorithm")); AddBinding(_T("STL"),_T("set_difference"), _T("algorithm")); AddBinding(_T("STL"),_T("set_intersection"), _T("algorithm")); AddBinding(_T("STL"),_T("set_symmetric_difference"), _T("algorithm")); AddBinding(_T("STL"),_T("set_union"), _T("algorithm")); AddBinding(_T("STL"),_T("sort"), _T("algorithm")); AddBinding(_T("STL"),_T("sort_heap"), _T("algorithm")); AddBinding(_T("STL"),_T("stable_partition"), _T("algorithm")); AddBinding(_T("STL"),_T("stable_sort"), _T("algorithm")); AddBinding(_T("STL"),_T("swap"), _T("algorithm")); AddBinding(_T("STL"),_T("swap_ranges"), _T("algorithm")); AddBinding(_T("STL"),_T("transform"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_copy_backward"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_fill_n"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_generate_n"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_merge"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_remove_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_remove_copy_if"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_replace_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_replace_copy_if"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_reverse_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_rotate_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_set_difference"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_set_intersection"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_set_symmetric_difference"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_set_union"), _T("algorithm")); AddBinding(_T("STL"),_T("unchecked_unique_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("unique"), _T("algorithm")); AddBinding(_T("STL"),_T("unique_copy"), _T("algorithm")); AddBinding(_T("STL"),_T("upper_bound"), _T("algorithm")); AddBinding(_T("STL"),_T("bitset"), _T("bitset")); AddBinding(_T("STL"),_T("arg"), _T("complex")); AddBinding(_T("STL"),_T("complex"), _T("complex")); AddBinding(_T("STL"),_T("conj"), _T("complex")); AddBinding(_T("STL"),_T("imag"), _T("complex")); AddBinding(_T("STL"),_T("norm"), _T("complex")); AddBinding(_T("STL"),_T("polar"), _T("complex")); AddBinding(_T("STL"),_T("real"), _T("complex")); AddBinding(_T("STL"),_T("deque"), _T("deque")); AddBinding(_T("STL"),_T("bad_exception"), _T("exception")); AddBinding(_T("STL"),_T("exception"), _T("exception")); AddBinding(_T("STL"),_T("set_terminate"), _T("exception")); AddBinding(_T("STL"),_T("set_unexpected"), _T("exception")); AddBinding(_T("STL"),_T("terminate"), _T("exception")); AddBinding(_T("STL"),_T("terminate_handler"), _T("exception")); AddBinding(_T("STL"),_T("uncaught_exception"), _T("exception")); AddBinding(_T("STL"),_T("unexpected"), _T("exception")); AddBinding(_T("STL"),_T("unexpected_handler"), _T("exception")); AddBinding(_T("STL"),_T("basic_filebuf"), _T("fstream")); AddBinding(_T("STL"),_T("basic_fstream"), _T("fstream")); AddBinding(_T("STL"),_T("basic_ifstream"), _T("fstream")); AddBinding(_T("STL"),_T("basic_ofstream"), _T("fstream")); AddBinding(_T("STL"),_T("filebuf"), _T("fstream")); AddBinding(_T("STL"),_T("fstream"), _T("fstream")); AddBinding(_T("STL"),_T("ifstream"), _T("fstream")); AddBinding(_T("STL"),_T("ofstream"), _T("fstream")); AddBinding(_T("STL"),_T("wfilebuf"), _T("fstream")); AddBinding(_T("STL"),_T("wfstream"), _T("fstream")); AddBinding(_T("STL"),_T("wifstream"), _T("fstream")); AddBinding(_T("STL"),_T("wofstream"), _T("fstream")); AddBinding(_T("STL"),_T("binary_function"), _T("functional")); AddBinding(_T("STL"),_T("binary_negate"), _T("functional")); AddBinding(_T("STL"),_T("bind1st"), _T("functional")); AddBinding(_T("STL"),_T("bind2nd"), _T("functional")); AddBinding(_T("STL"),_T("binder1st"), _T("functional")); AddBinding(_T("STL"),_T("binder2nd"), _T("functional")); AddBinding(_T("STL"),_T("const_mem_fun_ref_t"), _T("functional")); AddBinding(_T("STL"),_T("const_mem_fun_t"), _T("functional")); AddBinding(_T("STL"),_T("const_mem_fun1_ref_t"), _T("functional")); AddBinding(_T("STL"),_T("const_mem_fun1_t"), _T("functional")); AddBinding(_T("STL"),_T("divides"), _T("functional")); AddBinding(_T("STL"),_T("equal_to"), _T("functional")); AddBinding(_T("STL"),_T("greater"), _T("functional")); AddBinding(_T("STL"),_T("greater_equal"), _T("functional")); AddBinding(_T("STL"),_T("less"), _T("functional")); AddBinding(_T("STL"),_T("less_equal"), _T("functional")); AddBinding(_T("STL"),_T("logical_and"), _T("functional")); AddBinding(_T("STL"),_T("logical_not"), _T("functional")); AddBinding(_T("STL"),_T("logical_or"), _T("functional")); AddBinding(_T("STL"),_T("mem_fun"), _T("functional")); AddBinding(_T("STL"),_T("mem_fun_ref"), _T("functional")); AddBinding(_T("STL"),_T("mem_fun_ref_t"), _T("functional")); AddBinding(_T("STL"),_T("mem_fun_t"), _T("functional")); AddBinding(_T("STL"),_T("mem_fun1_ref_t"), _T("functional")); AddBinding(_T("STL"),_T("mem_fun1_t"), _T("functional")); AddBinding(_T("STL"),_T("minus"), _T("functional")); AddBinding(_T("STL"),_T("modulus"), _T("functional")); AddBinding(_T("STL"),_T("multiplies"), _T("functional")); AddBinding(_T("STL"),_T("negate"), _T("functional")); AddBinding(_T("STL"),_T("not_equal_to"), _T("functional")); AddBinding(_T("STL"),_T("not1"), _T("functional")); AddBinding(_T("STL"),_T("not2"), _T("functional")); AddBinding(_T("STL"),_T("plus"), _T("functional")); AddBinding(_T("STL"),_T("pointer_to_binary_function"), _T("functional")); AddBinding(_T("STL"),_T("pointer_to_unary_function"), _T("functional")); AddBinding(_T("STL"),_T("ptr_fun"), _T("functional")); AddBinding(_T("STL"),_T("unary_function"), _T("functional")); AddBinding(_T("STL"),_T("unary_negate"), _T("functional")); AddBinding(_T("STL"),_T("hash_compare"), _T("hash_map")); AddBinding(_T("STL"),_T("hash_map"), _T("hash_map")); AddBinding(_T("STL"),_T("hash_multimap"), _T("hash_map")); AddBinding(_T("STL"),_T("value_compare"), _T("hash_map")); AddBinding(_T("STL"),_T("hash_multiset"), _T("hash_set")); AddBinding(_T("STL"),_T("hash_set"), _T("hash_set")); AddBinding(_T("STL"),_T("get_money"), _T("iomanip")); AddBinding(_T("STL"),_T("get_time"), _T("iomanip")); AddBinding(_T("STL"),_T("put_money"), _T("iomanip")); AddBinding(_T("STL"),_T("put_time"), _T("iomanip")); AddBinding(_T("STL"),_T("resetiosflags"), _T("iomanip")); AddBinding(_T("STL"),_T("setbase"), _T("iomanip")); AddBinding(_T("STL"),_T("setfill"), _T("iomanip")); AddBinding(_T("STL"),_T("setiosflags"), _T("iomanip")); AddBinding(_T("STL"),_T("setprecision"), _T("iomanip")); AddBinding(_T("STL"),_T("setw"), _T("iomanip")); AddBinding(_T("STL"),_T("cerr"), _T("iostream")); AddBinding(_T("STL"),_T("cin"), _T("iostream")); AddBinding(_T("STL"),_T("clog"), _T("iostream")); AddBinding(_T("STL"),_T("cout"), _T("iostream")); AddBinding(_T("STL"),_T("endl"), _T("iostream")); AddBinding(_T("STL"),_T("istream"), _T("iostream")); AddBinding(_T("STL"),_T("ostream"), _T("iostream")); AddBinding(_T("STL"),_T("wcerr"), _T("iostream")); AddBinding(_T("STL"),_T("wcin"), _T("iostream")); AddBinding(_T("STL"),_T("wclog"), _T("iostream")); AddBinding(_T("STL"),_T("wcout"), _T("iostream")); AddBinding(_T("STL"),_T("advance"), _T("iterator")); AddBinding(_T("STL"),_T("back_inserter"), _T("iterator")); AddBinding(_T("STL"),_T("distance"), _T("iterator")); AddBinding(_T("STL"),_T("front_inserter"), _T("iterator")); AddBinding(_T("STL"),_T("inserter"), _T("iterator")); AddBinding(_T("STL"),_T("make_move_iterator"), _T("iterator")); AddBinding(_T("STL"),_T("back_insert_iterator"), _T("iterator")); AddBinding(_T("STL"),_T("bidirectional_iterator_tag"), _T("iterator")); AddBinding(_T("STL"),_T("checked_array_iterator"), _T("iterator")); AddBinding(_T("STL"),_T("forward_iterator_tag"), _T("iterator")); AddBinding(_T("STL"),_T("front_insert_iterator"), _T("iterator")); AddBinding(_T("STL"),_T("input_iterator_tag"), _T("iterator")); AddBinding(_T("STL"),_T("insert_iterator"), _T("iterator")); AddBinding(_T("STL"),_T("istream_iterator"), _T("iterator")); AddBinding(_T("STL"),_T("istreambuf_iterator"), _T("iterator")); AddBinding(_T("STL"),_T("iterator"), _T("iterator")); AddBinding(_T("STL"),_T("iterator_traits"), _T("iterator")); AddBinding(_T("STL"),_T("move_iterator"), _T("iterator")); AddBinding(_T("STL"),_T("ostream_iterator"), _T("iterator")); AddBinding(_T("STL"),_T("ostreambuf_iterator"), _T("iterator")); AddBinding(_T("STL"),_T("output_iterator_tag"), _T("iterator")); AddBinding(_T("STL"),_T("random_access_iterator_tag"), _T("iterator")); AddBinding(_T("STL"),_T("reverse_iterator"), _T("iterator")); AddBinding(_T("STL"),_T("float_denorm_style"), _T("limits")); AddBinding(_T("STL"),_T("float_round_style"), _T("limits")); AddBinding(_T("STL"),_T("numeric_limits"), _T("limits")); AddBinding(_T("STL"),_T("list"), _T("list")); AddBinding(_T("STL"),_T("codecvt"), _T("locale")); AddBinding(_T("STL"),_T("codecvt_base"), _T("locale")); AddBinding(_T("STL"),_T("codecvt_byname"), _T("locale")); AddBinding(_T("STL"),_T("collate"), _T("locale")); AddBinding(_T("STL"),_T("collate_byname"), _T("locale")); AddBinding(_T("STL"),_T("ctype"), _T("locale")); AddBinding(_T("STL"),_T("ctype_base"), _T("locale")); AddBinding(_T("STL"),_T("ctype_byname"), _T("locale")); AddBinding(_T("STL"),_T("locale"), _T("locale")); AddBinding(_T("STL"),_T("messages"), _T("locale")); AddBinding(_T("STL"),_T("messages_base"), _T("locale")); AddBinding(_T("STL"),_T("messages_byname"), _T("locale")); AddBinding(_T("STL"),_T("money_base"), _T("locale")); AddBinding(_T("STL"),_T("money_get"), _T("locale")); AddBinding(_T("STL"),_T("money_put"), _T("locale")); AddBinding(_T("STL"),_T("moneypunct"), _T("locale")); AddBinding(_T("STL"),_T("moneypunct_byname"), _T("locale")); AddBinding(_T("STL"),_T("num_get"), _T("locale")); AddBinding(_T("STL"),_T("num_put"), _T("locale")); AddBinding(_T("STL"),_T("numpunct"), _T("locale")); AddBinding(_T("STL"),_T("numpunct_byname"), _T("locale")); AddBinding(_T("STL"),_T("time_base"), _T("locale")); AddBinding(_T("STL"),_T("time_get"), _T("locale")); AddBinding(_T("STL"),_T("time_put_byname"), _T("locale")); AddBinding(_T("STL"),_T("map"), _T("map")); AddBinding(_T("STL"),_T("multimap"), _T("map")); AddBinding(_T("STL"),_T("value_compare"), _T("map")); AddBinding(_T("STL"),_T("allocator"), _T("memory")); AddBinding(_T("STL"),_T("auto_ptr"), _T("memory")); AddBinding(_T("STL"),_T("checked_uninitialized_fill_n"), _T("memory")); AddBinding(_T("STL"),_T("get_temporary_buffer"), _T("memory")); AddBinding(_T("STL"),_T("raw_storage_iterator "), _T("memory")); AddBinding(_T("STL"),_T("return_temporary_buffer"), _T("memory")); AddBinding(_T("STL"),_T("unchecked_uninitialized_fill_n"), _T("memory")); AddBinding(_T("STL"),_T("uninitialized_copy"), _T("memory")); AddBinding(_T("STL"),_T("uninitialized_fill"), _T("memory")); AddBinding(_T("STL"),_T("uninitialized_fill_n"), _T("memory")); AddBinding(_T("STL"),_T("accumulate"), _T("numeric")); AddBinding(_T("STL"),_T("adjacent_difference"), _T("numeric")); AddBinding(_T("STL"),_T("checked_adjacent_difference"), _T("numeric")); AddBinding(_T("STL"),_T("checked_partial_sum"), _T("numeric")); AddBinding(_T("STL"),_T("inner_product"), _T("numeric")); AddBinding(_T("STL"),_T("partial_sum"), _T("numeric")); AddBinding(_T("STL"),_T("unchecked_adjacent_difference"), _T("numeric")); AddBinding(_T("STL"),_T("unchecked_partial_sum"), _T("numeric")); AddBinding(_T("STL"),_T("priority_queue "), _T("queue")); AddBinding(_T("STL"),_T("queue"), _T("queue")); AddBinding(_T("STL"),_T("multiset"), _T("set")); AddBinding(_T("STL"),_T("set"), _T("set")); AddBinding(_T("STL"),_T("basic_istringstream"), _T("sstream")); AddBinding(_T("STL"),_T("basic_ostringstream"), _T("sstream")); AddBinding(_T("STL"),_T("basic_stringbuf"), _T("sstream")); AddBinding(_T("STL"),_T("basic_stringstream"), _T("sstream")); AddBinding(_T("STL"),_T("istringstream"), _T("sstream")); AddBinding(_T("STL"),_T("ostringstream"), _T("sstream")); AddBinding(_T("STL"),_T("stringbuf"), _T("sstream")); AddBinding(_T("STL"),_T("stringstream"), _T("sstream")); AddBinding(_T("STL"),_T("wistringstream"), _T("sstream")); AddBinding(_T("STL"),_T("wostringstream"), _T("sstream")); AddBinding(_T("STL"),_T("wstringbuf"), _T("sstream")); AddBinding(_T("STL"),_T("wstringstream"), _T("sstream")); AddBinding(_T("STL"),_T("stack"), _T("stack")); AddBinding(_T("STL"),_T("domain_error"), _T("stdexcept")); AddBinding(_T("STL"),_T("invalid_argument "), _T("stdexcept")); AddBinding(_T("STL"),_T("length_error"), _T("stdexcept")); AddBinding(_T("STL"),_T("logic_error"), _T("stdexcept")); AddBinding(_T("STL"),_T("out_of_range"), _T("stdexcept")); AddBinding(_T("STL"),_T("overflow_error"), _T("stdexcept")); AddBinding(_T("STL"),_T("range_error"), _T("stdexcept")); AddBinding(_T("STL"),_T("runtime_error "), _T("stdexcept")); AddBinding(_T("STL"),_T("underflow_error "), _T("stdexcept")); AddBinding(_T("STL"),_T("basic_streambuf"), _T("streambuf")); AddBinding(_T("STL"),_T("streambuf"), _T("streambuf")); AddBinding(_T("STL"),_T("wstreambuf"), _T("streambuf")); AddBinding(_T("STL"),_T("basic_string"), _T("string")); AddBinding(_T("STL"),_T("char_traits"), _T("string")); AddBinding(_T("STL"),_T("string"), _T("string")); AddBinding(_T("STL"),_T("wstring"), _T("string")); AddBinding(_T("STL"),_T("istrstream"), _T("strstream")); AddBinding(_T("STL"),_T("ostrstream"), _T("strstream")); AddBinding(_T("STL"),_T("strstream"), _T("strstream")); AddBinding(_T("STL"),_T("strstreambuf"), _T("strstream")); AddBinding(_T("STL"),_T("pair"), _T("utility")); AddBinding(_T("STL"),_T("make_pair"), _T("utility")); AddBinding(_T("STL"),_T("gslice"), _T("valarray")); AddBinding(_T("STL"),_T("gslice_array"), _T("valarray")); AddBinding(_T("STL"),_T("indirect_array"), _T("valarray")); AddBinding(_T("STL"),_T("mask_array"), _T("valarray")); AddBinding(_T("STL"),_T("slice"), _T("valarray")); AddBinding(_T("STL"),_T("slice_array"), _T("valarray")); AddBinding(_T("STL"),_T("valarray"), _T("valarray")); AddBinding(_T("STL"),_T("vector"), _T("vector")); }// SetDefaultsSTL void Bindings::SetDefaultsCLibrary() { AddBinding(_T("C_Library"),_T("assert"), _T("cassert")); AddBinding(_T("C_Library"),_T("isalnum"), _T("cctype")); AddBinding(_T("C_Library"),_T("isalpha"), _T("cctype")); AddBinding(_T("C_Library"),_T("iscntrl"), _T("cctype")); AddBinding(_T("C_Library"),_T("isdigit"), _T("cctype")); AddBinding(_T("C_Library"),_T("isgraph"), _T("cctype")); AddBinding(_T("C_Library"),_T("islower"), _T("cctype")); AddBinding(_T("C_Library"),_T("isprint"), _T("cctype")); AddBinding(_T("C_Library"),_T("ispunct"), _T("cctype")); AddBinding(_T("C_Library"),_T("isspace"), _T("cctype")); AddBinding(_T("C_Library"),_T("isupper"), _T("cctype")); AddBinding(_T("C_Library"),_T("isxdigit"), _T("cctype")); AddBinding(_T("C_Library"),_T("tolower"), _T("cctype")); AddBinding(_T("C_Library"),_T("toupper"), _T("cctype")); AddBinding(_T("C_Library"),_T("setlocale"), _T("clocale")); AddBinding(_T("C_Library"),_T("localeconv"), _T("clocale")); AddBinding(_T("C_Library"),_T("fclose"), _T("cstdio")); AddBinding(_T("C_Library"),_T("fopen"), _T("cstdio")); AddBinding(_T("C_Library"),_T("fflush"), _T("cstdio")); AddBinding(_T("C_Library"),_T("freopen"), _T("cstdio")); AddBinding(_T("C_Library"),_T("setbuf"), _T("cstdio")); AddBinding(_T("C_Library"),_T("setvbuf"), _T("cstdio")); AddBinding(_T("C_Library"),_T("fprintf"), _T("cstdio")); AddBinding(_T("C_Library"),_T("fscan"), _T("cstdio")); AddBinding(_T("C_Library"),_T("printf"), _T("cstdio")); AddBinding(_T("C_Library"),_T("scanf"), _T("cstdio")); AddBinding(_T("C_Library"),_T("sprintf"), _T("cstdio")); AddBinding(_T("C_Library"),_T("sscanf"), _T("cstdio")); AddBinding(_T("C_Library"),_T("vfprintf"), _T("cstdio")); AddBinding(_T("C_Library"),_T("vprintf"), _T("cstdio")); AddBinding(_T("C_Library"),_T("vsprintf"), _T("cstdio")); AddBinding(_T("C_Library"),_T("fgetc"), _T("cstdio")); AddBinding(_T("C_Library"),_T("fgets"), _T("cstdio")); AddBinding(_T("C_Library"),_T("fputc"), _T("cstdio")); AddBinding(_T("C_Library"),_T("fputs"), _T("cstdio")); AddBinding(_T("C_Library"),_T("getc"), _T("cstdio")); AddBinding(_T("C_Library"),_T("getchar"), _T("cstdio")); AddBinding(_T("C_Library"),_T("gets"), _T("cstdio")); AddBinding(_T("C_Library"),_T("putc"), _T("cstdio")); AddBinding(_T("C_Library"),_T("putchar"), _T("cstdio")); AddBinding(_T("C_Library"),_T("puts"), _T("cstdio")); AddBinding(_T("C_Library"),_T("ungetc"), _T("cstdio")); AddBinding(_T("C_Library"),_T("fread"), _T("cstdio")); AddBinding(_T("C_Library"),_T("fwrite"), _T("cstdio")); AddBinding(_T("C_Library"),_T("fgetpos"), _T("cstdio")); AddBinding(_T("C_Library"),_T("fseek"), _T("cstdio")); AddBinding(_T("C_Library"),_T("fsetpos"), _T("cstdio")); AddBinding(_T("C_Library"),_T("ftell"), _T("cstdio")); AddBinding(_T("C_Library"),_T("rewind"), _T("cstdio")); AddBinding(_T("C_Library"),_T("clearerr"), _T("cstdio")); AddBinding(_T("C_Library"),_T("feof"), _T("cstdio")); AddBinding(_T("C_Library"),_T("ferror"), _T("cstdio")); AddBinding(_T("C_Library"),_T("perrer"), _T("cstdio")); AddBinding(_T("C_Library"),_T("FILE"), _T("cstdio")); AddBinding(_T("C_Library"),_T("abort"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("abs"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("atexit"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("atof"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("atoi"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("atol"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("bsearch"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("calloc"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("div"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("exit"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("free"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("getenv"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("labs"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("ldiv"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("malloc"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("mblen"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("mbstowcs"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("mbtowc"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("qsort"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("rand"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("realloc"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("srand"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("strtod"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("strtol"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("strtoul"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("system"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("wcstombs"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("wctomb"), _T("cstdlib")); AddBinding(_T("C_Library"),_T("memchr"), _T("cstring")); AddBinding(_T("C_Library"),_T("memcmp"), _T("cstring")); AddBinding(_T("C_Library"),_T("memcpy"), _T("cstring")); AddBinding(_T("C_Library"),_T("memmove"), _T("cstring")); AddBinding(_T("C_Library"),_T("memset"), _T("cstring")); AddBinding(_T("C_Library"),_T("strcat"), _T("cstring")); AddBinding(_T("C_Library"),_T("strchr"), _T("cstring")); AddBinding(_T("C_Library"),_T("strcmp"), _T("cstring")); AddBinding(_T("C_Library"),_T("strcoll"), _T("cstring")); AddBinding(_T("C_Library"),_T("strcpy"), _T("cstring")); AddBinding(_T("C_Library"),_T("strcspn"), _T("cstring")); AddBinding(_T("C_Library"),_T("strerror"), _T("cstring")); AddBinding(_T("C_Library"),_T("strlen"), _T("cstring")); AddBinding(_T("C_Library"),_T("strncat"), _T("cstring")); AddBinding(_T("C_Library"),_T("strncmp"), _T("cstring")); AddBinding(_T("C_Library"),_T("strncpy"), _T("cstring")); AddBinding(_T("C_Library"),_T("strpbrk"), _T("cstring")); AddBinding(_T("C_Library"),_T("strrchr"), _T("cstring")); AddBinding(_T("C_Library"),_T("strspn"), _T("cstring")); AddBinding(_T("C_Library"),_T("strstr"), _T("cstring")); AddBinding(_T("C_Library"),_T("strtok"), _T("cstring")); AddBinding(_T("C_Library"),_T("strxfrm"), _T("cstring")); AddBinding(_T("C_Library"),_T("asctime"), _T("ctime")); AddBinding(_T("C_Library"),_T("clock"), _T("ctime")); AddBinding(_T("C_Library"),_T("ctime"), _T("ctime")); AddBinding(_T("C_Library"),_T("difftime"), _T("ctime")); AddBinding(_T("C_Library"),_T("gmtime"), _T("ctime")); AddBinding(_T("C_Library"),_T("localtime"), _T("ctime")); AddBinding(_T("C_Library"),_T("mktime"), _T("ctime")); AddBinding(_T("C_Library"),_T("strftime"), _T("ctime")); AddBinding(_T("C_Library"),_T("time"), _T("ctime")); }// SetDefaultsCLibrary
gpl-3.0
joshkillinger/graphics
hw9/hw9viewer.h
228
#ifndef HW9V_H #define HW9V_H #include <QWidget> #include <QSlider> #include <QDoubleSpinBox> #include "hw9opengl.h" class Hw9viewer : public QWidget { Q_OBJECT private: Hw9opengl* ogl; public: Hw9viewer(); }; #endif
gpl-3.0
FIDATA/database-draft
install.py
3877
#!/usr/bin/env python # -*- coding: utf-8 -*- # FIDATA. Open-source system for analysis of financial and economic data # Copyright © 2012-2013 Basil Peace # This file is part of FIDATA. # # FIDATA is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # FIDATA is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with FIDATA. If not, see <http://www.gnu.org/licenses/>. import FIDATA.Engine as engine engine.initArgParser('Installer of database structure', defLogFilename = 'install.log') engine.argParser.add_argument('--disable-clear', dest = 'clear', action = 'store_false', help = "don't clear database structure (only for clean end-user installation, saves some time)" ) engine.argParser.add_argument('--disable-tests', dest = 'tests', action = 'store_false', help = "don't run tests" ) engine.argParser.add_argument('--disable-predefined-data', dest = 'predefinedData', action = 'store_false', help = "don't import predefined data" ) engine.connect(asAdmin = True) import logging from os import path srcDir = path.split(path.abspath(__file__))[0] scripts = [ 'epic/epic.sql', 'pre.sql', 'common.sql', 'intl.sql', 'fin-system.sql', 'data-sets.sql', 'data-sets.tools.sql', 'procs.sql', 'data-sets.data-set-fields.sql', 'portfolios.sql', 'trade-systems.sql', 'distributions.sql', 'data-sets.data.sql', 'procs.comp-field-functions.sql', 'procs.aggr-functions.sql', 'procs.dyn-show-functions.sql', 'procs.window-functions.sql', 'data-sets.convertors.sql', 'test/test.common.sql', 'test/test.intl.sql', 'test/test.fin-system.sql', 'test/test.data-sets.sql', 'test/test.procs.sql', 'post.sql', # Internationalization 'intl/intl.intl.sql', 'intl/fin-system.intl.sql', # TODO: Move it before our own tests (problem with search path) 'epic/test/test_asserts.sql', 'epic/test/test_core.sql', 'epic/test/test_globals.sql', 'epic/test/test_results.sql', 'epic/test/test_timing.sql', ] if engine.args.clear: scripts.insert(0, 'clear.sql') cursor = engine.conn.cursor() for script in scripts: logging.info('Importing {:s}'.format(script)) # TODO: psycopg2 methods of import script? file = open(path.join(srcDir, script), mode = 'r') scriptText = file.read() del file cursor.execute(scriptText) del scriptText engine.commit() if engine.args.tests: logging.info('Running tests') modules = [ 'common', 'intl', 'fin-system', 'data-sets', 'procs', ] # Ensure that there is enough space for test's name during output cursor.execute("SELECT typlen from pg_type where oid = 'name'::regtype") formatStr = '{0:<'+str(cursor.fetchone()[0])+'s}{1:s}' for module in modules: logging.info('TESTING MODULE: {:s}'.format(module)) logging.info(formatStr.format('name', 'result')) cursor.execute("SELECT name, result, errcode, errmsg FROM test.run_module(%s)", (module,)) for row in cursor: logging.info(formatStr.format(*row)) if row[2] != '' or row[3] != '': logging.info('Error code: {2:s}\nError message: {3:s}'.format(*row)) del formatStr del cursor, engine.conn # Import of predefined data if engine.args.predefinedData: logging.info('Importing predefined data') from subprocess import call callArgs = ['python', 'import.py', '--log-filename', engine.args.logFilename] if engine.args.devDatabase: callArgs.append('--use-dev-database') res = call(callArgs, cwd = path.join(srcDir, 'predefined-data')) if res != 0: exit(res)
gpl-3.0
craftercms/profile
security-provider/src/main/java/org/craftercms/security/social/impl/ProviderLoginSupportImpl.java
10511
/* * Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as published by * the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.craftercms.security.social.impl; import java.util.Map; import java.util.Set; import javax.servlet.http.HttpServletRequest; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.craftercms.commons.crypto.CryptoException; import org.craftercms.commons.crypto.TextEncryptor; import org.craftercms.profile.api.Profile; import org.craftercms.profile.api.exceptions.ProfileException; import org.craftercms.profile.api.services.ProfileService; import org.craftercms.security.authentication.Authentication; import org.craftercms.security.authentication.AuthenticationManager; import org.craftercms.security.exception.AuthenticationException; import org.craftercms.security.exception.OAuth2Exception; import org.craftercms.security.social.ProviderLoginSupport; import org.craftercms.security.utils.SecurityUtils; import org.craftercms.security.utils.social.ConnectionUtils; import org.springframework.beans.factory.annotation.Required; import org.springframework.social.connect.Connection; import org.springframework.social.connect.ConnectionFactory; import org.springframework.social.connect.ConnectionFactoryLocator; import org.springframework.social.connect.support.OAuth1ConnectionFactory; import org.springframework.social.connect.support.OAuth2ConnectionFactory; import org.springframework.social.connect.web.ConnectSupport; import org.springframework.util.MultiValueMap; import org.springframework.web.context.request.ServletWebRequest; /** * Default implementation of {@link ProviderLoginSupport}. On {@link #complete(String, String, HttpServletRequest)}, if the * user data of the provider connection corresponds to an existing Crafter Profile user, the profile connection data * will be updated. If a profile doesn't exist, a new one with the connection data will be created. In both cases, the * user is automatically authenticated with Crafter Profile. * * @author avasquez */ public class ProviderLoginSupportImpl implements ProviderLoginSupport { public static final String PARAM_OAUTH_TOKEN = "oauth_token"; public static final String PARAM_CODE = "code"; public static final String PARAM_ERROR = "error"; public static final String PARAM_ERROR_DESCRIPTION = "error_description"; public static final String PARAM_ERROR_URI = "error_uri"; protected ConnectSupport connectSupport; protected ConnectionFactoryLocator connectionFactoryLocator; protected ProfileService profileService; protected AuthenticationManager authenticationManager; protected TextEncryptor textEncryptor; public ProviderLoginSupportImpl() { connectSupport = new ConnectSupport(); } public void setConnectSupport(ConnectSupport connectSupport) { this.connectSupport = connectSupport; } @Required public void setConnectionFactoryLocator(ConnectionFactoryLocator connectionFactoryLocator) { this.connectionFactoryLocator = connectionFactoryLocator; } @Required public void setProfileService(ProfileService profileService) { this.profileService = profileService; } @Required public void setAuthenticationManager(AuthenticationManager authenticationManager) { this.authenticationManager = authenticationManager; } @Required public void setTextEncryptor(TextEncryptor textEncryptor) { this.textEncryptor = textEncryptor; } @Override public String start(String tenant, String providerId, HttpServletRequest request) throws AuthenticationException { return start(tenant, providerId, request, null, null); } @Override public String start(String tenant, String providerId, HttpServletRequest request, MultiValueMap<String, String> additionalUrlParams) throws AuthenticationException { return start(tenant, providerId, request, additionalUrlParams, null); } @Override public String start(String tenant, String providerId, HttpServletRequest request, MultiValueMap<String, String> additionalUrlParams, ConnectSupport connectSupport) throws AuthenticationException { if (connectSupport == null) { connectSupport = this.connectSupport; } ConnectionFactory<?> connectionFactory = getConnectionFactory(providerId); ServletWebRequest webRequest = new ServletWebRequest(request); return connectSupport.buildOAuthUrl(connectionFactory, webRequest, additionalUrlParams); } @Override public Authentication complete(String tenant, String providerId, HttpServletRequest request) throws AuthenticationException { return complete(tenant, providerId, request, null, null, null); } @Override public Authentication complete(String tenant, String providerId, HttpServletRequest request, Set<String> newUserRoles, Map<String, Object> newUserAttributes) throws AuthenticationException { return complete(tenant, providerId, request, newUserRoles, newUserAttributes, null); } @Override public Authentication complete(String tenant, String providerId, HttpServletRequest request, Set<String> newUserRoles, Map<String, Object> newUserAttributes, ConnectSupport connectSupport) throws AuthenticationException { if (connectSupport == null) { connectSupport = this.connectSupport; } Connection<?> connection = completeConnection(connectSupport, providerId, request); if (connection != null) { Profile userData = ConnectionUtils.createProfile(connection); Profile profile = getProfile(tenant, userData); if (profile == null) { if (CollectionUtils.isNotEmpty(newUserRoles)) { userData.getRoles().addAll(newUserRoles); } if (MapUtils.isNotEmpty(newUserAttributes)) { userData.getAttributes().putAll(newUserAttributes); } profile = createProfile(tenant, connection, userData); } else { profile = updateProfileConnectionData(tenant, connection, profile); } Authentication auth = authenticationManager.authenticateUser(profile); SecurityUtils.setAuthentication(request, auth); return auth; } else { return null; } } protected Connection<?> completeConnection(ConnectSupport connectSupport, String providerId, HttpServletRequest request) throws OAuth2Exception { if (StringUtils.isNotEmpty(request.getParameter(PARAM_OAUTH_TOKEN))) { OAuth1ConnectionFactory<?> connectionFactory = (OAuth1ConnectionFactory<?>)getConnectionFactory(providerId); ServletWebRequest webRequest = new ServletWebRequest(request); return connectSupport.completeConnection(connectionFactory, webRequest); } else if (StringUtils.isNotEmpty(request.getParameter(PARAM_CODE))) { OAuth2ConnectionFactory<?> connectionFactory = (OAuth2ConnectionFactory<?>)getConnectionFactory(providerId); ServletWebRequest webRequest = new ServletWebRequest(request); return connectSupport.completeConnection(connectionFactory, webRequest); } else if (StringUtils.isNotEmpty(request.getParameter(PARAM_ERROR))) { String error = request.getParameter(PARAM_ERROR); String errorDescription = request.getParameter(PARAM_ERROR_DESCRIPTION); String errorUri = request.getParameter(PARAM_ERROR_URI); throw new OAuth2Exception(error, errorDescription, errorUri); } else { return null; } } protected ConnectionFactory<?> getConnectionFactory(String providerId) { return connectionFactoryLocator.getConnectionFactory(providerId); } protected Profile getProfile(String tenant, Profile userData) { try { return profileService.getProfileByUsername(tenant, userData.getUsername()); } catch (ProfileException e) { throw new AuthenticationException("Unable to retrieve current profile for user '" + userData.getUsername() + "' of tenant '" + tenant + "'", e); } } protected Profile createProfile(String tenant, Connection<?> connection, Profile userData) { try { ConnectionUtils.addConnectionData(userData, connection.createData(), textEncryptor); return profileService.createProfile(tenant, userData.getUsername(), null, userData.getEmail(), true, userData.getRoles(), userData.getAttributes(), null); } catch (CryptoException | ProfileException e) { throw new AuthenticationException("Unable to create profile of user '" + userData.getUsername() + "' in tenant '" + tenant + "'", e); } } protected Profile updateProfileConnectionData(String tenant, Connection<?> connection, Profile profile) { try { ConnectionUtils.addConnectionData(profile, connection.createData(), textEncryptor); return profileService.updateAttributes(profile.getId().toString(), profile.getAttributes()); } catch (CryptoException | ProfileException e) { throw new AuthenticationException("Unable to update connection data of user '" + profile.getUsername() + "' of tenant '" + tenant + "'", e); } } }
gpl-3.0
kalliope-project/kalliope
docs/rest_api.md
492
# Rest API Kalliope provides the REST API to manage the synapses. For configuring the API refer to the [settings documentation](settings/settings.md#rest-api). - [Synapses API](api/synapses.md) - [Settings API](api/settings.md) ## Main API views ### Get Kalliope's version Normal response codes: 200 Error response codes: unauthorized(401) Curl command: ```bash curl -i --user admin:secret -X GET http://localhost:5000/ ``` Output example: ```JSON { "Kalliope version": "0.4.2" } ```
gpl-3.0
BardsBeardsBirds/Demo-2
Assets/Scripts/ObjectInteraction/ObjectScripts/LiftFloor.cs
101
public enum LiftFloor { None, FirstFloor, SecondFloor, ThirdFloor, FourthFloor, InBetweenFloors };
gpl-3.0
GoldRenard/JuniperBotJ
jb-common/src/main/java/ru/juniperbot/common/support/jmx/JbMetadataNamingStrategy.java
2377
package ru.juniperbot.common.support.jmx; import org.springframework.jmx.export.naming.MetadataNamingStrategy; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; public class JbMetadataNamingStrategy extends MetadataNamingStrategy { /** * Overrides Spring's naming method and replaced it with our local one. */ @Override public ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException { if (beanKey == null) { beanKey = managedBean.getClass().getName(); } ObjectName objectName = super.getObjectName(managedBean, beanKey); if (managedBean instanceof JmxNamedResource) { objectName = buildObjectName((JmxNamedResource) managedBean, objectName.getDomain()); } return objectName; } /** * Construct our object name by calling the methods in {@link JmxNamedResource}. */ private ObjectName buildObjectName(JmxNamedResource namedObject, String domainName) throws MalformedObjectNameException { String[] typeNames = namedObject.getJmxPath(); if (typeNames == null) { throw new MalformedObjectNameException("getJmxPath() is returning null for object " + namedObject); } StringBuilder nameBuilder = new StringBuilder(); nameBuilder.append(domainName); nameBuilder.append(':'); /* * Ok. This is a HACK. It seems like something in the JMX mbean naming process actually sorts the names * lexicographically. The stuff before the '=' character seems to be ignored anyway but it does look ugly. */ boolean needComma = false; int typeNameC = 0; for (String typeName : typeNames) { if (needComma) { nameBuilder.append(','); } // this will come out as 00=partition nameBuilder.append(String.format("%02d", typeNameC)); typeNameC++; nameBuilder.append('='); nameBuilder.append(typeName); needComma = true; } if (needComma) { nameBuilder.append(','); } nameBuilder.append("name="); nameBuilder.append(namedObject.getJmxName()); return ObjectName.getInstance(nameBuilder.toString()); } }
gpl-3.0
matheusgoes/SmartParking
web/css/style.css
1327
/* Distributed by http://freehtml5templates.com */ #navigation { margin-bottom: 6px; margin: 30px; margin-top: 0px; background : black; color : white; padding: 1em; text-align: left; background-color:rgba(100,100,100,0.8); border: 1px solid black; padding-left: 0px; } a:link, a:visited { text-decoration: none; color: black; margin: 10px; } a:hover { text-decoration: none; color: white } a:active { text-decoration: none } main, article, aside, canvas, figure, figure img, figcaption, hgroup, footer, header, nav, section, audio, video { display: block; text-align: justify; } body { margin:0; padding:0; } main { margin: auto; width: 1000px; } #dev{ color: gray; } header{ width: 940px; } .transbox { text-align: center; padding: 5px; margin: 30px; background-color:rgba(100,100,100,0.5); border: 1px solid black; } #logo { float: left; width: 350px; position: float; text-align: right; text-indent: 1em; } .content section { width: 940px; position: relative; float: left; text-align: left; padding-left: 40px; padding-top: 20px; } #logo a { margin: 0px; padding: 0px; }
gpl-3.0
WFMRDA/WFNM
common/mail/recovery.php
1675
<?php /* * This file is part of the ptech project. * * (c) ptech project <http://github.com/ptech> * * For the full copyright and license information, please view the LICENSE.md * file that was distributed with this source code. */ use yii\helpers\Html; use yii\helpers\Url; /** * @var ptech\user\models\User $user * @var ptech\user\models\Token $token */ $passwordUrl = Url::to(['site/update-password','uid'=>$user->auth_key,'token'=>$user->recovery_token],true); ?> <p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;"> Hello <?=$user->username?>, </p> <p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;"> We have received a request to reset the password for your account on <?= Yii::$app->name?> </p> <p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;"> Please click the link below to complete your password reset. </p> <p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;"> <a href="<?=$passwordUrl?>">Reset Password</a> </p> <p style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; font-weight: normal; margin: 0 0 10px; padding: 0;"> If you did not make this request you can ignore this email. </p>
gpl-3.0
geoffmomin/ScratchPad
Python/simplewallet.py
479
# Simple program to add the value of $1 and $5 bills in a wallet ''' Multiple line comments can be placed between triple quotations. ''' nFives = 2 nOnes = 3 total = (nFives * 5) + nOnes print "The total is $" + str(total) # Simple program to calculate how much you should be paid at work rate = 10.00 totalHours = 45 regularHours = 40 overTime = totalHours - regularHours salary = (regularHours * rate) + (overTime * rate * 1.5) print "You will be paid $" + str(salary)
gpl-3.0
18397737982/Education
superEducation/src/main/webapp/css/bootstrap.css
154469
/*! * Bootstrap v3.3.5 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ html { font-family: sans-serif; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } body { margin: 0; } article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } audio, canvas, progress, video { display: inline-block; vertical-align: baseline; } audio:not([controls]) { display: none; height: 0; } [hidden], template { display: none; } a { background-color: transparent; } a:active, a:hover { outline: 0; } abbr[title] { border-bottom: 1px dotted; } b, strong { font-weight: bold; } dfn { font-style: italic; } h1 { margin: .67em 0; font-size: 2em; } mark { color: #000; background: #ff0; } small { font-size: 80%; } sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; } sup { top: -.5em; } sub { bottom: -.25em; } img { border: 0; } svg:not(:root) { overflow: hidden; } figure { margin: 1em 40px; } hr { height: 0; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; } pre { overflow: auto; } code, kbd, pre, samp { font-family: monospace, monospace; font-size: 1em; } button, input, optgroup, select, textarea { margin: 0; font: inherit; color: inherit; } button { overflow: visible; } button, select { text-transform: none; } button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; } button[disabled], html input[disabled] { cursor: default; } button::-moz-focus-inner, input::-moz-focus-inner { padding: 0; border: 0; } input { line-height: normal; } input[type="checkbox"], input[type="radio"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; } input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { height: auto; } input[type="search"] { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; -webkit-appearance: textfield; } input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } fieldset { padding: .35em .625em .75em; margin: 0 2px; border: 1px solid #c0c0c0; } legend { padding: 0; border: 0; } textarea { overflow: auto; } optgroup { font-weight: bold; } table { border-spacing: 0; border-collapse: collapse; } td, th { padding: 0; } /*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ @media print { *, *:before, *:after { color: #000 !important; text-shadow: none !important; background: transparent !important; -webkit-box-shadow: none !important; box-shadow: none !important; } a, a:visited { text-decoration: underline; } a[href]:after { content: " (" attr(href) ")"; } abbr[title]:after { content: " (" attr(title) ")"; } a[href^="#"]:after, a[href^="javascript:"]:after { content: ""; } pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } thead { display: table-header-group; } tr, img { page-break-inside: avoid; } img { max-width: 100% !important; } p, h2, h3 { orphans: 3; widows: 3; } h2, h3 { page-break-after: avoid; } .navbar { display: none; } .btn > .caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { border: 1px solid #000; } .table { border-collapse: collapse !important; } .table td, .table th { background-color: #fff !important; } .table-bordered th, .table-bordered td { border: 1px solid #ddd !important; } } @font-face { font-family: 'Glyphicons Halflings'; src: url('../fonts/glyphicons-halflings-regular.eot'); src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); } .glyphicon { position: relative; top: 1px; display: inline-block; font-family: 'Glyphicons Halflings'; font-style: normal; font-weight: normal; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .glyphicon-asterisk:before { content: "\2a"; } .glyphicon-plus:before { content: "\2b"; } .glyphicon-euro:before, .glyphicon-eur:before { content: "\20ac"; } .glyphicon-minus:before { content: "\2212"; } .glyphicon-cloud:before { content: "\2601"; } .glyphicon-envelope:before { content: "\2709"; } .glyphicon-pencil:before { content: "\270f"; } .glyphicon-glass:before { content: "\e001"; } .glyphicon-music:before { content: "\e002"; } .glyphicon-search:before { content: "\e003"; } .glyphicon-heart:before { content: "\e005"; } .glyphicon-star:before { content: "\e006"; } .glyphicon-star-empty:before { content: "\e007"; } .glyphicon-user:before { content: "\e008"; } .glyphicon-film:before { content: "\e009"; } .glyphicon-th-large:before { content: "\e010"; } .glyphicon-th:before { content: "\e011"; } .glyphicon-th-list:before { content: "\e012"; } .glyphicon-ok:before { content: "\e013"; } .glyphicon-remove:before { content: "\e014"; } .glyphicon-zoom-in:before { content: "\e015"; } .glyphicon-zoom-out:before { content: "\e016"; } .glyphicon-off:before { content: "\e017"; } .glyphicon-signal:before { content: "\e018"; } .glyphicon-cog:before { content: "\e019"; } .glyphicon-trash:before { content: "\e020"; } .glyphicon-home:before { content: "\e021"; } .glyphicon-file:before { content: "\e022"; } .glyphicon-time:before { content: "\e023"; } .glyphicon-road:before { content: "\e024"; } .glyphicon-download-alt:before { content: "\e025"; } .glyphicon-download:before { content: "\e026"; } .glyphicon-upload:before { content: "\e027"; } .glyphicon-inbox:before { content: "\e028"; } .glyphicon-play-circle:before { content: "\e029"; } .glyphicon-repeat:before { content: "\e030"; } .glyphicon-refresh:before { content: "\e031"; } .glyphicon-list-alt:before { content: "\e032"; } .glyphicon-lock:before { content: "\e033"; } .glyphicon-flag:before { content: "\e034"; } .glyphicon-headphones:before { content: "\e035"; } .glyphicon-volume-off:before { content: "\e036"; } .glyphicon-volume-down:before { content: "\e037"; } .glyphicon-volume-up:before { content: "\e038"; } .glyphicon-qrcode:before { content: "\e039"; } .glyphicon-barcode:before { content: "\e040"; } .glyphicon-tag:before { content: "\e041"; } .glyphicon-tags:before { content: "\e042"; } .glyphicon-book:before { content: "\e043"; } .glyphicon-bookmark:before { content: "\e044"; } .glyphicon-print:before { content: "\e045"; } .glyphicon-camera:before { content: "\e046"; } .glyphicon-font:before { content: "\e047"; } .glyphicon-bold:before { content: "\e048"; } .glyphicon-italic:before { content: "\e049"; } .glyphicon-text-height:before { content: "\e050"; } .glyphicon-text-width:before { content: "\e051"; } .glyphicon-align-left:before { content: "\e052"; } .glyphicon-align-center:before { content: "\e053"; } .glyphicon-align-right:before { content: "\e054"; } .glyphicon-align-justify:before { content: "\e055"; } .glyphicon-list:before { content: "\e056"; } .glyphicon-indent-left:before { content: "\e057"; } .glyphicon-indent-right:before { content: "\e058"; } .glyphicon-facetime-video:before { content: "\e059"; } .glyphicon-picture:before { content: "\e060"; } .glyphicon-map-marker:before { content: "\e062"; } .glyphicon-adjust:before { content: "\e063"; } .glyphicon-tint:before { content: "\e064"; } .glyphicon-edit:before { content: "\e065"; } .glyphicon-share:before { content: "\e066"; } .glyphicon-check:before { content: "\e067"; } .glyphicon-move:before { content: "\e068"; } .glyphicon-step-backward:before { content: "\e069"; } .glyphicon-fast-backward:before { content: "\e070"; } .glyphicon-backward:before { content: "\e071"; } .glyphicon-play:before { content: "\e072"; } .glyphicon-pause:before { content: "\e073"; } .glyphicon-stop:before { content: "\e074"; } .glyphicon-forward:before { content: "\e075"; } .glyphicon-fast-forward:before { content: "\e076"; } .glyphicon-step-forward:before { content: "\e077"; } .glyphicon-eject:before { content: "\e078"; } .glyphicon-chevron-left:before { content: "\e079"; } .glyphicon-chevron-right:before { content: "\e080"; } .glyphicon-plus-sign:before { content: "\e081"; } .glyphicon-minus-sign:before { content: "\e082"; } .glyphicon-remove-sign:before { content: "\e083"; } .glyphicon-ok-sign:before { content: "\e084"; } .glyphicon-question-sign:before { content: "\e085"; } .glyphicon-info-sign:before { content: "\e086"; } .glyphicon-screenshot:before { content: "\e087"; } .glyphicon-remove-circle:before { content: "\e088"; } .glyphicon-ok-circle:before { content: "\e089"; } .glyphicon-ban-circle:before { content: "\e090"; } .glyphicon-arrow-left:before { content: "\e091"; } .glyphicon-arrow-right:before { content: "\e092"; } .glyphicon-arrow-up:before { content: "\e093"; } .glyphicon-arrow-down:before { content: "\e094"; } .glyphicon-share-alt:before { content: "\e095"; } .glyphicon-resize-full:before { content: "\e096"; } .glyphicon-resize-small:before { content: "\e097"; } .glyphicon-exclamation-sign:before { content: "\e101"; } .glyphicon-gift:before { content: "\e102"; } .glyphicon-leaf:before { content: "\e103"; } .glyphicon-fire:before { content: "\e104"; } .glyphicon-eye-open:before { content: "\e105"; } .glyphicon-eye-close:before { content: "\e106"; } .glyphicon-warning-sign:before { content: "\e107"; } .glyphicon-plane:before { content: "\e108"; } .glyphicon-calendar:before { content: "\e109"; } .glyphicon-random:before { content: "\e110"; } .glyphicon-comment:before { content: "\e111"; } .glyphicon-magnet:before { content: "\e112"; } .glyphicon-chevron-up:before { content: "\e113"; } .glyphicon-chevron-down:before { content: "\e114"; } .glyphicon-retweet:before { content: "\e115"; } .glyphicon-shopping-cart:before { content: "\e116"; } .glyphicon-folder-close:before { content: "\e117"; } .glyphicon-folder-open:before { content: "\e118"; } .glyphicon-resize-vertical:before { content: "\e119"; } .glyphicon-resize-horizontal:before { content: "\e120"; } .glyphicon-hdd:before { content: "\e121"; } .glyphicon-bullhorn:before { content: "\e122"; } .glyphicon-bell:before { content: "\e123"; } .glyphicon-certificate:before { content: "\e124"; } .glyphicon-thumbs-up:before { content: "\e125"; } .glyphicon-thumbs-down:before { content: "\e126"; } .glyphicon-hand-right:before { content: "\e127"; } .glyphicon-hand-left:before { content: "\e128"; } .glyphicon-hand-up:before { content: "\e129"; } .glyphicon-hand-down:before { content: "\e130"; } .glyphicon-circle-arrow-right:before { content: "\e131"; } .glyphicon-circle-arrow-left:before { content: "\e132"; } .glyphicon-circle-arrow-up:before { content: "\e133"; } .glyphicon-circle-arrow-down:before { content: "\e134"; } .glyphicon-globe:before { content: "\e135"; } .glyphicon-wrench:before { content: "\e136"; } .glyphicon-tasks:before { content: "\e137"; } .glyphicon-filter:before { content: "\e138"; } .glyphicon-briefcase:before { content: "\e139"; } .glyphicon-fullscreen:before { content: "\e140"; } .glyphicon-dashboard:before { content: "\e141"; } .glyphicon-paperclip:before { content: "\e142"; } .glyphicon-heart-empty:before { content: "\e143"; } .glyphicon-link:before { content: "\e144"; } .glyphicon-phone:before { content: "\e145"; } .glyphicon-pushpin:before { content: "\e146"; } .glyphicon-usd:before { content: "\e148"; } .glyphicon-gbp:before { content: "\e149"; } .glyphicon-sort:before { content: "\e150"; } .glyphicon-sort-by-alphabet:before { content: "\e151"; } .glyphicon-sort-by-alphabet-alt:before { content: "\e152"; } .glyphicon-sort-by-order:before { content: "\e153"; } .glyphicon-sort-by-order-alt:before { content: "\e154"; } .glyphicon-sort-by-attributes:before { content: "\e155"; } .glyphicon-sort-by-attributes-alt:before { content: "\e156"; } .glyphicon-unchecked:before { content: "\e157"; } .glyphicon-expand:before { content: "\e158"; } .glyphicon-collapse-down:before { content: "\e159"; } .glyphicon-collapse-up:before { content: "\e160"; } .glyphicon-log-in:before { content: "\e161"; } .glyphicon-flash:before { content: "\e162"; } .glyphicon-log-out:before { content: "\e163"; } .glyphicon-new-window:before { content: "\e164"; } .glyphicon-record:before { content: "\e165"; } .glyphicon-save:before { content: "\e166"; } .glyphicon-open:before { content: "\e167"; } .glyphicon-saved:before { content: "\e168"; } .glyphicon-import:before { content: "\e169"; } .glyphicon-export:before { content: "\e170"; } .glyphicon-send:before { content: "\e171"; } .glyphicon-floppy-disk:before { content: "\e172"; } .glyphicon-floppy-saved:before { content: "\e173"; } .glyphicon-floppy-remove:before { content: "\e174"; } .glyphicon-floppy-save:before { content: "\e175"; } .glyphicon-floppy-open:before { content: "\e176"; } .glyphicon-credit-card:before { content: "\e177"; } .glyphicon-transfer:before { content: "\e178"; } .glyphicon-cutlery:before { content: "\e179"; } .glyphicon-header:before { content: "\e180"; } .glyphicon-compressed:before { content: "\e181"; } .glyphicon-earphone:before { content: "\e182"; } .glyphicon-phone-alt:before { content: "\e183"; } .glyphicon-tower:before { content: "\e184"; } .glyphicon-stats:before { content: "\e185"; } .glyphicon-sd-video:before { content: "\e186"; } .glyphicon-hd-video:before { content: "\e187"; } .glyphicon-subtitles:before { content: "\e188"; } .glyphicon-sound-stereo:before { content: "\e189"; } .glyphicon-sound-dolby:before { content: "\e190"; } .glyphicon-sound-5-1:before { content: "\e191"; } .glyphicon-sound-6-1:before { content: "\e192"; } .glyphicon-sound-7-1:before { content: "\e193"; } .glyphicon-copyright-mark:before { content: "\e194"; } .glyphicon-registration-mark:before { content: "\e195"; } .glyphicon-cloud-download:before { content: "\e197"; } .glyphicon-cloud-upload:before { content: "\e198"; } .glyphicon-tree-conifer:before { content: "\e199"; } .glyphicon-tree-deciduous:before { content: "\e200"; } .glyphicon-cd:before { content: "\e201"; } .glyphicon-save-file:before { content: "\e202"; } .glyphicon-open-file:before { content: "\e203"; } .glyphicon-level-up:before { content: "\e204"; } .glyphicon-copy:before { content: "\e205"; } .glyphicon-paste:before { content: "\e206"; } .glyphicon-alert:before { content: "\e209"; } .glyphicon-equalizer:before { content: "\e210"; } .glyphicon-king:before { content: "\e211"; } .glyphicon-queen:before { content: "\e212"; } .glyphicon-pawn:before { content: "\e213"; } .glyphicon-bishop:before { content: "\e214"; } .glyphicon-knight:before { content: "\e215"; } .glyphicon-baby-formula:before { content: "\e216"; } .glyphicon-tent:before { content: "\26fa"; } .glyphicon-blackboard:before { content: "\e218"; } .glyphicon-bed:before { content: "\e219"; } .glyphicon-apple:before { content: "\f8ff"; } .glyphicon-erase:before { content: "\e221"; } .glyphicon-hourglass:before { content: "\231b"; } .glyphicon-lamp:before { content: "\e223"; } .glyphicon-duplicate:before { content: "\e224"; } .glyphicon-piggy-bank:before { content: "\e225"; } .glyphicon-scissors:before { content: "\e226"; } .glyphicon-bitcoin:before { content: "\e227"; } .glyphicon-btc:before { content: "\e227"; } .glyphicon-xbt:before { content: "\e227"; } .glyphicon-yen:before { content: "\00a5"; } .glyphicon-jpy:before { content: "\00a5"; } .glyphicon-ruble:before { content: "\20bd"; } .glyphicon-rub:before { content: "\20bd"; } .glyphicon-scale:before { content: "\e230"; } .glyphicon-ice-lolly:before { content: "\e231"; } .glyphicon-ice-lolly-tasted:before { content: "\e232"; } .glyphicon-education:before { content: "\e233"; } .glyphicon-option-horizontal:before { content: "\e234"; } .glyphicon-option-vertical:before { content: "\e235"; } .glyphicon-menu-hamburger:before { content: "\e236"; } .glyphicon-modal-window:before { content: "\e237"; } .glyphicon-oil:before { content: "\e238"; } .glyphicon-grain:before { content: "\e239"; } .glyphicon-sunglasses:before { content: "\e240"; } .glyphicon-text-size:before { content: "\e241"; } .glyphicon-text-color:before { content: "\e242"; } .glyphicon-text-background:before { content: "\e243"; } .glyphicon-object-align-top:before { content: "\e244"; } .glyphicon-object-align-bottom:before { content: "\e245"; } .glyphicon-object-align-horizontal:before { content: "\e246"; } .glyphicon-object-align-left:before { content: "\e247"; } .glyphicon-object-align-vertical:before { content: "\e248"; } .glyphicon-object-align-right:before { content: "\e249"; } .glyphicon-triangle-right:before { content: "\e250"; } .glyphicon-triangle-left:before { content: "\e251"; } .glyphicon-triangle-bottom:before { content: "\e252"; } .glyphicon-triangle-top:before { content: "\e253"; } .glyphicon-console:before { content: "\e254"; } .glyphicon-superscript:before { content: "\e255"; } .glyphicon-subscript:before { content: "\e256"; } .glyphicon-menu-left:before { content: "\e257"; } .glyphicon-menu-right:before { content: "\e258"; } .glyphicon-menu-down:before { content: "\e259"; } .glyphicon-menu-up:before { content: "\e260"; } * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } html { font-size: 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333; background-color: #fff; } input, button, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; } a { color: #337ab7; text-decoration: none; } a:hover, a:focus { color: #23527c; text-decoration: underline; } a:focus { outline: thin dotted; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } figure { margin: 0; } img { vertical-align: middle; } .img-responsive, .thumbnail > img, .thumbnail a > img, .carousel-inner > .item > img, .carousel-inner > .item > a > img { display: block; max-width: 100%; height: auto; } .img-rounded { border-radius: 6px; } .img-thumbnail { display: inline-block; max-width: 100%; height: auto; padding: 4px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; -webkit-transition: all .2s ease-in-out; -o-transition: all .2s ease-in-out; transition: all .2s ease-in-out; } .img-circle { border-radius: 50%; } hr { margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid #eee; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } .sr-only-focusable:active, .sr-only-focusable:focus { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; } [role="button"] { cursor: pointer; } h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: inherit; font-weight: 500; line-height: 1.1; color: inherit; } h1 small, h2 small, h3 small, h4 small, h5 small, h6 small, .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small, h1 .small, h2 .small, h3 .small, h4 .small, h5 .small, h6 .small, .h1 .small, .h2 .small, .h3 .small, .h4 .small, .h5 .small, .h6 .small { font-weight: normal; line-height: 1; color: #777; } h1, .h1, h2, .h2, h3, .h3 { margin-top: 20px; margin-bottom: 10px; } h1 small, .h1 small, h2 small, .h2 small, h3 small, .h3 small, h1 .small, .h1 .small, h2 .small, .h2 .small, h3 .small, .h3 .small { font-size: 65%; } h4, .h4, h5, .h5, h6, .h6 { margin-top: 10px; margin-bottom: 10px; } h4 small, .h4 small, h5 small, .h5 small, h6 small, .h6 small, h4 .small, .h4 .small, h5 .small, .h5 .small, h6 .small, .h6 .small { font-size: 75%; } h1, .h1 { font-size: 36px; } h2, .h2 { font-size: 30px; } h3, .h3 { font-size: 24px; } h4, .h4 { font-size: 18px; } h4 .q-icon { left: -5px; } .q-icon { background: rgba(0, 0, 0, 0) url("../images/icon_setting.png") repeat scroll -141px 0; display: inline-block; height: 22px; margin-right: 8px; vertical-align: top; width: 22px; } h5, .h5 { font-size: 14px; } h6, .h6 { font-size: 12px; } p { margin: 0 0 10px; } .lead { margin-bottom: 20px; font-size: 16px; font-weight: 300; line-height: 1.4; } @media (min-width: 768px) { .lead { font-size: 21px; } } small, .small { font-size: 85%; } mark, .mark { padding: .2em; background-color: #fcf8e3; } .text-left { text-align: left; } .text-right { text-align: right; } .text-center { text-align: center; } .text-justify { text-align: justify; } .text-nowrap { white-space: nowrap; } .text-lowercase { text-transform: lowercase; } .text-uppercase { text-transform: uppercase; } .text-capitalize { text-transform: capitalize; } .text-muted { color: #777; } .text-primary { color: #337ab7; } a.text-primary:hover, a.text-primary:focus { color: #286090; } .text-success { color: #3c763d; } a.text-success:hover, a.text-success:focus { color: #2b542c; } .text-info { color: #31708f; } a.text-info:hover, a.text-info:focus { color: #245269; } .text-warning { color: #8a6d3b; } a.text-warning:hover, a.text-warning:focus { color: #66512c; } .text-danger { color: #a94442; } a.text-danger:hover, a.text-danger:focus { color: #843534; } .bg-primary { color: #fff; background-color: #337ab7; } a.bg-primary:hover, a.bg-primary:focus { background-color: #286090; } .bg-success { background-color: #dff0d8; } a.bg-success:hover, a.bg-success:focus { background-color: #c1e2b3; } .bg-info { background-color: #d9edf7; } a.bg-info:hover, a.bg-info:focus { background-color: #afd9ee; } .bg-warning { background-color: #fcf8e3; } a.bg-warning:hover, a.bg-warning:focus { background-color: #f7ecb5; } .bg-danger { background-color: #f2dede; } a.bg-danger:hover, a.bg-danger:focus { background-color: #e4b9b9; } .page-header { padding-bottom: 9px; margin: 40px 0 20px; border-bottom: 1px solid #eee; } ul, ol { margin-top: 0; margin-bottom: 10px; } ul ul, ol ul, ul ol, ol ol { margin-bottom: 0; } .list-unstyled { padding-left: 0; list-style: none; } .list-inline { padding-left: 0; margin-left: -5px; list-style: none; } .list-inline > li { display: inline-block; padding-right: 5px; padding-left: 5px; } dl { margin-top: 0; margin-bottom: 20px; } dt, dd { line-height: 1.42857143; } dt { font-weight: bold; } dd { margin-left: 0; } @media (min-width: 768px) { .dl-horizontal dt { float: left; width: 160px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; } .dl-horizontal dd { margin-left: 180px; } } abbr[title], abbr[data-original-title] { cursor: help; border-bottom: 1px dotted #777; } .initialism { font-size: 90%; text-transform: uppercase; } blockquote { padding: 10px 20px; margin: 0 0 20px; font-size: 17.5px; border-left: 5px solid #eee; } blockquote p:last-child, blockquote ul:last-child, blockquote ol:last-child { margin-bottom: 0; } blockquote footer, blockquote small, blockquote .small { display: block; font-size: 80%; line-height: 1.42857143; color: #777; } blockquote footer:before, blockquote small:before, blockquote .small:before { content: '\2014 \00A0'; } .blockquote-reverse, blockquote.pull-right { padding-right: 15px; padding-left: 0; text-align: right; border-right: 5px solid #eee; border-left: 0; } .blockquote-reverse footer:before, blockquote.pull-right footer:before, .blockquote-reverse small:before, blockquote.pull-right small:before, .blockquote-reverse .small:before, blockquote.pull-right .small:before { content: ''; } .blockquote-reverse footer:after, blockquote.pull-right footer:after, .blockquote-reverse small:after, blockquote.pull-right small:after, .blockquote-reverse .small:after, blockquote.pull-right .small:after { content: '\00A0 \2014'; } address { margin-bottom: 20px; font-style: normal; line-height: 1.42857143; } code, kbd, pre, samp { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; } code { padding: 2px 4px; font-size: 90%; color: #c7254e; background-color: #f9f2f4; border-radius: 4px; } kbd { padding: 2px 4px; font-size: 90%; color: #fff; background-color: #333; border-radius: 3px; -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); } kbd kbd { padding: 0; font-size: 100%; font-weight: bold; -webkit-box-shadow: none; box-shadow: none; } pre { display: block; padding: 9.5px; margin: 0 0 10px; font-size: 13px; line-height: 1.42857143; color: #333; word-break: break-all; word-wrap: break-word; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px; } pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0; } .pre-scrollable { max-height: 340px; overflow-y: scroll; } .container { padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; } @media (min-width: 768px) { .container { width: 750px; } } @media (min-width: 992px) { .container { width: 970px; } } @media (min-width: 1200px) { .container { width: 1170px; } } .container-fluid { padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; } .row { margin-right: -15px; margin-left: -15px; } .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px; } .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { float: left; } .col-xs-12 { width: 100%; } .col-xs-11 { width: 91.66666667%; } .col-xs-10 { width: 83.33333333%; } .col-xs-9 { width: 75%; } .col-xs-8 { width: 66.66666667%; } .col-xs-7 { width: 58.33333333%; } .col-xs-6 { width: 50%; } .col-xs-5 { width: 41.66666667%; } .col-xs-4 { width: 33.33333333%; } .col-xs-3 { width: 25%; } .col-xs-2 { width: 16.66666667%; } .col-xs-1 { width: 8.33333333%; } .col-xs-pull-12 { right: 100%; } .col-xs-pull-11 { right: 91.66666667%; } .col-xs-pull-10 { right: 83.33333333%; } .col-xs-pull-9 { right: 75%; } .col-xs-pull-8 { right: 66.66666667%; } .col-xs-pull-7 { right: 58.33333333%; } .col-xs-pull-6 { right: 50%; } .col-xs-pull-5 { right: 41.66666667%; } .col-xs-pull-4 { right: 33.33333333%; } .col-xs-pull-3 { right: 25%; } .col-xs-pull-2 { right: 16.66666667%; } .col-xs-pull-1 { right: 8.33333333%; } .col-xs-pull-0 { right: auto; } .col-xs-push-12 { left: 100%; } .col-xs-push-11 { left: 91.66666667%; } .col-xs-push-10 { left: 83.33333333%; } .col-xs-push-9 { left: 75%; } .col-xs-push-8 { left: 66.66666667%; } .col-xs-push-7 { left: 58.33333333%; } .col-xs-push-6 { left: 50%; } .col-xs-push-5 { left: 41.66666667%; } .col-xs-push-4 { left: 33.33333333%; } .col-xs-push-3 { left: 25%; } .col-xs-push-2 { left: 16.66666667%; } .col-xs-push-1 { left: 8.33333333%; } .col-xs-push-0 { left: auto; } .col-xs-offset-12 { margin-left: 100%; } .col-xs-offset-11 { margin-left: 91.66666667%; } .col-xs-offset-10 { margin-left: 83.33333333%; } .col-xs-offset-9 { margin-left: 75%; } .col-xs-offset-8 { margin-left: 66.66666667%; } .col-xs-offset-7 { margin-left: 58.33333333%; } .col-xs-offset-6 { margin-left: 50%; } .col-xs-offset-5 { margin-left: 41.66666667%; } .col-xs-offset-4 { margin-left: 33.33333333%; } .col-xs-offset-3 { margin-left: 25%; } .col-xs-offset-2 { margin-left: 16.66666667%; } .col-xs-offset-1 { margin-left: 8.33333333%; } .col-xs-offset-0 { margin-left: 0; } @media (min-width: 768px) { .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { float: left; } .col-sm-12 { width: 100%; } .col-sm-11 { width: 91.66666667%; } .col-sm-10 { width: 83.33333333%; } .col-sm-9 { width: 75%; } .col-sm-8 { width: 66.66666667%; } .col-sm-7 { width: 58.33333333%; } .col-sm-6 { width: 50%; } .col-sm-5 { width: 41.66666667%; } .col-sm-4 { width: 33.33333333%; } .col-sm-3 { width: 25%; } .col-sm-2 { width: 16.66666667%; } .col-sm-1 { width: 8.33333333%; } .col-sm-pull-12 { right: 100%; } .col-sm-pull-11 { right: 91.66666667%; } .col-sm-pull-10 { right: 83.33333333%; } .col-sm-pull-9 { right: 75%; } .col-sm-pull-8 { right: 66.66666667%; } .col-sm-pull-7 { right: 58.33333333%; } .col-sm-pull-6 { right: 50%; } .col-sm-pull-5 { right: 41.66666667%; } .col-sm-pull-4 { right: 33.33333333%; } .col-sm-pull-3 { right: 25%; } .col-sm-pull-2 { right: 16.66666667%; } .col-sm-pull-1 { right: 8.33333333%; } .col-sm-pull-0 { right: auto; } .col-sm-push-12 { left: 100%; } .col-sm-push-11 { left: 91.66666667%; } .col-sm-push-10 { left: 83.33333333%; } .col-sm-push-9 { left: 75%; } .col-sm-push-8 { left: 66.66666667%; } .col-sm-push-7 { left: 58.33333333%; } .col-sm-push-6 { left: 50%; } .col-sm-push-5 { left: 41.66666667%; } .col-sm-push-4 { left: 33.33333333%; } .col-sm-push-3 { left: 25%; } .col-sm-push-2 { left: 16.66666667%; } .col-sm-push-1 { left: 8.33333333%; } .col-sm-push-0 { left: auto; } .col-sm-offset-12 { margin-left: 100%; } .col-sm-offset-11 { margin-left: 91.66666667%; } .col-sm-offset-10 { margin-left: 83.33333333%; } .col-sm-offset-9 { margin-left: 75%; } .col-sm-offset-8 { margin-left: 66.66666667%; } .col-sm-offset-7 { margin-left: 58.33333333%; } .col-sm-offset-6 { margin-left: 50%; } .col-sm-offset-5 { margin-left: 41.66666667%; } .col-sm-offset-4 { margin-left: 33.33333333%; } .col-sm-offset-3 { margin-left: 25%; } .col-sm-offset-2 { margin-left: 16.66666667%; } .col-sm-offset-1 { margin-left: 8.33333333%; } .col-sm-offset-0 { margin-left: 0; } } @media (min-width: 992px) { .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { float: left; } .col-md-12 { width: 100%; } .col-md-11 { width: 91.66666667%; } .col-md-10 { width: 83.33333333%; } .col-md-9 { width: 75%; } .col-md-8 { width: 66.66666667%; } .col-md-7 { width: 58.33333333%; } .col-md-6 { width: 50%; } .col-md-5 { width: 41.66666667%; } .col-md-4 { width: 33.33333333%; } .col-md-3 { width: 25%; } .col-md-2 { width: 16.66666667%; } .col-md-1 { width: 8.33333333%; } .col-md-pull-12 { right: 100%; } .col-md-pull-11 { right: 91.66666667%; } .col-md-pull-10 { right: 83.33333333%; } .col-md-pull-9 { right: 75%; } .col-md-pull-8 { right: 66.66666667%; } .col-md-pull-7 { right: 58.33333333%; } .col-md-pull-6 { right: 50%; } .col-md-pull-5 { right: 41.66666667%; } .col-md-pull-4 { right: 33.33333333%; } .col-md-pull-3 { right: 25%; } .col-md-pull-2 { right: 16.66666667%; } .col-md-pull-1 { right: 8.33333333%; } .col-md-pull-0 { right: auto; } .col-md-push-12 { left: 100%; } .col-md-push-11 { left: 91.66666667%; } .col-md-push-10 { left: 83.33333333%; } .col-md-push-9 { left: 75%; } .col-md-push-8 { left: 66.66666667%; } .col-md-push-7 { left: 58.33333333%; } .col-md-push-6 { left: 50%; } .col-md-push-5 { left: 41.66666667%; } .col-md-push-4 { left: 33.33333333%; } .col-md-push-3 { left: 25%; } .col-md-push-2 { left: 16.66666667%; } .col-md-push-1 { left: 8.33333333%; } .col-md-push-0 { left: auto; } .col-md-offset-12 { margin-left: 100%; } .col-md-offset-11 { margin-left: 91.66666667%; } .col-md-offset-10 { margin-left: 83.33333333%; } .col-md-offset-9 { margin-left: 75%; } .col-md-offset-8 { margin-left: 66.66666667%; } .col-md-offset-7 { margin-left: 58.33333333%; } .col-md-offset-6 { margin-left: 50%; } .col-md-offset-5 { margin-left: 41.66666667%; } .col-md-offset-4 { margin-left: 33.33333333%; } .col-md-offset-3 { margin-left: 25%; } .col-md-offset-2 { margin-left: 16.66666667%; } .col-md-offset-1 { margin-left: 8.33333333%; } .col-md-offset-0 { margin-left: 0; } } @media (min-width: 1200px) { .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { float: left; } .col-lg-12 { width: 100%; } .col-lg-11 { width: 91.66666667%; } .col-lg-10 { width: 83.33333333%; } .col-lg-9 { width: 75%; } .col-lg-8 { width: 66.66666667%; } .col-lg-7 { width: 58.33333333%; } .col-lg-6 { width: 50%; } .col-lg-5 { width: 41.66666667%; } .col-lg-4 { width: 33.33333333%; } .col-lg-3 { width: 25%; } .col-lg-2 { width: 16.66666667%; } .col-lg-1 { width: 8.33333333%; } .col-lg-pull-12 { right: 100%; } .col-lg-pull-11 { right: 91.66666667%; } .col-lg-pull-10 { right: 83.33333333%; } .col-lg-pull-9 { right: 75%; } .col-lg-pull-8 { right: 66.66666667%; } .col-lg-pull-7 { right: 58.33333333%; } .col-lg-pull-6 { right: 50%; } .col-lg-pull-5 { right: 41.66666667%; } .col-lg-pull-4 { right: 33.33333333%; } .col-lg-pull-3 { right: 25%; } .col-lg-pull-2 { right: 16.66666667%; } .col-lg-pull-1 { right: 8.33333333%; } .col-lg-pull-0 { right: auto; } .col-lg-push-12 { left: 100%; } .col-lg-push-11 { left: 91.66666667%; } .col-lg-push-10 { left: 83.33333333%; } .col-lg-push-9 { left: 75%; } .col-lg-push-8 { left: 66.66666667%; } .col-lg-push-7 { left: 58.33333333%; } .col-lg-push-6 { left: 50%; } .col-lg-push-5 { left: 41.66666667%; } .col-lg-push-4 { left: 33.33333333%; } .col-lg-push-3 { left: 25%; } .col-lg-push-2 { left: 16.66666667%; } .col-lg-push-1 { left: 8.33333333%; } .col-lg-push-0 { left: auto; } .col-lg-offset-12 { margin-left: 100%; } .col-lg-offset-11 { margin-left: 91.66666667%; } .col-lg-offset-10 { margin-left: 83.33333333%; } .col-lg-offset-9 { margin-left: 75%; } .col-lg-offset-8 { margin-left: 66.66666667%; } .col-lg-offset-7 { margin-left: 58.33333333%; } .col-lg-offset-6 { margin-left: 50%; } .col-lg-offset-5 { margin-left: 41.66666667%; } .col-lg-offset-4 { margin-left: 33.33333333%; } .col-lg-offset-3 { margin-left: 25%; } .col-lg-offset-2 { margin-left: 16.66666667%; } .col-lg-offset-1 { margin-left: 8.33333333%; } .col-lg-offset-0 { margin-left: 0; } } table { background-color: transparent; } caption { padding-top: 8px; padding-bottom: 8px; color: #777; text-align: left; } th { text-align: left; } .table { width: 100%; max-width: 100%; margin-bottom: 20px; } .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { padding: 8px; line-height: 1.42857143; vertical-align: top; border-top: 1px solid #ddd; } .table > thead > tr > th { vertical-align: bottom; border-bottom: 2px solid #ddd; } .table > caption + thead > tr:first-child > th, .table > colgroup + thead > tr:first-child > th, .table > thead:first-child > tr:first-child > th, .table > caption + thead > tr:first-child > td, .table > colgroup + thead > tr:first-child > td, .table > thead:first-child > tr:first-child > td { border-top: 0; } .table > tbody + tbody { border-top: 2px solid #ddd; } .table .table { background-color: #fff; } .table-condensed > thead > tr > th, .table-condensed > tbody > tr > th, .table-condensed > tfoot > tr > th, .table-condensed > thead > tr > td, .table-condensed > tbody > tr > td, .table-condensed > tfoot > tr > td { padding: 5px; } .table-bordered { border: 1px solid #ddd; } .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td { border: 1px solid #ddd; } .table-bordered > thead > tr > th, .table-bordered > thead > tr > td { border-bottom-width: 2px; } .table-striped > tbody > tr:nth-of-type(odd) { background-color: #f9f9f9; } .table-hover > tbody > tr:hover { background-color: #f5f5f5; } table col[class*="col-"] { position: static; display: table-column; float: none; } table td[class*="col-"], table th[class*="col-"] { position: static; display: table-cell; float: none; } .table > thead > tr > td.active, .table > tbody > tr > td.active, .table > tfoot > tr > td.active, .table > thead > tr > th.active, .table > tbody > tr > th.active, .table > tfoot > tr > th.active, .table > thead > tr.active > td, .table > tbody > tr.active > td, .table > tfoot > tr.active > td, .table > thead > tr.active > th, .table > tbody > tr.active > th, .table > tfoot > tr.active > th { background-color: #f5f5f5; } .table-hover > tbody > tr > td.active:hover, .table-hover > tbody > tr > th.active:hover, .table-hover > tbody > tr.active:hover > td, .table-hover > tbody > tr:hover > .active, .table-hover > tbody > tr.active:hover > th { background-color: #e8e8e8; } .table > thead > tr > td.success, .table > tbody > tr > td.success, .table > tfoot > tr > td.success, .table > thead > tr > th.success, .table > tbody > tr > th.success, .table > tfoot > tr > th.success, .table > thead > tr.success > td, .table > tbody > tr.success > td, .table > tfoot > tr.success > td, .table > thead > tr.success > th, .table > tbody > tr.success > th, .table > tfoot > tr.success > th { background-color: #dff0d8; } .table-hover > tbody > tr > td.success:hover, .table-hover > tbody > tr > th.success:hover, .table-hover > tbody > tr.success:hover > td, .table-hover > tbody > tr:hover > .success, .table-hover > tbody > tr.success:hover > th { background-color: #d0e9c6; } .table > thead > tr > td.info, .table > tbody > tr > td.info, .table > tfoot > tr > td.info, .table > thead > tr > th.info, .table > tbody > tr > th.info, .table > tfoot > tr > th.info, .table > thead > tr.info > td, .table > tbody > tr.info > td, .table > tfoot > tr.info > td, .table > thead > tr.info > th, .table > tbody > tr.info > th, .table > tfoot > tr.info > th { background-color: #d9edf7; } .table-hover > tbody > tr > td.info:hover, .table-hover > tbody > tr > th.info:hover, .table-hover > tbody > tr.info:hover > td, .table-hover > tbody > tr:hover > .info, .table-hover > tbody > tr.info:hover > th { background-color: #c4e3f3; } .table > thead > tr > td.warning, .table > tbody > tr > td.warning, .table > tfoot > tr > td.warning, .table > thead > tr > th.warning, .table > tbody > tr > th.warning, .table > tfoot > tr > th.warning, .table > thead > tr.warning > td, .table > tbody > tr.warning > td, .table > tfoot > tr.warning > td, .table > thead > tr.warning > th, .table > tbody > tr.warning > th, .table > tfoot > tr.warning > th { background-color: #fcf8e3; } .table-hover > tbody > tr > td.warning:hover, .table-hover > tbody > tr > th.warning:hover, .table-hover > tbody > tr.warning:hover > td, .table-hover > tbody > tr:hover > .warning, .table-hover > tbody > tr.warning:hover > th { background-color: #faf2cc; } .table > thead > tr > td.danger, .table > tbody > tr > td.danger, .table > tfoot > tr > td.danger, .table > thead > tr > th.danger, .table > tbody > tr > th.danger, .table > tfoot > tr > th.danger, .table > thead > tr.danger > td, .table > tbody > tr.danger > td, .table > tfoot > tr.danger > td, .table > thead > tr.danger > th, .table > tbody > tr.danger > th, .table > tfoot > tr.danger > th { background-color: #f2dede; } .table-hover > tbody > tr > td.danger:hover, .table-hover > tbody > tr > th.danger:hover, .table-hover > tbody > tr.danger:hover > td, .table-hover > tbody > tr:hover > .danger, .table-hover > tbody > tr.danger:hover > th { background-color: #ebcccc; } .table-responsive { min-height: .01%; overflow-x: auto; } @media screen and (max-width: 767px) { .table-responsive { width: 100%; margin-bottom: 15px; overflow-y: hidden; -ms-overflow-style: -ms-autohiding-scrollbar; border: 1px solid #ddd; } .table-responsive > .table { margin-bottom: 0; } .table-responsive > .table > thead > tr > th, .table-responsive > .table > tbody > tr > th, .table-responsive > .table > tfoot > tr > th, .table-responsive > .table > thead > tr > td, .table-responsive > .table > tbody > tr > td, .table-responsive > .table > tfoot > tr > td { white-space: nowrap; } .table-responsive > .table-bordered { border: 0; } .table-responsive > .table-bordered > thead > tr > th:first-child, .table-responsive > .table-bordered > tbody > tr > th:first-child, .table-responsive > .table-bordered > tfoot > tr > th:first-child, .table-responsive > .table-bordered > thead > tr > td:first-child, .table-responsive > .table-bordered > tbody > tr > td:first-child, .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .table-responsive > .table-bordered > thead > tr > th:last-child, .table-responsive > .table-bordered > tbody > tr > th:last-child, .table-responsive > .table-bordered > tfoot > tr > th:last-child, .table-responsive > .table-bordered > thead > tr > td:last-child, .table-responsive > .table-bordered > tbody > tr > td:last-child, .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .table-responsive > .table-bordered > tbody > tr:last-child > th, .table-responsive > .table-bordered > tfoot > tr:last-child > th, .table-responsive > .table-bordered > tbody > tr:last-child > td, .table-responsive > .table-bordered > tfoot > tr:last-child > td { border-bottom: 0; } } fieldset { min-width: 0; padding: 0; margin: 0; border: 0; } legend { display: block; width: 100%; padding: 0; margin-bottom: 20px; font-size: 21px; line-height: inherit; color: #333; border: 0; border-bottom: 1px solid #e5e5e5; } label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: bold; } input[type="search"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } input[type="radio"], input[type="checkbox"] { margin: 4px 0 0; margin-top: 1px \9; line-height: normal; } input[type="file"] { display: block; } input[type="range"] { display: block; width: 100%; } select[multiple], select[size] { height: auto; } input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { outline: thin dotted; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } output { display: block; padding-top: 7px; font-size: 14px; line-height: 1.42857143; color: #555; } .form-control { display: block; width: 100%; height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; color: #555; background-color: #fff; background-image: none; border: 1px solid #ccc; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; } .form-control:focus { border-color: #66afe9; outline: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); } .form-control::-moz-placeholder { color: #999; opacity: 1; } .form-control:-ms-input-placeholder { color: #999; } .form-control::-webkit-input-placeholder { color: #999; } .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { background-color: #eee; opacity: 1; } .form-control[disabled], fieldset[disabled] .form-control { cursor: not-allowed; } textarea.form-control { height: auto; } input[type="search"] { -webkit-appearance: none; } @media screen and (-webkit-min-device-pixel-ratio: 0) { input[type="date"].form-control, input[type="time"].form-control, input[type="datetime-local"].form-control, input[type="month"].form-control { line-height: 34px; } input[type="date"].input-sm, input[type="time"].input-sm, input[type="datetime-local"].input-sm, input[type="month"].input-sm, .input-group-sm input[type="date"], .input-group-sm input[type="time"], .input-group-sm input[type="datetime-local"], .input-group-sm input[type="month"] { line-height: 30px; } input[type="date"].input-lg, input[type="time"].input-lg, input[type="datetime-local"].input-lg, input[type="month"].input-lg, .input-group-lg input[type="date"], .input-group-lg input[type="time"], .input-group-lg input[type="datetime-local"], .input-group-lg input[type="month"] { line-height: 46px; } } .form-group { margin-bottom: 15px; } .radio, .checkbox { position: relative; display: block; margin-top: 10px; margin-bottom: 10px; } .radio label, .checkbox label { min-height: 20px; padding-left: 20px; margin-bottom: 0; font-weight: normal; cursor: pointer; } .radio input[type="radio"], .radio-inline input[type="radio"], .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"] { position: absolute; margin-top: 4px \9; margin-left: -20px; } .radio + .radio, .checkbox + .checkbox { margin-top: -5px; } .radio-inline, .checkbox-inline { position: relative; display: inline-block; padding-left: 20px; margin-bottom: 0; font-weight: normal; vertical-align: middle; cursor: pointer; } .radio-inline + .radio-inline, .checkbox-inline + .checkbox-inline { margin-top: 0; margin-left: 10px; } input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"].disabled, input[type="checkbox"].disabled, fieldset[disabled] input[type="radio"], fieldset[disabled] input[type="checkbox"] { cursor: not-allowed; } .radio-inline.disabled, .checkbox-inline.disabled, fieldset[disabled] .radio-inline, fieldset[disabled] .checkbox-inline { cursor: not-allowed; } .radio.disabled label, .checkbox.disabled label, fieldset[disabled] .radio label, fieldset[disabled] .checkbox label { cursor: not-allowed; } .form-control-static { min-height: 34px; padding-top: 7px; padding-bottom: 7px; margin-bottom: 0; } .form-control-static.input-lg, .form-control-static.input-sm { padding-right: 0; padding-left: 0; } .input-sm { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } select.input-sm { height: 30px; line-height: 30px; } textarea.input-sm, select[multiple].input-sm { height: auto; } .form-group-sm .form-control { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } .form-group-sm select.form-control { height: 30px; line-height: 30px; } .form-group-sm textarea.form-control, .form-group-sm select[multiple].form-control { height: auto; } .form-group-sm .form-control-static { height: 30px; min-height: 32px; padding: 6px 10px; font-size: 12px; line-height: 1.5; } .input-lg { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; } select.input-lg { height: 46px; line-height: 46px; } textarea.input-lg, select[multiple].input-lg { height: auto; } .form-group-lg .form-control { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; } .form-group-lg select.form-control { height: 46px; line-height: 46px; } .form-group-lg textarea.form-control, .form-group-lg select[multiple].form-control { height: auto; } .form-group-lg .form-control-static { height: 46px; min-height: 38px; padding: 11px 16px; font-size: 18px; line-height: 1.3333333; } .has-feedback { position: relative; } .has-feedback .form-control { padding-right: 42.5px; } .form-control-feedback { position: absolute; top: 0; right: 0; z-index: 2; display: block; width: 34px; height: 34px; line-height: 34px; text-align: center; pointer-events: none; } .input-lg + .form-control-feedback, .input-group-lg + .form-control-feedback, .form-group-lg .form-control + .form-control-feedback { width: 46px; height: 46px; line-height: 46px; } .input-sm + .form-control-feedback, .input-group-sm + .form-control-feedback, .form-group-sm .form-control + .form-control-feedback { width: 30px; height: 30px; line-height: 30px; } .has-success .help-block, .has-success .control-label, .has-success .radio, .has-success .checkbox, .has-success .radio-inline, .has-success .checkbox-inline, .has-success.radio label, .has-success.checkbox label, .has-success.radio-inline label, .has-success.checkbox-inline label { color: #3c763d; } .has-success .form-control { border-color: #3c763d; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); } .has-success .form-control:focus { border-color: #2b542c; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; } .has-success .input-group-addon { color: #3c763d; background-color: #dff0d8; border-color: #3c763d; } .has-success .form-control-feedback { color: #3c763d; } .has-warning .help-block, .has-warning .control-label, .has-warning .radio, .has-warning .checkbox, .has-warning .radio-inline, .has-warning .checkbox-inline, .has-warning.radio label, .has-warning.checkbox label, .has-warning.radio-inline label, .has-warning.checkbox-inline label { color: #8a6d3b; } .has-warning .form-control { border-color: #8a6d3b; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); } .has-warning .form-control:focus { border-color: #66512c; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; } .has-warning .input-group-addon { color: #8a6d3b; background-color: #fcf8e3; border-color: #8a6d3b; } .has-warning .form-control-feedback { color: #8a6d3b; } .has-error .help-block, .has-error .control-label, .has-error .radio, .has-error .checkbox, .has-error .radio-inline, .has-error .checkbox-inline, .has-error.radio label, .has-error.checkbox label, .has-error.radio-inline label, .has-error.checkbox-inline label { color: #a94442; } .has-error .form-control { border-color: #a94442; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); } .has-error .form-control:focus { border-color: #843534; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; } .has-error .input-group-addon { color: #a94442; background-color: #f2dede; border-color: #a94442; } .has-error .form-control-feedback { color: #a94442; } .has-feedback label ~ .form-control-feedback { top: 25px; } .has-feedback label.sr-only ~ .form-control-feedback { top: 0; } .help-block { display: block; margin-top: 5px; margin-bottom: 10px; color: #737373; } @media (min-width: 768px) { .form-inline .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; } .form-inline .form-control-static { display: inline-block; } .form-inline .input-group { display: inline-table; vertical-align: middle; } .form-inline .input-group .input-group-addon, .form-inline .input-group .input-group-btn, .form-inline .input-group .form-control { width: auto; } .form-inline .input-group > .form-control { width: 100%; } .form-inline .control-label { margin-bottom: 0; vertical-align: middle; } .form-inline .radio, .form-inline .checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; } .form-inline .radio label, .form-inline .checkbox label { padding-left: 0; } .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] { position: relative; margin-left: 0; } .form-inline .has-feedback .form-control-feedback { top: 0; } } .form-horizontal .radio, .form-horizontal .checkbox, .form-horizontal .radio-inline, .form-horizontal .checkbox-inline { padding-top: 7px; margin-top: 0; margin-bottom: 0; } .form-horizontal .radio, .form-horizontal .checkbox { min-height: 27px; } .form-horizontal .form-group { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { .form-horizontal .control-label { padding-top: 7px; margin-bottom: 0; text-align: right; } } .form-horizontal .has-feedback .form-control-feedback { right: 15px; } @media (min-width: 768px) { .form-horizontal .form-group-lg .control-label { padding-top: 14.333333px; font-size: 18px; } } @media (min-width: 768px) { .form-horizontal .form-group-sm .control-label { padding-top: 6px; font-size: 12px; } } .btn { display: inline-block; padding: 6px 12px; margin-bottom: 0; font-size: 14px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; -ms-touch-action: manipulation; touch-action: manipulation; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-image: none; border: 1px solid transparent; border-radius: 4px; } .btn:focus, .btn:active:focus, .btn.active:focus, .btn.focus, .btn:active.focus, .btn.active.focus { outline: thin dotted; outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } .btn:hover, .btn:focus, .btn.focus { color: #333; text-decoration: none; } .btn:active, .btn.active { background-image: none; outline: 0; -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); } .btn.disabled, .btn[disabled], fieldset[disabled] .btn { cursor: not-allowed; filter: alpha(opacity=65); -webkit-box-shadow: none; box-shadow: none; opacity: .65; } a.btn.disabled, fieldset[disabled] a.btn { pointer-events: none; } .btn-default { color: #333; background-color: #fff; border-color: #ccc; } .btn-default:focus, .btn-default.focus { color: #333; background-color: #e6e6e6; border-color: #8c8c8c; } .btn-default:hover { color: #333; background-color: #e6e6e6; border-color: #adadad; } .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { color: #333; background-color: #e6e6e6; border-color: #adadad; } .btn-default:active:hover, .btn-default.active:hover, .open > .dropdown-toggle.btn-default:hover, .btn-default:active:focus, .btn-default.active:focus, .open > .dropdown-toggle.btn-default:focus, .btn-default:active.focus, .btn-default.active.focus, .open > .dropdown-toggle.btn-default.focus { color: #333; background-color: #d4d4d4; border-color: #8c8c8c; } .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { background-image: none; } .btn-default.disabled, .btn-default[disabled], fieldset[disabled] .btn-default, .btn-default.disabled:hover, .btn-default[disabled]:hover, fieldset[disabled] .btn-default:hover, .btn-default.disabled:focus, .btn-default[disabled]:focus, fieldset[disabled] .btn-default:focus, .btn-default.disabled.focus, .btn-default[disabled].focus, fieldset[disabled] .btn-default.focus, .btn-default.disabled:active, .btn-default[disabled]:active, fieldset[disabled] .btn-default:active, .btn-default.disabled.active, .btn-default[disabled].active, fieldset[disabled] .btn-default.active { background-color: #fff; border-color: #ccc; } .btn-default .badge { color: #fff; background-color: #333; } .btn-primary { color: #fff; background-color: #337ab7; border-color: #2e6da4; } .btn-primary:focus, .btn-primary.focus { color: #fff; background-color: #286090; border-color: #122b40; } .btn-primary:hover { color: #fff; background-color: #286090; border-color: #204d74; } .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { color: #fff; background-color: #286090; border-color: #204d74; } .btn-primary:active:hover, .btn-primary.active:hover, .open > .dropdown-toggle.btn-primary:hover, .btn-primary:active:focus, .btn-primary.active:focus, .open > .dropdown-toggle.btn-primary:focus, .btn-primary:active.focus, .btn-primary.active.focus, .open > .dropdown-toggle.btn-primary.focus { color: #fff; background-color: #204d74; border-color: #122b40; } .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { background-image: none; } .btn-primary.disabled, .btn-primary[disabled], fieldset[disabled] .btn-primary, .btn-primary.disabled:hover, .btn-primary[disabled]:hover, fieldset[disabled] .btn-primary:hover, .btn-primary.disabled:focus, .btn-primary[disabled]:focus, fieldset[disabled] .btn-primary:focus, .btn-primary.disabled.focus, .btn-primary[disabled].focus, fieldset[disabled] .btn-primary.focus, .btn-primary.disabled:active, .btn-primary[disabled]:active, fieldset[disabled] .btn-primary:active, .btn-primary.disabled.active, .btn-primary[disabled].active, fieldset[disabled] .btn-primary.active { background-color: #337ab7; border-color: #2e6da4; } .btn-primary .badge { color: #337ab7; background-color: #fff; } .btn-success { color: #fff; background-color: #5cb85c; border-color: #4cae4c; } .btn-success:focus, .btn-success.focus { color: #fff; background-color: #449d44; border-color: #255625; } .btn-success:hover { color: #fff; background-color: #449d44; border-color: #398439; } .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success { color: #fff; background-color: #449d44; border-color: #398439; } .btn-success:active:hover, .btn-success.active:hover, .open > .dropdown-toggle.btn-success:hover, .btn-success:active:focus, .btn-success.active:focus, .open > .dropdown-toggle.btn-success:focus, .btn-success:active.focus, .btn-success.active.focus, .open > .dropdown-toggle.btn-success.focus { color: #fff; background-color: #398439; border-color: #255625; } .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success { background-image: none; } .btn-success.disabled, .btn-success[disabled], fieldset[disabled] .btn-success, .btn-success.disabled:hover, .btn-success[disabled]:hover, fieldset[disabled] .btn-success:hover, .btn-success.disabled:focus, .btn-success[disabled]:focus, fieldset[disabled] .btn-success:focus, .btn-success.disabled.focus, .btn-success[disabled].focus, fieldset[disabled] .btn-success.focus, .btn-success.disabled:active, .btn-success[disabled]:active, fieldset[disabled] .btn-success:active, .btn-success.disabled.active, .btn-success[disabled].active, fieldset[disabled] .btn-success.active { background-color: #5cb85c; border-color: #4cae4c; } .btn-success .badge { color: #5cb85c; background-color: #fff; } .btn-info { color: #fff; background-color: #5bc0de; border-color: #46b8da; } .btn-info:focus, .btn-info.focus { color: #fff; background-color: #31b0d5; border-color: #1b6d85; } .btn-info:hover { color: #fff; background-color: #31b0d5; border-color: #269abc; } .btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info { color: #fff; background-color: #31b0d5; border-color: #269abc; } .btn-info:active:hover, .btn-info.active:hover, .open > .dropdown-toggle.btn-info:hover, .btn-info:active:focus, .btn-info.active:focus, .open > .dropdown-toggle.btn-info:focus, .btn-info:active.focus, .btn-info.active.focus, .open > .dropdown-toggle.btn-info.focus { color: #fff; background-color: #269abc; border-color: #1b6d85; } .btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info { background-image: none; } .btn-info.disabled, .btn-info[disabled], fieldset[disabled] .btn-info, .btn-info.disabled:hover, .btn-info[disabled]:hover, fieldset[disabled] .btn-info:hover, .btn-info.disabled:focus, .btn-info[disabled]:focus, fieldset[disabled] .btn-info:focus, .btn-info.disabled.focus, .btn-info[disabled].focus, fieldset[disabled] .btn-info.focus, .btn-info.disabled:active, .btn-info[disabled]:active, fieldset[disabled] .btn-info:active, .btn-info.disabled.active, .btn-info[disabled].active, fieldset[disabled] .btn-info.active { background-color: #5bc0de; border-color: #46b8da; } .btn-info .badge { color: #5bc0de; background-color: #fff; } .btn-warning { color: #fff; background-color: #f0ad4e; border-color: #eea236; } .btn-warning:focus, .btn-warning.focus { color: #fff; background-color: #ec971f; border-color: #985f0d; } .btn-warning:hover { color: #fff; background-color: #ec971f; border-color: #d58512; } .btn-warning:active, .btn-warning.active, .open > .dropdown-toggle.btn-warning { color: #fff; background-color: #ec971f; border-color: #d58512; } .btn-warning:active:hover, .btn-warning.active:hover, .open > .dropdown-toggle.btn-warning:hover, .btn-warning:active:focus, .btn-warning.active:focus, .open > .dropdown-toggle.btn-warning:focus, .btn-warning:active.focus, .btn-warning.active.focus, .open > .dropdown-toggle.btn-warning.focus { color: #fff; background-color: #d58512; border-color: #985f0d; } .btn-warning:active, .btn-warning.active, .open > .dropdown-toggle.btn-warning { background-image: none; } .btn-warning.disabled, .btn-warning[disabled], fieldset[disabled] .btn-warning, .btn-warning.disabled:hover, .btn-warning[disabled]:hover, fieldset[disabled] .btn-warning:hover, .btn-warning.disabled:focus, .btn-warning[disabled]:focus, fieldset[disabled] .btn-warning:focus, .btn-warning.disabled.focus, .btn-warning[disabled].focus, fieldset[disabled] .btn-warning.focus, .btn-warning.disabled:active, .btn-warning[disabled]:active, fieldset[disabled] .btn-warning:active, .btn-warning.disabled.active, .btn-warning[disabled].active, fieldset[disabled] .btn-warning.active { background-color: #f0ad4e; border-color: #eea236; } .btn-warning .badge { color: #f0ad4e; background-color: #fff; } .btn-danger { color: #fff; background-color: #d9534f; border-color: #d43f3a; } .btn-danger:focus, .btn-danger.focus { color: #fff; background-color: #c9302c; border-color: #761c19; } .btn-danger:hover { color: #fff; background-color: #c9302c; border-color: #ac2925; } .btn-danger:active, .btn-danger.active, .open > .dropdown-toggle.btn-danger { color: #fff; background-color: #c9302c; border-color: #ac2925; } .btn-danger:active:hover, .btn-danger.active:hover, .open > .dropdown-toggle.btn-danger:hover, .btn-danger:active:focus, .btn-danger.active:focus, .open > .dropdown-toggle.btn-danger:focus, .btn-danger:active.focus, .btn-danger.active.focus, .open > .dropdown-toggle.btn-danger.focus { color: #fff; background-color: #ac2925; border-color: #761c19; } .btn-danger:active, .btn-danger.active, .open > .dropdown-toggle.btn-danger { background-image: none; } .btn-danger.disabled, .btn-danger[disabled], fieldset[disabled] .btn-danger, .btn-danger.disabled:hover, .btn-danger[disabled]:hover, fieldset[disabled] .btn-danger:hover, .btn-danger.disabled:focus, .btn-danger[disabled]:focus, fieldset[disabled] .btn-danger:focus, .btn-danger.disabled.focus, .btn-danger[disabled].focus, fieldset[disabled] .btn-danger.focus, .btn-danger.disabled:active, .btn-danger[disabled]:active, fieldset[disabled] .btn-danger:active, .btn-danger.disabled.active, .btn-danger[disabled].active, fieldset[disabled] .btn-danger.active { background-color: #d9534f; border-color: #d43f3a; } .btn-danger .badge { color: #d9534f; background-color: #fff; } .btn-link { font-weight: normal; color: #337ab7; border-radius: 0; } .btn-link, .btn-link:active, .btn-link.active, .btn-link[disabled], fieldset[disabled] .btn-link { background-color: transparent; -webkit-box-shadow: none; box-shadow: none; } .btn-link, .btn-link:hover, .btn-link:focus, .btn-link:active { border-color: transparent; } .btn-link:hover, .btn-link:focus { color: #23527c; text-decoration: underline; background-color: transparent; } .btn-link[disabled]:hover, fieldset[disabled] .btn-link:hover, .btn-link[disabled]:focus, fieldset[disabled] .btn-link:focus { color: #777; text-decoration: none; } .btn-lg, .btn-group-lg > .btn { padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; } .btn-sm, .btn-group-sm > .btn { padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } .btn-xs, .btn-group-xs > .btn { padding: 1px 5px; font-size: 12px; line-height: 1.5; border-radius: 3px; } .btn-block { display: block; width: 100%; } .btn-block + .btn-block { margin-top: 5px; } input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block { width: 100%; } .fade { opacity: 0; -webkit-transition: opacity .15s linear; -o-transition: opacity .15s linear; transition: opacity .15s linear; } .fade.in { opacity: 1; } .collapse { display: none; } .collapse.in { display: block; } tr.collapse.in { display: table-row; } tbody.collapse.in { display: table-row-group; } .collapsing { position: relative; height: 0; overflow: hidden; -webkit-transition-timing-function: ease; -o-transition-timing-function: ease; transition-timing-function: ease; -webkit-transition-duration: .35s; -o-transition-duration: .35s; transition-duration: .35s; -webkit-transition-property: height, visibility; -o-transition-property: height, visibility; transition-property: height, visibility; } .caret { display: inline-block; width: 0; height: 0; margin-left: 2px; vertical-align: middle; border-top: 4px dashed; border-top: 4px solid \9; border-right: 4px solid transparent; border-left: 4px solid transparent; } .dropup, .dropdown { position: relative; } .dropdown-toggle:focus { outline: 0; } .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 2000; display: none; float: left; min-width: 160px; padding: 5px 0; margin: 2px 0 0; font-size: 14px; text-align: left; list-style: none; background-color: #fff; -webkit-background-clip: padding-box; background-clip: padding-box; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, .15); border-radius: 4px; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); box-shadow: 0 6px 12px rgba(0, 0, 0, .175); } .dropdown-menu.pull-right { right: 0; left: auto; } .dropdown-menu .divider { height: 1px; margin: 9px 0; overflow: hidden; background-color: #e5e5e5; } .dropdown-menu > li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.42857143; color: #333; white-space: nowrap; } .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { color: #262626; text-decoration: none; background-color: #f5f5f5; } .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { color: #fff; text-decoration: none; background-color: #337ab7; outline: 0; } .dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { color: #777; } .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { text-decoration: none; cursor: not-allowed; background-color: transparent; background-image: none; filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .open > .dropdown-menu { display: block; } .open > a { outline: 0; } .dropdown-menu-right { right: 0; left: auto; } .dropdown-menu-left { right: auto; left: 0; } .dropdown-header { display: block; padding: 3px 20px; font-size: 12px; line-height: 1.42857143; color: #777; white-space: nowrap; } .dropdown-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 990; } .pull-right > .dropdown-menu { right: 0; left: auto; } .dropup .caret, .navbar-fixed-bottom .dropdown .caret { content: ""; border-top: 0; border-bottom: 4px dashed; border-bottom: 4px solid \9; } .dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { top: auto; bottom: 100%; margin-bottom: 2px; } @media (min-width: 768px) { .navbar-right .dropdown-menu { right: 0; left: auto; } .navbar-right .dropdown-menu-left { right: auto; left: 0; } } .btn-group, .btn-group-vertical { position: relative; display: inline-block; vertical-align: middle; } .btn-group > .btn, .btn-group-vertical > .btn { position: relative; float: left; } .btn-group > .btn:hover, .btn-group-vertical > .btn:hover, .btn-group > .btn:focus, .btn-group-vertical > .btn:focus, .btn-group > .btn:active, .btn-group-vertical > .btn:active, .btn-group > .btn.active, .btn-group-vertical > .btn.active { z-index: 2; } .btn-group .btn + .btn, .btn-group .btn + .btn-group, .btn-group .btn-group + .btn, .btn-group .btn-group + .btn-group { margin-left: -1px; } .btn-toolbar { margin-left: -5px; } .btn-toolbar .btn, .btn-toolbar .btn-group, .btn-toolbar .input-group { float: left; } .btn-toolbar > .btn, .btn-toolbar > .btn-group, .btn-toolbar > .input-group { margin-left: 5px; } .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { border-radius: 0; } .btn-group > .btn:first-child { margin-left: 0; } .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { border-top-right-radius: 0; border-bottom-right-radius: 0; } .btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; } .btn-group > .btn-group { float: left; } .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { border-top-right-radius: 0; border-bottom-right-radius: 0; } .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { border-top-left-radius: 0; border-bottom-left-radius: 0; } .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } .btn-group > .btn + .dropdown-toggle { padding-right: 8px; padding-left: 8px; } .btn-group > .btn-lg + .dropdown-toggle { padding-right: 12px; padding-left: 12px; } .btn-group.open .dropdown-toggle { -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); } .btn-group.open .dropdown-toggle.btn-link { -webkit-box-shadow: none; box-shadow: none; } .btn .caret { margin-left: 0; } .btn-lg .caret { border-width: 5px 5px 0; border-bottom-width: 0; } .dropup .btn-lg .caret { border-width: 0 5px 5px; } .btn-group-vertical > .btn, .btn-group-vertical > .btn-group, .btn-group-vertical > .btn-group > .btn { display: block; float: none; width: 100%; max-width: 100%; } .btn-group-vertical > .btn-group > .btn { float: none; } .btn-group-vertical > .btn + .btn, .btn-group-vertical > .btn + .btn-group, .btn-group-vertical > .btn-group + .btn, .btn-group-vertical > .btn-group + .btn-group { margin-top: -1px; margin-left: 0; } .btn-group-vertical > .btn:not(:first-child):not(:last-child) { border-radius: 0; } .btn-group-vertical > .btn:first-child:not(:last-child) { border-top-right-radius: 4px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .btn-group-vertical > .btn:last-child:not(:first-child) { border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-left-radius: 4px; } .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { border-top-left-radius: 0; border-top-right-radius: 0; } .btn-group-justified { display: table; width: 100%; table-layout: fixed; border-collapse: separate; } .btn-group-justified > .btn, .btn-group-justified > .btn-group { display: table-cell; float: none; width: 1%; } .btn-group-justified > .btn-group .btn { width: 100%; } .btn-group-justified > .btn-group .dropdown-menu { left: auto; } [data-toggle="buttons"] > .btn input[type="radio"], [data-toggle="buttons"] > .btn-group > .btn input[type="radio"], [data-toggle="buttons"] > .btn input[type="checkbox"], [data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { position: absolute; clip: rect(0, 0, 0, 0); pointer-events: none; } .input-group { position: relative; display: table; border-collapse: separate; } .input-group[class*="col-"] { float: none; padding-right: 0; padding-left: 0; } .input-group .form-control { position: relative; z-index: 2; float: left; width: 100%; margin-bottom: 0; } .input-group-lg > .form-control, .input-group-lg > .input-group-addon, .input-group-lg > .input-group-btn > .btn { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; } select.input-group-lg > .form-control, select.input-group-lg > .input-group-addon, select.input-group-lg > .input-group-btn > .btn { height: 46px; line-height: 46px; } textarea.input-group-lg > .form-control, textarea.input-group-lg > .input-group-addon, textarea.input-group-lg > .input-group-btn > .btn, select[multiple].input-group-lg > .form-control, select[multiple].input-group-lg > .input-group-addon, select[multiple].input-group-lg > .input-group-btn > .btn { height: auto; } .input-group-sm > .form-control, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .btn { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } select.input-group-sm > .form-control, select.input-group-sm > .input-group-addon, select.input-group-sm > .input-group-btn > .btn { height: 30px; line-height: 30px; } textarea.input-group-sm > .form-control, textarea.input-group-sm > .input-group-addon, textarea.input-group-sm > .input-group-btn > .btn, select[multiple].input-group-sm > .form-control, select[multiple].input-group-sm > .input-group-addon, select[multiple].input-group-sm > .input-group-btn > .btn { height: auto; } .input-group-addon, .input-group-btn, .input-group .form-control { display: table-cell; } .input-group-addon:not(:first-child):not(:last-child), .input-group-btn:not(:first-child):not(:last-child), .input-group .form-control:not(:first-child):not(:last-child) { border-radius: 0; } .input-group-addon, .input-group-btn { width: 1%; white-space: nowrap; vertical-align: middle; } .input-group-addon { padding: 6px 12px; font-size: 14px; font-weight: normal; line-height: 1; color: #555; text-align: center; background-color: #eee; border: 1px solid #ccc; border-radius: 4px; } .input-group-addon.input-sm { padding: 5px 10px; font-size: 12px; border-radius: 3px; } .input-group-addon.input-lg { padding: 10px 16px; font-size: 18px; border-radius: 6px; } .input-group-addon input[type="radio"], .input-group-addon input[type="checkbox"] { margin-top: 0; } .input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group > .btn, .input-group-btn:first-child > .dropdown-toggle, .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), .input-group-btn:last-child > .btn-group:not(:last-child) > .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; } .input-group-addon:first-child { border-right: 0; } .input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group > .btn, .input-group-btn:last-child > .dropdown-toggle, .input-group-btn:first-child > .btn:not(:first-child), .input-group-btn:first-child > .btn-group:not(:first-child) > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; } .input-group-addon:last-child { border-left: 0; } .input-group-btn { position: relative; font-size: 0; white-space: nowrap; } .input-group-btn > .btn { position: relative; } .input-group-btn > .btn + .btn { margin-left: -1px; } .input-group-btn > .btn:hover, .input-group-btn > .btn:focus, .input-group-btn > .btn:active { z-index: 2; } .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group { margin-right: -1px; } .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group { z-index: 2; margin-left: -1px; } .nav { padding-left: 0; margin-bottom: 0; list-style: none; } .nav > li { position: relative; display: block; } .nav > li > a { position: relative; display: block; padding: 10px 15px; } .nav > li > a:hover, .nav > li > a:focus { text-decoration: none; background-color: #eee; } .nav > li.disabled > a { color: #777; } .nav > li.disabled > a:hover, .nav > li.disabled > a:focus { color: #777; text-decoration: none; cursor: not-allowed; background-color: transparent; } .nav .open > a, .nav .open > a:hover, .nav .open > a:focus { background-color: #eee; border-color: #337ab7; } .nav .nav-divider { height: 1px; margin: 9px 0; overflow: hidden; background-color: #e5e5e5; } .nav > li > a > img { max-width: none; } .nav-tabs { border-bottom: 1px solid #ddd; } .nav-tabs > li { float: left; margin-bottom: -1px; } .nav-tabs > li > a { margin-right: 2px; line-height: 1.42857143; border: 1px solid transparent; border-radius: 4px 4px 0 0; } .nav-tabs > li > a:hover { border-color: #eee #eee #ddd; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus { color: #555; cursor: default; background-color: #fff; border: 1px solid #ddd; border-bottom-color: transparent; } .nav-tabs.nav-justified { width: 100%; border-bottom: 0; } .nav-tabs.nav-justified > li { float: none; } .nav-tabs.nav-justified > li > a { margin-bottom: 5px; text-align: center; } .nav-tabs.nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-tabs.nav-justified > li { display: table-cell; width: 1%; } .nav-tabs.nav-justified > li > a { margin-bottom: 0; } } .nav-tabs.nav-justified > li > a { margin-right: 0; border-radius: 4px; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border: 1px solid #ddd; } @media (min-width: 768px) { .nav-tabs.nav-justified > li > a { border-bottom: 1px solid #ddd; border-radius: 4px 4px 0 0; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border-bottom-color: #fff; } } .nav-pills > li { float: left; } .nav-pills > li > a { border-radius: 4px; } .nav-pills > li + li { margin-left: 2px; } .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { color: #fff; background-color: #337ab7; } .nav-stacked > li { float: none; } .nav-stacked > li + li { margin-top: 2px; margin-left: 0; } .nav-justified { width: 100%; } .nav-justified > li { float: none; } .nav-justified > li > a { margin-bottom: 5px; text-align: center; } .nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-justified > li { display: table-cell; width: 1%; } .nav-justified > li > a { margin-bottom: 0; } } .nav-tabs-justified { border-bottom: 0; } .nav-tabs-justified > li > a { margin-right: 0; border-radius: 4px; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border: 1px solid #ddd; } @media (min-width: 768px) { .nav-tabs-justified > li > a { border-bottom: 1px solid #ddd; border-radius: 4px 4px 0 0; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border-bottom-color: #fff; } } .tab-content > .tab-pane { display: none; } .tab-content > .active { display: block; } .nav-tabs .dropdown-menu { margin-top: -1px; border-top-left-radius: 0; border-top-right-radius: 0; } .navbar { position: relative; min-height: 50px; margin-bottom: 20px; border: 1px solid transparent; } @media (min-width: 768px) { .navbar { border-radius: 4px; } } @media (min-width: 768px) { .navbar-header { float: left; } } .navbar-collapse { padding-right: 15px; padding-left: 15px; overflow-x: visible; -webkit-overflow-scrolling: touch; border-top: 1px solid transparent; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); } .navbar-collapse.in { overflow-y: auto; } @media (min-width: 768px) { .navbar-collapse { width: auto; border-top: 0; -webkit-box-shadow: none; box-shadow: none; } .navbar-collapse.collapse { display: block !important; height: auto !important; padding-bottom: 0; overflow: visible !important; } .navbar-collapse.in { overflow-y: visible; } .navbar-fixed-top .navbar-collapse, .navbar-static-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { padding-right: 0; padding-left: 0; } } .navbar-fixed-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { max-height: 340px; } @media (max-device-width: 480px) and (orientation: landscape) { .navbar-fixed-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { max-height: 200px; } } .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: 0; margin-left: 0; } } .navbar-static-top { z-index: 1000; border-width: 0 0 1px; } @media (min-width: 768px) { .navbar-static-top { border-radius: 0; } } .navbar-fixed-top, .navbar-fixed-bottom { position: fixed; right: 0; left: 0; z-index: 1030; } @media (min-width: 768px) { .navbar-fixed-top, .navbar-fixed-bottom { border-radius: 0; } } .navbar-fixed-top { top: 0; border-width: 0 0 1px; } .navbar-fixed-bottom { bottom: 0; margin-bottom: 0; border-width: 1px 0 0; } .navbar-brand { float: left; height: 50px; padding: 15px 15px; font-size: 18px; line-height: 20px; } .navbar-brand:hover, .navbar-brand:focus { text-decoration: none; } .navbar-brand > img { display: block; } @media (min-width: 768px) { .navbar > .container .navbar-brand, .navbar > .container-fluid .navbar-brand { margin-left: -15px; } } .navbar-toggle { position: relative; float: right; padding: 9px 10px; margin-top: 8px; margin-right: 15px; margin-bottom: 8px; background-color: transparent; background-image: none; border: 1px solid transparent; border-radius: 4px; } .navbar-toggle:focus { outline: 0; } .navbar-toggle .icon-bar { display: block; width: 22px; height: 2px; border-radius: 1px; } .navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; } @media (min-width: 768px) { .navbar-toggle { display: none; } } .navbar-nav { margin: 7.5px -15px; } .navbar-nav > li > a { padding-top: 10px; padding-bottom: 10px; line-height: 20px; } @media (max-width: 767px) { .navbar-nav .open .dropdown-menu { position: static; float: none; width: auto; margin-top: 0; background-color: transparent; border: 0; -webkit-box-shadow: none; box-shadow: none; } .navbar-nav .open .dropdown-menu > li > a, .navbar-nav .open .dropdown-menu .dropdown-header { padding: 5px 15px 5px 25px; } .navbar-nav .open .dropdown-menu > li > a { line-height: 20px; } .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-nav .open .dropdown-menu > li > a:focus { background-image: none; } } @media (min-width: 768px) { .navbar-nav { float: left; margin: 0; } .navbar-nav > li { float: left; } .navbar-nav > li > a { padding-top: 15px; padding-bottom: 15px; } } .navbar-form { padding: 10px 15px; margin-top: 8px; margin-right: -15px; margin-bottom: 8px; margin-left: -15px; border-top: 1px solid transparent; border-bottom: 1px solid transparent; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); } @media (min-width: 768px) { .navbar-form .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .navbar-form .form-control { display: inline-block; width: auto; vertical-align: middle; } .navbar-form .form-control-static { display: inline-block; } .navbar-form .input-group { display: inline-table; vertical-align: middle; } .navbar-form .input-group .input-group-addon, .navbar-form .input-group .input-group-btn, .navbar-form .input-group .form-control { width: auto; } .navbar-form .input-group > .form-control { width: 100%; } .navbar-form .control-label { margin-bottom: 0; vertical-align: middle; } .navbar-form .radio, .navbar-form .checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; } .navbar-form .radio label, .navbar-form .checkbox label { padding-left: 0; } .navbar-form .radio input[type="radio"], .navbar-form .checkbox input[type="checkbox"] { position: relative; margin-left: 0; } .navbar-form .has-feedback .form-control-feedback { top: 0; } } @media (max-width: 767px) { .navbar-form .form-group { margin-bottom: 5px; } .navbar-form .form-group:last-child { margin-bottom: 0; } } @media (min-width: 768px) { .navbar-form { width: auto; padding-top: 0; padding-bottom: 0; margin-right: 0; margin-left: 0; border: 0; -webkit-box-shadow: none; box-shadow: none; } } .navbar-nav > li > .dropdown-menu { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; } .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { margin-bottom: 0; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; } .navbar-btn { margin-top: 8px; margin-bottom: 8px; } .navbar-btn.btn-sm { margin-top: 10px; margin-bottom: 10px; } .navbar-btn.btn-xs { margin-top: 14px; margin-bottom: 14px; } .navbar-text { margin-top: 15px; margin-bottom: 15px; } @media (min-width: 768px) { .navbar-text { float: left; margin-right: 15px; margin-left: 15px; } } @media (min-width: 768px) { .navbar-left { float: left !important; } .navbar-right { float: right !important; margin-right: -15px; } .navbar-right ~ .navbar-right { margin-right: 0; } } .navbar-default { background-color: #f8f8f8; border-color: #e7e7e7; } .navbar-default .navbar-brand { color: #777; } .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { color: #5e5e5e; background-color: transparent; } .navbar-default .navbar-text { color: #777; } .navbar-default .navbar-nav > li > a { color: #777; } .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { color: #333; background-color: transparent; } .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { color: #555; background-color: #e7e7e7; } .navbar-default .navbar-nav > .disabled > a, .navbar-default .navbar-nav > .disabled > a:hover, .navbar-default .navbar-nav > .disabled > a:focus { color: #ccc; background-color: transparent; } .navbar-default .navbar-toggle { border-color: #ddd; } .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { background-color: #ddd; } .navbar-default .navbar-toggle .icon-bar { background-color: #888; } .navbar-default .navbar-collapse, .navbar-default .navbar-form { border-color: #e7e7e7; } .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { color: #555; background-color: #e7e7e7; } @media (max-width: 767px) { .navbar-default .navbar-nav .open .dropdown-menu > li > a { color: #777; } .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { color: #333; background-color: transparent; } .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { color: #555; background-color: #e7e7e7; } .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #ccc; background-color: transparent; } } .navbar-default .navbar-link { color: #777; } .navbar-default .navbar-link:hover { color: #333; } .navbar-default .btn-link { color: #777; } .navbar-default .btn-link:hover, .navbar-default .btn-link:focus { color: #333; } .navbar-default .btn-link[disabled]:hover, fieldset[disabled] .navbar-default .btn-link:hover, .navbar-default .btn-link[disabled]:focus, fieldset[disabled] .navbar-default .btn-link:focus { color: #ccc; } .navbar-inverse { background-color: #222; border-color: #080808; } .navbar-inverse .navbar-brand { color: #9d9d9d; } .navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus { color: #fff; background-color: transparent; } .navbar-inverse .navbar-text { color: #9d9d9d; } .navbar-inverse .navbar-nav > li > a { color: #9d9d9d; } .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { color: #fff; background-color: transparent; } .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus { color: #fff; background-color: #080808; } .navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:hover, .navbar-inverse .navbar-nav > .disabled > a:focus { color: #444; background-color: transparent; } .navbar-inverse .navbar-toggle { border-color: #333; } .navbar-inverse .navbar-toggle:hover, .navbar-inverse .navbar-toggle:focus { background-color: #333; } .navbar-inverse .navbar-toggle .icon-bar { background-color: #fff; } .navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form { border-color: #101010; } .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus { color: #fff; background-color: #080808; } @media (max-width: 767px) { .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { border-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu .divider { background-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { color: #9d9d9d; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { color: #fff; background-color: transparent; } .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { color: #fff; background-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #444; background-color: transparent; } } .navbar-inverse .navbar-link { color: #9d9d9d; } .navbar-inverse .navbar-link:hover { color: #fff; } .navbar-inverse .btn-link { color: #9d9d9d; } .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link:focus { color: #fff; } .navbar-inverse .btn-link[disabled]:hover, fieldset[disabled] .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link[disabled]:focus, fieldset[disabled] .navbar-inverse .btn-link:focus { color: #444; } .breadcrumb { padding: 8px 15px; margin-bottom: 20px; list-style: none; background-color: #f5f5f5; border-radius: 4px; } .breadcrumb > li { display: inline-block; } .breadcrumb > li + li:before { padding: 0 5px; color: #ccc; content: "/\00a0"; } .breadcrumb > .active { color: #777; } .pagination { display: inline-block; padding-left: 0; margin: 20px 0; border-radius: 4px; } .pagination > li { display: inline; } .pagination > li > a, .pagination > li > span { position: relative; padding: 6px 12px; margin-left: -1px; line-height: 1.42857143; color: #337ab7; text-decoration: none; background-color: #fff; border: 1px solid #ddd; } .pagination > li:first-child > a, .pagination > li:first-child > span { margin-left: 0; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .pagination > li:last-child > a, .pagination > li:last-child > span { border-top-right-radius: 4px; border-bottom-right-radius: 4px; } .pagination > li > a:hover, .pagination > li > span:hover, .pagination > li > a:focus, .pagination > li > span:focus { z-index: 3; color: #23527c; background-color: #eee; border-color: #ddd; } .pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus { z-index: 2; color: #fff; cursor: default; background-color: #337ab7; border-color: #337ab7; } .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus { color: #777; cursor: not-allowed; background-color: #fff; border-color: #ddd; } .pagination-lg > li > a, .pagination-lg > li > span { padding: 10px 16px; font-size: 18px; line-height: 1.3333333; } .pagination-lg > li:first-child > a, .pagination-lg > li:first-child > span { border-top-left-radius: 6px; border-bottom-left-radius: 6px; } .pagination-lg > li:last-child > a, .pagination-lg > li:last-child > span { border-top-right-radius: 6px; border-bottom-right-radius: 6px; } .pagination-sm > li > a, .pagination-sm > li > span { padding: 5px 10px; font-size: 12px; line-height: 1.5; } .pagination-sm > li:first-child > a, .pagination-sm > li:first-child > span { border-top-left-radius: 3px; border-bottom-left-radius: 3px; } .pagination-sm > li:last-child > a, .pagination-sm > li:last-child > span { border-top-right-radius: 3px; border-bottom-right-radius: 3px; } .pager { padding-left: 0; margin: 20px 0; text-align: center; list-style: none; } .pager li { display: inline; } .pager li > a, .pager li > span { display: inline-block; padding: 5px 14px; background-color: #fff; border: 1px solid #ddd; border-radius: 15px; } .pager li > a:hover, .pager li > a:focus { text-decoration: none; background-color: #eee; } .pager .next > a, .pager .next > span { float: right; } .pager .previous > a, .pager .previous > span { float: left; } .pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > a:focus, .pager .disabled > span { color: #777; cursor: not-allowed; background-color: #fff; } .label { display: inline; padding: .2em .6em .3em; font-size: 75%; font-weight: bold; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em; } a.label:hover, a.label:focus { color: #fff; text-decoration: none; cursor: pointer; } .label:empty { display: none; } .btn .label { position: relative; top: -1px; } .label-default { background-color: #777; } .label-default[href]:hover, .label-default[href]:focus { background-color: #5e5e5e; } .label-primary { background-color: #337ab7; } .label-primary[href]:hover, .label-primary[href]:focus { background-color: #286090; } .label-success { background-color: #5cb85c; } .label-success[href]:hover, .label-success[href]:focus { background-color: #449d44; } .label-info { background-color: #5bc0de; } .label-info[href]:hover, .label-info[href]:focus { background-color: #31b0d5; } .label-warning { background-color: #f0ad4e; } .label-warning[href]:hover, .label-warning[href]:focus { background-color: #ec971f; } .label-danger { background-color: #d9534f; } .label-danger[href]:hover, .label-danger[href]:focus { background-color: #c9302c; } .badge { display: inline-block; min-width: 10px; padding: 3px 7px; font-size: 12px; font-weight: bold; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: middle; background-color: #777; border-radius: 10px; } .badge:empty { display: none; } .btn .badge { position: relative; top: -1px; } .btn-xs .badge, .btn-group-xs > .btn .badge { top: 0; padding: 1px 5px; } a.badge:hover, a.badge:focus { color: #fff; text-decoration: none; cursor: pointer; } .list-group-item.active > .badge, .nav-pills > .active > a > .badge { color: #337ab7; background-color: #fff; } .list-group-item > .badge { float: right; } .list-group-item > .badge + .badge { margin-right: 5px; } .nav-pills > li > a > .badge { margin-left: 3px; } .jumbotron { padding-top: 30px; padding-bottom: 30px; margin-bottom: 30px; color: inherit; background-color: #eee; } .jumbotron h1, .jumbotron .h1 { color: inherit; } .jumbotron p { margin-bottom: 15px; font-size: 21px; font-weight: 200; } .jumbotron > hr { border-top-color: #d5d5d5; } .container .jumbotron, .container-fluid .jumbotron { border-radius: 6px; } .jumbotron .container { max-width: 100%; } @media screen and (min-width: 768px) { .jumbotron { padding-top: 48px; padding-bottom: 48px; } .container .jumbotron, .container-fluid .jumbotron { padding-right: 60px; padding-left: 60px; } .jumbotron h1, .jumbotron .h1 { font-size: 63px; } } .thumbnail { display: block; padding: 4px; margin-bottom: 20px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; -webkit-transition: border .2s ease-in-out; -o-transition: border .2s ease-in-out; transition: border .2s ease-in-out; } .thumbnail > img, .thumbnail a > img { margin-right: auto; margin-left: auto; } a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active { border-color: #337ab7; } .thumbnail .caption { padding: 9px; color: #333; } .alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; } .alert h4 { margin-top: 0; color: inherit; } .alert .alert-link { font-weight: bold; } .alert > p, .alert > ul { margin-bottom: 0; } .alert > p + p { margin-top: 5px; } .alert-dismissable, .alert-dismissible { padding-right: 35px; } .alert-dismissable .close, .alert-dismissible .close { position: relative; top: -2px; right: -21px; color: inherit; } .alert-success { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; } .alert-success hr { border-top-color: #c9e2b3; } .alert-success .alert-link { color: #2b542c; } .alert-info { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; } .alert-info hr { border-top-color: #a6e1ec; } .alert-info .alert-link { color: #245269; } .alert-warning { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; } .alert-warning hr { border-top-color: #f7e1b5; } .alert-warning .alert-link { color: #66512c; } .alert-danger { color: #a94442; background-color: #f2dede; border-color: #ebccd1; } .alert-danger hr { border-top-color: #e4b9c0; } .alert-danger .alert-link { color: #843534; } @-webkit-keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } @-o-keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } @keyframes progress-bar-stripes { from { background-position: 40px 0; } to { background-position: 0 0; } } .progress { height: 20px; margin-bottom: 20px; overflow: hidden; background-color: #f5f5f5; border-radius: 4px; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); } .progress-bar { float: left; width: 0; height: 100%; font-size: 12px; line-height: 20px; color: #fff; text-align: center; background-color: #337ab7; -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); -webkit-transition: width .6s ease; -o-transition: width .6s ease; transition: width .6s ease; } .progress-striped .progress-bar, .progress-bar-striped { background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -webkit-background-size: 40px 40px; background-size: 40px 40px; } .progress.active .progress-bar, .progress-bar.active { -webkit-animation: progress-bar-stripes 2s linear infinite; -o-animation: progress-bar-stripes 2s linear infinite; animation: progress-bar-stripes 2s linear infinite; } .progress-bar-success { background-color: #5cb85c; } .progress-striped .progress-bar-success { background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); } .progress-bar-info { background-color: #5bc0de; } .progress-striped .progress-bar-info { background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); } .progress-bar-warning { background-color: #f0ad4e; } .progress-striped .progress-bar-warning { background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); } .progress-bar-danger { background-color: #d9534f; } .progress-striped .progress-bar-danger { background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); } .media { margin-top: 15px; } .media:first-child { margin-top: 0; } .media, .media-body { overflow: hidden; zoom: 1; } .media-body { width: 10000px; } .media-object { display: block; } .media-object.img-thumbnail { max-width: none; } .media-right, .media > .pull-right { padding-left: 10px; } .media-left, .media > .pull-left { padding-right: 10px; } .media-left, .media-right, .media-body { display: table-cell; vertical-align: top; } .media-middle { vertical-align: middle; } .media-bottom { vertical-align: bottom; } .media-heading { margin-top: 0; margin-bottom: 5px; } .media-list { padding-left: 0; list-style: none; } .list-group { padding-left: 0; margin-bottom: 20px; } .list-group-item { position: relative; display: block; padding: 10px 15px; margin-bottom: -1px; background-color: #fff; border: 1px solid #ddd; } .list-group-item:first-child { border-top-left-radius: 4px; border-top-right-radius: 4px; } .list-group-item:last-child { margin-bottom: 0; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; } a.list-group-item, button.list-group-item { color: #555; } a.list-group-item .list-group-item-heading, button.list-group-item .list-group-item-heading { color: #333; } a.list-group-item:hover, button.list-group-item:hover, a.list-group-item:focus, button.list-group-item:focus { color: #555; text-decoration: none; background-color: #f5f5f5; } button.list-group-item { width: 100%; text-align: left; } .list-group-item.disabled, .list-group-item.disabled:hover, .list-group-item.disabled:focus { color: #777; cursor: not-allowed; background-color: #eee; } .list-group-item.disabled .list-group-item-heading, .list-group-item.disabled:hover .list-group-item-heading, .list-group-item.disabled:focus .list-group-item-heading { color: inherit; } .list-group-item.disabled .list-group-item-text, .list-group-item.disabled:hover .list-group-item-text, .list-group-item.disabled:focus .list-group-item-text { color: #777; } .list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { z-index: 2; color: #fff; background-color: #337ab7; border-color: #337ab7; } .list-group-item.active .list-group-item-heading, .list-group-item.active:hover .list-group-item-heading, .list-group-item.active:focus .list-group-item-heading, .list-group-item.active .list-group-item-heading > small, .list-group-item.active:hover .list-group-item-heading > small, .list-group-item.active:focus .list-group-item-heading > small, .list-group-item.active .list-group-item-heading > .small, .list-group-item.active:hover .list-group-item-heading > .small, .list-group-item.active:focus .list-group-item-heading > .small { color: inherit; } .list-group-item.active .list-group-item-text, .list-group-item.active:hover .list-group-item-text, .list-group-item.active:focus .list-group-item-text { color: #c7ddef; } .list-group-item-success { color: #3c763d; background-color: #dff0d8; } a.list-group-item-success, button.list-group-item-success { color: #3c763d; } a.list-group-item-success .list-group-item-heading, button.list-group-item-success .list-group-item-heading { color: inherit; } a.list-group-item-success:hover, button.list-group-item-success:hover, a.list-group-item-success:focus, button.list-group-item-success:focus { color: #3c763d; background-color: #d0e9c6; } a.list-group-item-success.active, button.list-group-item-success.active, a.list-group-item-success.active:hover, button.list-group-item-success.active:hover, a.list-group-item-success.active:focus, button.list-group-item-success.active:focus { color: #fff; background-color: #3c763d; border-color: #3c763d; } .list-group-item-info { color: #31708f; background-color: #d9edf7; } a.list-group-item-info, button.list-group-item-info { color: #31708f; } a.list-group-item-info .list-group-item-heading, button.list-group-item-info .list-group-item-heading { color: inherit; } a.list-group-item-info:hover, button.list-group-item-info:hover, a.list-group-item-info:focus, button.list-group-item-info:focus { color: #31708f; background-color: #c4e3f3; } a.list-group-item-info.active, button.list-group-item-info.active, a.list-group-item-info.active:hover, button.list-group-item-info.active:hover, a.list-group-item-info.active:focus, button.list-group-item-info.active:focus { color: #fff; background-color: #31708f; border-color: #31708f; } .list-group-item-warning { color: #8a6d3b; background-color: #fcf8e3; } a.list-group-item-warning, button.list-group-item-warning { color: #8a6d3b; } a.list-group-item-warning .list-group-item-heading, button.list-group-item-warning .list-group-item-heading { color: inherit; } a.list-group-item-warning:hover, button.list-group-item-warning:hover, a.list-group-item-warning:focus, button.list-group-item-warning:focus { color: #8a6d3b; background-color: #faf2cc; } a.list-group-item-warning.active, button.list-group-item-warning.active, a.list-group-item-warning.active:hover, button.list-group-item-warning.active:hover, a.list-group-item-warning.active:focus, button.list-group-item-warning.active:focus { color: #fff; background-color: #8a6d3b; border-color: #8a6d3b; } .list-group-item-danger { color: #a94442; background-color: #f2dede; } a.list-group-item-danger, button.list-group-item-danger { color: #a94442; } a.list-group-item-danger .list-group-item-heading, button.list-group-item-danger .list-group-item-heading { color: inherit; } a.list-group-item-danger:hover, button.list-group-item-danger:hover, a.list-group-item-danger:focus, button.list-group-item-danger:focus { color: #a94442; background-color: #ebcccc; } a.list-group-item-danger.active, button.list-group-item-danger.active, a.list-group-item-danger.active:hover, button.list-group-item-danger.active:hover, a.list-group-item-danger.active:focus, button.list-group-item-danger.active:focus { color: #fff; background-color: #a94442; border-color: #a94442; } .list-group-item-heading { margin-top: 0; margin-bottom: 5px; } .list-group-item-text { margin-bottom: 0; line-height: 1.3; } .panel { margin-bottom: 20px; background-color: #fff; border: 1px solid transparent; border-radius: 4px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); box-shadow: 0 1px 1px rgba(0, 0, 0, .05); } .panel-body { padding: 15px; } .panel-heading { padding: 10px 15px; border-bottom: 1px solid transparent; border-top-left-radius: 3px; border-top-right-radius: 3px; } .panel-heading > .dropdown .dropdown-toggle { color: inherit; } .panel-title { margin-top: 0; margin-bottom: 0; font-size: 16px; color: inherit; } .panel-title > a, .panel-title > small, .panel-title > .small, .panel-title > small > a, .panel-title > .small > a { color: inherit; } .panel-footer { padding: 10px 15px; background-color: #f5f5f5; border-top: 1px solid #ddd; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; } .panel > .list-group, .panel > .panel-collapse > .list-group { margin-bottom: 0; } .panel > .list-group .list-group-item, .panel > .panel-collapse > .list-group .list-group-item { border-width: 1px 0; border-radius: 0; } .panel > .list-group:first-child .list-group-item:first-child, .panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { border-top: 0; border-top-left-radius: 3px; border-top-right-radius: 3px; } .panel > .list-group:last-child .list-group-item:last-child, .panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { border-bottom: 0; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; } .panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { border-top-left-radius: 0; border-top-right-radius: 0; } .panel-heading + .list-group .list-group-item:first-child { border-top-width: 0; } .list-group + .panel-footer { border-top-width: 0; } .panel > .table, .panel > .table-responsive > .table, .panel > .panel-collapse > .table { margin-bottom: 0; } .panel > .table caption, .panel > .table-responsive > .table caption, .panel > .panel-collapse > .table caption { padding-right: 15px; padding-left: 15px; } .panel > .table:first-child, .panel > .table-responsive:first-child > .table:first-child { border-top-left-radius: 3px; border-top-right-radius: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { border-top-left-radius: 3px; border-top-right-radius: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table:first-child > thead:first-child > tr:first-child th:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { border-top-left-radius: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table:first-child > thead:first-child > tr:first-child th:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { border-top-right-radius: 3px; } .panel > .table:last-child, .panel > .table-responsive:last-child > .table:last-child { border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { border-bottom-left-radius: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { border-bottom-right-radius: 3px; } .panel > .panel-body + .table, .panel > .panel-body + .table-responsive, .panel > .table + .panel-body, .panel > .table-responsive + .panel-body { border-top: 1px solid #ddd; } .panel > .table > tbody:first-child > tr:first-child th, .panel > .table > tbody:first-child > tr:first-child td { border-top: 0; } .panel > .table-bordered, .panel > .table-responsive > .table-bordered { border: 0; } .panel > .table-bordered > thead > tr > th:first-child, .panel > .table-responsive > .table-bordered > thead > tr > th:first-child, .panel > .table-bordered > tbody > tr > th:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, .panel > .table-bordered > tfoot > tr > th:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, .panel > .table-bordered > thead > tr > td:first-child, .panel > .table-responsive > .table-bordered > thead > tr > td:first-child, .panel > .table-bordered > tbody > tr > td:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, .panel > .table-bordered > tfoot > tr > td:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .panel > .table-bordered > thead > tr > th:last-child, .panel > .table-responsive > .table-bordered > thead > tr > th:last-child, .panel > .table-bordered > tbody > tr > th:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, .panel > .table-bordered > tfoot > tr > th:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, .panel > .table-bordered > thead > tr > td:last-child, .panel > .table-responsive > .table-bordered > thead > tr > td:last-child, .panel > .table-bordered > tbody > tr > td:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, .panel > .table-bordered > tfoot > tr > td:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .panel > .table-bordered > thead > tr:first-child > td, .panel > .table-responsive > .table-bordered > thead > tr:first-child > td, .panel > .table-bordered > tbody > tr:first-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, .panel > .table-bordered > thead > tr:first-child > th, .panel > .table-responsive > .table-bordered > thead > tr:first-child > th, .panel > .table-bordered > tbody > tr:first-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { border-bottom: 0; } .panel > .table-bordered > tbody > tr:last-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, .panel > .table-bordered > tfoot > tr:last-child > td, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, .panel > .table-bordered > tbody > tr:last-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, .panel > .table-bordered > tfoot > tr:last-child > th, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { border-bottom: 0; } .panel > .table-responsive { margin-bottom: 0; border: 0; } .panel-group { margin-bottom: 20px; } .panel-group .panel { margin-bottom: 0; border-radius: 4px; } .panel-group .panel + .panel { margin-top: 5px; } .panel-group .panel-heading { border-bottom: 0; } .panel-group .panel-heading + .panel-collapse > .panel-body, .panel-group .panel-heading + .panel-collapse > .list-group { border-top: 1px solid #ddd; } .panel-group .panel-footer { border-top: 0; } .panel-group .panel-footer + .panel-collapse .panel-body { border-bottom: 1px solid #ddd; } .panel-default { border-color: #ddd; } .panel-default > .panel-heading { color: #333; background-color: #f5f5f5; border-color: #ddd; } .panel-default > .panel-heading + .panel-collapse > .panel-body { border-top-color: #ddd; } .panel-default > .panel-heading .badge { color: #f5f5f5; background-color: #333; } .panel-default > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #ddd; } .panel-primary { border-color: #337ab7; } .panel-primary > .panel-heading { color: #fff; background-color: #337ab7; border-color: #337ab7; } .panel-primary > .panel-heading + .panel-collapse > .panel-body { border-top-color: #337ab7; } .panel-primary > .panel-heading .badge { color: #337ab7; background-color: #fff; } .panel-primary > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #337ab7; } .panel-success { border-color: #d6e9c6; } .panel-success > .panel-heading { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; } .panel-success > .panel-heading + .panel-collapse > .panel-body { border-top-color: #d6e9c6; } .panel-success > .panel-heading .badge { color: #dff0d8; background-color: #3c763d; } .panel-success > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #d6e9c6; } .panel-info { border-color: #bce8f1; } .panel-info > .panel-heading { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; } .panel-info > .panel-heading + .panel-collapse > .panel-body { border-top-color: #bce8f1; } .panel-info > .panel-heading .badge { color: #d9edf7; background-color: #31708f; } .panel-info > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #bce8f1; } .panel-warning { border-color: #faebcc; } .panel-warning > .panel-heading { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; } .panel-warning > .panel-heading + .panel-collapse > .panel-body { border-top-color: #faebcc; } .panel-warning > .panel-heading .badge { color: #fcf8e3; background-color: #8a6d3b; } .panel-warning > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #faebcc; } .panel-danger { border-color: #ebccd1; } .panel-danger > .panel-heading { color: #a94442; background-color: #f2dede; border-color: #ebccd1; } .panel-danger > .panel-heading + .panel-collapse > .panel-body { border-top-color: #ebccd1; } .panel-danger > .panel-heading .badge { color: #f2dede; background-color: #a94442; } .panel-danger > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #ebccd1; } .embed-responsive { position: relative; display: block; height: 0; padding: 0; overflow: hidden; } .embed-responsive .embed-responsive-item, .embed-responsive iframe, .embed-responsive embed, .embed-responsive object, .embed-responsive video { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; height: 100%; border: 0; } .embed-responsive-16by9 { padding-bottom: 56.25%; } .embed-responsive-4by3 { padding-bottom: 75%; } .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); } .well blockquote { border-color: #ddd; border-color: rgba(0, 0, 0, .15); } .well-lg { padding: 24px; border-radius: 6px; } .well-sm { padding: 9px; border-radius: 3px; } .close { float: right; font-size: 21px; font-weight: bold; line-height: 1; color: #000; text-shadow: 0 1px 0 #fff; filter: alpha(opacity=20); opacity: .2; } .close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; filter: alpha(opacity=50); opacity: .5; } button.close { -webkit-appearance: none; padding: 0; cursor: pointer; background: transparent; border: 0; } .modal-open { overflow: hidden; } .modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1050; display: none; overflow: hidden; -webkit-overflow-scrolling: touch; outline: 0; } .modal.fade .modal-dialog { -webkit-transition: -webkit-transform .3s ease-out; -o-transition: -o-transform .3s ease-out; transition: transform .3s ease-out; -webkit-transform: translate(0, -25%); -ms-transform: translate(0, -25%); -o-transform: translate(0, -25%); transform: translate(0, -25%); } .modal.in .modal-dialog { -webkit-transform: translate(0, 0); -ms-transform: translate(0, 0); -o-transform: translate(0, 0); transform: translate(0, 0); } .modal-open .modal { overflow-x: hidden; overflow-y: auto; } .modal-dialog { position: relative; width: auto; margin: 10px; } .modal-content { position: relative; background-color: #fff; -webkit-background-clip: padding-box; background-clip: padding-box; border: 1px solid #999; border: 1px solid rgba(0, 0, 0, .2); border-radius: 6px; outline: 0; -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); box-shadow: 0 3px 9px rgba(0, 0, 0, .5); } .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000; } .modal-backdrop.fade { filter: alpha(opacity=0); opacity: 0; } .modal-backdrop.in { filter: alpha(opacity=50); opacity: .5; } .modal-header { min-height: 16.42857143px; padding: 15px; border-bottom: 1px solid #e5e5e5; } .modal-header .close { margin-top: -2px; } .modal-title { margin: 0; line-height: 1.42857143; } .modal-body { position: relative; padding: 15px; } .modal-footer { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5; } .modal-footer .btn + .btn { margin-bottom: 0; margin-left: 5px; } .modal-footer .btn-group .btn + .btn { margin-left: -1px; } .modal-footer .btn-block + .btn-block { margin-left: 0; } .modal-scrollbar-measure { position: absolute; top: -9999px; width: 50px; height: 50px; overflow: scroll; } @media (min-width: 768px) { .modal-dialog { width: 600px; margin: 30px auto; } .modal-content { -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); box-shadow: 0 5px 15px rgba(0, 0, 0, .5); } .modal-sm { width: 300px; } } @media (min-width: 992px) { .modal-lg { width: 900px; } } .tooltip { position: absolute; z-index: 1070; display: block; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-weight: normal; line-height: 1.42857143; text-align: left; text-align: start; text-decoration: none; text-shadow: none; text-transform: none; letter-spacing: normal; word-break: normal; word-spacing: normal; word-wrap: normal; white-space: normal; filter: alpha(opacity=0); opacity: 0; line-break: auto; } .tooltip.in { filter: alpha(opacity=90); opacity: .9; } .tooltip.top { padding: 5px 0; margin-top: -3px; } .tooltip.right { padding: 0 5px; margin-left: 3px; } .tooltip.bottom { padding: 5px 0; margin-top: 3px; } .tooltip.left { padding: 0 5px; margin-left: -3px; } .tooltip-inner { max-width: 200px; padding: 3px 8px; color: #fff; text-align: center; background-color: #000; border-radius: 4px; } .tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .tooltip.top .tooltip-arrow { bottom: 0; left: 50%; margin-left: -5px; border-width: 5px 5px 0; border-top-color: #000; } .tooltip.top-left .tooltip-arrow { right: 5px; bottom: 0; margin-bottom: -5px; border-width: 5px 5px 0; border-top-color: #000; } .tooltip.top-right .tooltip-arrow { bottom: 0; left: 5px; margin-bottom: -5px; border-width: 5px 5px 0; border-top-color: #000; } .tooltip.right .tooltip-arrow { top: 50%; left: 0; margin-top: -5px; border-width: 5px 5px 5px 0; border-right-color: #000; } .tooltip.left .tooltip-arrow { top: 50%; right: 0; margin-top: -5px; border-width: 5px 0 5px 5px; border-left-color: #000; } .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-width: 0 5px 5px; border-bottom-color: #000; } .tooltip.bottom-left .tooltip-arrow { top: 0; right: 5px; margin-top: -5px; border-width: 0 5px 5px; border-bottom-color: #000; } .tooltip.bottom-right .tooltip-arrow { top: 0; left: 5px; margin-top: -5px; border-width: 0 5px 5px; border-bottom-color: #000; } .popover { position: absolute; top: 0; left: 0; z-index: 1060; display: none; max-width: 276px; padding: 1px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 1.42857143; text-align: left; text-align: start; text-decoration: none; text-shadow: none; text-transform: none; letter-spacing: normal; word-break: normal; word-spacing: normal; word-wrap: normal; white-space: normal; background-color: #fff; -webkit-background-clip: padding-box; background-clip: padding-box; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, .2); border-radius: 6px; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); box-shadow: 0 5px 10px rgba(0, 0, 0, .2); line-break: auto; } .popover.top { margin-top: -10px; } .popover.right { margin-left: 10px; } .popover.bottom { margin-top: 10px; } .popover.left { margin-left: -10px; } .popover-title { padding: 8px 14px; margin: 0; font-size: 14px; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; border-radius: 5px 5px 0 0; } .popover-content { padding: 9px 14px; } .popover > .arrow, .popover > .arrow:after { position: absolute; display: block; width: 0; height: 0; border-color: transparent; border-style: solid; } .popover > .arrow { border-width: 11px; } .popover > .arrow:after { content: ""; border-width: 10px; } .popover.top > .arrow { bottom: -11px; left: 50%; margin-left: -11px; border-top-color: #999; border-top-color: rgba(0, 0, 0, .25); border-bottom-width: 0; } .popover.top > .arrow:after { bottom: 1px; margin-left: -10px; content: " "; border-top-color: #fff; border-bottom-width: 0; } .popover.right > .arrow { top: 50%; left: -11px; margin-top: -11px; border-right-color: #999; border-right-color: rgba(0, 0, 0, .25); border-left-width: 0; } .popover.right > .arrow:after { bottom: -10px; left: 1px; content: " "; border-right-color: #fff; border-left-width: 0; } .popover.bottom > .arrow { top: -11px; left: 50%; margin-left: -11px; border-top-width: 0; border-bottom-color: #999; border-bottom-color: rgba(0, 0, 0, .25); } .popover.bottom > .arrow:after { top: 1px; margin-left: -10px; content: " "; border-top-width: 0; border-bottom-color: #fff; } .popover.left > .arrow { top: 50%; right: -11px; margin-top: -11px; border-right-width: 0; border-left-color: #999; border-left-color: rgba(0, 0, 0, .25); } .popover.left > .arrow:after { right: 1px; bottom: -10px; content: " "; border-right-width: 0; border-left-color: #fff; } .carousel { position: relative; } .carousel-inner { position: relative; width: 100%; overflow: hidden; } .carousel-inner > .item { position: relative; display: none; -webkit-transition: .6s ease-in-out left; -o-transition: .6s ease-in-out left; transition: .6s ease-in-out left; } .carousel-inner > .item > img, .carousel-inner > .item > a > img { line-height: 1; } @media all and (transform-3d), (-webkit-transform-3d) { .carousel-inner > .item { -webkit-transition: -webkit-transform .6s ease-in-out; -o-transition: -o-transform .6s ease-in-out; transition: transform .6s ease-in-out; -webkit-backface-visibility: hidden; backface-visibility: hidden; -webkit-perspective: 1000px; perspective: 1000px; } .carousel-inner > .item.next, .carousel-inner > .item.active.right { left: 0; -webkit-transform: translate3d(100%, 0, 0); transform: translate3d(100%, 0, 0); } .carousel-inner > .item.prev, .carousel-inner > .item.active.left { left: 0; -webkit-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); } .carousel-inner > .item.next.left, .carousel-inner > .item.prev.right, .carousel-inner > .item.active { left: 0; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } .carousel-inner > .active, .carousel-inner > .next, .carousel-inner > .prev { display: block; } .carousel-inner > .active { left: 0; } .carousel-inner > .next, .carousel-inner > .prev { position: absolute; top: 0; width: 100%; } .carousel-inner > .next { left: 100%; } .carousel-inner > .prev { left: -100%; } .carousel-inner > .next.left, .carousel-inner > .prev.right { left: 0; } .carousel-inner > .active.left { left: -100%; } .carousel-inner > .active.right { left: 100%; } .carousel-control { position: absolute; top: 0; bottom: 0; left: 0; width: 15%; font-size: 20px; color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); filter: alpha(opacity=50); opacity: .5; } .carousel-control.left { background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); background-repeat: repeat-x; } .carousel-control.right { right: 0; left: auto; background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); background-repeat: repeat-x; } .carousel-control:hover, .carousel-control:focus { color: #fff; text-decoration: none; filter: alpha(opacity=90); outline: 0; opacity: .9; } .carousel-control .icon-prev, .carousel-control .icon-next, .carousel-control .glyphicon-chevron-left, .carousel-control .glyphicon-chevron-right { position: absolute; top: 50%; z-index: 5; display: inline-block; margin-top: -10px; } .carousel-control .icon-prev, .carousel-control .glyphicon-chevron-left { left: 50%; margin-left: -10px; } .carousel-control .icon-next, .carousel-control .glyphicon-chevron-right { right: 50%; margin-right: -10px; } .carousel-control .icon-prev, .carousel-control .icon-next { width: 20px; height: 20px; font-family: serif; line-height: 1; } .carousel-control .icon-prev:before { content: '\2039'; } .carousel-control .icon-next:before { content: '\203a'; } .carousel-indicators { position: absolute; bottom: 10px; left: 50%; z-index: 15; width: 60%; padding-left: 0; margin-left: -30%; text-align: center; list-style: none; } .carousel-indicators li { display: inline-block; width: 10px; height: 10px; margin: 1px; text-indent: -999px; cursor: pointer; background-color: #000 \9; background-color: rgba(0, 0, 0, 0); border: 1px solid #fff; border-radius: 10px; } .carousel-indicators .active { width: 12px; height: 12px; margin: 0; background-color: #fff; } .carousel-caption { position: absolute; right: 15%; bottom: 20px; left: 15%; z-index: 10; padding-top: 20px; padding-bottom: 20px; color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); } .carousel-caption .btn { text-shadow: none; } @media screen and (min-width: 768px) { .carousel-control .glyphicon-chevron-left, .carousel-control .glyphicon-chevron-right, .carousel-control .icon-prev, .carousel-control .icon-next { width: 30px; height: 30px; margin-top: -15px; font-size: 30px; } .carousel-control .glyphicon-chevron-left, .carousel-control .icon-prev { margin-left: -15px; } .carousel-control .glyphicon-chevron-right, .carousel-control .icon-next { margin-right: -15px; } .carousel-caption { right: 20%; left: 20%; padding-bottom: 30px; } .carousel-indicators { bottom: 20px; } } .clearfix:before, .clearfix:after, .dl-horizontal dd:before, .dl-horizontal dd:after, .container:before, .container:after, .container-fluid:before, .container-fluid:after, .row:before, .row:after, .form-horizontal .form-group:before, .form-horizontal .form-group:after, .btn-toolbar:before, .btn-toolbar:after, .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after, .nav:before, .nav:after, .navbar:before, .navbar:after, .navbar-header:before, .navbar-header:after, .navbar-collapse:before, .navbar-collapse:after, .pager:before, .pager:after, .panel-body:before, .panel-body:after, .modal-footer:before, .modal-footer:after { display: table; content: " "; } .clearfix:after, .dl-horizontal dd:after, .container:after, .container-fluid:after, .row:after, .form-horizontal .form-group:after, .btn-toolbar:after, .btn-group-vertical > .btn-group:after, .nav:after, .navbar:after, .navbar-header:after, .navbar-collapse:after, .pager:after, .panel-body:after, .modal-footer:after { clear: both; } .center-block { display: block; margin-right: auto; margin-left: auto; } .pull-right { float: right !important; } .pull-left { float: left !important; } .hide { display: none !important; } .show { display: block !important; } .invisible { visibility: hidden; } .text-hide { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; } .hidden { display: none !important; } .affix { position: fixed; } @-ms-viewport { width: device-width; } .visible-xs, .visible-sm, .visible-md, .visible-lg { display: none !important; } .visible-xs-block, .visible-xs-inline, .visible-xs-inline-block, .visible-sm-block, .visible-sm-inline, .visible-sm-inline-block, .visible-md-block, .visible-md-inline, .visible-md-inline-block, .visible-lg-block, .visible-lg-inline, .visible-lg-inline-block { display: none !important; } @media (max-width: 767px) { .visible-xs { display: block !important; } table.visible-xs { display: table !important; } tr.visible-xs { display: table-row !important; } th.visible-xs, td.visible-xs { display: table-cell !important; } } @media (max-width: 767px) { .visible-xs-block { display: block !important; } } @media (max-width: 767px) { .visible-xs-inline { display: inline !important; } } @media (max-width: 767px) { .visible-xs-inline-block { display: inline-block !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm { display: block !important; } table.visible-sm { display: table !important; } tr.visible-sm { display: table-row !important; } th.visible-sm, td.visible-sm { display: table-cell !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-block { display: block !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-inline { display: inline !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-inline-block { display: inline-block !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md { display: block !important; } table.visible-md { display: table !important; } tr.visible-md { display: table-row !important; } th.visible-md, td.visible-md { display: table-cell !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-block { display: block !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-inline { display: inline !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-inline-block { display: inline-block !important; } } @media (min-width: 1200px) { .visible-lg { display: block !important; } table.visible-lg { display: table !important; } tr.visible-lg { display: table-row !important; } th.visible-lg, td.visible-lg { display: table-cell !important; } } @media (min-width: 1200px) { .visible-lg-block { display: block !important; } } @media (min-width: 1200px) { .visible-lg-inline { display: inline !important; } } @media (min-width: 1200px) { .visible-lg-inline-block { display: inline-block !important; } } @media (max-width: 767px) { .hidden-xs { display: none !important; } } @media (min-width: 768px) and (max-width: 991px) { .hidden-sm { display: none !important; } } @media (min-width: 992px) and (max-width: 1199px) { .hidden-md { display: none !important; } } @media (min-width: 1200px) { .hidden-lg { display: none !important; } } .visible-print { display: none !important; } @media print { .visible-print { display: block !important; } table.visible-print { display: table !important; } tr.visible-print { display: table-row !important; } th.visible-print, td.visible-print { display: table-cell !important; } } .visible-print-block { display: none !important; } @media print { .visible-print-block { display: block !important; } } .visible-print-inline { display: none !important; } @media print { .visible-print-inline { display: inline !important; } } .visible-print-inline-block { display: none !important; } @media print { .visible-print-inline-block { display: inline-block !important; } } @media print { .hidden-print { display: none !important; } } /*# sourceMappingURL=bootstrap.css.map */
gpl-3.0
fparadis2/mox
Source/Mox.UI/Project/Views/Game/Player/PlayerInfoControl.xaml.cs
631
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace Mox.UI.Game { /// <summary> /// Interaction logic for PlayerInfoControl.xaml /// </summary> public partial class PlayerInfoControl : UserControl { public PlayerInfoControl() { InitializeComponent(); } } }
gpl-3.0
briancappello/PyTradeLib
pytradelib/quandl/metadata.py
1451
import csv import requests import pandas as pd from zipfile import ZipFile from io import StringIO URL = 'https://www.quandl.com/api/v3/databases/%(dataset)s/codes' def dataset_url(dataset): return URL % {'dataset': dataset} def download_file(url): r = requests.get(url) if r.status_code == 200: return StringIO(r.text) def unzip(file_): d = unzip_files(file_) return d[list(d.keys())[0]] def unzip_files(file_): d = {} with ZipFile(file_, 'r') as zipfile: for filename in zipfile.namelist(): d[filename] = str(zipfile.read(filename)) return d def csv_rows(str): for row in csv.reader(StringIO(str)): yield row def csv_dicts(str, fieldnames=None): for d in csv.DictReader(StringIO(str), fieldnames=fieldnames): yield d def get_symbols_list(dataset): csv_ = unzip(download_file(dataset_url(dataset))) return map(lambda x: x[0].replace(dataset + '/', ''), csv_rows(csv_)) def get_symbols_dict(dataset): csv_ = unzip(download_file(dataset_url(dataset))) return dict(csv_rows(csv_)) def get_symbols_df(dataset): csv_ = unzip(download_file(dataset_url(dataset))) df = pd.read_csv(StringIO(csv_), header=None, names=['symbol', 'company']) df.symbol = df.symbols.map(lambda x: x.replace(dataset + '/', '')) df.company = df.company.map(lambda x: x.replace('Prices, Dividends, Splits and Trading Volume', '')) return df
gpl-3.0
ChadMcKinney/Entropy
Neurocaster/src/core/Global.cpp
512
#include "Global.h" namespace neuro { int x_square_mul; int y_square_mul; int MAPSIZEX = 48; int MAPSIZEY = 40; inline static bool checkMapBounds(Square pos) { if( (pos.getX()>0&&pos.getX()<MAPSIZEX)&& (pos.getY()>0&&pos.getY()<MAPSIZEY) ) { return true; } else { return false; } } unsigned int num_unique = 0; std::string get_unique_name(std::string name) { std::stringstream ss; ss << name << num_unique++; return ss.str(); } }
gpl-3.0
jaGilbertson/PiTechSuppRemote
RPITechSuppCamViewer/dist/javadoc/CamRegistrar/LoginResponse.html
11235
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_60) on Thu Sep 03 19:02:28 BST 2015 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>LoginResponse</title> <meta name="date" content="2015-09-03"> <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style"> <script type="text/javascript" src="../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="LoginResponse"; } } catch(err) { } //--> var methods = {"i0":10,"i1":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/LoginResponse.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../deprecated-list.html">Deprecated</a></li> <li><a href="../index-files/index-1.html">Index</a></li> <li><a href="../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../CamRegistrar/Login.html" title="class in CamRegistrar"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../CamRegistrar/ObjectFactory.html" title="class in CamRegistrar"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../index.html?CamRegistrar/LoginResponse.html" target="_top">Frames</a></li> <li><a href="LoginResponse.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">CamRegistrar</div> <h2 title="Class LoginResponse" class="title">Class LoginResponse</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>CamRegistrar.LoginResponse</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="typeNameLabel">LoginResponse</span> extends java.lang.Object</pre> <div class="block"><p>Java class for loginResponse complex type. <p>The following schema fragment specifies the expected content contained within this class. <pre> &lt;complexType name="loginResponse"> &lt;complexContent> &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> &lt;sequence> &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}boolean"/> &lt;/sequence> &lt;/restriction> &lt;/complexContent> &lt;/complexType> </pre></div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field.summary"> <!-- --> </a> <h3>Field Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>protected boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../CamRegistrar/LoginResponse.html#Z:Z_return">_return</a></span></code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../CamRegistrar/LoginResponse.html#LoginResponse--">LoginResponse</a></span>()</code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../CamRegistrar/LoginResponse.html#isReturn--">isReturn</a></span>()</code> <div class="block">Gets the value of the return property.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../CamRegistrar/LoginResponse.html#setReturn-boolean-">setReturn</a></span>(boolean&nbsp;value)</code> <div class="block">Sets the value of the return property.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ FIELD DETAIL =========== --> <ul class="blockList"> <li class="blockList"><a name="field.detail"> <!-- --> </a> <h3>Field Detail</h3> <a name="Z:Z_return"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>_return</h4> <pre>protected&nbsp;boolean _return</pre> </li> </ul> </li> </ul> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="LoginResponse--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>LoginResponse</h4> <pre>public&nbsp;LoginResponse()</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="isReturn--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>isReturn</h4> <pre>public&nbsp;boolean&nbsp;isReturn()</pre> <div class="block">Gets the value of the return property.</div> </li> </ul> <a name="setReturn-boolean-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>setReturn</h4> <pre>public&nbsp;void&nbsp;setReturn(boolean&nbsp;value)</pre> <div class="block">Sets the value of the return property.</div> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/LoginResponse.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../deprecated-list.html">Deprecated</a></li> <li><a href="../index-files/index-1.html">Index</a></li> <li><a href="../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../CamRegistrar/Login.html" title="class in CamRegistrar"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../CamRegistrar/ObjectFactory.html" title="class in CamRegistrar"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../index.html?CamRegistrar/LoginResponse.html" target="_top">Frames</a></li> <li><a href="LoginResponse.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
gpl-3.0
DavisNT/super-bootimg
scripts/bootimg.sh
6501
#!/system/bin/sh export TMPDIR=/tmp/ mktempS() { v=$TMPDIR/tmp.$RANDOM mkdir -p $v echo $v } if ! which mktemp;then alias mktemp=mktempS fi if [ "$#" == 0 ];then echo "Usage: $0 <original boot.img> [eng|user]" exit 1 fi set -e if [ -f "$2" ];then scr="$(readlink -f "$2")" used_scr=1 else scr="$PWD/changes.sh" fi cleanup() { rm -Rf "$bootimg_extract" "$d2" } trap cleanup EXIT #Ensure binaries are executables scriptdir="$(dirname "$(readlink -f "$0")")" for i in sepolicy-inject sepolicy-inject-v2 bootimg-repack bootimg-extract strip-cpio;do chmod 0755 $scriptdir/bin/$i || true done startBootImgEdit() { f="$(readlink -f "$1")" homedir="$PWD" bootimg_extract="$(mktemp -d)" cd "$bootimg_extract" "$scriptdir/bin/bootimg-extract" "$f" [ -f chromeos ] && CHROMEOS=1 d2="$(mktemp -d)" cd "$d2" if [ -f "$bootimg_extract"/ramdisk.gz ];then gunzip -c < "$bootimg_extract"/ramdisk.gz |cpio -i gunzip -c < "$bootimg_extract"/ramdisk.gz > ramdisk1 elif [ -f "$bootimg_extract"/ramdisk.lzma ];then lzcat "$bootimg_extract"/ramdisk.lzma |cpio -i lzcat "$bootimg_extract"/ramdisk.lzma > ramdisk1 else echo "Unknown ramdisk format" cd "$homedir" rm -Rf "$bootimg_extract" "$d2" exit 1 fi INITRAMFS_FILES="" if file init |grep -q Intel;then DST_ARCH=x86 else DST_ARCH=arm fi } addFile() { #Slower but doesn't go into the WARNING if ! echo $INITRAMFS_FILES |grep -qE "\b$1\b";then INITRAMFS_FILES="$INITRAMFS_FILES $*" fi } doneBootImgEdit() { find . -type f -exec touch -t 197001011200 {} \; #List of files to replace \n separated echo $INITRAMFS_FILES |tr ' ' '\n' | cpio -o -H newc > ramdisk2 #TODO: Why can't I recreate initramfs from scratch? #Instead I use the append method. files gets overwritten by the last version if they appear twice #Hence sepolicy/su/init.rc are our version #There is a trailer in CPIO file format. Hence strip-cpio rm -f cpio-* "$scriptdir/bin/strip-cpio" ramdisk1 $INITRAMFS_FILES cat cpio-* ramdisk2 > ramdisk.tmp touch -t 197001011200 ramdisk.tmp #output is called ramdisk.gz, because repack doesn't care about the file format if [ -f "$bootimg_extract"/ramdisk.gz ];then gzip -9 -c -n ramdisk.tmp > "$bootimg_extract"/ramdisk.gz elif [ -f "$bootimg_extract"/ramdisk.lzma ];then lzma -7 -c ramdisk.tmp > "$bootimg_extract"/ramdisk.gz else exit 1 fi cd "$bootimg_extract" rm -Rf "$d2" "$scriptdir/bin/bootimg-repack" "$f" cp new-boot.img "$homedir" cd "$homedir" rm -Rf "$bootimg_extract" } #allow <list of scontext> <list of tcontext> <class> <list of perm> allow() { addFile sepolicy [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" ] && false for s in $1;do for t in $2;do "$scriptdir"/bin/sepolicy-inject$SEPOLICY -s $s -t $t -c $3 -p $(echo $4|tr ' ' ',') -P sepolicy done done } noaudit() { addFile sepolicy for s in $1;do for t in $2;do for p in $4;do "$scriptdir"/bin/sepolicy-inject"$SEPOLICY" -s $s -t $t -c $3 -p $p -P sepolicy done done done } #Extracted from global_macros r_file_perms="getattr open read ioctl lock" x_file_perms="getattr execute execute_no_trans" rx_file_perms="$r_file_perms $x_file_perms" w_file_perms="open append write" rw_file_perms="$r_file_perms $w_file_perms" rwx_file_perms="$rx_file_perms $w_dir_perms" rw_socket_perms="ioctl read getattr write setattr lock append bind connect getopt setopt shutdown" create_socket_perms="create $rw_socket_perms" rw_stream_socket_perms="$rw_socket_perms listen accept" create_stream_socket_perms="create $rw_stream_socket_perms" r_dir_perms="open getattr read search ioctl" w_dir_perms="open search write add_name remove_name" ra_dir_perms="$r_dir_perms add name write" rw_dir_perms="$r_dir_perms $w_dir_perms" create_dir_perms="create reparent rename rmdir setattr $rw_dir_perms" allowFSR() { allow "$1" "$2" dir "$r_dir_perms" allow "$1" "$2" file "$r_file_perms" allow "$1" "$2" lnk_file "read getattr" } allowFSRW() { allow "$1" "$2" dir "$rw_dir_perms create" allow "$1" "$2" file "$rw_file_perms create setattr unlink rename" allow "$1" "$2" lnk_file "read getattr" } allowFSRWX() { allowFSRW "$1" "$2" allow "$1" "$2" file "$x_file_perms" } startBootImgEdit "$1" if [ -f sepolicy ] && \ "$scriptdir/bin/sepolicy-inject-v2" -e -s untrusted_app_25 -P sepolicy;then #Android O SEPOLICY="-v2" ANDROID=26 elif [ -f sepolicy ] && \ ! "$scriptdir/bin/sepolicy-inject" -e -c filesystem -P sepolicy && \ "$scriptdir/bin/sepolicy-inject-v2" -e -c filesystem -P sepolicy;then #Android N SEPOLICY="-v2" ANDROID=24 elif "$scriptdir/bin/sepolicy-inject" -e -s gatekeeper_service -P sepolicy;then #Android M ANDROID=23 elif "$scriptdir/bin/sepolicy-inject" -e -c service_manager -P sepolicy;then #Android L MR1 ANDROID=21 #TODO: Android 5.0? Android 4.3? else #Assume KitKat ANDROID=19 fi shift [ -n "$used_scr" ] && shift . $scr if [ -n "$VERSIONED" ];then if [ -f "$scriptdir"/gitversion ];then rev="$(cat $scriptdir/gitversion)" else pushd $scriptdir rev="$(git rev-parse --short HEAD)" popd fi echo $rev > super-bootimg addFile super-bootimg fi doneBootImgEdit if [ -f $scriptdir/keystore.x509.pem -a -f $scriptdir/keystore.pk8 -a -z "$NO_SIGN" -a -z "$CHROMEOS" ];then java -jar $scriptdir/keystore_tools/BootSignature.jar /boot new-boot.img $scriptdir/keystore.pk8 $scriptdir/keystore.x509.pem new-boot.img.signed fi if [ -n "$CHROMEOS" ];then echo " " > toto1 echo " " > toto2 #TODO: Properly detect ARCH if $scriptdir/bin/futility-arm version > /dev/null;then ARCH=arm else ARCH=x86 fi $scriptdir/bin/futility-$ARCH vbutil_keyblock --pack output.keyblock --datapubkey $scriptdir/kernel_data_key.vbpubk --signprivate $scriptdir/kernel_subkey.vbprivk --flags 0x7 $scriptdir/bin/futility-$ARCH vbutil_kernel --pack new-boot.img.signed --keyblock output.keyblock --signprivate $scriptdir/kernel_data_key.vbprivk --version 1 --vmlinuz new-boot.img --config toto1 --arch arm --bootloader toto2 --flags 0x1 rm -f toto1 toto2 output.keyblock fi # Call custom boot image patch script if [ -f "/data/custom_boot_image_patch.sh" ]; then sh -x /data/custom_boot_image_patch.sh new-boot.img fi # Silence warning when boot on Samsung phones # XXX: This check ONLY works on LIVE devices, not from script # Here this is not a problem because the change is purely cosmetic, but don't rely on this if for anything else if getprop ro.product.manufacturer | grep -iq '^samsung$'; then echo "SEANDROIDENFORCE" >> "new-boot.img" fi
gpl-3.0
mangostaniko/lpy-lsystems-blender-addon
lpy-lsystems-adapted-windows/src/plantgl/math/util_vector.cpp
24241
/* -*-c++-*- * ---------------------------------------------------------------------------- * * PlantGL: The Plant Graphic Library * * Copyright 1995-2007 UMR CIRAD/INRIA/INRA DAP * * File author(s): F. Boudon et al. * * ---------------------------------------------------------------------------- * * GNU General Public Licence * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS For A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; see the file COPYING. If not, * write to the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * ---------------------------------------------------------------------------- */ #include "util_vector.h" #include "util_math.h" #include "../tool/util_assert.h" #include <iostream> using namespace std; TOOLS_BEGIN_NAMESPACE /* --------------------------------------------------------------------- */ #define __X __data[0] #define __Y __data[1] #define __Z __data[2] #define __W __data[3] /* --------------------------------------------------------------------- */ const Vector2 Vector2::ORIGIN; const Vector2 Vector2::OX(1,0); const Vector2 Vector2::OY(0,1); /* --------------------------------------------------------------------- */ Vector2::Polar::Polar( const real_t& radius, const real_t& theta ) : radius(radius), theta(theta) { } Vector2::Polar::Polar( const Vector2& v ) : radius(hypot(v.x(),v.y())), theta(atan2(v.y(),v.x())) { } bool Vector2::Polar::isValid( ) const { return finite(radius) && finite(theta); } /* --------------------------------------------------------------------- */ Vector2::Vector2( const real_t& x , const real_t& y ) : Tuple2<real_t>(x,y) { GEOM_ASSERT(isValid()); } Vector2::Vector2( const Polar& p ) : Tuple2<real_t>(p.radius * cos(p.theta), p.radius * sin(p.theta)) { GEOM_ASSERT(p.isValid()); GEOM_ASSERT(isValid()); } void Vector2::set( const real_t& x , const real_t& y ) { __X = x; __Y = y; GEOM_ASSERT(isValid()); } void Vector2::set( const Vector2& v ) { __X = v.__X; __Y = v.__Y; GEOM_ASSERT(isValid()); } void Vector2::set( const real_t * v2 ) { __X = v2[0]; __Y = v2[1]; GEOM_ASSERT(isValid()); } void Vector2::set( const Polar& p ) { __X = p.radius * cos(p.theta); __Y = p.radius * sin(p.theta) GEOM_ASSERT(p.isValid()); GEOM_ASSERT(isValid()); } Vector2::~Vector2( ) { } const real_t& Vector2::x( ) const { return __X; } real_t& Vector2::x( ) { return __X; } const real_t& Vector2::y( ) const { return __Y; } real_t& Vector2::y( ) { return __Y; } int Vector2::getMaxAbsCoord() const { return ( fabs(__X) > fabs(__Y) ) ? 0 : 1; } int Vector2::getMinAbsCoord() const { return ( fabs(__X) < fabs(__Y) ) ? 0 : 1; } /* --------------------------------------------------------------------- */ bool Vector2::operator==( const Vector2& v ) const { return normLinf(*this - v) < GEOM_TOLERANCE; } bool Vector2::operator!=( const Vector2& v ) const { return normLinf(*this - v) >= GEOM_TOLERANCE; } Vector2& Vector2::operator+=( const Vector2& v ) { __X += v.__X; __Y += v.__Y; return *this; } Vector2& Vector2::operator-=( const Vector2& v ) { __X -= v.__X; __Y -= v.__Y; return *this; } Vector2& Vector2::operator*=( const real_t& s ) { __X *= s; __Y *= s; return *this; } Vector2& Vector2::operator/=( const real_t& s ) { GEOM_ASSERT(fabs(s) > GEOM_TOLERANCE); __X /= s; __Y /= s; return *this; } Vector2 Vector2::operator-( ) const { return Vector2(-__X, -__Y); } Vector2 Vector2::operator+( const Vector2& v) const { return Vector2(*this) += v; } Vector2 Vector2::operator-( const Vector2& v ) const { return Vector2(*this) -= v; } bool Vector2::isNormalized( ) const { return fabs(normSquared(*this) - 1) < GEOM_EPSILON; } bool Vector2::isOrthogonalTo( const Vector2& v ) const { return fabs(dot(*this,v)) < GEOM_EPSILON; } bool Vector2::isValid( ) const { return finite(__X) && finite(__Y); } real_t Vector2::normalize( ) { real_t _norm = norm(*this); if (_norm > GEOM_TOLERANCE) *this /= _norm; return _norm; } Vector2 Vector2::normed( ) const { return direction(*this); } /* --------------------------------------------------------------------- */ Vector2 operator*( const Vector2& v, const real_t& s ) { return Vector2(v) *= s; } Vector2 operator*( const real_t& s, const Vector2& v ) { return Vector2(v) *= s; } ostream& operator<<( ostream& stream, const Vector2& v ) { return stream << "<" << v.__X << "," << v.__Y << ">"; } bool operator<(const Vector2& v1, const Vector2& v2) { if (v1.__X < (v2.__X - GEOM_TOLERANCE)) return true; if (v1.__X > (v2.__X + GEOM_TOLERANCE)) return false; return v1.__Y < (v2.__Y- GEOM_TOLERANCE); } bool strictly_eq( const Vector2& v1, const Vector2& v2 ) { return normLinf(v1 - v2) ==0; } bool strictly_inf(const Vector2& v1, const Vector2& v2) { if (v1.__X < v2.__X) return true; if (v1.__X > v2.__X) return false; return v1.__Y < v2.__Y; } Vector2 operator/( const Vector2& v, const real_t& s ) { GEOM_ASSERT(fabs(s) > GEOM_TOLERANCE); return Vector2(v) /= s; } Vector2 abs( const Vector2& v ) { return Vector2(fabs(v.__X),fabs(v.__Y)); } Vector2 direction( const Vector2& v ) { real_t n = norm(v); if (n < GEOM_EPSILON) return v; return v / n; } real_t cross( const Vector2& v1,const Vector2& v2) { return v1.__X*v2.__Y - v1.__Y*v2.__X; } real_t operator^( const Vector2& v1,const Vector2& v2) { return v1.__X*v2.__Y - v1.__Y*v2.__X; } real_t dot( const Vector2& v1, const Vector2& v2 ) { return (v1.__X * v2.__X + v1.__Y * v2.__Y); } real_t operator*( const Vector2& v1, const Vector2& v2 ) { return (v1.__X * v2.__X + v1.__Y * v2.__Y); } Vector2 Max( const Vector2& v1, const Vector2& v2 ) { return Vector2(max(v1.__X,v2.__X),max(v1.__Y,v2.__Y)); } Vector2 Min( const Vector2& v1, const Vector2& v2 ) { return Vector2(min(v1.__X,v2.__X),min(v1.__Y,v2.__Y)); } real_t norm( const Vector2& v ) { return sqrt(normSquared(v)); } real_t normL1( const Vector2& v ) { return sum(abs(v)); } real_t normLinf( const Vector2& v ) { return *(abs(v).getMax()); } real_t normSquared( const Vector2& v ) { return dot(v,v); } real_t sum( const Vector2& v ) { return v.__X + v.__Y; } /* real_t angle( const Vector2& v1 , const Vector2& v2 ) { real_t n = norm(v1)*norm(v2); if(n < GEOM_EPSILON)return 0; return acos(dot(v1,v2)/n); */ real_t angle( const Vector2& v1 , const Vector2& v2 ) { real_t cosinus = v1*v2; //dot(v1,v2) real_t sinus = v1^v2; // cross(v1,v2) return atan2( sinus, cosinus ); } /* --------------------------------------------------------------------- */ const Vector3 Vector3::ORIGIN; const Vector3 Vector3::OX(1,0,0); const Vector3 Vector3::OY(0,1,0); const Vector3 Vector3::OZ(0,0,1); /* --------------------------------------------------------------------- */ Vector3::Cylindrical::Cylindrical( const real_t& radius, const real_t& theta, const real_t& z ) : radius(radius), theta(theta), z(z) { GEOM_ASSERT(isValid()); } Vector3::Cylindrical::Cylindrical( const Vector3& v ) : radius(hypot(v.x(),v.y())), theta(atan2(v.y(),v.x())), z(v.z()) { GEOM_ASSERT(isValid()); } bool Vector3::Cylindrical::isValid( ) const { return finite(radius) && finite(theta) && finite(z); } /* --------------------------------------------------------------------- */ real_t spherical_distance(real_t theta1, real_t phi1, real_t theta2, real_t phi2, real_t radius) { // return radius * acos(sin(theta1)sin(theta2) + cos(theta1)cos(theta2)cos(phi2-phi1)); real_t costheta1 = cos(theta1); real_t costheta2 = cos(theta2); real_t sintheta1 = sin(theta1); real_t sintheta2 = sin(theta2); real_t deltaphi = phi2-phi1; real_t cosdeltaphi = cos(deltaphi); real_t a = (costheta2*sin(deltaphi)); real_t b = (costheta1*sintheta2 - sintheta1*costheta2*cosdeltaphi); real_t c = sqrt(a*a+b*b); real_t d = sintheta1 * sintheta2 + costheta1 * costheta2 * cosdeltaphi; return radius * atan2(c,d); } Vector3::Spherical::Spherical( const real_t& radius, const real_t& theta, const real_t& phi ) : radius(radius), theta(theta), phi(phi) { GEOM_ASSERT(isValid()); } Vector3::Spherical::Spherical( const Vector3& v ) : radius(v.x() * v.x() + v.y() * v.y()), theta(atan2(v.y(),v.x())), phi(0) { phi = atan2(sqrt(radius),v.z()); radius = sqrt(radius + v.z() * v.z()); } bool Vector3::Spherical::isValid( ) const { return finite(radius) && finite(theta) && finite(phi); } real_t Vector3::Spherical::spherical_distance(real_t theta2, real_t phi2) const { return TOOLS(spherical_distance)(theta,phi, theta2,phi2, radius); } /* --------------------------------------------------------------------- */ Vector3::Vector3( const real_t& x, const real_t& y, const real_t& z ) : Tuple3<real_t>(x,y,z) { GEOM_ASSERT(isValid()); } Vector3::Vector3( const Vector2& v, const real_t& z ) : Tuple3<real_t>(v.x(),v.y(),z) { GEOM_ASSERT(v.isValid()); GEOM_ASSERT(isValid()); } Vector3::Vector3( const Cylindrical& c ) : Tuple3<real_t>(c.radius * cos(c.theta), c.radius * sin(c.theta), c.z) { GEOM_ASSERT(c.isValid()); GEOM_ASSERT(isValid()); } Vector3::Vector3( const Spherical& s ) : Tuple3<real_t>(cos(s.theta), sin(s.theta), s.radius * cos(s.phi)) { real_t _tmp = s.radius * sin(s.phi); __X *= _tmp; __Y *= _tmp; GEOM_ASSERT(s.isValid()); GEOM_ASSERT(isValid()); } void Vector3::set( const real_t& x, const real_t& y, const real_t& z ) { __X = x; __Y = y; __Z = z; GEOM_ASSERT(isValid()); } void Vector3::set( const real_t * v3 ) { __X = v3[0]; __Y = v3[1]; __Z = v3[2]; GEOM_ASSERT(isValid()); } void Vector3::set( const Vector2& v, const real_t& z ) { GEOM_ASSERT(v.isValid()); __X = v.x(); __Y = v.y(); __Z = z; GEOM_ASSERT(isValid()); } void Vector3::set( const Cylindrical& c ) { GEOM_ASSERT(c.isValid()); __X = c.radius * cos(c.theta); __Y = c.radius * sin(c.theta); __Z = c.z; GEOM_ASSERT(isValid()); } void Vector3::set( const Spherical& s ) { GEOM_ASSERT(s.isValid()); real_t _tmp = s.radius * sin(s.phi); __X = cos(s.theta) * _tmp; __Y = sin(s.theta) * _tmp; __Z = s.radius * cos(s.phi); GEOM_ASSERT(isValid()); } void Vector3::set( const Vector3& v ) { __X = v.__X; __Y = v.__Y; __Z = v.__Z; GEOM_ASSERT(isValid()); } Vector3::~Vector3( ) { } const real_t& Vector3::x( ) const { return __X; } real_t& Vector3::x( ) { return __X; } const real_t& Vector3::y( ) const { return __Y; } real_t& Vector3::y( ) { return __Y; } const real_t& Vector3::z( ) const { return __Z; } real_t& Vector3::z( ) { return __Z; } /* --------------------------------------------------------------------- */ bool Vector3::operator==( const Vector3& v ) const { return normLinf(*this - v) < GEOM_TOLERANCE; } bool Vector3::operator!=( const Vector3& v ) const { return normLinf(*this - v) >= GEOM_TOLERANCE; } Vector3& Vector3::operator+=( const Vector3& v ) { __X += v.__X; __Y += v.__Y; __Z += v.__Z; return *this; } Vector3& Vector3::operator-=( const Vector3& v ) { __X -= v.__X; __Y -= v.__Y; __Z -= v.__Z; return *this; } Vector3& Vector3::operator*=( const real_t& s ) { __X *= s; __Y *= s; __Z *= s; return *this; } Vector3& Vector3::operator/=( const real_t& s ) { GEOM_ASSERT(fabs(s) > GEOM_TOLERANCE); __X /= s; __Y /= s; __Z /= s; return *this; } Vector3 Vector3::operator-( ) const { return Vector3(-__X, -__Y, -__Z); } Vector3 Vector3::operator+( const Vector3& v) const { return Vector3(*this) += v; } Vector3 Vector3::operator-( const Vector3& v ) const { return Vector3(*this) -= v; } bool Vector3::isNormalized( ) const { return fabs(normSquared(*this) - 1) < GEOM_EPSILON; } bool Vector3::isOrthogonalTo( const Vector3& v ) const { return fabs(dot(*this,v)) < GEOM_EPSILON; } bool Vector3::isValid( ) const { return finite(__X) && finite(__Y) && finite(__Z); } real_t Vector3::normalize( ) { real_t _norm = norm(*this); if (_norm > GEOM_TOLERANCE) *this /= _norm; return _norm; } Vector3 Vector3::normed( ) const { return direction(*this); } Vector2 Vector3::project( ) const { return Vector2(__X / __Z,__Y / __Z); } int Vector3::getMaxAbsCoord() const { if( fabs(__X) > fabs(__Y) ) return ( fabs(__X) > fabs(__Z) ) ? 0 : 2; else return ( fabs(__Y) > fabs(__Z) ) ? 1 : 2; } int Vector3::getMinAbsCoord() const { if( fabs(__X) < fabs(__Y) ) return ( fabs(__X) < fabs(__Z) ) ? 0 : 2; else return ( fabs(__Y) < fabs(__Z) ) ? 1 : 2; } Vector3 Vector3::anOrthogonalVector() const { if (fabs(__X) < GEOM_EPSILON) return Vector3(1,0,0); else if (fabs(__Y) < GEOM_EPSILON) return Vector3(0,1,0); else if (fabs(__Z) < GEOM_EPSILON) return Vector3(0,0,1); real_t _norm = norm(*this); if (_norm < GEOM_TOLERANCE) return Vector3(0,0,0);; return TOOLS(Vector3)(-__Y/_norm,__X/_norm,0); } /* --------------------------------------------------------------------- */ Vector3 operator*( const Vector3& v, const real_t& s ) { return Vector3(v) *= s; } Vector3 operator*( const real_t& s, const Vector3& v ) { return Vector3(v) *= s; } Vector3 operator/( const Vector3& v, const real_t& s ) { GEOM_ASSERT(fabs(s) > GEOM_TOLERANCE); return Vector3(v) /= s; } ostream& operator<<( ostream& stream, const Vector3& v ) { return stream << "<" << v.__X << "," << v.__Y << "," << v.__Z << ">"; } bool operator<(const Vector3& v1, const Vector3& v2) { if (v1.__X < (v2.__X - GEOM_TOLERANCE)) return true; if (v1.__X > (v2.__X + GEOM_TOLERANCE)) return false; if (v1.__Y < (v2.__Y - GEOM_TOLERANCE)) return true; if (v1.__Y > (v2.__Y + GEOM_TOLERANCE)) return false; return v1.__Z < (v2.__Z - GEOM_TOLERANCE); } bool strictly_eq( const Vector3& v1, const Vector3& v2 ) { return normLinf(v1 - v2) == 0; } bool strictly_inf(const Vector3& v1, const Vector3& v2) { if (v1.__X < v2.__X) return true; if (v1.__X > v2.__X) return false; if (v1.__Y < v2.__Y) return true; if (v1.__Y > v2.__Y) return false; return v1.__Z < v2.__Z ; } Vector3 abs( const Vector3& v ) { return Vector3(fabs(v.__X),fabs(v.__Y),fabs(v.__Z)); } Vector3 cross( const Vector3& v1, const Vector3& v2 ) { return Vector3(v1.__Y * v2.__Z - v1.__Z * v2.__Y, v1.__Z * v2.__X - v1.__X * v2.__Z, v1.__X * v2.__Y - v1.__Y * v2.__X); } Vector3 operator^( const Vector3& v1, const Vector3& v2 ) { return Vector3(v1.__Y * v2.__Z - v1.__Z * v2.__Y, v1.__Z * v2.__X - v1.__X * v2.__Z, v1.__X * v2.__Y - v1.__Y * v2.__X); } Vector3 direction( const Vector3& v ) { real_t n = norm(v); if (n < GEOM_EPSILON) return v; return v / n; } real_t dot( const Vector3& v1, const Vector3& v2 ) { return (v1.__X * v2.__X + v1.__Y * v2.__Y + v1.__Z * v2.__Z); } real_t operator*( const Vector3& v1, const Vector3& v2 ) { return (v1.__X * v2.__X + v1.__Y * v2.__Y + v1.__Z * v2.__Z); } Vector3 Max( const Vector3& v1, const Vector3& v2 ) { return Vector3(max(v1.__X,v2.__X), max(v1.__Y,v2.__Y), max(v1.__Z,v2.__Z)); } Vector3 Min( const Vector3& v1, const Vector3& v2 ) { return Vector3(min(v1.__X,v2.__X), min(v1.__Y,v2.__Y), min(v1.__Z,v2.__Z)); } real_t norm( const Vector3& v ) { return sqrt(normSquared(v)); } real_t normL1( const Vector3& v ) { return sum(abs(v)); } real_t normLinf( const Vector3& v ) { return *(abs(v).getMax()); } real_t normSquared( const Vector3& v ) { return dot(v,v); } real_t sum( const Vector3& v ) { return v.__X + v.__Y + v.__Z; } real_t radialAnisotropicNorm( const Vector3& v, const Vector3& t, real_t alpha, real_t beta ){ real_t a = dot(v,t); Vector3 b = v - a*t; return sqrt(a*a*alpha+beta*normSquared(b)); } real_t anisotropicNorm( const Vector3& v, const Vector3& factors ) { return sqrt(factors.x()*v.x()*v.x()+factors.y()*v.y()*v.y()+factors.z()*v.z()*v.z()); } real_t angle( const Vector3& v1 , const Vector3& v2 ) { double cosinus = dot( v1,v2 ); Vector3 vy = cross( v1, v2 ); double sinus = norm( vy ); return atan2( sinus, cosinus );} real_t angle( const Vector3& v1, const Vector3& v2, const Vector3& axis ) { double cosinus = dot( v1,v2 ); Vector3 vy = cross( v1, v2 ); double sinus = norm( vy ); if( dot( vy, axis ) < 0 ){ return atan2( -sinus, cosinus ); } return atan2( sinus, cosinus ); } /* --------------------------------------------------------------------- */ const Vector4 Vector4::ORIGIN; const Vector4 Vector4::OX(1,0,0,0); const Vector4 Vector4::OY(0,1,0,0); const Vector4 Vector4::OZ(0,0,1,0); const Vector4 Vector4::OW(0,0,0,1); /* --------------------------------------------------------------------- */ Vector4::Vector4( const real_t& x , const real_t& y , const real_t& z , const real_t& w ) : Tuple4<real_t>(x,y,z,w) { GEOM_ASSERT(isValid()); } Vector4::Vector4( const Vector3& v, const real_t& w ) : Tuple4<real_t>(v.x(),v.y(),v.z(),w) { GEOM_ASSERT(v.isValid()); GEOM_ASSERT(isValid()); } Vector4::Vector4( const Vector2& v, const real_t& z , const real_t& w ) : Tuple4<real_t>(v.x(),v.y(),z,w) { GEOM_ASSERT(v.isValid()); GEOM_ASSERT(isValid()); } Vector4::~Vector4( ) { } void Vector4::set( const real_t& x , const real_t& y , const real_t& z , const real_t& w ) { __X = x; __Y = y; __Z = z; __W = w; GEOM_ASSERT(isValid()); } void Vector4::set( const real_t * v4 ) { __X = v4[0]; __Y = v4[1]; __Z = v4[2]; __W = v4[3]; GEOM_ASSERT(isValid()); } void Vector4::set( const Vector3& v, const real_t& w ) { GEOM_ASSERT(v.isValid()); __X = v.x(); __Y = v.y(); __Z = v.z(); __W = w; GEOM_ASSERT(isValid()); } void Vector4::set( const Vector4& v) { GEOM_ASSERT(v.isValid()); __X = v.__X; __Y = v.__Y; __Z = v.__Z; __W = v.__W; GEOM_ASSERT(isValid()); } const real_t& Vector4::x( ) const { return __X; } real_t& Vector4::x( ) { return __X; } const real_t& Vector4::y( ) const { return __Y; } real_t& Vector4::y( ) { return __Y; } const real_t& Vector4::z( ) const { return __Z; } real_t& Vector4::z( ) { return __Z; } const real_t& Vector4::w( ) const { return __W; } real_t& Vector4::w( ) { return __W; } int Vector4::getMaxAbsCoord() const { if ( fabs(__X) > fabs(__Y) ){ if( fabs(__X) > fabs(__Z) ) return ( fabs(__X) > fabs(__W) ) ? 0 : 3; else return ( fabs(__Z) > fabs(__W) ) ? 2 : 3; } else { if( fabs(__Y) > fabs(__Z) ) return ( fabs(__Y) > fabs(__W) ) ? 1 : 3; else return ( fabs(__Z) > fabs(__W) ) ? 2 : 3; } } int Vector4::getMinAbsCoord() const { if ( fabs(__X) < fabs(__Y) ){ if( fabs(__X) < fabs(__Z) ) return ( fabs(__X) < fabs(__W) ) ? 0 : 3; else return ( fabs(__Z) < fabs(__W) ) ? 2 : 3; } else { if( fabs(__Y) < fabs(__Z) ) return ( fabs(__Y) < fabs(__W) ) ? 1 : 3; else return ( fabs(__Z) < fabs(__W) ) ? 2 : 3; } } /* --------------------------------------------------------------------- */ bool Vector4::operator==( const Vector4& v ) const { return normLinf(*this - v) < GEOM_TOLERANCE; } bool Vector4::operator!=( const Vector4& v ) const { return normLinf(*this - v) >= GEOM_TOLERANCE; } Vector4& Vector4::operator+=( const Vector4& v ) { __X += v.__X; __Y += v.__Y; __Z += v.__Z; __W += v.__W; return *this; } Vector4& Vector4::operator-=( const Vector4& v ) { __X -= v.__X; __Y -= v.__Y; __Z -= v.__Z; __W -= v.__W; return *this; } Vector4& Vector4::operator*=( const real_t& s ) { __X *= s; __Y *= s; __Z *= s; __W *= s; return *this; } Vector4& Vector4::operator/=( const real_t& s ) { GEOM_ASSERT(fabs(s) > GEOM_TOLERANCE); __X /= s; __Y /= s; __Z /= s; __W /= s; return *this; } Vector4 Vector4::operator-( ) const { return Vector4(-__X, -__Y, -__Z,-__W); } Vector4 Vector4::operator+( const Vector4& v) const { return Vector4(*this) += v; } Vector4 Vector4::operator-( const Vector4& v ) const { return Vector4(*this) -= v; } bool Vector4::isNormalized( ) const { return fabs(normSquared(*this) - 1) < GEOM_EPSILON; } bool Vector4::isOrthogonalTo( const Vector4& v ) const { return fabs(dot(*this,v)) < GEOM_EPSILON; } bool Vector4::isValid( ) const { return finite(__X) && finite(__Y) && finite(__Z) && finite(__W); } real_t Vector4::normalize( ) { real_t _norm = norm(*this); if (_norm > GEOM_TOLERANCE) *this /= _norm; return _norm; } Vector4 Vector4::normed( ) const { return direction(*this); } Vector3 Vector4::project( ) const { GEOM_ASSERT(fabs(__W) > GEOM_TOLERANCE); return Vector3(__X / __W, __Y / __W, __Z / __W); } /* --------------------------------------------------------------------- */ Vector4 operator*( const Vector4& v, const real_t& s ) { return Vector4(v) *= s; } Vector4 operator*( const real_t& s, const Vector4& v ) { return Vector4(v) *= s; } Vector4 operator/( const Vector4& v, const real_t& s ) { GEOM_ASSERT(fabs(s) > GEOM_TOLERANCE); return Vector4(v) /= s; } ostream& operator<<( ostream& stream, const Vector4& v ) { return stream << "<" << v.__X << "," << v.__Y << "," << v.__Z << "," << v.__W << ">"; } bool operator<(const Vector4& v1, const Vector4& v2) { if (v1.__X < (v2.__X - GEOM_TOLERANCE)) return true; if (v1.__X > (v2.__X + GEOM_TOLERANCE)) return false; if (v1.__Y < (v2.__Y - GEOM_TOLERANCE)) return true; if (v1.__Y > (v2.__Y + GEOM_TOLERANCE)) return false; if (v1.__Z < (v2.__Z - GEOM_TOLERANCE)) return true; if (v1.__Z > (v2.__Z + GEOM_TOLERANCE)) return false; return v1.__W < (v2.__W - GEOM_TOLERANCE); } bool strictly_eq( const Vector4& v1, const Vector4& v2 ) { return normLinf(v1 - v2) == 0; } bool strictly_inf(const Vector4& v1, const Vector4& v2) { if (v1.__X < v2.__X) return true; if (v1.__X > v2.__X) return false; if (v1.__Y < v2.__Y) return true; if (v1.__Y > v2.__Y) return false; if (v1.__Z < v2.__Z) return true; if (v1.__Z > v2.__Z) return false; return v1.__W < v2.__W ; } Vector4 abs( const Vector4& v ) { return Vector4(fabs(v.__X),fabs(v.__Y), fabs(v.__Z),fabs(v.__W)); } Vector4 direction( const Vector4& v ) { real_t n = norm(v); if (n < GEOM_EPSILON) return v; return v / n; } real_t dot( const Vector4& v1, const Vector4& v2 ) { return v1.__X * v2.__X + v1.__Y * v2.__Y + v1.__Z * v2.__Z + v1.__W * v2.__W; } real_t operator*( const Vector4& v1, const Vector4& v2 ) { return v1.__X * v2.__X + v1.__Y * v2.__Y + v1.__Z * v2.__Z + v1.__W * v2.__W; } Vector4 Max( const Vector4& v1, const Vector4& v2 ) { return Vector4(max(v1.__X,v2.__X),max(v1.__Y,v2.__Y), max(v1.__Z,v2.__Z),max(v1.__W,v2.__W)); } Vector4 Min( const Vector4& v1, const Vector4& v2 ) { return Vector4(min(v1.__X,v2.__X),min(v1.__Y,v2.__Y), min(v1.__Z,v2.__Z),min(v1.__W,v2.__W)); } real_t norm( const Vector4& v ) { return sqrt(normSquared(v)); } real_t normL1( const Vector4& v ) { return sum(abs(v)); } real_t normLinf( const Vector4& v ) { return *(abs(v).getMax()); } real_t normSquared( const Vector4& v ) { return dot(v,v); } real_t sum( const Vector4& v ) { return v.__X + v.__Y + v.__Z + v.__W; } /* --------------------------------------------------------------------- */ TOOLS_END_NAMESPACE /* --------------------------------------------------------------------- */
gpl-3.0
carlomr/tspeed
lib/src/Dunavant.cpp
91635
/** * @file Dunavant.cpp * @brief Functions for Dunavant quadrature (nodes and weights, tabulated) * @author John Burkardt */ # include <cstdlib> # include <iostream> # include <fstream> # include <iomanip> # include <cmath> # include <ctime> # include <cstring> using namespace std; # include "Dunavant.hpp" //****************************************************************************80 int dunavant_degree ( int rule ) //****************************************************************************80 // // Purpose: // // DUNAVANT_DEGREE returns the degree of a Dunavant rule for the triangle. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int RULE, the index of the rule. // // Output, int DUNAVANT_DEGREE, the polynomial degree of exactness of // the rule. // { int degree; if ( 1 <= rule && rule <= 20 ) { degree = rule; } else { degree = -1; cout << "\n"; cout << "DUNAVANT_DEGREE - Fatal error!\n"; cout << " Illegal RULE = " << rule << "\n"; exit ( 1 ); } return degree; } //****************************************************************************80 int dunavant_order_num ( int rule ) //****************************************************************************80 // // Purpose: // // DUNAVANT_ORDER_NUM returns the order of a Dunavant rule for the triangle. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int RULE, the index of the rule. // // Output, int DUNAVANT_ORDER_NUM, the order (number of points) of the rule. // { int order; int order_num; int *suborder; int suborder_num; suborder_num = dunavant_suborder_num ( rule ); suborder = dunavant_suborder ( rule, suborder_num ); order_num = 0; for ( order = 0; order < suborder_num; order++ ) { order_num = order_num + suborder[order]; } delete [] suborder; return order_num; } //****************************************************************************80 void dunavant_rule ( int rule, int order_num, double xy[], double w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_RULE returns the points and weights of a Dunavant rule. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int RULE, the index of the rule. // // Input, int ORDER_NUM, the order (number of points) of the rule. // // Output, double XY[2*ORDER_NUM], the points of the rule. // // Output, double W[ORDER_NUM], the weights of the rule. // { int k; int o; int s; int *suborder; int suborder_num; double *suborder_w; double *suborder_xyz; // // Get the suborder information. // suborder_num = dunavant_suborder_num ( rule ); suborder_xyz = new double[3*suborder_num]; suborder_w = new double[suborder_num]; suborder = dunavant_suborder ( rule, suborder_num ); dunavant_subrule ( rule, suborder_num, suborder_xyz, suborder_w ); // // Expand the suborder information to a full order rule. // o = 0; for ( s = 0; s < suborder_num; s++ ) { if ( suborder[s] == 1 ) { xy[0+o*2] = suborder_xyz[0+s*3]; xy[1+o*2] = suborder_xyz[1+s*3]; w[o] = suborder_w[s]; o = o + 1; } else if ( suborder[s] == 3 ) { for ( k = 0; k < 3; k++ ) { xy[0+o*2] = suborder_xyz [ i4_wrap(k, 0,2) + s*3 ]; xy[1+o*2] = suborder_xyz [ i4_wrap(k+1,0,2) + s*3 ]; w[o] = suborder_w[s]; o = o + 1; } } else if ( suborder[s] == 6 ) { for ( k = 0; k < 3; k++ ) { xy[0+o*2] = suborder_xyz [ i4_wrap(k, 0,2) + s*3 ]; xy[1+o*2] = suborder_xyz [ i4_wrap(k+1,0,2) + s*3 ]; w[o] = suborder_w[s]; o = o + 1; } for ( k = 0; k < 3; k++ ) { xy[0+o*2] = suborder_xyz [ i4_wrap(k+1,0,2) + s*3 ]; xy[1+o*2] = suborder_xyz [ i4_wrap(k, 0,2) + s*3 ]; w[o] = suborder_w[s]; o = o + 1; } } else { cout << "\n"; cout << "DUNAVANT_RULE - Fatal error!\n;"; cout << " Illegal SUBORDER(" << s << ") = " << suborder[s] << "\n"; exit ( 1 ); } } delete [] suborder; delete [] suborder_xyz; delete [] suborder_w; return; } //****************************************************************************80 int dunavant_rule_num ( ) //****************************************************************************80 // // Purpose: // // DUNAVANT_RULE_NUM returns the number of Dunavant rules available. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Output, int DUNAVANT_RULE_NUM, the number of rules available. // { int rule_num; rule_num = 20; return rule_num; } //****************************************************************************80 int *dunavant_suborder ( int rule, int suborder_num ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBORDER returns the suborders for a Dunavant rule. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int RULE, the index of the rule. // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, int DUNAVANT_SUBORDER[SUBORDER_NUM], the suborders of the rule. // { int *suborder; suborder = new int[suborder_num]; if ( rule == 1 ) { suborder[0] = 1; } else if ( rule == 2 ) { suborder[0] = 3; } else if ( rule == 3 ) { suborder[0] = 1; suborder[1] = 3; } else if ( rule == 4 ) { suborder[0] = 3; suborder[1] = 3; } else if ( rule == 5 ) { suborder[0] = 1; suborder[1] = 3; suborder[2] = 3; } else if ( rule == 6 ) { suborder[0] = 3; suborder[1] = 3; suborder[2] = 6; } else if ( rule == 7 ) { suborder[0] = 1; suborder[1] = 3; suborder[2] = 3; suborder[3] = 6; } else if ( rule == 8 ) { suborder[0] = 1; suborder[1] = 3; suborder[2] = 3; suborder[3] = 3; suborder[4] = 6; } else if ( rule == 9 ) { suborder[0] = 1; suborder[1] = 3; suborder[2] = 3; suborder[3] = 3; suborder[4] = 3; suborder[5] = 6; } else if ( rule == 10 ) { suborder[0] = 1; suborder[1] = 3; suborder[2] = 3; suborder[3] = 6; suborder[4] = 6; suborder[5] = 6; } else if ( rule == 11 ) { suborder[0] = 3; suborder[1] = 3; suborder[2] = 3; suborder[3] = 3; suborder[4] = 3; suborder[5] = 6; suborder[6] = 6; } else if ( rule == 12 ) { suborder[0] = 3; suborder[1] = 3; suborder[2] = 3; suborder[3] = 3; suborder[4] = 3; suborder[5] = 6; suborder[6] = 6; suborder[7] = 6; } else if ( rule == 13 ) { suborder[0] = 1; suborder[1] = 3; suborder[2] = 3; suborder[3] = 3; suborder[4] = 3; suborder[5] = 3; suborder[6] = 3; suborder[7] = 6; suborder[8] = 6; suborder[9] = 6; } else if ( rule == 14 ) { suborder[0] = 3; suborder[1] = 3; suborder[2] = 3; suborder[3] = 3; suborder[4] = 3; suborder[5] = 3; suborder[6] = 6; suborder[7] = 6; suborder[8] = 6; suborder[9] = 6; } else if ( rule == 15 ) { suborder[0] = 3; suborder[1] = 3; suborder[2] = 3; suborder[3] = 3; suborder[4] = 3; suborder[5] = 3; suborder[6] = 6; suborder[7] = 6; suborder[8] = 6; suborder[9] = 6; suborder[10] = 6; } else if ( rule == 16 ) { suborder[0] = 1; suborder[1] = 3; suborder[2] = 3; suborder[3] = 3; suborder[4] = 3; suborder[5] = 3; suborder[6] = 3; suborder[7] = 3; suborder[8] = 6; suborder[9] = 6; suborder[10] = 6; suborder[11] = 6; suborder[12] = 6; } else if ( rule == 17 ) { suborder[0] = 1; suborder[1] = 3; suborder[2] = 3; suborder[3] = 3; suborder[4] = 3; suborder[5] = 3; suborder[6] = 3; suborder[7] = 3; suborder[8] = 3; suborder[9] = 6; suborder[10] = 6; suborder[11] = 6; suborder[12] = 6; suborder[13] = 6; suborder[14] = 6; } else if ( rule == 18 ) { suborder[0] = 1; suborder[1] = 3; suborder[2] = 3; suborder[3] = 3; suborder[4] = 3; suborder[5] = 3; suborder[6] = 3; suborder[7] = 3; suborder[8] = 3; suborder[9] = 3; suborder[10] = 6; suborder[11] = 6; suborder[12] = 6; suborder[13] = 6; suborder[14] = 6; suborder[15] = 6; suborder[16] = 6; } else if ( rule == 19 ) { suborder[0] = 1; suborder[1] = 3; suborder[2] = 3; suborder[3] = 3; suborder[4] = 3; suborder[5] = 3; suborder[6] = 3; suborder[7] = 3; suborder[8] = 3; suborder[9] = 6; suborder[10] = 6; suborder[11] = 6; suborder[12] = 6; suborder[13] = 6; suborder[14] = 6; suborder[15] = 6; suborder[16] = 6; } else if ( rule == 20 ) { suborder[0] = 1; suborder[1] = 3; suborder[2] = 3; suborder[3] = 3; suborder[4] = 3; suborder[5] = 3; suborder[6] = 3; suborder[7] = 3; suborder[8] = 3; suborder[9] = 3; suborder[10] = 3; suborder[11] = 6; suborder[12] = 6; suborder[13] = 6; suborder[14] = 6; suborder[15] = 6; suborder[16] = 6; suborder[17] = 6; suborder[18] = 6; } else { cout << "\n"; cout << "DUNAVANT_SUBORDER - Fatal error!\n"; cout << " Illegal RULE = " << rule << "\n"; exit ( 1 ); } return suborder; } //****************************************************************************80 int dunavant_suborder_num ( int rule ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBORDER_NUM returns the number of suborders for a Dunavant rule. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int RULE, the index of the rule. // // Output, int DUNAVANT_SUBORDER_NUM, the number of suborders of the rule. // { int suborder_num; if ( rule == 1 ) { suborder_num = 1; } else if ( rule == 2 ) { suborder_num = 1; } else if ( rule == 3 ) { suborder_num = 2; } else if ( rule == 4 ) { suborder_num = 2; } else if ( rule == 5 ) { suborder_num = 3; } else if ( rule == 6 ) { suborder_num = 3; } else if ( rule == 7 ) { suborder_num = 4; } else if ( rule == 8 ) { suborder_num = 5; } else if ( rule == 9 ) { suborder_num = 6; } else if ( rule == 10 ) { suborder_num = 6; } else if ( rule == 11 ) { suborder_num = 7; } else if ( rule == 12 ) { suborder_num = 8; } else if ( rule == 13 ) { suborder_num = 10; } else if ( rule == 14 ) { suborder_num = 10; } else if ( rule == 15 ) { suborder_num = 11; } else if ( rule == 16 ) { suborder_num = 13; } else if ( rule == 17 ) { suborder_num = 15; } else if ( rule == 18 ) { suborder_num = 17; } else if ( rule == 19 ) { suborder_num = 17; } else if ( rule == 20 ) { suborder_num = 19; } else { suborder_num = -1; cout << "\n"; cout << "DUNAVANT_SUBORDER_NUM - Fatal error!\n"; cout << " Illegal RULE = " << rule << "\n"; exit ( 1 ); } return suborder_num; } //****************************************************************************80 void dunavant_subrule ( int rule, int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE returns a compressed Dunavant rule. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int RULE, the index of the rule. // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { if ( rule == 1 ) { dunavant_subrule_01 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 2 ) { dunavant_subrule_02 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 3 ) { dunavant_subrule_03 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 4 ) { dunavant_subrule_04 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 5 ) { dunavant_subrule_05 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 6 ) { dunavant_subrule_06 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 7 ) { dunavant_subrule_07 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 8 ) { dunavant_subrule_08 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 9 ) { dunavant_subrule_09 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 10 ) { dunavant_subrule_10 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 11 ) { dunavant_subrule_11 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 12 ) { dunavant_subrule_12 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 13 ) { dunavant_subrule_13 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 14 ) { dunavant_subrule_14 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 15 ) { dunavant_subrule_15 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 16 ) { dunavant_subrule_16 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 17 ) { dunavant_subrule_17 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 18 ) { dunavant_subrule_18 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 19 ) { dunavant_subrule_19 ( suborder_num, suborder_xyz, suborder_w ); } else if ( rule == 20 ) { dunavant_subrule_20 ( suborder_num, suborder_xyz, suborder_w ); } else { cout << "\n"; cout << "DUNAVANT_SUBRULE - Fatal error!\n"; cout << " Illegal RULE = " << rule << "\n"; exit ( 1 ); } return; } //****************************************************************************80 void dunavant_subrule_01 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_01 returns a compressed Dunavant rule 1. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_01[3*1] = { 0.333333333333333, 0.333333333333333, 0.333333333333333 }; double suborder_w_rule_01[1] = { 1.000000000000000 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_01[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_01[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_01[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_01[s]; } return; } //****************************************************************************80 void dunavant_subrule_02 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_02 returns a compressed Dunavant rule 2. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_02[3*1] = { 0.666666666666667, 0.166666666666667, 0.166666666666667 }; double suborder_w_rule_02[1] = { 0.333333333333333 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_02[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_02[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_02[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_02[s]; } return; } //****************************************************************************80 void dunavant_subrule_03 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_03 returns a compressed Dunavant rule 3. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_03[3*2] = { 0.333333333333333, 0.333333333333333, 0.333333333333333, 0.600000000000000, 0.200000000000000, 0.200000000000000 }; double suborder_w_rule_03[2] = { -0.562500000000000, 0.520833333333333 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_03[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_03[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_03[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_03[s]; } return; } //****************************************************************************80 void dunavant_subrule_04 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_04 returns a compressed Dunavant rule 4. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_04[3*2] = { 0.108103018168070, 0.445948490915965, 0.445948490915965, 0.816847572980459, 0.091576213509771, 0.091576213509771 }; double suborder_w_rule_04[2] = { 0.223381589678011, 0.109951743655322 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_04[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_04[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_04[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_04[s]; } return; } //****************************************************************************80 void dunavant_subrule_05 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_05 returns a compressed Dunavant rule 5. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_05[3*3] = { 0.333333333333333, 0.333333333333333, 0.333333333333333, 0.059715871789770, 0.470142064105115, 0.470142064105115, 0.797426985353087, 0.101286507323456, 0.101286507323456 }; double suborder_w_rule_05[3] = { 0.225000000000000, 0.132394152788506, 0.125939180544827 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_05[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_05[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_05[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_05[s]; } return; } //****************************************************************************80 void dunavant_subrule_06 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_06 returns a compressed Dunavant rule 6. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_06[3*3] = { 0.501426509658179, 0.249286745170910, 0.249286745170910, 0.873821971016996, 0.063089014491502, 0.063089014491502, 0.053145049844817, 0.310352451033784, 0.636502499121399 }; double suborder_w_rule_06[3] = { 0.116786275726379, 0.050844906370207, 0.082851075618374 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_06[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_06[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_06[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_06[s]; } return; } //****************************************************************************80 void dunavant_subrule_07 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_07 returns a compressed Dunavant rule 7. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_07[3*4] = { 0.333333333333333, 0.333333333333333, 0.333333333333333, 0.479308067841920, 0.260345966079040, 0.260345966079040, 0.869739794195568, 0.065130102902216, 0.065130102902216, 0.048690315425316, 0.312865496004874, 0.638444188569810 }; double suborder_w_rule_07[4] = { -0.149570044467682, 0.175615257433208, 0.053347235608838, 0.077113760890257 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_07[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_07[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_07[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_07[s]; } return; } //****************************************************************************80 void dunavant_subrule_08 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_08 returns a compressed Dunavant rule 8. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_08[3*5] = { 0.333333333333333, 0.333333333333333, 0.333333333333333, 0.081414823414554, 0.459292588292723, 0.459292588292723, 0.658861384496480, 0.170569307751760, 0.170569307751760, 0.898905543365938, 0.050547228317031, 0.050547228317031, 0.008394777409958, 0.263112829634638, 0.728492392955404 }; double suborder_w_rule_08[5] = { 0.144315607677787, 0.095091634267285, 0.103217370534718, 0.032458497623198, 0.027230314174435 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_08[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_08[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_08[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_08[s]; } return; } //****************************************************************************80 void dunavant_subrule_09 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_09 returns a compressed Dunavant rule 9. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_09[3*6] = { 0.333333333333333, 0.333333333333333, 0.333333333333333, 0.020634961602525, 0.489682519198738, 0.489682519198738, 0.125820817014127, 0.437089591492937, 0.437089591492937, 0.623592928761935, 0.188203535619033, 0.188203535619033, 0.910540973211095, 0.044729513394453, 0.044729513394453, 0.036838412054736, 0.221962989160766, 0.741198598784498 }; double suborder_w_rule_09[6] = { 0.097135796282799, 0.031334700227139, 0.077827541004774, 0.079647738927210, 0.025577675658698, 0.043283539377289 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_09[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_09[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_09[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_09[s]; } return; } //****************************************************************************80 void dunavant_subrule_10 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_10 returns a compressed Dunavant rule 10. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_10[3*6] = { 0.333333333333333, 0.333333333333333, 0.333333333333333, 0.028844733232685, 0.485577633383657, 0.485577633383657, 0.781036849029926, 0.109481575485037, 0.109481575485037, 0.141707219414880, 0.307939838764121, 0.550352941820999, 0.025003534762686, 0.246672560639903, 0.728323904597411, 0.009540815400299, 0.066803251012200, 0.923655933587500 }; double suborder_w_rule_10[6] = { 0.090817990382754, 0.036725957756467, 0.045321059435528, 0.072757916845420, 0.028327242531057, 0.009421666963733 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_10[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_10[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_10[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_10[s]; } return; } //****************************************************************************80 void dunavant_subrule_11 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_11 returns a compressed Dunavant rule 11. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_11[3*7] = { -0.069222096541517, 0.534611048270758, 0.534611048270758, 0.202061394068290, 0.398969302965855, 0.398969302965855, 0.593380199137435, 0.203309900431282, 0.203309900431282, 0.761298175434837, 0.119350912282581, 0.119350912282581, 0.935270103777448, 0.032364948111276, 0.032364948111276, 0.050178138310495, 0.356620648261293, 0.593201213428213, 0.021022016536166, 0.171488980304042, 0.807489003159792 }; double suborder_w_rule_11[7] = { 0.000927006328961, 0.077149534914813, 0.059322977380774, 0.036184540503418, 0.013659731002678, 0.052337111962204, 0.020707659639141 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_11[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_11[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_11[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_11[s]; } return; } //****************************************************************************80 void dunavant_subrule_12 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_12 returns a compressed Dunavant rule 12. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_12[3*8] = { 0.023565220452390, 0.488217389773805, 0.488217389773805, 0.120551215411079, 0.439724392294460, 0.439724392294460, 0.457579229975768, 0.271210385012116, 0.271210385012116, 0.744847708916828, 0.127576145541586, 0.127576145541586, 0.957365299093579, 0.021317350453210, 0.021317350453210, 0.115343494534698, 0.275713269685514, 0.608943235779788, 0.022838332222257, 0.281325580989940, 0.695836086787803, 0.025734050548330, 0.116251915907597, 0.858014033544073 }; double suborder_w_rule_12[8] = { 0.025731066440455, 0.043692544538038, 0.062858224217885, 0.034796112930709, 0.006166261051559, 0.040371557766381, 0.022356773202303, 0.017316231108659 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_12[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_12[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_12[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_12[s]; } return; } //****************************************************************************80 void dunavant_subrule_13 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_13 returns a compressed Dunavant rule 13. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_13[3*10] = { 0.333333333333333, 0.333333333333333, 0.333333333333333, 0.009903630120591, 0.495048184939705, 0.495048184939705, 0.062566729780852, 0.468716635109574, 0.468716635109574, 0.170957326397447, 0.414521336801277, 0.414521336801277, 0.541200855914337, 0.229399572042831, 0.229399572042831, 0.771151009607340, 0.114424495196330, 0.114424495196330, 0.950377217273082, 0.024811391363459, 0.024811391363459, 0.094853828379579, 0.268794997058761, 0.636351174561660, 0.018100773278807, 0.291730066734288, 0.690169159986905, 0.022233076674090, 0.126357385491669, 0.851409537834241 }; double suborder_w_rule_13[10] = { 0.052520923400802, 0.011280145209330, 0.031423518362454, 0.047072502504194, 0.047363586536355, 0.031167529045794, 0.007975771465074, 0.036848402728732, 0.017401463303822, 0.015521786839045 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_13[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_13[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_13[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_13[s]; } return; } //****************************************************************************80 void dunavant_subrule_14 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_14 returns a compressed Dunavant rule 14. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_14[3*10] = { 0.022072179275643, 0.488963910362179, 0.488963910362179, 0.164710561319092, 0.417644719340454, 0.417644719340454, 0.453044943382323, 0.273477528308839, 0.273477528308839, 0.645588935174913, 0.177205532412543, 0.177205532412543, 0.876400233818255, 0.061799883090873, 0.061799883090873, 0.961218077502598, 0.019390961248701, 0.019390961248701, 0.057124757403648, 0.172266687821356, 0.770608554774996, 0.092916249356972, 0.336861459796345, 0.570222290846683, 0.014646950055654, 0.298372882136258, 0.686980167808088, 0.001268330932872, 0.118974497696957, 0.879757171370171 }; double suborder_w_rule_14[10] = { 0.021883581369429, 0.032788353544125, 0.051774104507292, 0.042162588736993, 0.014433699669777, 0.004923403602400, 0.024665753212564, 0.038571510787061, 0.014436308113534, 0.005010228838501 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_14[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_14[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_14[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_14[s]; } return; } //****************************************************************************80 void dunavant_subrule_15 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_15 returns a compressed Dunavant rule 15. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_15[3*11] = { -0.013945833716486, 0.506972916858243, 0.506972916858243, 0.137187291433955, 0.431406354283023, 0.431406354283023, 0.444612710305711, 0.277693644847144, 0.277693644847144, 0.747070217917492, 0.126464891041254, 0.126464891041254, 0.858383228050628, 0.070808385974686, 0.070808385974686, 0.962069659517853, 0.018965170241073, 0.018965170241073, 0.133734161966621, 0.261311371140087, 0.604954466893291, 0.036366677396917, 0.388046767090269, 0.575586555512814, -0.010174883126571, 0.285712220049916, 0.724462663076655, 0.036843869875878, 0.215599664072284, 0.747556466051838, 0.012459809331199, 0.103575616576386, 0.883964574092416 }; double suborder_w_rule_15[11] = { 0.001916875642849, 0.044249027271145, 0.051186548718852, 0.023687735870688, 0.013289775690021, 0.004748916608192, 0.038550072599593, 0.027215814320624, 0.002182077366797, 0.021505319847731, 0.007673942631049 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_15[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_15[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_15[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_15[s]; } return; } //****************************************************************************80 void dunavant_subrule_16 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_16 returns a compressed Dunavant rule 16. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_16[3*13] = { 0.333333333333333, 0.333333333333333, 0.333333333333333, 0.005238916103123, 0.497380541948438, 0.497380541948438, 0.173061122901295, 0.413469438549352, 0.413469438549352, 0.059082801866017, 0.470458599066991, 0.470458599066991, 0.518892500060958, 0.240553749969521, 0.240553749969521, 0.704068411554854, 0.147965794222573, 0.147965794222573, 0.849069624685052, 0.075465187657474, 0.075465187657474, 0.966807194753950, 0.016596402623025, 0.016596402623025, 0.103575692245252, 0.296555596579887, 0.599868711174861, 0.020083411655416, 0.337723063403079, 0.642193524941505, -0.004341002614139, 0.204748281642812, 0.799592720971327, 0.041941786468010, 0.189358492130623, 0.768699721401368, 0.014317320230681, 0.085283615682657, 0.900399064086661 }; double suborder_w_rule_16[13] = { 0.046875697427642, 0.006405878578585, 0.041710296739387, 0.026891484250064, 0.042132522761650, 0.030000266842773, 0.014200098925024, 0.003582462351273, 0.032773147460627, 0.015298306248441, 0.002386244192839, 0.019084792755899, 0.006850054546542 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_16[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_16[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_16[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_16[s]; } return; } //****************************************************************************80 void dunavant_subrule_17 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_17 returns a compressed Dunavant rule 17. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_17[3*15] = { 0.333333333333333, 0.333333333333333, 0.333333333333333, 0.005658918886452, 0.497170540556774, 0.497170540556774, 0.035647354750751, 0.482176322624625, 0.482176322624625, 0.099520061958437, 0.450239969020782, 0.450239969020782, 0.199467521245206, 0.400266239377397, 0.400266239377397, 0.495717464058095, 0.252141267970953, 0.252141267970953, 0.675905990683077, 0.162047004658461, 0.162047004658461, 0.848248235478508, 0.075875882260746, 0.075875882260746, 0.968690546064356, 0.015654726967822, 0.015654726967822, 0.010186928826919, 0.334319867363658, 0.655493203809423, 0.135440871671036, 0.292221537796944, 0.572337590532020, 0.054423924290583, 0.319574885423190, 0.626001190286228, 0.012868560833637, 0.190704224192292, 0.796427214974071, 0.067165782413524, 0.180483211648746, 0.752351005937729, 0.014663182224828, 0.080711313679564, 0.904625504095608 }; double suborder_w_rule_17[15] = { 0.033437199290803, 0.005093415440507, 0.014670864527638, 0.024350878353672, 0.031107550868969, 0.031257111218620, 0.024815654339665, 0.014056073070557, 0.003194676173779, 0.008119655318993, 0.026805742283163, 0.018459993210822, 0.008476868534328, 0.018292796770025, 0.006665632004165 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_17[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_17[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_17[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_17[s]; } return; } //****************************************************************************80 void dunavant_subrule_18 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_18 returns a compressed Dunavant rule 18. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_18[3*17] = { 0.333333333333333, 0.333333333333333, 0.333333333333333, 0.013310382738157, 0.493344808630921, 0.493344808630921, 0.061578811516086, 0.469210594241957, 0.469210594241957, 0.127437208225989, 0.436281395887006, 0.436281395887006, 0.210307658653168, 0.394846170673416, 0.394846170673416, 0.500410862393686, 0.249794568803157, 0.249794568803157, 0.677135612512315, 0.161432193743843, 0.161432193743843, 0.846803545029257, 0.076598227485371, 0.076598227485371, 0.951495121293100, 0.024252439353450, 0.024252439353450, 0.913707265566071, 0.043146367216965, 0.043146367216965, 0.008430536202420, 0.358911494940944, 0.632657968856636, 0.131186551737188, 0.294402476751957, 0.574410971510855, 0.050203151565675, 0.325017801641814, 0.624779046792512, 0.066329263810916, 0.184737559666046, 0.748933176523037, 0.011996194566236, 0.218796800013321, 0.769207005420443, 0.014858100590125, 0.101179597136408, 0.883962302273467, -0.035222015287949, 0.020874755282586, 1.014347260005363 }; double suborder_w_rule_18[17] = { 0.030809939937647, 0.009072436679404, 0.018761316939594, 0.019441097985477, 0.027753948610810, 0.032256225351457, 0.025074032616922, 0.015271927971832, 0.006793922022963, -0.002223098729920, 0.006331914076406, 0.027257538049138, 0.017676785649465, 0.018379484638070, 0.008104732808192, 0.007634129070725, 0.000046187660794 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_18[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_18[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_18[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_18[s]; } return; } //****************************************************************************80 void dunavant_subrule_19 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_19 returns a compressed Dunavant rule 19. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_19[3*17] = { 0.333333333333333, 0.333333333333333, 0.333333333333333, 0.020780025853987, 0.489609987073006, 0.489609987073006, 0.090926214604215, 0.454536892697893, 0.454536892697893, 0.197166638701138, 0.401416680649431, 0.401416680649431, 0.488896691193805, 0.255551654403098, 0.255551654403098, 0.645844115695741, 0.177077942152130, 0.177077942152130, 0.779877893544096, 0.110061053227952, 0.110061053227952, 0.888942751496321, 0.055528624251840, 0.055528624251840, 0.974756272445543, 0.012621863777229, 0.012621863777229, 0.003611417848412, 0.395754787356943, 0.600633794794645, 0.134466754530780, 0.307929983880436, 0.557603261588784, 0.014446025776115, 0.264566948406520, 0.720987025817365, 0.046933578838178, 0.358539352205951, 0.594527068955871, 0.002861120350567, 0.157807405968595, 0.839331473680839, 0.223861424097916, 0.075050596975911, 0.701087978926173, 0.034647074816760, 0.142421601113383, 0.822931324069857, 0.010161119296278, 0.065494628082938, 0.924344252620784 }; double suborder_w_rule_19[17] = { 0.032906331388919, 0.010330731891272, 0.022387247263016, 0.030266125869468, 0.030490967802198, 0.024159212741641, 0.016050803586801, 0.008084580261784, 0.002079362027485, 0.003884876904981, 0.025574160612022, 0.008880903573338, 0.016124546761731, 0.002491941817491, 0.018242840118951, 0.010258563736199, 0.003799928855302 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_19[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_19[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_19[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_19[s]; } return; } //****************************************************************************80 void dunavant_subrule_20 ( int suborder_num, double suborder_xyz[], double suborder_w[] ) //****************************************************************************80 // // Purpose: // // DUNAVANT_SUBRULE_20 returns a compressed Dunavant rule 20. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 December 2006 // // Author: // // John Burkardt // // Reference: // // David Dunavant, // High Degree Efficient Symmetrical Gaussian Quadrature Rules // for the Triangle, // International Journal for Numerical Methods in Engineering, // Volume 21, 1985, pages 1129-1148. // // James Lyness, Dennis Jespersen, // Moderate Degree Symmetric Quadrature Rules for the Triangle, // Journal of the Institute of Mathematics and its Applications, // Volume 15, Number 1, February 1975, pages 19-32. // // Parameters: // // Input, int SUBORDER_NUM, the number of suborders of the rule. // // Output, double SUBORDER_XYZ[3*SUBORDER_NUM], // the barycentric coordinates of the abscissas. // // Output, double SUBORDER_W[SUBORDER_NUM], the suborder weights. // { int s; double suborder_xy_rule_20[3*19] = { 0.333333333333333, 0.333333333333333, 0.333333333333333, -0.001900928704400, 0.500950464352200, 0.500950464352200, 0.023574084130543, 0.488212957934729, 0.488212957934729, 0.089726636099435, 0.455136681950283, 0.455136681950283, 0.196007481363421, 0.401996259318289, 0.401996259318289, 0.488214180481157, 0.255892909759421, 0.255892909759421, 0.647023488009788, 0.176488255995106, 0.176488255995106, 0.791658289326483, 0.104170855336758, 0.104170855336758, 0.893862072318140, 0.053068963840930, 0.053068963840930, 0.916762569607942, 0.041618715196029, 0.041618715196029, 0.976836157186356, 0.011581921406822, 0.011581921406822, 0.048741583664839, 0.344855770229001, 0.606402646106160, 0.006314115948605, 0.377843269594854, 0.615842614456541, 0.134316520547348, 0.306635479062357, 0.559048000390295, 0.013973893962392, 0.249419362774742, 0.736606743262866, 0.075549132909764, 0.212775724802802, 0.711675142287434, -0.008368153208227, 0.146965436053239, 0.861402717154987, 0.026686063258714, 0.137726978828923, 0.835586957912363, 0.010547719294141, 0.059696109149007, 0.929756171556853 }; double suborder_w_rule_20[19] = { 0.033057055541624, 0.000867019185663, 0.011660052716448, 0.022876936356421, 0.030448982673938, 0.030624891725355, 0.024368057676800, 0.015997432032024, 0.007698301815602, -0.000632060497488, 0.001751134301193, 0.016465839189576, 0.004839033540485, 0.025804906534650, 0.008471091054441, 0.018354914106280, 0.000704404677908, 0.010112684927462, 0.003573909385950 }; for ( s = 0; s < suborder_num; s++ ) { suborder_xyz[0+s*3] = suborder_xy_rule_20[0+s*3]; suborder_xyz[1+s*3] = suborder_xy_rule_20[1+s*3]; suborder_xyz[2+s*3] = suborder_xy_rule_20[2+s*3]; } for ( s = 0; s < suborder_num; s++ ) { suborder_w[s] = suborder_w_rule_20[s]; } return; } //****************************************************************************80 void file_name_inc ( char *file_name ) //****************************************************************************80 // // Purpose: // // FILE_NAME_INC increments a partially numeric file name. // // Discussion: // // It is assumed that the digits in the name, whether scattered or // connected, represent a number that is to be increased by 1 on // each call. If this number is all 9's on input, the output number // is all 0's. Non-numeric letters of the name are unaffected. // // If the input string contains no digits, a blank string is returned. // // If a blank string is input, then an error condition results. // // Example: // // Input Output // ----- ------ // "a7to11.txt" "a7to12.txt" (typical case. Last digit incremented) // "a7to99.txt" "a8to00.txt" (last digit incremented, with carry.) // "a9to99.txt" "a0to00.txt" (wrap around) // "cat.txt" " " (no digits to increment) // " " STOP! (error) // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 14 September 2005 // // Author: // // John Burkardt // // Parameters: // // Input/output, character *FILE_NAME, (a pointer to) the character string // to be incremented. // { char c; int change; int i; int lens; lens = s_len_trim ( file_name ); if ( lens <= 0 ) { cout << "\n"; cout << "FILE_NAME_INC - Fatal error!\n"; cout << " Input file name is blank.\n"; exit ( 1 ); } change = 0; for ( i = lens-1; 0 <= i; i-- ) { c = *(file_name+i); if ( '0' <= c && c <= '9' ) { change = change + 1; if ( c == '9' ) { c = '0'; *(file_name+i) = c; } else { c = c + 1; *(file_name+i) = c; return; } } } if ( change == 0 ) { strcpy ( file_name, " " ); } return; } //****************************************************************************80 int i4_max ( int i1, int i2 ) //****************************************************************************80 // // Purpose: // // I4_MAX returns the maximum of two I4's. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 13 October 1998 // // Author: // // John Burkardt // // Parameters: // // Input, int I1, I2, are two integers to be compared. // // Output, int I4_MAX, the larger of I1 and I2. // { int value; if ( i2 < i1 ) { value = i1; } else { value = i2; } return value; } //****************************************************************************80 int i4_min ( int i1, int i2 ) //****************************************************************************80 // // Purpose: // // I4_MIN returns the smaller of two I4's. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 13 October 1998 // // Author: // // John Burkardt // // Parameters: // // Input, int I1, I2, two integers to be compared. // // Output, int I4_MIN, the smaller of I1 and I2. // { int value; if ( i1 < i2 ) { value = i1; } else { value = i2; } return value; } //****************************************************************************80 int i4_modp ( int i, int j ) //****************************************************************************80 // // Purpose: // // I4_MODP returns the nonnegative remainder of I4 division. // // Formula: // // If // NREM = I4_MODP ( I, J ) // NMULT = ( I - NREM ) / J // then // I = J * NMULT + NREM // where NREM is always nonnegative. // // Discussion: // // The MOD function computes a result with the same sign as the // quantity being divided. Thus, suppose you had an angle A, // and you wanted to ensure that it was between 0 and 360. // Then mod(A,360) would do, if A was positive, but if A // was negative, your result would be between -360 and 0. // // On the other hand, I4_MODP(A,360) is between 0 and 360, always. // // Example: // // I J MOD I4_MODP I4_MODP Factorization // // 107 50 7 7 107 = 2 * 50 + 7 // 107 -50 7 7 107 = -2 * -50 + 7 // -107 50 -7 43 -107 = -3 * 50 + 43 // -107 -50 -7 43 -107 = 3 * -50 + 43 // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 26 May 1999 // // Author: // // John Burkardt // // Parameters: // // Input, int I, the number to be divided. // // Input, int J, the number that divides I. // // Output, int I4_MODP, the nonnegative remainder when I is // divided by J. // { int value; if ( j == 0 ) { cout << "\n"; cout << "I4_MODP - Fatal error!\n"; cout << " I4_MODP ( I, J ) called with J = " << j << "\n"; exit ( 1 ); } value = i % j; if ( value < 0 ) { value = value + abs ( j ); } return value; } //****************************************************************************80* int i4_wrap ( int ival, int ilo, int ihi ) //****************************************************************************80* // // Purpose: // // I4_WRAP forces an integer to lie between given limits by wrapping. // // Example: // // ILO = 4, IHI = 8 // // I Value // // -2 8 // -1 4 // 0 5 // 1 6 // 2 7 // 3 8 // 4 4 // 5 5 // 6 6 // 7 7 // 8 8 // 9 4 // 10 5 // 11 6 // 12 7 // 13 8 // 14 4 // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 19 August 2003 // // Author: // // John Burkardt // // Parameters: // // Input, int IVAL, an integer value. // // Input, int ILO, IHI, the desired bounds for the integer value. // // Output, int I4_WRAP, a "wrapped" version of IVAL. // { int jhi; int jlo; int value; int wide; jlo = i4_min ( ilo, ihi ); jhi = i4_max ( ilo, ihi ); wide = jhi + 1 - jlo; if ( wide == 1 ) { value = jlo; } else { value = jlo + i4_modp ( ival - jlo, wide ); } return value; } //****************************************************************************80 double r8_huge ( ) //****************************************************************************80 // // Purpose: // // R8_HUGE returns a "huge" R8. // // Discussion: // // HUGE_VAL is the largest representable legal double precision number, // and is usually defined in math.h, or sometimes in stdlib.h. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 31 August 2004 // // Author: // // John Burkardt // // Parameters: // // Output, double R8_HUGE, a "huge" R8 value. // { return HUGE_VAL; } //****************************************************************************80 int r8_nint ( double x ) //****************************************************************************80 // // Purpose: // // R8_NINT returns the nearest integer to an R8. // // Example: // // X Value // // 1.3 1 // 1.4 1 // 1.5 1 or 2 // 1.6 2 // 0.0 0 // -0.7 -1 // -1.1 -1 // -1.6 -2 // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 26 August 2004 // // Author: // // John Burkardt // // Parameters: // // Input, double X, the value. // // Output, int R8_NINT, the nearest integer to X. // { int s; int value; if ( x < 0.0 ) { s = -1; } else { s = 1; } value = s * ( int ) ( fabs ( x ) + 0.5 ); return value; } //****************************************************************************80 void reference_to_physical_t3 ( double t[], int n, double ref[], double phy[] ) //****************************************************************************80 /* // Purpose: // // REFERENCE_TO_PHYSICAL_T3 maps T3 reference points to physical points. // // Discussion: // // Given the vertices of an order 3 physical triangle and a point // (XSI,ETA) in the reference triangle, the routine computes the value // of the corresponding image point (X,Y) in physical space. // // Note that this routine may also be appropriate for an order 6 // triangle, if the mapping between reference and physical space // is linear. This implies, in particular, that the sides of the // image triangle are straight and that the "midside" nodes in the // physical triangle are literally halfway along the sides of // the physical triangle. // // Reference Element T3: // // | // 1 3 // | |\ // | | \ // S | \ // | | \ // | | \ // 0 1-----2 // | // +--0--R--1--> // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 24 June 2005 // // Author: // // John Burkardt // // Parameters: // // Input, double T[2*3], the coordinates of the vertices. // The vertices are assumed to be the images of (0,0), (1,0) and // (0,1) respectively. // // Input, int N, the number of objects to transform. // // Input, double REF[2*N], points in the reference triangle. // // Output, double PHY[2*N], corresponding points in the // physical triangle. // */ { int i; int j; for ( i = 0; i < 2; i++ ) { for ( j = 0; j < n; j++ ) { phy[i+j*2] = t[i+0*2] * ( 1.0 - ref[0+j*2] - ref[1+j*2] ) + t[i+1*2] * + ref[0+j*2] + t[i+2*2] * + ref[1+j*2]; } } return; } //****************************************************************************80 int s_len_trim ( char *s ) //****************************************************************************80 // // Purpose: // // S_LEN_TRIM returns the length of a string to the last nonblank. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 26 April 2003 // // Author: // // John Burkardt // // Parameters: // // Input, char *S, a pointer to a string. // // Output, int S_LEN_TRIM, the length of the string to the last nonblank. // If S_LEN_TRIM is 0, then the string is entirely blank. // { int n; char *t; n = strlen ( s ); t = s + strlen ( s ) - 1; while ( 0 < n ) { if ( *t != ' ' ) { return n; } t--; n--; } return n; } //****************************************************************************80 void timestamp ( ) //****************************************************************************80 // // Purpose: // // TIMESTAMP prints the current YMDHMS date as a time stamp. // // Example: // // 31 May 2001 09:45:54 AM // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 24 September 2003 // // Author: // // John Burkardt // // Parameters: // // None // { # define TIME_SIZE 40 static char time_buffer[TIME_SIZE]; const struct tm *tm; time_t now; size_t len; now = time ( NULL ); tm = localtime ( &now ); len = strftime ( time_buffer, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm ); cout << time_buffer << "\n"; return; # undef TIME_SIZE } //****************************************************************************80 char *timestring ( ) //****************************************************************************80 // // Purpose: // // TIMESTRING returns the current YMDHMS date as a string. // // Example: // // 31 May 2001 09:45:54 AM // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 24 September 2003 // // Author: // // John Burkardt // // Parameters: // // Output, char *TIMESTRING, a string containing the current YMDHMS date. // { # define TIME_SIZE 40 const struct tm *tm; time_t now; char *s; now = time ( NULL ); tm = localtime ( &now ); s = new char[TIME_SIZE]; //size_t len = strftime ( s, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm ); return s; # undef TIME_SIZE } //****************************************************************************80 double triangle_area ( double t[2*3] ) //****************************************************************************80 // // Purpose: // // TRIANGLE_AREA computes the area of a triangle. // // Discussion: // // If the triangle's vertices are given in counter clockwise order, // the area will be positive. If the triangle's vertices are given // in clockwise order, the area will be negative! // // An earlier version of this routine always returned the absolute // value of the computed area. I am convinced now that that is // a less useful result! For instance, by returning the signed // area of a triangle, it is possible to easily compute the area // of a nonconvex polygon as the sum of the (possibly negative) // areas of triangles formed by node 1 and successive pairs of vertices. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 17 October 2005 // // Author: // // John Burkardt // // Parameters: // // Input, double T[2*3], the vertices of the triangle. // // Output, double TRIANGLE_AREA, the area of the triangle. // { double area; area = 0.5 * ( t[0+0*2] * ( t[1+1*2] - t[1+2*2] ) + t[0+1*2] * ( t[1+2*2] - t[1+0*2] ) + t[0+2*2] * ( t[1+0*2] - t[1+1*2] ) ); return area; } //****************************************************************************80 void triangle_points_plot ( char *file_name, double node_xy[], int node_show, int point_num, double point_xy[], int point_show ) //****************************************************************************80 // // Purpose: // // TRIANGLE_POINTS_PLOT plots a triangle and some points. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 04 October 2006 // // Author: // // John Burkardt // // Parameters: // // Input, char *FILE_NAME, the name of the output file. // // Input, double NODE_XY[2*3], the coordinates of the nodes // of the triangle. // // Input, int NODE_SHOW, // -1, do not show the triangle, or the nodes. // 0, show the triangle, do not show the nodes; // 1, show the triangle and the nodes; // 2, show the triangle, the nodes and number them. // // Input, int POINT_NUM, the number of points. // // Input, double POINT_XY[2*POINT_NUM], the coordinates of the // points. // // Input, int POINT_SHOW, // 0, do not show the points; // 1, show the points; // 2, show the points and number them. // { char *date_time; int circle_size; int delta; ofstream file_unit; int i; int node; int node_num = 3; int point; //char string[40]; double x_max; double x_min; int x_ps; int x_ps_max = 576; int x_ps_max_clip = 594; int x_ps_min = 36; int x_ps_min_clip = 18; double x_scale; double y_max; double y_min; int y_ps; int y_ps_max = 666; int y_ps_max_clip = 684; int y_ps_min = 126; int y_ps_min_clip = 108; double y_scale; date_time = timestring ( ); // // We need to do some figuring here, so that we can determine // the range of the data, and hence the height and width // of the piece of paper. // x_max = -r8_huge ( ); for ( node = 0; node < node_num; node++ ) { if ( x_max < node_xy[0+node*2] ) { x_max = node_xy[0+node*2]; } } for ( point = 0; point < point_num; point++ ) { if ( x_max < point_xy[0+point*2] ) { x_max = point_xy[0+point*2]; } } x_min = r8_huge ( ); for ( node = 0; node < node_num; node++ ) { if ( node_xy[0+node*2] < x_min ) { x_min = node_xy[0+node*2]; } } for ( point = 0; point < point_num; point++ ) { if ( point_xy[0+point*2] < x_min ) { x_min = point_xy[0+point*2]; } } x_scale = x_max - x_min; x_max = x_max + 0.05 * x_scale; x_min = x_min - 0.05 * x_scale; x_scale = x_max - x_min; y_max = -r8_huge ( ); for ( node = 0; node < node_num; node++ ) { if ( y_max < node_xy[1+node*2] ) { y_max = node_xy[1+node*2]; } } for ( point = 0; point < point_num; point++ ) { if ( y_max < point_xy[1+point*2] ) { y_max = point_xy[1+point*2]; } } y_min = r8_huge ( ); for ( node = 0; node < node_num; node++ ) { if ( node_xy[1+node*2] < y_min ) { y_min = node_xy[1+node*2]; } } for ( point = 0; point < point_num; point++ ) { if ( point_xy[1+point*2] < y_min ) { y_min = point_xy[1+point*2]; } } y_scale = y_max - y_min; y_max = y_max + 0.05 * y_scale; y_min = y_min - 0.05 * y_scale; y_scale = y_max - y_min; if ( x_scale < y_scale ) { delta = r8_nint ( ( double ) ( x_ps_max - x_ps_min ) * ( y_scale - x_scale ) / ( 2.0 * y_scale ) ); x_ps_max = x_ps_max - delta; x_ps_min = x_ps_min + delta; x_ps_max_clip = x_ps_max_clip - delta; x_ps_min_clip = x_ps_min_clip + delta; x_scale = y_scale; } else if ( y_scale < x_scale ) { delta = r8_nint ( ( double ) ( y_ps_max - y_ps_min ) * ( x_scale - y_scale ) / ( 2.0 * x_scale ) ); y_ps_max = y_ps_max - delta; y_ps_min = y_ps_min + delta; y_ps_max_clip = y_ps_max_clip - delta; y_ps_min_clip = y_ps_min_clip + delta; y_scale = x_scale; } file_unit.open ( file_name ); if ( !file_unit ) { cout << "\n"; cout << "TRIANGLE_POINTS_PLOT - Fatal error!\n"; cout << " Could not open the output EPS file.\n"; exit ( 1 ); } file_unit << "%//PS-Adobe-3.0 EPSF-3.0\n"; file_unit << "%%Creator: triangulation_order3_plot.C\n"; file_unit << "%%Title: " << file_name << "\n"; file_unit << "%%CreationDate: " << date_time << "\n"; delete [] date_time; file_unit << "%%Pages: 1\n"; file_unit << "%%BoundingBox: " << x_ps_min << " " << y_ps_min << " " << x_ps_max << " " << y_ps_max << "\n"; file_unit << "%%Document-Fonts: Times-Roman\n"; file_unit << "%%LanguageLevel: 1\n"; file_unit << "%%EndComments\n"; file_unit << "%%BeginProlog\n"; file_unit << "/inch {72 mul} def\n"; file_unit << "%%EndProlog\n"; file_unit << "%%Page: 1 1\n"; file_unit << "save\n"; file_unit << "%\n"; file_unit << "% Set the RGB line color to very light gray.\n"; file_unit << "%\n"; file_unit << "0.900 0.900 0.900 setrgbcolor\n"; file_unit << "%\n"; file_unit << "% Draw a gray border around the page.\n"; file_unit << "%\n"; file_unit << "newpath\n"; file_unit << x_ps_min << " " << y_ps_min << " moveto\n"; file_unit << x_ps_max << " " << y_ps_min << " lineto\n"; file_unit << x_ps_max << " " << y_ps_max << " lineto\n"; file_unit << x_ps_min << " " << y_ps_max << " lineto\n"; file_unit << x_ps_min << " " << y_ps_min << " lineto\n"; file_unit << "stroke\n"; file_unit << "%\n"; file_unit << "% Set the RGB color to black.\n"; file_unit << "%\n"; file_unit << "0.000 0.000 0.000 setrgbcolor\n"; file_unit << "%\n"; file_unit << "% Set the font and its size.\n"; file_unit << "%\n"; file_unit << "/Times-Roman findfont\n"; file_unit << "0.50 inch scalefont\n"; file_unit << "setfont\n"; file_unit << "%\n"; file_unit << "% Print a title.\n"; file_unit << "%\n"; file_unit << "% 210 702 moveto\n"; file_unit << "% (Triangulation) show\n"; file_unit << "%\n"; file_unit << "% Define a clipping polygon.\n"; file_unit << "%\n"; file_unit << "newpath\n"; file_unit << x_ps_min_clip << " " << y_ps_min_clip << " moveto\n"; file_unit << x_ps_max_clip << " " << y_ps_min_clip << " lineto\n"; file_unit << x_ps_max_clip << " " << y_ps_max_clip << " lineto\n"; file_unit << x_ps_min_clip << " " << y_ps_max_clip << " lineto\n"; file_unit << x_ps_min_clip << " " << y_ps_min_clip << " lineto\n"; file_unit << "clip newpath\n"; // // Draw the nodes. // if ( 1 <= node_show ) { circle_size = 5; file_unit << "%\n"; file_unit << "% Draw filled dots at the nodes.\n"; file_unit << "%\n"; file_unit << "% Set the RGB color to blue.\n"; file_unit << "%\n"; file_unit << "0.000 0.150 0.750 setrgbcolor\n"; file_unit << "%\n"; for ( node = 0; node < 3; node++ ) { x_ps = r8_nint ( ( ( x_max - node_xy[0+node*2] ) * ( double ) ( x_ps_min ) + ( node_xy[0+node*2] - x_min ) * ( double ) ( x_ps_max ) ) / ( x_max - x_min ) ); y_ps = r8_nint ( ( ( y_max - node_xy[1+node*2] ) * ( double ) ( y_ps_min ) + ( node_xy[1+node*2] - y_min ) * ( double ) ( y_ps_max ) ) / ( y_max - y_min ) ); file_unit << "newpath " << x_ps << " " << y_ps << " " << circle_size << " 0 360 arc closepath fill\n"; } } // // Label the nodes. // if ( 2 <= node_show ) { file_unit << "%\n"; file_unit << "% Label the nodes:\n"; file_unit << "%\n"; file_unit << "% Set the RGB color to darker blue.\n"; file_unit << "%\n"; file_unit << "0.000 0.250 0.850 setrgbcolor\n"; file_unit << "/Times-Roman findfont\n"; file_unit << "0.20 inch scalefont\n"; file_unit << "setfont\n"; file_unit << "%\n"; for ( node = 0; node < node_num; node++ ) { x_ps = r8_nint ( ( ( x_max - node_xy[0+node*2] ) * ( double ) ( x_ps_min ) + ( + node_xy[0+node*2] - x_min ) * ( double ) ( x_ps_max ) ) / ( x_max - x_min ) ); y_ps = r8_nint ( ( ( y_max - node_xy[1+node*2] ) * ( double ) ( y_ps_min ) + ( node_xy[1+node*2] - y_min ) * ( double ) ( y_ps_max ) ) / ( y_max - y_min ) ); file_unit << " " << x_ps << " " << y_ps + 5 << " moveto (" << node+1 << ") show\n"; } } // // Draw the points. // if ( point_num <= 200 ) { circle_size = 5; } else if ( point_num <= 500 ) { circle_size = 4; } else if ( point_num <= 1000 ) { circle_size = 3; } else if ( point_num <= 5000 ) { circle_size = 2; } else { circle_size = 1; } if ( 1 <= point_show ) { file_unit << "%\n"; file_unit << "% Draw filled dots at the points.\n"; file_unit << "%\n"; file_unit << "% Set the RGB color to green.\n"; file_unit << "%\n"; file_unit << "0.150 0.750 0.000 setrgbcolor\n"; file_unit << "%\n"; for ( point = 0; point < point_num; point++ ) { x_ps = r8_nint ( ( ( x_max - point_xy[0+point*2] ) * ( double ) ( x_ps_min ) + ( point_xy[0+point*2] - x_min ) * ( double ) ( x_ps_max ) ) / ( x_max - x_min ) ); y_ps = r8_nint ( ( ( y_max - point_xy[1+point*2] ) * ( double ) ( y_ps_min ) + ( point_xy[1+point*2] - y_min ) * ( double ) ( y_ps_max ) ) / ( y_max - y_min ) ); file_unit << "newpath " << x_ps << " " << y_ps << " " << circle_size << " 0 360 arc closepath fill\n"; } } // // Label the points. // if ( 2 <= point_show ) { file_unit << "%\n"; file_unit << "% Label the point:\n"; file_unit << "%\n"; file_unit << "% Set the RGB color to darker green.\n"; file_unit << "%\n"; file_unit << "0.250 0.850 0.000 setrgbcolor\n"; file_unit << "/Times-Roman findfont\n"; file_unit << "0.20 inch scalefont\n"; file_unit << "setfont\n"; file_unit << "%\n"; for ( point = 0; point < point_num; point++ ) { x_ps = r8_nint ( ( ( x_max - point_xy[0+point*2] ) * ( double ) ( x_ps_min ) + ( + point_xy[0+point*2] - x_min ) * ( double ) ( x_ps_max ) ) / ( x_max - x_min ) ); y_ps = r8_nint ( ( ( y_max - point_xy[1+point*2] ) * ( double ) ( y_ps_min ) + ( point_xy[1+point*2] - y_min ) * ( double ) ( y_ps_max ) ) / ( y_max - y_min ) ); file_unit << " " << x_ps << " " << y_ps + 5 << " moveto (" << point+1 << ") show\n"; } } // // Draw the triangle. // if ( 0 <= node_show ) { file_unit << "%\n"; file_unit << "% Set the RGB color to red.\n"; file_unit << "%\n"; file_unit << "0.900 0.200 0.100 setrgbcolor\n"; file_unit << "%\n"; file_unit << "% Draw the triangle.\n"; file_unit << "%\n"; file_unit << "newpath\n"; for ( i = 0; i <= 3; i++ ) { node = i4_wrap ( i, 0, 2 ); x_ps = ( r8_nint ) ( ( ( x_max - node_xy[0+node*2] ) * ( double ) ( x_ps_min ) + ( node_xy[0+node*2] - x_min ) * ( double ) ( x_ps_max ) ) / ( x_max - x_min ) ); y_ps = ( r8_nint ) ( ( ( y_max - node_xy[1+node*2] ) * ( double ) ( y_ps_min ) + ( node_xy[1+node*2] - y_min ) * ( double ) ( y_ps_max ) ) / ( y_max - y_min ) ); if ( i == 0 ) { file_unit << x_ps << " " << y_ps << " moveto\n"; } else { file_unit << x_ps << " " << y_ps << " lineto\n"; } } file_unit << "stroke\n"; } file_unit << "%\n"; file_unit << "restore showpage\n"; file_unit << "%\n"; file_unit << "% End of page.\n"; file_unit << "%\n"; file_unit << "%%Trailer\n"; file_unit << "%%EOF\n"; file_unit.close ( ); return; }
gpl-3.0
dumebi/thomasmore
nfcs.php
24874
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <title>St. Thomas More - NFCS</title> <link rel="shortcut icon" type="image/x-icon" href="logo.ico"> <!-- google fonts --> <link href='http://fonts.googleapis.com/css?family=Lato:400,300italic,300,700%7CPlayfair+Display:400,700italic%7CRoboto:300%7CMontserrat:400,700%7COpen+Sans:400,300%7CLibre+Baskerville:400,400italic' rel='stylesheet' type='text/css'> <!-- Bootstrap --> <link href="assets/css/bootstrap.min.css" rel="stylesheet"> <link href="assets/css/bootstrap-theme.css" rel="stylesheet"> <link href="assets/css/font-awesome.min.css" rel="stylesheet"> <link href="assets/revolution-slider/css/settings.css" rel="stylesheet"> <link href="assets/css/global.css" rel="stylesheet"> <link href="assets/css/style.css" rel="stylesheet"> <link href="assets/css/responsive.css" rel="stylesheet"> <link href="assets/css/skin.css" rel="stylesheet"> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div id="wrapper"> <!--Header Section Start Here --> <?php include_once ("includes/header.php"); ?> <!-- Header Section End Here --> <!-- site content --> <div id="main"> <!-- Breadcrumb Section Start Here --> <div class="breadcrumb-section"> <div class="container"> <div class="row"> <div class="col-xs-12"> <h1>Portfolio </h1> <ul class="breadcrumb"> <li> <a href="index.php">Home</a> </li> <li class="active"> NFCS </li> </ul> </div> </div> </div> </div> <!-- Breadcrumb Section End Here --> <div class="content-wrapper" id="page-info"> <!-- portfolio detail sections --> <div class="container"> <div class="row"> <div class="col-xs-12"> <header class="page-header section-header text-left"> <h2>NFCS</h2> </header> <!--<div class="portfolio-detail-description">--> <div class="row"> <div class="col-xs-12 col-sm-12"> <section class="slider-wrap flex-slide flexslider"> <ul class="slides"> <li> <img alt="" src="assets/img/portfolio.jpg"> </li> <li> <img alt="" src="assets/img/portfolio.jpg"> </li> </ul> </section> </div> </div> <div class="row portfolio-details"> <div class="col-xs-12"> <div class="detail-description"> <strong class="detail-summary"> Phllus felis purus placerat vel augue vitae aliquam tincidunt dolor sed hendrerit diam in mat tis mollis donecut Phasellus felis purus placerat vel augue vitae, aliquam tincidunt dolor. Sed hendrerit diam in mattis mollis. </strong> <p> Phllus felis purus placerat vel augue vitae aliquam tincidunt dolor sed hendrerit diam in mat tis mollis donecut Phasellus felis purus placerat vel augue vitae, aliquam tincidunt dolor. Sed hendrerit diam in mattis mollis. Donec ut tincidunt magna. Nullam hendrerit pellentesque pellentesque. Sed ultrices arcu non dictum porttitor. Phllus felis purus placerat vel augue vitae aliquam tincidunt dolor sed hendrerit diam in mat tis mollis donecut Phasellus felis purus placerat vel augue vitae, aliquam tincidunt dolor. </p> <p> Phllus felis purus placerat vel augue vitae aliquam tincidunt dolor sed hendrerit diam in mat tis mollis donecut Phasellus felis purus placerat vel augue vitae, aliquam tincidunt dolor. </p> <ul class="list-unstyled yello-icon"> <li> Become genuinely interested in the other person Nam ac leo arcu At eget congu </li> <li> Smile (very important). </li> <li> Remember that a person’s name is to that person tost important sound in any language. </li> <li> Be a good listener Encourage others to talk about themselves congue jptos himenaeos </li> <li> Speak in terms of the other person’s interests Nam ac leo arat Suspendisse eget </li> <li> Make the other person feel important and do it sincerely </li> <li> that a person’s name is to that person the sweetest andound in any language. </li> </ul> <a class="btn btn-default" href="#">BUTTON</a> </div> <div class="page-header section-header clearfix"> <h2>Meet Your <strong> Executives</strong></h2> </div> <div class="bs-example"> <div class="panel-group" id="accordion"> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#collapseOne"> <i class="fa fa-plus-circle fa-minus-circle toggel-icon"></i> President </a></h4> </div> <div id="collapseOne" class="panel-collapse collapse"> <div class="panel-body"> <div class="row"> <div class="col-xs-12 col-sm-5"> <img src="assets/img/img-slide-01.jpg" alt=""> </div> <div class="col-xs-12 col-sm-7"> <strong class="article-sammury"> Lorem ipsum dolor sit amet consectetur adipiscing elit Integer feugiat dolor nibh Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Nam consectetur </strong> <p> Gravida sodales commodo nullam fringilla in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor venenatis quis eu est quisque a pellentesque dui vitae tempus augue curabitu quis mattis mi proin varius sed enim sit amet lobortis In hac </p> <p> Habitasse platea dictumst cras sit amet est eget dui viverra scelerisque duis semper pulvinar in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor </p> </div> </div> </div> </div> </div> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo"> <i class="fa fa-plus-circle toggel-icon"></i> Vice President</a></h4> </div> <div id="collapseTwo" class="panel-collapse collapse"> <div class="panel-body"> <div class="row"> <div class="col-xs-12 col-sm-5"> <img src="assets/img/img-slide-01.jpg" alt=""> </div> <div class="col-xs-12 col-sm-7"> <strong class="article-sammury"> Lorem ipsum dolor sit amet consectetur adipiscing elit Integer feugiat dolor nibh Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Nam consectetur </strong> <p> Gravida sodales commodo nullam fringilla in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor venenatis quis eu est quisque a pellentesque dui vitae tempus augue curabitu quis mattis mi proin varius sed enim sit amet lobortis In hac </p> <p> Habitasse platea dictumst cras sit amet est eget dui viverra scelerisque duis semper pulvinar in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor </p> </div> </div> </div> </div> </div> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#collapseThree"> <i class="fa fa-plus-circle toggel-icon"></i> General Secretary and Assistant General Secretary </a></h4> </div> <div id="collapseThree" class="panel-collapse collapse"> <div class="panel-body"> <div class="row"> <div class="col-xs-12 col-sm-3"> <img src="assets/img/portfolio1.jpg" alt=""> </div> <div class="col-xs-12 col-sm-8"> <strong class="article-sammury"> Lorem ipsum dolor sit amet consectetur adipiscing elit Integer feugiat dolor nibh Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Nam consectetur </strong> <p> Gravida sodales commodo nullam fringilla in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor venenatis quis eu est quisque a pellentesque dui vitae tempus augue curabitu quis mattis mi proin varius sed enim sit amet lobortis In hac </p> <p> Habitasse platea dictumst cras sit amet est eget dui viverra scelerisque duis semper pulvinar in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor </p> </div> </div> </div> <div class="panel-body"> <div class="row"> <div class="col-xs-12 col-sm-3"> <img src="assets/img/portfolio1.jpg" alt=""> </div> <div class="col-xs-12 col-sm-7"> <strong class="article-sammury"> Lorem ipsum dolor sit amet consectetur adipiscing elit Integer feugiat dolor nibh Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Nam consectetur </strong> <p> Gravida sodales commodo nullam fringilla in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor venenatis quis eu est quisque a pellentesque dui vitae tempus augue curabitu quis mattis mi proin varius sed enim sit amet lobortis In hac </p> <p> Habitasse platea dictumst cras sit amet est eget dui viverra scelerisque duis semper pulvinar in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor </p> </div> </div> </div> </div> </div> <!-- end panel--> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#collapseFour"> <i class="fa fa-plus-circle toggel-icon"></i> P.R.O 1 and P.R.O 2 </a></h4> </div> <div id="collapseFour" class="panel-collapse collapse"> <div class="panel-body"> <div class="row"> <div class="col-xs-12 col-sm-3"> <img src="assets/img/portfolio1.jpg" alt=""> </div> <div class="col-xs-12 col-sm-8"> <strong class="article-sammury"> Lorem ipsum dolor sit amet consectetur adipiscing elit Integer feugiat dolor nibh Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Nam consectetur </strong> <p> Gravida sodales commodo nullam fringilla in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor venenatis quis eu est quisque a pellentesque dui vitae tempus augue curabitu quis mattis mi proin varius sed enim sit amet lobortis In hac </p> <p> Habitasse platea dictumst cras sit amet est eget dui viverra scelerisque duis semper pulvinar in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor </p> </div> </div> </div> <div class="panel-body"> <div class="row"> <div class="col-xs-12 col-sm-3"> <img src="assets/img/portfolio1.jpg" alt=""> </div> <div class="col-xs-12 col-sm-7"> <strong class="article-sammury"> Lorem ipsum dolor sit amet consectetur adipiscing elit Integer feugiat dolor nibh Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Nam consectetur </strong> <p> Gravida sodales commodo nullam fringilla in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor venenatis quis eu est quisque a pellentesque dui vitae tempus augue curabitu quis mattis mi proin varius sed enim sit amet lobortis In hac </p> <p> Habitasse platea dictumst cras sit amet est eget dui viverra scelerisque duis semper pulvinar in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor </p> </div> </div> </div> </div> </div> <!-- end panel--> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#collapseFive"> <i class="fa fa-plus-circle toggel-icon"></i> Treasurer</a></h4> </div> <div id="collapseFive" class="panel-collapse collapse"> <div class="panel-body"> <div class="row"> <div class="col-xs-12 col-sm-5"> <img src="assets/img/img-slide-01.jpg" alt=""> </div> <div class="col-xs-12 col-sm-7"> <strong class="article-sammury"> Lorem ipsum dolor sit amet consectetur adipiscing elit Integer feugiat dolor nibh Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Nam consectetur </strong> <p> Gravida sodales commodo nullam fringilla in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor venenatis quis eu est quisque a pellentesque dui vitae tempus augue curabitu quis mattis mi proin varius sed enim sit amet lobortis In hac </p> <p> Habitasse platea dictumst cras sit amet est eget dui viverra scelerisque duis semper pulvinar in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor </p> </div> </div> </div> </div> </div> <!--end panel--> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#collapseSix"> <i class="fa fa-plus-circle toggel-icon"></i> Financial Secretary</a></h4> </div> <div id="collapseSix" class="panel-collapse collapse"> <div class="panel-body"> <div class="row"> <div class="col-xs-12 col-sm-5"> <img src="assets/img/img-slide-01.jpg" alt=""> </div> <div class="col-xs-12 col-sm-7"> <strong class="article-sammury"> Lorem ipsum dolor sit amet consectetur adipiscing elit Integer feugiat dolor nibh Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Nam consectetur </strong> <p> Gravida sodales commodo nullam fringilla in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor venenatis quis eu est quisque a pellentesque dui vitae tempus augue curabitu quis mattis mi proin varius sed enim sit amet lobortis In hac </p> <p> Habitasse platea dictumst cras sit amet est eget dui viverra scelerisque duis semper pulvinar in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor </p> </div> </div> </div> </div> </div> <!-- end panel--> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#collapseSeven"> <i class="fa fa-plus-circle toggel-icon"></i> D.O.S 1 and D.O.S 2 </a></h4> </div> <div id="collapseSeven" class="panel-collapse collapse"> <div class="panel-body"> <div class="row"> <div class="col-xs-12 col-sm-3"> <img src="assets/img/portfolio1.jpg" alt=""> </div> <div class="col-xs-12 col-sm-8"> <strong class="article-sammury"> Lorem ipsum dolor sit amet consectetur adipiscing elit Integer feugiat dolor nibh Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Nam consectetur </strong> <p> Gravida sodales commodo nullam fringilla in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor venenatis quis eu est quisque a pellentesque dui vitae tempus augue curabitu quis mattis mi proin varius sed enim sit amet lobortis In hac </p> <p> Habitasse platea dictumst cras sit amet est eget dui viverra scelerisque duis semper pulvinar in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor </p> </div> </div> </div> <div class="panel-body"> <div class="row"> <div class="col-xs-12 col-sm-3"> <img src="assets/img/portfolio1.jpg" alt=""> </div> <div class="col-xs-12 col-sm-7"> <strong class="article-sammury"> Lorem ipsum dolor sit amet consectetur adipiscing elit Integer feugiat dolor nibh Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Nam consectetur </strong> <p> Gravida sodales commodo nullam fringilla in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor venenatis quis eu est quisque a pellentesque dui vitae tempus augue curabitu quis mattis mi proin varius sed enim sit amet lobortis In hac </p> <p> Habitasse platea dictumst cras sit amet est eget dui viverra scelerisque duis semper pulvinar in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor </p> </div> </div> </div> </div> </div> <!-- end panel--> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#collapseSeven"> <i class="fa fa-plus-circle toggel-icon"></i> Welfare 1 and Welfare 2 </a></h4> </div> <div id="collapseSeven" class="panel-collapse collapse"> <div class="panel-body"> <div class="row"> <div class="col-xs-12 col-sm-3"> <img src="assets/img/portfolio1.jpg" alt=""> </div> <div class="col-xs-12 col-sm-8"> <strong class="article-sammury"> Lorem ipsum dolor sit amet consectetur adipiscing elit Integer feugiat dolor nibh Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Nam consectetur </strong> <p> Gravida sodales commodo nullam fringilla in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor venenatis quis eu est quisque a pellentesque dui vitae tempus augue curabitu quis mattis mi proin varius sed enim sit amet lobortis In hac </p> <p> Habitasse platea dictumst cras sit amet est eget dui viverra scelerisque duis semper pulvinar in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor </p> </div> </div> </div> <div class="panel-body"> <div class="row"> <div class="col-xs-12 col-sm-3"> <img src="assets/img/portfolio1.jpg" alt=""> </div> <div class="col-xs-12 col-sm-7"> <strong class="article-sammury"> Lorem ipsum dolor sit amet consectetur adipiscing elit Integer feugiat dolor nibh Cum sociis natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Nam consectetur </strong> <p> Gravida sodales commodo nullam fringilla in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor venenatis quis eu est quisque a pellentesque dui vitae tempus augue curabitu quis mattis mi proin varius sed enim sit amet lobortis In hac </p> <p> Habitasse platea dictumst cras sit amet est eget dui viverra scelerisque duis semper pulvinar in risus ac bibendum aenean hendrerit pharetra nisl Sed sit am etsapien et elit porttitor </p> </div> </div> </div> </div> </div> <!-- end panel--> </div> </div> </div> </div> </div> </div> </div> <!-- sections end --> </div> </div> </div> </div> <!-- site content ends --> <!--Footer Section Start Here --> <?php include_once ("includes/footer.php"); ?> <!--Footer Section End Here --> </div> <script src="assets/js/jquery.min.js"></script> <!-- Bootstrap Js--> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/jquery.easing.min.js"></script> <!--Main Slider Js--> <script src="assets/revolution-slider/js/jquery.themepunch.plugins.min.js"></script> <script src="assets/revolution-slider/js/jquery.themepunch.revolution.js"></script> <!--Main Slider Js End --> <script src="assets/js/jquery.flexslider.js"></script> <script src="assets/js/site.js"></script> </body> </html>
gpl-3.0
Kmayankkr/robocomp
doc/CDSL.md
2228
# CDSL CDSL is Component Description Specific Language and is used to create and maintain their component descriptions from a textual model. CDSL files contain the basic definition of the structure of the component and information about communication parameters such as proxies, the programming language of the component, interfaces and topics used by the components, the optional support of Qt graphical interfaces. ## Structure of a CDSL CDSL permits comments in C and C++ style, starting with // Every CDSL file contains the following properties: - #### Interfaces and data types defined in external IDSL files. ``` import "import1.idsl"; import "import2.idsl"; ``` - #### Component name. ``` Component myComponent ``` - #### Communication model: - Required and provided interfaces. - Topics that the component will publish or subscribe to. - implements: Create RPC server. - requires: Create a proxy to RPC server. - publishes: Create publication proxy a specific topic. - subscribesTo: Subscribe a specific topic. ``` Communications { implements interfaceName; requires otherName; subscribesTo topicToSubscribeTo; publishes topicToPublish; } ``` - #### Programming language of the component. - CPP: Implement component using C++ - CPP11: Implement component using C++ 11 to allow use of [new Ice implementation.](https://doc.zeroc.com/ice/3.7/language-mappings/c++11-mapping) - Python: Implement component using python 3.x. ``` language Cpp//Cpp11//Python; ``` - #### Graphical interface support. (Optional) - [QWidget](https://doc.qt.io/qt-5/qwidget.html) - [QDialog](https://doc.qt.io/qt-5/qdialog.html) - [QMainWindow](https://doc.qt.io/qt-5/qmainwindow.html) ``` gui Qt(QWidget//QDialog//QMainWindow); ``` - #### Dependences with external classes and libraries. (Optional) - agmagent: Include Cortex-Agent communication patterns. - InnerModelViewer: Include [InnerModelViewer](https://github.com/robocomp/robocomp/tree/stable/libs/innermodel) resources. - dsr: Include [dsr](https://github.com/robocomp/robocomp/tree/development/classes/dsr) resources. ``` options dsr, agmagent, InnerModelViewer; ``` ##
gpl-3.0
fritzone/pici-nms
Dispatcher/ThreadPinger.cpp
1433
#include "ThreadPinger.h" #include "Service.h" #undef MSEC_PING_SLEEP_TIME #define MSEC_PING_SLEEP_TIME 5 void ThreadPinger() { while ( true ) { SLEEP ( 5 ); // firstly "hack" the not ping status. A pinged() event will anyway solve this. Service::getMe()->notPinged(); if ( Service::getMe()->getPingCounter() > 5 ) { LOG ( "Daemon highly possible disappeared... trying to re-register\n" ); if ( !Service::getMe()->registerToDaemon() ) { LOG ( "Cannot register to the daemon this run, retrying in 5 seconds\n" ); } else { LOG ( "Succesfully re-registered\n" ); Service::getMe()->pinged(); } } LOG ( "ThreadPinger(): Loop\n" ); SCOPEDLOCK ( dispatcherMutex ); for ( STL_SUBSCRIPTIONINFO::iterator it = subscriptions.begin(); it != subscriptions.end(); ) { CI_RESPONSE response = ( *it )->ci->ping(); if ( response == CI_ERRCANTCONNECT ) { LOG ( "ThreadPinger() : ERROR PINGING '%s'. REMOVING IT.\n", C_STR ( ( *it )->ci->clientIp ) ); delete ( *it ); it = subscriptions.erase ( it ); } else { it++; } } } }
gpl-3.0
antagon/kenotaph-daemon
utils/Makefile
169
# # Copyright (c) 2016, CodeWard.org # all: $(MAKE) -C kenotaphd-ifchannel/ install: $(MAKE) -C kenotaphd-ifchannel/ $@ clean: $(MAKE) -C kenotaphd-ifchannel/ $@
gpl-3.0
dasuimao/U-BOOT-Tiny4412
drivers/ddr/fsl/interactive.c
72648
/* * Copyright 2010-2014 Freescale Semiconductor, Inc. * * SPDX-License-Identifier: GPL-2.0+ */ /* * Generic driver for Freescale DDR/DDR2/DDR3 memory controller. * Based on code from spd_sdram.c * Author: James Yang [at freescale.com] * York Sun [at freescale.com] */ #include <common.h> #include <cli.h> #include <linux/ctype.h> #include <asm/types.h> #include <asm/io.h> #include <fsl_ddr_sdram.h> #include <fsl_ddr.h> /* Option parameter Structures */ struct options_string { const char *option_name; size_t offset; unsigned int size; const char printhex; }; static unsigned int picos_to_mhz(unsigned int picos) { return 1000000 / picos; } static void print_option_table(const struct options_string *table, int table_size, const void *base) { unsigned int i; unsigned int *ptr; unsigned long long *ptr_l; for (i = 0; i < table_size; i++) { switch (table[i].size) { case 4: ptr = (unsigned int *) (base + table[i].offset); if (table[i].printhex) { printf("%s = 0x%08X\n", table[i].option_name, *ptr); } else { printf("%s = %u\n", table[i].option_name, *ptr); } break; case 8: ptr_l = (unsigned long long *) (base + table[i].offset); printf("%s = %llu\n", table[i].option_name, *ptr_l); break; default: printf("Unrecognized size!\n"); break; } } } static int handle_option_table(const struct options_string *table, int table_size, void *base, const char *opt, const char *val) { unsigned int i; unsigned int value, *ptr; unsigned long long value_l, *ptr_l; for (i = 0; i < table_size; i++) { if (strcmp(table[i].option_name, opt) != 0) continue; switch (table[i].size) { case 4: value = simple_strtoul(val, NULL, 0); ptr = base + table[i].offset; *ptr = value; break; case 8: value_l = simple_strtoull(val, NULL, 0); ptr_l = base + table[i].offset; *ptr_l = value_l; break; default: printf("Unrecognized size!\n"); break; } return 1; } return 0; } static void fsl_ddr_generic_edit(void *pdata, void *pend, unsigned int element_size, unsigned int element_num, unsigned int value) { char *pcdata = (char *)pdata; /* BIG ENDIAN ONLY */ pcdata += element_num * element_size; if ((pcdata + element_size) > (char *) pend) { printf("trying to write past end of data\n"); return; } switch (element_size) { case 1: __raw_writeb(value, pcdata); break; case 2: __raw_writew(value, pcdata); break; case 4: __raw_writel(value, pcdata); break; default: printf("unexpected element size %u\n", element_size); break; } } static void fsl_ddr_spd_edit(fsl_ddr_info_t *pinfo, unsigned int ctrl_num, unsigned int dimm_num, unsigned int element_num, unsigned int value) { generic_spd_eeprom_t *pspd; pspd = &(pinfo->spd_installed_dimms[ctrl_num][dimm_num]); fsl_ddr_generic_edit(pspd, pspd + 1, 1, element_num, value); } #define COMMON_TIMING(x) {#x, offsetof(common_timing_params_t, x), \ sizeof((common_timing_params_t *)0)->x, 0} static void lowest_common_dimm_parameters_edit(fsl_ddr_info_t *pinfo, unsigned int ctrl_num, const char *optname_str, const char *value_str) { common_timing_params_t *p = &pinfo->common_timing_params[ctrl_num]; static const struct options_string options[] = { COMMON_TIMING(tckmin_x_ps), COMMON_TIMING(tckmax_ps), COMMON_TIMING(taamin_ps), COMMON_TIMING(trcd_ps), COMMON_TIMING(trp_ps), COMMON_TIMING(tras_ps), #ifdef CONFIG_SYS_FSL_DDR4 COMMON_TIMING(trfc1_ps), COMMON_TIMING(trfc2_ps), COMMON_TIMING(trfc4_ps), COMMON_TIMING(trrds_ps), COMMON_TIMING(trrdl_ps), COMMON_TIMING(tccdl_ps), #else COMMON_TIMING(twtr_ps), COMMON_TIMING(trfc_ps), COMMON_TIMING(trrd_ps), COMMON_TIMING(trtp_ps), #endif COMMON_TIMING(twr_ps), COMMON_TIMING(trc_ps), COMMON_TIMING(refresh_rate_ps), COMMON_TIMING(extended_op_srt), #if defined(CONFIG_SYS_FSL_DDR1) || defined(CONFIG_SYS_FSL_DDR2) COMMON_TIMING(tis_ps), COMMON_TIMING(tih_ps), COMMON_TIMING(tds_ps), COMMON_TIMING(tdh_ps), COMMON_TIMING(tdqsq_max_ps), COMMON_TIMING(tqhs_ps), #endif COMMON_TIMING(ndimms_present), COMMON_TIMING(lowest_common_spd_caslat), COMMON_TIMING(highest_common_derated_caslat), COMMON_TIMING(additive_latency), COMMON_TIMING(all_dimms_burst_lengths_bitmask), COMMON_TIMING(all_dimms_registered), COMMON_TIMING(all_dimms_unbuffered), COMMON_TIMING(all_dimms_ecc_capable), COMMON_TIMING(total_mem), COMMON_TIMING(base_address), }; static const unsigned int n_opts = ARRAY_SIZE(options); if (handle_option_table(options, n_opts, p, optname_str, value_str)) return; printf("Error: couldn't find option string %s\n", optname_str); } #define DIMM_PARM(x) {#x, offsetof(dimm_params_t, x), \ sizeof((dimm_params_t *)0)->x, 0} #define DIMM_PARM_HEX(x) {#x, offsetof(dimm_params_t, x), \ sizeof((dimm_params_t *)0)->x, 1} static void fsl_ddr_dimm_parameters_edit(fsl_ddr_info_t *pinfo, unsigned int ctrl_num, unsigned int dimm_num, const char *optname_str, const char *value_str) { dimm_params_t *p = &(pinfo->dimm_params[ctrl_num][dimm_num]); static const struct options_string options[] = { DIMM_PARM(n_ranks), DIMM_PARM(data_width), DIMM_PARM(primary_sdram_width), DIMM_PARM(ec_sdram_width), DIMM_PARM(registered_dimm), DIMM_PARM(mirrored_dimm), DIMM_PARM(device_width), DIMM_PARM(n_row_addr), DIMM_PARM(n_col_addr), DIMM_PARM(edc_config), #ifdef CONFIG_SYS_FSL_DDR4 DIMM_PARM(bank_addr_bits), DIMM_PARM(bank_group_bits), #else DIMM_PARM(n_banks_per_sdram_device), #endif DIMM_PARM(burst_lengths_bitmask), DIMM_PARM(row_density), DIMM_PARM(tckmin_x_ps), DIMM_PARM(tckmin_x_minus_1_ps), DIMM_PARM(tckmin_x_minus_2_ps), DIMM_PARM(tckmax_ps), DIMM_PARM(caslat_x), DIMM_PARM(caslat_x_minus_1), DIMM_PARM(caslat_x_minus_2), DIMM_PARM(caslat_lowest_derated), DIMM_PARM(trcd_ps), DIMM_PARM(trp_ps), DIMM_PARM(tras_ps), #ifdef CONFIG_SYS_FSL_DDR4 DIMM_PARM(trfc1_ps), DIMM_PARM(trfc2_ps), DIMM_PARM(trfc4_ps), DIMM_PARM(trrds_ps), DIMM_PARM(trrdl_ps), DIMM_PARM(tccdl_ps), #else DIMM_PARM(twr_ps), DIMM_PARM(twtr_ps), DIMM_PARM(trfc_ps), DIMM_PARM(trrd_ps), DIMM_PARM(trtp_ps), #endif DIMM_PARM(trc_ps), DIMM_PARM(refresh_rate_ps), DIMM_PARM(extended_op_srt), #if defined(CONFIG_SYS_FSL_DDR1) || defined(CONFIG_SYS_FSL_DDR2) DIMM_PARM(tis_ps), DIMM_PARM(tih_ps), DIMM_PARM(tds_ps), DIMM_PARM(tdh_ps), DIMM_PARM(tdqsq_max_ps), DIMM_PARM(tqhs_ps), #endif #ifdef CONFIG_SYS_FSL_DDR4 DIMM_PARM_HEX(dq_mapping[0]), DIMM_PARM_HEX(dq_mapping[1]), DIMM_PARM_HEX(dq_mapping[2]), DIMM_PARM_HEX(dq_mapping[3]), DIMM_PARM_HEX(dq_mapping[4]), DIMM_PARM_HEX(dq_mapping[5]), DIMM_PARM_HEX(dq_mapping[6]), DIMM_PARM_HEX(dq_mapping[7]), DIMM_PARM_HEX(dq_mapping[8]), DIMM_PARM_HEX(dq_mapping[9]), DIMM_PARM_HEX(dq_mapping[10]), DIMM_PARM_HEX(dq_mapping[11]), DIMM_PARM_HEX(dq_mapping[12]), DIMM_PARM_HEX(dq_mapping[13]), DIMM_PARM_HEX(dq_mapping[14]), DIMM_PARM_HEX(dq_mapping[15]), DIMM_PARM_HEX(dq_mapping[16]), DIMM_PARM_HEX(dq_mapping[17]), DIMM_PARM(dq_mapping_ors), #endif DIMM_PARM(rank_density), DIMM_PARM(capacity), DIMM_PARM(base_address), }; static const unsigned int n_opts = ARRAY_SIZE(options); if (handle_option_table(options, n_opts, p, optname_str, value_str)) return; printf("couldn't find option string %s\n", optname_str); } static void print_dimm_parameters(const dimm_params_t *pdimm) { static const struct options_string options[] = { DIMM_PARM(n_ranks), DIMM_PARM(data_width), DIMM_PARM(primary_sdram_width), DIMM_PARM(ec_sdram_width), DIMM_PARM(registered_dimm), DIMM_PARM(mirrored_dimm), DIMM_PARM(device_width), DIMM_PARM(n_row_addr), DIMM_PARM(n_col_addr), DIMM_PARM(edc_config), #ifdef CONFIG_SYS_FSL_DDR4 DIMM_PARM(bank_addr_bits), DIMM_PARM(bank_group_bits), #else DIMM_PARM(n_banks_per_sdram_device), #endif DIMM_PARM(tckmin_x_ps), DIMM_PARM(tckmin_x_minus_1_ps), DIMM_PARM(tckmin_x_minus_2_ps), DIMM_PARM(tckmax_ps), DIMM_PARM(caslat_x), DIMM_PARM_HEX(caslat_x), DIMM_PARM(taa_ps), DIMM_PARM(caslat_x_minus_1), DIMM_PARM(caslat_x_minus_2), DIMM_PARM(caslat_lowest_derated), DIMM_PARM(trcd_ps), DIMM_PARM(trp_ps), DIMM_PARM(tras_ps), #if defined(CONFIG_SYS_FSL_DDR4) || defined(CONFIG_SYS_FSL_DDR3) DIMM_PARM(tfaw_ps), #endif #ifdef CONFIG_SYS_FSL_DDR4 DIMM_PARM(trfc1_ps), DIMM_PARM(trfc2_ps), DIMM_PARM(trfc4_ps), DIMM_PARM(trrds_ps), DIMM_PARM(trrdl_ps), DIMM_PARM(tccdl_ps), #else DIMM_PARM(twr_ps), DIMM_PARM(twtr_ps), DIMM_PARM(trfc_ps), DIMM_PARM(trrd_ps), DIMM_PARM(trtp_ps), #endif DIMM_PARM(trc_ps), DIMM_PARM(refresh_rate_ps), #if defined(CONFIG_SYS_FSL_DDR1) || defined(CONFIG_SYS_FSL_DDR2) DIMM_PARM(tis_ps), DIMM_PARM(tih_ps), DIMM_PARM(tds_ps), DIMM_PARM(tdh_ps), DIMM_PARM(tdqsq_max_ps), DIMM_PARM(tqhs_ps), #endif #ifdef CONFIG_SYS_FSL_DDR4 DIMM_PARM_HEX(dq_mapping[0]), DIMM_PARM_HEX(dq_mapping[1]), DIMM_PARM_HEX(dq_mapping[2]), DIMM_PARM_HEX(dq_mapping[3]), DIMM_PARM_HEX(dq_mapping[4]), DIMM_PARM_HEX(dq_mapping[5]), DIMM_PARM_HEX(dq_mapping[6]), DIMM_PARM_HEX(dq_mapping[7]), DIMM_PARM_HEX(dq_mapping[8]), DIMM_PARM_HEX(dq_mapping[9]), DIMM_PARM_HEX(dq_mapping[10]), DIMM_PARM_HEX(dq_mapping[11]), DIMM_PARM_HEX(dq_mapping[12]), DIMM_PARM_HEX(dq_mapping[13]), DIMM_PARM_HEX(dq_mapping[14]), DIMM_PARM_HEX(dq_mapping[15]), DIMM_PARM_HEX(dq_mapping[16]), DIMM_PARM_HEX(dq_mapping[17]), DIMM_PARM(dq_mapping_ors), #endif }; static const unsigned int n_opts = ARRAY_SIZE(options); if (pdimm->n_ranks == 0) { printf("DIMM not present\n"); return; } printf("DIMM organization parameters:\n"); printf("module part name = %s\n", pdimm->mpart); printf("rank_density = %llu bytes (%llu megabytes)\n", pdimm->rank_density, pdimm->rank_density / 0x100000); printf("capacity = %llu bytes (%llu megabytes)\n", pdimm->capacity, pdimm->capacity / 0x100000); printf("burst_lengths_bitmask = %02X\n", pdimm->burst_lengths_bitmask); printf("base_addresss = %llu (%08llX %08llX)\n", pdimm->base_address, (pdimm->base_address >> 32), pdimm->base_address & 0xFFFFFFFF); print_option_table(options, n_opts, pdimm); } static void print_lowest_common_dimm_parameters( const common_timing_params_t *plcd_dimm_params) { static const struct options_string options[] = { COMMON_TIMING(taamin_ps), COMMON_TIMING(trcd_ps), COMMON_TIMING(trp_ps), COMMON_TIMING(tras_ps), #ifdef CONFIG_SYS_FSL_DDR4 COMMON_TIMING(trfc1_ps), COMMON_TIMING(trfc2_ps), COMMON_TIMING(trfc4_ps), COMMON_TIMING(trrds_ps), COMMON_TIMING(trrdl_ps), COMMON_TIMING(tccdl_ps), #else COMMON_TIMING(twtr_ps), COMMON_TIMING(trfc_ps), COMMON_TIMING(trrd_ps), COMMON_TIMING(trtp_ps), #endif COMMON_TIMING(twr_ps), COMMON_TIMING(trc_ps), COMMON_TIMING(refresh_rate_ps), COMMON_TIMING(extended_op_srt), #if defined(CONFIG_SYS_FSL_DDR1) || defined(CONFIG_SYS_FSL_DDR2) COMMON_TIMING(tis_ps), COMMON_TIMING(tih_ps), COMMON_TIMING(tds_ps), COMMON_TIMING(tdh_ps), COMMON_TIMING(tdqsq_max_ps), COMMON_TIMING(tqhs_ps), #endif COMMON_TIMING(lowest_common_spd_caslat), COMMON_TIMING(highest_common_derated_caslat), COMMON_TIMING(additive_latency), COMMON_TIMING(ndimms_present), COMMON_TIMING(all_dimms_registered), COMMON_TIMING(all_dimms_unbuffered), COMMON_TIMING(all_dimms_ecc_capable), }; static const unsigned int n_opts = ARRAY_SIZE(options); /* Clock frequencies */ printf("tckmin_x_ps = %u (%u MHz)\n", plcd_dimm_params->tckmin_x_ps, picos_to_mhz(plcd_dimm_params->tckmin_x_ps)); printf("tckmax_ps = %u (%u MHz)\n", plcd_dimm_params->tckmax_ps, picos_to_mhz(plcd_dimm_params->tckmax_ps)); printf("all_dimms_burst_lengths_bitmask = %02X\n", plcd_dimm_params->all_dimms_burst_lengths_bitmask); print_option_table(options, n_opts, plcd_dimm_params); printf("total_mem = %llu (%llu megabytes)\n", plcd_dimm_params->total_mem, plcd_dimm_params->total_mem / 0x100000); printf("base_address = %llu (%llu megabytes)\n", plcd_dimm_params->base_address, plcd_dimm_params->base_address / 0x100000); } #define CTRL_OPTIONS(x) {#x, offsetof(memctl_options_t, x), \ sizeof((memctl_options_t *)0)->x, 0} #define CTRL_OPTIONS_CS(x, y) {"cs" #x "_" #y, \ offsetof(memctl_options_t, cs_local_opts[x].y), \ sizeof((memctl_options_t *)0)->cs_local_opts[x].y, 0} static void fsl_ddr_options_edit(fsl_ddr_info_t *pinfo, unsigned int ctl_num, const char *optname_str, const char *value_str) { memctl_options_t *p = &(pinfo->memctl_opts[ctl_num]); /* * This array all on the stack and *computed* each time this * function is rung. */ static const struct options_string options[] = { CTRL_OPTIONS_CS(0, odt_rd_cfg), CTRL_OPTIONS_CS(0, odt_wr_cfg), #if (CONFIG_CHIP_SELECTS_PER_CTRL > 1) CTRL_OPTIONS_CS(1, odt_rd_cfg), CTRL_OPTIONS_CS(1, odt_wr_cfg), #endif #if (CONFIG_CHIP_SELECTS_PER_CTRL > 2) CTRL_OPTIONS_CS(2, odt_rd_cfg), CTRL_OPTIONS_CS(2, odt_wr_cfg), #endif #if (CONFIG_CHIP_SELECTS_PER_CTRL > 2) CTRL_OPTIONS_CS(3, odt_rd_cfg), CTRL_OPTIONS_CS(3, odt_wr_cfg), #endif #if defined(CONFIG_SYS_FSL_DDR3) || defined(CONFIG_SYS_FSL_DDR4) CTRL_OPTIONS_CS(0, odt_rtt_norm), CTRL_OPTIONS_CS(0, odt_rtt_wr), #if (CONFIG_CHIP_SELECTS_PER_CTRL > 1) CTRL_OPTIONS_CS(1, odt_rtt_norm), CTRL_OPTIONS_CS(1, odt_rtt_wr), #endif #if (CONFIG_CHIP_SELECTS_PER_CTRL > 2) CTRL_OPTIONS_CS(2, odt_rtt_norm), CTRL_OPTIONS_CS(2, odt_rtt_wr), #endif #if (CONFIG_CHIP_SELECTS_PER_CTRL > 2) CTRL_OPTIONS_CS(3, odt_rtt_norm), CTRL_OPTIONS_CS(3, odt_rtt_wr), #endif #endif CTRL_OPTIONS(memctl_interleaving), CTRL_OPTIONS(memctl_interleaving_mode), CTRL_OPTIONS(ba_intlv_ctl), CTRL_OPTIONS(ecc_mode), CTRL_OPTIONS(ecc_init_using_memctl), CTRL_OPTIONS(dqs_config), CTRL_OPTIONS(self_refresh_in_sleep), CTRL_OPTIONS(dynamic_power), CTRL_OPTIONS(data_bus_width), CTRL_OPTIONS(burst_length), CTRL_OPTIONS(cas_latency_override), CTRL_OPTIONS(cas_latency_override_value), CTRL_OPTIONS(use_derated_caslat), CTRL_OPTIONS(additive_latency_override), CTRL_OPTIONS(additive_latency_override_value), CTRL_OPTIONS(clk_adjust), CTRL_OPTIONS(cpo_override), CTRL_OPTIONS(write_data_delay), CTRL_OPTIONS(half_strength_driver_enable), /* * These can probably be changed to 2T_EN and 3T_EN * (using a leading numerical character) without problem */ CTRL_OPTIONS(twot_en), CTRL_OPTIONS(threet_en), CTRL_OPTIONS(ap_en), CTRL_OPTIONS(x4_en), CTRL_OPTIONS(bstopre), CTRL_OPTIONS(wrlvl_override), CTRL_OPTIONS(wrlvl_sample), CTRL_OPTIONS(wrlvl_start), CTRL_OPTIONS(cswl_override), CTRL_OPTIONS(rcw_override), CTRL_OPTIONS(rcw_1), CTRL_OPTIONS(rcw_2), CTRL_OPTIONS(ddr_cdr1), CTRL_OPTIONS(ddr_cdr2), CTRL_OPTIONS(tfaw_window_four_activates_ps), CTRL_OPTIONS(trwt_override), CTRL_OPTIONS(trwt), CTRL_OPTIONS(rtt_override), CTRL_OPTIONS(rtt_override_value), CTRL_OPTIONS(rtt_wr_override_value), }; static const unsigned int n_opts = ARRAY_SIZE(options); if (handle_option_table(options, n_opts, p, optname_str, value_str)) return; printf("couldn't find option string %s\n", optname_str); } #define CFG_REGS(x) {#x, offsetof(fsl_ddr_cfg_regs_t, x), \ sizeof((fsl_ddr_cfg_regs_t *)0)->x, 1} #define CFG_REGS_CS(x, y) {"cs" #x "_" #y, \ offsetof(fsl_ddr_cfg_regs_t, cs[x].y), \ sizeof((fsl_ddr_cfg_regs_t *)0)->cs[x].y, 1} static void print_fsl_memctl_config_regs(const fsl_ddr_cfg_regs_t *ddr) { unsigned int i; static const struct options_string options[] = { CFG_REGS_CS(0, bnds), CFG_REGS_CS(0, config), CFG_REGS_CS(0, config_2), #if (CONFIG_CHIP_SELECTS_PER_CTRL > 1) CFG_REGS_CS(1, bnds), CFG_REGS_CS(1, config), CFG_REGS_CS(1, config_2), #endif #if (CONFIG_CHIP_SELECTS_PER_CTRL > 2) CFG_REGS_CS(2, bnds), CFG_REGS_CS(2, config), CFG_REGS_CS(2, config_2), #endif #if (CONFIG_CHIP_SELECTS_PER_CTRL > 2) CFG_REGS_CS(3, bnds), CFG_REGS_CS(3, config), CFG_REGS_CS(3, config_2), #endif CFG_REGS(timing_cfg_3), CFG_REGS(timing_cfg_0), CFG_REGS(timing_cfg_1), CFG_REGS(timing_cfg_2), CFG_REGS(ddr_sdram_cfg), CFG_REGS(ddr_sdram_cfg_2), CFG_REGS(ddr_sdram_cfg_3), CFG_REGS(ddr_sdram_mode), CFG_REGS(ddr_sdram_mode_2), CFG_REGS(ddr_sdram_mode_3), CFG_REGS(ddr_sdram_mode_4), CFG_REGS(ddr_sdram_mode_5), CFG_REGS(ddr_sdram_mode_6), CFG_REGS(ddr_sdram_mode_7), CFG_REGS(ddr_sdram_mode_8), #ifdef CONFIG_SYS_FSL_DDR4 CFG_REGS(ddr_sdram_mode_9), CFG_REGS(ddr_sdram_mode_10), CFG_REGS(ddr_sdram_mode_11), CFG_REGS(ddr_sdram_mode_12), CFG_REGS(ddr_sdram_mode_13), CFG_REGS(ddr_sdram_mode_14), CFG_REGS(ddr_sdram_mode_15), CFG_REGS(ddr_sdram_mode_16), #endif CFG_REGS(ddr_sdram_interval), CFG_REGS(ddr_data_init), CFG_REGS(ddr_sdram_clk_cntl), CFG_REGS(ddr_init_addr), CFG_REGS(ddr_init_ext_addr), CFG_REGS(timing_cfg_4), CFG_REGS(timing_cfg_5), #ifdef CONFIG_SYS_FSL_DDR4 CFG_REGS(timing_cfg_6), CFG_REGS(timing_cfg_7), CFG_REGS(timing_cfg_8), CFG_REGS(timing_cfg_9), #endif CFG_REGS(ddr_zq_cntl), CFG_REGS(ddr_wrlvl_cntl), CFG_REGS(ddr_wrlvl_cntl_2), CFG_REGS(ddr_wrlvl_cntl_3), CFG_REGS(ddr_sr_cntr), CFG_REGS(ddr_sdram_rcw_1), CFG_REGS(ddr_sdram_rcw_2), CFG_REGS(ddr_cdr1), CFG_REGS(ddr_cdr2), CFG_REGS(dq_map_0), CFG_REGS(dq_map_1), CFG_REGS(dq_map_2), CFG_REGS(dq_map_3), CFG_REGS(err_disable), CFG_REGS(err_int_en), CFG_REGS(ddr_eor), }; static const unsigned int n_opts = ARRAY_SIZE(options); print_option_table(options, n_opts, ddr); for (i = 0; i < 64; i++) printf("debug_%02d = 0x%08X\n", i+1, ddr->debug[i]); } static void fsl_ddr_regs_edit(fsl_ddr_info_t *pinfo, unsigned int ctrl_num, const char *regname, const char *value_str) { unsigned int i; fsl_ddr_cfg_regs_t *ddr; char buf[20]; static const struct options_string options[] = { CFG_REGS_CS(0, bnds), CFG_REGS_CS(0, config), CFG_REGS_CS(0, config_2), #if (CONFIG_CHIP_SELECTS_PER_CTRL > 1) CFG_REGS_CS(1, bnds), CFG_REGS_CS(1, config), CFG_REGS_CS(1, config_2), #endif #if (CONFIG_CHIP_SELECTS_PER_CTRL > 2) CFG_REGS_CS(2, bnds), CFG_REGS_CS(2, config), CFG_REGS_CS(2, config_2), #endif #if (CONFIG_CHIP_SELECTS_PER_CTRL > 3) CFG_REGS_CS(3, bnds), CFG_REGS_CS(3, config), CFG_REGS_CS(3, config_2), #endif CFG_REGS(timing_cfg_3), CFG_REGS(timing_cfg_0), CFG_REGS(timing_cfg_1), CFG_REGS(timing_cfg_2), CFG_REGS(ddr_sdram_cfg), CFG_REGS(ddr_sdram_cfg_2), CFG_REGS(ddr_sdram_cfg_3), CFG_REGS(ddr_sdram_mode), CFG_REGS(ddr_sdram_mode_2), CFG_REGS(ddr_sdram_mode_3), CFG_REGS(ddr_sdram_mode_4), CFG_REGS(ddr_sdram_mode_5), CFG_REGS(ddr_sdram_mode_6), CFG_REGS(ddr_sdram_mode_7), CFG_REGS(ddr_sdram_mode_8), #ifdef CONFIG_SYS_FSL_DDR4 CFG_REGS(ddr_sdram_mode_9), CFG_REGS(ddr_sdram_mode_10), CFG_REGS(ddr_sdram_mode_11), CFG_REGS(ddr_sdram_mode_12), CFG_REGS(ddr_sdram_mode_13), CFG_REGS(ddr_sdram_mode_14), CFG_REGS(ddr_sdram_mode_15), CFG_REGS(ddr_sdram_mode_16), #endif CFG_REGS(ddr_sdram_interval), CFG_REGS(ddr_data_init), CFG_REGS(ddr_sdram_clk_cntl), CFG_REGS(ddr_init_addr), CFG_REGS(ddr_init_ext_addr), CFG_REGS(timing_cfg_4), CFG_REGS(timing_cfg_5), #ifdef CONFIG_SYS_FSL_DDR4 CFG_REGS(timing_cfg_6), CFG_REGS(timing_cfg_7), CFG_REGS(timing_cfg_8), CFG_REGS(timing_cfg_9), #endif CFG_REGS(ddr_zq_cntl), CFG_REGS(ddr_wrlvl_cntl), CFG_REGS(ddr_wrlvl_cntl_2), CFG_REGS(ddr_wrlvl_cntl_3), CFG_REGS(ddr_sr_cntr), CFG_REGS(ddr_sdram_rcw_1), CFG_REGS(ddr_sdram_rcw_2), CFG_REGS(ddr_cdr1), CFG_REGS(ddr_cdr2), CFG_REGS(dq_map_0), CFG_REGS(dq_map_1), CFG_REGS(dq_map_2), CFG_REGS(dq_map_3), CFG_REGS(err_disable), CFG_REGS(err_int_en), CFG_REGS(ddr_sdram_rcw_2), CFG_REGS(ddr_sdram_rcw_2), CFG_REGS(ddr_eor), }; static const unsigned int n_opts = ARRAY_SIZE(options); debug("fsl_ddr_regs_edit: ctrl_num = %u, " "regname = %s, value = %s\n", ctrl_num, regname, value_str); if (ctrl_num > CONFIG_SYS_NUM_DDR_CTLRS) return; ddr = &(pinfo->fsl_ddr_config_reg[ctrl_num]); if (handle_option_table(options, n_opts, ddr, regname, value_str)) return; for (i = 0; i < 64; i++) { unsigned int value = simple_strtoul(value_str, NULL, 0); sprintf(buf, "debug_%u", i + 1); if (strcmp(buf, regname) == 0) { ddr->debug[i] = value; return; } } printf("Error: couldn't find register string %s\n", regname); } #define CTRL_OPTIONS_HEX(x) {#x, offsetof(memctl_options_t, x), \ sizeof((memctl_options_t *)0)->x, 1} static void print_memctl_options(const memctl_options_t *popts) { static const struct options_string options[] = { CTRL_OPTIONS_CS(0, odt_rd_cfg), CTRL_OPTIONS_CS(0, odt_wr_cfg), #if (CONFIG_CHIP_SELECTS_PER_CTRL > 1) CTRL_OPTIONS_CS(1, odt_rd_cfg), CTRL_OPTIONS_CS(1, odt_wr_cfg), #endif #if (CONFIG_CHIP_SELECTS_PER_CTRL > 2) CTRL_OPTIONS_CS(2, odt_rd_cfg), CTRL_OPTIONS_CS(2, odt_wr_cfg), #endif #if (CONFIG_CHIP_SELECTS_PER_CTRL > 3) CTRL_OPTIONS_CS(3, odt_rd_cfg), CTRL_OPTIONS_CS(3, odt_wr_cfg), #endif #if defined(CONFIG_SYS_FSL_DDR3) || defined(CONFIG_SYS_FSL_DDR4) CTRL_OPTIONS_CS(0, odt_rtt_norm), CTRL_OPTIONS_CS(0, odt_rtt_wr), #if (CONFIG_CHIP_SELECTS_PER_CTRL > 1) CTRL_OPTIONS_CS(1, odt_rtt_norm), CTRL_OPTIONS_CS(1, odt_rtt_wr), #endif #if (CONFIG_CHIP_SELECTS_PER_CTRL > 2) CTRL_OPTIONS_CS(2, odt_rtt_norm), CTRL_OPTIONS_CS(2, odt_rtt_wr), #endif #if (CONFIG_CHIP_SELECTS_PER_CTRL > 3) CTRL_OPTIONS_CS(3, odt_rtt_norm), CTRL_OPTIONS_CS(3, odt_rtt_wr), #endif #endif CTRL_OPTIONS(memctl_interleaving), CTRL_OPTIONS(memctl_interleaving_mode), CTRL_OPTIONS_HEX(ba_intlv_ctl), CTRL_OPTIONS(ecc_mode), CTRL_OPTIONS(ecc_init_using_memctl), CTRL_OPTIONS(dqs_config), CTRL_OPTIONS(self_refresh_in_sleep), CTRL_OPTIONS(dynamic_power), CTRL_OPTIONS(data_bus_width), CTRL_OPTIONS(burst_length), CTRL_OPTIONS(cas_latency_override), CTRL_OPTIONS(cas_latency_override_value), CTRL_OPTIONS(use_derated_caslat), CTRL_OPTIONS(additive_latency_override), CTRL_OPTIONS(additive_latency_override_value), CTRL_OPTIONS(clk_adjust), CTRL_OPTIONS(cpo_override), CTRL_OPTIONS(write_data_delay), CTRL_OPTIONS(half_strength_driver_enable), /* * These can probably be changed to 2T_EN and 3T_EN * (using a leading numerical character) without problem */ CTRL_OPTIONS(twot_en), CTRL_OPTIONS(threet_en), CTRL_OPTIONS(registered_dimm_en), CTRL_OPTIONS(mirrored_dimm), CTRL_OPTIONS(ap_en), CTRL_OPTIONS(x4_en), CTRL_OPTIONS(bstopre), CTRL_OPTIONS(wrlvl_override), CTRL_OPTIONS(wrlvl_sample), CTRL_OPTIONS(wrlvl_start), CTRL_OPTIONS_HEX(cswl_override), CTRL_OPTIONS(rcw_override), CTRL_OPTIONS(rcw_1), CTRL_OPTIONS(rcw_2), CTRL_OPTIONS_HEX(ddr_cdr1), CTRL_OPTIONS_HEX(ddr_cdr2), CTRL_OPTIONS(tfaw_window_four_activates_ps), CTRL_OPTIONS(trwt_override), CTRL_OPTIONS(trwt), CTRL_OPTIONS(rtt_override), CTRL_OPTIONS(rtt_override_value), CTRL_OPTIONS(rtt_wr_override_value), }; static const unsigned int n_opts = ARRAY_SIZE(options); print_option_table(options, n_opts, popts); } #ifdef CONFIG_SYS_FSL_DDR1 void ddr1_spd_dump(const ddr1_spd_eeprom_t *spd) { unsigned int i; printf("%-3d : %02x %s\n", 0, spd->info_size, " spd->info_size, * 0 # bytes written into serial memory *"); printf("%-3d : %02x %s\n", 1, spd->chip_size, " spd->chip_size, * 1 Total # bytes of SPD memory device *"); printf("%-3d : %02x %s\n", 2, spd->mem_type, " spd->mem_type, * 2 Fundamental memory type *"); printf("%-3d : %02x %s\n", 3, spd->nrow_addr, " spd->nrow_addr, * 3 # of Row Addresses on this assembly *"); printf("%-3d : %02x %s\n", 4, spd->ncol_addr, " spd->ncol_addr, * 4 # of Column Addrs on this assembly *"); printf("%-3d : %02x %s\n", 5, spd->nrows, " spd->nrows * 5 # of DIMM Banks *"); printf("%-3d : %02x %s\n", 6, spd->dataw_lsb, " spd->dataw_lsb, * 6 Data Width lsb of this assembly *"); printf("%-3d : %02x %s\n", 7, spd->dataw_msb, " spd->dataw_msb, * 7 Data Width msb of this assembly *"); printf("%-3d : %02x %s\n", 8, spd->voltage, " spd->voltage, * 8 Voltage intf std of this assembly *"); printf("%-3d : %02x %s\n", 9, spd->clk_cycle, " spd->clk_cycle, * 9 SDRAM Cycle time at CL=X *"); printf("%-3d : %02x %s\n", 10, spd->clk_access, " spd->clk_access, * 10 SDRAM Access from Clock at CL=X *"); printf("%-3d : %02x %s\n", 11, spd->config, " spd->config, * 11 DIMM Configuration type *"); printf("%-3d : %02x %s\n", 12, spd->refresh, " spd->refresh, * 12 Refresh Rate/Type *"); printf("%-3d : %02x %s\n", 13, spd->primw, " spd->primw, * 13 Primary SDRAM Width *"); printf("%-3d : %02x %s\n", 14, spd->ecw, " spd->ecw, * 14 Error Checking SDRAM width *"); printf("%-3d : %02x %s\n", 15, spd->min_delay, " spd->min_delay, * 15 Back to Back Random Access *"); printf("%-3d : %02x %s\n", 16, spd->burstl, " spd->burstl, * 16 Burst Lengths Supported *"); printf("%-3d : %02x %s\n", 17, spd->nbanks, " spd->nbanks, * 17 # of Banks on Each SDRAM Device *"); printf("%-3d : %02x %s\n", 18, spd->cas_lat, " spd->cas_lat, * 18 CAS# Latencies Supported *"); printf("%-3d : %02x %s\n", 19, spd->cs_lat, " spd->cs_lat, * 19 Chip Select Latency *"); printf("%-3d : %02x %s\n", 20, spd->write_lat, " spd->write_lat, * 20 Write Latency/Recovery *"); printf("%-3d : %02x %s\n", 21, spd->mod_attr, " spd->mod_attr, * 21 SDRAM Module Attributes *"); printf("%-3d : %02x %s\n", 22, spd->dev_attr, " spd->dev_attr, * 22 SDRAM Device Attributes *"); printf("%-3d : %02x %s\n", 23, spd->clk_cycle2, " spd->clk_cycle2, * 23 Min SDRAM Cycle time at CL=X-1 *"); printf("%-3d : %02x %s\n", 24, spd->clk_access2, " spd->clk_access2, * 24 SDRAM Access from Clock at CL=X-1 *"); printf("%-3d : %02x %s\n", 25, spd->clk_cycle3, " spd->clk_cycle3, * 25 Min SDRAM Cycle time at CL=X-2 *"); printf("%-3d : %02x %s\n", 26, spd->clk_access3, " spd->clk_access3, * 26 Max Access from Clock at CL=X-2 *"); printf("%-3d : %02x %s\n", 27, spd->trp, " spd->trp, * 27 Min Row Precharge Time (tRP)*"); printf("%-3d : %02x %s\n", 28, spd->trrd, " spd->trrd, * 28 Min Row Active to Row Active (tRRD) *"); printf("%-3d : %02x %s\n", 29, spd->trcd, " spd->trcd, * 29 Min RAS to CAS Delay (tRCD) *"); printf("%-3d : %02x %s\n", 30, spd->tras, " spd->tras, * 30 Minimum RAS Pulse Width (tRAS) *"); printf("%-3d : %02x %s\n", 31, spd->bank_dens, " spd->bank_dens, * 31 Density of each bank on module *"); printf("%-3d : %02x %s\n", 32, spd->ca_setup, " spd->ca_setup, * 32 Cmd + Addr signal input setup time *"); printf("%-3d : %02x %s\n", 33, spd->ca_hold, " spd->ca_hold, * 33 Cmd and Addr signal input hold time *"); printf("%-3d : %02x %s\n", 34, spd->data_setup, " spd->data_setup, * 34 Data signal input setup time *"); printf("%-3d : %02x %s\n", 35, spd->data_hold, " spd->data_hold, * 35 Data signal input hold time *"); printf("%-3d : %02x %s\n", 36, spd->res_36_40[0], " spd->res_36_40[0], * 36 Reserved / tWR *"); printf("%-3d : %02x %s\n", 37, spd->res_36_40[1], " spd->res_36_40[1], * 37 Reserved / tWTR *"); printf("%-3d : %02x %s\n", 38, spd->res_36_40[2], " spd->res_36_40[2], * 38 Reserved / tRTP *"); printf("%-3d : %02x %s\n", 39, spd->res_36_40[3], " spd->res_36_40[3], * 39 Reserved / mem_probe *"); printf("%-3d : %02x %s\n", 40, spd->res_36_40[4], " spd->res_36_40[4], * 40 Reserved / trc,trfc extensions *"); printf("%-3d : %02x %s\n", 41, spd->trc, " spd->trc, * 41 Min Active to Auto refresh time tRC *"); printf("%-3d : %02x %s\n", 42, spd->trfc, " spd->trfc, * 42 Min Auto to Active period tRFC *"); printf("%-3d : %02x %s\n", 43, spd->tckmax, " spd->tckmax, * 43 Max device cycle time tCKmax *"); printf("%-3d : %02x %s\n", 44, spd->tdqsq, " spd->tdqsq, * 44 Max DQS to DQ skew *"); printf("%-3d : %02x %s\n", 45, spd->tqhs, " spd->tqhs, * 45 Max Read DataHold skew tQHS *"); printf("%-3d : %02x %s\n", 46, spd->res_46, " spd->res_46, * 46 Reserved/ PLL Relock time *"); printf("%-3d : %02x %s\n", 47, spd->dimm_height, " spd->dimm_height * 47 SDRAM DIMM Height *"); printf("%-3d-%3d: ", 48, 61); for (i = 0; i < 14; i++) printf("%02x", spd->res_48_61[i]); printf(" * 48-61 IDD in SPD and Reserved space *\n"); printf("%-3d : %02x %s\n", 62, spd->spd_rev, " spd->spd_rev, * 62 SPD Data Revision Code *"); printf("%-3d : %02x %s\n", 63, spd->cksum, " spd->cksum, * 63 Checksum for bytes 0-62 *"); printf("%-3d-%3d: ", 64, 71); for (i = 0; i < 8; i++) printf("%02x", spd->mid[i]); printf("* 64 Mfr's JEDEC ID code per JEP-108E *\n"); printf("%-3d : %02x %s\n", 72, spd->mloc, " spd->mloc, * 72 Manufacturing Location *"); printf("%-3d-%3d: >>", 73, 90); for (i = 0; i < 18; i++) printf("%c", spd->mpart[i]); printf("<<* 73 Manufacturer's Part Number *\n"); printf("%-3d-%3d: %02x %02x %s\n", 91, 92, spd->rev[0], spd->rev[1], "* 91 Revision Code *"); printf("%-3d-%3d: %02x %02x %s\n", 93, 94, spd->mdate[0], spd->mdate[1], "* 93 Manufacturing Date *"); printf("%-3d-%3d: ", 95, 98); for (i = 0; i < 4; i++) printf("%02x", spd->sernum[i]); printf("* 95 Assembly Serial Number *\n"); printf("%-3d-%3d: ", 99, 127); for (i = 0; i < 27; i++) printf("%02x", spd->mspec[i]); printf("* 99 Manufacturer Specific Data *\n"); } #endif #ifdef CONFIG_SYS_FSL_DDR2 void ddr2_spd_dump(const ddr2_spd_eeprom_t *spd) { unsigned int i; printf("%-3d : %02x %s\n", 0, spd->info_size, " spd->info_size, * 0 # bytes written into serial memory *"); printf("%-3d : %02x %s\n", 1, spd->chip_size, " spd->chip_size, * 1 Total # bytes of SPD memory device *"); printf("%-3d : %02x %s\n", 2, spd->mem_type, " spd->mem_type, * 2 Fundamental memory type *"); printf("%-3d : %02x %s\n", 3, spd->nrow_addr, " spd->nrow_addr, * 3 # of Row Addresses on this assembly *"); printf("%-3d : %02x %s\n", 4, spd->ncol_addr, " spd->ncol_addr, * 4 # of Column Addrs on this assembly *"); printf("%-3d : %02x %s\n", 5, spd->mod_ranks, " spd->mod_ranks * 5 # of Module Rows on this assembly *"); printf("%-3d : %02x %s\n", 6, spd->dataw, " spd->dataw, * 6 Data Width of this assembly *"); printf("%-3d : %02x %s\n", 7, spd->res_7, " spd->res_7, * 7 Reserved *"); printf("%-3d : %02x %s\n", 8, spd->voltage, " spd->voltage, * 8 Voltage intf std of this assembly *"); printf("%-3d : %02x %s\n", 9, spd->clk_cycle, " spd->clk_cycle, * 9 SDRAM Cycle time at CL=X *"); printf("%-3d : %02x %s\n", 10, spd->clk_access, " spd->clk_access, * 10 SDRAM Access from Clock at CL=X *"); printf("%-3d : %02x %s\n", 11, spd->config, " spd->config, * 11 DIMM Configuration type *"); printf("%-3d : %02x %s\n", 12, spd->refresh, " spd->refresh, * 12 Refresh Rate/Type *"); printf("%-3d : %02x %s\n", 13, spd->primw, " spd->primw, * 13 Primary SDRAM Width *"); printf("%-3d : %02x %s\n", 14, spd->ecw, " spd->ecw, * 14 Error Checking SDRAM width *"); printf("%-3d : %02x %s\n", 15, spd->res_15, " spd->res_15, * 15 Reserved *"); printf("%-3d : %02x %s\n", 16, spd->burstl, " spd->burstl, * 16 Burst Lengths Supported *"); printf("%-3d : %02x %s\n", 17, spd->nbanks, " spd->nbanks, * 17 # of Banks on Each SDRAM Device *"); printf("%-3d : %02x %s\n", 18, spd->cas_lat, " spd->cas_lat, * 18 CAS# Latencies Supported *"); printf("%-3d : %02x %s\n", 19, spd->mech_char, " spd->mech_char, * 19 Mechanical Characteristics *"); printf("%-3d : %02x %s\n", 20, spd->dimm_type, " spd->dimm_type, * 20 DIMM type *"); printf("%-3d : %02x %s\n", 21, spd->mod_attr, " spd->mod_attr, * 21 SDRAM Module Attributes *"); printf("%-3d : %02x %s\n", 22, spd->dev_attr, " spd->dev_attr, * 22 SDRAM Device Attributes *"); printf("%-3d : %02x %s\n", 23, spd->clk_cycle2, " spd->clk_cycle2, * 23 Min SDRAM Cycle time at CL=X-1 *"); printf("%-3d : %02x %s\n", 24, spd->clk_access2, " spd->clk_access2, * 24 SDRAM Access from Clock at CL=X-1 *"); printf("%-3d : %02x %s\n", 25, spd->clk_cycle3, " spd->clk_cycle3, * 25 Min SDRAM Cycle time at CL=X-2 *"); printf("%-3d : %02x %s\n", 26, spd->clk_access3, " spd->clk_access3, * 26 Max Access from Clock at CL=X-2 *"); printf("%-3d : %02x %s\n", 27, spd->trp, " spd->trp, * 27 Min Row Precharge Time (tRP)*"); printf("%-3d : %02x %s\n", 28, spd->trrd, " spd->trrd, * 28 Min Row Active to Row Active (tRRD) *"); printf("%-3d : %02x %s\n", 29, spd->trcd, " spd->trcd, * 29 Min RAS to CAS Delay (tRCD) *"); printf("%-3d : %02x %s\n", 30, spd->tras, " spd->tras, * 30 Minimum RAS Pulse Width (tRAS) *"); printf("%-3d : %02x %s\n", 31, spd->rank_dens, " spd->rank_dens, * 31 Density of each rank on module *"); printf("%-3d : %02x %s\n", 32, spd->ca_setup, " spd->ca_setup, * 32 Cmd + Addr signal input setup time *"); printf("%-3d : %02x %s\n", 33, spd->ca_hold, " spd->ca_hold, * 33 Cmd and Addr signal input hold time *"); printf("%-3d : %02x %s\n", 34, spd->data_setup, " spd->data_setup, * 34 Data signal input setup time *"); printf("%-3d : %02x %s\n", 35, spd->data_hold, " spd->data_hold, * 35 Data signal input hold time *"); printf("%-3d : %02x %s\n", 36, spd->twr, " spd->twr, * 36 Write Recovery time tWR *"); printf("%-3d : %02x %s\n", 37, spd->twtr, " spd->twtr, * 37 Int write to read delay tWTR *"); printf("%-3d : %02x %s\n", 38, spd->trtp, " spd->trtp, * 38 Int read to precharge delay tRTP *"); printf("%-3d : %02x %s\n", 39, spd->mem_probe, " spd->mem_probe, * 39 Mem analysis probe characteristics *"); printf("%-3d : %02x %s\n", 40, spd->trctrfc_ext, " spd->trctrfc_ext, * 40 Extensions to trc and trfc *"); printf("%-3d : %02x %s\n", 41, spd->trc, " spd->trc, * 41 Min Active to Auto refresh time tRC *"); printf("%-3d : %02x %s\n", 42, spd->trfc, " spd->trfc, * 42 Min Auto to Active period tRFC *"); printf("%-3d : %02x %s\n", 43, spd->tckmax, " spd->tckmax, * 43 Max device cycle time tCKmax *"); printf("%-3d : %02x %s\n", 44, spd->tdqsq, " spd->tdqsq, * 44 Max DQS to DQ skew *"); printf("%-3d : %02x %s\n", 45, spd->tqhs, " spd->tqhs, * 45 Max Read DataHold skew tQHS *"); printf("%-3d : %02x %s\n", 46, spd->pll_relock, " spd->pll_relock, * 46 PLL Relock time *"); printf("%-3d : %02x %s\n", 47, spd->t_casemax, " spd->t_casemax, * 47 t_casemax *"); printf("%-3d : %02x %s\n", 48, spd->psi_ta_dram, " spd->psi_ta_dram, * 48 Thermal Resistance of DRAM Package " "from Top (Case) to Ambient (Psi T-A DRAM) *"); printf("%-3d : %02x %s\n", 49, spd->dt0_mode, " spd->dt0_mode, * 49 DRAM Case Temperature Rise from " "Ambient due to Activate-Precharge/Mode Bits " "(DT0/Mode Bits) *)"); printf("%-3d : %02x %s\n", 50, spd->dt2n_dt2q, " spd->dt2n_dt2q, * 50 DRAM Case Temperature Rise from " "Ambient due to Precharge/Quiet Standby " "(DT2N/DT2Q) *"); printf("%-3d : %02x %s\n", 51, spd->dt2p, " spd->dt2p, * 51 DRAM Case Temperature Rise from " "Ambient due to Precharge Power-Down (DT2P) *"); printf("%-3d : %02x %s\n", 52, spd->dt3n, " spd->dt3n, * 52 DRAM Case Temperature Rise from " "Ambient due to Active Standby (DT3N) *"); printf("%-3d : %02x %s\n", 53, spd->dt3pfast, " spd->dt3pfast, * 53 DRAM Case Temperature Rise from " "Ambient due to Active Power-Down with Fast PDN Exit " "(DT3Pfast) *"); printf("%-3d : %02x %s\n", 54, spd->dt3pslow, " spd->dt3pslow, * 54 DRAM Case Temperature Rise from " "Ambient due to Active Power-Down with Slow PDN Exit " "(DT3Pslow) *"); printf("%-3d : %02x %s\n", 55, spd->dt4r_dt4r4w, " spd->dt4r_dt4r4w, * 55 DRAM Case Temperature Rise from " "Ambient due to Page Open Burst Read/DT4R4W Mode Bit " "(DT4R/DT4R4W Mode Bit) *"); printf("%-3d : %02x %s\n", 56, spd->dt5b, " spd->dt5b, * 56 DRAM Case Temperature Rise from " "Ambient due to Burst Refresh (DT5B) *"); printf("%-3d : %02x %s\n", 57, spd->dt7, " spd->dt7, * 57 DRAM Case Temperature Rise from " "Ambient due to Bank Interleave Reads with " "Auto-Precharge (DT7) *"); printf("%-3d : %02x %s\n", 58, spd->psi_ta_pll, " spd->psi_ta_pll, * 58 Thermal Resistance of PLL Package form" " Top (Case) to Ambient (Psi T-A PLL) *"); printf("%-3d : %02x %s\n", 59, spd->psi_ta_reg, " spd->psi_ta_reg, * 59 Thermal Reisitance of Register Package" " from Top (Case) to Ambient (Psi T-A Register) *"); printf("%-3d : %02x %s\n", 60, spd->dtpllactive, " spd->dtpllactive, * 60 PLL Case Temperature Rise from " "Ambient due to PLL Active (DT PLL Active) *"); printf("%-3d : %02x %s\n", 61, spd->dtregact, " spd->dtregact, " "* 61 Register Case Temperature Rise from Ambient due to " "Register Active/Mode Bit (DT Register Active/Mode Bit) *"); printf("%-3d : %02x %s\n", 62, spd->spd_rev, " spd->spd_rev, * 62 SPD Data Revision Code *"); printf("%-3d : %02x %s\n", 63, spd->cksum, " spd->cksum, * 63 Checksum for bytes 0-62 *"); printf("%-3d-%3d: ", 64, 71); for (i = 0; i < 8; i++) printf("%02x", spd->mid[i]); printf("* 64 Mfr's JEDEC ID code per JEP-108E *\n"); printf("%-3d : %02x %s\n", 72, spd->mloc, " spd->mloc, * 72 Manufacturing Location *"); printf("%-3d-%3d: >>", 73, 90); for (i = 0; i < 18; i++) printf("%c", spd->mpart[i]); printf("<<* 73 Manufacturer's Part Number *\n"); printf("%-3d-%3d: %02x %02x %s\n", 91, 92, spd->rev[0], spd->rev[1], "* 91 Revision Code *"); printf("%-3d-%3d: %02x %02x %s\n", 93, 94, spd->mdate[0], spd->mdate[1], "* 93 Manufacturing Date *"); printf("%-3d-%3d: ", 95, 98); for (i = 0; i < 4; i++) printf("%02x", spd->sernum[i]); printf("* 95 Assembly Serial Number *\n"); printf("%-3d-%3d: ", 99, 127); for (i = 0; i < 27; i++) printf("%02x", spd->mspec[i]); printf("* 99 Manufacturer Specific Data *\n"); } #endif #ifdef CONFIG_SYS_FSL_DDR3 void ddr3_spd_dump(const ddr3_spd_eeprom_t *spd) { unsigned int i; /* General Section: Bytes 0-59 */ #define PRINT_NXS(x, y, z...) printf("%-3d : %02x " z "\n", x, (u8)y); #define PRINT_NNXXS(n0, n1, x0, x1, s) \ printf("%-3d-%3d: %02x %02x " s "\n", n0, n1, x0, x1); PRINT_NXS(0, spd->info_size_crc, "info_size_crc bytes written into serial memory, " "CRC coverage"); PRINT_NXS(1, spd->spd_rev, "spd_rev SPD Revision"); PRINT_NXS(2, spd->mem_type, "mem_type Key Byte / DRAM Device Type"); PRINT_NXS(3, spd->module_type, "module_type Key Byte / Module Type"); PRINT_NXS(4, spd->density_banks, "density_banks SDRAM Density and Banks"); PRINT_NXS(5, spd->addressing, "addressing SDRAM Addressing"); PRINT_NXS(6, spd->module_vdd, "module_vdd Module Nominal Voltage, VDD"); PRINT_NXS(7, spd->organization, "organization Module Organization"); PRINT_NXS(8, spd->bus_width, "bus_width Module Memory Bus Width"); PRINT_NXS(9, spd->ftb_div, "ftb_div Fine Timebase (FTB) Dividend / Divisor"); PRINT_NXS(10, spd->mtb_dividend, "mtb_dividend Medium Timebase (MTB) Dividend"); PRINT_NXS(11, spd->mtb_divisor, "mtb_divisor Medium Timebase (MTB) Divisor"); PRINT_NXS(12, spd->tck_min, "tck_min SDRAM Minimum Cycle Time"); PRINT_NXS(13, spd->res_13, "res_13 Reserved"); PRINT_NXS(14, spd->caslat_lsb, "caslat_lsb CAS Latencies Supported, LSB"); PRINT_NXS(15, spd->caslat_msb, "caslat_msb CAS Latencies Supported, MSB"); PRINT_NXS(16, spd->taa_min, "taa_min Min CAS Latency Time"); PRINT_NXS(17, spd->twr_min, "twr_min Min Write REcovery Time"); PRINT_NXS(18, spd->trcd_min, "trcd_min Min RAS# to CAS# Delay Time"); PRINT_NXS(19, spd->trrd_min, "trrd_min Min Row Active to Row Active Delay Time"); PRINT_NXS(20, spd->trp_min, "trp_min Min Row Precharge Delay Time"); PRINT_NXS(21, spd->tras_trc_ext, "tras_trc_ext Upper Nibbles for tRAS and tRC"); PRINT_NXS(22, spd->tras_min_lsb, "tras_min_lsb Min Active to Precharge Delay Time, LSB"); PRINT_NXS(23, spd->trc_min_lsb, "trc_min_lsb Min Active to Active/Refresh Delay Time, LSB"); PRINT_NXS(24, spd->trfc_min_lsb, "trfc_min_lsb Min Refresh Recovery Delay Time LSB"); PRINT_NXS(25, spd->trfc_min_msb, "trfc_min_msb Min Refresh Recovery Delay Time MSB"); PRINT_NXS(26, spd->twtr_min, "twtr_min Min Internal Write to Read Command Delay Time"); PRINT_NXS(27, spd->trtp_min, "trtp_min " "Min Internal Read to Precharge Command Delay Time"); PRINT_NXS(28, spd->tfaw_msb, "tfaw_msb Upper Nibble for tFAW"); PRINT_NXS(29, spd->tfaw_min, "tfaw_min Min Four Activate Window Delay Time"); PRINT_NXS(30, spd->opt_features, "opt_features SDRAM Optional Features"); PRINT_NXS(31, spd->therm_ref_opt, "therm_ref_opt SDRAM Thermal and Refresh Opts"); PRINT_NXS(32, spd->therm_sensor, "therm_sensor SDRAM Thermal Sensor"); PRINT_NXS(33, spd->device_type, "device_type SDRAM Device Type"); PRINT_NXS(34, spd->fine_tck_min, "fine_tck_min Fine offset for tCKmin"); PRINT_NXS(35, spd->fine_taa_min, "fine_taa_min Fine offset for tAAmin"); PRINT_NXS(36, spd->fine_trcd_min, "fine_trcd_min Fine offset for tRCDmin"); PRINT_NXS(37, spd->fine_trp_min, "fine_trp_min Fine offset for tRPmin"); PRINT_NXS(38, spd->fine_trc_min, "fine_trc_min Fine offset for tRCmin"); printf("%-3d-%3d: ", 39, 59); /* Reserved, General Section */ for (i = 39; i <= 59; i++) printf("%02x ", spd->res_39_59[i - 39]); puts("\n"); switch (spd->module_type) { case 0x02: /* UDIMM */ case 0x03: /* SO-DIMM */ case 0x04: /* Micro-DIMM */ case 0x06: /* Mini-UDIMM */ PRINT_NXS(60, spd->mod_section.unbuffered.mod_height, "mod_height (Unbuffered) Module Nominal Height"); PRINT_NXS(61, spd->mod_section.unbuffered.mod_thickness, "mod_thickness (Unbuffered) Module Maximum Thickness"); PRINT_NXS(62, spd->mod_section.unbuffered.ref_raw_card, "ref_raw_card (Unbuffered) Reference Raw Card Used"); PRINT_NXS(63, spd->mod_section.unbuffered.addr_mapping, "addr_mapping (Unbuffered) Address mapping from " "Edge Connector to DRAM"); break; case 0x01: /* RDIMM */ case 0x05: /* Mini-RDIMM */ PRINT_NXS(60, spd->mod_section.registered.mod_height, "mod_height (Registered) Module Nominal Height"); PRINT_NXS(61, spd->mod_section.registered.mod_thickness, "mod_thickness (Registered) Module Maximum Thickness"); PRINT_NXS(62, spd->mod_section.registered.ref_raw_card, "ref_raw_card (Registered) Reference Raw Card Used"); PRINT_NXS(63, spd->mod_section.registered.modu_attr, "modu_attr (Registered) DIMM Module Attributes"); PRINT_NXS(64, spd->mod_section.registered.thermal, "thermal (Registered) Thermal Heat " "Spreader Solution"); PRINT_NXS(65, spd->mod_section.registered.reg_id_lo, "reg_id_lo (Registered) Register Manufacturer ID " "Code, LSB"); PRINT_NXS(66, spd->mod_section.registered.reg_id_hi, "reg_id_hi (Registered) Register Manufacturer ID " "Code, MSB"); PRINT_NXS(67, spd->mod_section.registered.reg_rev, "reg_rev (Registered) Register " "Revision Number"); PRINT_NXS(68, spd->mod_section.registered.reg_type, "reg_type (Registered) Register Type"); for (i = 69; i <= 76; i++) { printf("%-3d : %02x rcw[%d]\n", i, spd->mod_section.registered.rcw[i-69], i-69); } break; default: /* Module-specific Section, Unsupported Module Type */ printf("%-3d-%3d: ", 60, 116); for (i = 60; i <= 116; i++) printf("%02x", spd->mod_section.uc[i - 60]); break; } /* Unique Module ID: Bytes 117-125 */ PRINT_NXS(117, spd->mmid_lsb, "Module MfgID Code LSB - JEP-106"); PRINT_NXS(118, spd->mmid_msb, "Module MfgID Code MSB - JEP-106"); PRINT_NXS(119, spd->mloc, "Mfg Location"); PRINT_NNXXS(120, 121, spd->mdate[0], spd->mdate[1], "Mfg Date"); printf("%-3d-%3d: ", 122, 125); for (i = 122; i <= 125; i++) printf("%02x ", spd->sernum[i - 122]); printf(" Module Serial Number\n"); /* CRC: Bytes 126-127 */ PRINT_NNXXS(126, 127, spd->crc[0], spd->crc[1], " SPD CRC"); /* Other Manufacturer Fields and User Space: Bytes 128-255 */ printf("%-3d-%3d: ", 128, 145); for (i = 128; i <= 145; i++) printf("%02x ", spd->mpart[i - 128]); printf(" Mfg's Module Part Number\n"); PRINT_NNXXS(146, 147, spd->mrev[0], spd->mrev[1], "Module Revision code"); PRINT_NXS(148, spd->dmid_lsb, "DRAM MfgID Code LSB - JEP-106"); PRINT_NXS(149, spd->dmid_msb, "DRAM MfgID Code MSB - JEP-106"); printf("%-3d-%3d: ", 150, 175); for (i = 150; i <= 175; i++) printf("%02x ", spd->msd[i - 150]); printf(" Mfg's Specific Data\n"); printf("%-3d-%3d: ", 176, 255); for (i = 176; i <= 255; i++) printf("%02x", spd->cust[i - 176]); printf(" Mfg's Specific Data\n"); } #endif #ifdef CONFIG_SYS_FSL_DDR4 void ddr4_spd_dump(const struct ddr4_spd_eeprom_s *spd) { unsigned int i; /* General Section: Bytes 0-127 */ #define PRINT_NXS(x, y, z...) printf("%-3d : %02x " z "\n", x, (u8)y); #define PRINT_NNXXS(n0, n1, x0, x1, s) \ printf("%-3d-%3d: %02x %02x " s "\n", n0, n1, x0, x1); PRINT_NXS(0, spd->info_size_crc, "info_size_crc bytes written into serial memory, CRC coverage"); PRINT_NXS(1, spd->spd_rev, "spd_rev SPD Revision"); PRINT_NXS(2, spd->mem_type, "mem_type Key Byte / DRAM Device Type"); PRINT_NXS(3, spd->module_type, "module_type Key Byte / Module Type"); PRINT_NXS(4, spd->density_banks, "density_banks SDRAM Density and Banks"); PRINT_NXS(5, spd->addressing, "addressing SDRAM Addressing"); PRINT_NXS(6, spd->package_type, "package_type Package type"); PRINT_NXS(7, spd->opt_feature, "opt_feature Optional features"); PRINT_NXS(8, spd->thermal_ref, "thermal_ref Thermal and Refresh options"); PRINT_NXS(9, spd->oth_opt_features, "oth_opt_features Other SDRAM optional features"); PRINT_NXS(10, spd->res_10, "res_10 Reserved"); PRINT_NXS(11, spd->module_vdd, "module_vdd Module Nominal Voltage, VDD"); PRINT_NXS(12, spd->organization, "organization Module Organization"); PRINT_NXS(13, spd->bus_width, "bus_width Module Memory Bus Width"); PRINT_NXS(14, spd->therm_sensor, "therm_sensor Module Thermal Sensor"); PRINT_NXS(15, spd->ext_type, "ext_type Extended module type"); PRINT_NXS(16, spd->res_16, "res_16 Reserved"); PRINT_NXS(17, spd->timebases, "timebases MTb and FTB"); PRINT_NXS(18, spd->tck_min, "tck_min tCKAVGmin"); PRINT_NXS(19, spd->tck_max, "tck_max TCKAVGmax"); PRINT_NXS(20, spd->caslat_b1, "caslat_b1 CAS latencies, 1st byte"); PRINT_NXS(21, spd->caslat_b2, "caslat_b2 CAS latencies, 2nd byte"); PRINT_NXS(22, spd->caslat_b3, "caslat_b3 CAS latencies, 3rd byte "); PRINT_NXS(23, spd->caslat_b4, "caslat_b4 CAS latencies, 4th byte"); PRINT_NXS(24, spd->taa_min, "taa_min Min CAS Latency Time"); PRINT_NXS(25, spd->trcd_min, "trcd_min Min RAS# to CAS# Delay Time"); PRINT_NXS(26, spd->trp_min, "trp_min Min Row Precharge Delay Time"); PRINT_NXS(27, spd->tras_trc_ext, "tras_trc_ext Upper Nibbles for tRAS and tRC"); PRINT_NXS(28, spd->tras_min_lsb, "tras_min_lsb tRASmin, lsb"); PRINT_NXS(29, spd->trc_min_lsb, "trc_min_lsb tRCmin, lsb"); PRINT_NXS(30, spd->trfc1_min_lsb, "trfc1_min_lsb Min Refresh Recovery Delay Time, LSB"); PRINT_NXS(31, spd->trfc1_min_msb, "trfc1_min_msb Min Refresh Recovery Delay Time, MSB "); PRINT_NXS(32, spd->trfc2_min_lsb, "trfc2_min_lsb Min Refresh Recovery Delay Time, LSB"); PRINT_NXS(33, spd->trfc2_min_msb, "trfc2_min_msb Min Refresh Recovery Delay Time, MSB"); PRINT_NXS(34, spd->trfc4_min_lsb, "trfc4_min_lsb Min Refresh Recovery Delay Time, LSB"); PRINT_NXS(35, spd->trfc4_min_msb, "trfc4_min_msb Min Refresh Recovery Delay Time, MSB"); PRINT_NXS(36, spd->tfaw_msb, "tfaw_msb Upper Nibble for tFAW"); PRINT_NXS(37, spd->tfaw_min, "tfaw_min tFAW, lsb"); PRINT_NXS(38, spd->trrds_min, "trrds_min tRRD_Smin, MTB"); PRINT_NXS(39, spd->trrdl_min, "trrdl_min tRRD_Lmin, MTB"); PRINT_NXS(40, spd->tccdl_min, "tccdl_min tCCS_Lmin, MTB"); printf("%-3d-%3d: ", 41, 59); /* Reserved, General Section */ for (i = 41; i <= 59; i++) printf("%02x ", spd->res_41[i - 41]); puts("\n"); printf("%-3d-%3d: ", 60, 77); for (i = 60; i <= 77; i++) printf("%02x ", spd->mapping[i - 60]); puts(" mapping[] Connector to SDRAM bit map\n"); PRINT_NXS(117, spd->fine_tccdl_min, "fine_tccdl_min Fine offset for tCCD_Lmin"); PRINT_NXS(118, spd->fine_trrdl_min, "fine_trrdl_min Fine offset for tRRD_Lmin"); PRINT_NXS(119, spd->fine_trrds_min, "fine_trrds_min Fine offset for tRRD_Smin"); PRINT_NXS(120, spd->fine_trc_min, "fine_trc_min Fine offset for tRCmin"); PRINT_NXS(121, spd->fine_trp_min, "fine_trp_min Fine offset for tRPmin"); PRINT_NXS(122, spd->fine_trcd_min, "fine_trcd_min Fine offset for tRCDmin"); PRINT_NXS(123, spd->fine_taa_min, "fine_taa_min Fine offset for tAAmin"); PRINT_NXS(124, spd->fine_tck_max, "fine_tck_max Fine offset for tCKAVGmax"); PRINT_NXS(125, spd->fine_tck_min, "fine_tck_min Fine offset for tCKAVGmin"); /* CRC: Bytes 126-127 */ PRINT_NNXXS(126, 127, spd->crc[0], spd->crc[1], " SPD CRC"); switch (spd->module_type) { case 0x02: /* UDIMM */ case 0x03: /* SO-DIMM */ PRINT_NXS(128, spd->mod_section.unbuffered.mod_height, "mod_height (Unbuffered) Module Nominal Height"); PRINT_NXS(129, spd->mod_section.unbuffered.mod_thickness, "mod_thickness (Unbuffered) Module Maximum Thickness"); PRINT_NXS(130, spd->mod_section.unbuffered.ref_raw_card, "ref_raw_card (Unbuffered) Reference Raw Card Used"); PRINT_NXS(131, spd->mod_section.unbuffered.addr_mapping, "addr_mapping (Unbuffered) Address mapping from Edge Connector to DRAM"); PRINT_NNXXS(254, 255, spd->mod_section.unbuffered.crc[0], spd->mod_section.unbuffered.crc[1], " Module CRC"); break; case 0x01: /* RDIMM */ PRINT_NXS(128, spd->mod_section.registered.mod_height, "mod_height (Registered) Module Nominal Height"); PRINT_NXS(129, spd->mod_section.registered.mod_thickness, "mod_thickness (Registered) Module Maximum Thickness"); PRINT_NXS(130, spd->mod_section.registered.ref_raw_card, "ref_raw_card (Registered) Reference Raw Card Used"); PRINT_NXS(131, spd->mod_section.registered.modu_attr, "modu_attr (Registered) DIMM Module Attributes"); PRINT_NXS(132, spd->mod_section.registered.thermal, "thermal (Registered) Thermal Heat Spreader Solution"); PRINT_NXS(133, spd->mod_section.registered.reg_id_lo, "reg_id_lo (Registered) Register Manufacturer ID Code, LSB"); PRINT_NXS(134, spd->mod_section.registered.reg_id_hi, "reg_id_hi (Registered) Register Manufacturer ID Code, MSB"); PRINT_NXS(135, spd->mod_section.registered.reg_rev, "reg_rev (Registered) Register Revision Number"); PRINT_NXS(136, spd->mod_section.registered.reg_map, "reg_map (Registered) Address mapping"); PRINT_NNXXS(254, 255, spd->mod_section.registered.crc[0], spd->mod_section.registered.crc[1], " Module CRC"); break; case 0x04: /* LRDIMM */ PRINT_NXS(128, spd->mod_section.loadreduced.mod_height, "mod_height (Loadreduced) Module Nominal Height"); PRINT_NXS(129, spd->mod_section.loadreduced.mod_thickness, "mod_thickness (Loadreduced) Module Maximum Thickness"); PRINT_NXS(130, spd->mod_section.loadreduced.ref_raw_card, "ref_raw_card (Loadreduced) Reference Raw Card Used"); PRINT_NXS(131, spd->mod_section.loadreduced.modu_attr, "modu_attr (Loadreduced) DIMM Module Attributes"); PRINT_NXS(132, spd->mod_section.loadreduced.thermal, "thermal (Loadreduced) Thermal Heat Spreader Solution"); PRINT_NXS(133, spd->mod_section.loadreduced.reg_id_lo, "reg_id_lo (Loadreduced) Register Manufacturer ID Code, LSB"); PRINT_NXS(134, spd->mod_section.loadreduced.reg_id_hi, "reg_id_hi (Loadreduced) Register Manufacturer ID Code, MSB"); PRINT_NXS(135, spd->mod_section.loadreduced.reg_rev, "reg_rev (Loadreduced) Register Revision Number"); PRINT_NXS(136, spd->mod_section.loadreduced.reg_map, "reg_map (Loadreduced) Address mapping"); PRINT_NXS(137, spd->mod_section.loadreduced.reg_drv, "reg_drv (Loadreduced) Reg output drive strength"); PRINT_NXS(138, spd->mod_section.loadreduced.reg_drv_ck, "reg_drv_ck (Loadreduced) Reg output drive strength for CK"); PRINT_NXS(139, spd->mod_section.loadreduced.data_buf_rev, "data_buf_rev (Loadreduced) Data Buffer Revision Numbe"); PRINT_NXS(140, spd->mod_section.loadreduced.vrefqe_r0, "vrefqe_r0 (Loadreduced) DRAM VrefDQ for Package Rank 0"); PRINT_NXS(141, spd->mod_section.loadreduced.vrefqe_r1, "vrefqe_r1 (Loadreduced) DRAM VrefDQ for Package Rank 1"); PRINT_NXS(142, spd->mod_section.loadreduced.vrefqe_r2, "vrefqe_r2 (Loadreduced) DRAM VrefDQ for Package Rank 2"); PRINT_NXS(143, spd->mod_section.loadreduced.vrefqe_r3, "vrefqe_r3 (Loadreduced) DRAM VrefDQ for Package Rank 3"); PRINT_NXS(144, spd->mod_section.loadreduced.data_intf, "data_intf (Loadreduced) Data Buffer VrefDQ for DRAM Interface"); PRINT_NXS(145, spd->mod_section.loadreduced.data_drv_1866, "data_drv_1866 (Loadreduced) Data Buffer MDQ Drive Strength and RTT"); PRINT_NXS(146, spd->mod_section.loadreduced.data_drv_2400, "data_drv_2400 (Loadreduced) Data Buffer MDQ Drive Strength and RTT"); PRINT_NXS(147, spd->mod_section.loadreduced.data_drv_3200, "data_drv_3200 (Loadreduced) Data Buffer MDQ Drive Strength and RTT"); PRINT_NXS(148, spd->mod_section.loadreduced.dram_drv, "dram_drv (Loadreduced) DRAM Drive Strength"); PRINT_NXS(149, spd->mod_section.loadreduced.dram_odt_1866, "dram_odt_1866 (Loadreduced) DRAM ODT (RTT_WR, RTT_NOM)"); PRINT_NXS(150, spd->mod_section.loadreduced.dram_odt_2400, "dram_odt_2400 (Loadreduced) DRAM ODT (RTT_WR, RTT_NOM)"); PRINT_NXS(151, spd->mod_section.loadreduced.dram_odt_3200, "dram_odt_3200 (Loadreduced) DRAM ODT (RTT_WR, RTT_NOM)"); PRINT_NXS(152, spd->mod_section.loadreduced.dram_odt_park_1866, "dram_odt_park_1866 (Loadreduced) DRAM ODT (RTT_PARK)"); PRINT_NXS(153, spd->mod_section.loadreduced.dram_odt_park_2400, "dram_odt_park_2400 (Loadreduced) DRAM ODT (RTT_PARK)"); PRINT_NXS(154, spd->mod_section.loadreduced.dram_odt_park_3200, "dram_odt_park_3200 (Loadreduced) DRAM ODT (RTT_PARK)"); PRINT_NNXXS(254, 255, spd->mod_section.loadreduced.crc[0], spd->mod_section.loadreduced.crc[1], " Module CRC"); break; default: /* Module-specific Section, Unsupported Module Type */ printf("%-3d-%3d: ", 128, 255); for (i = 128; i <= 255; i++) printf("%02x", spd->mod_section.uc[i - 128]); break; } /* Unique Module ID: Bytes 320-383 */ PRINT_NXS(320, spd->mmid_lsb, "Module MfgID Code LSB - JEP-106"); PRINT_NXS(321, spd->mmid_msb, "Module MfgID Code MSB - JEP-106"); PRINT_NXS(322, spd->mloc, "Mfg Location"); PRINT_NNXXS(323, 324, spd->mdate[0], spd->mdate[1], "Mfg Date"); printf("%-3d-%3d: ", 325, 328); for (i = 325; i <= 328; i++) printf("%02x ", spd->sernum[i - 325]); printf(" Module Serial Number\n"); printf("%-3d-%3d: ", 329, 348); for (i = 329; i <= 348; i++) printf("%02x ", spd->mpart[i - 329]); printf(" Mfg's Module Part Number\n"); PRINT_NXS(349, spd->mrev, "Module Revision code"); PRINT_NXS(350, spd->dmid_lsb, "DRAM MfgID Code LSB - JEP-106"); PRINT_NXS(351, spd->dmid_msb, "DRAM MfgID Code MSB - JEP-106"); PRINT_NXS(352, spd->stepping, "DRAM stepping"); printf("%-3d-%3d: ", 353, 381); for (i = 353; i <= 381; i++) printf("%02x ", spd->msd[i - 353]); printf(" Mfg's Specific Data\n"); } #endif static inline void generic_spd_dump(const generic_spd_eeprom_t *spd) { #if defined(CONFIG_SYS_FSL_DDR1) ddr1_spd_dump(spd); #elif defined(CONFIG_SYS_FSL_DDR2) ddr2_spd_dump(spd); #elif defined(CONFIG_SYS_FSL_DDR3) ddr3_spd_dump(spd); #elif defined(CONFIG_SYS_FSL_DDR4) ddr4_spd_dump(spd); #endif } static void fsl_ddr_printinfo(const fsl_ddr_info_t *pinfo, unsigned int ctrl_mask, unsigned int dimm_mask, unsigned int do_mask) { unsigned int i, j, retval; /* STEP 1: DIMM SPD data */ if (do_mask & STEP_GET_SPD) { for (i = 0; i < CONFIG_SYS_NUM_DDR_CTLRS; i++) { if (!(ctrl_mask & (1 << i))) continue; for (j = 0; j < CONFIG_DIMM_SLOTS_PER_CTLR; j++) { if (!(dimm_mask & (1 << j))) continue; printf("SPD info: Controller=%u " "DIMM=%u\n", i, j); generic_spd_dump( &(pinfo->spd_installed_dimms[i][j])); printf("\n"); } printf("\n"); } printf("\n"); } /* STEP 2: DIMM Parameters */ if (do_mask & STEP_COMPUTE_DIMM_PARMS) { for (i = 0; i < CONFIG_SYS_NUM_DDR_CTLRS; i++) { if (!(ctrl_mask & (1 << i))) continue; for (j = 0; j < CONFIG_DIMM_SLOTS_PER_CTLR; j++) { if (!(dimm_mask & (1 << j))) continue; printf("DIMM parameters: Controller=%u " "DIMM=%u\n", i, j); print_dimm_parameters( &(pinfo->dimm_params[i][j])); printf("\n"); } printf("\n"); } printf("\n"); } /* STEP 3: Common Parameters */ if (do_mask & STEP_COMPUTE_COMMON_PARMS) { for (i = 0; i < CONFIG_SYS_NUM_DDR_CTLRS; i++) { if (!(ctrl_mask & (1 << i))) continue; printf("\"lowest common\" DIMM parameters: " "Controller=%u\n", i); print_lowest_common_dimm_parameters( &pinfo->common_timing_params[i]); printf("\n"); } printf("\n"); } /* STEP 4: User Configuration Options */ if (do_mask & STEP_GATHER_OPTS) { for (i = 0; i < CONFIG_SYS_NUM_DDR_CTLRS; i++) { if (!(ctrl_mask & (1 << i))) continue; printf("User Config Options: Controller=%u\n", i); print_memctl_options(&pinfo->memctl_opts[i]); printf("\n"); } printf("\n"); } /* STEP 5: Address assignment */ if (do_mask & STEP_ASSIGN_ADDRESSES) { for (i = 0; i < CONFIG_SYS_NUM_DDR_CTLRS; i++) { if (!(ctrl_mask & (1 << i))) continue; for (j = 0; j < CONFIG_DIMM_SLOTS_PER_CTLR; j++) { printf("Address Assignment: Controller=%u " "DIMM=%u\n", i, j); printf("Don't have this functionality yet\n"); } printf("\n"); } printf("\n"); } /* STEP 6: computed controller register values */ if (do_mask & STEP_COMPUTE_REGS) { for (i = 0; i < CONFIG_SYS_NUM_DDR_CTLRS; i++) { if (!(ctrl_mask & (1 << i))) continue; printf("Computed Register Values: Controller=%u\n", i); print_fsl_memctl_config_regs( &pinfo->fsl_ddr_config_reg[i]); retval = check_fsl_memctl_config_regs( &pinfo->fsl_ddr_config_reg[i]); if (retval) { printf("check_fsl_memctl_config_regs " "result = %u\n", retval); } printf("\n"); } printf("\n"); } } struct data_strings { const char *data_name; unsigned int step_mask; unsigned int dimm_number_required; }; #define DATA_OPTIONS(name, step, dimm) {#name, step, dimm} static unsigned int fsl_ddr_parse_interactive_cmd( char **argv, int argc, unsigned int *pstep_mask, unsigned int *pctlr_mask, unsigned int *pdimm_mask, unsigned int *pdimm_number_required ) { static const struct data_strings options[] = { DATA_OPTIONS(spd, STEP_GET_SPD, 1), DATA_OPTIONS(dimmparms, STEP_COMPUTE_DIMM_PARMS, 1), DATA_OPTIONS(commonparms, STEP_COMPUTE_COMMON_PARMS, 0), DATA_OPTIONS(opts, STEP_GATHER_OPTS, 0), DATA_OPTIONS(addresses, STEP_ASSIGN_ADDRESSES, 0), DATA_OPTIONS(regs, STEP_COMPUTE_REGS, 0), }; static const unsigned int n_opts = ARRAY_SIZE(options); unsigned int i, j; unsigned int error = 0; for (i = 1; i < argc; i++) { unsigned int matched = 0; for (j = 0; j < n_opts; j++) { if (strcmp(options[j].data_name, argv[i]) != 0) continue; *pstep_mask |= options[j].step_mask; *pdimm_number_required = options[j].dimm_number_required; matched = 1; break; } if (matched) continue; if (argv[i][0] == 'c') { char c = argv[i][1]; if (isdigit(c)) *pctlr_mask |= 1 << (c - '0'); continue; } if (argv[i][0] == 'd') { char c = argv[i][1]; if (isdigit(c)) *pdimm_mask |= 1 << (c - '0'); continue; } printf("unknown arg %s\n", argv[i]); *pstep_mask = 0; error = 1; break; } return error; } int fsl_ddr_interactive_env_var_exists(void) { char buffer[CONFIG_SYS_CBSIZE]; if (getenv_f("ddr_interactive", buffer, CONFIG_SYS_CBSIZE) >= 0) return 1; return 0; } unsigned long long fsl_ddr_interactive(fsl_ddr_info_t *pinfo, int var_is_set) { unsigned long long ddrsize; const char *prompt = "FSL DDR>"; char buffer[CONFIG_SYS_CBSIZE]; char buffer2[CONFIG_SYS_CBSIZE]; char *p = NULL; char *argv[CONFIG_SYS_MAXARGS + 1]; /* NULL terminated */ int argc; unsigned int next_step = STEP_GET_SPD; const char *usage = { "commands:\n" "print print SPD and intermediate computed data\n" "reset reboot machine\n" "recompute reload SPD and options to default and recompute regs\n" "edit modify spd, parameter, or option\n" "compute recompute registers from current next_step to end\n" "copy copy parameters\n" "next_step shows current next_step\n" "help this message\n" "go program the memory controller and continue with u-boot\n" }; if (var_is_set) { if (getenv_f("ddr_interactive", buffer2, CONFIG_SYS_CBSIZE) > 0) { p = buffer2; } else { var_is_set = 0; } } /* * The strategy for next_step is that it points to the next * step in the computation process that needs to be done. */ while (1) { if (var_is_set) { char *pend = strchr(p, ';'); if (pend) { /* found command separator, copy sub-command */ *pend = '\0'; strcpy(buffer, p); p = pend + 1; } else { /* separator not found, copy whole string */ strcpy(buffer, p); p = NULL; var_is_set = 0; } } else { /* * No need to worry for buffer overflow here in * this function; cli_readline() maxes out at * CFG_CBSIZE */ cli_readline_into_buffer(prompt, buffer, 0); } argc = cli_simple_parse_line(buffer, argv); if (argc == 0) continue; if (strcmp(argv[0], "help") == 0) { puts(usage); continue; } if (strcmp(argv[0], "next_step") == 0) { printf("next_step = 0x%02X (%s)\n", next_step, step_to_string(next_step)); continue; } if (strcmp(argv[0], "copy") == 0) { unsigned int error = 0; unsigned int step_mask = 0; unsigned int src_ctlr_mask = 0; unsigned int src_dimm_mask = 0; unsigned int dimm_number_required = 0; unsigned int src_ctlr_num = 0; unsigned int src_dimm_num = 0; unsigned int dst_ctlr_num = -1; unsigned int dst_dimm_num = -1; unsigned int i, num_dest_parms; if (argc == 1) { printf("copy <src c#> <src d#> <spd|dimmparms|commonparms|opts|addresses|regs> <dst c#> <dst d#>\n"); continue; } error = fsl_ddr_parse_interactive_cmd( argv, argc, &step_mask, &src_ctlr_mask, &src_dimm_mask, &dimm_number_required ); /* XXX: only dimm_number_required and step_mask will be used by this function. Parse the controller and DIMM number separately because it is easier. */ if (error) continue; /* parse source destination controller / DIMM */ num_dest_parms = dimm_number_required ? 2 : 1; for (i = 0; i < argc; i++) { if (argv[i][0] == 'c') { char c = argv[i][1]; if (isdigit(c)) { src_ctlr_num = (c - '0'); break; } } } for (i = 0; i < argc; i++) { if (argv[i][0] == 'd') { char c = argv[i][1]; if (isdigit(c)) { src_dimm_num = (c - '0'); break; } } } /* parse destination controller / DIMM */ for (i = argc - 1; i >= argc - num_dest_parms; i--) { if (argv[i][0] == 'c') { char c = argv[i][1]; if (isdigit(c)) { dst_ctlr_num = (c - '0'); break; } } } for (i = argc - 1; i >= argc - num_dest_parms; i--) { if (argv[i][0] == 'd') { char c = argv[i][1]; if (isdigit(c)) { dst_dimm_num = (c - '0'); break; } } } /* TODO: validate inputs */ debug("src_ctlr_num = %u, src_dimm_num = %u, dst_ctlr_num = %u, dst_dimm_num = %u, step_mask = %x\n", src_ctlr_num, src_dimm_num, dst_ctlr_num, dst_dimm_num, step_mask); switch (step_mask) { case STEP_GET_SPD: memcpy(&(pinfo->spd_installed_dimms[dst_ctlr_num][dst_dimm_num]), &(pinfo->spd_installed_dimms[src_ctlr_num][src_dimm_num]), sizeof(pinfo->spd_installed_dimms[0][0])); break; case STEP_COMPUTE_DIMM_PARMS: memcpy(&(pinfo->dimm_params[dst_ctlr_num][dst_dimm_num]), &(pinfo->dimm_params[src_ctlr_num][src_dimm_num]), sizeof(pinfo->dimm_params[0][0])); break; case STEP_COMPUTE_COMMON_PARMS: memcpy(&(pinfo->common_timing_params[dst_ctlr_num]), &(pinfo->common_timing_params[src_ctlr_num]), sizeof(pinfo->common_timing_params[0])); break; case STEP_GATHER_OPTS: memcpy(&(pinfo->memctl_opts[dst_ctlr_num]), &(pinfo->memctl_opts[src_ctlr_num]), sizeof(pinfo->memctl_opts[0])); break; /* someday be able to have addresses to copy addresses... */ case STEP_COMPUTE_REGS: memcpy(&(pinfo->fsl_ddr_config_reg[dst_ctlr_num]), &(pinfo->fsl_ddr_config_reg[src_ctlr_num]), sizeof(pinfo->memctl_opts[0])); break; default: printf("unexpected step_mask value\n"); } continue; } if (strcmp(argv[0], "edit") == 0) { unsigned int error = 0; unsigned int step_mask = 0; unsigned int ctlr_mask = 0; unsigned int dimm_mask = 0; char *p_element = NULL; char *p_value = NULL; unsigned int dimm_number_required = 0; unsigned int ctrl_num; unsigned int dimm_num; if (argc == 1) { /* Only the element and value must be last */ printf("edit <c#> <d#> " "<spd|dimmparms|commonparms|opts|" "addresses|regs> <element> <value>\n"); printf("for spd, specify byte number for " "element\n"); continue; } error = fsl_ddr_parse_interactive_cmd( argv, argc - 2, &step_mask, &ctlr_mask, &dimm_mask, &dimm_number_required ); if (error) continue; /* Check arguments */ /* ERROR: If no steps were found */ if (step_mask == 0) { printf("Error: No valid steps were specified " "in argument.\n"); continue; } /* ERROR: If multiple steps were found */ if (step_mask & (step_mask - 1)) { printf("Error: Multiple steps specified in " "argument.\n"); continue; } /* ERROR: Controller not specified */ if (ctlr_mask == 0) { printf("Error: controller number not " "specified or no element and " "value specified\n"); continue; } if (ctlr_mask & (ctlr_mask - 1)) { printf("Error: multiple controllers " "specified, %X\n", ctlr_mask); continue; } /* ERROR: DIMM number not specified */ if (dimm_number_required && dimm_mask == 0) { printf("Error: DIMM number number not " "specified or no element and " "value specified\n"); continue; } if (dimm_mask & (dimm_mask - 1)) { printf("Error: multipled DIMMs specified\n"); continue; } p_element = argv[argc - 2]; p_value = argv[argc - 1]; ctrl_num = __ilog2(ctlr_mask); dimm_num = __ilog2(dimm_mask); switch (step_mask) { case STEP_GET_SPD: { unsigned int element_num; unsigned int value; element_num = simple_strtoul(p_element, NULL, 0); value = simple_strtoul(p_value, NULL, 0); fsl_ddr_spd_edit(pinfo, ctrl_num, dimm_num, element_num, value); next_step = STEP_COMPUTE_DIMM_PARMS; } break; case STEP_COMPUTE_DIMM_PARMS: fsl_ddr_dimm_parameters_edit( pinfo, ctrl_num, dimm_num, p_element, p_value); next_step = STEP_COMPUTE_COMMON_PARMS; break; case STEP_COMPUTE_COMMON_PARMS: lowest_common_dimm_parameters_edit(pinfo, ctrl_num, p_element, p_value); next_step = STEP_GATHER_OPTS; break; case STEP_GATHER_OPTS: fsl_ddr_options_edit(pinfo, ctrl_num, p_element, p_value); next_step = STEP_ASSIGN_ADDRESSES; break; case STEP_ASSIGN_ADDRESSES: printf("editing of address assignment " "not yet implemented\n"); break; case STEP_COMPUTE_REGS: { fsl_ddr_regs_edit(pinfo, ctrl_num, p_element, p_value); next_step = STEP_PROGRAM_REGS; } break; default: printf("programming error\n"); while (1) ; break; } continue; } if (strcmp(argv[0], "reset") == 0) { /* * Reboot machine. * Args don't seem to matter because this * doesn't return */ do_reset(NULL, 0, 0, NULL); printf("Reset didn't work\n"); } if (strcmp(argv[0], "recompute") == 0) { /* * Recalculate everything, starting with * loading SPD EEPROM from DIMMs */ next_step = STEP_GET_SPD; ddrsize = fsl_ddr_compute(pinfo, next_step, 0); continue; } if (strcmp(argv[0], "compute") == 0) { /* * Compute rest of steps starting at * the current next_step/ */ ddrsize = fsl_ddr_compute(pinfo, next_step, 0); continue; } if (strcmp(argv[0], "print") == 0) { unsigned int error = 0; unsigned int step_mask = 0; unsigned int ctlr_mask = 0; unsigned int dimm_mask = 0; unsigned int dimm_number_required = 0; if (argc == 1) { printf("print [c<n>] [d<n>] [spd] [dimmparms] " "[commonparms] [opts] [addresses] [regs]\n"); continue; } error = fsl_ddr_parse_interactive_cmd( argv, argc, &step_mask, &ctlr_mask, &dimm_mask, &dimm_number_required ); if (error) continue; /* If no particular controller was found, print all */ if (ctlr_mask == 0) ctlr_mask = 0xFF; /* If no particular dimm was found, print all dimms. */ if (dimm_mask == 0) dimm_mask = 0xFF; /* If no steps were found, print all steps. */ if (step_mask == 0) step_mask = STEP_ALL; fsl_ddr_printinfo(pinfo, ctlr_mask, dimm_mask, step_mask); continue; } if (strcmp(argv[0], "go") == 0) { if (next_step) ddrsize = fsl_ddr_compute(pinfo, next_step, 0); break; } printf("unknown command %s\n", argv[0]); } debug("end of memory = %llu\n", (u64)ddrsize); return ddrsize; }
gpl-3.0
IamManchanda/creative-bootstrap
_includes/css/creative.css
10600
/*! * Start Bootstrap - Creative Bootstrap Theme (http://startbootstrap.com) * Code licensed under the Apache License v2.0. * For details, see http://www.apache.org/licenses/LICENSE-2.0. */ html, body { width: 100%; height: 100%; } body { font-family: Merriweather,'Helvetica Neue',Arial,sans-serif; } hr { max-width: 50px; border-color: #f05f40; border-width: 3px; } hr.light { border-color: #fff; } a { color: #f05f40; -webkit-transition: all .35s; -moz-transition: all .35s; transition: all .35s; } a:hover, a:focus { color: #eb3812; } h1, h2, h3, h4, h5, h6 { font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif; } p { margin-bottom: 20px; font-size: 16px; line-height: 1.5; } .bg-primary { background-color: #f05f40; } .bg-dark { color: #fff; background-color: #222; } .text-faded { color: rgba(255,255,255,.7); } section { padding: 100px 0; } aside { padding: 50px 0; } .no-padding { padding: 0; } .navbar-default { border-color: rgba(34,34,34,.05); font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif; background-color: #fff; -webkit-transition: all .35s; -moz-transition: all .35s; transition: all .35s; } .navbar-default .navbar-header .navbar-brand { text-transform: uppercase; font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif; font-weight: 700; color: #f05f40; } .navbar-default .navbar-header .navbar-brand:hover, .navbar-default .navbar-header .navbar-brand:focus { color: #eb3812; } .navbar-default .nav > li>a, .navbar-default .nav>li>a:focus { text-transform: uppercase; font-size: 13px; font-weight: 700; color: #222; } .navbar-default .nav > li>a:hover, .navbar-default .nav>li>a:focus:hover { color: #f05f40; } .navbar-default .nav > li.active>a, .navbar-default .nav>li.active>a:focus { color: #f05f40!important; background-color: transparent; } .navbar-default .nav > li.active>a:hover, .navbar-default .nav>li.active>a:focus:hover { background-color: transparent; } @media(min-width:768px) { .navbar-default { border-color: rgba(255,255,255,.3); background-color: transparent; } .navbar-default .navbar-header .navbar-brand { color: rgba(255,255,255,.7); } .navbar-default .navbar-header .navbar-brand:hover, .navbar-default .navbar-header .navbar-brand:focus { color: #fff; } .navbar-default .nav > li>a, .navbar-default .nav>li>a:focus { color: rgba(255,255,255,.7); } .navbar-default .nav > li>a:hover, .navbar-default .nav>li>a:focus:hover { color: #fff; } .navbar-default.affix { border-color: rgba(34,34,34,.05); background-color: #fff; } .navbar-default.affix .navbar-header .navbar-brand { font-size: 14px; color: #f05f40; } .navbar-default.affix .navbar-header .navbar-brand:hover, .navbar-default.affix .navbar-header .navbar-brand:focus { color: #eb3812; } .navbar-default.affix .nav > li>a, .navbar-default.affix .nav>li>a:focus { color: #222; } .navbar-default.affix .nav > li>a:hover, .navbar-default.affix .nav>li>a:focus:hover { color: #f05f40; } } header { position: relative; width: 100%; min-height: auto; text-align: center; color: #fff; background-image: url(img/header.jpg); background-position: center; -webkit-background-size: cover; -moz-background-size: cover; background-size: cover; -o-background-size: cover; } header .header-content { position: relative; width: 100%; padding: 100px 15px; text-align: center; } header .header-content .header-content-inner h1 { margin-top: 0; margin-bottom: 0; text-transform: uppercase; font-weight: 700; font-size: 50px; } header .header-content .header-content-inner hr { margin: 30px auto; } header .header-content .header-content-inner p { margin-bottom: 50px; font-size: 16px; font-weight: 300; color: rgba(255,255,255,.7); } @media(min-width:768px) { header { min-height: 100%; } header .header-content { position: absolute; top: 50%; padding: 0 50px; -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); transform: translateY(-50%); } header .header-content .header-content-inner { margin-right: auto; margin-left: auto; max-width: 1000px; } header .header-content .header-content-inner p { margin-right: auto; margin-left: auto; max-width: 80%; font-size: 18px; } } .section-heading { margin-top: 0; } .service-box { margin: 50px auto 0; max-width: 400px; } @media(min-width:992px) { .service-box { margin: 20px auto 0; } } .service-box p { margin-bottom: 0; } .portfolio-box { display: block; position: relative; margin: 0 auto; max-width: 650px; } .portfolio-box .portfolio-box-caption { display: block; position: absolute; bottom: 0; width: 100%; height: 100%; text-align: center; color: #fff; opacity: 0; background: rgba(240,95,64,.9); -webkit-transition: all .35s; -moz-transition: all .35s; transition: all .35s; } .portfolio-box .portfolio-box-caption .portfolio-box-caption-content { position: absolute; top: 50%; width: 100%; text-align: center; transform: translateY(-50%); } .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category, .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name { padding: 0 15px; font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif; } .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category { text-transform: uppercase; font-size: 14px; font-weight: 600; } .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name { font-size: 18px; } .portfolio-box:hover .portfolio-box-caption { opacity: 1; } @media(min-width:768px) { .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category { font-size: 16px; } .portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name { font-size: 22px; } } .call-to-action h2 { margin: 0 auto 20px; } .text-primary { color: #f05f40; } .no-gutter > [class*=col-] { padding-right: 0; padding-left: 0; } .btn-default { border-color: #fff; color: #222; background-color: #fff; -webkit-transition: all .35s; -moz-transition: all .35s; transition: all .35s; } .btn-default:hover, .btn-default:focus, .btn-default.focus, .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { border-color: #ededed; color: #222; background-color: #f2f2f2; } .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { background-image: none; } .btn-default.disabled, .btn-default[disabled], fieldset[disabled] .btn-default, .btn-default.disabled:hover, .btn-default[disabled]:hover, fieldset[disabled] .btn-default:hover, .btn-default.disabled:focus, .btn-default[disabled]:focus, fieldset[disabled] .btn-default:focus, .btn-default.disabled.focus, .btn-default[disabled].focus, fieldset[disabled] .btn-default.focus, .btn-default.disabled:active, .btn-default[disabled]:active, fieldset[disabled] .btn-default:active, .btn-default.disabled.active, .btn-default[disabled].active, fieldset[disabled] .btn-default.active { border-color: #fff; background-color: #fff; } .btn-default .badge { color: #fff; background-color: #222; } .btn-primary { border-color: #f05f40; color: #fff; background-color: #f05f40; -webkit-transition: all .35s; -moz-transition: all .35s; transition: all .35s; } .btn-primary:hover, .btn-primary:focus, .btn-primary.focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { border-color: #ed431f; color: #fff; background-color: #ee4b28; } .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { background-image: none; } .btn-primary.disabled, .btn-primary[disabled], fieldset[disabled] .btn-primary, .btn-primary.disabled:hover, .btn-primary[disabled]:hover, fieldset[disabled] .btn-primary:hover, .btn-primary.disabled:focus, .btn-primary[disabled]:focus, fieldset[disabled] .btn-primary:focus, .btn-primary.disabled.focus, .btn-primary[disabled].focus, fieldset[disabled] .btn-primary.focus, .btn-primary.disabled:active, .btn-primary[disabled]:active, fieldset[disabled] .btn-primary:active, .btn-primary.disabled.active, .btn-primary[disabled].active, fieldset[disabled] .btn-primary.active { border-color: #f05f40; background-color: #f05f40; } .btn-primary .badge { color: #f05f40; background-color: #fff; } .btn { border: 0; border-radius: 300px; text-transform: uppercase; font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif; font-weight: 700; } .btn-xl { padding: 15px 30px; } ::-moz-selection { text-shadow: none; color: #fff; background: #222; } ::selection { text-shadow: none; color: #fff; background: #222; } img::selection { color: #fff; background: 0 0; } img::-moz-selection { color: #fff; background: 0 0; } body { webkit-tap-highlight-color: #222; } .blogs ul li { margin-bottom: 35px; } textarea, input[type="text"] { width: 100%; padding: 10px; font-size: 18px; display: block; box-sizing: padding-box; } textarea { height: 250px; line-height: 1.5em; border: 1px solid #ccc; resize: none; } label { margin: 30px 0 10px 0; display: block; } input[type="submit"] { margin: 22px 0 0 0; font-size: 20px; } .search { margin: 0 auto; } .search-form .btn { border-radius: 6px; } .search-form { margin-top: 10px; margin-bottom: 30px; } .search-form input[type="submit"] { margin-top: 0px; } .row.no-gutters { margin-right: 0; margin-left: 0; } .row.no-gutters > [class^="col-"], .row.no-gutters > [class*=" col-"] { padding-right: 0; padding-left: 0; } .search-form .btn-lg { padding: 9px 10px; } .blog-posts p { text-align: justify; } #search-results h3 { margin-top: 0px; } #search-results p { text-align: justify; }
gpl-3.0
trackplus/Genji
docs/com/trackplus/track/util/html/package-tree.html
6123
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="de"> <head> <!-- Generated by javadoc (version 1.7.0_80) on Sat Dec 19 22:20:42 CET 2015 --> <title>com.trackplus.track.util.html Class Hierarchy (Genji Scrum Tool &amp; Issue Tracking API Documentation 5.0.1)</title> <meta name="date" content="2015-12-19"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="com.trackplus.track.util.html Class Hierarchy (Genji Scrum Tool & Issue Tracking API Documentation 5.0.1)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li class="navBarCell1Rev">Tree</li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../com/trackplus/track/constants/package-tree.html">Prev</a></li> <li><a href="../../../../../filters/package-tree.html">Next</a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?com/trackplus/track/util/html/package-tree.html" target="_top">Frames</a></li> <li><a href="package-tree.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h1 class="title">Hierarchy For Package com.trackplus.track.util.html</h1> <span class="strong">Package Hierarchies:</span> <ul class="horizontal"> <li><a href="../../../../../overview-tree.html">All Packages</a></li> </ul> </div> <div class="contentContainer"> <h2 title="Class Hierarchy">Class Hierarchy</h2> <ul> <li type="circle">java.lang.Object <ul> <li type="circle">com.trackplus.track.util.html.<a href="../../../../../com/trackplus/track/util/html/Html2LaTeX.html" title="class in com.trackplus.track.util.html"><span class="strong">Html2LaTeX</span></a></li> <li type="circle">com.trackplus.track.util.html.<a href="../../../../../com/trackplus/track/util/html/HtmlCleaner.html" title="class in com.trackplus.track.util.html"><span class="strong">HtmlCleaner</span></a></li> <li type="circle">com.trackplus.track.util.html.<a href="../../../../../com/trackplus/track/util/html/LaTeXFigure.html" title="class in com.trackplus.track.util.html"><span class="strong">LaTeXFigure</span></a></li> <li type="circle">com.trackplus.track.util.html.<a href="../../../../../com/trackplus/track/util/html/LaTeXTable.html" title="class in com.trackplus.track.util.html"><span class="strong">LaTeXTable</span></a></li> <li type="circle">com.trackplus.track.util.html.<a href="../../../../../com/trackplus/track/util/html/LaTeXTable.TableCell.html" title="class in com.trackplus.track.util.html"><span class="strong">LaTeXTable.TableCell</span></a></li> <li type="circle">com.trackplus.track.util.html.<a href="../../../../../com/trackplus/track/util/html/LaTeXTable.TableHeader.html" title="class in com.trackplus.track.util.html"><span class="strong">LaTeXTable.TableHeader</span></a></li> <li type="circle">com.trackplus.track.util.html.<a href="../../../../../com/trackplus/track/util/html/LaTeXTable.TableRow.html" title="class in com.trackplus.track.util.html"><span class="strong">LaTeXTable.TableRow</span></a></li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li class="navBarCell1Rev">Tree</li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../com/trackplus/track/constants/package-tree.html">Prev</a></li> <li><a href="../../../../../filters/package-tree.html">Next</a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?com/trackplus/track/util/html/package-tree.html" target="_top">Frames</a></li> <li><a href="package-tree.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small><a href="http://www.trackplus.com">Genji Scrum Tool &amp; Issue Tracking API Documentation</a> &nbsp; &nbsp; &nbsp;<i>Copyright &#169; 2015 Steinbeis Task Management Solutions. All Rights Reserved.</i></small></p> </body> </html>
gpl-3.0
ServiusHack/MStarPlayer
Source/Player.h
4749
#pragma once #include <optional> #include <set> #include "juce_gui_basics/juce_gui_basics.h" #include "MixerComponent.h" #include "MixerControlable.h" #include "InterPlayerCommunication.h" #include "JinglePlayerWindow.h" #include "MyMultiDocumentPanel.h" #include "PlayerComponent.h" #include "PlayerMidiDialog.h" #include "PlaylistModel.h" #include "PlaylistPlayerWindow.h" #include "PluginLoader.h" #include "SubchannelPlayer.h" /** A player with a playlist and tracks to play audio files. The different types of players only differ in their user interface. The actual logic is almost the same. */ class Player : public PlayerComponent , public juce::KeyListener , public SoloBusSettingsListener { public: Player(MixerComponent* mixer, OutputChannelNames* outputChannelNames, SoloBusSettings& soloBusSettings, InterPlayerCommunication::PlayerType type, juce::ApplicationProperties& applicationProperties, juce::AudioThumbnailCache& audioThumbnailCache, juce::TimeSliceThread& thread, MTCSender& mtcSender, PluginLoader& pluginLoader, float gain = 1.0f, bool solo = false, bool mute = false); ~Player(); void setType(InterPlayerCommunication::PlayerType type); void play() override; void pause() override; void stop() override; void nextEntry(bool onlyIfEntrySaysSo = false) override; void previousEntry() override; void playlistEntryChanged(const std::vector<TrackConfig>& trackConfigs, bool play, int index); void gainChangedCallback(const char* track_name, float gain); // XML serialization public: /** Returns an XML object to encapsulate the state of the volumes. @see restoreFromXml */ juce::XmlElement* saveToXml(const juce::File& projectDirectory, MyMultiDocumentPanel::LayoutMode layoutMode) const; /** Restores the volumes from an XML object created by createXML(). @see createXml */ void restoreFromXml(const juce::XmlElement& element, const juce::File& projectDirectory); // Component overrides public: virtual void resized() override; // SubchannelPlayer public: virtual void setGain(float gain) override; virtual float getGain() const override; virtual void setPan(float pan) override; virtual float getPan() const override; virtual void setSoloMute(bool soloMute) override; virtual bool getSoloMute() const override; virtual void setSolo(bool solo) override; virtual bool getSolo() const override; virtual void setMute(bool mute) override; virtual bool getMute() const override; virtual float getVolume() const override; virtual juce::String getName() const override; virtual void setName(const juce::String& newName) override; virtual void SetChannelCountChangedCallback(const Track::ChannelCountChangedCallback& callback) override; virtual std::vector<MixerControlable*> getSubMixerControlables() const override; // KeyListener public: virtual bool keyPressed(const juce::KeyPress& key, juce::Component* originatingComponent) override; // SoloBusListener public: void soloBusChannelChanged(SoloBusChannel channel, int outputChannel, int previousOutputChannel) override; public: /** Set the number of output channels. If the user reconfigures his audio settings the number of output channels might change. This method is called to propagate this change to this player. */ void setOutputChannels(int outputChannels); private: void updateGain(); void setColor(const juce::Colour& color); void setUserImage(const juce::File& file); void showEditDialog(); void configureChannels(); void configureMidi(); void trackConfigChanged(); MixerComponent* m_mixer; OutputChannelNames* m_outputChannelNames; SoloBusSettings& m_soloBusSettings; PlaylistModel playlistModel; int currentPlaylistEntry{-1}; TracksContainer m_tracksContainer; PluginLoader& m_pluginLoader; PlaylistPlayerWindow m_playlistPlayer; JinglePlayerWindow m_jinglePlayer; float m_gain; bool m_soloMute; bool m_solo; bool m_mute; InterPlayerCommunication::PlayerType m_type; juce::Colour m_color; juce::File m_userImage; Track::ChannelCountChangedCallback m_channelCountChanged; std::optional<PlayerEditDialogWindow> m_PlayerEditDialog; std::optional<ChannelMappingWindow> m_channelMappingWindow; std::optional<PlayerMidiDialogWindow> m_PlayerMidiDialog; MTCSender& m_mtcSender; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Player) };
gpl-3.0
JesApp/ParBinSyn
libs/fftw/dft/simd/avx/Makefile
32612
# Makefile.in generated by automake 1.14.1 from Makefile.am. # dft/simd/avx/Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # This file contains a standard list of DFT SIMD codelets. It is # included by common/Makefile to generate the C files with the actual # codelets in them. It is included by {sse,sse2,...}/Makefile to # generate and compile stub files that include common/*.c # You can customize FFTW for special needs, e.g. to handle certain # sizes more efficiently, by adding new codelets to the lists of those # included by default. If you change the list of codelets, any new # ones you added will be automatically generated when you run the # bootstrap script (see "Generating your own code" in the FFTW # manual). am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/fftw pkgincludedir = $(includedir)/fftw pkglibdir = $(libdir)/fftw pkglibexecdir = $(libexecdir)/fftw am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = x86_64-unknown-linux-gnu host_triplet = x86_64-unknown-linux-gnu DIST_COMMON = $(top_srcdir)/dft/simd/codlist.mk \ $(top_srcdir)/dft/simd/simd.mk $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(top_srcdir)/depcomp subdir = dft/simd/avx ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_mpi.m4 \ $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/ax_cc_maxopt.m4 \ $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ $(top_srcdir)/m4/ax_compiler_vendor.m4 \ $(top_srcdir)/m4/ax_gcc_aligns_stack.m4 \ $(top_srcdir)/m4/ax_gcc_version.m4 \ $(top_srcdir)/m4/ax_openmp.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdft_avx_codelets_la_LIBADD = am__libdft_avx_codelets_la_SOURCES_DIST = n1fv_2.c n1fv_3.c n1fv_4.c \ n1fv_5.c n1fv_6.c n1fv_7.c n1fv_8.c n1fv_9.c n1fv_10.c \ n1fv_11.c n1fv_12.c n1fv_13.c n1fv_14.c n1fv_15.c n1fv_16.c \ n1fv_32.c n1fv_64.c n1fv_128.c n1fv_20.c n1fv_25.c n1bv_2.c \ n1bv_3.c n1bv_4.c n1bv_5.c n1bv_6.c n1bv_7.c n1bv_8.c n1bv_9.c \ n1bv_10.c n1bv_11.c n1bv_12.c n1bv_13.c n1bv_14.c n1bv_15.c \ n1bv_16.c n1bv_32.c n1bv_64.c n1bv_128.c n1bv_20.c n1bv_25.c \ n2fv_2.c n2fv_4.c n2fv_6.c n2fv_8.c n2fv_10.c n2fv_12.c \ n2fv_14.c n2fv_16.c n2fv_32.c n2fv_64.c n2fv_20.c n2bv_2.c \ n2bv_4.c n2bv_6.c n2bv_8.c n2bv_10.c n2bv_12.c n2bv_14.c \ n2bv_16.c n2bv_32.c n2bv_64.c n2bv_20.c n2sv_4.c n2sv_8.c \ n2sv_16.c n2sv_32.c n2sv_64.c t1fuv_2.c t1fuv_3.c t1fuv_4.c \ t1fuv_5.c t1fuv_6.c t1fuv_7.c t1fuv_8.c t1fuv_9.c t1fuv_10.c \ t1fv_2.c t1fv_3.c t1fv_4.c t1fv_5.c t1fv_6.c t1fv_7.c t1fv_8.c \ t1fv_9.c t1fv_10.c t1fv_12.c t1fv_15.c t1fv_16.c t1fv_32.c \ t1fv_64.c t1fv_20.c t1fv_25.c t2fv_2.c t2fv_4.c t2fv_8.c \ t2fv_16.c t2fv_32.c t2fv_64.c t2fv_5.c t2fv_10.c t2fv_20.c \ t2fv_25.c t3fv_4.c t3fv_8.c t3fv_16.c t3fv_32.c t3fv_5.c \ t3fv_10.c t3fv_20.c t3fv_25.c t1buv_2.c t1buv_3.c t1buv_4.c \ t1buv_5.c t1buv_6.c t1buv_7.c t1buv_8.c t1buv_9.c t1buv_10.c \ t1bv_2.c t1bv_3.c t1bv_4.c t1bv_5.c t1bv_6.c t1bv_7.c t1bv_8.c \ t1bv_9.c t1bv_10.c t1bv_12.c t1bv_15.c t1bv_16.c t1bv_32.c \ t1bv_64.c t1bv_20.c t1bv_25.c t2bv_2.c t2bv_4.c t2bv_8.c \ t2bv_16.c t2bv_32.c t2bv_64.c t2bv_5.c t2bv_10.c t2bv_20.c \ t2bv_25.c t3bv_4.c t3bv_8.c t3bv_16.c t3bv_32.c t3bv_5.c \ t3bv_10.c t3bv_20.c t3bv_25.c t1sv_2.c t1sv_4.c t1sv_8.c \ t1sv_16.c t1sv_32.c t2sv_4.c t2sv_8.c t2sv_16.c t2sv_32.c \ q1fv_2.c q1fv_4.c q1fv_5.c q1fv_8.c q1bv_2.c q1bv_4.c q1bv_5.c \ q1bv_8.c genus.c codlist.c am__objects_1 = n1fv_2.lo n1fv_3.lo n1fv_4.lo n1fv_5.lo n1fv_6.lo \ n1fv_7.lo n1fv_8.lo n1fv_9.lo n1fv_10.lo n1fv_11.lo n1fv_12.lo \ n1fv_13.lo n1fv_14.lo n1fv_15.lo n1fv_16.lo n1fv_32.lo \ n1fv_64.lo n1fv_128.lo n1fv_20.lo n1fv_25.lo am__objects_2 = n1bv_2.lo n1bv_3.lo n1bv_4.lo n1bv_5.lo n1bv_6.lo \ n1bv_7.lo n1bv_8.lo n1bv_9.lo n1bv_10.lo n1bv_11.lo n1bv_12.lo \ n1bv_13.lo n1bv_14.lo n1bv_15.lo n1bv_16.lo n1bv_32.lo \ n1bv_64.lo n1bv_128.lo n1bv_20.lo n1bv_25.lo am__objects_3 = n2fv_2.lo n2fv_4.lo n2fv_6.lo n2fv_8.lo n2fv_10.lo \ n2fv_12.lo n2fv_14.lo n2fv_16.lo n2fv_32.lo n2fv_64.lo \ n2fv_20.lo am__objects_4 = n2bv_2.lo n2bv_4.lo n2bv_6.lo n2bv_8.lo n2bv_10.lo \ n2bv_12.lo n2bv_14.lo n2bv_16.lo n2bv_32.lo n2bv_64.lo \ n2bv_20.lo am__objects_5 = n2sv_4.lo n2sv_8.lo n2sv_16.lo n2sv_32.lo n2sv_64.lo am__objects_6 = t1fuv_2.lo t1fuv_3.lo t1fuv_4.lo t1fuv_5.lo t1fuv_6.lo \ t1fuv_7.lo t1fuv_8.lo t1fuv_9.lo t1fuv_10.lo am__objects_7 = t1fv_2.lo t1fv_3.lo t1fv_4.lo t1fv_5.lo t1fv_6.lo \ t1fv_7.lo t1fv_8.lo t1fv_9.lo t1fv_10.lo t1fv_12.lo t1fv_15.lo \ t1fv_16.lo t1fv_32.lo t1fv_64.lo t1fv_20.lo t1fv_25.lo am__objects_8 = t2fv_2.lo t2fv_4.lo t2fv_8.lo t2fv_16.lo t2fv_32.lo \ t2fv_64.lo t2fv_5.lo t2fv_10.lo t2fv_20.lo t2fv_25.lo am__objects_9 = t3fv_4.lo t3fv_8.lo t3fv_16.lo t3fv_32.lo t3fv_5.lo \ t3fv_10.lo t3fv_20.lo t3fv_25.lo am__objects_10 = t1buv_2.lo t1buv_3.lo t1buv_4.lo t1buv_5.lo \ t1buv_6.lo t1buv_7.lo t1buv_8.lo t1buv_9.lo t1buv_10.lo am__objects_11 = t1bv_2.lo t1bv_3.lo t1bv_4.lo t1bv_5.lo t1bv_6.lo \ t1bv_7.lo t1bv_8.lo t1bv_9.lo t1bv_10.lo t1bv_12.lo t1bv_15.lo \ t1bv_16.lo t1bv_32.lo t1bv_64.lo t1bv_20.lo t1bv_25.lo am__objects_12 = t2bv_2.lo t2bv_4.lo t2bv_8.lo t2bv_16.lo t2bv_32.lo \ t2bv_64.lo t2bv_5.lo t2bv_10.lo t2bv_20.lo t2bv_25.lo am__objects_13 = t3bv_4.lo t3bv_8.lo t3bv_16.lo t3bv_32.lo t3bv_5.lo \ t3bv_10.lo t3bv_20.lo t3bv_25.lo am__objects_14 = t1sv_2.lo t1sv_4.lo t1sv_8.lo t1sv_16.lo t1sv_32.lo am__objects_15 = t2sv_4.lo t2sv_8.lo t2sv_16.lo t2sv_32.lo am__objects_16 = q1fv_2.lo q1fv_4.lo q1fv_5.lo q1fv_8.lo am__objects_17 = q1bv_2.lo q1bv_4.lo q1bv_5.lo q1bv_8.lo am__objects_18 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_4) $(am__objects_5) $(am__objects_6) \ $(am__objects_7) $(am__objects_8) $(am__objects_9) \ $(am__objects_10) $(am__objects_11) $(am__objects_12) \ $(am__objects_13) $(am__objects_14) $(am__objects_15) \ $(am__objects_16) $(am__objects_17) am__objects_19 = $(am__objects_18) genus.lo codlist.lo #am__objects_20 = $(am__objects_19) #am_libdft_avx_codelets_la_OBJECTS = $(am__objects_20) libdft_avx_codelets_la_OBJECTS = $(am_libdft_avx_codelets_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent am__v_lt_1 = #am_libdft_avx_codelets_la_rpath = AM_V_P = $(am__v_P_$(V)) am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I. -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdft_avx_codelets_la_SOURCES) DIST_SOURCES = $(am__libdft_avx_codelets_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = ${SHELL} /home/st/j/jb620324/ParalleleSysteProjekt/ParBinSyn/libs/fftw/missing aclocal-1.14 ALLOCA = ALTIVEC_CFLAGS = AMTAR = $${TAR-tar} AM_DEFAULT_VERBOSITY = 1 AR = ar AS = as AUTOCONF = ${SHELL} /home/st/j/jb620324/ParalleleSysteProjekt/ParBinSyn/libs/fftw/missing autoconf AUTOHEADER = ${SHELL} /home/st/j/jb620324/ParalleleSysteProjekt/ParBinSyn/libs/fftw/missing autoheader AUTOMAKE = ${SHELL} /home/st/j/jb620324/ParalleleSysteProjekt/ParBinSyn/libs/fftw/missing automake-1.14 AVX2_CFLAGS = AVX512_CFLAGS = AVX_128_FMA_CFLAGS = AVX_CFLAGS = AWK = gawk CC = cc CCDEPMODE = depmode=gcc3 CFLAGS = -O3 -fomit-frame-pointer -mtune=native -malign-double -fstrict-aliasing -fno-schedule-insns -ffast-math CHECK_PL_OPTS = CPP = cc -E CPPFLAGS = CYGPATH_W = echo C_FFTW_R2R_KIND = C_INT32_T C_MPI_FINT = DEFS = -DHAVE_CONFIG_H DEPDIR = .deps DLLTOOL = dlltool DSYMUTIL = DUMPBIN = ECHO_C = ECHO_N = -n ECHO_T = EGREP = /bin/grep -E EXEEXT = F77 = FFLAGS = FGREP = /bin/grep -F FLIBS = GREP = /bin/grep INDENT = INSTALL = /usr/bin/install -c INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = $(install_sh) -c -s KCVI_CFLAGS = LD = /usr/bin/ld -m elf_x86_64 LDFLAGS = LIBOBJS = LIBQUADMATH = LIBS = -lm LIBTOOL = $(SHELL) $(top_builddir)/libtool LIPO = LN_S = ln -s LTLIBOBJS = MAINT = # MAKEINFO = ${SHELL} /home/st/j/jb620324/ParalleleSysteProjekt/ParBinSyn/libs/fftw/missing makeinfo MANIFEST_TOOL = : MKDIR_P = /bin/mkdir -p MPICC = MPILIBS = MPIRUN = NEON_CFLAGS = NM = /usr/bin/nm -B NMEDIT = OBJDUMP = objdump OBJEXT = o OCAMLBUILD = OPENMP_CFLAGS = -fopenmp OTOOL = OTOOL64 = PACKAGE = fftw PACKAGE_BUGREPORT = fftw@fftw.org PACKAGE_NAME = fftw PACKAGE_STRING = fftw 3.3.5 PACKAGE_TARNAME = fftw PACKAGE_URL = PACKAGE_VERSION = 3.3.5 PATH_SEPARATOR = : POW_LIB = PRECISION = s PREC_SUFFIX = f PTHREAD_CC = PTHREAD_CFLAGS = PTHREAD_LIBS = RANLIB = ranlib SED = /bin/sed SET_MAKE = SHARED_VERSION_INFO = 8:5:5 SHELL = /bin/bash SSE2_CFLAGS = STACK_ALIGN_CFLAGS = STRIP = strip THREADLIBS = VERSION = 3.3.5 VSX_CFLAGS = abs_builddir = /home/st/j/jb620324/ParalleleSysteProjekt/ParBinSyn/libs/fftw/dft/simd/avx abs_srcdir = /home/st/j/jb620324/ParalleleSysteProjekt/ParBinSyn/libs/fftw/dft/simd/avx abs_top_builddir = /home/st/j/jb620324/ParalleleSysteProjekt/ParBinSyn/libs/fftw abs_top_srcdir = /home/st/j/jb620324/ParalleleSysteProjekt/ParBinSyn/libs/fftw ac_ct_AR = ar ac_ct_CC = cc ac_ct_DUMPBIN = ac_ct_F77 = acx_pthread_config = am__include = include am__leading_dot = . am__quote = am__tar = $${TAR-tar} chof - "$$tardir" am__untar = $${TAR-tar} xf - bindir = ${exec_prefix}/bin build = x86_64-unknown-linux-gnu build_alias = build_cpu = x86_64 build_os = linux-gnu build_vendor = unknown builddir = . datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} dvidir = ${docdir} exec_prefix = ${prefix} host = x86_64-unknown-linux-gnu host_alias = host_cpu = x86_64 host_os = linux-gnu host_vendor = unknown htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = ${SHELL} /home/st/j/jb620324/ParalleleSysteProjekt/ParBinSyn/libs/fftw/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale localstatedir = ${prefix}/var mandir = ${datarootdir}/man mkdir_p = $(MKDIR_P) oldincludedir = /usr/include pdfdir = ${docdir} prefix = /home/st/j/jb620324/ParalleleSysteProjekt/ParBinSyn/obj/fftw program_transform_name = s,x,x, psdir = ${docdir} sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com srcdir = . sysconfdir = ${prefix}/etc target_alias = top_build_prefix = ../../../ top_builddir = ../../.. top_srcdir = ../../.. AM_CFLAGS = $(AVX_CFLAGS) SIMD_HEADER = simd-avx.h ########################################################################### # n1fv_<n> is a hard-coded FFTW_FORWARD FFT of size <n>, using SIMD N1F = n1fv_2.c n1fv_3.c n1fv_4.c n1fv_5.c n1fv_6.c n1fv_7.c n1fv_8.c \ n1fv_9.c n1fv_10.c n1fv_11.c n1fv_12.c n1fv_13.c n1fv_14.c n1fv_15.c \ n1fv_16.c n1fv_32.c n1fv_64.c n1fv_128.c n1fv_20.c n1fv_25.c # as above, with restricted input vector stride N2F = n2fv_2.c n2fv_4.c n2fv_6.c n2fv_8.c n2fv_10.c n2fv_12.c \ n2fv_14.c n2fv_16.c n2fv_32.c n2fv_64.c n2fv_20.c # as above, but FFTW_BACKWARD N1B = n1bv_2.c n1bv_3.c n1bv_4.c n1bv_5.c n1bv_6.c n1bv_7.c n1bv_8.c \ n1bv_9.c n1bv_10.c n1bv_11.c n1bv_12.c n1bv_13.c n1bv_14.c n1bv_15.c \ n1bv_16.c n1bv_32.c n1bv_64.c n1bv_128.c n1bv_20.c n1bv_25.c N2B = n2bv_2.c n2bv_4.c n2bv_6.c n2bv_8.c n2bv_10.c n2bv_12.c \ n2bv_14.c n2bv_16.c n2bv_32.c n2bv_64.c n2bv_20.c # split-complex codelets N2S = n2sv_4.c n2sv_8.c n2sv_16.c n2sv_32.c n2sv_64.c ########################################################################### # t1fv_<r> is a "twiddle" FFT of size <r>, implementing a radix-r DIT step # for an FFTW_FORWARD transform, using SIMD T1F = t1fv_2.c t1fv_3.c t1fv_4.c t1fv_5.c t1fv_6.c t1fv_7.c t1fv_8.c \ t1fv_9.c t1fv_10.c t1fv_12.c t1fv_15.c t1fv_16.c t1fv_32.c t1fv_64.c \ t1fv_20.c t1fv_25.c # same as t1fv_*, but with different twiddle storage scheme T2F = t2fv_2.c t2fv_4.c t2fv_8.c t2fv_16.c t2fv_32.c t2fv_64.c \ t2fv_5.c t2fv_10.c t2fv_20.c t2fv_25.c T3F = t3fv_4.c t3fv_8.c t3fv_16.c t3fv_32.c t3fv_5.c t3fv_10.c \ t3fv_20.c t3fv_25.c T1FU = t1fuv_2.c t1fuv_3.c t1fuv_4.c t1fuv_5.c t1fuv_6.c t1fuv_7.c \ t1fuv_8.c t1fuv_9.c t1fuv_10.c # as above, but FFTW_BACKWARD T1B = t1bv_2.c t1bv_3.c t1bv_4.c t1bv_5.c t1bv_6.c t1bv_7.c t1bv_8.c \ t1bv_9.c t1bv_10.c t1bv_12.c t1bv_15.c t1bv_16.c t1bv_32.c t1bv_64.c \ t1bv_20.c t1bv_25.c # same as t1bv_*, but with different twiddle storage scheme T2B = t2bv_2.c t2bv_4.c t2bv_8.c t2bv_16.c t2bv_32.c t2bv_64.c \ t2bv_5.c t2bv_10.c t2bv_20.c t2bv_25.c T3B = t3bv_4.c t3bv_8.c t3bv_16.c t3bv_32.c t3bv_5.c t3bv_10.c \ t3bv_20.c t3bv_25.c T1BU = t1buv_2.c t1buv_3.c t1buv_4.c t1buv_5.c t1buv_6.c t1buv_7.c \ t1buv_8.c t1buv_9.c t1buv_10.c # split-complex codelets T1S = t1sv_2.c t1sv_4.c t1sv_8.c t1sv_16.c t1sv_32.c T2S = t2sv_4.c t2sv_8.c t2sv_16.c t2sv_32.c ########################################################################### # q1fv_<r> is <r> twiddle FFTW_FORWARD FFTs of size <r> (DIF step), # where the output is transposed, using SIMD. This is used for # in-place transposes in sizes that are divisible by <r>^2. These # codelets have size ~ <r>^2, so you should probably not use <r> # bigger than 8 or so. Q1F = q1fv_2.c q1fv_4.c q1fv_5.c q1fv_8.c # as above, but FFTW_BACKWARD Q1B = q1bv_2.c q1bv_4.c q1bv_5.c q1bv_8.c ########################################################################### SIMD_CODELETS = $(N1F) $(N1B) $(N2F) $(N2B) $(N2S) $(T1FU) $(T1F) \ $(T2F) $(T3F) $(T1BU) $(T1B) $(T2B) $(T3B) $(T1S) $(T2S) $(Q1F) $(Q1B) AM_CPPFLAGS = -I$(top_srcdir)/kernel -I$(top_srcdir)/dft \ -I$(top_srcdir)/dft/simd -I$(top_srcdir)/simd-support EXTRA_DIST = $(SIMD_CODELETS) genus.c codlist.c #BUILT_SOURCES = $(EXTRA_DIST) #noinst_LTLIBRARIES = libdft_avx_codelets.la #libdft_avx_codelets_la_SOURCES = $(BUILT_SOURCES) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/dft/simd/codlist.mk $(top_srcdir)/dft/simd/simd.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dft/simd/avx/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu dft/simd/avx/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_srcdir)/dft/simd/codlist.mk $(top_srcdir)/dft/simd/simd.mk: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: # $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): # $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdft_avx_codelets.la: $(libdft_avx_codelets_la_OBJECTS) $(libdft_avx_codelets_la_DEPENDENCIES) $(EXTRA_libdft_avx_codelets_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libdft_avx_codelets_la_rpath) $(libdft_avx_codelets_la_OBJECTS) $(libdft_avx_codelets_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c include ./$(DEPDIR)/codlist.Plo include ./$(DEPDIR)/genus.Plo include ./$(DEPDIR)/n1bv_10.Plo include ./$(DEPDIR)/n1bv_11.Plo include ./$(DEPDIR)/n1bv_12.Plo include ./$(DEPDIR)/n1bv_128.Plo include ./$(DEPDIR)/n1bv_13.Plo include ./$(DEPDIR)/n1bv_14.Plo include ./$(DEPDIR)/n1bv_15.Plo include ./$(DEPDIR)/n1bv_16.Plo include ./$(DEPDIR)/n1bv_2.Plo include ./$(DEPDIR)/n1bv_20.Plo include ./$(DEPDIR)/n1bv_25.Plo include ./$(DEPDIR)/n1bv_3.Plo include ./$(DEPDIR)/n1bv_32.Plo include ./$(DEPDIR)/n1bv_4.Plo include ./$(DEPDIR)/n1bv_5.Plo include ./$(DEPDIR)/n1bv_6.Plo include ./$(DEPDIR)/n1bv_64.Plo include ./$(DEPDIR)/n1bv_7.Plo include ./$(DEPDIR)/n1bv_8.Plo include ./$(DEPDIR)/n1bv_9.Plo include ./$(DEPDIR)/n1fv_10.Plo include ./$(DEPDIR)/n1fv_11.Plo include ./$(DEPDIR)/n1fv_12.Plo include ./$(DEPDIR)/n1fv_128.Plo include ./$(DEPDIR)/n1fv_13.Plo include ./$(DEPDIR)/n1fv_14.Plo include ./$(DEPDIR)/n1fv_15.Plo include ./$(DEPDIR)/n1fv_16.Plo include ./$(DEPDIR)/n1fv_2.Plo include ./$(DEPDIR)/n1fv_20.Plo include ./$(DEPDIR)/n1fv_25.Plo include ./$(DEPDIR)/n1fv_3.Plo include ./$(DEPDIR)/n1fv_32.Plo include ./$(DEPDIR)/n1fv_4.Plo include ./$(DEPDIR)/n1fv_5.Plo include ./$(DEPDIR)/n1fv_6.Plo include ./$(DEPDIR)/n1fv_64.Plo include ./$(DEPDIR)/n1fv_7.Plo include ./$(DEPDIR)/n1fv_8.Plo include ./$(DEPDIR)/n1fv_9.Plo include ./$(DEPDIR)/n2bv_10.Plo include ./$(DEPDIR)/n2bv_12.Plo include ./$(DEPDIR)/n2bv_14.Plo include ./$(DEPDIR)/n2bv_16.Plo include ./$(DEPDIR)/n2bv_2.Plo include ./$(DEPDIR)/n2bv_20.Plo include ./$(DEPDIR)/n2bv_32.Plo include ./$(DEPDIR)/n2bv_4.Plo include ./$(DEPDIR)/n2bv_6.Plo include ./$(DEPDIR)/n2bv_64.Plo include ./$(DEPDIR)/n2bv_8.Plo include ./$(DEPDIR)/n2fv_10.Plo include ./$(DEPDIR)/n2fv_12.Plo include ./$(DEPDIR)/n2fv_14.Plo include ./$(DEPDIR)/n2fv_16.Plo include ./$(DEPDIR)/n2fv_2.Plo include ./$(DEPDIR)/n2fv_20.Plo include ./$(DEPDIR)/n2fv_32.Plo include ./$(DEPDIR)/n2fv_4.Plo include ./$(DEPDIR)/n2fv_6.Plo include ./$(DEPDIR)/n2fv_64.Plo include ./$(DEPDIR)/n2fv_8.Plo include ./$(DEPDIR)/n2sv_16.Plo include ./$(DEPDIR)/n2sv_32.Plo include ./$(DEPDIR)/n2sv_4.Plo include ./$(DEPDIR)/n2sv_64.Plo include ./$(DEPDIR)/n2sv_8.Plo include ./$(DEPDIR)/q1bv_2.Plo include ./$(DEPDIR)/q1bv_4.Plo include ./$(DEPDIR)/q1bv_5.Plo include ./$(DEPDIR)/q1bv_8.Plo include ./$(DEPDIR)/q1fv_2.Plo include ./$(DEPDIR)/q1fv_4.Plo include ./$(DEPDIR)/q1fv_5.Plo include ./$(DEPDIR)/q1fv_8.Plo include ./$(DEPDIR)/t1buv_10.Plo include ./$(DEPDIR)/t1buv_2.Plo include ./$(DEPDIR)/t1buv_3.Plo include ./$(DEPDIR)/t1buv_4.Plo include ./$(DEPDIR)/t1buv_5.Plo include ./$(DEPDIR)/t1buv_6.Plo include ./$(DEPDIR)/t1buv_7.Plo include ./$(DEPDIR)/t1buv_8.Plo include ./$(DEPDIR)/t1buv_9.Plo include ./$(DEPDIR)/t1bv_10.Plo include ./$(DEPDIR)/t1bv_12.Plo include ./$(DEPDIR)/t1bv_15.Plo include ./$(DEPDIR)/t1bv_16.Plo include ./$(DEPDIR)/t1bv_2.Plo include ./$(DEPDIR)/t1bv_20.Plo include ./$(DEPDIR)/t1bv_25.Plo include ./$(DEPDIR)/t1bv_3.Plo include ./$(DEPDIR)/t1bv_32.Plo include ./$(DEPDIR)/t1bv_4.Plo include ./$(DEPDIR)/t1bv_5.Plo include ./$(DEPDIR)/t1bv_6.Plo include ./$(DEPDIR)/t1bv_64.Plo include ./$(DEPDIR)/t1bv_7.Plo include ./$(DEPDIR)/t1bv_8.Plo include ./$(DEPDIR)/t1bv_9.Plo include ./$(DEPDIR)/t1fuv_10.Plo include ./$(DEPDIR)/t1fuv_2.Plo include ./$(DEPDIR)/t1fuv_3.Plo include ./$(DEPDIR)/t1fuv_4.Plo include ./$(DEPDIR)/t1fuv_5.Plo include ./$(DEPDIR)/t1fuv_6.Plo include ./$(DEPDIR)/t1fuv_7.Plo include ./$(DEPDIR)/t1fuv_8.Plo include ./$(DEPDIR)/t1fuv_9.Plo include ./$(DEPDIR)/t1fv_10.Plo include ./$(DEPDIR)/t1fv_12.Plo include ./$(DEPDIR)/t1fv_15.Plo include ./$(DEPDIR)/t1fv_16.Plo include ./$(DEPDIR)/t1fv_2.Plo include ./$(DEPDIR)/t1fv_20.Plo include ./$(DEPDIR)/t1fv_25.Plo include ./$(DEPDIR)/t1fv_3.Plo include ./$(DEPDIR)/t1fv_32.Plo include ./$(DEPDIR)/t1fv_4.Plo include ./$(DEPDIR)/t1fv_5.Plo include ./$(DEPDIR)/t1fv_6.Plo include ./$(DEPDIR)/t1fv_64.Plo include ./$(DEPDIR)/t1fv_7.Plo include ./$(DEPDIR)/t1fv_8.Plo include ./$(DEPDIR)/t1fv_9.Plo include ./$(DEPDIR)/t1sv_16.Plo include ./$(DEPDIR)/t1sv_2.Plo include ./$(DEPDIR)/t1sv_32.Plo include ./$(DEPDIR)/t1sv_4.Plo include ./$(DEPDIR)/t1sv_8.Plo include ./$(DEPDIR)/t2bv_10.Plo include ./$(DEPDIR)/t2bv_16.Plo include ./$(DEPDIR)/t2bv_2.Plo include ./$(DEPDIR)/t2bv_20.Plo include ./$(DEPDIR)/t2bv_25.Plo include ./$(DEPDIR)/t2bv_32.Plo include ./$(DEPDIR)/t2bv_4.Plo include ./$(DEPDIR)/t2bv_5.Plo include ./$(DEPDIR)/t2bv_64.Plo include ./$(DEPDIR)/t2bv_8.Plo include ./$(DEPDIR)/t2fv_10.Plo include ./$(DEPDIR)/t2fv_16.Plo include ./$(DEPDIR)/t2fv_2.Plo include ./$(DEPDIR)/t2fv_20.Plo include ./$(DEPDIR)/t2fv_25.Plo include ./$(DEPDIR)/t2fv_32.Plo include ./$(DEPDIR)/t2fv_4.Plo include ./$(DEPDIR)/t2fv_5.Plo include ./$(DEPDIR)/t2fv_64.Plo include ./$(DEPDIR)/t2fv_8.Plo include ./$(DEPDIR)/t2sv_16.Plo include ./$(DEPDIR)/t2sv_32.Plo include ./$(DEPDIR)/t2sv_4.Plo include ./$(DEPDIR)/t2sv_8.Plo include ./$(DEPDIR)/t3bv_10.Plo include ./$(DEPDIR)/t3bv_16.Plo include ./$(DEPDIR)/t3bv_20.Plo include ./$(DEPDIR)/t3bv_25.Plo include ./$(DEPDIR)/t3bv_32.Plo include ./$(DEPDIR)/t3bv_4.Plo include ./$(DEPDIR)/t3bv_5.Plo include ./$(DEPDIR)/t3bv_8.Plo include ./$(DEPDIR)/t3fv_10.Plo include ./$(DEPDIR)/t3fv_16.Plo include ./$(DEPDIR)/t3fv_20.Plo include ./$(DEPDIR)/t3fv_25.Plo include ./$(DEPDIR)/t3fv_32.Plo include ./$(DEPDIR)/t3fv_4.Plo include ./$(DEPDIR)/t3fv_5.Plo include ./$(DEPDIR)/t3fv_8.Plo .c.o: $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po # $(AM_V_CC)source='$<' object='$@' libtool=no \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(COMPILE) -c -o $@ $< .c.obj: $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po # $(AM_V_CC)source='$<' object='$@' libtool=no \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo # $(AM_V_CC)source='$<' object='$@' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am $(EXTRA_DIST): Makefile ( \ echo "/* Generated automatically. DO NOT EDIT! */"; \ echo "#define SIMD_HEADER \"$(SIMD_HEADER)\""; \ echo "#include \"../common/"$*".c\""; \ ) >$@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT:
gpl-3.0
vinhqdang/doc2vec_dnn_wikipedia
code/load_pre_train.py
3073
# gensim modules from gensim import utils from gensim.models.doc2vec import LabeledSentence from gensim.models import Doc2Vec # numpy import numpy # shuffle from random import shuffle # logging import logging import os.path import sys import cPickle as pickle program = os.path.basename(sys.argv[0]) logger = logging.getLogger(program) logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s') logging.root.setLevel(level=logging.INFO) logger.info("running %s" % ' '.join(sys.argv)) class LabeledLineSentence(object): def __init__(self, sources): self.sources = sources flipped = {} # make sure that keys are unique for key, value in sources.items(): if value not in flipped: flipped[value] = [key] else: raise Exception('Non-unique prefix encountered') def __iter__(self): for source, prefix in self.sources.items(): with utils.smart_open(source) as fin: for item_no, line in enumerate(fin): yield LabeledSentence(utils.to_unicode(line).split(), [prefix + '_%s' % item_no]) def to_array(self): self.sentences = [] for source, prefix in self.sources.items(): with utils.smart_open(source) as fin: for item_no, line in enumerate(fin): self.sentences.append(LabeledSentence( utils.to_unicode(line).split(), [prefix + '_%s' % item_no])) return self.sentences def sentences_perm(self): shuffle(self.sentences) return self.sentences #sources = {'test-neg.txt':'TEST_NEG', 'test-pos.txt':'TEST_POS', 'train-neg.txt':'TRAIN_NEG', 'train-pos.txt':'TRAIN_POS', 'train-unsup.txt':'TRAIN_UNS'} model.save('./enwiki_quality_train.d2v') model = Doc2Vec.load './enwiki_quality_train.d2v') def convert_array_to_string (data): res = "" for i in range(len(data)): res = res + str (data[i]) if (i < len(data) - 1): res = res + '\t' return res def write_array_to_file (file_name, array_data): f = open (file_name, "w") for i in range (len(array_data)): f.write (str(array_data[i]) + "\n") f.close () qualities = ['FA','GA','B','C','START','STUB'] train_labels = [0] * 23577 train_content_file = "doc2vec_train_content_separated.txt" train_label_file = "doc2vec_train_label_separated.txt" train_cnt = 0 for i in range (len(qualities)): for j in range (30000): key = 'TRAIN_' + qualities[i] + "_" + str(j) if key in model.docvecs: data = model.docvecs[key] if (len(data) == 500): with open(train_content_file, "a") as myfile: myfile.write(convert_array_to_string (data)) myfile.write("\n") train_labels [train_cnt] = qualities[i] train_cnt += 1 write_array_to_file (file_name = train_label_file, array_data = train_labels)
gpl-3.0
pbuchholz/identifierservice
de.bu.service.indentifierservice-impl/src/main/java/de/bu/service/identifierservice/impl/DefaultIdentifierCreationService.java
1222
package de.bu.service.identifierservice.impl; import javax.inject.Inject; import javax.jws.WebMethod; import javax.jws.WebService; import de.bu.service.identifierservice.api.IdentifierBlock; import de.bu.service.identifierservice.api.IdentifierCreationException; @WebService(endpointInterface = "de.bu.service.identifierservice.api.IdentifierCreationService") public class DefaultIdentifierCreationService implements IdentifierCreationService<Long> { @LongIdentifier @Database @Inject private IdentifierReservationTransactionScript<Long> longDatabaseIdentifierReseverationTransactionScript; @WebMethod @Override public Long createSingleIdentifier(String owner) throws IdentifierCreationException { IdentifierBlock<Long> identifierBlock = longDatabaseIdentifierReseverationTransactionScript .createSingleIdentifierBlock(owner); return identifierBlock.getStartValue(); } @WebMethod @Override public IdentifierBlock<Long> createIdentifierBlock(String owner, int size) throws IdentifierCreationException { IdentifierBlock<Long> identifierBlock = longDatabaseIdentifierReseverationTransactionScript .createIdentifierBlock(owner, size); return identifierBlock; } }
gpl-3.0
fcristini/PPLite
tests/Grid/addgenerator1.cc
6566
/* Test Grid::add_grid_generator(). Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it> Copyright (C) 2010-2016 BUGSENG srl (http://bugseng.com) This file is part of the Parma Polyhedra Library (PPL). The PPL is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. The PPL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA. For the most up-to-date information see the Parma Polyhedra Library site: http://bugseng.com/products/ppl/ . */ #include "ppl_test.hh" // grid1.cc also tests add_grid_generator. // One dimension. bool test01() { Variable A(0); Grid gr(1, EMPTY); print_congruences(gr, "*** gr ***"); gr.add_grid_generator(grid_point(-A)); Grid known_gr(1); known_gr.add_congruence((A == -1) / 0); bool ok = (gr == known_gr); print_congruences(gr, "*** gr.add_grid_generator(grid_point(-A)) ***"); return ok; } // Two dimensions. bool test02() { Variable A(0); Variable B(1); Grid gr(2, EMPTY); print_congruences(gr, "*** gr ***"); gr.add_grid_generator(grid_point(A + B)); Grid known_gr(2); known_gr.add_congruence((A == 1) / 0); known_gr.add_congruence((B == 1) / 0); bool ok = (gr == known_gr); print_congruences(gr, "*** gr.add_grid_generator(grid_point(A + B)) ***"); return ok; } // Add many generators to grid of two dimensions. bool test03() { Variable A(0); Variable B(1); Grid gr(2, EMPTY); print_congruences(gr, "*** gr ***"); gr.add_grid_generator(grid_point()); gr.add_grid_generator(grid_point(A + 2*B)); gr.add_grid_generator(grid_point(A + B)); gr.add_grid_generator(grid_point(2*A + 2*B)); gr.add_grid_generator(grid_line(A)); Grid known_gr(2); known_gr.add_congruence(B %= 0); bool ok = (gr == known_gr); print_congruences(gr, "*** gr.add_grid_generator(...) ***"); return ok; } // Add generators where one has a divisor. bool test04() { Variable A(0); Variable B(1); Grid_Generator_System gs; gs.insert(grid_point(7*A, 4)); gs.insert(grid_line(A - B)); Grid gr(2, EMPTY); print_congruences(gr, "*** gr ***"); for (Grid_Generator_System::const_iterator i = gs.begin(), gs_end = gs.end(); i != gs_end; ++i) gr.add_grid_generator(*i); Grid known_gr(2); known_gr.add_congruence((4*A + 4*B == 7) / 0); bool ok = (gr == known_gr); print_congruences(gr, "*** gr.add_grid_generator(*i) ***"); return ok; } // Add generators to a grid of a higher space dimension. bool test05() { Variable A(0); Variable B(1); Variable C(2); Variable D(3); Grid gr(4, EMPTY); print_congruences(gr, "*** gr ***"); gr.add_grid_generator(grid_point(7*A, 3)); print_congruences(gr, "*** gr.add_grid_generator(grid_point(7*A, 3)) ***"); gr.add_grid_generator(grid_line(A - B)); Grid known_gr(4); known_gr.add_congruence((3*A + 3*B == 7) / 0); known_gr.add_congruence((C == 0) / 0); known_gr.add_congruence((D == 0) / 0); bool ok = (gr == known_gr); print_congruences(gr, "*** gr.add_grid_generator(grid_line(A - B)) ***"); return ok; } // Add a generator to a universe grid. bool test06() { Variable A(0); Variable B(1); Variable C(2); Variable D(3); Grid gr(4); print_congruences(gr, "*** gr ***"); gr.add_grid_generator(grid_point(12*A + 7*D)); Grid known_gr(4); bool ok = (gr == known_gr); print_congruences(gr, "*** gr.add_grid_generator(grid_point(12*A + 7*D)) ***"); return ok; } // adding a generator with a divisor to a grid of many generators. bool test07() { Variable A(0); Variable B(1); Grid gr(2, EMPTY); gr.add_grid_generator(grid_point()); gr.add_grid_generator(grid_point(A)); print_congruences(gr, "*** gr ***"); // Minimize the grid. gr.add_grid_generator(grid_point(B, 3)); Grid known_gr(2); known_gr.add_congruence(A %= 0); known_gr.add_congruence(3*B %= 0); bool ok = (gr == known_gr); print_congruences(gr, "*** gr.add_grid_generator(grid_point(B, 3)) ***"); return ok; } // Space dimension exception. bool test08() { Variable A(0); Variable C(2); Grid gr(2); try { gr.add_grid_generator(grid_point(A + C)); } catch (const std::invalid_argument& e) { nout << "invalid_argument: " << e.what() << endl; return true; } catch (...) { } return false; } // Zero dimensions empty. bool test09() { Grid gr(0, EMPTY); print_congruences(gr, "*** gr ***"); gr.add_grid_generator(grid_point()); Grid known_gr(0); bool ok = (gr == known_gr); print_congruences(gr, "*** gr.add_grid_generator(grid_point()) ***"); return ok; } // Zero dimension universe. bool test10() { Grid gr(0); print_congruences(gr, "*** gr ***"); gr.add_grid_generator(grid_point()); Grid known_gr(0); bool ok = (gr == known_gr); print_congruences(gr, "*** gr.add_grid_generator(grid_point()) ***"); return ok; } // Space dimension exception. bool test11() { Variable A(0); Grid gr(2, EMPTY); try { gr.add_grid_generator(grid_line(A)); } catch (const std::invalid_argument& e) { nout << "invalid_argument: " << e.what() << endl; return true; } catch (...) { } return false; } // Try add parameter to empty grid. bool test12() { Grid gr(2, EMPTY); try { gr.add_grid_generator(parameter()); } catch (const std::invalid_argument& e) { nout << "invalid_argument: " << e.what() << endl; return true; } catch (...) { } return false; } // Try add parameter to zero dimension empty grid. bool test13() { Grid gr(0, EMPTY); try { gr.add_grid_generator(parameter()); } catch (const std::invalid_argument& e) { nout << "invalid_argument: " << e.what() << endl; return true; } catch (...) { } return false; } BEGIN_MAIN DO_TEST(test01); DO_TEST(test02); DO_TEST(test03); DO_TEST(test04); DO_TEST(test05); DO_TEST(test06); DO_TEST(test07); DO_TEST(test08); DO_TEST(test09); DO_TEST(test10); DO_TEST(test11); DO_TEST(test12); DO_TEST(test13); END_MAIN
gpl-3.0
komatsuyuji/jobbox
frontends/public/app/controller/editor/Tree.js
10826
///////////////////////////////////////////////////////////////////////////////// // // Jobbox WebGUI // Copyright (C) 2014-2015 Komatsu Yuji(Zheng Chuyu) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // ///////////////////////////////////////////////////////////////////////////////// Ext.define('Jobbox.controller.editor.Tree', { extend: 'Ext.app.Controller', refs: [{ ref: 'editorTree', selector: 'editorTree' }, { ref: 'editorTreeMenu', selector: 'editorTreeMenu' }, { ref: 'editorTab', selector: 'editorTab' }, { ref: 'editorList', selector: 'editorList' }, { ref: 'editorShow', selector: 'editorShow' }], ///////////////////////////////////////////////////////////////////////////////// // // Function: // // Purpose: // // Parameters: // // Return value: // // Author: Komatsu Yuji(Zheng Chuyu) // ///////////////////////////////////////////////////////////////////////////////// init: function() { this.control({ 'editorTree': { afterrender: this.onAfterrender, itemclick: this.onItemclick, itemcontextmenu: this.onItemcontextmenu }, 'editorTree treeview': { beforedrop: this.onBeforedrop, drop: this.onDrop }, }); }, ///////////////////////////////////////////////////////////////////////////////// // // Function: // // Purpose: // // Parameters: // // Return value: // // Author: Komatsu Yuji(Zheng Chuyu) // ///////////////////////////////////////////////////////////////////////////////// onAfterrender: function(tree) { var me = this; Ext.create('Jobbox.view.editor.TreeMenu'); Ext.create('Jobbox.view.editor.JobunitFile'); var store = tree.getStore(); store.setRootNode({ id: 0, name: '/', kind: 0, parent_id: 0, }); me.onLoadJobunit(0); }, ///////////////////////////////////////////////////////////////////////////////// // // Function: // // Purpose: // // Parameters: // // Return value: // // Author: Komatsu Yuji(Zheng Chuyu) // ///////////////////////////////////////////////////////////////////////////////// onItemclick: function(view, record, item, index, e) { var me = this; me.onLoadJobunit(record.data.id); }, ///////////////////////////////////////////////////////////////////////////////// // // Function: // // Purpose: // // Parameters: // // Return value: // // Author: Komatsu Yuji(Zheng Chuyu) // ///////////////////////////////////////////////////////////////////////////////// onItemcontextmenu: function(tree, record, item, index, e, eOpts) { var me = this; var menu = me.getEditorTreeMenu(); menu.showAt(e.getXY()); e.stopEvent(); }, ///////////////////////////////////////////////////////////////////////////////// // // Function: // // Purpose: // // Parameters: // // Return value: // // Author: Komatsu Yuji(Zheng Chuyu) // ///////////////////////////////////////////////////////////////////////////////// onBeforedrop: function(node, data, overModel, dropPosition, dropHandlers, eOpts) { var proc = false; dropHandlers.wait = true; data.records.every(function(record) { proc = false; if (overModel.data.id == 0 && record.data.kind >= JOBUNIT_KIND_ROOTJOBNET) { Ext.Msg.alert(I18n.t('views.msg.error'), I18n.t('views.msg.create_rootjobnet')); return false; } if (overModel.data.kind >= JOBUNIT_KIND_ROOTJOBNET && record.data.kind < JOBUNIT_KIND_ROOTJOBNET) { return false; } proc = true; }); if (proc) { dropHandlers.processDrop(); } else { dropHandlers.cancelDrop(); } }, ///////////////////////////////////////////////////////////////////////////////// // // Function: // // Purpose: // // Parameters: // // Return value: // // Author: Komatsu Yuji(Zheng Chuyu) // ///////////////////////////////////////////////////////////////////////////////// onDrop: function(node, data, overModel, dropPosition, eOpts) { var me = this; data.records.forEach(function(record) { var child = null; if (data.copy) { child = new Jobbox.model.JobunitChild(record.data); } else { child = record; } child.set('parent_id', overModel.data.id); if (child.data.kind >= JOBUNIT_KIND_ROOTJOBNET) { if (overModel.data.kind < JOBUNIT_KIND_ROOTJOBNET) { child.set('kind', JOBUNIT_KIND_ROOTJOBNET); child.set('x', 0); child.set('y', 0); } else { child.set('kind', JOBUNIT_KIND_JOBNET); } } child.save({ failure: function(rec, response) { Ext.Msg.alert(I18n.t('views.msg.error'), I18n.t('views.msg.move_jobunit_failed') + " '" + child.data.name + "'"); me.onLoadJobunit(0); }, }); }); }, ///////////////////////////////////////////////////////////////////////////////// // // Function: // // Purpose: // // Parameters: // // Return value: // // Author: Komatsu Yuji(Zheng Chuyu) // ///////////////////////////////////////////////////////////////////////////////// onLoadJobunit: function(id) { var me = this; // check editing if (jobbox_selected_rootjobnet) { var rootjobnet_id = me.onGetRootjobnet(id); if (rootjobnet_id != jobbox_selected_rootjobnet.data.jobunit_id && jobbox_selected_rootjobnet.data.user_id == jobbox_login_user.data.id) { Ext.Msg.alert(I18n.t('views.msg.error'), I18n.t('views.msg.unlock_rootjobnet')); me.onLoadJobunit(jobbox_selected_parent.data.id); return; } } // expand tree var tree = me.getEditorTree(); var store = tree.getStore(); var node = store.getNodeById(id); store.load({ url: location.pathname + '/jobunits', node: node, callback: function(records, operation, success) { tree.selectPath(node.getPath()); tree.expandPath(node.getPath()); } }); //set tab title var tab = me.getEditorTab(); var title = '/'; if (id > 0) title = node.getPath('name').slice(2); tab.setTitle(title); // reset parent & rootjobnet jobbox_mask.show(); jobbox_selected_parent = null; me.onSetRootjobnet(id); Jobbox.model.Jobunit.load(id, { callback: function() { jobbox_mask.hide(); }, success: function(record) { jobbox_selected_parent = record; // set jobunit information var form = me.getEditorShow(); form.loadRecord(jobbox_selected_parent); // set children if (jobbox_selected_parent['jobbox.model.jobunitsStore']) { jobbox_selected_parent['jobbox.model.jobunitsStore'].sort([{ property: 'kind', direction: 'ASC' }, { property: 'name', direction: 'ASC' }]); var grid = me.getEditorList(); grid.reconfigure(jobbox_selected_parent['jobbox.model.jobunitsStore']); } // set connectors if (jobbox_selected_parent['jobbox.model.connectorsStore']) { jobbox_selected_parent['jobbox.model.connectorsStore'].getProxy().url = location.pathname + '/jobunits/' + jobbox_selected_parent.data.id + '/connectors'; } // set tab icon and active_tab var ctrl = Jobbox.app.getController('editor.Flowchart'); switch (jobbox_selected_parent.data.kind) { case JOBUNIT_KIND_JOBGROUP: { tab.setIcon(location.pathname + '/ext/resources/themes/images/default/tree/folder-open.gif'); tab.setActiveTab('editor_list'); break; } case JOBUNIT_KIND_ROOTJOBNET: case JOBUNIT_KIND_JOBNET: { tab.setIcon(location.pathname + '/images/icons/chart_organisation.png'); tab.setActiveTab('editor_detail'); ctrl.onDrawFlowchart(jobbox_selected_parent); break; } default: { tab.setIcon(location.pathname + '/images/icons/server.png'); tab.setActiveTab('editor_list'); } } } }); }, ///////////////////////////////////////////////////////////////////////////////// // // Function: // // Purpose: // // Parameters: // // Return value: // // Author: Komatsu Yuji(Zheng Chuyu) // ///////////////////////////////////////////////////////////////////////////////// onGetRootjobnet: function(id) { var me = this; var tree = me.getEditorTree(); var store = tree.getStore(); var node = store.getNodeById(id); if (!node) return 0; while (true) { if (node.data.kind <= JOBUNIT_KIND_ROOTJOBNET || node.data.id == 0) break; node = node.parentNode; } if (node.data.kind != JOBUNIT_KIND_ROOTJOBNET) return 0; return node.data.id; }, ///////////////////////////////////////////////////////////////////////////////// // // Function: // // Purpose: // // Parameters: // // Return value: // // Author: Komatsu Yuji(Zheng Chuyu) // ///////////////////////////////////////////////////////////////////////////////// onSetRootjobnet: function(id) { var me = this; var tree = me.getEditorTree(); var store = tree.getStore(); var node = store.getNodeById(id); jobbox_selected_rootjobnet = null; if (!node) return; while (true) { if (node.data.kind <= JOBUNIT_KIND_ROOTJOBNET || node.data.id == 0) break; node = node.parentNode; } if (node.data.kind != JOBUNIT_KIND_ROOTJOBNET) return; Jobbox.model.Jobunit.load(node.data.id, { success: function(record) { jobbox_selected_rootjobnet = record['Jobbox.model.RootjobnetHasOneInstance']; jobbox_selected_rootjobnet.getProxy().url = location.pathname + '/jobunits/' + record.data.id + '/rootjobnets'; var ctrl = Jobbox.app.getController('editor.Detail'); ctrl.onSetCheckbox(); } }); }, });
gpl-3.0
NomNuggetNom/mcpvp-mod
src/main/java/us/mcpvpmod/config/maze/ConfigMazeSounds.java
2835
package us.mcpvpmod.config.maze; import static net.minecraftforge.common.config.Configuration.CATEGORY_GENERAL; import java.io.File; import java.util.ArrayList; import java.util.List; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; import us.mcpvpmod.Server; import us.mcpvpmod.game.alerts.SoundAlert; import cpw.mods.fml.common.DummyModContainer; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.Loader; public class ConfigMazeSounds extends DummyModContainer { public static String soundStreakEnd; public static String soundStreak; public static String fileName = "mcpvp_maze_sounds.cfg"; private static Configuration config; public ConfigMazeSounds() { config = null; File cfgFile = new File(Loader.instance().getConfigDir(), fileName); config = new Configuration(cfgFile); syncConfig(); } public static Configuration getConfig() { if (config == null) { File cfgFile = new File(Loader.instance().getConfigDir(), fileName); config = new Configuration(cfgFile); } syncConfig(); return config; } public static void syncConfig() { if (config == null) { File cfgFile = new File(Loader.instance().getConfigDir(), fileName); config = new Configuration(cfgFile); } List<String> propOrder = new ArrayList<String>(); Property prop; prop = config.get(CATEGORY_GENERAL, "soundKit", "mob.villager.yes"); prop.setLanguageKey("maze.config.sounds.kit"); propOrder.add(prop.getName()); new SoundAlert("maze.kit", prop.getString(), Server.MAZE); prop = config.get(CATEGORY_GENERAL, "soundPlayerKilled", "mob.villager.yes"); prop.setLanguageKey("maze.config.sounds.playerKilled"); propOrder.add(prop.getName()); new SoundAlert("maze.playerKilled", prop.getString(), Server.MAZE); prop = config.get(CATEGORY_GENERAL, "soundTeamOut", "mob.wither.death, 0.2F"); prop.setLanguageKey("maze.config.sounds.teamOut"); propOrder.add(prop.getName()); new SoundAlert("maze.team.out", prop.getString(), Server.MAZE); prop = config.get(CATEGORY_GENERAL, "soundHunger", "mob.pig.say"); prop.setLanguageKey("maze.config.sounds.hunger"); propOrder.add(prop.getName()); new SoundAlert("maze.hunger", prop.getString(), Server.MAZE); config.setCategoryPropertyOrder(CATEGORY_GENERAL, propOrder); if (config.hasChanged()) { FMLLog.info("[MCPVP] Syncing configuration for %s", fileName); config.save(); } } }
gpl-3.0
OpenRcon/OpenRcon
src/client/game/frostbite/FrostbiteWidget.h
1164
/* * Copyright (C) 2016 The OpenRcon Project. * * This file is part of OpenRcon. * * OpenRcon is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * OpenRcon is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with OpenRcon. If not, see <http://www.gnu.org/licenses/>. */ #ifndef FROSTBITEWIDGET_H #define FROSTBITEWIDGET_H #include "GameWidget.h" #include "FrostbiteClient.h" class FrostbiteWidget : public GameWidget { Q_OBJECT public: FrostbiteWidget(FrostbiteClient *client, QWidget *parent = nullptr); virtual ~FrostbiteWidget() override; virtual FrostbiteClient *getClient() const override { return static_cast<FrostbiteClient*>(client); } }; #endif // FROSTBITEWIDGET_H
gpl-3.0
Ryoga-Unryu/pocketciv
Instruction/UpkeepInstruction.cpp
1108
#include "UpkeepInstruction.hpp" #include "Instruction/PopulationGrowthInstruction.hpp" #include "Instruction/EndGameInstruction.hpp" #include "Instruction/DecimateGoldInstruction.hpp" UpkeepInstruction::UpkeepInstruction(BoardModel *boardModel) : Instruction(), boardModel(boardModel) {} void UpkeepInstruction::initInstruction() { this->boardModel->printMessage(" "); this->boardModel->printMessage("UPKEEP:"); this->boardModel->printMessage(" "); this->boardModel->printMessage("Decimate unsupported tribes."); this->boardModel->printMessage("A region can support as much tribes as there are Mountains,"); this->boardModel->printMessage("Volcanoes, Farms, Forests and City AV in that region added up."); this->boardModel->decimateUnsupportedTribes(); this->boardModel->printMessage(" "); this->boardModel->printMessage("Press Done to continue..."); this->boardModel->printMessage(" "); } Instruction *UpkeepInstruction::triggerDone() { Instruction *next = new DecimateGoldInstruction(this->boardModel); next->initInstruction(); return next; }
gpl-3.0
diegoisawesome/AME
Dependencies/Hacking/Event assembler/html/search/classes_70.html
5385
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html><head><title></title> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <link rel="stylesheet" type="text/css" href="search.css"/> <script type="text/javascript" src="search.js"></script> </head> <body class="SRPage"> <div id="SRIndex"> <div class="SRStatus" id="Loading">Loading...</div> <div class="SRResult" id="SR_parameter"> <div class="SREntry"> <a id="Item0" onkeydown="return searchResults.Nav(event,0)" onkeypress="return searchResults.Nav(event,0)" onkeyup="return searchResults.Nav(event,0)" class="SRSymbol" href="../struct_nintenlord_1_1_event___assembler_1_1_core_1_1_code_1_1_language_1_1_parameter.html" target="_parent">Parameter</a> <span class="SRScope">Nintenlord::Event_Assembler::Core::Code::Language</span> </div> </div> <div class="SRResult" id="SR_parser"> <div class="SREntry"> <a id="Item1" onkeydown="return searchResults.Nav(event,1)" onkeypress="return searchResults.Nav(event,1)" onkeyup="return searchResults.Nav(event,1)" class="SRSymbol" href="../class_nintenlord_1_1_event___assembler_1_1_utility_1_1_parser.html" target="_parent">Parser</a> <span class="SRScope">Nintenlord::Event_Assembler::Utility</span> </div> </div> <div class="SRResult" id="SR_pool"> <div class="SREntry"> <a id="Item2" onkeydown="return searchResults.Nav(event,2)" onkeypress="return searchResults.Nav(event,2)" onkeyup="return searchResults.Nav(event,2)" class="SRSymbol" href="../class_nintenlord_1_1_event___assembler_1_1_core_1_1_code_1_1_preprocessors_1_1_built_in_macros_1_1_pool.html" target="_parent">Pool</a> <span class="SRScope">Nintenlord::Event_Assembler::Core::Code::Preprocessors::BuiltInMacros</span> </div> </div> <div class="SRResult" id="SR_preprocessinginputstream"> <div class="SREntry"> <a id="Item3" onkeydown="return searchResults.Nav(event,3)" onkeypress="return searchResults.Nav(event,3)" onkeyup="return searchResults.Nav(event,3)" class="SRSymbol" href="../class_nintenlord_1_1_event___assembler_1_1_core_1_1_code_1_1_preprocessing_input_stream.html" target="_parent">PreprocessingInputStream</a> <span class="SRScope">Nintenlord::Event_Assembler::Core::Code</span> </div> </div> <div class="SRResult" id="SR_preprocessor"> <div class="SREntry"> <a id="Item4" onkeydown="return searchResults.Nav(event,4)" onkeypress="return searchResults.Nav(event,4)" onkeyup="return searchResults.Nav(event,4)" class="SRSymbol" href="../class_nintenlord_1_1_event__assembler_1_1_code_1_1_processors_1_1_preprocessor.html" target="_parent">Preprocessor</a> <span class="SRScope">Nintenlord::Event_assembler::Code::Processors</span> </div> </div> <div class="SRResult" id="SR_preprocessor"> <div class="SREntry"> <a id="Item5" onkeydown="return searchResults.Nav(event,5)" onkeypress="return searchResults.Nav(event,5)" onkeyup="return searchResults.Nav(event,5)" class="SRSymbol" href="../class_nintenlord_1_1_event___assembler_1_1_core_1_1_code_1_1_preprocessors_1_1_preprocessor.html" target="_parent">Preprocessor</a> <span class="SRScope">Nintenlord::Event_Assembler::Core::Code::Preprocessors</span> </div> </div> <div class="SRResult" id="SR_preprocessordirective"> <div class="SREntry"> <a id="Item6" onkeydown="return searchResults.Nav(event,6)" onkeypress="return searchResults.Nav(event,6)" onkeyup="return searchResults.Nav(event,6)" class="SRSymbol" href="../struct_nintenlord_1_1_event___assembler_1_1_core_1_1_code_1_1_preprocessors_1_1_preprocessor_directive.html" target="_parent">PreprocessorDirective</a> <span class="SRScope">Nintenlord::Event_Assembler::Core::Code::Preprocessors</span> </div> </div> <div class="SRResult" id="SR_printer"> <div class="SREntry"> <a id="Item7" onkeydown="return searchResults.Nav(event,7)" onkeypress="return searchResults.Nav(event,7)" onkeyup="return searchResults.Nav(event,7)" class="SRSymbol" href="../class_nintenlord_1_1_event___assembler_1_1_core_1_1_code_1_1_language_1_1_built_in_codes_1_1_printer.html" target="_parent">Printer</a> <span class="SRScope">Nintenlord::Event_Assembler::Core::Code::Language::BuiltInCodes</span> </div> </div> <div class="SRResult" id="SR_program"> <div class="SREntry"> <a id="Item8" onkeydown="return searchResults.Nav(event,8)" onkeypress="return searchResults.Nav(event,8)" onkeyup="return searchResults.Nav(event,8)" class="SRSymbol" href="../class_nigthmare_list_to_e_adefinitions_1_1_program.html" target="_parent">Program</a> <span class="SRScope">NigthmareListToEAdefinitions</span> </div> </div> <div class="SRResult" id="SR_program"> <div class="SREntry"> <a id="Item9" onkeydown="return searchResults.Nav(event,9)" onkeypress="return searchResults.Nav(event,9)" onkeyup="return searchResults.Nav(event,9)" class="SRSymbol" href="../class_language_raws_analyzer_1_1_program.html" target="_parent">Program</a> <span class="SRScope">LanguageRawsAnalyzer</span> </div> </div> <div class="SRStatus" id="Searching">Searching...</div> <div class="SRStatus" id="NoMatches">No Matches</div> <script type="text/javascript"><!-- document.getElementById("Loading").style.display="none"; document.getElementById("NoMatches").style.display="none"; var searchResults = new SearchResults("searchResults"); searchResults.Search(); --></script> </div> </body> </html>
gpl-3.0
Muriukidavid/sph336_jan2016
DavidKimani/queue/queue.h
178
extern const int MAX; void insert(char); void del(); void display(); void pause(); // Definition of struct struct que { int front; int rear; char queue[5]; };
gpl-3.0
tux-rampage/rampage-php
library/rampage/core/view/TemplateLocator.php
2284
<?php /** * This is part of rampage.php * Copyright (c) 2013 Axel Helmert * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * @category library * @author Axel Helmert * @copyright Copyright (c) 2013 Axel Helmert * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU General Public License */ namespace rampage\core\view; use rampage\core\resources\ThemeInterface; use Zend\View\Resolver\ResolverInterface as ViewResolverInterface; use Zend\View\Renderer\RendererInterface; class TemplateLocator implements ViewResolverInterface { /** * @var ThemeInterface */ private $theme = null; /** * @param ThemeInterface $theme */ public function __construct(ThemeInterface $theme) { $this->theme = $theme; } /** * {@inheritdoc} * @see \Zend\View\Resolver\ResolverInterface::resolve() */ public function resolve($name, RendererInterface $renderer = null) { $name .= '.phtml'; $file = $this->theme->resolve('template', $name, null, true); if (($file !== false) && $file->isFile() && $file->isReadable()) { return $file->getPathname(); } // TODO: Fallback - about to be removed @list($scope, $path) = explode('/', $name, 2); $file = $this->theme->resolve('template', $path, $scope, true); if (($file === false) || !$file->isFile() || !$file->isReadable()) { return false; } trigger_error(sprintf('Found resource template "@%s". You should prefix them with "@" since this fallback will be removed in the next release!', $name), E_USER_WARNING); return $file->getPathname(); } }
gpl-3.0
4honor/obdi
static/frag/envs-managecaps.html
4621
<!-- Obdi - a REST interface and GUI for deploying software Copyright (C) 2014 Mark Clarkson This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. --> <script type="text/ng-template" id="DeleteEnvcap.html"> <div class="modal-header"> <h3 class="modal-title">Delete Capability</h3> </div> <div class="modal-body"> Are you sure you want to delete '{{Code}}'? </div> <div class="modal-footer"> <button class="btn btn-danger" ng-click="ok()">Yes</button> <button class="btn btn-primary" ng-click="cancel()">No</button> </div> </script> <script type="text/ng-template" id="EditEnvcap.html"> <div class="modal-header"> <h3 class="modal-title">Edit Capability</h3> </div> <div class="modal-body"> <div class="form-horizontal"> <!-- Code --> <div class="form-group"> <label for="envcapcode" class="col-sm-offset-1 col-sm-2 control-label"> Code</label> <div class="col-sm-7"> <input class="form-control" id="envcapcode" ng-model="envcap.Code" placeholder="Capability Code" type="text" required> </div> </div> <!-- Display Name --> <div class="form-group"> <label for="envcapdesc" class="col-sm-offset-1 col-sm-2 control-label"> Description</label> <div class="col-sm-7"> <input class="form-control" id="envcapdesc" ng-model="envcap.Desc" placeholder="Description" type="text"> </div> </div> </div> </div> <div class="modal-footer" style="margin-top: 0;"> <button class="btn btn-danger" ng-click="ok()">Apply</button> <button class="btn btn-primary" ng-click="cancel()">Cancel</button> </div> </script> <div class="panel-body" ng-if="managecaps" ng-controller="envcapsCtrl"> <form name="envManageCapsForm" novalidate ng-submit="Apply()"> <button class="btn btn-sm btn-default append-xs-tiny" type="button" ng-click="ManageCaps(false)"> <i class="fa fa-arrow-left"> </i> Go Back</button> <h4 class="append-xs-tiny pull-right formhdng">Manage Capabilites</h4> <div class="form-horizontal prepend-xs-tiny" role="form"> <div class="alert alert-danger alert-dismissable" ng-show="error"> <button type="button" class="close" ng-click="error=false;">&times;</button> {{message}} </div> <div class="alert alert-success alert-dismissable" ng-show="okmessage"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> {{okmessage}} </div> <div class="col-sm-offset-1 col-sm-10"> <p class="alert alert-info tcenter"><strong>Note:</strong> Any changes made here will be saved immediately. </p> <div class="table-responsive"> <table class="table table-striped"> <thead> <tr> <th>Code</th> <th>Description</th> <th>Action</th> </tr> </thead> <tbody> <tr ng-repeat="envcap in envcaps"> <td> {{envcap.Code}} </td> <td> {{envcap.Desc}} </td> <td> <a href="#" ng-click="editdialog(envcap)"><i class="fa fa-edit" title="Delete"></i></a> <a href="#" ng-click="dialog(envcap.Id,envcap.Code)"><i class="fa fa-trash-o red" title="Delete"></i></a> </td> </tr> <tr> <td> <input type="text" ng-model="newcap.Code" placeholder="New Code"/> </td> <td> <input type="text" ng-model="newcap.Desc" placeholder="Description" /> </td> <td> <a href="#" ng-click="AddCapability()"><i class="fa fa-plus-circle green" title="Add Capability"></i></a> </td> </tr> </tbody> </table> </div> <!-- /table-responsive --> </div> </div> </form> </div>
gpl-3.0
davosmith/moodle-block_openiframe
lang/en/block_openiframe.php
735
<?php // This file is part of the Open iframe block for Moodle // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. $string['pluginname'] = 'Open Iframe';
gpl-3.0
mater06/LEGOChimaOnlineReloaded
LoCO Client Files/Decompressed Client/Extracted DLL/Wb.Lpw.Game.Common/Wb/Lpw/Game/Common/Descriptions/StagingTaskDesc_PlaceNUEDelimiter.cs
784
// Decompiled with JetBrains decompiler // Type: Wb.Lpw.Game.Common.Descriptions.StagingTaskDesc_PlaceNUEDelimiter // Assembly: Wb.Lpw.Game.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null // MVID: 3C4BDCBA-73F8-4BAA-AC19-A98EC2D71189 // Assembly location: C:\Users\CGA Computer\Desktop\LEGO Universe Stuff\LOCO Server\Unity Web Player Extractor\Saved Files\LOCO Server.unity3d_unpacked\Wb.Lpw.Game.Common.dll using Wb.Lpw.Shared.Common.DataTypes; namespace Wb.Lpw.Game.Common.Descriptions { public class StagingTaskDesc_PlaceNUEDelimiter : StagingTaskBaseDesc { public DBBoolean EnableDelimiter; public Vector3 Position; public float Length; public override eStagingTask GetEnum() { return eStagingTask.PlaceNUEDelimiter; } } }
gpl-3.0
sunyifan112358/nyanRepo
src/lib/class/array.h
5235
/* * Multi2Sim * Copyright (C) 2013 Rafael Ubal (ubal@ece.neu.edu) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef LIB_CLASS_LIST_H #define LIB_CLASS_ARRAY_H #include "class.h" /* * Class 'Array' */ #define ArrayForEach(_array, _object, _class) \ for ((_object) = as##_class(ArrayHead((_array))); \ !ArrayIsEnd((_array)); \ (_object) = as##_class(ArrayNext((_array)))) typedef enum { ArrayErrOK = 0, ArrayErrBounds, ArrayErrNotFound, ArrayErrEmpty, ArrayErrEnd } ArrayError; CLASS_BEGIN(Array, Object) /* Number of elements */ int count; /* Error code */ ArrayError error; /* Allocated size */ int size; /* Pointers in list */ int head; int tail; /* Internal iterator */ int index; /* Elements */ Object **array; CLASS_END(Array) void ArrayCreate(Array *self); void ArrayCreateWithSize(Array *self, int size); void ArrayDestroy(Array *self); /* Dump the content of the array by calling each object's 'Dump' virtual method * followed by a newline character. */ void ArrayDump(Object *self, FILE *f); /* Dump the content of the array by calling each object's 'Dump' virtual method * and printing string 'first' initially, 'last' finally, and 'middle' between * every pair of elements. */ void ArrayDumpWithDelim(Array *self, FILE *f, const char *first, const char *middle, const char *last); /* Clear the content of the array. Freeing the elements that were contained * before the call is the responsibility of the caller. Set the error code to * 'ArrayErrOK' and the internal iterator to 0. */ void ArrayClear(Array *self); /* Free all objects added to the array with a call to 'delete()', and clear the * content of the list. This call always succeeds and updates the error code. */ void ArrayDeleteObjects(Array *self); /* Add an object at the end of the array and set the error code to 'ArrayErrOK'. * The internal iterator is set to point to the last element of the array. */ void ArrayAdd(Array *self, Object *object); /* Obtain the element at position 'index'. If 'index' is out of bounds, NULL is * returned and the error code is set to 'ArrayErrBounds'. */ Object *ArrayGet(Array *self, int index); /* Set the element at position 'index' to 'object'. If 'index' is out of bounds, * the error code is set to 'ArrayErrBounds'. The internal iterator is moved to * position 'index'. */ void ArraySet(Array *self, int index, Object *object); /* Insert element 'object' at position 'index'. If 'index' is less than 0 or * greater than 'Array->count', the error code is set to 'ArrayErrBounds'. Set * the internal iterator to 'index'. */ void ArrayInsert(Array *self, int index, Object *object); /* Return the index of the first occurrence of 'object' in the array. If not * found, -1 is returned and the error code is set to 'ArrayErrNotFound'. */ int ArrayFind(Array *self, Object *object); /* Remove the object at position 'index' and return it. If 'index' is out of * bounds, NULL is returned and the error code is set to 'ArrayErrBounds'. The * internal iterator is set to 'index' (which is past the end of the array if * the removed element was the last). */ Object *ArrayRemove(Array *self, int index); /* Sort the content of the list using virtual function 'Compare' of the * contained objects. */ void ArraySort(Array *self); /* Set the internal iterator to the first element of the array and return the * object at that position. If the array is empty, return NULL and set the error * code to 'ArrayErrEmpty'. */ Object *ArrayHead(Array *self); /* Set the internal iterator to the last element of the array and return the * object at that position. If the array is empty, return NULL and set the error * code to 'ArrayErrEmpty'. */ Object *ArrayTail(Array *self); /* Move the internal iterator one position forward and return the object at that * position. If the end of the array is reached for the first time, return NULL * and set the error code to 'ArrayErrEnd'. If the iterator was already at the * end of the array, return NULL as well and set the error code to * 'ArrayErrBounds'. */ Object *ArrayNext(Array *self); /* Move the internal iterator one position backward and return the object at * that position. If the iterator was already at the beginning of the list, NULL * is returned and the error code is set to 'ArrayErrBounds'. */ Object *ArrayPrev(Array *self); /* Return true if the internal iterator points past the end of the array. If so, * the error code is set to 'ArrayErrEnd'. */ int ArrayIsEnd(Array *self); #endif
gpl-3.0
simonwendel/meanieban
client/test/utilities/smallestsolvablesolved.js
629
;(function() { 'use strict'; /*this is only to be used in tests, so the same grid doesn't need to be repeated over and over. it is the smallest solvable level that can be produced in Sokoban, but already solved.*/ angular.module('meanieBanApp') .factory('smallestSolvableSolved', smallestSolvableSolved); function smallestSolvableSolved(tileUtility) { return tileUtility.stringGridToChars([ ['wall', 'wall', 'wall', 'wall', 'wall'], ['wall', 'box-docked', 'worker', 'floor', 'wall'], ['wall', 'wall', 'wall', 'wall', 'wall'] ]); } })();
gpl-3.0
HoraceAndTheSpider/amiberry
guisan-dev/include/guisan/mouselistener.hpp
6607
/* _______ __ __ __ ______ __ __ _______ __ __ * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / / * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / / * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ * * Copyright (c) 2004, 2005, 2006, 2007 Olof Naessén and Per Larsson * * Js_./ * Per Larsson a.k.a finalman _RqZ{a<^_aa * Olof Naessén a.k.a jansem/yakslem _asww7!uY`> )\a// * _Qhm`] _f "'c 1!5m * Visit: http://guichan.darkbits.org )Qk<P ` _: :+' .' "{[ * .)j(] .d_/ '-( P . S * License: (BSD) <Td/Z <fP"5(\"??"\a. .L * Redistribution and use in source and _dV>ws?a-?' ._/L #' * binary forms, with or without )4d[#7r, . ' )d`)[ * modification, are permitted provided _Q-5'5W..j/?' -?!\)cam' * that the following conditions are met: j<<WP+k/);. _W=j f * 1. Redistributions of source code must .$%w\/]Q . ."' . mj$ * retain the above copyright notice, ]E.pYY(Q]>. a J@\ * this list of conditions and the j(]1u<sE"L,. . ./^ ]{a * following disclaimer. 4'_uomm\. )L);-4 (3= * 2. Redistributions in binary form must )_]X{Z('a_"a7'<a"a, ]"[ * reproduce the above copyright notice, #}<]m7`Za??4,P-"'7. ).m * this list of conditions and the ]d2e)Q(<Q( ?94 b- LQ/ * following disclaimer in the <B!</]C)d_, '(<' .f. =C+m * documentation and/or other materials .Z!=J ]e []('-4f _ ) -.)m]' * provided with the distribution. .w[5]' _[ /.)_-"+? _/ <W" * 3. Neither the name of Guichan nor the :$we` _! + _/ . j? * names of its contributors may be used =3)= _f (_yQmWW$#( " * to endorse or promote products derived - W, sQQQQmZQ#Wwa].. * from this software without specific (js, \[QQW$QWW#?!V"". * prior written permission. ]y:.<\.. . * -]n w/ ' [. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT )/ )/ ! * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY < (; sac , ' * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, ]^ .- % * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF c < r * MERCHANTABILITY AND FITNESS FOR A PARTICULAR aga< <La * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 5% )P'-3L * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR _bQf` y`..)a * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ,J?4P'.P"_(\?d'., * EXEMPLARY, OR CONSEQUENTIAL DAMAGES _Pa,)!f/<[]/ ?" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT _2-..:. .r+_,.. . * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ?a.<%"' " -'.a_ _, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ^ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef GCN_MOUSELISTENER_HPP #define GCN_MOUSELISTENER_HPP #include "guisan/mouseevent.hpp" #include "guisan/platform.hpp" namespace gcn { /** * Mouse listeners base class. Inorder to use this class you must inherit * from it and implements it's functions. MouseListeners listen for mouse * events on a Widgets. When a Widget recives a mouse event, the * corresponding function in all it's mouse listeners will be called. * * @see Widget::addMouseListener */ class GCN_CORE_DECLSPEC MouseListener { public: /** * Destructor. */ virtual ~MouseListener() = default; /** * Called when the mouse has entered into the widget area. * * @param mouseEvent describes the event. * @since 0.6.0 */ virtual void mouseEntered(MouseEvent& mouseEvent) { } /** * Called when the mouse has exited the widget area. * * @param mouseEvent describes the event. */ virtual void mouseExited(MouseEvent& mouseEvent) { } /** * Called when a mouse button has been pressed on the widget area. * * NOTE: A mouse press is NOT equal to a mouse click. * Use mouseClickMessage to check for mouse clicks. * * @param mouseEvent describes the event. * @since 0.6.0 */ virtual void mousePressed(MouseEvent& mouseEvent) { } /** * Called when a mouse button has been released on the widget area. * * @param mouseEvent describes the event. */ virtual void mouseReleased(MouseEvent& mouseEvent) { } /** * Called when a mouse button is pressed and released (clicked) on * the widget area. * * @param mouseEvent describes the event. * @since 0.6.0 */ virtual void mouseClicked(MouseEvent& mouseEvent) { } /** * Called when the mouse wheel has moved up on the widget area. * * @param mouseEvent describes the event. * @since 0.6.0 */ virtual void mouseWheelMovedUp(MouseEvent& mouseEvent) { } /** * Called when the mouse wheel has moved down on the widget area. * * @param mousEvent describes the event. * @since 0.6.0 */ virtual void mouseWheelMovedDown(MouseEvent& mouseEvent) { } /** * Called when the mouse has moved in the widget area and no mouse button * has been pressed (i.e no widget is being dragged). * * @param mouseEvent describes the event. * @since 0.6.0 */ virtual void mouseMoved(MouseEvent& mouseEvent) { } /** * Called when the mouse has moved and the mouse has previously been * pressed on the widget. * * @param mouseEvent describes the event. * @since 0.6.0 */ virtual void mouseDragged(MouseEvent& mouseEvent) { } protected: /** * Constructor. * * You should not be able to make an instance of MouseListener, * therefore its constructor is protected. To use MouseListener * you must inherit from this class and implement it's * functions. */ MouseListener() = default; }; } #endif // end GCN_MOUSELISTENER_HPP
gpl-3.0
kTT/adjule
adjule-ws/src/main/java/pl/adjule/web/rest/submission/detail/AddSubmissionView.java
227
package pl.adjule.web.rest.submission.detail; import lombok.Data; @Data public class AddSubmissionView { private String problemCode; private String userLogin; private String language; private String source; }
gpl-3.0
vtselfa/m2s
tools/libm2s-cuda/cuda_inc/thrust/detail/host/adjacent_difference.h
1520
/* * Copyright 2008-2011 NVIDIA Corporation * * 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. */ /*! \file adjacent_difference.h * \brief Host implementation of adjacent_difference. */ #pragma once #include <thrust/iterator/iterator_traits.h> namespace thrust { namespace detail { namespace host { template <class InputIterator, class OutputIterator, class BinaryFunction> OutputIterator adjacent_difference(InputIterator first, InputIterator last, OutputIterator result, BinaryFunction binary_op) { typedef typename thrust::iterator_traits<InputIterator>::value_type InputType; if (first == last) return result; InputType curr = *first; *result = curr; while (++first != last) { InputType next = *first; *++result = binary_op(next, curr); curr = next; } return ++result; } } // end namespace host } // end namespace detail } // end namespace thrust
gpl-3.0
PayLane/paylane_woocommerce
assets/js/paylane-woocommerce.js
28619
'use strict';(function(){function I(a){return 4<a?"znak\u00f3w":1<a?"znaki":"znak"}function S(a,b){return Object.keys(a).reduce(function(c,e){c[e]=b(a[e]);return c},{})}function f(a){return"undefined"!==typeof a}function d(a){return"function"===typeof a}function v(a){return"[object RegExp]"===Object.prototype.toString.call(a)}function J(a,b,c,e=!1,d=0){let T=new U(c,d);b.split(" ").forEach((b)=>{a.addEventListener(b,function(){T.run(...arguments)},e)})}function y(a=null){return null===a?"":(a+"").replace("/", "")}function w(a=null){return null===a?"":(a+"").split(" ").join("")}function V(a){a=w(a).split("/");70>a[1]?a[1]="20"+a[1]:100>a[1]&&(a[1]="19"+a[1]);return{month:a[0],year:a[1]}}function W(a,b={}){let c=[];X.forEach((e)=>{if(e.HTMLElementHasRule(a)||b[e.ruleName]){let d=b[e.ruleName]||{};d.element=a;e=new e(d);e.init();c.push(e)}});return c}function Y(a,b={}){let c=[];if(g.HTMLElementHasRule(a)||b.required)b=b.required||{},b.element=a,a=new g(b),a.init(),c.push(a);return c}function K(a,b,c){if("input"=== a.nodeName.toLowerCase()||"select"===a.nodeName.toLowerCase())return new Z(a,{validator:W(a,b.validator).concat(b.validator.rules||[]),errorMessageElement:b.errorMessageElement,name:b.name},c);if(a.hasAttribute("data-mc-field-radio"))return new aa(a,{validator:Y(a,b.validator).concat(b.validator.rules||[]),errorMessageElement:b.errorMessageElement,name:b.name},c)}function L(a){let b=new ba(a.element,{name:a.name,fields:[],validator:[],errorMessageElement:a.errorMessageElement});S(a.fields,(a)=>b.fields.push(K(a.element, a,b)));return b}function ca(){let a=document.querySelector(h.card);return L({name:"card",element:a,fields:{number:{name:"number",element:a.querySelector('input[name="cc_card_number"]'),validator:{required:{value:!0},rules:[new z]},errorMessageElement:a.querySelector('[data-paylane-error-message="cc_card_number"]')},expirationDate:{name:"expirationDate",element:a.querySelector('input[name="cc_expiration_date"]'),validator:{required:{value:!0},rules:[new A]},errorMessageElement:a.querySelector('[data-paylane-error-message="cc_expiration_date"]')}, securityCode:{name:"securityCode",element:a.querySelector('input[name="cc_security_code"]'),validator:{required:{value:!0},rules:[new B]},errorMessageElement:a.querySelector('[data-paylane-error-message="cc_security_code"]')},nameOnCard:{name:"nameOnCard",element:a.querySelector('input[name="cc_name_on_card"]'),validator:{required:{value:!0},minLength:{value:2,errorMessage:k.nameOnCard.minLength},maxLength:{value:50,errorMessage:k.nameOnCard.maxLength}},errorMessageElement:a.querySelector('[data-paylane-error-message="cc_name_on_card"]')}}, errorMessageElement:a.querySelector('[data-paylane-error-message="credit_card"]')})}function da(){let a=document.querySelector(h.sepaDirectDebit);return L({element:a,name:"sepaDirectDebit",fields:{accountHolder:{name:"accountHolder",element:a.querySelector('input[name="sepa_account_holder"]'),validator:{required:{value:!0},minLength:{value:2,errorMessage:k.nameOnCard.minLength},maxLength:{value:50,errorMessage:k.nameOnCard.maxLength}},errorMessageElement:a.querySelector('[data-paylane-error-message="sepa_account_holder"]')}, iban:{name:"iban",element:a.querySelector('input[name="sepa_iban"]'),validator:{required:{value:!0},pattern:{value:/^[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{11}([a-zA-Z0-9]?){0,16}$/}},errorMessageElement:a.querySelector('[data-paylane-error-message="sepa_iban"]')},bic:{name:"bic",element:a.querySelector('input[name="sepa_bic"]'),validator:{required:{value:!0},pattern:{value:/^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$/}},errorMessageElement:a.querySelector('[data-paylane-error-message="sepa_bic"]')},accountCountry:{name:"accountCountry", element:a.querySelector('[name="sepa_account_country"]'),validator:{required:{value:!0}},errorMessageElement:a.querySelector('[data-paylane-error-message="sepa_account_country"]')}}})}function ea(){let a=document.querySelector(h.polishBankTransfer),b=a.querySelector('[data-mc-field-radio="transfer_bank"]');return K(b,{name:"polishBankTransfer",element:b,validator:{required:{value:!0}},errorMessageElement:a.querySelector('[data-paylane-error-message="transfer_bank"]')})}function fa(a){let b=document.querySelector('form[name="checkout"]'); b||(b=document.querySelector("form#order_review"));return new ha(b,{fields:a})}function x(){return Array.from(M()).find((a)=>a.checked).value||""}function M(){return document.querySelectorAll('input[name="payment_method"]')}function N(){let a=document.querySelector('input[name="billing_first_name"]'),b=document.querySelector('input[name="billing_last_name"]'),c="";a&&a.value&&(c=a.value);b&&b.value&&(c=`${c} ${b.value}`);return c}function C(a=null){a=null===a?jQuery('input.paylane-polish-bank-transfer__input[name="transfer_bank"]:checked').val(): a;void 0===a?jQuery("#paylane-payment-form-bank-transfer-choosed-method").text("-"):jQuery("#paylane-payment-form-bank-transfer-choosed-method").text(ia[a])}let k={defaults:{required:"To pole jest wymagane",pattern:"Niepoprawny format pola",cardNumber:"Niepoprawny numer karty",cardExpirationDate:"Niepoprawny data wyga\u015bni\u0119cia karty",cardSecurityCode:"Niepoprawny kod CVV/CVC"},nameOnCard:{minLength:"Wymagane minimum 2 znaki",maxLength:"Wymagane maksimum 50 znak\u00f3w"}},ia={AB:"Alior Bank", AS:"T-Mobile Us\u0142ugi Bankowe",MT:"mTransfer",IN:"Inteligo",IP:"iPKO",MI:"Millenium",CA:"Credit Agricole",PP:"Poczta Polska",PCZ:"Bank Pocztowy",IB:"Idea Bank",PO:"Pekao S.A.",GB:"Getin Bank",IG:"ING Bank \u015al\u0105ski",WB:"Santander Bank",PB:"Bank BG\u017b BNP PARIBAS",CT:"Citi",PL:"Plus Bank",NP:"Noble Pay",BS:"Bank Sp\u00f3\u0142dzielczy",NB:"NestBank",PBS:"Podkarpacki Bank Sp\u00f3\u0142dzielczy",SGB:"Sp\u00f3\u0142dzielcza Grupa Bankowa",BP:"Bank BPH",OH:"Other bank",BLIK:"BLIK"};var O= ()=>"Niepoprawny adres email",P=(a)=>{let b=I(a);return`Wymagane maksimum ${a} ${b}`},Q=(a)=>{let b=I(a);return`Wymagane minimum ${a} ${b}`},D=()=>"Niepoprawny format pola",r=()=>"To pole jest wymagane",E=()=>"Niepoprawny numer karty",F=()=>"Niepoprawny data wyga\u015bni\u0119cia karty",G=()=>"Niepoprawny kod CVV/CVC";class U{constructor(a,b=250){this.callback=a;this.delay=b;this.timer=void 0}run(...a){this.timer&&clearTimeout(this.timer);this.timer=setTimeout(()=>{this.callback(...arguments)},this.delay)}} class z{constructor(a={}){this.isValid=this.value=!0;f(a.value)&&(this.value=!!a.value);a.errorMessage&&(this.errorMessage=a.errorMessage)}get name(){return z.ruleName}static get ruleName(){return"cardNumber"}static get DEFAULT_TEXT(){return E}static set DEFAULT_TEXT(a){E=d(a)?a:()=>a}get errorMessage(){let a=this._text||z.DEFAULT_TEXT;return d(a)?a(this.value):a}set errorMessage(a){this._text=a}init(){return this}isEnabled(){return!!this.value}validate(a){if(this.isEnabled()&&a){var b=(a+"").replace(/\s+|-/g, "");if(a=10<=b.length&&16>=b.length){{let c,e,d,f;a=!0;e=0;c=(b+"").split("").reverse();d=0;for(f=c.length;d<f;d++)b=c[d],b=parseInt(b,10),(a=!a)&&(b*=2),9<b&&(b-=9),e+=b;a=0===e%10}}}else a=!0;this.isValid=a;return{name:this.name,errorMessage:this.errorMessage,isValid:this.isValid}}}class A{constructor(a={}){this.isValid=this.value=!0;f(a.value)&&(this.value=!!a.value);a.errorMessage&&(this.errorMessage=a.errorMessage)}get name(){return A.ruleName}static get ruleName(){return"cardExpirationDate"}static get DEFAULT_TEXT(){return F}static set DEFAULT_TEXT(a){F= d(a)?a:()=>a}get errorMessage(){let a=this._text||A.DEFAULT_TEXT;return d(a)?a(this.value):a}set errorMessage(a){this._text=a}init(){return this}isEnabled(){return!!this.value}validate(a){if(this.isEnabled()&&a){{var b=void 0;let c,e;b?(a=y(a),b=y(b)):(b=(a+"").split("/"),a=w(b[0]),b=w(b[1]));a=!!/^\d+$/.test(a)&&!!/^\d+$/.test(b)&&1<=a&&12>=a&&(2===b.length&&(b=70>b?"20"+b:"19"+b),4===b.length&&(e=new Date(b,a),c=new Date,e.setMonth(e.getMonth()-1),e.setMonth(e.getMonth()+1,1),e>c))}}else a=!0;this.isValid= a;return{name:this.name,errorMessage:this.errorMessage,isValid:this.isValid}}}class B{constructor(a={}){this.isValid=this.value=!0;f(a.value)&&(this.value=!!a.value);a.errorMessage&&(this.errorMessage=a.errorMessage)}get name(){return B.ruleName}static get ruleName(){return"cardSecurityCode"}static get DEFAULT_TEXT(){return G}static set DEFAULT_TEXT(a){G=d(a)?a:()=>a}get errorMessage(){let a=this._text||B.DEFAULT_TEXT;return d(a)?a(this.value):a}set errorMessage(a){this._text=a}init(){return this}isEnabled(){return!!this.value}validate(a){if(this.isEnabled()&& a){var b=a;a=(b=y(b),/^\d+$/.test(b)&&3<=b.length&&4>=b.length)}else a=!0;this.isValid=a;return{name:this.name,errorMessage:this.errorMessage,isValid:this.isValid}}}class m{constructor(a={}){this.isValid=!0;this.value=a.value;a.errorMessage&&(this.errorMessage=a.errorMessage);a.element&&(this.element=a.element)}get name(){return m.ruleName}static get ruleName(){return"minLength"}static get DEFAULT_TEXT(){return Q}set DEFAULT_TEXT(a){Q=d(a)?a:()=>a}get errorMessage(){let a=this._text||m.DEFAULT_TEXT; return d(a)?a(this.value):a}set errorMessage(a){this._text=a}init(){if(this.hasHTMLAttribute()){let a=this.getHTMLAttribute();a!==this.value&&(this.value=a)}else f(this.value)&&this.setHTMLAttribute(this.value);return this}isEnabled(){return f(this.value)&&0<this.value}validate(a){this.isValid=this.isEnabled()&&a?a.length>=this.value:!0;return{name:this.name,errorMessage:this.errorMessage,isValid:this.isValid}}setValue(a){this.value=a;this.setHTMLAttribute(this.value);return this}hasHTMLAttribute(){return m.hasHTMLAttribute(this.element)}getHTMLAttribute(){return m.getHTMLAttribute(this.element)}setHTMLAttribute(a){m.setHTMLAttribute(this.element, a)}static hasHTMLAttribute(a){return a.hasAttribute("minlength")&&""!==a.getAttribute("minlength")}static getHTMLAttribute(a){return parseInt(a.getAttribute("minlength"))}static setHTMLAttribute(a,b){a.setAttribute("minlength",b)}static HTMLElementHasRule(a){return m.hasHTMLAttribute(a)}}class n{constructor(a={}){this.isValid=!0;this.value=!!a.value;a.errorMessage&&(this.errorMessage=a.errorMessage);a.element&&(this.element=a.element)}get name(){return n.ruleName}static get ruleName(){return"required"}static get DEFAULT_TEXT(){return r}static set DEFAULT_TEXT(a){r= d(a)?a:()=>a}get errorMessage(){let a=this._text||n.DEFAULT_TEXT;return d(a)?a(this.value):a}set errorMessage(a){this._text=a}init(){this.hasHTMLAttribute()?this.value=!0:this.value&&this.setHTMLAttribute(this.value);return this}isEnabled(){return!!this.value}validate(a){this.isValid=this.isEnabled()?!!a:!0;return{name:this.name,errorMessage:this.errorMessage,isValid:this.isValid}}setValue(a){this.value=!!a;this.setHTMLAttribute(this.value);return this}hasHTMLAttribute(){return n.hasHTMLAttribute(this.element)}getHTMLAttribute(){return n.getHTMLAttribute(this.element)}setHTMLAttribute(a){n.setHTMLAttribute(this.element, a)}static hasHTMLAttribute(a){return a.hasAttribute("required")}static getHTMLAttribute(a){return a.hasAttribute("required")}static setHTMLAttribute(a,b){b?a.setAttribute("required","required"):a.removeAttribute("required")}static HTMLElementHasRule(a){return n.hasHTMLAttribute(a)}}let R=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/;class l{constructor(a={}){this.isValid= !0;this.value=!!a.value;a.errorMessage&&(this.errorMessage=a.errorMessage);a.element&&(this.element=a.element)}get name(){return l.ruleName}static get EMAIL_REGEXP(){return R}static set EMAIL_REGEXP(a){R=a}static get ruleName(){return"email"}static get DEFAULT_TEXT(){return O}static set DEFAULT_TEXT(a){O=d(a)?a:()=>a}get errorMessage(){let a=this._text||l.DEFAULT_TEXT;return d(a)?a(this.value):a}set errorMessage(a){this._text=a}init(){this.hasHTMLAttribute()?this.value=!0:this.value&&this.setHTMLAttribute(this.value); return this}isEnabled(){return!!this.value}validate(a){this.isValid=this.isEnabled()&&a?l.EMAIL_REGEXP.test(a):!0;return{name:this.name,errorMessage:this.errorMessage,isValid:this.isValid}}setValue(a){this.value=!!a;this.setHTMLAttribute(this.value);return this}hasHTMLAttribute(){return l.hasHTMLAttribute(this.element)}getHTMLAttribute(){return l.getHTMLAttribute(this.element)}setHTMLAttribute(a){l.setHTMLAttribute(this.element,a)}static hasHTMLAttribute(a){return"email"===a.getAttribute("type")}static getHTMLAttribute(a){return"email"=== a.getAttribute("type")}static setHTMLAttribute(a,b){b?a.setAttribute("type","email"):a.setAttribute("type","text")}static HTMLElementHasRule(a){return l.hasHTMLAttribute(a)}}class p{constructor(a={}){this.isValid=!0;this.value=a.value;a.errorMessage&&(this.errorMessage=a.errorMessage);a.element&&(this.element=a.element)}get name(){return p.ruleName}static get ruleName(){return"maxLength"}static get DEFAULT_TEXT(){return P}set DEFAULT_TEXT(a){P=d(a)?a:()=>a}get errorMessage(){let a=this._text||p.DEFAULT_TEXT; return d(a)?a(this.value):a}set errorMessage(a){this._text=a}init(){if(this.hasHTMLAttribute()){let a=this.getHTMLAttribute();a!==this.value&&(this.value=a)}else f(this.value)&&this.setHTMLAttribute(this.value);return this}isEnabled(){return f(this.value)&&0<this.value}validate(a){this.isValid=this.isEnabled()?a.length<=this.value:!0;return{name:this.name,errorMessage:this.errorMessage,isValid:this.isValid}}setValue(a){this.value=a;this.setHTMLAttribute(this.value);return this}hasHTMLAttribute(){return p.hasHTMLAttribute(this.element)}getHTMLAttribute(){return p.getHTMLAttribute(this.element)}setHTMLAttribute(a){p.setHTMLAttribute(this.element, a)}static hasHTMLAttribute(a){return a.hasAttribute("maxlength")&&""!==a.getAttribute("maxlength")}static getHTMLAttribute(a){return parseInt(a.getAttribute("maxlength"))}static setHTMLAttribute(a,b){a.setAttribute("maxlength",b)}static HTMLElementHasRule(a){return p.hasHTMLAttribute(a)}}class q{constructor(a={}){this.isValid=!0;this.value=a.value;a.errorMessage&&(this.errorMessage=a.errorMessage);a.element&&(this.element=a.element)}get name(){return q.ruleName}static get ruleName(){return"pattern"}static get DEFAULT_TEXT(){return D}set DEFAULT_TEXT(a){D= d(a)?a:()=>a}get errorMessage(){let a=this._text||q.DEFAULT_TEXT;return d(a)?a(this.value):a}set errorMessage(a){this._text=a}init(){if(this.hasHTMLAttribute()){let c=this.getHTMLAttribute();var a;if(a=v(c)){a=c;var b=this.value;a=v(a)?v(b)?a.toString()===b.toString():!1:!1;a=!a}a&&(this.value=c)}else f(this.value)&&this.setHTMLAttribute(this.value);return this}isEnabled(){return f(this.value)}validate(a){this.isValid=this.isEnabled()&&a?this.value.test(a):!0;return{name:this.name,errorMessage:this.errorMessage, isValid:this.isValid}}setValue(a){if(v(a))this.value=a;else if("string"===typeof a)this.value=new RegExp(a);else if("number"===typeof a)this.value=new RegExp(a.toString());else return console.error("pattern value must be RegExp, String or Number. Your value:",a),this;this.setHTMLAttribute(this.value);return this}hasHTMLAttribute(){return q.hasHTMLAttribute(this.element)}getHTMLAttribute(){return q.getHTMLAttribute(this.element)}setHTMLAttribute(a){q.setHTMLAttribute(this.element,a)}static hasHTMLAttribute(a){return a.hasAttribute("pattern")&& ""!==a.getAttribute("pattern")}static getHTMLAttribute(a){return a.getAttribute("pattern")}static setHTMLAttribute(a,b){a.setAttribute("pattern",b)}static HTMLElementHasRule(a){return q.hasHTMLAttribute(a)}}let X=[n,m,p,q,l];class H{constructor(a){this.toAdd=[];this.toRemove=[];this.element=a}createValidationClasses(a,b=""){let c=H.CLASS_PREFIX;""!=b&&(c=c+"-"+b.toLocaleLowerCase());a?(this.toAdd.push(`${c}-valid`),this.toRemove.push(`${c}-invalid`)):(this.toAdd.push(`${c}-invalid`),this.toRemove.push(`${c}-valid`)); return this}createValidatorRuleStateClasses(a){this.createValidationClasses(a.isValid,a.name);return this}createValidatorStateClasses(a,b){a.rules.forEach((a)=>this.createValidatorRuleStateClasses(a));this.createValidationClasses(a.isValid,b);return this}renderClasses(){this.element.classList.remove(...this.toRemove);this.element.classList.add(...this.toAdd);this.toRemove=[];this.toAdd=[];return this}}H.CLASS_PREFIX="paylane";class t{constructor(a,b,c){this.rules=[];this.isValid=!0;this.errorMessage= "";this.toggleErrorOnValidate=!0;this.afterValidate=function(){};this.field=a;this.rules=b||[];c&&(this.errorMessageElement=c)}validate(a=this.toggleErrorOnValidate){let b=this.validateChildren(this.field.fields),c=this.validateSelf(this.field.getValue(),this.field);this.isValid=b.isValid&&c.isValid;this.errorMessage=c.errorMessage||"";(new H(this.field.element)).createValidatorStateClasses(b,"child").createValidatorStateClasses(c,"self").createValidationClasses(this.isValid).renderClasses();a&&(this.hideErrorMessage(), c.isValid||this.showErrorMessage());this.afterValidate(this);return this}validateSelf(a,b){if(!this.rules.length)return{rules:[],errorMessage:"",isValid:!0};let c=this.rules.map((c)=>{c.validate(a,b);return c}),e=c.find((a)=>!a.isValid);return{rules:c,errorMessage:e?e.errorMessage:"",isValid:!e}}validateChildren(a=[]){if(!a.length)return{rules:[],errorMessage:"",isValid:!0};a=a.map((a)=>{a.validator.validate();return{name:a.getName(),errorMessage:a.validator.errorMessage,isValid:a.validator.isValid}}); let b=a.find((a)=>!a.isValid);return{rules:a,errorMessage:b?b.errorMessage:"",isValid:!b}}hideAllErrorMessages(){this.hideErrorMessage().hideChildrenErrorMessages();return this}hideChildrenErrorMessages(){if(!this.field.fields)return this;this.field.fields.forEach((a)=>{a.validator.hideErrorMessage()});return this}hideErrorMessage(){if(!this.errorMessageElement)return this;for(;this.errorMessageElement.firstChild;)this.errorMessageElement.removeChild(this.errorMessageElement.firstChild);return this}showErrorMessage(a= this.errorMessage){let b=document.createElement("span");b.innerText=a;this.errorMessageElement.appendChild(b);return this}addRule(a){this.rules.push(a);return this}updateRule(a,b){let c=this.rules.findIndex((b)=>b.name===a);0>c&&this.addRule(b);this.rules[c]=b;return this}getRule(a){return this.rules.find((b)=>b.name===a)}}class Z{constructor(a,b,c=null){this.element=a;(a=b.type)||(a=this.element,a="input"===a.nodeName.toLowerCase()?a.hasAttribute("type")&&""!==a.getAttribute("type")?a.getAttribute("type"): "text":a.nodeName.toLowerCase());this.type=a;this.validator=new t(this,b.validator,b.errorMessageElement);b.name&&(this.name=b.name);this.parent=c;this.init()}get value(){return(this.element.value||"").trim()}set value(a){this.element.value=(a+"").trim()}getValue(){return this.value}clearValue(){this.value="";return this}getName(){return this.name||this.element.getAttribute("name")}init(){this.validator.validate(!1);J(this.element,"change keydown",()=>{this.validator.validate()},!1,250)}}class aa{constructor(a, b,c=null){this.type="radio";this.element=a;this.inputs=a.querySelectorAll('input[type="radio"]');this.validator=new t(this,b.validator,b.errorMessageElement);b.name&&(this.name=b.name);this.parent=c;this.init()}get value(){let a=Array.from(this.inputs).find((a)=>!!a.checked);return a?a.value:""}set value(a){this.inputs.forEach(function(b){b.checked=b.value===a})}getValue(){return this.value}clearValue(){this.inputs.forEach(function(a){a.checked=!1});return this}getName(){return this.name||this.element.getAttribute("name")}init(){this.validator.validate(!1); let a=()=>{this.validator.validate()};this.inputs.forEach(function(b){J(b,"change",a,!1,250)})}}class ba{constructor(a,b){this.type="fields-group";this.parent=null;this.fields=[];this.onSubmit=function(){};this.element=a;this.validator=new t(this,b.validator);this.validator=new t(this,b.validator,b.errorMessageElement);this.fields=b.fields;this.name=b.name}getName(){return this.name||this.element.getAttribute("id")}getField(a){return this.fields.find((b)=>b.getName()===a)}getValue(){let a={};this.fields.forEach((b)=> {a[b.getName()]=b.getValue()});return a}clearValue(){this.fields.forEach((a)=>{a.clearValue()});return this}init(){return this}}class g{constructor(a={}){this.isValid=!0;this.value=!!a.value;a.errorMessage&&(this.errorMessage=a.errorMessage);a.element&&(this.element=a.element)}get name(){return g.ruleName}static get ruleName(){return"required"}static get DEFAULT_TEXT(){return r}static set DEFAULT_TEXT(a){r=d(a)?a:()=>a}get errorMessage(){let a=this._text||g.DEFAULT_TEXT;return d(a)?a(this.value): a}set errorMessage(a){this._text=a}init(){this.hasHTMLAttribute()?(this.value=!0,this.setValue(!0)):this.value&&this.setHTMLAttribute(this.value);return this}isEnabled(){return!!this.value}validate(a){this.isValid=this.isEnabled()?!!a:!0;return{name:this.name,errorMessage:this.errorMessage,isValid:this.isValid}}setValue(a){this.value=!!a;this.setHTMLAttribute(this.value);return this}hasHTMLAttribute(){return g.hasHTMLAttribute(this.element)}getHTMLAttribute(){return g.getHTMLAttribute(this.element)}setHTMLAttribute(a){g.setHTMLAttribute(this.element, a)}static hasHTMLAttribute(a){return!!Array.from(a.querySelectorAll('input[type="radio"]')).find((a)=>a.hasAttribute("required"))}static getHTMLAttribute(a){return g.hasHTMLAttribute(a)}static setHTMLAttribute(a,b){return a.querySelectorAll('input[type="radio"]').forEach((a)=>{b?a.setAttribute("required","required"):a.removeAttribute("required")})}static HTMLElementHasRule(a){return g.hasHTMLAttribute(a)}}class ha{constructor(a,b){this.type="form";this.parent=null;this.fields=[];this.onSubmit=function(){}; this.element=a;this.validator=new t(this,b.validator);this.fields=b.fields}getField(a){return this.fields.find((b)=>b.getName()===a)}getName(){return this.element.getAttribute("id")}getValue(){let a={};this.fields.forEach((b)=>{a[b.getName()]=b.getValue()});return a}clearValue(){this.fields.forEach((a)=>{a.clearValue()});return this}init(){this.element.setAttribute("novalidate","true");return this}setOnSubmit(a){this.onSubmit=a}}let h={card:"#payment .payment_method_paylane_credit_card",polishBankTransfer:"#payment .payment_method_paylane_polish_bank_transfer", sepaDirectDebit:"#payment .payment_method_paylane_sepa_direct_debit"};r=()=>k.defaults.required;E=()=>k.defaults.cardNumber;F=()=>k.defaults.cardExpirationDate;G=()=>k.defaults.cardSecurityCode;D=()=>k.defaults.pattern;class ja{constructor(){this.generatingCardToken=this.hasCardToken=!1;this.tmpCardsData={number:"",expirationDate:"",securityCode:"",nameOnCard:""}}init(){let a=this,b=[];document.querySelector(h.card)&&(this.cardGroup=ca(),this.tokenInput=this.cardGroup.element.querySelector('input[name="payment_params_token"]'), b.push(this.cardGroup));document.querySelector(h.sepaDirectDebit)&&(this.sepaDirectDebitGroup=da(),b.push(this.sepaDirectDebitGroup));document.querySelector(h.polishBankTransfer)&&(this.polishBankTransferField=ea(),b.push(this.polishBankTransferField));0<b.length&&(this.checkoutForm=fa(b),this.checkoutFormButton&&this.checkoutFormButton.removeEventListener("click",(a)=>{this.onClickButtonSubmit(a)}),this.checkoutFormButton=document.querySelector("#place_order"),this.checkoutFormButton.addEventListener("click", (a)=>{this.onClickButtonSubmit(a)}),this.togglePaymentMethods(x()),this.checkoutForm.init(),M().forEach(function(b){b.addEventListener("change",function(){a.togglePaymentMethods(this.value)})}))}onClickButtonSubmit(a){this.mustOverideSubmit(x())&&(this.checkoutForm.validator.hideAllErrorMessages(),this.checkoutForm.validator.validate(),this.checkoutForm.validator.isValid?"paylane_credit_card"===x()&&(this.generatingCardToken?a.preventDefault():this.hasCardToken?(this.cloneCard(),this.clearCard(), this.toggleCardRequiredValidation(!1)):(a.preventDefault(),this.generatingCardToken=!0,this.generateToken((a)=>{this.tokenInput.value=a;this.hasCardToken=!0;this.generatingCardToken=!1;this.checkoutFormButton.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))},(a,c)=>{this.tokenInput.value="";this.generatingCardToken=this.hasCardToken=!1;this.cardGroup.validator.showErrorMessage(c)}))):a.preventDefault())}generateToken(a=()=>{},b=()=>{}){var c=V(this.cardGroup.getField("expirationDate").getValue()); c={cardNumber:w(this.cardGroup.getField("number").getValue()),expirationMonth:c.month,expirationYear:c.year,nameOnCard:this.cardGroup.getField("nameOnCard").getValue(),cardSecurityCode:this.cardGroup.getField("securityCode").getValue()};PayLane.card.generateToken(c,function(b){a(b)},function(a,c){b(a,c)})}togglePaymentMethods(a){document.querySelector(h.card)&&this.toggleCardGroup("paylane_credit_card"===a);document.querySelector(h.polishBankTransfer)&&this.togglePolishBankTransfer("paylane_polish_bank_transfer"=== a);document.querySelector(h.sepaDirectDebit)&&this.toggleSepaDDGroup("paylane_sepa_direct_debit"===a)}mustOverideSubmit(a){return"paylane_credit_card"===a||"paylane_polish_bank_transfer"===a||"paylane_sepa_direct_debit"===a}toggleCardGroup(a){this.toggleCardRequiredValidation(a);a?this.cardGroup.getField("nameOnCard").value=N():(this.clearCard(),this.tokenInput.value="",this.hasCardToken=!1);this.cardGroup.validator.hideAllErrorMessages()}cloneCard(){this.tmpCardsData.number=this.cardGroup.getField("number").value; this.tmpCardsData.expirationDate=this.cardGroup.getField("expirationDate").value;this.tmpCardsData.securityCode=this.cardGroup.getField("securityCode").value;this.tmpCardsData.nameOnCard=this.cardGroup.getField("nameOnCard").value}restoreCard(){this.cardGroup.getField("number").value=this.tmpCardsData.number;this.cardGroup.getField("expirationDate").value=this.tmpCardsData.expirationDate;this.cardGroup.getField("securityCode").value=this.tmpCardsData.securityCode;this.cardGroup.getField("nameOnCard").value= this.tmpCardsData.nameOnCard;this.removeCardFromCache();this.toggleCardRequiredValidation(!0)}removeCardFromCache(){this.tmpCardsData.number="";this.tmpCardsData.expirationDate="";this.tmpCardsData.securityCode="";this.tmpCardsData.nameOnCard=""}clearCard(){this.cardGroup.getField("number").clearValue();this.cardGroup.getField("expirationDate").clearValue();this.cardGroup.getField("securityCode").clearValue();this.cardGroup.getField("nameOnCard").clearValue()}toggleCardRequiredValidation(a){this.cardGroup.getField("number").validator.getRule("required").setValue(a); this.cardGroup.getField("expirationDate").validator.getRule("required").setValue(a);this.cardGroup.getField("securityCode").validator.getRule("required").setValue(a);this.cardGroup.getField("nameOnCard").validator.getRule("required").setValue(a)}togglePolishBankTransfer(a){this.polishBankTransferField.validator.getRule("required").setValue(a);a||this.polishBankTransferField.clearValue();this.polishBankTransferField.validator.hideAllErrorMessages()}toggleSepaDDGroup(a){this.sepaDirectDebitGroup.getField("accountHolder").validator.getRule("required").setValue(a); this.sepaDirectDebitGroup.getField("iban").validator.getRule("required").setValue(a);this.sepaDirectDebitGroup.getField("bic").validator.getRule("required").setValue(a);this.sepaDirectDebitGroup.getField("accountCountry").validator.getRule("required").setValue(a);if(a){if(this.sepaDirectDebitGroup.getField("accountHolder").value=N(),!this.sepaDirectDebitGroup.getField("accountCountry").element.hasAttribute("readonly")){a=this.sepaDirectDebitGroup.getField("accountCountry");var b=(b=document.querySelector('select[name="billing_country"]'))&& b.value?b.value+"":"";a.value=b}}else this.sepaDirectDebitGroup.getField("accountHolder").clearValue(),this.sepaDirectDebitGroup.getField("iban").clearValue(),this.sepaDirectDebitGroup.getField("bic").clearValue(),this.sepaDirectDebitGroup.getField("accountCountry").element.hasAttribute("readonly")||this.sepaDirectDebitGroup.getField("accountCountry").clearValue();this.sepaDirectDebitGroup.validator.validate();this.sepaDirectDebitGroup.validator.hideAllErrorMessages()}}let u=new ja;jQuery("body").bind("updated_checkout", function(){u.init()});document.addEventListener("DOMContentLoaded",function(){u.init();jQuery(document.body).on("updated_checkout init_checkout",()=>{u.init()});jQuery("body").on("updated_checkout",()=>{u.init()});jQuery(document.body).on("checkout_error",()=>{"paylane_credit_card"===x()&&u.restoreCard()});C();jQuery("body").on("click","div.paylane-polish-bank-transfer",(a)=>{a=jQuery(a.target).val();C(a)});jQuery("body").on("click","wc_payment_method",()=>{C()});jQuery(document).ready(()=>{jQuery(".paylane-cardexpirationdate-valid").mask("00 / 00"); jQuery(".paylane-cardnumber-valid").mask("0000 0000 0000 0000");jQuery(".paylane-cardsecuritycode-valid").mask("000")})})})();
gpl-3.0
sonald/Red-Flag-Linux-Installer
examples/installer/client/assets/js/remote_part.js
6162
define(['jquery', 'system', 'i18n'], function($,_system,i18n){ 'use strict'; var remote = null; function init () { remote = remote || window.apis.services.partition; }; var partial = { myalert: function (msg) { var $alert = $('#myalert'); $alert.off('click', '.js-close'); $alert.find('p.content').text(msg); $alert.modal(); }, getparts: function (data, iso, reflash_parts) { remote.getPartitions(function (disks) { disks = disks.reverse(); if(iso && iso.mode === "usb" ) { disks = _.reject(disks, function (disk) { return disk.path === iso.device.slice(0,8); }) } reflash_parts (data, disks); }); }, method: function (action, iso, args,callback) { init(); var func = remote[action]; var that = this; var msgs = { 1: i18n.gettext('Too many primary partitions.'), 2: i18n.gettext('Too many extended partitions.'), } var test = function (result) { if (result.status && result.status === "success") { that.getparts(result, iso, callback); }else { var msg_tmp = result.reason; var msg = i18n.gettext('Operation fails'); if (msg_tmp && msg_tmp.indexOf('@') === 1) { msg_tmp = msgs[msg_tmp[0]]; msg = msg + ":" + msg_tmp; }; that.myalert(msg); console.log(result); } }; args.push(test); func.apply(null, args); }, //calc the percent the part occupies at the disk calc_percent: function (disks) { var new_disks = _.map(disks, function (disk) { var dsize = disk.size; var exsize, expercent=0, diskpercent=0; _.each(disk.table, function (part){ if (part.ty !== "logical") { part.percent = (part.size/dsize < 0.03) ? 0.03:part.size/dsize; diskpercent += part.percent; if (part.ty === "extended") { exsize = part.size; } }else { part.percent = (part.size/exsize < 0.1) ? 0.1:part.size/exsize; expercent += part.percent; }; }); _.each(disk.table, function (part){ if (part.ty !== "logical") { part.percent = part.percent*100/diskpercent; }else { part.percent = part.percent*100/expercent; } }); return disk; }); return new_disks; }, //render easy and adcanced page render: function (disks, act, locals) { var that = this; var tys, pindex, $disk, tmpPage, actPage, dindex = 0; tys = ["primary", "free", "extended"];//logical is special _.each(disks, function (disk) { pindex = 0; $disk = $('ul.disk[dpath="'+disk.path+'"]'); _.each(disk.table, function (part){ part = that.part_proper(disk.path, disk.unit, part); var args = { pindex:pindex, dindex:dindex, part:part, path:disk.path, type:disk.type, gettext:locals.gettext, }; actPage = ""; if (part.number < 0) { tmpPage = (jade.compile($('#free_part_tmpl')[0].innerHTML))(args); if (act === true) { actPage = (jade.compile($('#create_part_tmpl')[0].innerHTML))(args); } }else{ tmpPage = (jade.compile($('#'+part.ty+'_part_tmpl')[0].innerHTML))(args); if (act === true && part.ty !== "extended") { actPage = (jade.compile($('#edit_part_tmpl')[0].innerHTML))(args); } }; if (_.indexOf(tys, part.ty) > -1) { $disk.append(tmpPage); }else { $disk.find('ul.logicals').append(tmpPage); }; if (part.ty !== "extended") { $disk.find('ul.selectable').last().after(actPage); } if (act === false) { $disk.find('ul.selectable').last().tooltip({title: part.title}); $disk.find('ul.part').prev('button.close').remove(); } pindex++; }); dindex++; }); }, //adjust some properties needed for easy and advanced page //eg:p.size=123.3444445 ===> p.size=123.34 //eg:p.fs=linux(1)-swap ===> p.fs=swap //eg:add:ui_path='sda3',title='sda3 ext4 34.56GB' part_proper: function (path, unit, part){ part.unit = unit; part.size = Number((part.size).toFixed(2)); if (part.number > 0) { part.ui_path = path.slice(5)+part.number; part.fs = part.fs || "Unknow"; part.fs = ((part.fs).match(/swap/g)) ? "swap" : part.fs; part.title = part.ui_path + " " + part.fs + " " + part.size + unit; }else { part.title = i18n.gettext("Free") + " " + part.size+unit; } return part; }, }; return partial; });
gpl-3.0
renatocf/MAC0434-PROJECT
external/sablecc-3.7/src/org/sablecc/sablecc/AlternativeElementTypes.java
1765
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file is part of SableCC. * * See the file "LICENSE" for copyright information and the * * terms and conditions for copying, distribution and * * modification of SableCC. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package org.sablecc.sablecc; import java.util.*; import org.sablecc.sablecc.analysis.*; import org.sablecc.sablecc.node.*; @SuppressWarnings({"rawtypes","unchecked"}) public class AlternativeElementTypes extends DepthFirstAdapter { private Map altElemTypes = new TypedHashMap(StringCast.instance, StringCast.instance); private ResolveIds ids; private String currentAlt; public AlternativeElementTypes(ResolveIds ids) { this.ids = ids; } public Map getMapOfAltElemType() { return altElemTypes; } @Override public void caseAAst(AAst node) {} @Override public void caseAProd(final AProd production) { Object []temp = production.getAlts().toArray(); for(int i = 0; i<temp.length; i++) { ((PAlt)temp[i]).apply(this); } } @Override public void caseAAlt(AAlt node) { currentAlt = (String)ids.names.get(node); Object []temp = node.getElems().toArray(); for(int i = 0; i<temp.length; i++) { ((PElem)temp[i]).apply(this); } } @Override public void inAElem(AElem node) { String elemType = (String)ids.elemTypes.get(node); if(node.getElemName() != null) { altElemTypes.put(currentAlt+"."+node.getElemName().getText(), elemType ); } else { altElemTypes.put(currentAlt+"."+node.getId().getText(), elemType ); } } }
gpl-3.0
Tomashnikov/GF_Multiplication
GF_Multiplication/GF_Multiplication/multiplication.cpp
730
#include <vector> #include <iostream> #include <algorithm> std::vector<int> modulus(std::vector<int> a); void multiplication(std::vector<int> a, std::vector<int> b) { std::vector<int> c; c.resize(a.size() + b.size() - 1); for (int x = 0; x < b.size(); x++) { for (int y = 0; y < a.size(); y++) { c[x + y] += a[y] * b[x]; } } for (int x = 0; x < c.size(); x++) { c[x] %= 2; } std::cout << std::endl << "\n\tIloczyn przed modulacja: \t\t"; for (int x = 0; x < c.size(); x++) { std::cout << "" << c[x] << ""; } c = modulus(c); std::cout << std::endl << "\tIloczyn po modulacji: \t\t"; for (int x = 0; x < c.size(); x++) { std::cout << "" << c[x] << ""; } std::cout << std::endl << std::endl; }
gpl-3.0
justindriggers/Ventriloid
com.jtxdriggers.android.ventriloid/src/com/jtxdriggers/android/ventriloid/ServerAdapter.java
7275
/* * Copyright 2012 Justin Driggers <jtxdriggers@gmail.com> * * This file is part of Ventriloid. * * Ventriloid is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Ventriloid is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Ventriloid. If not, see <http://www.gnu.org/licenses/>. */ package com.jtxdriggers.android.ventriloid; import java.util.ArrayList; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class ServerAdapter extends SQLiteOpenHelper { public static final String DATABASE_NAME = "ventriloiddata"; public static final int DATABASE_VERSION = 3; public static final String TABLE_SERVERS = "Servers"; public static final String KEY_ID = "ID"; public static final String KEY_USERNAME = "Username"; public static final String KEY_PHONETIC = "Phonetic"; public static final String KEY_SERVERNAME = "Servername"; public static final String KEY_HOSTNAME = "Hostname"; public static final String KEY_PORT = "Port"; public static final String KEY_PASSWORD = "Password"; public static final String CREATE_SERVERS_TABLE = "CREATE TABLE " + TABLE_SERVERS + "(" + KEY_ID + " INTEGER PRIMARY KEY, " + KEY_USERNAME + " TEXT NOT NULL, " + KEY_PHONETIC + " TEXT NOT NULL, " + KEY_SERVERNAME + " TEXT NOT NULL, " + KEY_HOSTNAME + " TEXT NOT NULL, " + KEY_PORT + " INTEGER NOT NULL, " + KEY_PASSWORD + " TEXT NOT NULL);"; public ServerAdapter(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { db.execSQL(CREATE_SERVERS_TABLE); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { if (oldVersion < 3) { db.execSQL("ALTER TABLE " + TABLE_SERVERS + " RENAME TO ServersTemp;"); db.execSQL(CREATE_SERVERS_TABLE); db.execSQL("INSERT INTO " + TABLE_SERVERS + "(" + KEY_ID + ", " + KEY_USERNAME + ", " + KEY_PHONETIC + ", " + KEY_SERVERNAME + ", " + KEY_HOSTNAME + ", " + KEY_PORT + ", " + KEY_PASSWORD + ") " + "SELECT _id, username, phonetic, " + "servername, hostname, portnumber, password " + "FROM ServersTemp;"); db.execSQL("DROP TABLE IF EXISTS ServersTemp;"); } } public void addServer(Server server) { SQLiteDatabase db = getWritableDatabase(); ContentValues values = new ContentValues(); values.put(KEY_USERNAME, server.getUsername()); values.put(KEY_PHONETIC, server.getPhonetic()); values.put(KEY_SERVERNAME, server.getServername()); values.put(KEY_HOSTNAME, server.getHostname()); values.put(KEY_PORT, server.getPort()); values.put(KEY_PASSWORD, server.getPassword()); db.insert(TABLE_SERVERS, null, values); db.close(); } public Server getServer(int id) { SQLiteDatabase db = getReadableDatabase(); Cursor cursor = db.query(true, TABLE_SERVERS, new String[] { KEY_ID, KEY_USERNAME, KEY_PHONETIC, KEY_SERVERNAME, KEY_HOSTNAME, KEY_PORT, KEY_PASSWORD }, KEY_ID + "=" + id, null, null, null, null, null); if (cursor != null) cursor.moveToFirst(); Server server = new Server(Integer.parseInt(cursor.getString(0)), cursor.getString(1), cursor.getString(2), cursor.getString(3), cursor.getString(4), Integer.parseInt(cursor.getString(5)), cursor.getString(6)); cursor.close(); db.close(); return server; } public ArrayList<Server> getAllServers() { ArrayList<Server> serverList = new ArrayList<Server>(); String selectQuery = "SELECT * FROM " + TABLE_SERVERS; SQLiteDatabase db = getWritableDatabase(); Cursor cursor = db.rawQuery(selectQuery, null); if (cursor.moveToFirst()) { do { Server server = new Server(); server.setId(Integer.parseInt(cursor.getString(0))); server.setUsername(cursor.getString(1)); server.setPhonetic(cursor.getString(2)); server.setServername(cursor.getString(3)); server.setHostname(cursor.getString(4)); server.setPort(Integer.parseInt(cursor.getString(5))); server.setPassword(cursor.getString(6)); serverList.add(server); } while (cursor.moveToNext()); } cursor.close(); db.close(); return serverList; } public ArrayList<String> getAllServersAsStrings() { ArrayList<String> serverList = new ArrayList<String>(); String selectQuery = "SELECT * FROM " + TABLE_SERVERS; SQLiteDatabase db = getWritableDatabase(); Cursor cursor = db.rawQuery(selectQuery, null); if (cursor.moveToFirst()) { do { Server server = new Server(); server.setUsername(cursor.getString(1)); server.setServername(cursor.getString(3)); server.setHostname(cursor.getString(4)); server.setPort(Integer.parseInt(cursor.getString(5))); serverList.add(server.getServername()); } while (cursor.moveToNext()); } cursor.close(); db.close(); if (serverList.size() < 1) serverList.add("No servers added"); return serverList; } public int getServersCount() { String countQuery = "SELECT * FROM " + TABLE_SERVERS; SQLiteDatabase db = getReadableDatabase(); Cursor cursor = db.rawQuery(countQuery, null); int count = cursor.getCount(); cursor.close(); db.close(); return count; } public void updateServer(Server server) { SQLiteDatabase db = getWritableDatabase(); ContentValues values = new ContentValues(); values.put(KEY_USERNAME, server.getUsername()); values.put(KEY_PHONETIC, server.getPhonetic()); values.put(KEY_SERVERNAME, server.getServername()); values.put(KEY_HOSTNAME, server.getHostname()); values.put(KEY_PORT, server.getPort()); values.put(KEY_PASSWORD, server.getPassword()); values.put(KEY_ID, server.getId()); db.update(TABLE_SERVERS, values, KEY_ID + " = " + server.getId(), null); db.close(); } public void deleteServer(Server server) { SQLiteDatabase db = getWritableDatabase(); db.delete(TABLE_SERVERS, KEY_ID + " = ?", new String[] { String.valueOf(server.getId()) }); db.close(); } public void clearServers() { SQLiteDatabase db = getWritableDatabase(); db.delete(TABLE_SERVERS, null, null); db.close(); } }
gpl-3.0
janones/mfyblog
src/main/webapp/admin/login/home.html
1597
<!-- Login view /login/layout.html --> <div class="container-fluid" ng-controller="LoginController"> <div id="wrapper" class="row-fluid"> <h3 class='menu'>User authentication</h3> <div class="alert alert-error" ng-show="error">{{errorMessage}}</div> <form class="form-horizontal"> <div class="control-group"> <label class="control-label" for="login_name">Login</label> <div class="controls"> <input type="text" id="login_name" ng-model="user.username" placeholder="Login" required min="2" class="form-control"> </div> </div> <div class="control-group"> <label class="control-label" for="login_password">Password</label> <div class="controls"> <input type="text" id="login_password" ng-model="user.password" placeholder="Password" required min="2" class="form-control"> </div> </div> <br /> <div class="control-group"> <div class="controls"> <a href="#" style="margin-right: 20px">Forgot password </a> <button type="button" class="btn btn-success" ng-disabled="!user.username || !user.password" ng-click="loginUser(user)">Enter</button> </div> </div> </form> </div> </div>
gpl-3.0
AdotDdot/sproxy
README.md
2134
sproxy ====== Basic interception proxy written in python using the socket module. Capable of intercepting https traffic generating certificates on the fly. [sprox](https://github.com/AdotDdot/sprox) is based on sproxy + with a fancy interface. Setting up ========== * Run *sproxy-setup.py*. It will create the needed directories and create the self-signed SSL certificate. You may specify the local certificates file path (defaults to */etc/ssl/certs/ca-certificates.crt*) and the serial number of the self-signed certificate (defaults to 1). `python sproxy-setup.py [localcert] [serial]` * In the newly-created directory *sproxy_files* you can find the certificate file *sproxy.pem*. Import it in your browser as a trusted certificate authority. * Configure your browser to use the proxy and run *sproxy.py*. You can specify the port in the command-line arguments (defaults to 50007). `python sproxy.py [port]` Example usage ============= The proxy can be launched with default options from the command line. By default is simply prints the first line of each request and response. Override the Proxy class' methods to customize behaviour. Example: from sproxy import Proxy class MyProxy(Proxy): def modify_all(self, request): '''Override to apply changes to every request''' request.set_header('user-agent', 'sproxy') #modify header on all oncoming requests def output_flow(self, request, response): '''Override to change output''' print request.head #print the whole head of request and response print response.head def parse_response(self, response, host): '''Override to handle received response - best used with concurrency''' new_thread = threading.Thread(target=user_defined_function) #start a new thread with some newly-defined function new_thread.start() proxy = MyProxy() #set some options proxy.serv_port = 10000 proxy.max_listen = 200 #change timeouts to alter performance proxy.web_timeout = 1 proxy.browser_timeout = 1 #launch proxy proxy.start()
gpl-3.0
WendySanarwanto/udemy-the-complete-guide-to-angular-4
assignments/assignment4-practicing-property-and-event-binding-and-view-encapsulation/src/app/even/even.component.html
70
<p> <span class="badge badge-info">Even</span> - {{evenNumber}} </p>
gpl-3.0
annejan/qtpass
localization/localization_lb_LU.ts
312
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="lb_LU"> <context> <name>QObject</name> <message> <location filename="../main/main.cpp" line="+87"/> <source>LTR</source> <translation type="unfinished"></translation> </message> </context> </TS>
gpl-3.0
CoderDuan/mantaflow
source/pwrapper/pclass.h
2629
/****************************************************************************** * * MantaFlow fluid solver framework * Copyright 2011-2014 Tobias Pfaff, Nils Thuerey * * This program is free software, distributed under the terms of the * GNU General Public License (GPL) * http://www.gnu.org/licenses * * Base class for all Python-exposed classes * ******************************************************************************/ // ----------------------------------------------------------------- // NOTE: // Do not include this file in user code, include "manta.h" instead // ----------------------------------------------------------------- #ifdef _MANTA_H #ifndef _PTYPE_H #define _PTYPE_H #include <string> #include <vector> #include <map> class QMutex; namespace Manta { struct PbClassData; class FluidSolver; class PbArgs; struct PbType { std::string S; std::string str() const; }; struct PbTypeVec { std::vector<PbType> T; std::string str() const; }; //! Base class for all classes exposed to Python class PbClass { public: PbClass(FluidSolver* parent, const std::string& name="", PyObject* obj=NULL); PbClass(const PbClass& a); virtual ~PbClass(); // basic property setter/getters void setName(const std::string& name) { mName = name; } std::string getName() const { return mName; } PyObject* getPyObject() const { return mPyObject; } void registerObject(PyObject* obj, PbArgs* args); FluidSolver* getParent() const { return mParent; } void setParent(FluidSolver* v) { mParent = v; } void checkParent(); // hidden flag for GUI, debug output inline bool isHidden() { return mHidden; } inline void setHidden(bool v) { mHidden = v; } void lock(); void unlock(); bool tryLock(); // PbClass instance registry static int getNumInstances(); static PbClass* getInstance(int index); static void renameObjects(); // converters static bool isNullRef(PyObject* o); static PbClass* createPyObject(const std::string& classname, const std::string& name, PbArgs& args, PbClass *parent); inline bool canConvertTo(const std::string& classname) { return Pb::canConvert(mPyObject, classname); } protected: QMutex* mMutex; FluidSolver* mParent; PyObject* mPyObject; std::string mName; bool mHidden; static std::vector<PbClass*> mInstances; }; //!\cond Register void pbFinalizePlugin(FluidSolver* parent, const std::string& name, bool doTime=true); void pbPreparePlugin(FluidSolver* parent, const std::string& name, bool doTime=true); void pbSetError(const std::string& fn, const std::string& ex); //!\endcond } // namespace #endif #endif
gpl-3.0
arecker/blog
entries/2020-04-19.html
6923
<!-- meta:title marissa's gallery, food ruts, protests, and baking --> <!-- meta:banner 2020-04-19.jpg --> <p>Dear Journal,</p> <p>Good morning, friends! I hope this Sunday morning finds you well, and that you take some time to relax, eat a nice breakfast, and drink plenty of fresh coffee before starting the day. If only Rodney heeded that advice. The only thing he seems to be interested in eating are last night's fresh peanut butter cookies that were sitting out on the counter. Then again, I was the one who caved, and put it on a little plate for him. Global pandemics, lockdowns, a dangerous and unpredictable B-rated celebrity leading the country through it all - compared to everything else going on, peanut butter cookies for breakfast hardly sound crazy.</p> <p>We had a great day yesterday. Kicking the morning off by getting the house ready for Marissa's art show. As she scurried around the house putting the final touches on her gallery, I set up Rodney's room for a special edition extended quiet time, grabbing extra toys and even setting him up with some <em>toddler radio</em> on Pandora. Rodney was so eager to spend time in his room, he practically shoved me out the door.</p> <p>Before the gallery began, Marissa and I chatted. "What if I just casually referred to you as <em>fatso</em>? Or what if we suddenly started screaming at each other, I threw something, and then we just went right back to normal?" I laughed.</p> <p>Marissa smiled. "It's fun to think about, isn't it? So many people show up to these things, I understand the temptation to do something weird just to watch the reaction."</p> <p>But Marissa respects her Instagram followers too much to mess with them for her amusement, and I stayed on my best behavior.</p> <p>And speaking of which, I thank everybody who hung out with us in her live virtual art gallery. The words of encouragement went a long way, and we had a lot of fun putting this on.</p> <p>After the cameras turned off, Marissa breathed a sigh of relief, crashing on the couch with a handful of Easter candy. I joined her on the couch, flipping through YouTube videos.</p> <p>I eventually climbed off the couch and got Rodney out of his room, and the two of us wandered into the kitchen to make dinner. I had started another loaf of bread, but it wasn't working out. The dough was too gummy, and no matter how much I slapped it around in flour on the counter, it wasn't getting even close to the smooth, shiny, rubbery surface I was picturing in my head. But Rodney happily helped me grate cheese on seasonings onto the failed experiment, which luckily masked the unappetizing, dried-out dough.</p> <p>"I think I'm in kind of a rut," I said to Marissa who found her way into the kitchen with us. "The last few loaves of bread I tried haven't worked out, and quarantine grocery shopping is really starting to get to me. I'm really struggling to find variety." Marissa found a seat on the counter and continued to listen.</p> <p>"It sounds like you're just at a low point, and that's OK," she said. "Let me know if there is anything I can do."</p> <p>I had already begun to make red sauce from blended tomatoes, ground beef, and onions. I held my head over the Dutch oven and inhaled. "Red sauce is my aroma therapy," I said.</p> <p>Sensing my unrest, Marissa hung out in the kitchen while Rodney fiddled around with kitchen utensils. Specifically, he was trying to skewer chunks of our burnt cheesy ciabatta bread at the end of a turkey baster. The spaghetti finished, and we ate together on the back porch before heading inside.</p> <p>"I'll put him to bed tonight," offered Marissa. "Go for a walk or something."</p> <p>Taking Marissa's advice, I suited up in a mask and gloves and walked to the nearby liquor store. Since I last visited, they've added even more protective measures. There were large planes of thick Plexiglas in front of each register, and the store was covered in signs that tactfully advised customers <em>not</em> to browse. I hurriedly grabbed a six pack of beer, a bottle of tequila, and a cold bottle of water for Marissa.</p> <p>When I returned, Marissa and I hung out on the back porch. We both had the coronavirus on our minds.</p> <p>"I read about the Spanish flu today," she said. "Did you know that they threw parades in big cities when they thought it was over, and that actually brought about the worst part of the outbreak?"</p> <p>"That's terrible," I responded. "And did you see these protests happening? It's ridiculous. Can you imagine protesting a <em>virus</em>? These people! It's like if your house caught on fire, and you were to stubbornly sit on your couch and refuse to let the fire <em>infringe on your freedom</em>," I angrily shouted. "But it's worse! Because it's hurting the people around them! If only it was <em>just</em> their house burning down!"</p> <p>The protests have me feeling discouraged, disappointed, and angry. There's even one scheduled for Madison. I don't know what's compelling people to protest a virus. It has nothing to do with personal freedom, for God's sake. Suck it up, and do your part in keeping the people around you safe.</p> <p>I took a few deep breaths and calmed myself. "I'm worried I'm going to drive by the protest while it's going on and recognize somebody. Madison is not a very big town. I don't think I'd be able to look at person in the eye anymore."</p> <p>Marissa and I relocated to the kitchen. In preparation of my grocery trip tomorrow, we cleaned out the fridge and cabinets and built a grocery list. She also baked a batch of peanut butter cookies. Together, we hung out in the kitchen, chatting, baking, and snacking on cookie dough. The first batch came out of the oven, and overcome by an impulse, I grabbed the bag of sugar and began dumping them on the cookies.</p> <p>"WOAH. WHAT ARE YOU DOING," said Marissa, turning on her heels to stop me.</p> <p>"I'm sorry," I said apologetically. "I just had an impulse. I feel very strongly that these cookies should be covered in sugar."</p> <p>Marissa paused and bent down to study the cookie. "You know, the sugar is sticking pretty nice. And it makes the fork pattern look much prettier. OK do the rest of them. That was a good call."</p> <p>I smiled and kept pouring sugar.</p> <p>"It was <em>risky</em>!" she snapped again. "But a good call..."</p> <p>We started another batch of bread, too, copying the recipe from Bruno's youtube video on homemade French bread. Spending the night in the kitchen hanging out and drinking beer put me in a good mood and gave me enough resolve to try again.</p> <p>"Let's not put any bread on the grocery list. I'm banking on us figuring it out," I said. Marissa nodded.</p> <p>"And if it doesn't work out, we always have speed bread," she said.</p> <p>Thanks for stopping by this morning. I hope you have a good day today.</p>
gpl-3.0
SteveHoneyNZ/woocommerce
includes/wc-account-functions.php
8677
<?php /** * WooCommerce Account Functions * * Functions for account specific things. * * @author WooThemes * @category Core * @package WooCommerce/Functions * @version 2.6.0 */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Returns the url to the lost password endpoint url. * * @access public * @param string $default_url * @return string */ function wc_lostpassword_url( $default_url = '' ) { $wc_password_reset_url = wc_get_page_permalink( 'myaccount' ); if ( false !== $wc_password_reset_url ) { return wc_get_endpoint_url( 'lost-password', '', $wc_password_reset_url ); } else { return $default_url; } } add_filter( 'lostpassword_url', 'wc_lostpassword_url', 10, 1 ); /** * Get the link to the edit account details page. * * @return string */ function wc_customer_edit_account_url() { $edit_account_url = wc_get_endpoint_url( 'edit-account', '', wc_get_page_permalink( 'myaccount' ) ); return apply_filters( 'woocommerce_customer_edit_account_url', $edit_account_url ); } /** * Get the edit address slug translation. * * @param string $id Address ID. * @param bool $flip Flip the array to make it possible to retrieve the values ​​from both sides. * * @return string Address slug i18n. */ function wc_edit_address_i18n( $id, $flip = false ) { $slugs = apply_filters( 'woocommerce_edit_address_slugs', array( 'billing' => sanitize_title( _x( 'billing', 'edit-address-slug', 'woocommerce' ) ), 'shipping' => sanitize_title( _x( 'shipping', 'edit-address-slug', 'woocommerce' ) ) ) ); if ( $flip ) { $slugs = array_flip( $slugs ); } if ( ! isset( $slugs[ $id ] ) ) { return $id; } return $slugs[ $id ]; } /** * Get My Account menu items. * * @since 2.6.0 * @return array */ function wc_get_account_menu_items() { return apply_filters( 'woocommerce_account_menu_items', array( 'dashboard' => __( 'Dashboard', 'woocommerce' ), 'orders' => __( 'Orders', 'woocommerce' ), 'downloads' => __( 'Downloads', 'woocommerce' ), 'edit-address' => __( 'Addresses', 'woocommerce' ), 'payment-methods' => __( 'Payment Methods', 'woocommerce' ), 'edit-account' => __( 'Account Details', 'woocommerce' ), 'customer-logout' => __( 'Logout', 'woocommerce' ), ) ); } /** * Get account menu item classes. * * @since 2.6.0 * @param string $endpoint * @return string */ function wc_get_account_menu_item_classes( $endpoint ) { global $wp; $classes = array( 'woocommerce-MyAccount-navigation-link', 'woocommerce-MyAccount-navigation-link--' . $endpoint, ); // Set current item class. $current = isset( $wp->query_vars[ $endpoint ] ); if ( 'dashboard' === $endpoint && ( isset( $wp->query_vars['page'] ) || empty( $wp->query_vars ) ) ) { $current = true; // Dashboard is not an endpoint, so needs a custom check. } if ( $current ) { $classes[] = 'is-active'; } $classes = apply_filters( 'woocommerce_account_menu_item_classes', $classes, $endpoint ); return implode( ' ', array_map( 'sanitize_html_class', $classes ) ); } /** * Get account endpoint URL. * * @since 2.6.0 * @param string $endpoint * @return string */ function wc_get_account_endpoint_url( $endpoint ) { if ( 'dashboard' === $endpoint ) { return wc_get_page_permalink( 'myaccount' ); } return wc_get_endpoint_url( $endpoint ); } /** * Get My Account > Orders columns. * * @since 2.6.0 * @return array */ function wc_get_account_orders_columns() { $columns = apply_filters( 'woocommerce_account_orders_columns', array( 'order-number' => __( 'Order', 'woocommerce' ), 'order-date' => __( 'Date', 'woocommerce' ), 'order-status' => __( 'Status', 'woocommerce' ), 'order-total' => __( 'Total', 'woocommerce' ), 'order-actions' => '&nbsp;', ) ); // Deprecated filter since 2.6.0. return apply_filters( 'woocommerce_my_account_my_orders_columns', $columns ); } /** * Get My Account > Downloads columns. * * @since 2.6.0 * @return array */ function wc_get_account_downloads_columns() { return apply_filters( 'woocommerce_account_downloads_columns', array( 'download-file' => __( 'File', 'woocommerce' ), 'download-remaining' => __( 'Remaining', 'woocommerce' ), 'download-expires' => __( 'Expires', 'woocommerce' ), 'download-actions' => '&nbsp;', ) ); } /** * Get My Account > Payment methods columns. * * @since 2.6.0 * @return array */ function wc_get_account_payment_methods_columns() { return apply_filters( 'woocommerce_account_payment_methods_columns', array( 'method' => __( 'Method', 'woocommerce' ), 'expires' => __( 'Expires', 'woocommerce' ), 'actions' => '&nbsp;', ) ); } /** * Get My Account > Payment methods types * * @since 2.6.0 * @return array */ function wc_get_account_payment_methods_types() { return apply_filters( 'woocommerce_payment_methods_types', array( 'cc' => __( 'Credit Card', 'woocommerce' ), 'echeck' => __( 'eCheck', 'woocommerce' ), ) ); } /** * Returns an array of a user's saved payments list for output on the account tab. * * @since 2.6 * @param array $list List of payment methods passed from wc_get_customer_saved_methods_list() * @param int $customer_id The customer to fetch payment methods for * @return array Filtered list of customers payment methods */ function wc_get_account_saved_payment_methods_list( $list, $customer_id ) { $payment_tokens = WC_Payment_Tokens::get_customer_tokens( $customer_id ); foreach ( $payment_tokens as $payment_token ) { $delete_url = wc_get_endpoint_url( 'delete-payment-method', $payment_token->get_id() ); $delete_url = wp_nonce_url( $delete_url, 'delete-payment-method-' . $payment_token->get_id() ); $set_default_url = wc_get_endpoint_url( 'set-default-payment-method', $payment_token->get_id() ); $set_default_url = wp_nonce_url( $set_default_url, 'set-default-payment-method-' . $payment_token->get_id() ); $type = strtolower( $payment_token->get_type() ); $list[ $type ][] = array( 'method' => array( 'gateway' => $payment_token->get_gateway_id(), ), 'expires' => esc_html__( 'N/A', 'woocommerce' ), 'is_default' => $payment_token->is_default(), 'actions' => array( 'delete' => array( 'url' => $delete_url, 'name' => esc_html__( 'Delete', 'woocommerce' ), ), ), ); $key = key( array_slice( $list[ $type ], -1, 1, true ) ); if ( ! $payment_token->is_default() ) { $list[ $type ][$key]['actions']['default'] = array( 'url' => $set_default_url, 'name' => esc_html__( 'Make Default', 'woocommerce' ), ); } $list[ $type ][ $key ] = apply_filters( 'woocommerce_payment_methods_list_item', $list[ $type ][ $key ], $payment_token ); } return $list; } add_filter( 'woocommerce_saved_payment_methods_list', 'wc_get_account_saved_payment_methods_list', 10, 2 ); /** * Controls the output for credit cards on the my account page. * * @since 2.6 * @param array $item Individual list item from woocommerce_saved_payment_methods_list * @param WC_Payment_Token $payment_token The payment token associated with this method entry * @return array Filtered item */ function wc_get_account_saved_payment_methods_list_item_cc( $item, $payment_token ) { if ( 'cc' !== strtolower( $payment_token->get_type() ) ) { return $item; } $card_type = $payment_token->get_card_type(); $item['method']['last4'] = $payment_token->get_last4(); $item['method']['brand'] = ( ! empty( $card_type ) ? ucfirst( $card_type ) : esc_html__( 'Credit Card', 'woocommerce' ) ); $item['expires'] = $payment_token->get_expiry_month() . '/' . substr( $payment_token->get_expiry_year(), -2 ); return $item; } add_filter( 'woocommerce_payment_methods_list_item', 'wc_get_account_saved_payment_methods_list_item_cc', 10, 2 ); /** * Controls the output for eChecks on the my account page. * * @since 2.6 * @param array $item Individual list item from woocommerce_saved_payment_methods_list * @param WC_Payment_Token $payment_token The payment token associated with this method entry * @return array Filtered item */ function wc_get_account_saved_payment_methods_list_item_echeck( $item, $payment_token ) { if ( 'echeck' !== strtolower( $payment_token->get_type() ) ) { return $item; } $item['method']['last4'] = $payment_token->get_last4(); $item['method']['brand'] = esc_html__( 'eCheck', 'woocommerce' ); return $item; } add_filter( 'woocommerce_payment_methods_list_item', 'wc_get_account_saved_payment_methods_list_item_echeck', 10, 2 );
gpl-3.0
adobeCST/libiec61850-1.0.1
src/mms/iso_mms/server/mms_write_service.c
9685
/* * mms_write_service.c * * Copyright 2013 Michael Zillgith * * This file is part of libIEC61850. * * libIEC61850 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * libIEC61850 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with libIEC61850. If not, see <http://www.gnu.org/licenses/>. * * See COPYING file for the complete license text. */ #include "libiec61850_platform_includes.h" #include "mms_server_internal.h" #include "mms_common_internal.h" #include "mms_types.h" #if (MMS_WRITE_SERVICE == 1) #define CONFIG_MMS_WRITE_SERVICE_MAX_NUMBER_OF_WRITE_ITEMS 100 /********************************************************************************************** * MMS Write Service *********************************************************************************************/ int mmsServer_createMmsWriteResponse(MmsServerConnection connection, int invokeId, ByteBuffer* response, int numberOfItems, MmsDataAccessError* accessResults) { //TODO remove asn1c code MmsPdu_t* mmsPdu = mmsServer_createConfirmedResponse(invokeId); mmsPdu->choice.confirmedResponsePdu.confirmedServiceResponse.present = ConfirmedServiceResponse_PR_write; WriteResponse_t* writeResponse = &(mmsPdu->choice.confirmedResponsePdu.confirmedServiceResponse.choice.write); writeResponse->list.count = numberOfItems; writeResponse->list.size = numberOfItems; writeResponse->list.array = (struct WriteResponse__Member**) GLOBAL_CALLOC(numberOfItems, sizeof(struct WriteResponse__Member*)); int i; for (i = 0; i < numberOfItems; i++) { writeResponse->list.array[i] = (struct WriteResponse__Member*) GLOBAL_CALLOC(1, sizeof(struct WriteResponse__Member)); if (accessResults[i] == DATA_ACCESS_ERROR_SUCCESS) writeResponse->list.array[i]->present = WriteResponse__Member_PR_success; else { writeResponse->list.array[i]->present = WriteResponse__Member_PR_failure; asn_long2INTEGER(&writeResponse->list.array[i]->choice.failure, (long) accessResults[i]); } } der_encode(&asn_DEF_MmsPdu, mmsPdu, mmsServer_write_out, (void*) response); asn_DEF_MmsPdu.free_struct(&asn_DEF_MmsPdu, mmsPdu, 0); return 0; } void MmsServerConnection_sendWriteResponse(MmsServerConnection self, uint32_t invokeId, MmsDataAccessError indication, bool handlerMode) { ByteBuffer* response = MmsServer_reserveTransmitBuffer(self->server); ByteBuffer_setSize(response, 0); mmsServer_createMmsWriteResponse(self, invokeId, response, 1, &indication); IsoConnection_sendMessage(self->isoConnection, response, handlerMode); MmsServer_releaseTransmitBuffer(self->server); } void mmsServer_handleWriteRequest( MmsServerConnection connection, uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeId, ByteBuffer* response) { WriteRequest_t* writeRequest = 0; MmsPdu_t* mmsPdu = 0; asn_dec_rval_t rval; /* Decoder return value */ rval = ber_decode(NULL, &asn_DEF_MmsPdu, (void**) &mmsPdu, buffer, CONFIG_MMS_MAXIMUM_PDU_SIZE); if (rval.code != RC_OK) { mmsMsg_createMmsRejectPdu(&invokeId, MMS_ERROR_REJECT_INVALID_PDU, response); return; } writeRequest = &(mmsPdu->choice.confirmedRequestPdu.confirmedServiceRequest.choice.write); int numberOfWriteItems = writeRequest->variableAccessSpecification.choice.listOfVariable.list.count; if (numberOfWriteItems < 1) { mmsMsg_createMmsRejectPdu(&invokeId, MMS_ERROR_REJECT_REQUEST_INVALID_ARGUMENT, response); return; } if (numberOfWriteItems > CONFIG_MMS_WRITE_SERVICE_MAX_NUMBER_OF_WRITE_ITEMS) { mmsMsg_createMmsRejectPdu(&invokeId, MMS_ERROR_REJECT_OTHER, response); return; } if (writeRequest->listOfData.list.count != numberOfWriteItems) { mmsMsg_createMmsRejectPdu(&invokeId, MMS_ERROR_REJECT_REQUEST_INVALID_ARGUMENT, response); return; } MmsDataAccessError accessResults[CONFIG_MMS_WRITE_SERVICE_MAX_NUMBER_OF_WRITE_ITEMS * sizeof(MmsDataAccessError)]; bool sendResponse = true; int i; for (i = 0; i < numberOfWriteItems; i++) { ListOfVariableSeq_t* varSpec = writeRequest->variableAccessSpecification.choice.listOfVariable.list.array[i]; if (varSpec->variableSpecification.present != VariableSpecification_PR_name) { accessResults[i] = DATA_ACCESS_ERROR_OBJECT_ACCESS_UNSUPPORTED; continue; } MmsVariableSpecification* variable; MmsDevice* device = MmsServer_getDevice(connection->server); MmsDomain* domain = NULL; char* nameIdStr; if (varSpec->variableSpecification.choice.name.present == ObjectName_PR_domainspecific) { Identifier_t domainId = varSpec->variableSpecification.choice.name.choice.domainspecific.domainId; char* domainIdStr = StringUtils_createStringFromBuffer(domainId.buf, domainId.size); domain = MmsDevice_getDomain(device, domainIdStr); GLOBAL_FREEMEM(domainIdStr); if (domain == NULL) { accessResults[i] = DATA_ACCESS_ERROR_OBJECT_NONE_EXISTENT; continue; } Identifier_t nameId = varSpec->variableSpecification.choice.name.choice.domainspecific.itemId; nameIdStr = StringUtils_createStringFromBuffer(nameId.buf, nameId.size); variable = MmsDomain_getNamedVariable(domain, nameIdStr); } #if (CONFIG_MMS_SUPPORT_VMD_SCOPE_NAMED_VARIABLES == 1) else if (varSpec->variableSpecification.choice.name.present == ObjectName_PR_vmdspecific) { Identifier_t nameId = varSpec->variableSpecification.choice.name.choice.vmdspecific; nameIdStr = StringUtils_createStringFromBuffer(nameId.buf, nameId.size); variable = MmsDevice_getNamedVariable(device, nameIdStr); } #endif /* (CONFIG_MMS_SUPPORT_VMD_SCOPE_NAMED_VARIABLES == 1) */ else { accessResults[i] = DATA_ACCESS_ERROR_OBJECT_ACCESS_UNSUPPORTED; continue; } if (variable == NULL) { GLOBAL_FREEMEM(nameIdStr); accessResults[i] = DATA_ACCESS_ERROR_OBJECT_NONE_EXISTENT; continue; } AlternateAccess_t* alternateAccess = varSpec->alternateAccess; if (alternateAccess != NULL) { if (variable->type != MMS_ARRAY) { GLOBAL_FREEMEM(nameIdStr); accessResults[i] = DATA_ACCESS_ERROR_OBJECT_ATTRIBUTE_INCONSISTENT; continue; } if (!mmsServer_isIndexAccess(alternateAccess)) { GLOBAL_FREEMEM(nameIdStr); accessResults[i] = DATA_ACCESS_ERROR_OBJECT_ACCESS_UNSUPPORTED; continue; } } Data_t* dataElement = writeRequest->listOfData.list.array[i]; MmsValue* value = mmsMsg_parseDataElement(dataElement); if (value == NULL) { GLOBAL_FREEMEM(nameIdStr); accessResults[i] = DATA_ACCESS_ERROR_OBJECT_ATTRIBUTE_INCONSISTENT; continue; } /* Check for correct type */ if (MmsValue_getType(value) != MmsVariableSpecification_getType(variable)) { GLOBAL_FREEMEM(nameIdStr); MmsValue_delete(value); accessResults[i] = DATA_ACCESS_ERROR_TYPE_INCONSISTENT; continue; } if (alternateAccess != NULL) { if (domain != NULL) domain = (MmsDomain*) device; MmsValue* cachedArray = MmsServer_getValueFromCache(connection->server, domain, nameIdStr); if (cachedArray == NULL) { GLOBAL_FREEMEM(nameIdStr); MmsValue_delete(value); accessResults[i] = DATA_ACCESS_ERROR_OBJECT_ATTRIBUTE_INCONSISTENT; continue; } int index = mmsServer_getLowIndex(alternateAccess); MmsValue* elementValue = MmsValue_getElement(cachedArray, index); if (elementValue == NULL) { GLOBAL_FREEMEM(nameIdStr); MmsValue_delete(value); accessResults[i] = DATA_ACCESS_ERROR_OBJECT_ATTRIBUTE_INCONSISTENT; continue; } if (MmsValue_update(elementValue, value) == false) { GLOBAL_FREEMEM(nameIdStr); MmsValue_delete(value); accessResults[i] = DATA_ACCESS_ERROR_TYPE_INCONSISTENT; continue; } GLOBAL_FREEMEM(nameIdStr); MmsValue_delete(value); accessResults[i] = DATA_ACCESS_ERROR_SUCCESS; continue; } MmsDataAccessError valueIndication = mmsServer_setValue(connection->server, domain, nameIdStr, value, connection); if (valueIndication == DATA_ACCESS_ERROR_NO_RESPONSE) sendResponse = false; accessResults[i] = valueIndication; MmsValue_delete(value); GLOBAL_FREEMEM(nameIdStr); } if (sendResponse) { mmsServer_createMmsWriteResponse(connection, invokeId, response, numberOfWriteItems, accessResults); } asn_DEF_MmsPdu.free_struct(&asn_DEF_MmsPdu, mmsPdu, 0); } #endif /* (MMS_WRITE_SERVICE == 1) */
gpl-3.0