code
stringlengths
3
1.01M
repo_name
stringlengths
5
116
path
stringlengths
3
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
3
1.01M
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; const propTypes = { children: PropTypes.node, className: PropTypes.string, info: PropTypes.string }; const ListItemAction = props => { const { children, className, info, ...otherProps } = props; const classes = classNames('mdl-list__item-secondary-content', className); return ( <span className={classes} {...otherProps}> {info && <span className="mdl-list__item-secondary-info">{info}</span>} <span className="mdl-list__item-secondary-action"> {children} </span> </span> ); }; ListItemAction.propTypes = propTypes; export default ListItemAction;
react-mdl/react-mdl
src/List/ListItemAction.js
JavaScript
mit
749
#region Copyright // // DotNetNuke® - https://www.dnnsoftware.com // Copyright (c) 2002-2018 // by DotNetNuke Corporation // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated // documentation files (the "Software"), to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and // to permit persons to whom the Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or substantial portions // of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. #endregion #region Usings using System; using System.Xml; using DotNetNuke.Instrumentation; #endregion namespace DotNetNuke.Services.Syndication { /// <summary> /// Class for managing an OPML feed /// </summary> public class Opml { private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof (Opml)); private DateTime _dateCreated = DateTime.MinValue; private DateTime _dateModified = DateTime.MinValue; private string _docs = string.Empty; private string _expansionState = string.Empty; private OpmlOutlines _outlines; private string _ownerEmail = string.Empty; private string _ownerId = string.Empty; private string _ownerName = string.Empty; private string _title = string.Empty; private DateTime _utcExpiry = DateTime.Now.AddMinutes(180); private string _vertScrollState = string.Empty; private string _windowBottom = string.Empty; private string _windowLeft = string.Empty; private string _windowRight = string.Empty; private string _windowTop = string.Empty; private XmlDocument opmlDoc; public Opml() { _outlines = new OpmlOutlines(); } public DateTime UtcExpiry { get { return _utcExpiry; } set { _utcExpiry = value; } } public string Title { get { return _title; } set { _title = value; } } public DateTime DateCreated { get { return _dateCreated; } set { _dateCreated = value; } } public DateTime DateModified { get { return _dateModified; } set { _dateModified = value; } } public string OwnerName { get { return _ownerName; } set { _ownerName = value; } } public string OwnerEmail { get { return _ownerEmail; } set { _ownerEmail = value; } } public string OwnerId { get { return _ownerId; } set { _ownerId = value; } } public string Docs { get { return _docs; } set { _docs = value; } } public string ExpansionState { get { return _expansionState; } set { _expansionState = value; } } public string VertScrollState { get { return _vertScrollState; } set { _vertScrollState = value; } } public string WindowTop { get { return _windowTop; } set { _windowTop = value; } } public string WindowLeft { get { return _windowLeft; } set { _windowLeft = value; } } public string WindowBottom { get { return _windowBottom; } set { _windowBottom = value; } } public string WindowRight { get { return _windowRight; } set { _windowRight = value; } } public OpmlOutlines Outlines { get { return _outlines; } set { _outlines = value; } } public void AddOutline(OpmlOutline item) { _outlines.Add(item); } public void AddOutline(string text, string type, Uri xmlUrl, string category) { AddOutline(text, type, xmlUrl, category, null); } public void AddOutline(string text, string type, Uri xmlUrl, string category, OpmlOutlines outlines) { var item = new OpmlOutline(); item.Text = text; item.Type = type; item.XmlUrl = xmlUrl; item.Category = category; item.Outlines = outlines; _outlines.Add(item); } public string GetXml() { return opmlDoc.OuterXml; } public void Save(string fileName) { opmlDoc = new XmlDocument { XmlResolver = null }; XmlElement opml = opmlDoc.CreateElement("opml"); opml.SetAttribute("version", "2.0"); opmlDoc.AppendChild(opml); // create head XmlElement head = opmlDoc.CreateElement("head"); opml.AppendChild(head); // set Title XmlElement title = opmlDoc.CreateElement("title"); title.InnerText = Title; head.AppendChild(title); // set date created XmlElement dateCreated = opmlDoc.CreateElement("dateCreated"); dateCreated.InnerText = DateCreated != DateTime.MinValue ? DateCreated.ToString("r", null) : DateTime.Now.ToString("r", null); head.AppendChild(dateCreated); // set date modified XmlElement dateModified = opmlDoc.CreateElement("dateModified"); dateCreated.InnerText = DateModified != DateTime.MinValue ? DateModified.ToString("r", null) : DateTime.Now.ToString("r", null); head.AppendChild(dateModified); // set owner email XmlElement ownerEmail = opmlDoc.CreateElement("ownerEmail"); ownerEmail.InnerText = OwnerEmail; head.AppendChild(ownerEmail); // set owner name XmlElement ownerName = opmlDoc.CreateElement("ownerName"); ownerName.InnerText = OwnerName; head.AppendChild(ownerName); // set owner id XmlElement ownerId = opmlDoc.CreateElement("ownerId"); ownerId.InnerText = OwnerId; head.AppendChild(ownerId); // set docs XmlElement docs = opmlDoc.CreateElement("docs"); docs.InnerText = Docs; head.AppendChild(docs); // set expansionState XmlElement expansionState = opmlDoc.CreateElement("expansionState"); expansionState.InnerText = ExpansionState; head.AppendChild(expansionState); // set vertScrollState XmlElement vertScrollState = opmlDoc.CreateElement("vertScrollState"); vertScrollState.InnerText = VertScrollState; head.AppendChild(vertScrollState); // set windowTop XmlElement windowTop = opmlDoc.CreateElement("windowTop"); windowTop.InnerText = WindowTop; head.AppendChild(windowTop); // set windowLeft XmlElement windowLeft = opmlDoc.CreateElement("windowLeft"); windowLeft.InnerText = WindowLeft; head.AppendChild(windowLeft); // set windowBottom XmlElement windowBottom = opmlDoc.CreateElement("windowBottom"); windowBottom.InnerText = WindowBottom; head.AppendChild(windowBottom); // set windowRight XmlElement windowRight = opmlDoc.CreateElement("windowRight"); windowRight.InnerText = WindowRight; head.AppendChild(windowRight); // create body XmlElement opmlBody = opmlDoc.CreateElement("body"); opml.AppendChild(opmlBody); foreach (OpmlOutline outline in _outlines) { opmlBody.AppendChild(outline.ToXml); } opmlDoc.Save(fileName); } public static Opml LoadFromUrl(Uri uri) { return (OpmlDownloadManager.GetOpmlFeed(uri)); } public static Opml LoadFromFile(string path) { try { var opmlDoc = new XmlDocument { XmlResolver = null }; opmlDoc.Load(path); return (LoadFromXml(opmlDoc)); } catch { return (new Opml()); } } public static Opml LoadFromXml(XmlDocument doc) { var _out = new Opml(); try { // Parse head XmlNode head = doc.GetElementsByTagName("head")[0]; XmlNode title = head.SelectSingleNode("./title"); XmlNode dateCreated = head.SelectSingleNode("./dateCreated"); XmlNode dateModified = head.SelectSingleNode("./dateModified"); XmlNode ownerName = head.SelectSingleNode("./ownerName"); XmlNode ownerEmail = head.SelectSingleNode("./ownerEmail"); XmlNode ownerId = head.SelectSingleNode("./ownerId"); XmlNode docs = head.SelectSingleNode("./docs"); XmlNode expansionState = head.SelectSingleNode("./expansionState"); XmlNode vertScrollState = head.SelectSingleNode("./vertScrollState"); XmlNode windowTop = head.SelectSingleNode("./windowTop"); XmlNode windowLeft = head.SelectSingleNode("./windowLeft"); XmlNode windowBottom = head.SelectSingleNode("./windowBottom"); XmlNode windowRight = head.SelectSingleNode("./windowRight"); if (title != null) { _out.Title = title.InnerText; } if (dateCreated != null) { _out.DateCreated = DateTime.Parse(dateCreated.InnerText); } if (dateModified != null) { _out.DateModified = DateTime.Parse(dateModified.InnerText); } if (ownerName != null) { _out.OwnerName = ownerName.InnerText; } if (ownerEmail != null) { _out.OwnerEmail = ownerEmail.InnerText; } if (ownerId != null) { _out.OwnerId = ownerId.InnerText; } if (docs != null) { _out.Docs = docs.InnerText; } if (expansionState != null) { _out.ExpansionState = expansionState.InnerText; } if (vertScrollState != null) { _out.VertScrollState = vertScrollState.InnerText; } if (windowTop != null) { _out.WindowTop = windowTop.InnerText; } if (windowLeft != null) { _out.WindowLeft = windowLeft.InnerText; } if (windowBottom != null) { _out.WindowBottom = windowBottom.InnerText; } if (windowLeft != null) { _out.WindowLeft = windowLeft.InnerText; } // Parse body XmlNode body = doc.GetElementsByTagName("body")[0]; XmlNodeList outlineList = body.SelectNodes("./outline"); foreach (XmlElement outline in outlineList) { _out.Outlines.Add(ParseXml(outline)); } return _out; } catch { return (new Opml()); } } internal static OpmlOutline ParseXml(XmlElement node) { var newOutline = new OpmlOutline(); newOutline.Text = ParseElement(node, "text"); newOutline.Type = ParseElement(node, "type"); newOutline.IsComment = (ParseElement(node, "isComment") == "true" ? true : false); newOutline.IsBreakpoint = (ParseElement(node, "isBreakpoint") == "true" ? true : false); try { newOutline.Created = DateTime.Parse(ParseElement(node, "created")); } catch (Exception ex) { Logger.Error(ex); } newOutline.Category = ParseElement(node, "category"); try { newOutline.XmlUrl = new Uri(ParseElement(node, "xmlUrl")); } catch (Exception ex) { Logger.Error(ex); } try { newOutline.HtmlUrl = new Uri(ParseElement(node, "htmlUrl")); } catch (Exception ex) { Logger.Error(ex); } newOutline.Language = ParseElement(node, "language"); newOutline.Title = ParseElement(node, "title"); try { newOutline.Url = new Uri(ParseElement(node, "url")); } catch (Exception ex) { Logger.Error(ex); } newOutline.Description = ParseElement(node, "description"); if (node.HasChildNodes) { foreach (XmlElement childNode in node.SelectNodes("./outline")) { newOutline.Outlines.Add(ParseXml(childNode)); } } return newOutline; } private static string ParseElement(XmlElement node, string attribute) { string attrValue = node.GetAttribute(attribute); return (!String.IsNullOrEmpty(attrValue) ? attrValue : string.Empty); } } }
RichardHowells/Dnn.Platform
DNN Platform/Syndication/OPML/Opml.cs
C#
mit
15,727
// Copyright (c) 2007-2014 Joe White // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using System.Collections.Generic; using System.Text; using DGrok.Framework; using NUnit.Framework; using NUnit.Framework.Constraints; using NUnit.Framework.SyntaxHelpers; namespace DGrok.Tests { [TestFixture] public class TokenFilterTests { private CompilerDefines _defines; private MemoryFileLoader _fileLoader; [SetUp] public void SetUp() { _fileLoader = new MemoryFileLoader(); _defines = CompilerDefines.CreateEmpty(); _defines.DefineSymbol("TRUE"); _defines.UndefineSymbol("FALSE"); _defines.DefineDirectiveAsTrue("IF True"); _defines.DefineDirectiveAsFalse("IF False"); } private Constraint LexesAndFiltersAs(params string[] expected) { return new LexesAsConstraint(expected, delegate(IEnumerable<Token> tokens) { TokenFilter filter = new TokenFilter(tokens, _defines, _fileLoader); return filter.Tokens; }); } [Test] public void PassThrough() { Assert.That("Foo", LexesAndFiltersAs( "Identifier |Foo|")); } [Test] public void SingleLineCommentIsIgnored() { Assert.That("// Foo", LexesAndFiltersAs()); } [Test] public void CurlyBraceCommentIsIgnored() { Assert.That("{ Foo }", LexesAndFiltersAs()); } [Test] public void ParenStarCommentIsIgnored() { Assert.That("(* Foo *)", LexesAndFiltersAs()); } [Test] public void ParserUsesFilter() { Parser parser = ParserTestCase.CreateParser("// Foo"); Assert.That(parser.AtEof, Is.True); } [Test] public void SingleLetterCompilerDirectivesAreIgnored() { Assert.That("{$R+}", LexesAndFiltersAs()); Assert.That("{$A8}", LexesAndFiltersAs()); } [Test] public void CPlusPlusBuilderCompilerDirectivesAreIgnored() { Assert.That("{$EXTERNALSYM Foo}", LexesAndFiltersAs()); Assert.That("{$HPPEMIT '#pragma Foo'}", LexesAndFiltersAs()); Assert.That("{$NODEFINE Foo}", LexesAndFiltersAs()); Assert.That("{$NOINCLUDE Foo}", LexesAndFiltersAs()); } [Test] public void IfDefTrue() { Assert.That("0{$IFDEF TRUE}1{$ENDIF}2", LexesAndFiltersAs( "Number |0|", "Number |1|", "Number |2|")); } [Test] public void IfDefFalse() { Assert.That("0{$IFDEF FALSE}1{$ENDIF}2", LexesAndFiltersAs( "Number |0|", "Number |2|")); } [Test] public void IfDefTrueTrue() { Assert.That("0{$IFDEF TRUE}1{$IFDEF TRUE}2{$ENDIF}3{$ENDIF}4", LexesAndFiltersAs( "Number |0|", "Number |1|", "Number |2|", "Number |3|", "Number |4|")); } [Test] public void IfDefTrueFalse() { Assert.That("0{$IFDEF TRUE}1{$IFDEF FALSE}2{$ENDIF}3{$ENDIF}4", LexesAndFiltersAs( "Number |0|", "Number |1|", "Number |3|", "Number |4|")); } [Test] public void IfDefFalseTrue() { Assert.That("0{$IFDEF FALSE}1{$IFDEF TRUE}2{$ENDIF}3{$ENDIF}4", LexesAndFiltersAs( "Number |0|", "Number |4|")); } [Test] public void IfDefFalseFalse() { Assert.That("0{$IFDEF FALSE}1{$IFDEF FALSE}2{$ENDIF}3{$ENDIF}4", LexesAndFiltersAs( "Number |0|", "Number |4|")); } [Test] public void IfDefFalseUnknown() { Assert.That("0{$IFDEF FALSE}1{$IFDEF UNKNOWN}2{$ENDIF}3{$ENDIF}4", LexesAndFiltersAs( "Number |0|", "Number |4|")); } [Test] public void IfEnd() { Assert.That("0{$IF False}1{$IFEND}2", LexesAndFiltersAs( "Number |0|", "Number |2|")); } [Test] public void IfDefTrueWithElse() { Assert.That("0{$IFDEF TRUE}1{$ELSE}2{$ENDIF}3", LexesAndFiltersAs( "Number |0|", "Number |1|", "Number |3|")); } [Test] public void IfDefFalseWithElse() { Assert.That("0{$IFDEF FALSE}1{$ELSE}2{$ENDIF}3", LexesAndFiltersAs( "Number |0|", "Number |2|", "Number |3|")); } [Test] public void IfDefTrueTrueWithElses() { Assert.That("0{$IFDEF TRUE}1{$IFDEF TRUE}2{$ELSE}3{$ENDIF}4{$ELSE}5{$ENDIF}6", LexesAndFiltersAs( "Number |0|", "Number |1|", "Number |2|", "Number |4|", "Number |6|")); } [Test] public void IfDefTrueFalseWithElses() { Assert.That("0{$IFDEF TRUE}1{$IFDEF FALSE}2{$ELSE}3{$ENDIF}4{$ELSE}5{$ENDIF}6", LexesAndFiltersAs( "Number |0|", "Number |1|", "Number |3|", "Number |4|", "Number |6|")); } [Test] public void IfDefFalseTrueWithElses() { Assert.That("0{$IFDEF FALSE}1{$IFDEF TRUE}2{$ELSE}3{$ENDIF}4{$ELSE}5{$ENDIF}6", LexesAndFiltersAs( "Number |0|", "Number |5|", "Number |6|")); } [Test] public void IfDefFalseFalseWithElses() { Assert.That("0{$IFDEF FALSE}1{$IFDEF FALSE}2{$ELSE}3{$ENDIF}4{$ELSE}5{$ENDIF}6", LexesAndFiltersAs( "Number |0|", "Number |5|", "Number |6|")); } [Test] public void IfTrueElseIfTrue() { Assert.That("0{$IF True}1{$ELSEIF True}2{$ELSE}3{$IFEND}4", LexesAndFiltersAs( "Number |0|", "Number |1|", "Number |4|")); } [Test] public void IfTrueElseIfFalse() { Assert.That("0{$IF True}1{$ELSEIF False}2{$ELSE}3{$IFEND}4", LexesAndFiltersAs( "Number |0|", "Number |1|", "Number |4|")); } [Test] public void IfFalseElseIfTrue() { Assert.That("0{$IF False}1{$ELSEIF True}2{$ELSE}3{$IFEND}4", LexesAndFiltersAs( "Number |0|", "Number |2|", "Number |4|")); } [Test] public void IfFalseElseIfFalse() { Assert.That("0{$IF False}1{$ELSEIF False}2{$ELSE}3{$IFEND}4", LexesAndFiltersAs( "Number |0|", "Number |3|", "Number |4|")); } [Test] public void IPlusIsNotTreatedAsInclude() { Assert.That("{$I+}", LexesAndFiltersAs()); } [Test] public void IMinusIsNotTreatedAsInclude() { Assert.That("{$I-}", LexesAndFiltersAs()); } [Test] public void Include() { _fileLoader.Files["bar.inc"] = "Bar"; Assert.That("Foo {$INCLUDE bar.inc} Baz", LexesAndFiltersAs( "Identifier |Foo|", "Identifier |Bar|", "Identifier |Baz|")); } [Test] public void Define() { _defines.UndefineSymbol("FOO"); Assert.That("{$DEFINE FOO} {$IFDEF FOO} Foo {$ENDIF}", LexesAndFiltersAs("Identifier |Foo|")); } [Test] public void Undefine() { _defines.DefineSymbol("FOO"); Assert.That("{$UNDEF FOO} {$IFDEF FOO} Foo {$ENDIF}", LexesAndFiltersAs("")); } [Test] public void DefineScopeDoesNotExtendToOtherFiles() { _defines.UndefineSymbol("FOO"); Assert.That("{$DEFINE FOO}", LexesAndFiltersAs("")); Assert.That("{$IFDEF FOO} Foo {$ENDIF}", LexesAndFiltersAs("")); } [Test] public void DefineScopeDoesBubbleUpFromIncludeFiles() { _defines.UndefineSymbol("FOO"); _fileLoader.Files["defines.inc"] = "{$DEFINE FOO}"; Assert.That("{$I defines.inc} {$IFDEF FOO} Foo {$ENDIF}", LexesAndFiltersAs( "Identifier |Foo|")); } [Test] public void DefineIgnoredInFalseIf() { _defines.UndefineSymbol("FOO"); Assert.That("{$IF False}{$DEFINE FOO}{$IFEND} {$IFDEF FOO}Foo{$ENDIF}", LexesAndFiltersAs("")); } [Test] public void UndefineIgnoredInFalseIf() { _defines.DefineSymbol("FOO"); Assert.That("{$IF False}{$UNDEF FOO}{$IFEND} {$IFDEF FOO}Foo{$ENDIF}", LexesAndFiltersAs( "Identifier |Foo|")); } [Test, ExpectedException(typeof(LexException))] public void ThrowOnUnrecognizedDirective() { Lexer lexer = new Lexer("{$FOO}", ""); TokenFilter filter = new TokenFilter(lexer.Tokens, _defines, _fileLoader); new List<Token>(filter.Tokens); } [Test] public void UnrecognizedIsIgnoredInFalseIf() { Assert.That("{$IF False}{$FOO}{$IFEND}", LexesAndFiltersAs("")); } } }
joewhite/dgrok
Source/DGrok.Tests/TokenFilterTests.cs
C#
mit
10,816
use crate::{ analysis::{ self, conversion_type::ConversionType, function_parameters::CParameter, functions::is_carray_with_direct_elements, imports::Imports, return_value, rust_type::RustType, }, config::{self, parameter_matchable::ParameterMatchable}, env::Env, library::{ self, Function, Fundamental, Nullable, ParameterDirection, Type, TypeId, INTERNAL_NAMESPACE, }, nameutil, }; use log::error; use std::slice::Iter; #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum Mode { None, Normal, Optional, Combined, //<use function return> Throws(bool), } impl Default for Mode { fn default() -> Mode { Mode::None } } #[derive(Debug, Default)] pub struct Info { pub mode: Mode, pub params: Vec<analysis::Parameter>, } impl Info { pub fn is_empty(&self) -> bool { self.mode == Mode::None } pub fn iter(&self) -> Iter<'_, analysis::Parameter> { self.params.iter() } } pub fn analyze( env: &Env, func: &Function, func_c_params: &[CParameter], func_ret: &return_value::Info, configured_functions: &[&config::functions::Function], ) -> (Info, bool) { let mut info: Info = Default::default(); let mut unsupported_outs = false; let nullable_override = configured_functions.iter().find_map(|f| f.ret.nullable); if func.throws { let use_ret = use_return_value_for_result(env, func_ret, &func.name, configured_functions); info.mode = Mode::Throws(use_ret); } else if func.ret.typ == TypeId::tid_none() { info.mode = Mode::Normal; } else if func.ret.typ == TypeId::tid_bool() || func.ret.typ == TypeId::tid_c_bool() { if nullable_override == Some(Nullable(false)) { info.mode = Mode::Combined; } else { info.mode = Mode::Optional; } } else { info.mode = Mode::Combined; } for lib_par in &func.parameters { if lib_par.direction != ParameterDirection::Out { continue; } if can_as_return(env, lib_par) { let mut lib_par = lib_par.clone(); lib_par.name = nameutil::mangle_keywords(&lib_par.name).into_owned(); let configured_parameters = configured_functions.matched_parameters(&lib_par.name); let mut out = analysis::Parameter::from_parameter(env, &lib_par, &configured_parameters); // FIXME: temporary solution for string_type, nullable override. This should completely // work based on the analyzed parameters instead of the library parameters. if let Some(c_par) = func_c_params .iter() .find(|c_par| c_par.name == lib_par.name) { out.lib_par.typ = c_par.typ; out.lib_par.nullable = c_par.nullable; } info.params.push(out); } else { unsupported_outs = true; } } if info.params.is_empty() { info.mode = Mode::None; } if info.mode == Mode::Combined || info.mode == Mode::Throws(true) { let mut ret = analysis::Parameter::from_return_value(env, &func.ret, configured_functions); //TODO: fully switch to use analyzed returns (it add too many Return<Option<>>) if let Some(ref par) = func_ret.parameter { ret.lib_par.typ = par.lib_par.typ; } if let Some(val) = nullable_override { ret.lib_par.nullable = val; } info.params.insert(0, ret); } (info, unsupported_outs) } pub fn analyze_imports<'a>( env: &Env, parameters: impl IntoIterator<Item = &'a library::Parameter>, imports: &mut Imports, ) { for par in parameters { if par.direction == ParameterDirection::Out { analyze_type_imports(env, par.typ, par.caller_allocates, imports); } } } fn analyze_type_imports(env: &Env, typ: TypeId, caller_allocates: bool, imports: &mut Imports) { match env.library.type_(typ) { Type::Alias(alias) => analyze_type_imports(env, alias.typ, caller_allocates, imports), Type::Bitfield(..) | Type::Enumeration(..) => imports.add("std::mem"), Type::Fundamental(fund) if !matches!( fund, Fundamental::Utf8 | Fundamental::OsString | Fundamental::Filename ) => { imports.add("std::mem") } _ if !caller_allocates => match ConversionType::of(env, typ) { ConversionType::Direct | ConversionType::Scalar | ConversionType::Option | ConversionType::Result { .. } => (), _ => imports.add("std::ptr"), }, _ => (), } } pub fn can_as_return(env: &Env, par: &library::Parameter) -> bool { use super::conversion_type::ConversionType::*; match ConversionType::of(env, par.typ) { Direct | Scalar | Option | Result { .. } => true, Pointer => { // Disallow fundamental arrays without length if is_carray_with_direct_elements(env, par.typ) && par.array_length.is_none() { return false; } RustType::builder(env, par.typ) .direction(ParameterDirection::Out) .scope(par.scope) .try_build_param() .is_ok() } Borrow => false, Unknown => false, } } pub fn use_return_value_for_result( env: &Env, ret: &return_value::Info, func_name: &str, configured_functions: &[&config::functions::Function], ) -> bool { let typ = ret .parameter .as_ref() .map(|par| par.lib_par.typ) .unwrap_or_default(); use_function_return_for_result(env, typ, func_name, configured_functions) } pub fn use_function_return_for_result( env: &Env, typ: TypeId, func_name: &str, configured_functions: &[&config::functions::Function], ) -> bool { // Configuration takes precendence over everything. let use_return_for_result = configured_functions .iter() .find_map(|f| f.ret.use_return_for_result.as_ref()); if let Some(use_return_for_result) = use_return_for_result { if typ == Default::default() { error!("Function \"{}\": use_return_for_result set to true, but function has no return value", func_name); return false; } return *use_return_for_result; } if typ == Default::default() { return false; } if typ.ns_id != INTERNAL_NAMESPACE { return true; } let type_ = env.type_(typ); !matches!(&*type_.get_name(), "UInt" | "Boolean" | "Bool") }
GuillaumeGomez/gir
src/analysis/out_parameters.rs
Rust
mit
6,744
@import "reset.css"; @import "fullcalendar.css"; @import "datatable.css"; @import "ui_custom.css"; @import "prettyPhoto.css"; @import "elfinder.css"; /* Table of Content ================================================== # Basic styles # Top navigation # Left navigation & widgets # Common styles # Content # Statistic row # Gallery # Buttons # Content widgets # Progress bars # Tables # Pagination # Form styles # Footer # Other plugin styles # Media queries (remove them if you don't want to use responsive layout) ==================================================*/ /* #Switcher ================================================== */ .switcher { position: fixed; right: 0; top: 100px; background: url(../images/switcher/bg.png) no-repeat; width: 14px; height: 206px; z-index: 10000; padding: 6px 5px 0 5px; } .switcher a img { margin-bottom: 6px; } /* #Basic Styles ================================================== */ /* Wrappers */ html { height: 100%; background: transparent url(../images/backgrounds/bg.jpg); } .html { height: 100%; } body { min-height: 100%; font-size: 12px; color: #595959; font-family: Arial, Helvetica, sans-serif; line-height: 20px; position: relative; } body { background: url(../images/backgrounds/bodyBg.png) repeat-y 0 0; } .wrapper { position: relative; margin: 0 3%; } .contentWrapper { position: relative; margin: 0 3%; float: right; width: 94%; } .chart, .bars, .updating, .pie { height: 250px; z-index: 90; max-width: 100%; } .chartWrapper { overflow: hidden; } /* Text */ h1 { font-size: 24px; } h2 { font-size: 22px; } h3 { font-size: 20px; } h4 { font-size: 18px; } h5 { font-size: 16px; } h6 { font-size: 14px; } .redBack, .greenBack, .greyBack, .blueBack { padding: 4px 6px; -webkit-border-radius : 2px; -moz-border-radius: 2px; color: #fafafa; } .redBack { background: #b75d5d; } .greenBack { background: #7ab75d; } .greyBack { background: #6a6a6a; } .blueBack { background: #5d92b7; } p { padding-top: 12px; } .textL { text-align: left; } .textR { text-align: right; } .textC { text-align: center; } .red { color: #A73939; } .green { color: #599414; } .lGrey { color: #808080; } .blue { color: #4286ad; } .orange { color: #c75510; } .f11 { font-size: 11px; } /* Dividers */ .line { height: 8px; background: url(../images/divider.png) repeat-x; display: block; } .cLine { height: 4px; background: url(../images/contentDivider.png) repeat-x; } .sidebarSep { background: url(../images/sidebarSep.png) no-repeat 50%; height: 8px; width: 100%; margin: 16px 0; } /* Content */ .legendLabel span { display: block; margin: 0 5px; } .legendColorBox { padding-left: 10px; } .clear { clear: both; } .last { border-bottom: none!important; } .floatR { float: right; } .floatL { float: left; } .nobg { background: none!important; } .nomargin { margin: 0; } .nomarginL { margin-left: 0!important; } .nomarginR { margin-right: 0!important; } .np { padding: 0!important; } .sideMargin { margin: 0 12px; } #leftSide { background: url(../images/backgrounds/leftTop.png) repeat-x 0 0; margin: 0 2px; float: left; width: 216px; padding: 0 1px; padding-bottom: 60px; } #rightSide { padding-bottom: 62px; overflow: hidden; } .scroll { height: 182px; overflow: auto; } .dn, .resp { display: none; } select[multiple] { border: 1px solid #ddd; box-shadow: 0 0 0 2px #f4f4f4; -webkit-box-shadow: 0 0 0 2px #f4f4f4; -moz-box-shadow: 0 0 0 2px #f4f4f4; color: #656565; background: white; } /* Placeholder colors */ ::-webkit-input-placeholder { color: #b3b3b3; } :-moz-placeholder { color: #b3b3b3; } /* ========== Login page ========== */ .loginPage .userNav { margin-right: 0!important; } .loginPage .topNav { text-align: center; position: static; } .loginPage .userNav, .loginPage .userNav ul { float: none; border: none; } .loginPage .userNav ul li { display: inline-block; float: none; margin-left: -4px; } .loginPage input[type=text], .loginPage input[type=password] { width: 100%!important } .loginPage #footer .wrapper { padding-left: 0; } .loginPage .formRow { padding: 18px 14px; } .loginWrapper { margin: -119px 0 0 -170px; position: absolute; top: 50%; left: 50%; } .loginWrapper .widget { width: 340px; background: #f9f9f9; border: 1px solid #cdcdcd; display: block; height: 236px; } .loginLogo { position: absolute; width: 236px; height: 60px; display: block; top: -55px; left: 50%; margin-left: -118px; } .loginControl { border-top: 1px solid #fff; padding: 16px 14px; } .logMeIn { float: right; padding: 7px 20px 8px 20px!important; } .loginInput { width: 190px; float: right; margin-right: 14px!important; } .rememberMe { float: left; margin-top: 6px; } .rememberMe label { width: auto; display: block; white-space: nowrap; margin: -2px 14px 0 14px; float: left; cursor: pointer; } .backTo { border-left: 1px solid #39454f; border-right: 1px solid #39454f; float: left; } .backTo .inner { border-left: 1px solid #1c262b; border-right: 1px solid #1c262b; float: left; } .backTo a:hover { background: #293138; border-left: 1px solid #293138; border-right: 1px solid #293138; } .backTo span { padding: 4px 15px 4px 8px; display: block; float: left; } .backTo img { margin: 9px 2px 0px 14px; float: left; display: block; } .backTo a { float: left; color: #eeeeee; font-size: 11px; border-left: 1px solid #39454f; border-right: 1px solid #39454f; } /* ========== Error and offline pages ========== */ .errorWrapper { position: absolute; top: 70px; bottom: 0; text-align: center; left: 0; right: 0; height: 430px; } .errorWrapper .button { margin-bottom: 30px; } .sadEmo { background: url(../images/sadEmo.png) no-repeat; display: block; height: 62px; margin: 0 auto 0px auto; width: 62px; } .errorWrapper .errorTitle { display: block; text-shadow: 1px 0 0 #fff; text-align: center; font-size: 20px; border-bottom: 1px solid #cdcdcd; padding: 20px 14px; font-weight: bold; color: #d76a6a; font-style: italic; } .errorWrapper .errorNum { color: #fff; font-size: 200px; text-stroke: 1px transparent; padding: 120px 0 80px 0; display: block; text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.2), 0 20px 20px rgba(0,0,0,.15); } .errorDesc { display: block; margin: 40px 0 25px 0; font-weight: bold; font-size: 14px; } /* ========== Numeric data designs ========== */ .numberTop, .numberMiddle, .numberRight, .groupNum { text-align: center; background: url(../images/backgrounds/numberBg.png) repeat-x; display: inline-block; padding: 1px 5px; color: #fff; -moz-border-radius: 2px; -webkit-border-radius: 2px; -khtml-border-radius: 2px; border-radius: 2px; float: right; margin: 10px 15px 10px -5px; font-size: 11px; line-height: 14px; width: auto; height: auto!important; } .numberTop { margin: 6px 12px 6px -5px; padding: 1px 5px!important; } .numberMiddle { margin: 0; position: absolute; top: -8px; right: -1px; font-size: 11px; } .numberRight { margin: 1px 3px; background: #1B232A; border: 1px solid #333c45; padding: 2px 5px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -khtml-border-radius: 3px; border-radius: 3px; color: #d5d5d5; } .groupNum { display: block; float: none; position: absolute; top: -9px; right: 0; margin: 0; box-shadow: 0 0 0 1px #262f36; -webkit-box-shadow: 0 0 0 1px #262f36; -moz-box-shadow: 0 0 0 1px #262f36; } /* Top navigation ================================================== */ .topNav { background: url(../images/backgrounds/topnavBg.png) repeat-x; display: block; color: #eeeeee; margin: 0 0 0 -2px; padding: 3px 0; position: fixed; width: 100%; z-index: 999; } .userNav { border-left: 1px solid #39454f; border-right: 1px solid #39454f; margin-right: -2px; } .welcome { float: left; margin-left: -4px; } .welcome img { float: left; margin: 6px 8px 6px 0 } .welcome span { padding: 4px 5px; display: block; white-space: nowrap; float: left; font-size: 11px; } .userNav { float: right; z-index: 6000; position: relative; font-size: 11px; margin-right: 214px; } .userNav ul { border-left: 1px solid #39454f; border-right: 1px solid #39454f; margin-right: -1px; } .userNav ul li { display: inline; float: left; position: relative; cursor: pointer; border-left: 1px solid #1c262b; border-right: 1px solid #1c262b; margin-left: -1px; } .userNav ul li a { color: #eeeeee; text-decoration: none; display: block; float: left; border-left: 1px solid #39454f; border-right: 1px solid #39454f; } .userNav ul li a:hover { border-left: 1px solid #293138; border-right: 1px solid #293138; background-color: #293138; } .userNav ul li span { display: block; padding: 4px 15px 4px 8px; float: left; } .userNav ul li img { float: left; display: block; margin: 9px 2px 0px 14px; } ul.userDropdown { position: absolute; left: -9px; display: none; top: 35px; background: url(../images/subArrow.png) no-repeat 50% 0; padding: 0 1px 1px 1px; z-index: 100; border: none; } ul.userDropdown li { display: block; float: none; border-bottom: 1px solid #1c252b; border-top: 1px solid #404950; background: url(../images/backgrounds/navBg.jpg); } ul.userDropdown li:hover { border-top: 1px solid #374047; } ul.userDropdown li:first-child { margin-top: 6px; border-top: none; -webkit-border-top-right-radius: 2px; -webkit-border-top-left-radius: 2px; -moz-border-radius-topright: 2px; -moz-border-radius-topleft: 2px; } ul.userDropdown li:last-child { -webkit-border-bottom-right-radius: 2px; -webkit-border-bottom-left-radius: 2px; -moz-border-radius-bottomright: 2px; -moz-border-radius-bottomleft: 2px; } ul.userDropdown li a { width: 100px; padding: 6px 10px 7px 32px; font-size: 11px; text-transform: none; font-weight: normal; float: none; border: none; } ul.userDropdown li a:hover { border-right: none; border-left: none; } .sAdd { background: url(../images/icons/topnav/subAdd.png) no-repeat 11px; } .sInbox { background: url(../images/icons/topnav/subInbox.png) no-repeat 11px; } .sOutbox { background: url(../images/icons/topnav/subOutbox.png) no-repeat 11px; } .sTrash { background: url(../images/icons/topnav/subTrash.png) no-repeat 11px; } /* Left navigation ================================================== */ /* === Left navigation widgets === */ .nav li.dash a span { background-image: url(../images/icons/light/home.png); } .nav li.charts span { background-image: url(../images/icons/light/stats.png); } .nav li.forms a span { background-image: url(../images/icons/light/pencil.png); } .nav li.typo span { background-image: url(../images/icons/light/create.png); } .nav li.tables a span { background-image: url(../images/icons/light/frames.png); } .nav li.errors a span { background-image: url(../images/icons/light/alert.png); } .nav li.files a span { background-image: url(../images/icons/light/files.png); } .nav li.ui a span { background-image: url(../images/icons/light/user.png); } .nav li.widgets a span { background-image: url(../images/icons/light/fullscreen.png); } .nav li a span { background-position: 12px 13px; background-repeat: no-repeat; } /* === Left navigation classes === */ .logo { border-top: 1px solid #3b4751; margin: 3px 1px 0 1px; padding: 20px 39px; } .nav { border-top: 1px solid #1c252b; } .nav li { position: relative; } .nav li a { display: block; background: url(../images/backgrounds/navItemBg.png) repeat-x 0 0; border-bottom: 1px solid #1c252b; border-top: 1px solid #404950; } .nav li a:hover { background-position: 0 -43px; border-top: 1px solid #516271; } .nav li a.active, .nav li a:active { background-position: 0 -86px; border-top: 1px solid #657d92; } .nav li a span { padding: 10px 0 12px 42px; display: block; font-size: 10px; text-transform: uppercase; font-weight: bold; color: #efefef; } .nav li a strong { background: #1b232a; display: block; position: absolute; right: 10px; padding: 0 7px; top: 12px; box-shadow: 0 1px 1px #38444f; -webkit-box-shadow: 0 1px 1px #38444f; -moz-box-shadow: 0 1px 1px #38444f; font-size: 11px; color: #efefef; } .nav li a.active strong, .nav li a:active strong { background: #212a31; box-shadow: 0 1px 1px #557188; -webkit-box-shadow: 0 1px 1px #557188; -moz-box-shadow: 0 1px 1px #557188; } .nav .last { border-bottom: none; } ul.sub { border-bottom: 1px solid #1a2126; border-top: none; background: url(../images/backgrounds/subNavBg.jpg); } ul.sub li { border-bottom: 1px solid #1c252a; border-top: 1px solid #30373d; } ul.sub li.this { background: url(../images/backgrounds/subNavBg_active.jpg); border-bottom: 1px solid #192226; border-top: 1px solid #192226; } ul.sub li.this:first-child { border-top: 1px solid #30373D; } ul.sub li.this a { color: #d5d5d5; } ul.sub li a { background: url(../images/arrow.gif) no-repeat 12px 16px; border: none; font-family: Arial, Helvetica, sans-serif; color: #494949; font-size: 11px; padding: 8px 10px 8px 26px; color: #9da1a5; } ul.sub li a:hover { font-style: normal; border: none; color: #d5d5d5; background: url(../images/arrow.gif) no-repeat 12px 16px; } ul.sub li ul { border: none; border-top: 1px solid #c9c9c9; } ul.sub li ul li { padding-left: 10px; } /* ===== Responsive dropdown ===== */ .smalldd { display: block; position: relative; background: url(../images/backgrounds/respNavBg.png) repeat-x; } .smalldd ul { position: absolute; z-index: 999; display: none; width: 100%; top: 38px; } .smalldd ul li { background: url(../images/backgrounds/navBg.jpg); border-top: 1px solid #444b52; border-bottom: 1px solid #1c252a; position: relative; } .smalldd ul li a { padding: 8px 6%; display: block; color: #CECECE; font-size: 11px; } .smalldd ul li a img { padding-top: 3px; display: block; float: left; margin-right: 16px; } .smalldd ul li a:hover { background: #2a333b; } .smalldd ul li:hover { /*border-top: 1px solid #323940*/ } .smalldd ul li a span { padding: 10px 0 12px 42px; display: block; font-size: 10px; text-transform: uppercase; font-weight: bold; color: #efefef; } .smalldd ul li a strong { background: #1b232a; display: block; position: absolute; right: 10px; padding: 0 7px; top: 8px; box-shadow: 0 1px 1px #38444f; -webkit-box-shadow: 0 1px 1px #38444f; -moz-box-shadow: 0 1px 1px #38444f; font-size: 11px; color: #efefef; } .smalldd ul li > ul li { background: url(../images/backgrounds/subNavBg.jpg); border-bottom: 1px solid #1a2227; border-top: 1px solid #303a43; } .smalldd ul li > ul li:first-child { border-top-color: #303a43; } .smalldd ul li > ul li:hover { background: #222a30; } .smalldd ul li > ul li:hover a { color: #fff; } .smalldd ul li > .active { border-bottom: 1px solid #1C252A } .smalldd ul li ul { display: block; position: static; } .smalldd ul li ul li a, .smalldd ul li ul li a:hover { padding-left: 50px; font-size: 11px; background: url(../images/arrow.gif) no-repeat 32px 16px } .smalldd > .inactive, .smalldd > .active, .smalldd > .inactive:hover, .smalldd > .active:hover { background: url(../images/backgrounds/arrows.png) 100% 12px no-repeat; } /* === Sidebar widgets === */ /* Profile */ .sideProfile { padding: 0 12px; font-size: 11px; color: #CECECE; position: relative; } .sideProfile span { display: block; } .sideProfile span a { color: white; font-weight: bold; } .sideProfile ul { display: none; border-left: 1px solid #1c252a; border-right: 1px solid #1c252a; border-top: 1px solid #1c252a; position: absolute; top: 76px; z-index: 980; width: 190px; } .sideProfile ul li { background: #2f363c; border-top: 1px solid #444b52; border-bottom: 1px solid #1c252a; } .sideProfile ul li:first-child { border-top: none; } .sideProfile ul li a { padding: 8px 10px; display: block; color: #CECECE; } .sideProfile ul li a img { padding-top: 5px; display: block; float: left; margin-right: 14px; } .sideProfile ul li a:hover { background: #2c323a; } .profileFace { float: left; margin: 0 10px 10px 0; } .goUser { display: block; background: url(../images/backgrounds/sideDropdown.png) no-repeat 0 0; width: 172px; height: 21px; padding: 5px 10px; cursor: pointer; } .goUser:hover { background-position: 0 -32px; } .goUser:active { background-position: 0 -64px; } /* 3 buttons */ .iconsGroup { margin: 20px 14px 0 14px; border: 1px solid #262f36; box-shadow: 0 0 0 1px #394248; -webkit-box-shadow: 0 0 0 1px #394248; -moz-box-shadow: 0 0 0 1px #394248; } .iconsGroup ul li { background: url(../images/backgrounds/iconsGroup.png) repeat-x 0 0; float: left; position: relative; display: block; border-left: 1px solid #262f36; } .iconsGroup ul li a.dUsers { background: url(../images/icons/dUsers.png) no-repeat 50%; } .iconsGroup ul li a.dMessages { background: url(../images/icons/dMessages.png) no-repeat 50% 10px; } .iconsGroup ul li a.dMoney { background: url(../images/icons/dMoney.png) no-repeat 50%; padding: 21px 31px 20px 31px; } .iconsGroup ul li:first-child { border-left: none; } .iconsGroup ul li a { display: block; padding: 21px 30px 20px 31px; } .iconsGroup ul li:hover { background-position: 0 -42px; } .iconsGroup ul li:active { background-position: 0 -84px; } /* General balance */ .genBalance { height: 68px; border-top: 1px solid #252d31; border-bottom: 1px solid #242d33; background: #252d31; } .genBalance a { background: url(../images/backgrounds/genBalance.png) repeat-x; display: block; border-top: 1px solid #4a535c; color: #e0e0e0; border-bottom: 1px solid #3c444c; } .genBalance a span { font-size: 11px; display: block; margin-bottom: 6px; } .genBalance a span.balanceAmount { font-size: 22px; font-weight: bold; margin: 0; } .genBalance .amount { width: 124px; float: left; margin-right: 1px; border-right: 1px solid #3b4751; padding: 10px 14px; border-left: 1px solid #3b4751; } .genBalance .amChanges { width: 39px; float: left; border-left: 1px solid #3b4751; border-right: 1px solid #3b4751; padding: 9px 10px; } .sNegative, .sPositive, .sZero { padding: 26px 0 2px 0; text-align: center; display: block; font-size: 14px; } .sNegative { color: #e77575; } .sPositive { color: #90c254; background: url(../images/backgrounds/sidebarPositiveArrow.png) no-repeat 14px 10px; } .sZero { } /* Next update */ .nextUpdate { margin-top: 12px; } .nextUpdate ul li { color: #cecece; font-size: 11px; display: inline-block; width: 78px; padding: 0 14px; text-align: right; } .nextUpdate ul li:first-child { text-align: left; } /* Numbers statistics */ .numStats ul li { float: left; text-align: center; width: 46px; padding: 0 12px; color: #f8f8f8; font-size: 18px; border-right: 1px solid #283037; border-left: 1px solid #37414a; } .numStats ul li span { display: block; color: #717e88; font-size: 11px; } .numStats ul li.last { border-right: none; } /* Sidebar buttons */ .sButton { background: url(../images/backgrounds/sidebarButtons.png) repeat-x; width: 185px; margin: 0 auto; display: block; border: 1px solid #222a30; text-align: center; height: 34px; line-height: 34px; } .sButton span { font-size: 10px; font-weight: bold; text-transform: uppercase; color: #fefefe; display: inline-block; } .sButton img { float: left; padding: 12px 15px 12px 14px; background: url(../images/backgrounds/sidebarButtonSep.png) repeat-y 100% 0; } .sBlue { background-position: 0 0; } .sBlue:hover { background-position: 0 -35px; } .sBlue:active { background-position: 0 -70px; } .sRed { background-position: 0 -107px; } .sRed:hover { background-position: 0 -142px; } .sRed:active { background-position: 0 -177px; } .sGreen { background-position: 0 -214px; } .sGreen:hover { background-position: 0 -249px; } .sGreen:active { background-position: 0 -284px; } /* Round statistics */ .sRoundStats { width: 185px; margin: 0 auto; } .sRoundStats ul li { float: left; margin-left: 5px; text-align: center; color: white; font-size: 11px; } .sRoundStats ul li:first-child { margin-left: 0; } .sRoundStats ul li a { background: url(../images/backgrounds/roundStats.png) no-repeat 0 0; display: block; width: 58px; height: 58px; margin-top: 6px; } .sRoundStats ul li a:hover { background-position: 0 -60px; } .sRoundStats ul li a:active { background-position: 0 -120px; } .sRoundStats ul li a span { font-size: 12px; padding: 28px 2px 2px 2px; font-weight: bold; display: block; } .sRoundStats ul li a span.roundZero { color: #e2e2e2; background: url(../images/sidebarZero.png) no-repeat 50% 15px; } .sRoundStats ul li a span.roundPos { color: #a6e062; background: url(../images/sidebarPos.png) no-repeat 50% 15px; } .sRoundStats ul li a span.roundNeg { color: #e48383; background: url(../images/sidebarNeg.png) no-repeat 50% 15px; } /* Common styles ================================================== */ .fixed { box-shadow: inset 0 0 1px #748a9b; -moz-box-shadow: inset 0 0 1px #748a9b; -webkit-box-shadow: inset 0 0 1px #748a9b; } .middleNav, .widget, .sItem, .statsDetailed, .statsContent, .nav li a strong, .controlB ul li, .toggle, .smalldd ul li a strong { -moz-border-radius: 3px; -webkit-border-radius: 3px; -khtml-border-radius: 3px; border-radius: 3px; } .widget, .middleNav, .sItem, .statsDetailed { box-shadow: 0 1px 0 #fff; -moz-box-shadow: 0 1px 0 #fff; -webkit-box-shadow: 0 1px 0 #fff; } .wButton, .nNote, .widget .num a, .tag, a.sButton, .tooltip, .tPagination ul li a, .bc, .pages li a, .smallButton, .search-choice, .horControlB ul li, .gallery ul li, .iconsGroup, .logMeIn, .wContentButton { -moz-border-radius: 2px; -webkit-border-radius: 2px; -khtml-border-radius: 2px; border-radius: 2px; } .contentProgress, .invoicesBar, .barG, .barO, .barB { -moz-border-radius: 6px; -webkit-border-radius: 6px; -khtml-border-radius: 6px; border-radius: 6px; } .widget .title:first-child, ul.tabs, .toggle .title:first-child { -webkit-border-top-right-radius: 3px; -webkit-border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -moz-border-radius-topleft: 3px; } .sItem > h2 a, .mUser a, .searchWidget input[type=text] { -webkit-border-top-left-radius: 3px; -webkit-border-bottom-left-radius: 3px; -moz-border-radius-topleft: 3px; -moz-border-radius-bottomleft: 3px; } .sItem > span, .mOrders a { -webkit-border-top-right-radius: 3px; -webkit-border-bottom-right-radius: 3px; -moz-border-radius-topright: 3px; -moz-border-radius-bottomright: 3px; } .cleditorMain, table tfoot td, .totalAmount, table tr:last-child { -webkit-border-bottom-left-radius: 3px; -webkit-border-bottom-right-radius: 3px; -moz-border-radius-bottomleft: 3px; -moz-border-radius-bottomright: 3px; } .partners li:hover, .newUpdate:hover, .wUserInfo:hover { background: #fdfdfd; } /* Content ================================================== */ /* === Title area with middle navigation === */ .titleArea { padding-top: 36px; } .pageTitle { float: left; padding: 35px 0 32px 0; } .middleNav { float: right; border: 1px solid #cdcdcd; margin: 29px 0; } .middleNav ul { } .middleNav ul li { display: block; float: left; border-left: 1px solid #cdcdcd; position: relative; } .middleNav ul li:first-child { border-left: none; } .middleNav ul li a { width: 60px; height: 45px; display: block; border: 1px solid #fbfbfb; cursor: pointer; background: #e9e9e9 url(../images/backgrounds/middleNavBg.png) repeat-x; } .middleNav ul li a:hover { background: #f3f3f3; } .middleNav ul li a:active { background: #efefef; } .middleNav ul li a span { display: block; height: 45px; } .middleNav ul li a span.files { background: url(../images/icons/middlenav/files.png) no-repeat 18px; } .middleNav ul li a span.users { background: url(../images/icons/middlenav/users.png) no-repeat 11px; } .middleNav ul li a span.messages { background: url(../images/icons/middlenav/messages.png) no-repeat 14px; } .middleNav ul li a span.orders { background: url(../images/icons/middlenav/orders.png) no-repeat 16px; } .middleNav ul li ul { position: absolute; top: 50px; right: -1px; width: 156px; z-index: 996; border: none; background: url(../images/subArrow.png) no-repeat 82% 0; display: none; } .middleNav ul li ul li { display: block; float: none; border-bottom: 1px solid #1c252b; border-top: 1px solid #404950; border-left: none; background: url(../images/backgrounds/navBg.jpg); } .middleNav ul li ul li:hover { border-top: 1px solid #374047; } .middleNav ul li ul li:first-child { margin-top: 6px; -webkit-border-top-right-radius: 2px; -webkit-border-top-left-radius: 2px; -moz-border-radius-topright: 2px; -moz-border-radius-topleft: 2px; } .middleNav ul li ul li:last-child { -webkit-border-bottom-right-radius: 2px; -webkit-border-bottom-left-radius: 2px; -moz-border-radius-bottomright: 2px; -moz-border-radius-bottomleft: 2px; } .middleNav ul li ul li a { background: url(../images/subIcon.png) no-repeat 12px 15px; width: auto; border: none; color: #d1d1d1; height: auto; padding: 7px 3px 8px 25px; font-size: 11px; } .middleNav ul li ul li a:hover { background: #293138 url(../images/subIcon.png) no-repeat 12px 15px; } /* Statistic row ================================================== */ /* ===== Statistics ===== */ .statsRow { background: url(../images/backgrounds/titleRowBg.png); } .statsItems { padding: 20px 0 14px 0; overflow: visible; text-align: center; } .sItem { width: /*15%*/; margin: 0 1%; display: inline-block; border: 1px solid #d5d5d5; position: relative; background: #eee url(../images/backgrounds/stats.png) repeat-x; } .sItem:first-child { } .sItem > span { display: block; color: #626262; } .sItem > h2 { float: left; } .sItem > h2 a { display: block; color: #626262; background: #eee url(../images/backgrounds/stats.png) repeat-x; cursor: pointer; } .sItem > h2 a:hover { background-position: 0 -62px; } .sItem > h2 a:active { background-position: 0 -124px; } .value { text-align: center; padding: 12px 20px 5px 20px; font-weight: bold; } .value span { display: block; margin-top: 2px; font-size: 12px; } .changes { text-align: center; font-weight: bold; font-size: 14px; padding: 14px 18px 5px 18px; float: left; border-left: 1px solid #d5d5d5; } .changes .negative { background: url(../images/negArrow.png) no-repeat 0px 5px; padding-left: 22px; color: #db6464; margin-top: 4px; display: block; } .changes .positive { background: url(../images/posArrow.png) no-repeat 0px 6px; padding-left: 22px; color: #6daa24; margin-top: 4px; display: block; } .changes .zero { background: url(../images/zero.png) no-repeat 4px 6px; padding-left: 20px; color: #4e8fc6; margin-top: 4px; display: block; } /* Stats dropdowns */ .statsContent { border: 2px solid #b0b0b0; margin-top: 6px; background: #f3f3f3; } .statsDetailed .subArrow { } .sElements { background: url(../images/backgrounds/statsElementsBg.png) repeat-x; text-align: center; } .statsDetailed { position: absolute; left: 50%; top: 75px; width: 222px; z-index: 998; background: url(../images/subArrowStats.png) no-repeat 50% 0; display: none; margin-left: -110px; } .statsDetailed .statsDropBtn { text-align: center; padding: 12px 0 12px 0; } .statsDetailed .statsDropBtn a { display: inline-block; } .statsDetailed .sDisplay { background: url(../images/backgrounds/darkGreyCircle.png) no-repeat; width: 57px; height: 65px; display: inline-block; margin: 15px 5px 25px 5px; text-align: center; } .statsDetailed .sDisplay h4 { padding: 18px 0 30px 0; display: block; color: #fefefe; } .statsDetailed .sDisplay span { font-size: 11px; } .statsUpdate { margin: 8px 12px 2px 12px; } .statsUpdate span { width: 95px; display: inline-block; text-align: right; } .statsUpdate span:first-child { text-align: left; } .statsUpdate .contentProgress { margin-top: 5px; } /* ===== Control buttons ===== */ .controlB { text-align: center; padding: 11px 0 22px 0; } .controlB ul li { display: inline-block; margin: 11px 5px 0 5px; background: url(../images/backgrounds/controlB.png) repeat-x; border: 1px solid #d5d5d5; text-align: center; box-shadow: inset 0 0 0 1px #fff; -webkit-box-shadow: inset 0 0 0 1px #fff; -moz-box-shadow: inset 0 0 0 1px #fff; } .controlB ul li:hover { background-position: 0 -72px; } .controlB ul li:active { background-position: 0 -144px; } .controlB ul li a { padding: 10px 20px 4px 20px; display: block; font-weight: bold; white-space: nowrap; color: #626262; } .controlB ul li a span { display: block; margin-top: 5px; } /* ===== Horizontal control buttons ===== */ .horControlB { text-align: center; padding: 11px 0 22px 0; } .horControlB ul li { display: inline-block; margin: 11px 5px 0 5px; background: url(../images/backgrounds/horControlB.png) repeat-x; border: 1px solid #d5d5d5; text-align: center; box-shadow: inset 0 0 0 1px #fff; -webkit-box-shadow: inset 0 0 0 1px #fff; -moz-box-shadow: inset 0 0 0 1px #fff; } .horControlB ul li:hover { background-position: 0 -43px; } .horControlB ul li:active { background-position: 0 -86px; } .horControlB ul li a { display: block; font-weight: bold; white-space: nowrap; color: #626262; } .horControlB ul li img { float: left; margin: 12px 12px 10px 12px; } .horControlB ul li a span { display: block; margin: 0px 0 0 40px; padding: 10px 16px 8px 16px; border-left: 1px solid #d5d5d5; } /* Gallery ================================================== */ .gallery { margin: auto; padding: 4px 0.5% 12px 0.5%; text-align: center; } .gallery ul li { display: inline-block; height: 102px; margin: 12px 6px 0 6px; border: 1px solid #cdcdcd; position: relative; } .gallery ul li:hover { border-color: #ddd; } .gallery .actions { background: #000; opacity: 0.8; position: absolute; top: -1px; right: -1px; display: none; padding: 1px 2px; } .gallery .actions a { color: #fff; font-size: 11px; display: block; padding: 4px 5px 3px 0; float: left; } .gallery .actions a img { margin-left: 5px; } .gallery .actions a:first-child { padding-right: 0; } /* Buttons ================================================== */ .button, button, input[type=submit], input[type=reset], input[type=button] { font-size: 10px; font-weight: bold; background-image: url(../images/ui/usualButtons.png); background-repeat: repeat-x; text-transform: uppercase; white-space: nowrap; cursor: pointer; font-family: Arial, Helvetica, sans-serif; line-height: 12px; display: inline-block; max-height: 29px; } input[type=submit], input[type=reset], input[type=button], button { padding: 7px 18px 8px 18px; } .formSubmit { display: block; float: right; margin: 14px 18px; } .button span { padding: 7px 18px 8px 18px; display: inline-block; height: 12px; } .button .icon { float: left; margin: 7px -8px 5px 12px; } .smallButton { border: 1px solid #cdcdcd; background: url(../images/backgrounds/titleBg.png) repeat-x 0 0; padding: 5px 7px; display: inline-block; } .smallButton:hover { background: #f6f6f6; } .smallButton:active { background: #f2f2f2; } .basic { background-position: 0 0; border: 1px solid #c7c7c7; color: #595959; } .basic:hover { background-position: 0 -28px; } .basic:active { background-position: 0 -56px; } .blueB { background-position: 0 -85px; border: 1px solid #3672a0; color: #fff; } .blueB:hover { background-position: 0 -113px; } .blueB:active { background-position: 0 -141px; } .redB { background-position: 0 -170px; border: 1px solid #9f352b; color: #fff; } .redB:hover { background-position: 0 -198px; } .redB:active { background-position: 0 -226px; } .greyishB { background-position: 0 -255px; border: 1px solid #576270; color: #fff; } .greyishB:hover { background-position: 0 -283px; } .greyishB:active { background-position: 0 -311px; } .brownB { background-position: 0 -340px; border: 1px solid #99682b; color: #fff; } .brownB:hover { background-position: 0 -368px; } .brownB:active { background-position: 0 -396px; } .greenB { background-position: 0 -425px; border: 1px solid #7ca82a; color: #fff; } .greenB:hover { background-position: 0 -453px; } .greenB:active { background-position: 0 -481px; } .dredB { background-position: 0 -510px; border: 1px solid #893f3f; color: #fff; } .dredB:hover { background-position: 0 -538px; } .dredB:active { background-position: 0 -566px; } .violetB { background-position: 0 -595px; border: 1px solid #7e6095; color: #fff; } .violetB:hover { background-position: 0 -623px; } .violetB:active { background-position: 0 -651px; } .dblueB { background-position: 0 -680px; border: 1px solid #2e6691; color: #fff; } .dblueB:hover { background-position: 0 -708px; } .dblueB:active { background-position: 0 -736px; } .blackB { background-position: 0 -765px; border: 1px solid #2f2f2f; color: #fff; } .blackB:hover { background-position: 0 -793px; } .blackB:active { background-position: 0 -821px; } /* === Widget buttons === */ .wButton, .wContentButton { font-size: 10px; font-weight: bold; text-transform: uppercase; color: #FEFEFE; height: 33px; text-align: center; display: inline-block; line-height: 33px; background: url(../images/ui/widgetButtons.png) repeat-x; } .wContentButton { display: block; margin-top: 32px; } .wButton span { padding: 0 20px; display: inline-block; } .orangewB { background-position: 0 0; border: 1px solid #8e4626; } .orangewB:hover { background-position: 0 -36px; } .orangewB:active { background-position: 0 -72px; } .redwB { background-position: 0 -109px; border: 1px solid #803939; } .redwB:hover { background-position: 0 -145px; } .redwB:active { background-position: 0 -181px; } .bluewB { background-position: 0 -218px; border: 1px solid #3573a8; } .bluewB:hover { background-position: 0 -254px; } .bluewB:active { background-position: 0 -290px; } .greenwB { background-position: 0 -327px; border: 1px solid #6d8737; } .greenwB:hover { background-position: 0 -363px; } .greenwB:active { background-position: 0 -399px; } .purplewB { background-position: 0 -436px; border: 1px solid #873862; } .purplewB:hover { background-position: 0 -472px; } .purplewB:active { background-position: 0 -508px; } /* === List styles === */ .list li { padding: 0 0 0 15px; } .list > strong { display: block; font-weight: bold; padding-bottom: 4px; } .arrowB li { background: url(../images/icons/lists/arrowB.png) no-repeat 0 7px; } .arrowG li { background: url(../images/icons/lists/arrowG.png) no-repeat 0 7px; } .arrowlG li { background: url(../images/icons/lists/arrowlG.png) no-repeat 0 7px; } .arrowR li { background: url(../images/icons/lists/arrowR.png) no-repeat 0 7px; } .tipB li { background: url(../images/icons/lists/tipB.png) no-repeat 0 7px; } .tipG li { background: url(../images/icons/lists/tipG.png) no-repeat 0; } .tiplG li { background: url(../images/icons/lists/tiplG.png) no-repeat 0; } .tipR li { background: url(../images/icons/lists/tipR.png) no-repeat 0; } .plusB li { background: url(../images/icons/lists/plusB.png) no-repeat 0 5px; } .plusG li { background: url(../images/icons/lists/plusG.png) no-repeat 0 5px; } .pluslG li { background: url(../images/icons/lists/pluslG.png) no-repeat 0 5px; } .plusR li { background: url(../images/icons/lists/plusR.png) no-repeat 0 5px; } .roundtipB li { background: url(../images/icons/lists/roundtipB.png) no-repeat 0 5px; } .roundtipG li { background: url(../images/icons/lists/roundtipG.png) no-repeat 0 5px; } .roundtiplG li { background: url(../images/icons/lists/roundtiplG.png) no-repeat 0 5px; } .roundtipR li { background: url(../images/icons/lists/roundtipR.png) no-repeat 0 5px; } /* Content widgets ================================================== */ /* Widgets grid */ .widgets { } .oneTwo { width: 49%; display: inline; float: right; } .oneTwo:first-child { float: left; } .oneThree { width: 32%; display: inline; float: left; margin-left: 2%; } .oneThree:first-child { margin-left: 0; float: left; } .twoOne { width: 66%; float: right; margin-left: 2%; } .twoOne:first-child { margin-left: 0; float: left; } .oneFour { width: 23%; float: left; margin-left: 2.7%; } .oneFour:first-child { margin-left: 0; } /* Left & Right lists inside widgets */ .leftList { float: left; max-width: 50%; } .rightList { float: right; max-width: 50%; } .rightList li { text-align: right; } /* Top widget icons styles */ .topIcons { float: right; margin: 12px 12px 12px 0; } .topIcons a { margin-left: 5px; } .topIcons a:first-child { margin: 0; } /* General widgets styles */ .widget { background: #f9f9f9; border: 1px solid #cdcdcd; margin-top: 32px; clear: both; } .widget .title { height: 36px; background: #efefef url(../images/backgrounds/titleBg.png) repeat-x; border-bottom: 1px solid #cdcdcd; } .widget .title .titleIcon { float: left; padding: 11px 11px; border-right: 1px solid #D5D5D5; } .toggle { background: #f9f9f9; border: 1px solid #cdcdcd; margin-top: 32px; clear: both; border-bottom: none; } .toggle .title { height: 36px; background: #efefef url(../images/backgrounds/titleBg.png) repeat-x; border-bottom: 1px solid #cdcdcd; cursor: pointer; } .toggle .title h6 { float: left; font-size: 12px; font-weight: bold; padding: 9px 12px 8px 12px; display: block; } .toggle .titleIcon { float: left; padding: 11px 11px; border-right: 1px solid #D5D5D5; } .toggle .body, .toggle .menu_body { padding: 12px 14px; border-bottom: 1px solid #cdcdcd; } .toggle .inactive { color: #2B6893; } .widget .loader { float: right; margin: 12px 12px 0 0; } .widget .title h6 { float: left; font-size: 12px; font-weight: bold; padding: 9px 12px 8px 12px; } .widget .content { padding: 14px; } .widget .body { padding: 12px 14px; } .widget > p { padding: 12px; } /* Sidebar search widget */ .sidebarSearch { position: relative; } .sidebarSearch input[type=text] { background: url(../images/backgrounds/sidebarSearch.png) repeat-x; color: #A2A2A2; padding: 6px 10px 7px 10px; width: 196px; height: 16px; border: none; border-top: 1px solid #333D46; border-radius: 0; border-bottom: 1px solid #39434c; } .sidebarSearch input[type=submit] { width: 23px; height: 23px; background: url(../images/sidebarSearchBtn.png) no-repeat; position: absolute; top: 4px; right: -7px; border: none; } .sidebarSearch input[type=submit]:hover { background-position: 0 -24px; } .sidebarSearch input[type=submit]:active { background-position: 0 -48px; } /* User info widget */ .wUserInfo { padding: 12px 12px 9px 12px; } .wUserInfo a { display: block; } .wUserPic { float: left; margin: 0 10px 0 0; } /* Invoice stats widget */ .wInvoice { } .wInvoice > ul li { width: 32%; display: inline-block; text-align: center; border-left: 1px dotted #d5d5d5; margin-top: 14px; padding-top: 2px; } .wInvoice > ul li:first-child { border-left: none; } .wInvoice > ul li span { font-size: 11px; } .invButtons { margin-top: 10px; text-align: center; } .invButtons .bFirst { float: left; } .invButtons .bLast { float: right; } ul.ruler { width: 100%; margin-bottom: 8px; } ul.ruler li { display: block; float: left; color: #757575; font-size: 10px; width: 33%; } ul.ruler li:last-child { width: 34%; } /* Tabs */ ul.tabs { background: url(../images/backgrounds/titleBg.png) repeat-x; height: 36px; border-bottom: 1px solid #CDCDCD; } ul.tabs li { float: left; height: 36px; line-height: 38px; border-left: none; overflow: hidden; position: relative; font-size: 15px; border-right: 1px solid #cdcdcd; } ul.tabs li a { display: block; padding: 0px 12px; outline: none; color: #424242; font-size: 12px; font-weight: bold; } ul.tabs li a:hover { color: #797979; } html ul.tabs li.activeTab { background-color: #f9f9f9; height: 37px; } .rightTabs .activeTab { height: 36px!important; } html ul.tabs li.activeTab a { color: #2E6B9B; } .tab_container { overflow: hidden; width: 100%; } .tab_content { padding: 10px 12px; } .rightTabs { position: relative; } .rightTabs ul.tabs { float: right; background: none; height: 38px; position: absolute; top: 0; right: 0; border-bottom: none; } .rightTabs ul.tabs li { border-left: 1px solid #cdcdcd; border-right: none; } /* Search widget */ .searchWidget { position: relative; margin-top: 32px; } .searchWidget input[type=text] { border: 1px solid #d5d5d5; padding: 10px!important; width: 93%!important; height: 14px; } .searchWidget input[type=submit] { background: url(../images/searchBtn.png) no-repeat 0 0; position: absolute; top: 0; right: 0; border: none; width: 36px; height: 36px; max-height: 100%; } /* Task table widget */ .taskWidget td.taskD, .taskWidget td.taskP, .taskWidget td.taskPr { text-align: left; padding-left: 32px; background-position: 12px 14px; background-repeat: no-repeat; } .taskWidget td.taskD { background-image: url(../images/icons/taskDone.png); } .taskWidget td.taskP { background-image: url(../images/icons/taskPending.png); } .taskWidget td.taskPr { background-image: url(../images/icons/taskProgress.png); } .taskWidget a { color: #595959; } .taskWidget td { text-align: center; } .actBtns { text-align: center; } .actBtns img { margin: 0 3px; } /* Accordion */ .menu_body { display: none; padding: 12px 14px; } .acc .head { margin-bottom: -1px; cursor: pointer; } .acc .head h6 { padding: 9px 14px; } /* Website statistics widget */ .webStatsLink { color: #2e6b9b; font-size: 16px; font-weight: bold; } .statsPlus, .statsMinus { padding-left: 20px; } .statsPlus { background: url(../images/icons/grown.png) no-repeat 0 2px; color: #599414; } .statsMinus { background: url(../images/icons/dropped.png) no-repeat 0 2px; color: #a73939; } /* Content statistics widget */ .contentStats { } .contentStats li { padding: 8px 12px; border-top: 1px solid #d5d5d5; } .contentStats li:first-child { border-top: none; } .contentStats li:hover { background-color: #fafafa; } .contentStats h5 { display: block; float: left; margin-right: 6px; padding-left: 32px; padding-top: 1px; } .contentStats .nComments { background: url(../images/icons/dialog.html) no-repeat 0; } .contentStats .nSubscribers { background: url(../images/icons/sub.html) no-repeat 0 2px; } .contentStats .nFollowers { background: url(../images/icons/dark/twitter.png) no-repeat 0; } .contentStats .nAffiliates { background: url(../images/icons/plusS.html) no-repeat 0 2px; } .contentStats .nUploads { background: url(../images/icons/add.png) no-repeat 0 2px; } /* New order widget */ .userRow { padding: 12px 12px 7px 12px; } .orderRow, .totalAmount { padding: 7px 12px; } .userRow ul { padding-left: 12px; margin-top: -1px; } .orderRow ul li { padding-top: 2px; } .orderRow ul li:first-child { padding-top: 0; } .totalAmount { background: #efefef url(../images/backgrounds/titleBg.png) repeat-x; padding: 8px 12px; } .orderIcons { margin-top: 4px; } .orderIcons span { background: url(../images/icons/orderStatus.png) no-repeat; display: block; float: right; margin-left: 8px; } .orderIcons .oPaid, .orderIcons .oUnpaid { width: 7px; height: 12px; } .orderIcons .oPaid { background-position: 0 0; } .orderIcons .oUnpaid { background-position: 0 -13px; } .orderIcons .oShipped, .orderIcons .oUnshipped { width: 21px; height: 12px; } .orderIcons .oShipped { background-position: 0 -26px; } .orderIcons .oUnshipped { background-position: 0 -39px; } .orderIcons .oFinished, .orderIcons .oUnfinished { width: 12px; height: 12px; } .orderIcons .oFinished { background-position: 0 -52px; } .orderIcons .oUnfinished { background-position: 0 -65px; } /* Partners list widget */ .partners { } .partners img { margin-right: 12px; } .partners li { border-top: 1px solid #cdcdcd; padding: 12px 12px 8px 12px; } .partners li:first-child { border-top: none; } .pInfo { float: left; } .pLinks { float: right; width: 12px; margin-left: 5px; } .pInfo i { display: block; } .pLinks a { margin-top: 10px; display: block; } .pLinks a:first-child { margin-top: 3px; }. /* New updates widget */ .updates { padding-left: 0px; } .updates .uDate { float: right; width: 30px; text-align: center; color: #bbbbbb; margin: 4px -2px 0 0; } .updates .uDate .uDay { font-size: 20px; font-weight: bold; display: block; margin-bottom: -4px; } .uDone, .uAlert, .uNotice { float: left; display: block; padding-left: 22px; max-width: 76%; } .uDone { background: url(../images/icons/updateDone.png) no-repeat 0 4px; } .uAlert { background: url(../images/icons/updateWarning.png) no-repeat 0 4px; } .uNotice { background: url(../images/icons/updateNotice.png) no-repeat 0 4px; } .newUpdate { border-top: 1px solid #d5d5d5; padding: 10px 12px; } .newUpdate:first-child { border-top: none; } .newUpdate span { display: block; } /* === Numeric data === */ .widget .num { float: right; display: inline-block; text-align: center; margin: 8px 8px 0 0; font-size: 11px; } .widget .num span { margin-right: 10px; } .widget .num a { background: url(../images/ui/numDataBg.png) repeat-x; height: 19px; padding: 2px 5px; color: #fefefe; } .widget .num a.blueNum { background-position: 0 -114px; border: 1px solid #4b8bc4; } .widget .num a.blueNum:hover { background-position: 0 -133px; } .widget .num a.blueNum:active { background-position: 0 -152px; } .widget .num a.redNum { background-position: 0 -171px; border: 1px solid #c83e3e; } .widget .num a.redNum:hover { background-position: 0 -190px; } .widget .num a.redNum:active { background-position: 0 -209px; } .widget .num a.greenNum { background-position: 0 0; border: 1px solid #84b550; } .widget .num a.greenNum:hover { background-position: 0 -19px; } .widget .num a.greenNum:active { background-position: 0 -38px; } .widget .num a.greyishNum { background-position: 0 -57px; border: 1px solid #587787; } .widget .num a.greyishNum:hover { background-position: 0 -76px; } .widget .num a.greyishNum:active { background-position: 0 -95px; } .widget .num a.greyNum { background-position: 0 -228px; border: 1px solid #585858; } .widget .num a.greyNum:hover { background-position: 0 -247px; } .widget .num a.greyNum:active { background-position: 0 -266px; } /* ===== Notification messages ===== */ .nNote { cursor: pointer; margin: 32px 0px 0px 0px; box-shadow: inset 0 0 1px #fff; -webkit-box-shadow: inset 0 0 1px #fff; -moz-box-shadow: inset 0 0 1px #fff; } .nNote strong { margin-right: 5px; } .nNote p { font-size: 11px; padding: 10px 25px 10px 54px; margin: 0px; color: #565656; } .nMessage p { font-size: 11px; } .nWarning { background: #ffe9ad url(../images/icons/notifications/error.png) no-repeat 15px center; border: 1px solid #eac572; color: #826200; } .nSuccess { background: #effeb9 url(../images/icons/notifications/accept.png) no-repeat 15px center; border: 1px solid #c1d779; color: #3C5A01; } .nFailure { background: #fccac1 url(../images/icons/notifications/exclamation.png) no-repeat 15px center; border: 1px solid #e18b7c; color: #AC260F; } .nInformation { background: #deeefa url(../images/icons/notifications/information.png) no-repeat 15px center; border: 1px solid #afd3f2; color: #235685; } .nLightbulb { background: #FEF0CB url(../images/icons/notifications/lightbulb.html) no-repeat 15px center; border: 1px solid #D3A350; color: #835F21; } .nMessages { background: #9DDFFF url(../images/icons/notifications/email.html) no-repeat 15px center; border: 1px solid #42B4FF; color: #835F21; } /* Progress bars ================================================== */ /* ===== Sidebar progress bars ===== */ .pWrapper { padding: 3px; width: 183px; height: 2px; background: url(../images/ui/progress_container.png); margin: 12px; } .progressG { height: 2px; width: 0px; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; background: #90c255; } .progressO { height: 2px; width: 0px; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; background: #e27924; } .progressB { height: 2px; width: 0px; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; background: #5ca8e5; } .progressR { height: 2px; width: 0px; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; background: #dc595c; } /* ===== Content progress bars ===== */ .contentProgress { height: 6px; background: #dedede; border: 1px solid #cacaca; } .invoicesBar { height: 6px; width: 0; margin: -1px 0 0 -1px; background: url(../images/ui/greenMediumBar.png) repeat-x; border: 1px solid #a1b965; } .barG { height: 6px; width: 0; margin: -1px 0 0 -1px; background: url(../images/ui/greenMediumBar.png) repeat-x; border: 1px solid #a1b965; } .barO { height: 6px; width: 0; margin: -1px 0 0 -1px; background: url(../images/ui/orangeMediumBar.png) repeat-x; border: 1px solid #ee9255; } .barB { height: 6px; width: 0; margin: -1px 0 0 -1px; background: url(../images/ui/blueMediumBar.png) repeat-x; border: 1px solid #70a9d4; } /* Tables ================================================== */ /* ===== Static table ===== */ .sTable thead td { text-align: center; } .sTable thead td { border-bottom: 1px solid #cbcbcb; border-left: 1px solid #cbcbcb; background: #efefef url(../images/backgrounds/titleBg.png) repeat-x; color: #878787; font-size: 11px; color: #878787; font-weight: normal; padding: 3px 8px 2px 8px; } table thead td.sortCol > div { cursor: pointer; position: relative; } table thead td span { background: url(../images/icons/sort.png) no-repeat 0; display: block; position: absolute; right: 3px; top: 2px; width: 16px; height: 16px; } table thead td.headerSortUp span { background: url(../images/icons/sortUp.png) no-repeat 0; } table thead td.headerSortDown span { background: url(../images/icons/sortDown.png) no-repeat 0; } .sTable thead td a { color: #878787; } .sTable thead td:first-child { border-left: none; } .mTable tfoot tr { height: 50px; background: #efefef url(../images/backgrounds/titleBg.png) repeat-x; border-top: 1px solid #ddd; } .fileInfo { font-size: 11px; text-align: center; } .fileInfo span { display: block; } .itemActions { float: left; margin: 12px; } .itemActions label { float: left; margin: 4px 12px 0 4px; font-size: 11px; } .itemActions .selector, .itemActions .selector span { width: 120px; } .itemActions .selector select { width: 130px; } .sTable .checker { margin: 0 auto; float: none; } .sTable tbody tr { border-top: 1px solid #e4e4e4; } .sTable tbody tr:nth-child(even) { background-color: #f6f6f6; } .sTable tbody td { border-left: 1px solid #e4e4e4; padding: 8px 12px; vertical-align: middle; } .sTable tbody td:first-child { border-left: none; } .sTable tbody tr:first-child { border-top: none; } .withCheck tbody tr td:first-child, .withCheck tbody tr th:first-child { padding: 11px; } .withCheck thead tr td:first-child { vertical-align: middle; width: 37px!important; padding: 0; } /* Pagination ================================================== */ /* ===== Table pagination ===== */ .tPagination { float: right; display: block; text-align: center; margin: 16px 12px 0 5px; } .tPagination ul li { display: inline-block; } .tPagination ul li a { color: #595959; background: #fefefe url(../images/backgrounds/tPagination.png) repeat-x; padding: 3px 7px; border: 1px solid #ddd; font-size: 11px; } .tPagination ul li.prev a { background: url(../images/icons/prev.png) no-repeat 0; border: none; } .tPagination ul li.next a { background: url(../images/icons/next.png) no-repeat 100%; border: none; } /* ========== Content pagination ========== */ .pagination { margin: auto; width: auto; text-align: center; margin-top: 30px; } .pages { } .pages li.prev { margin-right: 15px; } .pages li.next { margin-left: 15px; } .pages li { display: inline-block; margin: 5px 2px; } .pages li a { height: 25px; padding: 4px 8px; text-decoration: none; color: #666666; font-weight: bold; background: url(../images/backgrounds/pagingBg.png) repeat-x 0 0; border: 1px solid #d5d5d5; font-size: 11px; } .pages li a:hover { background: #f6f6f6; } .pages li .active { background: url(../images/backgrounds/sideGradient.png) repeat-x; color: #fff; border-color: #424852; } .pages li .active:hover { background: #2a313d; } /* Form styles ================================================== */ /* ===== General form styles ===== */ .formRow { padding: 22px 14px; clear: both; border-bottom: 1px solid #E2E2E2; border-top: 1px solid white; position: relative; } .formRow:first-child { border-top: none; } .formRow:last-child { border-bottom: none; } .ui-formwizard .formRow:last-child { border-bottom: 1px solid #E2E2E2 ; } .wizButtons { border-top: 1px solid #fff; } .formRow .inputImg { position: absolute; top: 29px; right: 25px; } .formRow .labelImg { float: left; margin: 2px 10px 0 0; } .formRow > label { padding: 4px 0; display: block; float: left; } .formRight label { float: left; margin-right: 24px; padding: 2px 0; cursor: pointer; } .formNote { display: block; text-align: left; font-size: 11px; padding-top: 5px; color: #939393; } .req { float: right; margin-left: 5px; display: block; color: #DB6464; } .disabled { color: #c0c0c0; } .sliderSpecs > label { font-size: 11px; margin-right: 10px; } .sliderSpecs > input { border: none; background: none; width: 30%; padding: 5px; color: #595959; } .formRow .checker, .formRow .radio { margin-right: 12px; margin-top: 4px; } .formRow .formRight { display: block; float: right; width: 80%; margin-right: 18px; } .form input[type=text], .form input[type=password], .form textarea { font-size: 11px; padding: 7px 6px; background: white; border: 1px solid #DDD; width: 100%; font-family: Arial, Helvetica, sans-serif; box-shadow: 0 0 0 2px #f4f4f4; -webkit-box-shadow: 0 0 0 2px #f4f4f4; -moz-box-shadow: 0 0 0 2px #f4f4f4; color: #656565; } .form input[type=text]:hover, .form input[type=password]:hover, .form textarea:hover { border-color: #d5d9dc; background: #fdfdfd; } .form input[type=text]:focus, .form input[type=password]:focus, .form textarea:focus { border-color: #d5d9dc; background: #fff; -webkit-box-shadow: 0 0 0 2px #f4f4f4; box-shadow: 0 0 0 2px #f4f4f4; -moz-box-shadow: 0 0 0 2px #f4f4f4; } input[readonly], input[disabled] { background: #FCFCFC; border: 1px solid #DADADA; color: #D1D1D1; } .multiple { width: 100%; padding: 5px; } /* ===== Limit box ===== */ .limBox { font-size: 11px; padding: 10px 0; display: block; } .limiterBox { border: 1px solid #ddd; border-top: none; background: #efefef url(../images/backgrounds/titleBg.png) repeat-x; padding: 4px 6px; font-size: 11px; margin-top:1px; } /* ===== Tags input ===== */ div.tagsinput { border: 1px solid #ddd; box-shadow: 0 0 0 2px #f4f4f4; -webkit-box-shadow: 0 0 0 2px #f4f4f4; -moz-box-shadow: 0 0 0 2px #f4f4f4; background: #FFF; padding: 5px; width: 100%; overflow-y: auto;} div.tagsinput span.tag { border: 1px solid #a5d24a; display: block; float: left; padding: 3px 8px 2px 8px; background: #cde69c; color: #638421; margin: 5px 5px 5px 5px; } div.tagsinput span.tag a { font-weight: bold; color: #82ad2b; font-size: 11px; float: right; margin-top: -1px; } div.tagsinput input { width: 80px; border: none; padding: 5px; background: transparent; margin: 5px 5px 0 0; } div.tagsinput div { display: block; float: left; } .tags_clear { clear: both; width: 100%; height: 0px; } .not_valid { background: #FBD8DB !important; color: #90111A !important;} /* ===== Timepicker ===== */ .timepicker { width: 46px!important; } .timeEntry_control { vertical-align: middle; margin-left: -1px; margin-top: -2px; cursor: pointer; } * html .timeEntry_control { margin-top: -4px; } .timeEntry_wrap { margin-right: 12px; } /* ===== Spinner ===== */ .ui-spinner { width: 10em; display: block; position: relative; overflow: hidden; border: 1px solid #cacaca; background: url(../images/forms/spinnerBg.png) repeat-x top left!important; padding-left: 8px; } .ui-spinner-disabled { background: #F4F4F4; color: #CCC; } .ui-spinner input.ui-spinner-box { border: none!important; background: none!important; box-shadow: none!important; padding: 6px 0!important; } .ui-spinner-up, .ui-spinner-down { width: 18px; padding: 0; margin: 0; z-index: 100; position: absolute; right: 0; cursor: pointer; border: none; } .ui-spinner-up { background: url(../images/forms/spinnerTop.png) no-repeat; height: 13px; top: 0; } .ui-spinner-down { height: 13px; bottom: 0px; background: url(../images/forms/spinnerBottom.png) no-repeat; } .ui-spinner-pressed { } .ui-spinner-list, .ui-spinner-listitem { margin: 0; padding: 0; font-size: 11px; } .ui-spinner ul li, .ui-spinner-data { line-height: 25px; height: 25px; } /* ===== Form validation ===== */ .inputContainer { position: relative; float: left; } .formError { position: absolute; top: 300px; left: 282px; display: block; z-index: 5000; cursor: pointer; } .ajaxSubmit { padding: 20px; background: #55ea55; border: 1px solid #999; display: none; } .formError .formErrorContent { background: #202020; position:relative; z-index:5001; color: #fff; width: 122px; font-size: 11px; border: 1px solid #000; padding: 2px 10px; border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; } .greenPopup .formErrorContent { background: #33be40; } .blackPopup .formErrorContent { background: #393939; color: #FFF; } .formError .formErrorArrow { width: 15px; margin: -2px 0 0 13px; position:relative; z-index: 5006; } .formError .formErrorArrowBottom { box-shadow: none; margin: 0px 0 0 12px; top:2px; } .formError .formErrorArrow div { font-size: 0px; height: 1px; background: #202020; margin: 0 auto; line-height: 0; font-size: 0; display: block; } .formError .formErrorArrowBottom div { box-shadow: none; -moz-box-shadow: none; -webkit-box-shadow: none; } .greenPopup .formErrorArrow div { background: #33be40; } .blackPopup .formErrorArrow div { background: #393939; color: #FFF; } .formError .formErrorArrow .line10 { width: 15px; border: none; } .formError .formErrorArrow .line9 { width: 13px; border: none; } .formError .formErrorArrow .line8 { width: 11px; } .formError .formErrorArrow .line7 { width: 9px; } .formError .formErrorArrow .line6 { width: 7px; } .formError .formErrorArrow .line5 { width: 5px; } .formError .formErrorArrow .line4 { width: 3px; } .formError .formErrorArrow .line3 { width: 1px; border-left: 2px solid #ddd; border-right: 2px solid #ddd; border-bottom: 0 solid #ddd; } .formError .formErrorArrow .line2 { width: 3px; border: none; background: #ddd; } .formError .formErrorArrow .line1 { width: 1px; border: none; background: #ddd; } .checker input, .radio input, .selector select { cursor: pointer; } /* ===== Select ===== */ div.selector { position: relative; height: 28px; background: url(../images/forms/select_left.png) no-repeat top left; float: left; width: 190px; position: relative; padding-left: 10px; } div.selector select { width: 200px; font-size: 12px; position: absolute; height: 28px; top: 0; left: 0; } div.selector span { width: 190px; cursor: pointer; position: absolute; right: 0; height: 28px; background: url(../images/forms/select_right.png) no-repeat center right; top: 0; line-height: 28px; font-size: 11px; } .dataTables_length div.selector { width: 45px; float: left; height: 22px; background: url(../images/forms/select_left_datatable.png) no-repeat top left; padding-left: 8px; } .dataTables_length div.selector span { width: 45px; height: 22px; background: url(../images/forms/select_right_datatable.png) no-repeat center right; line-height: 22px; } .dataTables_length div.selector select { width: 65px; left: -5px; height: 22px; } .multiple { height: 200px; } /* ===== Checkboxes ===== */ div.checker { width: 15px; height: 15px; position: relative; float: left; } div.checker input { width: 15px; height: 15px; opacity: 0; filter: alpha(opacity:0); display: inline-block; background: none; } div.checker span { background: transparent url(../images/forms/checkbox.png) no-repeat 0 0px ; vertical-align: middle; height: 15px; width: 15px; display: -moz-inline-box; display: inline-block; text-align: center; } div.checker span.checked { background-position: center bottom; } /* ===== Radios ===== */ div.radio { width: 15px; height: 15px; position: relative; float: left; margin-top: 5px; } div.radio input { opacity: 0; filter: alpha(opacity:0); text-align: center; display: inline-block; background: none; width: 15px; height: 15px; } div.radio span { background: transparent url(../images/forms/radio.png) no-repeat 0 0; vertical-align: middle; height: 15px; width: 15px; display: block; display: -moz-inline-box; display: inline-block; text-align: center; } div.radio span.checked { background-position: center bottom; } /* ===== File uploader ===== */ div.uploader { width: 250px; position: relative; overflow: hidden; box-shadow: 0 0 0 2px #f4f4f4; -webkit-box-shadow: 0 0 0 2px #f4f4f4; -moz-box-shadow: 0 0 0 2px #f4f4f4; border: 1px solid #DDD; background: white; padding: 2px 2px 2px 8px; } div.uploader span.action { width: 22px; background: #fff url(../images/addFiles.png) no-repeat 0 0; height: 22px; font-size: 11px; font-weight: bold; cursor: pointer; float: right; text-indent: -9999px; display: inline; overflow: hidden; cursor: pointer; } div.uploader:hover span.action { background-position: 0 -27px; } div.uploader:active span.action { background-position: 0 -54px; } div.uploader span.filename { color: #777; max-width: 200px; font-size: 11px; line-height: 22px; float: left; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; } div.uploader input { width: 266px; opacity: 0; filter: alpha(opacity:0); position: absolute; top: 0; right: 0; bottom: 0; float: right; height: 26px; border: none; cursor: pointer; } .uploader { display: -moz-inline-box; display: inline-block; vertical-align: middle; zoom: 1; *display: inline; } /* ===== Wizard ===== */ label.error { color: #A73939; font-size: 11px; display: block; width: 100%; white-space: nowrap; float: none; margin: 8px 0 -8px 0; } .selector .error { margin-right: -220px; float: right; } .step h1 { float: right; font-weight: bold; font-size: 1em; padding-right: 14px; margin-top: -28px; } .navigation_button { width : 70px; } .data span { font-size: 11px; text-align: center; border-top: 1px solid #DDD; padding: 12px 0; display: block; } .wizButtons .wNavButtons { float: right; margin: 14px 18px; } .wizButtons .status span { float: left; color: #599414; padding: 18px 14px 18px 32px; background: url(../images/icons/updateDone.png) no-repeat 14px; font-size: 11px; } /* ===== Dual select boxes ===== */ .leftPart { float: left; width: 38%; max-width: 45%; } .rightPart { float: right; width: 38%; max-width: 45%; } .dualControl { text-align: center; width: 200px; margin: 150px 1px; position: absolute; left: 50%; margin-left: -100px; } .boxFilter { max-width: 80%; margin: 0 0 0 0; float: right; } .filter { margin: 10px 0 22px 0; position: relative; width: 100%; } .filter > span { float: left; display: block; margin-top: 4px; } .fBtn { position: absolute; right: 10px; top: 9px; background: none!important; color: #aaa; border: none!important; padding: 0!important; } .countLabel { margin-top: 10px; display: block; } /* ===== WYSUWYG editor ===== */ .cleditorMain { background-color:white} .cleditorMain iframe {border:none; margin:0; padding:0} .cleditorMain textarea { border:none!important; margin:0; padding:0!important; font:10pt Arial,Verdana; resize:none; outline:none; height: 127px; box-shadow: none!important; /* webkit grip focus */} .cleditorToolbar {background: url('../images/wysiwyg/toolbar.gif') repeat} .cleditorGroup {float:left; height:26px} .cleditorButton {float:left; width:24px; height:24px; margin:1px 0 1px 0; background: url('../images/wysiwyg/buttons.gif')} .cleditorDisabled {opacity:0.3; filter:alpha(opacity=30)} .cleditorDivider {float:left; width:1px; height:23px; margin:1px 0 1px 0; background:#CCC} .cleditorPopup {border:solid 1px #999; background-color:white; position:absolute; font:10pt Arial,Verdana; cursor:default; z-index:10000} .cleditorList div {padding:2px 4px 2px 4px} .cleditorColor {width:150px; padding:1px 0 0 1px} .cleditorColor div {float:left; width:14px; height:14px; margin:0 1px 1px 0} .cleditorPrompt {background-color:#F6F7F9; padding: 10px; font-size:8.5pt} .cleditorPrompt input[type=text], .cleditorPrompt textarea {font:8.5pt Arial,Verdana; width: auto; margin: 5px 0;} .cleditorMsg {background-color:#FDFCEE; width:150px; padding:4px; font-size:8.5pt} /* ===== Multiple file uploader ===== */ .plupload_button { font-size: 11px; font-weight: bold; color: #fff; line-height: 13px; margin-top: 6px; } .plupload_start, .plupload_add { background: url(../images/ui/usualButtons.png) repeat-x; } .plupload_start { float: left; background-position: 0 -255px; border: 1px solid #576270; } .plupload_start:hover { background-position: 0 -283px; } .plupload_start:active { background-position: 0 -311px; } .plupload_start span { background: url(../images/icons/upload.png) no-repeat 10px 8px; padding: 5px 15px 6px 28px; display: block; } .plupload_disabled, a.plupload_disabled:hover { color: #a6a6a6; border: 1px solid #e9e9e9; background: none; cursor: default; } .plupload_disabled span { padding: 5px 13px 6px 13px; } .plupload_add { margin-right: 10px; background-position: 0 0; border: 1px solid #c7c7c7; float: left; color: #595959; } .plupload_add:hover { background-position: 0 -28px; } .plupload_add:active { background-position: 0 -56px; } .plupload_add span { background: url(../images/icons/add.png) no-repeat 10px; padding: 5px 13px 6px 26px; display: block; } .plupload_wrapper { font-size: 11px;; width: 100%; } .plupload_container { } .plupload_container input { border: 1px solid #DDD; font-size: 11px; width: 98%; } .plupload_filelist { margin: 0; padding: 0; list-style: none; } .plupload_scroll .plupload_filelist { height: 185px; background: #fff; overflow-y: scroll; } .plupload_filelist li { padding: 10px 12px 14px 10px; background: #FCFCFC url(../images/contentDivider.png) repeat-x 0 100%; } .plupload_filelist li:hover { background-color: #f9f9f9; } .plupload_filelist_header, .plupload_filelist_footer { background: #EFEFEF url(../images/backgrounds/titleBg.png) repeat-x; padding: 3px 12px; color: #878787; } .plupload_filelist_header { border-bottom: 1px solid #d5d5d5; height: 20px; } .plupload_filelist_footer { border-top: 1px solid #D5D5D5; line-height: 38px; vertical-align: middle; } .plupload_file_name { float: left; overflow: hidden; } .plupload_filelist .plupload_file_name { background: url(../images/arrow.gif) no-repeat 2px; padding-left: 14px; } .plupload_file_status { color: #777; } .plupload_file_status span {} .plupload_file_size, .plupload_file_status, .plupload_progress { float: right; width: 80px; } .plupload_file_size, .plupload_file_status, .plupload_file_action { text-align: right; } .plupload_filelist .plupload_file_name { width: 205px; } .plupload_file_action { float: right; width: 14px; margin-top: 3px; height: 14px; margin-left: 15px; } .plupload_file_action * { display: none; width: 14px; height: 14px; } li.plupload_uploading { } li.plupload_done { color: #AAA; } li.plupload_delete a { background: url(../images/icons/uploader/deleteFile.png) no-repeat 0; } li.plupload_failed a { background: url(../images/icons/uploader/error.png) no-repeat 0; cursor: default; } li.plupload_done a { background: url(../images/icons/uploader/uploaded.png) no-repeat 0; cursor: default; } .plupload_progress, .plupload_upload_status { display: none; } .plupload_progress_container { margin-top: 10px; border: 1px solid #CCC; background: #FFF; padding: 1px; } .plupload_progress_bar { width: 0px; height: 7px; background: #CDEB8B; } .plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action { margin-right: 17px; } /* Floats */ .plupload_clear,.plupload_clearer { clear: both; } .plupload_clearer, .plupload_progress_bar { display: block; font-size: 0; line-height: 0; } li.plupload_droptext { background: transparent; text-align: center; vertical-align: middle; border: 0; line-height: 160px; } li.plupload_droptext:hover { background: #fff; } /* Footer ================================================== */ #footer { clear: both; position: absolute; bottom: 0; left: 0; width: 100%; } #footer .wrapper { text-align: center; padding: 20px 0 20px 222px; margin: 0; } /* Plugin styles ================================================== */ /* ===== Tipsy ===== */ .tipsy { padding: 4px; font-size: 11px; position: absolute; z-index: 100000; } .tipsy-inner { padding: 2px 8px 2px 8px; background-color: black; color: white; max-width: 200px; text-align: center; } .tipsy-inner { border-radius: 3px; -moz-border-radius:3px; -webkit-border-radius:3px; } .tipsy-arrow { position: absolute; background: url('../images/tipsy.gif') no-repeat top left; width: 9px; height: 5px; } .tipsy-n .tipsy-arrow { top: 0; left: 50%; margin-left: -4px; } .tipsy-nw .tipsy-arrow { top: 0; left: 10px; } .tipsy-ne .tipsy-arrow { top: 0; right: 10px; } .tipsy-s { margin-top: -5px; } .tipsy-w { margin-left: 5px; } .tipsy-e { margin-right: -5px; } .tipsy-n { margin-top: 5px; } .tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -4px; background-position: bottom left; } .tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; background-position: bottom left; } .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; background-position: bottom left; } .tipsy-e .tipsy-arrow { top: 50%; margin-top: -4px; right: 0; width: 5px; height: 9px; background-position: top right; } .tipsy-w .tipsy-arrow { top: 50%; margin-top: -4px; left: 0; width: 5px; height: 9px; } /* ===== Color picker ===== */ .cPicker span { margin-left: 36px; font-size: 11px; white-space: nowrap; padding-top: 2px; display: block; } #cPicker { position: relative; } #cPicker div { position: absolute; top: 0px; left: 0px; width: 24px; height: 24px; background: url(../images/colorPicker/select.png) center no-repeat; cursor: pointer; } .colorpicker { width: 356px; height: 176px; overflow: hidden; position: absolute; background: url(../images/colorPicker/colorpicker_background.png); font-family: Arial, Helvetica, sans-serif; display: none; } .colorpicker_color { width: 150px; height: 150px; left: 14px; top: 13px; position: absolute; background: #f00; overflow: hidden; cursor: crosshair; } .colorpicker_color div { position: absolute; top: 0; left: 0; width: 150px; height: 150px; background: url(../images/colorPicker/colorpicker_overlay.png); } .colorpicker_color div div { position: absolute; top: 0; left: 0; width: 11px; height: 11px; overflow: hidden; background: url(../images/colorPicker/colorpicker_select.gif); margin: -5px 0 0 -5px; } .colorpicker_hue { position: absolute; top: 13px; left: 171px; width: 35px; height: 150px; cursor: n-resize; } .colorpicker_hue div { position: absolute; width: 35px; height: 9px; overflow: hidden; background: url(../images/colorPicker/colorpicker_indic.gif) left top; margin: -4px 0 0 0; left: 0px; } .colorpicker_new_color { position: absolute; width: 60px; height: 30px; left: 213px; top: 13px; background: #f00; } .colorpicker_current_color { position: absolute; width: 60px; height: 30px; left: 283px; top: 13px; background: #f00; } .colorpicker input { background: none!important; border: none!important; position: absolute; font-size: 10px!important; font-family: Arial, Helvetica, sans-serif; color: #898989!important; top: 5px; right: 11px; text-align: right; margin: 0; padding: 0!important; height: 11px; box-shadow: none!important; } .colorpicker_hex { position: absolute; width: 72px; height: 22px; background: url(../images/colorPicker/colorpicker_hex.png) top; left: 212px; top: 142px; } .colorpicker_hex input { right: 6px; } .colorpicker_field { height: 22px; width: 62px; background-position: top; position: absolute; } .colorpicker_field span { position: absolute; width: 12px; height: 22px; overflow: hidden; top: 0; right: 0; cursor: n-resize; } .colorpicker_rgb_r { background-image: url(../images/colorPicker/colorpicker_rgb_r.png); top: 52px; left: 212px; } .colorpicker_rgb_g { background-image: url(../images/colorPicker/colorpicker_rgb_g.png); top: 82px; left: 212px; } .colorpicker_rgb_b { background-image: url(../images/colorPicker/colorpicker_rgb_b.png); top: 112px; left: 212px; } .colorpicker_hsb_h { background-image: url(../images/colorPicker/colorpicker_hsb_h.png); top: 52px; left: 282px; } .colorpicker_hsb_s { background-image: url(../images/colorPicker/colorpicker_hsb_s.png); top: 82px; left: 282px; } .colorpicker_hsb_b { background-image: url(../images/colorPicker/colorpicker_hsb_b.png); top: 112px; left: 282px; } .colorpicker_submit { position: absolute; width: 22px; height: 22px; background: url(../images/colorPicker/colorpicker_submit.png) top; left: 322px; top: 142px; overflow: hidden; } .colorpicker_focus { background-position: center; } .colorpicker_hex.colorpicker_focus { background-position: bottom; } .colorpicker_submit.colorpicker_focus { background-position: bottom; } .colorpicker_slider { background-position: bottom; } /* ===== Growl notifications ===== */ div.jGrowl { z-index: 9999; color: #fff; font-size: 12px; } div.ie6.top-right { right: auto; bottom: auto; left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); } div.ie6.top-left { left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); } div.ie6.bottom-right { left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); } div.ie6.bottom-left { left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); } div.ie6.center { left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); width: 100%; } /** Normal Style Positions **/ div.jGrowl { position: absolute; } body > div.jGrowl { position: fixed; } div.jGrowl.top-left { left: 0px; top: 0px; } div.jGrowl.top-right { right: 0px; top: 36px; } div.jGrowl.bottom-left { left: 0px; bottom: 0px; } div.jGrowl.bottom-right { right: 0px; bottom: 0px; } div.jGrowl.center { top: 0px; width: 50%; left: 25%; } /** Cross Browser Styling **/ div.center div.jGrowl-notification, div.center div.jGrowl-closer { margin-left: auto; margin-right: auto; } div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer { background-color: black; opacity: .85; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85); zoom: 1; width: 235px; padding: 10px; margin-top: 5px; margin-bottom: 5px; font-family: Tahoma,Arial,Helvetica,sans-serif; font-size: 1em; text-align: left; display: none; } div.jGrowl div.jGrowl-notification { min-height: 40px; } div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer { margin: 10px; } div.jGrowl div.jGrowl-notification div.jGrowl-header { font-weight: bold; font-size: .85em; } div.jGrowl div.jGrowl-notification div.jGrowl-close { z-index: 99; float: right; font-weight: bold; font-size: 1em; cursor: pointer; } div.jGrowl div.jGrowl-closer { padding-top: 4px; padding-bottom: 4px; cursor: pointer; font-size: .9em; font-weight: bold; text-align: center; } /** Hide jGrowl when printing **/ @media print { div.jGrowl { display: none; } } /* ===== Breadcrumbs ===== */ .bc { margin: 32px 0; background: #efefef url(../images/backgrounds/titleBg.png) repeat-x; border: 1px solid #cdcdcd ; } ul.breadcrumbs { position: relative; z-index: 1000; clear: both; } ul.breadcrumbs li { float: left; } ul.breadcrumbs li.current { border-right: none; } ul.breadcrumbs li a { font-size: 11px; color: #666666; text-decoration: none; padding: 8px 20px 8px 14px; display: block; background: url(../images/backgrounds/breadcrumbArrow.png) no-repeat 100% 13px; } ul.breadcrumbs li a:hover, ul.breadcrumbs li.hover a { color: #2B6893; } ul.breadcrumbs > li:first-child { background: url(../images/icons/iconHome.gif) no-repeat 12px 12px; } ul.breadcrumbs > li:first-child a { padding-left: 32px; } ul.breadcrumbs li.current a { color: #333333; font-weight: bold; background: none; } ul.breadcrumbs li ul { position: absolute; background: url(../images/subArrow.png) no-repeat 10px 5px; font-size: 11px; width: 180px; top: 35px; display: none; padding-top: 10px; margin-left: -1px; } ul.breadcrumbs li ul li { float: none; width: 180px; border-bottom: 1px solid #1c252b; border-top: 1px solid #404950; border-left: none; border-right: none; background: url(../images/backgrounds/navBg.jpg); padding: 0; } ul.breadcrumbs li ul li:first-child { -webkit-border-top-right-radius: 2px; -webkit-border-top-left-radius: 2px; -moz-border-radius-topright: 2px; -moz-border-radius-topleft: 2px; } ul.breadcrumbs li ul li:last-child { -webkit-border-bottom-right-radius: 2px; -webkit-border-bottom-left-radius: 2px; -moz-border-radius-bottomright: 2px; -moz-border-radius-bottomleft: 2px; } ul.breadcrumbs li ul li:hover { border-top: 1px solid #374047; } ul.breadcrumbs li ul li a { text-decoration: none; padding: 5px 0; color: #CCCCCC !important; display: block; padding: 8px 12px 8px 32px; background: url(../images/subIcon.png) no-repeat 12px 15px; } ul.breadcrumbs li ul li a:hover { background: #293138 url(../images/subIcon.png) no-repeat 12px 15px; } /* ===== PRE tag styles ===== */ .SRC_Wrap { height:auto; font-size:12px; } .SRC_Title { text-align:center; color:#555; border-bottom:2px solid #999; font-size:14px; font-family:Verdana, Geneva, sans-serif; padding:5px; font-weight:700; } .SRC_Line { width:100%; background-color:#fafafa; min-height:28px; line-height: 28px; } .SRC_Line:nth-child(even) { background-color:#f5f5f5; } .SRC_NumBox { width: 5%; float:left; } .SRC_Num { font-family: Verdana, Geneva, sans-serif; font-size: 12px; text-align:right; color:#555; font-weight:500; padding-right:2px; width:100%; height:auto; min-height:28px; line-height:28px; } .SRC_CodeContent { white-space: pre-wrap; border-left: 1px solid #EFEFEF; font-size: 12px; padding-left: 12px; font-family: "Courier New", Courier, monospace; margin: 0px; min-height: 28px; line-height: 28px; } .SRC_NumContent { text-align:right; margin-right:4px; color:#555; } .SRC_CodeBox { float:left; width:95%; } .SC_blue { color: blue; } .SC_grey { color: grey; } .SC_navy { color: navy; } .SC_green { color: green; } .SC_orange { color: #930; } .SC_red { color: #F00; } .SC_teal { color: teal; } .SC_gold { color: #FC0; } .SC_pink { color: #ff68a4; } .SC_bold { font-weight: 700; } /* ===== Chosen multiple plugin with dropdown ===== */ .chzn-container { position: relative; display: inline-block; zoom: 1; *display: inline; width: 50%!important; } .chzn-container .chzn-drop { background: #fff; border: 1px solid #d5d5d5; border-top: 0; position: absolute; top: 29px; left: 0; z-index: 998; width: 99.8%!important; } .chzn-container-single .chzn-single { background-color: #ffffff; border: 1px solid #aaaaaa; display: block; overflow: hidden; white-space: nowrap; position: relative; height: 23px; line-height: 24px; padding: 0 0 0 8px; color: #444444; text-decoration: none; } .chzn-container-single .chzn-single span { margin-right: 26px; display: block; overflow: hidden; white-space: nowrap; -o-text-overflow: ellipsis; -ms-text-overflow: ellipsis; text-overflow: ellipsis; } .chzn-container-single .chzn-single abbr { display: block; position: absolute; right: 26px; top: 6px; width: 12px; height: 13px; font-size: 1px; background: url(chosen-sprite.html) right top no-repeat; } .chzn-container-single .chzn-single abbr:hover { background-position: right -11px; } .chzn-container-single .chzn-single div { position: absolute; right: 0; top: 0; display: block; height: 100%; width: 18px; } .chzn-container-single .chzn-single div b { background: url('chosen-sprite.html') no-repeat 0 0; display: block; width: 100%; height: 100%; } .chzn-container-single .chzn-search { padding: 3px 4px; position: relative; margin: 0; white-space: nowrap; z-index: 1010; } .chzn-container-single .chzn-search input { margin: 1px 0; padding: 4px 20px 4px 5px; outline: 0; border: 1px solid #aaa; font-family: sans-serif; font-size: 1em; } .chzn-container-single .chzn-drop {} .chzn-container-single-nosearch .chzn-search input { position: absolute; left: -9000px; } .chzn-container-multi .chzn-choices { border: 1px solid #ddd; margin: 0; cursor: text; overflow: hidden; height: auto !important; height: 1%; position: relative; font-size: 12px; padding: 4px; background: white; box-shadow: 0 0 0 2px #f4f4f4; -webkit-box-shadow: 0 0 0 2px #f4f4f4; -moz-box-shadow: 0 0 0 2px #f4f4f4; color: #656565; } .chzn-container-multi .chzn-choices li { float: left; list-style: none; } .chzn-container-multi .chzn-choices .search-field { white-space: nowrap; margin: 0; padding: 0; } .chzn-container-multi .chzn-choices .search-field input { color: #666; background: transparent !important; border: 0 !important; font-family: sans-serif; font-size: 12px!important; padding: 11px 4px 10px 4px!important; margin: 0; outline: 0; box-shadow: none!important; } .chzn-container-multi .chzn-choices .search-field .default { color: #999; } .chzn-container-multi .chzn-choices .search-choice { position: relative; line-height: 16px; font-size: 11px; border: 1px solid #A5D24A; display: block; float: left; padding: 5px 24px 5px 8px; background: #CDE69C; color: #638421; margin: 4px; } .chzn-container-multi .chzn-choices .search-choice-focus { background: #d4d4d4; } .chzn-container-multi .chzn-choices .search-choice .search-choice-close { display: block; position: absolute; right: 6px; top: 8px; width: 10px; height: 10px; font-size: 1px; background: url(../images/icons/closeSelection.png) 50% no-repeat; } .chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close { background-position: right -11px; } .chzn-container .chzn-results { margin: 0 4px 4px 0; max-height: 240px; padding: 0 0 0 4px; position: relative; overflow-x: hidden; overflow-y: auto; } .chzn-container-multi .chzn-results { padding: 0; margin: 0; } .chzn-container .chzn-results li { display: none; line-height: 14px; padding: 5px 6px; margin: 0; list-style: none; font-size: 11px; } .chzn-container .chzn-results .active-result { cursor: pointer; display: list-item; } .chzn-container .chzn-results .highlighted { background-color: #3875d7; color: #fff; } .chzn-container .chzn-results li em { background: #feffde; font-style: normal; } .chzn-container .chzn-results .highlighted em { background: transparent; } .chzn-container .chzn-results .no-results { background: #f4f4f4; display: list-item; } .chzn-container .chzn-results .group-result { cursor: default; color: #2e74a6; font-weight: bold; font-size: 10px; border-bottom: 1px solid #DDD; border-top: 1px solid #DDD; } .chzn-container .chzn-results .group-option { padding-left: 15px; } .chzn-container-multi .chzn-drop .result-selected { display: none; } .chzn-container .chzn-results-scroll { background: white; margin: 0 4px; position: absolute; text-align: center; width: 321px; /* This should be dynamic with js */ z-index: 1; } .chzn-container .chzn-results-scroll span { display: inline-block; height: 17px; text-indent: -5000px; width: 9px; } .chzn-container .chzn-results-scroll-down { bottom: 0; } .chzn-container .chzn-results-scroll-down span { background: url('chosen-sprite.html') no-repeat -4px -3px; } .chzn-container .chzn-results-scroll-up span { background: url('chosen-sprite.html') no-repeat -22px -3px; } .chzn-container-active .chzn-single { border: 1px solid #5897fb; } .chzn-container-active .chzn-single-with-drop { border: 1px solid #aaa; background-color: #eee; } .chzn-container-active .chzn-single-with-drop div { background: transparent; border-left: none; } .chzn-container-active .chzn-single-with-drop div b { background-position: -18px 1px; } .chzn-container-active .chzn-choices { border: 1px solid #d5d5d5; } .chzn-container-active .chzn-choices .search-field input { color: #111 !important; } .chzn-disabled { cursor: default; opacity:0.5 !important; } .chzn-disabled .chzn-single { cursor: default; } .chzn-disabled .chzn-choices .search-choice .search-choice-close { cursor: default; } /* Media queries ================================================== */ /* Increasing space between widgets and general wrapper paddings */ @media only screen and (min-width: 980px) and (max-width: 1280px) { .oneTwo { width: 48%; } .wrapper { margin: 0 4%; } .oneThree { width: 31%; margin-left: 3.5%; } .twoOne { width: 65.5%; } .oneFour { width: 22%; margin-left: 4%; } .formRow .formRight { width: 72%; } .chzn-container { width: 80%!important; } .SRC_NumBox { width: 10%; } .SRC_CodeBox { width: 90%; } } /* Fixing login panel for mobile devices */ @media only screen and (max-width: 480px) { .loginWrapper { margin: -119px 0 0 -141px; } .loginWrapper .widget { width: 282px; } .loginWrapper .formRow > label { float: left; padding: 4px 0; } .loginInput { width: 160px; margin-right: 4px; } } /* Devices and browsers with min of 800px and max of 979px */ @media only screen and (min-width: 768px) and (max-width: 1024px) { .wrapper { margin: 0 5%; } .pageTitle { max-width: 45%; } .oneTwo, .oneTwo:first-child, .oneThree, .oneThree:first-child, .oneFour, oneFour:first-child, .twoOne, .twoOne:first-child { width: auto; float: none; margin: 0; clear: both; width: 100%; } table thead td span { background-position: 100%; } .formRow { padding: 14px 14px 18px 14px; } .formRow .formRight { width: 100%; float: none; margin-right: 14px; } .form input[type="text"], .form input[type="password"], .form textarea { width: 97%; } .formRow .inputImg { top: auto; bottom: 26px; } .formRow > label { float: none; padding: 0 0 12px 0; } .req { float: none; margin-left: 0; display: inline; } .chzn-container { width: 100%!important; } .topNav { display: inline-block; text-align: center; } .userNav { margin-right: 214px!important; } .welcome { display: none; } .dataTables_filter input[type="text"] { width: 110px!important; } .controlB ul li { margin: 4px 1%; width: 30%; } .sItem { width: 186px; } .horControlB ul li { margin: 2px; width: 46%; } table thead td span { display: none; } .sTable thead td.sortCol { text-align: center; padding: 3px 14px 2px 14px; } } /* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ @media only screen and (max-width: 1024px) { html { -webkit-text-size-adjust: 100%; } .statsDetailed { top: 60px; } .withCheck thead tr td:first-child { width: 37px; } .oneTwo, .oneTwo:first-child, .oneThree, .oneThree:first-child, .oneFour, oneFour:first-child, .twoOne, .twoOne:first-child { width: auto; float: none; margin: 0; clear: both; } .loginWrapper .formRow > label { float: left; padding: 4px 0; } .loginInput { margin-right: 4px; } .dnone { display: none; } .loginPage { min-height: 500px; } } /* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ @media only screen and (min-width: 768px) { .errorPage .welcome { display: block; } .errorPage .userNav { margin-right: 0!important; float: right; } } /* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ @media only screen and (max-width: 599px) { #rightSide { padding-bottom: 74px; } .userNav ul li span { display: none; } .topNav { background: url(../images/backgrounds/topnavBg.png) repeat; margin: 0; padding: 0; } .userNav { float: none; margin-right: 0; border: none; } .userNav > ul { border: none; } .userNav > ul li { float: none; display: inline-block; margin: 3px 0 3px -4px } .userNav > ul li a { float: none; padding: 9px 14px 8px 14px; margin: 0; } .userNav > ul li img { margin: 0; float: none; padding: 0; display: inline; } ul.userDropdown { left: -53px; } ul.userDropdown li { margin: 0; text-align: left; } ul.userDropdown li a { padding: 6px 10px 7px 32px; } .itemActions { margin: 16px auto 8px auto; float: none; clear: both; display: block; width: 210px; } .tPagination { padding: 16px 12px; float: none; clear: both; } .invButtons .bFirst, .invButtons .bLast { float: none; } .invButtons .bLast { margin-top: 10px; } .plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action { margin-right: 0; margin-left: 0; width: 0; } .plupload_file_size, .plupload_file_status, .plupload_progress { width: auto; } .plupload_file_size { margin: 0 10px; } .plupload_filelist .plupload_file_name { width: 48%; } .dataTables_filter input[type="text"] { width: 169px!important; } .dataTables_paginate { text-align: center; margin: 8px 6px 40px 6px; } .ui-buttonset .ui-button { margin: 0 2px; } .dataTables_paginate .ui-button { margin-right: 0; } .dataTables_filter { margin: 4px 12px 2px 12px; left: 50%; margin-left: -123px; } .dataTables_paginate .last { border-bottom: 1px solid #d5d5d5!important } table.display thead th div.DataTables_sort_wrapper { line-height: 16px; text-align: center; padding-right: 10px; } table.display thead th div.DataTables_sort_wrapper span, .dataTables_length .itemsPerPage, table thead td span { display: none; } .form input[type="text"], .form input[type="password"], .form textarea { width: 94%; } .formRow { padding: 14px 14px 18px 14px; } div.tagsinput { padding: 0; width: 99%!important; } .filter > input[type=text] { width: 75%; } .leftPart, .rightPart { float: none; width: 100%; max-width: 100%; } .leftPart { margin-bottom: 20px; } .rightPart { margin-top: 30px; } .countLabel { text-align: center; } .dualControl { width: auto; margin: 0; position: static; left: 0; margin-left: 0; } .SRC_CodeBox { width: 90%; } .SRC_NumBox { width: 10%; } .el-finder-nav { width: 40%; } } /* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ @media only screen and (min-width: 600px) and (max-width: 1024px) { .userNav { float: none; margin-right: 0; border: none; } .userNav > ul { border: none; margin: 0; } .userNav > ul li { display: inline-block; float: none; margin-left: -4px; } ul.userDropdown { left: -10px; } ul.userDropdown li { margin: 0; text-align: left; } ul.userDropdown li a { padding: 6px 10px 7px 32px; } .filter > input[type=text] { width: 70%; } .dualControl button { padding: 7px 12px 8px 12px } div.tagsinput { width: 97%!important; } } /* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ @media only screen and (min-width: 600px) and (max-width: 767px) { .form input[type="text"], .form input[type="password"], .form textarea { width: 97%; } .formRow { padding: 14px 16px 18px 16px; } .changes .negative, .changes .positive, .changes .zero { padding-left: 56%!important; background-position: 72% 6px!important; } table thead td span { display: block; right: -13px; } .sTable thead td.sortCol { text-align: left; padding: 3px 14px 2px 14px; } .dataTables_filter input[type="text"] { width: 150px!important; } } /* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ @media only screen and (max-width: 767px) { .resp { display: block; } .respHead { text-align: center; } .respHead > a { margin: 20px 0; display: block; } .topNav { position: static; } #leftSide, .welcome { display: none; } .dn { display: block; } body { background: none; } .wrapper { margin: 0 6%; } .topNav { display: inline-block; text-align: center; } .titleArea { text-align: center; padding-top: 24px; } .pageTitle > h5 { font-size: 18px; margin-bottom: 4px; } .pageTitle { float: none; padding: 0 0 22px 0; } .formRow .formRight { width: 100%; float: none; margin-right: 14px; } .formRow .inputImg { top: auto; bottom: 26px; } .formRow > label { float: none; padding: 0 0 12px 0; } .req { float: none; margin-left: 0; display: inline; } .step h1 { display: none; } .middleNav { float: none; margin: 0 auto 29px auto; width: 282px; } .middleNav > ul li { display: inline; width: 69px; float: left; } .middleNav > ul li:first-child { width: 70px; } .middleNav ul li a { width: 100%; } .middleNav ul li a span.files { background-position: 21px; } .middleNav ul li a span.users { background-position: 14px; } .middleNav ul li a span.messages { background-position: 18px; } .middleNav ul li a span.orders { background-position: 21px; } .numberMiddle { right: -3px; } .middleNav ul li ul { left: 0; width: 140px; text-align: left; background-position: 28px 0; } .middleNav ul li ul li { width: 100%; } .middleNav ul li.mOrders ul, .middleNav ul li.mFiles ul { right: -3px; left: auto; background-position: 95px 0; } .middleNav ul li ul li:first-child { width: 100%; } .controlB ul li { display: block; float: left; width: 49%; margin: 1px 1px 0 0; } .horControlB ul li { margin: 1px 0 0 0; width: 100%; text-align: left; } .sItem { margin: 1px 0 0 0; width: 100%; } .sItem > h2 { width: 50%; border-right: 1px solid #D5D5D5; } .changes { padding: 14px 0 5px 0; float: none; } .changes .negative, .changes .positive, .changes .zero { padding-left: 58%; background-position: 68% 6px; background-repeat: no-repeat; } .changes .negative { background-image: url(../images/negArrow.png); } .changes .positive { background-image: url(../images/posArrow.png); } .changes .zero { background-image: url(../images/zero.png); } .statsDetailed { margin-left: -111px; } #footer .wrapper { padding: 0 12px 12px 12px!important; } .leftPart .selector, .rightPart .selector { display: none; } .chzn-container { width: 100%!important; } div.uploader { width: 220px; } .formRow .checker, .formRow .radio { clear: both; } .errorWrapper .errorNum { font-size: 180px; padding: 100px 0 65px 0; } .errorWrapper .offline { font-size: 115px; padding: 80px 0 45px 0; } .sTable, .dTable { table-layout: fixed; } .sTable tbody td, .dTable tbody td { overflow: hidden; padding: 8px; } .sTable thead td { overflow: hidden; } .goTo { display: block; width: auto; height: auto; font-weight: bold; font-size: 10px; text-transform: uppercase; color: #fafafa; padding: 10px 0; cursor: pointer; margin: 0 6% } .goTo:hover, .goTo:active { } .goTo > img { margin: 3px 16px 0 0; float: left; } .pInfo { max-width: 70%; } .searchWidget input[type="text"] { width: 92%!important; } }
freezmeinster/vinlla-web
src/Vinlla/LandingBundle/Resources/public/admin/css/main.css
CSS
mit
95,477
"use strict"; const conversions = require("webidl-conversions"); const utils = require("./utils.js"); const HTMLElement = require("./HTMLElement.js"); const impl = utils.implSymbol; function HTMLButtonElement() { throw new TypeError("Illegal constructor"); } Object.setPrototypeOf(HTMLButtonElement.prototype, HTMLElement.interface.prototype); Object.setPrototypeOf(HTMLButtonElement, HTMLElement.interface); Object.defineProperty(HTMLButtonElement.prototype, "autofocus", { get() { return this.hasAttribute("autofocus"); }, set(V) { V = conversions["boolean"](V, { context: "Failed to set the 'autofocus' property on 'HTMLButtonElement': The provided value" }); if (V) { this.setAttribute("autofocus", ""); } else { this.removeAttribute("autofocus"); } }, enumerable: true, configurable: true }); Object.defineProperty(HTMLButtonElement.prototype, "disabled", { get() { return this.hasAttribute("disabled"); }, set(V) { V = conversions["boolean"](V, { context: "Failed to set the 'disabled' property on 'HTMLButtonElement': The provided value" }); if (V) { this.setAttribute("disabled", ""); } else { this.removeAttribute("disabled"); } }, enumerable: true, configurable: true }); Object.defineProperty(HTMLButtonElement.prototype, "form", { get() { return utils.tryWrapperForImpl(this[impl]["form"]); }, enumerable: true, configurable: true }); Object.defineProperty(HTMLButtonElement.prototype, "formNoValidate", { get() { return this.hasAttribute("formNoValidate"); }, set(V) { V = conversions["boolean"](V, { context: "Failed to set the 'formNoValidate' property on 'HTMLButtonElement': The provided value" }); if (V) { this.setAttribute("formNoValidate", ""); } else { this.removeAttribute("formNoValidate"); } }, enumerable: true, configurable: true }); Object.defineProperty(HTMLButtonElement.prototype, "formTarget", { get() { const value = this.getAttribute("formTarget"); return value === null ? "" : value; }, set(V) { V = conversions["DOMString"](V, { context: "Failed to set the 'formTarget' property on 'HTMLButtonElement': The provided value" }); this.setAttribute("formTarget", V); }, enumerable: true, configurable: true }); Object.defineProperty(HTMLButtonElement.prototype, "name", { get() { const value = this.getAttribute("name"); return value === null ? "" : value; }, set(V) { V = conversions["DOMString"](V, { context: "Failed to set the 'name' property on 'HTMLButtonElement': The provided value" }); this.setAttribute("name", V); }, enumerable: true, configurable: true }); Object.defineProperty(HTMLButtonElement.prototype, "type", { get() { return this[impl]["type"]; }, set(V) { V = conversions["DOMString"](V, { context: "Failed to set the 'type' property on 'HTMLButtonElement': The provided value" }); this[impl]["type"] = V; }, enumerable: true, configurable: true }); Object.defineProperty(HTMLButtonElement.prototype, "value", { get() { const value = this.getAttribute("value"); return value === null ? "" : value; }, set(V) { V = conversions["DOMString"](V, { context: "Failed to set the 'value' property on 'HTMLButtonElement': The provided value" }); this.setAttribute("value", V); }, enumerable: true, configurable: true }); Object.defineProperty(HTMLButtonElement.prototype, Symbol.toStringTag, { value: "HTMLButtonElement", writable: false, enumerable: false, configurable: true }); const iface = { mixedInto: [], is(obj) { if (obj) { if (obj[impl] instanceof Impl.implementation) { return true; } for (let i = 0; i < module.exports.mixedInto.length; ++i) { if (obj instanceof module.exports.mixedInto[i]) { return true; } } } return false; }, isImpl(obj) { if (obj) { if (obj instanceof Impl.implementation) { return true; } const wrapper = utils.wrapperForImpl(obj); for (let i = 0; i < module.exports.mixedInto.length; ++i) { if (wrapper instanceof module.exports.mixedInto[i]) { return true; } } } return false; }, convert(obj, { context = "The provided value" } = {}) { if (module.exports.is(obj)) { return utils.implForWrapper(obj); } throw new TypeError(`${context} is not of type 'HTMLButtonElement'.`); }, create(constructorArgs, privateData) { let obj = Object.create(HTMLButtonElement.prototype); this.setup(obj, constructorArgs, privateData); return obj; }, createImpl(constructorArgs, privateData) { let obj = Object.create(HTMLButtonElement.prototype); this.setup(obj, constructorArgs, privateData); return utils.implForWrapper(obj); }, _internalSetup(obj) { HTMLElement._internalSetup(obj); }, setup(obj, constructorArgs, privateData) { if (!privateData) privateData = {}; privateData.wrapper = obj; this._internalSetup(obj); Object.defineProperty(obj, impl, { value: new Impl.implementation(constructorArgs, privateData), writable: false, enumerable: false, configurable: true }); obj[impl][utils.wrapperSymbol] = obj; }, interface: HTMLButtonElement, expose: { Window: { HTMLButtonElement: HTMLButtonElement } } }; module.exports = iface; const Impl = require("../nodes/HTMLButtonElement-impl.js");
akaraatanasov/JS-Core
JS Advanced/WorkingUnitTests/node_modules/jsdom/lib/jsdom/living/generated/HTMLButtonElement.js
JavaScript
mit
5,586
<?php if (!function_exists('PrintHexBytes')) { function PrintHexBytes($string) { $returnstring = ''; for ($i = 0; $i < strlen($string); $i++) { $returnstring .= str_pad(dechex(ord(substr($string, $i, 1))), 2, '0', STR_PAD_LEFT).' '; } return $returnstring; } } if (!function_exists('PrintTextBytes')) { function PrintTextBytes($string) { $returnstring = ''; for ($i = 0; $i < strlen($string); $i++) { if (ord(substr($string, $i, 1)) <= 31) { $returnstring .= ' '; } else { $returnstring .= ' '.substr($string, $i, 1).' '; } } return $returnstring; } } if (!function_exists('FixDBFields')) { function FixDBFields($text) { return mysql_escape_string($text); } } if (!function_exists('FixTextFields')) { function FixTextFields($text) { $text = SafeStripSlashes($text); $text = htmlentities($text, ENT_QUOTES); return $text; } } if (!function_exists('SafeStripSlashes')) { function SafeStripSlashes($text) { if (get_magic_quotes_gpc()) { return stripslashes($text); } return $text; } } if (!function_exists('table_var_dump')) { function table_var_dump($variable) { $returnstring = ''; switch (gettype($variable)) { case 'array': $returnstring .= '<TABLE BORDER="1" CELLSPACING="0" CELLPADDING="2">'; foreach ($variable as $key => $value) { $returnstring .= '<TR><TD VALIGN="TOP"><B>'.str_replace(chr(0), ' ', $key).'</B></TD>'; $returnstring .= '<TD VALIGN="TOP">'.gettype($value); if (is_array($value)) { $returnstring .= '&nbsp;('.count($value).')'; } elseif (is_string($value)) { $returnstring .= '&nbsp;('.strlen($value).')'; } if (($key == 'data') && isset($variable['image_mime']) && isset($variable['dataoffset'])) { require_once(GETID3_INCLUDEPATH.'getid3.getimagesize.php'); $imageinfo = array(); $imagechunkcheck = GetDataImageSize($value, $imageinfo); $DumpedImageSRC = (!empty($_REQUEST['filename']) ? $_REQUEST['filename'] : '.getid3').'.'.$variable['dataoffset'].'.'.ImageTypesLookup($imagechunkcheck[2]); if ($tempimagefile = fopen($DumpedImageSRC, 'wb')) { fwrite($tempimagefile, $value); fclose($tempimagefile); } $returnstring .= '</TD><TD><IMG SRC="'.$DumpedImageSRC.'" WIDTH="'.$imagechunkcheck[0].'" HEIGHT="'.$imagechunkcheck[1].'"></TD></TR>'; } else { $returnstring .= '</TD><TD>'.table_var_dump($value).'</TD></TR>'; } } $returnstring .= '</TABLE>'; break; case 'boolean': $returnstring .= ($variable ? 'TRUE' : 'FALSE'); break; case 'integer': case 'double': case 'float': $returnstring .= $variable; break; case 'object': case 'null': $returnstring .= string_var_dump($variable); break; case 'string': $variable = str_replace(chr(0), ' ', $variable); $varlen = strlen($variable); for ($i = 0; $i < $varlen; $i++) { if (ereg('['.chr(0x0A).chr(0x0D).' -;0-9A-Za-z]', $variable{$i})) { $returnstring .= $variable{$i}; } else { $returnstring .= '&#'.str_pad(ord($variable{$i}), 3, '0', STR_PAD_LEFT).';'; } } $returnstring = nl2br($returnstring); break; default: require_once(GETID3_INCLUDEPATH.'getid3.getimagesize.php'); $imageinfo = array(); $imagechunkcheck = GetDataImageSize(substr($variable, 0, FREAD_BUFFER_SIZE), $imageinfo); if (($imagechunkcheck[2] >= 1) && ($imagechunkcheck[2] <= 3)) { $returnstring .= '<TABLE BORDER="1" CELLSPACING="0" CELLPADDING="2">'; $returnstring .= '<TR><TD><B>type</B></TD><TD>'.ImageTypesLookup($imagechunkcheck[2]).'</TD></TR>'; $returnstring .= '<TR><TD><B>width</B></TD><TD>'.number_format($imagechunkcheck[0]).' px</TD></TR>'; $returnstring .= '<TR><TD><B>height</B></TD><TD>'.number_format($imagechunkcheck[1]).' px</TD></TR>'; $returnstring .= '<TR><TD><B>size</B></TD><TD>'.number_format(strlen($variable)).' bytes</TD></TR></TABLE>'; } else { $returnstring .= nl2br(htmlspecialchars(str_replace(chr(0), ' ', $variable))); } break; } return $returnstring; } } if (!function_exists('string_var_dump')) { function string_var_dump($variable) { ob_start(); var_dump($variable); $dumpedvariable = ob_get_contents(); ob_end_clean(); return $dumpedvariable; } } if (!function_exists('fileextension')) { function fileextension($filename, $numextensions=1) { if (strstr($filename, '.')) { $reversedfilename = strrev($filename); $offset = 0; for ($i = 0; $i < $numextensions; $i++) { $offset = strpos($reversedfilename, '.', $offset + 1); if ($offset === false) { return ''; } } return strrev(substr($reversedfilename, 0, $offset)); } return ''; } } if (!function_exists('RemoveAccents')) { function RemoveAccents($string) { // return strtr($string, 'ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ', 'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy'); // Revised version by marksteward@hotmail.com return strtr(strtr($string, 'ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝàáâãäåçèéêëìíîïñòóôõöøùúûüýÿ', 'SZszYAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy'), array('Þ' => 'TH', 'þ' => 'th', 'Ð' => 'DH', 'ð' => 'dh', 'ß' => 'ss', 'Œ' => 'OE', 'œ' => 'oe', 'Æ' => 'AE', 'æ' => 'ae', 'µ' => 'u')); } } if (!function_exists('MoreNaturalSort')) { function MoreNaturalSort($ar1, $ar2) { if ($ar1 === $ar2) { return 0; } $len1 = strlen($ar1); $len2 = strlen($ar2); $shortest = min($len1, $len2); if (substr($ar1, 0, $shortest) === substr($ar2, 0, $shortest)) { // the shorter argument is the beginning of the longer one, like "str" and "string" if ($len1 < $len2) { return -1; } elseif ($len1 > $len2) { return 1; } return 0; } $ar1 = RemoveAccents(strtolower(trim($ar1))); $ar2 = RemoveAccents(strtolower(trim($ar2))); $translatearray = array('\''=>'', '"'=>'', '_'=>' ', '('=>'', ')'=>'', '-'=>' ', ' '=>' ', '.'=>'', ','=>''); foreach ($translatearray as $key => $val) { $ar1 = str_replace($key, $val, $ar1); $ar2 = str_replace($key, $val, $ar2); } if ($ar1 < $ar2) { return -1; } elseif ($ar1 > $ar2) { return 1; } return 0; } } if (!function_exists('trunc')) { function trunc($floatnumber) { // truncates a floating-point number at the decimal point // returns int (if possible, otherwise float) if ($floatnumber >= 1) { $truncatednumber = floor($floatnumber); } elseif ($floatnumber <= -1) { $truncatednumber = ceil($floatnumber); } else { $truncatednumber = 0; } if ($truncatednumber <= pow(2, 30)) { $truncatednumber = (int) $truncatednumber; } return $truncatednumber; } } if (!function_exists('CastAsInt')) { function CastAsInt($floatnum) { // convert to float if not already $floatnum = (float) $floatnum; // convert a float to type int, only if possible if (trunc($floatnum) == $floatnum) { // it's not floating point if ($floatnum <= pow(2, 30)) { // it's within int range $floatnum = (int) $floatnum; } } return $floatnum; } } if (!function_exists('getmicrotime')) { function getmicrotime() { list($usec, $sec) = explode(' ', microtime()); return ((float) $usec + (float) $sec); } } if (!function_exists('DecimalBinary2Float')) { function DecimalBinary2Float($binarynumerator) { $numerator = Bin2Dec($binarynumerator); $denominator = Bin2Dec(str_repeat('1', strlen($binarynumerator))); return ($numerator / $denominator); } } if (!function_exists('NormalizeBinaryPoint')) { function NormalizeBinaryPoint($binarypointnumber, $maxbits=52) { // http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html if (strpos($binarypointnumber, '.') === false) { $binarypointnumber = '0.'.$binarypointnumber; } elseif ($binarypointnumber{0} == '.') { $binarypointnumber = '0'.$binarypointnumber; } $exponent = 0; while (($binarypointnumber{0} != '1') || (substr($binarypointnumber, 1, 1) != '.')) { if (substr($binarypointnumber, 1, 1) == '.') { $exponent--; $binarypointnumber = substr($binarypointnumber, 2, 1).'.'.substr($binarypointnumber, 3); } else { $pointpos = strpos($binarypointnumber, '.'); $exponent += ($pointpos - 1); $binarypointnumber = str_replace('.', '', $binarypointnumber); $binarypointnumber = $binarypointnumber{0}.'.'.substr($binarypointnumber, 1); } } $binarypointnumber = str_pad(substr($binarypointnumber, 0, $maxbits + 2), $maxbits + 2, '0', STR_PAD_RIGHT); return array('normalized'=>$binarypointnumber, 'exponent'=>(int) $exponent); } } if (!function_exists('Float2BinaryDecimal')) { function Float2BinaryDecimal($floatvalue) { // http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html $maxbits = 128; // to how many bits of precision should the calculations be taken? $intpart = trunc($floatvalue); $floatpart = abs($floatvalue - $intpart); $pointbitstring = ''; while (($floatpart != 0) && (strlen($pointbitstring) < $maxbits)) { $floatpart *= 2; $pointbitstring .= (string) trunc($floatpart); $floatpart -= trunc($floatpart); } $binarypointnumber = decbin($intpart).'.'.$pointbitstring; return $binarypointnumber; } } if (!function_exists('Float2String')) { function Float2String($floatvalue, $bits) { // http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee-expl.html switch ($bits) { case 32: $exponentbits = 8; $fractionbits = 23; break; case 64: $exponentbits = 11; $fractionbits = 52; break; default: return false; break; } if ($floatvalue >= 0) { $signbit = '0'; } else { $signbit = '1'; } $normalizedbinary = NormalizeBinaryPoint(Float2BinaryDecimal($floatvalue), $fractionbits); $biasedexponent = pow(2, $exponentbits - 1) - 1 + $normalizedbinary['exponent']; // (127 or 1023) +/- exponent $exponentbitstring = str_pad(decbin($biasedexponent), $exponentbits, '0', STR_PAD_LEFT); $fractionbitstring = str_pad(substr($normalizedbinary['normalized'], 2), $fractionbits, '0', STR_PAD_RIGHT); return BigEndian2String(Bin2Dec($signbit.$exponentbitstring.$fractionbitstring), $bits % 8, false); } } if (!function_exists('LittleEndian2Float')) { function LittleEndian2Float($byteword) { return BigEndian2Float(strrev($byteword)); } } if (!function_exists('BigEndian2Float')) { function BigEndian2Float($byteword) { // ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic // http://www.psc.edu/general/software/packages/ieee/ieee.html // http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee.html $bitword = BigEndian2Bin($byteword); $signbit = $bitword{0}; switch (strlen($byteword) * 8) { case 32: $exponentbits = 8; $fractionbits = 23; break; case 64: $exponentbits = 11; $fractionbits = 52; break; case 80: $exponentbits = 16; $fractionbits = 64; break; default: return false; break; } $exponentstring = substr($bitword, 1, $exponentbits - 1); $fractionstring = substr($bitword, $exponentbits, $fractionbits); $exponent = Bin2Dec($exponentstring); $fraction = Bin2Dec($fractionstring); if (($exponentbits == 16) && ($fractionbits == 64)) { // 80-bit // As used in Apple AIFF for sample_rate // A bit of a hack, but it works ;) return pow(2, ($exponent - 16382)) * DecimalBinary2Float($fractionstring); } if (($exponent == (pow(2, $exponentbits) - 1)) && ($fraction != 0)) { // Not a Number $floatvalue = false; } elseif (($exponent == (pow(2, $exponentbits) - 1)) && ($fraction == 0)) { if ($signbit == '1') { $floatvalue = '-infinity'; } else { $floatvalue = '+infinity'; } } elseif (($exponent == 0) && ($fraction == 0)) { if ($signbit == '1') { $floatvalue = -0; } else { $floatvalue = 0; } $floatvalue = ($signbit ? 0 : -0); } elseif (($exponent == 0) && ($fraction != 0)) { // These are 'unnormalized' values $floatvalue = pow(2, (-1 * (pow(2, $exponentbits - 1) - 2))) * DecimalBinary2Float($fractionstring); if ($signbit == '1') { $floatvalue *= -1; } } elseif ($exponent != 0) { $floatvalue = pow(2, ($exponent - (pow(2, $exponentbits - 1) - 1))) * (1 + DecimalBinary2Float($fractionstring)); if ($signbit == '1') { $floatvalue *= -1; } } return (float) $floatvalue; } } if (!function_exists('BigEndian2Int')) { function BigEndian2Int($byteword, $synchsafe=false, $signed=false) { $intvalue = 0; $bytewordlen = strlen($byteword); for ($i = 0; $i < $bytewordlen; $i++) { if ($synchsafe) { // disregard MSB, effectively 7-bit bytes $intvalue = $intvalue | (ord($byteword{$i}) & 0x7F) << (($bytewordlen - 1 - $i) * 7); } else { $intvalue += ord($byteword{$i}) * pow(256, ($bytewordlen - 1 - $i)); } } if ($signed && !$synchsafe) { // synchsafe ints are not allowed to be signed switch ($bytewordlen) { case 1: case 2: case 3: case 4: $signmaskbit = 0x80 << (8 * ($bytewordlen - 1)); if ($intvalue & $signmaskbit) { $intvalue = 0 - ($intvalue & ($signmaskbit - 1)); } break; default: die('ERROR: Cannot have signed integers larger than 32-bits in BigEndian2Int()'); break; } } return CastAsInt($intvalue); } } if (!function_exists('LittleEndian2Int')) { function LittleEndian2Int($byteword, $signed=false) { return BigEndian2Int(strrev($byteword), false, $signed); } } if (!function_exists('BigEndian2Bin')) { function BigEndian2Bin($byteword) { $binvalue = ''; $bytewordlen = strlen($byteword); for ($i = 0; $i < $bytewordlen; $i++) { $binvalue .= str_pad(decbin(ord($byteword{$i})), 8, '0', STR_PAD_LEFT); } return $binvalue; } } if (!function_exists('BigEndian2String')) { function BigEndian2String($number, $minbytes=1, $synchsafe=false, $signed=false) { if ($number < 0) { return false; } $maskbyte = (($synchsafe || $signed) ? 0x7F : 0xFF); $intstring = ''; if ($signed) { if ($minbytes > 4) { die('ERROR: Cannot have signed integers larger than 32-bits in BigEndian2String()'); } $number = $number & (0x80 << (8 * ($minbytes - 1))); } while ($number != 0) { $quotient = ($number / ($maskbyte + 1)); $intstring = chr(ceil(($quotient - floor($quotient)) * $maskbyte)).$intstring; $number = floor($quotient); } return str_pad($intstring, $minbytes, chr(0), STR_PAD_LEFT); } } if (!function_exists('Dec2Bin')) { function Dec2Bin($number) { while ($number >= 256) { $bytes[] = (($number / 256) - (floor($number / 256))) * 256; $number = floor($number / 256); } $bytes[] = $number; $binstring = ''; for ($i = 0; $i < count($bytes); $i++) { $binstring = (($i == count($bytes) - 1) ? decbin($bytes[$i]) : str_pad(decbin($bytes[$i]), 8, '0', STR_PAD_LEFT)).$binstring; } return $binstring; } } if (!function_exists('Bin2Dec')) { function Bin2Dec($binstring) { $decvalue = 0; for ($i = 0; $i < strlen($binstring); $i++) { $decvalue += ((int) substr($binstring, strlen($binstring) - $i - 1, 1)) * pow(2, $i); } return CastAsInt($decvalue); } } if (!function_exists('Bin2String')) { function Bin2String($binstring) { // return 'hi' for input of '0110100001101001' $string = ''; $binstringreversed = strrev($binstring); for ($i = 0; $i < strlen($binstringreversed); $i += 8) { $string = chr(Bin2Dec(strrev(substr($binstringreversed, $i, 8)))).$string; } return $string; } } if (!function_exists('LittleEndian2String')) { function LittleEndian2String($number, $minbytes=1, $synchsafe=false) { $intstring = ''; while ($number > 0) { if ($synchsafe) { $intstring = $intstring.chr($number & 127); $number >>= 7; } else { $intstring = $intstring.chr($number & 255); $number >>= 8; } } return str_pad($intstring, $minbytes, chr(0), STR_PAD_RIGHT); } } if (!function_exists('Bool2IntString')) { function Bool2IntString($intvalue) { return ($intvalue ? '1' : '0'); } } if (!function_exists('IntString2Bool')) { function IntString2Bool($char) { if ($char == '1') { return true; } elseif ($char == '0') { return false; } return null; } } if (!function_exists('InverseBoolean')) { function InverseBoolean($value) { return ($value ? false : true); } } if (!function_exists('DeUnSynchronise')) { function DeUnSynchronise($data) { return str_replace(chr(0xFF).chr(0x00), chr(0xFF), $data); } } if (!function_exists('Unsynchronise')) { function Unsynchronise($data) { // Whenever a false synchronisation is found within the tag, one zeroed // byte is inserted after the first false synchronisation byte. The // format of a correct sync that should be altered by ID3 encoders is as // follows: // %11111111 111xxxxx // And should be replaced with: // %11111111 00000000 111xxxxx // This has the side effect that all $FF 00 combinations have to be // altered, so they won't be affected by the decoding process. Therefore // all the $FF 00 combinations have to be replaced with the $FF 00 00 // combination during the unsynchronisation. $data = str_replace(chr(0xFF).chr(0x00), chr(0xFF).chr(0x00).chr(0x00), $data); $unsyncheddata = ''; for ($i = 0; $i < strlen($data); $i++) { $thischar = $data{$i}; $unsyncheddata .= $thischar; if ($thischar == chr(255)) { $nextchar = ord(substr($data, $i + 1, 1)); if (($nextchar | 0xE0) == 0xE0) { // previous byte = 11111111, this byte = 111????? $unsyncheddata .= chr(0); } } } return $unsyncheddata; } } if (!function_exists('is_hash')) { function is_hash($var) { // written by dev-null@christophe.vg // taken from http://www.php.net/manual/en/function.array-merge-recursive.php if (is_array($var)) { $keys = array_keys($var); $all_num = true; for ($i = 0; $i < count($keys); $i++) { if (is_string($keys[$i])) { return true; } } } return false; } } if (!function_exists('array_join_merge')) { function array_join_merge($arr1, $arr2) { // written by dev-null@christophe.vg // taken from http://www.php.net/manual/en/function.array-merge-recursive.php if (is_array($arr1) && is_array($arr2)) { // the same -> merge $new_array = array(); if (is_hash($arr1) && is_hash($arr2)) { // hashes -> merge based on keys $keys = array_merge(array_keys($arr1), array_keys($arr2)); foreach ($keys as $key) { $new_array[$key] = array_join_merge(@$arr1[$key], @$arr2[$key]); } } else { // two real arrays -> merge $new_array = array_reverse(array_unique(array_reverse(array_merge($arr1,$arr2)))); } return $new_array; } else { // not the same ... take new one if defined, else the old one stays return $arr2 ? $arr2 : $arr1; } } } if (!function_exists('array_merge_clobber')) { function array_merge_clobber($array1, $array2) { // written by kc@hireability.com // taken from http://www.php.net/manual/en/function.array-merge-recursive.php if (!is_array($array1) || !is_array($array2)) { return false; } $newarray = $array1; foreach ($array2 as $key => $val) { if (is_array($val) && isset($newarray[$key]) && is_array($newarray[$key])) { $newarray[$key] = array_merge_clobber($newarray[$key], $val); } else { $newarray[$key] = $val; } } return $newarray; } } if (!function_exists('array_merge_noclobber')) { function array_merge_noclobber($array1, $array2) { if (!is_array($array1) || !is_array($array2)) { return false; } $newarray = $array1; foreach ($array2 as $key => $val) { if (is_array($val) && isset($newarray[$key]) && is_array($newarray[$key])) { $newarray[$key] = array_merge_noclobber($newarray[$key], $val); } elseif (!isset($newarray[$key])) { $newarray[$key] = $val; } } return $newarray; } } if (!function_exists('RoughTranslateUnicodeToASCII')) { function RoughTranslateUnicodeToASCII($rawdata, $frame_textencoding) { // rough translation of data for application that can't handle Unicode data $tempstring = ''; switch ($frame_textencoding) { case 0: // ISO-8859-1. Terminated with $00. $asciidata = $rawdata; break; case 1: // UTF-16 encoded Unicode with BOM. Terminated with $00 00. $asciidata = $rawdata; if (substr($asciidata, 0, 2) == chr(0xFF).chr(0xFE)) { // remove BOM, only if present (it should be, but...) $asciidata = substr($asciidata, 2); } if (substr($asciidata, strlen($asciidata) - 2, 2) == chr(0).chr(0)) { $asciidata = substr($asciidata, 0, strlen($asciidata) - 2); // remove terminator, only if present (it should be, but...) } for ($i = 0; $i < strlen($asciidata); $i += 2) { if ((ord($asciidata{$i}) <= 0x7F) || (ord($asciidata{$i}) >= 0xA0)) { $tempstring .= $asciidata{$i}; } else { $tempstring .= '?'; } } $asciidata = $tempstring; break; case 2: // UTF-16BE encoded Unicode without BOM. Terminated with $00 00. $asciidata = $rawdata; if (substr($asciidata, strlen($asciidata) - 2, 2) == chr(0).chr(0)) { $asciidata = substr($asciidata, 0, strlen($asciidata) - 2); // remove terminator, only if present (it should be, but...) } for ($i = 0; $i < strlen($asciidata); $i += 2) { if ((ord($asciidata{$i}) <= 0x7F) || (ord($asciidata{$i}) >= 0xA0)) { $tempstring .= $asciidata{$i}; } else { $tempstring .= '?'; } } $asciidata = $tempstring; break; case 3: // UTF-8 encoded Unicode. Terminated with $00. $asciidata = utf8_decode($rawdata); break; case 255: // Unicode, Big-Endian. Terminated with $00 00. $asciidata = $rawdata; if (substr($asciidata, strlen($asciidata) - 2, 2) == chr(0).chr(0)) { $asciidata = substr($asciidata, 0, strlen($asciidata) - 2); // remove terminator, only if present (it should be, but...) } for ($i = 0; ($i + 1) < strlen($asciidata); $i += 2) { if ((ord($asciidata{($i + 1)}) <= 0x7F) || (ord($asciidata{($i + 1)}) >= 0xA0)) { $tempstring .= $asciidata{($i + 1)}; } else { $tempstring .= '?'; } } $asciidata = $tempstring; break; default: // shouldn't happen, but in case $frame_textencoding is not 1 <= $frame_textencoding <= 4 // just pass the data through unchanged. $asciidata = $rawdata; break; } if (substr($asciidata, strlen($asciidata) - 1, 1) == chr(0)) { // remove null terminator, if present $asciidata = NoNullString($asciidata); } return $asciidata; // return str_replace(chr(0), '', $asciidata); // just in case any nulls slipped through } } if (!function_exists('PlaytimeString')) { function PlaytimeString($playtimeseconds) { $contentseconds = round((($playtimeseconds / 60) - floor($playtimeseconds / 60)) * 60); $contentminutes = floor($playtimeseconds / 60); if ($contentseconds >= 60) { $contentseconds -= 60; $contentminutes++; } return number_format($contentminutes).':'.str_pad($contentseconds, 2, 0, STR_PAD_LEFT); } } if (!function_exists('CloseMatch')) { function CloseMatch($value1, $value2, $tolerance) { return (abs($value1 - $value2) <= $tolerance); } } if (!function_exists('ID3v1matchesID3v2')) { function ID3v1matchesID3v2($id3v1, $id3v2) { $requiredindices = array('title', 'artist', 'album', 'year', 'genre', 'comment'); foreach ($requiredindices as $requiredindex) { if (!isset($id3v1["$requiredindex"])) { $id3v1["$requiredindex"] = ''; } if (!isset($id3v2["$requiredindex"])) { $id3v2["$requiredindex"] = ''; } } if (trim($id3v1['title']) != trim(substr($id3v2['title'], 0, 30))) { return false; } if (trim($id3v1['artist']) != trim(substr($id3v2['artist'], 0, 30))) { return false; } if (trim($id3v1['album']) != trim(substr($id3v2['album'], 0, 30))) { return false; } if (trim($id3v1['year']) != trim(substr($id3v2['year'], 0, 4))) { return false; } if (trim($id3v1['genre']) != trim($id3v2['genre'])) { return false; } if (isset($id3v1['track'])) { if (!isset($id3v1['track']) || (trim($id3v1['track']) != trim($id3v2['track']))) { return false; } if (trim($id3v1['comment']) != trim(substr($id3v2['comment'], 0, 28))) { return false; } } else { if (trim($id3v1['comment']) != trim(substr($id3v2['comment'], 0, 30))) { return false; } } return true; } } if (!function_exists('FILETIMEtoUNIXtime')) { function FILETIMEtoUNIXtime($FILETIME, $round=true) { // FILETIME is a 64-bit unsigned integer representing // the number of 100-nanosecond intervals since January 1, 1601 // UNIX timestamp is number of seconds since January 1, 1970 // 116444736000000000 = 10000000 * 60 * 60 * 24 * 365 * 369 + 89 leap days if ($round) { return round(($FILETIME - 116444736000000000) / 10000000); } return ($FILETIME - 116444736000000000) / 10000000; } } if (!function_exists('GUIDtoBytestring')) { function GUIDtoBytestring($GUIDstring) { // Microsoft defines these 16-byte (128-bit) GUIDs in the strangest way: // first 4 bytes are in little-endian order // next 2 bytes are appended in little-endian order // next 2 bytes are appended in little-endian order // next 2 bytes are appended in big-endian order // next 6 bytes are appended in big-endian order // AaBbCcDd-EeFf-GgHh-IiJj-KkLlMmNnOoPp is stored as this 16-byte string: // $Dd $Cc $Bb $Aa $Ff $Ee $Hh $Gg $Ii $Jj $Kk $Ll $Mm $Nn $Oo $Pp $hexbytecharstring = chr(hexdec(substr($GUIDstring, 6, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 4, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 2, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 0, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 11, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 9, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 16, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 14, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 19, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 21, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 24, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 26, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 28, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 30, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 32, 2))); $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 34, 2))); return $hexbytecharstring; } } if (!function_exists('BytestringToGUID')) { function BytestringToGUID($Bytestring) { $GUIDstring = str_pad(dechex(ord($Bytestring{3})), 2, '0', STR_PAD_LEFT); $GUIDstring .= str_pad(dechex(ord($Bytestring{2})), 2, '0', STR_PAD_LEFT); $GUIDstring .= str_pad(dechex(ord($Bytestring{1})), 2, '0', STR_PAD_LEFT); $GUIDstring .= str_pad(dechex(ord($Bytestring{0})), 2, '0', STR_PAD_LEFT); $GUIDstring .= '-'; $GUIDstring .= str_pad(dechex(ord($Bytestring{5})), 2, '0', STR_PAD_LEFT); $GUIDstring .= str_pad(dechex(ord($Bytestring{4})), 2, '0', STR_PAD_LEFT); $GUIDstring .= '-'; $GUIDstring .= str_pad(dechex(ord($Bytestring{7})), 2, '0', STR_PAD_LEFT); $GUIDstring .= str_pad(dechex(ord($Bytestring{6})), 2, '0', STR_PAD_LEFT); $GUIDstring .= '-'; $GUIDstring .= str_pad(dechex(ord($Bytestring{8})), 2, '0', STR_PAD_LEFT); $GUIDstring .= str_pad(dechex(ord($Bytestring{9})), 2, '0', STR_PAD_LEFT); $GUIDstring .= '-'; $GUIDstring .= str_pad(dechex(ord($Bytestring{10})), 2, '0', STR_PAD_LEFT); $GUIDstring .= str_pad(dechex(ord($Bytestring{11})), 2, '0', STR_PAD_LEFT); $GUIDstring .= str_pad(dechex(ord($Bytestring{12})), 2, '0', STR_PAD_LEFT); $GUIDstring .= str_pad(dechex(ord($Bytestring{13})), 2, '0', STR_PAD_LEFT); $GUIDstring .= str_pad(dechex(ord($Bytestring{14})), 2, '0', STR_PAD_LEFT); $GUIDstring .= str_pad(dechex(ord($Bytestring{15})), 2, '0', STR_PAD_LEFT); return strtoupper($GUIDstring); } } if (!function_exists('BitrateColor')) { function BitrateColor($bitrate) { $bitrate /= 3; // scale from 1-768kbps to 1-256kbps $bitrate--; // scale from 1-256kbps to 0-255kbps $bitrate = max($bitrate, 0); $bitrate = min($bitrate, 255); //$bitrate = max($bitrate, 32); //$bitrate = min($bitrate, 143); //$bitrate = ($bitrate * 2) - 32; $Rcomponent = max(255 - ($bitrate * 2), 0); $Gcomponent = max(($bitrate * 2) - 255, 0); if ($bitrate > 127) { $Bcomponent = max((255 - $bitrate) * 2, 0); } else { $Bcomponent = max($bitrate * 2, 0); } return str_pad(dechex($Rcomponent), 2, '0', STR_PAD_LEFT).str_pad(dechex($Gcomponent), 2, '0', STR_PAD_LEFT).str_pad(dechex($Bcomponent), 2, '0', STR_PAD_LEFT); } } if (!function_exists('BitrateText')) { function BitrateText($bitrate) { return '<SPAN STYLE="color: #'.BitrateColor($bitrate).'">'.round($bitrate).' kbps</SPAN>'; } } if (!function_exists('image_type_to_mime_type')) { function image_type_to_mime_type($imagetypeid) { // only available in PHP v4.3.0+ static $image_type_to_mime_type = array(); if (empty($image_type_to_mime_type)) { $image_type_to_mime_type[1] = 'image/gif'; // GIF $image_type_to_mime_type[2] = 'image/jpeg'; // JPEG $image_type_to_mime_type[3] = 'image/png'; // PNG $image_type_to_mime_type[4] = 'application/x-shockwave-flash'; // Flash $image_type_to_mime_type[5] = 'image/psd'; // PSD $image_type_to_mime_type[6] = 'image/bmp'; // BMP $image_type_to_mime_type[7] = 'image/tiff'; // TIFF: little-endian (Intel) $image_type_to_mime_type[8] = 'image/tiff'; // TIFF: big-endian (Motorola) //$image_type_to_mime_type[9] = 'image/jpc'; // JPC //$image_type_to_mime_type[10] = 'image/jp2'; // JPC //$image_type_to_mime_type[11] = 'image/jpx'; // JPC //$image_type_to_mime_type[12] = 'image/jb2'; // JPC $image_type_to_mime_type[13] = 'application/x-shockwave-flash'; // Shockwave $image_type_to_mime_type[14] = 'image/iff'; // IFF } return (isset($image_type_to_mime_type[$imagetypeid]) ? $image_type_to_mime_type[$imagetypeid] : 'application/octet-stream'); } } if (!function_exists('utf8_decode')) { // PHP has this function built-in if it's configured with the --with-xml option // This version of the function is only provided in case XML isn't installed function utf8_decode($utf8text) { // http://www.php.net/manual/en/function.utf8-encode.php // bytes bits representation // 1 7 0bbbbbbb // 2 11 110bbbbb 10bbbbbb // 3 16 1110bbbb 10bbbbbb 10bbbbbb // 4 21 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb $utf8length = strlen($utf8text); $decodedtext = ''; for ($i = 0; $i < $utf8length; $i++) { if ((ord($utf8text{$i}) & 0x80) == 0) { $decodedtext .= $utf8text{$i}; } elseif ((ord($utf8text{$i}) & 0xF0) == 0xF0) { $decodedtext .= '?'; $i += 3; } elseif ((ord($utf8text{$i}) & 0xE0) == 0xE0) { $decodedtext .= '?'; $i += 2; } elseif ((ord($utf8text{$i}) & 0xC0) == 0xC0) { // 2 11 110bbbbb 10bbbbbb $decodedchar = Bin2Dec(substr(Dec2Bin(ord($utf8text{$i})), 3, 5).substr(Dec2Bin(ord($utf8text{($i + 1)})), 2, 6)); if ($decodedchar <= 255) { $decodedtext .= chr($decodedchar); } else { $decodedtext .= '?'; } $i += 1; } } return $decodedtext; } } if (!function_exists('DateMac2Unix')) { function DateMac2Unix($macdate) { // Macintosh timestamp: seconds since 00:00h January 1, 1904 // UNIX timestamp: seconds since 00:00h January 1, 1970 return CastAsInt($macdate - 2082844800); } } if (!function_exists('FixedPoint8_8')) { function FixedPoint8_8($rawdata) { return BigEndian2Int(substr($rawdata, 0, 1)) + (float) (BigEndian2Int(substr($rawdata, 1, 1)) / pow(2, 8)); } } if (!function_exists('FixedPoint16_16')) { function FixedPoint16_16($rawdata) { return BigEndian2Int(substr($rawdata, 0, 2)) + (float) (BigEndian2Int(substr($rawdata, 2, 2)) / pow(2, 16)); } } if (!function_exists('FixedPoint2_30')) { function FixedPoint2_30($rawdata) { $binarystring = BigEndian2Bin($rawdata); return Bin2Dec(substr($binarystring, 0, 2)) + (float) (Bin2Dec(substr($binarystring, 2, 30)) / pow(2, 30)); } } if (!function_exists('Pascal2String')) { function Pascal2String($pascalstring) { // Pascal strings have 1 byte at the beginning saying how many chars are in the string return substr($pascalstring, 1); } } if (!function_exists('NoNullString')) { function NoNullString($nullterminatedstring) { // remove the single null terminator on null terminated strings if (substr($nullterminatedstring, strlen($nullterminatedstring) - 1, 1) === chr(0)) { return substr($nullterminatedstring, 0, strlen($nullterminatedstring) - 1); } return $nullterminatedstring; } } if (!function_exists('FileSizeNiceDisplay')) { function FileSizeNiceDisplay($filesize, $precision=2) { if ($filesize < 1000) { $sizeunit = 'bytes'; $precision = 0; } else { $filesize /= 1024; $sizeunit = 'kB'; } if ($filesize >= 1000) { $filesize /= 1024; $sizeunit = 'MB'; } if ($filesize >= 1000) { $filesize /= 1024; $sizeunit = 'GB'; } return number_format($filesize, $precision).' '.$sizeunit; } } if (!function_exists('DOStime2UNIXtime')) { function DOStime2UNIXtime($DOSdate, $DOStime) { // wFatDate // Specifies the MS-DOS date. The date is a packed 16-bit value with the following format: // Bits Contents // 0-4 Day of the month (1-31) // 5-8 Month (1 = January, 2 = February, and so on) // 9-15 Year offset from 1980 (add 1980 to get actual year) $UNIXday = ($DOSdate & 0x001F); $UNIXmonth = (($DOSdate & 0x01E0) >> 5); $UNIXyear = (($DOSdate & 0xFE00) >> 9) + 1980; // wFatTime // Specifies the MS-DOS time. The time is a packed 16-bit value with the following format: // Bits Contents // 0-4 Second divided by 2 // 5-10 Minute (0-59) // 11-15 Hour (0-23 on a 24-hour clock) $UNIXsecond = ($DOStime & 0x001F) * 2; $UNIXminute = (($DOStime & 0x07E0) >> 5); $UNIXhour = (($DOStime & 0xF800) >> 11); return mktime($UNIXhour, $UNIXminute, $UNIXsecond, $UNIXmonth, $UNIXday, $UNIXyear); } } if (!function_exists('CreateDeepArray')) { function CreateDeepArray($ArrayPath, $Separator, $Value) { // assigns $Value to a nested array path: // $foo = CreateDeepArray('/path/to/my', '/', 'file.txt') // is the same as: // $foo = array('path'=>array('to'=>'array('my'=>array('file.txt')))); // or // $foo['path']['to']['my'] = 'file.txt'; while ($ArrayPath{0} == $Separator) { $ArrayPath = substr($ArrayPath, 1); } if (($pos = strpos($ArrayPath, $Separator)) !== false) { $ReturnedArray[substr($ArrayPath, 0, $pos)] = CreateDeepArray(substr($ArrayPath, $pos + 1), $Separator, $Value); } else { $ReturnedArray["$ArrayPath"] = $Value; } return $ReturnedArray; } } if (!function_exists('md5_file')) { // Allan Hansen <ah@artemis.dk> // md5_file() exists in PHP 4.2.0. // The following works under UNIX only, but dies on windows function md5_file($file) { if (substr(php_uname(), 0, 7) == 'Windows') { die('PHP 4.2.0 or newer required for md5_file()'); } $file = str_replace('`', '\\`', $file); if (ereg("^([0-9a-f]{32})[ \t\n\r]", `md5sum "$file"`, $r)) { return $r[1]; } return false; } } if (!function_exists('md5_data')) { // Allan Hansen <ah@artemis.dk> // md5_data() - returns md5sum for a file from startuing position to absolute end position function md5_data($file, $offset, $end, $invertsign=false) { // first try and create a temporary file in the same directory as the file being scanned if (($dataMD5filename = tempnam(dirname($file), eregi_replace('[^[:alnum:]]', '', basename($file)))) === false) { // if that fails, create a temporary file in the system temp directory if (($dataMD5filename = tempnam('/tmp', 'getID3')) === false) { // if that fails, create a temporary file in the current directory if (($dataMD5filename = tempnam('.', eregi_replace('[^[:alnum:]]', '', basename($file)))) === false) { // can't find anywhere to create a temp file, just die return false; } } } $md5 = false; set_time_limit(max(filesize($file) / 1000000, 30)); // copy parts of file if ($fp = @fopen($file, 'rb')) { if ($MD5fp = @fopen($dataMD5filename, 'wb')) { if ($invertsign) { // Load conversion lookup strings for 8-bit unsigned->signed conversion below $from = ''; $to = ''; for ($i = 0; $i < 128; $i++) { $from .= chr($i); $to .= chr($i + 128); } for ($i = 128; $i < 256; $i++) { $from .= chr($i); $to .= chr($i - 128); } } fseek($fp, $offset, SEEK_SET); $byteslefttowrite = $end - $offset; while (($byteslefttowrite > 0) && ($buffer = fread($fp, FREAD_BUFFER_SIZE))) { if ($invertsign) { // Possibly FLAC-specific (?) // FLAC calculates the MD5sum of the source data of 8-bit files // not on the actual byte values in the source file, but of those // values converted from unsigned to signed, or more specifcally, // with the MSB inverted. ex: 01 -> 81; F5 -> 75; etc // Therefore, 8-bit WAV data has to be converted before getting the // md5_data value so as to match the FLAC value // Flip the MSB for each byte in the buffer before copying $buffer = strtr($buffer, $from, $to); } $byteswritten = fwrite($MD5fp, $buffer, $byteslefttowrite); $byteslefttowrite -= $byteswritten; } fclose($MD5fp); $md5 = md5_file($dataMD5filename); } fclose($fp); } unlink($dataMD5filename); return $md5; } } if (!function_exists('TwosCompliment2Decimal')) { function TwosCompliment2Decimal($BinaryValue) { // http://sandbox.mc.edu/~bennet/cs110/tc/tctod.html // First check if the number is negative or positive by looking at the sign bit. // If it is positive, simply convert it to decimal. // If it is negative, make it positive by inverting the bits and adding one. // Then, convert the result to decimal. // The negative of this number is the value of the original binary. if ($BinaryValue & 0x80) { // negative number return (0 - ((~$BinaryValue & 0xFF) + 1)); } else { // positive number return $BinaryValue; } } } if (!function_exists('LastArrayElement')) { function LastArrayElement($MyArray) { if (!is_array($MyArray)) { return false; } if (empty($MyArray)) { return null; } foreach ($MyArray as $key => $value) { } return $value; } } if (!function_exists('safe_inc')) { function safe_inc(&$variable, $increment=1) { if (isset($variable)) { $variable += $increment; } else { $variable = $increment; } return true; } } if (!function_exists('CalculateCompressionRatioVideo')) { function CalculateCompressionRatioVideo(&$ThisFileInfo) { if (empty($ThisFileInfo['video'])) { return false; } if (empty($ThisFileInfo['video']['resolution_x']) || empty($ThisFileInfo['video']['resolution_y'])) { return false; } if (empty($ThisFileInfo['video']['bits_per_sample'])) { return false; } switch ($ThisFileInfo['video']['dataformat']) { case 'bmp': case 'gif': case 'jpeg': case 'jpg': case 'png': case 'tiff': $FrameRate = 1; $PlaytimeSeconds = 1; $BitrateCompressed = $ThisFileInfo['filesize'] * 8; break; default: if (!empty($ThisFileInfo['video']['frame_rate'])) { $FrameRate = $ThisFileInfo['video']['frame_rate']; } else { return false; } if (!empty($ThisFileInfo['playtime_seconds'])) { $PlaytimeSeconds = $ThisFileInfo['playtime_seconds']; } else { return false; } if (!empty($ThisFileInfo['video']['bitrate'])) { $BitrateCompressed = $ThisFileInfo['video']['bitrate']; } else { return false; } break; } $BitrateUncompressed = $ThisFileInfo['video']['resolution_x'] * $ThisFileInfo['video']['resolution_y'] * $ThisFileInfo['video']['bits_per_sample'] * $FrameRate; $ThisFileInfo['video']['compression_ratio'] = $BitrateCompressed / $BitrateUncompressed; return true; } } if (!function_exists('CalculateCompressionRatioAudio')) { function CalculateCompressionRatioAudio(&$ThisFileInfo) { if (empty($ThisFileInfo['audio']['bitrate']) || empty($ThisFileInfo['audio']['channels']) || empty($ThisFileInfo['audio']['sample_rate']) || empty($ThisFileInfo['audio']['bits_per_sample'])) { return false; } $ThisFileInfo['audio']['compression_ratio'] = $ThisFileInfo['audio']['bitrate'] / ($ThisFileInfo['audio']['channels'] * $ThisFileInfo['audio']['sample_rate'] * $ThisFileInfo['audio']['bits_per_sample']); return true; } } if (!function_exists('IsValidMIMEstring')) { function IsValidMIMEstring($mimestring) { if ((strlen($mimestring) >= 3) && (strpos($mimestring, '/') > 0) && (strpos($mimestring, '/') < (strlen($mimestring) - 1))) { return true; } return false; } } if (!function_exists('IsWithinBitRange')) { function IsWithinBitRange($number, $maxbits, $signed=false) { if ($signed) { if (($number > (0 - pow(2, $maxbits - 1))) && ($number <= pow(2, $maxbits - 1))) { return true; } } else { if (($number >= 0) && ($number <= pow(2, $maxbits))) { return true; } } return false; } } if (!function_exists('safe_parse_url')) { function safe_parse_url($url) { $parts = @parse_url($url); $parts['scheme'] = (isset($parts['scheme']) ? $parts['scheme'] : ''); $parts['host'] = (isset($parts['host']) ? $parts['host'] : ''); $parts['user'] = (isset($parts['user']) ? $parts['user'] : ''); $parts['pass'] = (isset($parts['pass']) ? $parts['pass'] : ''); $parts['path'] = (isset($parts['path']) ? $parts['path'] : ''); $parts['query'] = (isset($parts['query']) ? $parts['query'] : ''); return $parts; } } if (!function_exists('IsValidURL')) { function IsValidURL($url, $allowUserPass=false) { if ($url == '') { return false; } if ($allowUserPass !== true) { if (strstr($url, '@')) { // in the format http://user:pass@example.com or http://user@example.com // but could easily be somebody incorrectly entering an email address in place of a URL return false; } } if ($parts = safe_parse_url($url)) { if (($parts['scheme'] != 'http') && ($parts['scheme'] != 'https') && ($parts['scheme'] != 'ftp') && ($parts['scheme'] != 'gopher')) { return false; } elseif (!eregi("^[[:alnum:]]([-.]?[0-9a-z])*\.[a-z]{2,3}$", $parts['host'], $regs) && !IsValidDottedIP($parts['host'])) { return false; } elseif (!eregi("^([[:alnum:]-]|[\_])*$", $parts['user'], $regs)) { return false; } elseif (!eregi("^([[:alnum:]-]|[\_])*$", $parts['pass'], $regs)) { return false; } elseif (!eregi("^[[:alnum:]/_\.@~-]*$", $parts['path'], $regs)) { return false; } elseif (!eregi("^[[:alnum:]?&=+:;_()%#/,\.-]*$", $parts['query'], $regs)) { return false; } else { return true; } } return false; } } echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD="POST">'; echo 'Enter 4 hex bytes of MPEG-audio header (ie <I>FF FA 92 44</I>)<BR>'; echo '<INPUT TYPE="TEXT" NAME="HeaderHexBytes" VALUE="'.(isset($_POST['HeaderHexBytes']) ? strtoupper($_POST['HeaderHexBytes']) : '').'" SIZE="11" MAXLENGTH="11">'; echo '<INPUT TYPE="SUBMIT" NAME="Analyze" VALUE="Analyze"></FORM>'; echo '<HR>'; echo '<FORM ACTION="'.$_SERVER['PHP_SELF'].'" METHOD="POST">'; echo 'Generate a MPEG-audio 4-byte header from these values:<BR>'; echo '<TABLE BORDER="0">'; $MPEGgenerateValues = array( 'version'=>array('1', '2', '2.5'), 'layer'=>array('I', 'II', 'III'), 'protection'=>array('Y', 'N'), 'bitrate'=>array('free', '8', '16', '24', '32', '40', '48', '56', '64', '80', '96', '112', '128', '144', '160', '176', '192', '224', '256', '288', '320', '352', '384', '416', '448'), 'frequency'=>array('8000', '11025', '12000', '16000', '22050', '24000', '32000', '44100', '48000'), 'padding'=>array('Y', 'N'), 'private'=>array('Y', 'N'), 'channelmode'=>array('stereo', 'joint stereo', 'dual channel', 'mono'), 'modeextension'=>array('none', 'IS', 'MS', 'IS+MS', '4-31', '8-31', '12-31', '16-31'), 'copyright'=>array('Y', 'N'), 'original'=>array('Y', 'N'), 'emphasis'=>array('none', '50/15ms', 'CCIT J.17') ); foreach ($MPEGgenerateValues as $name => $dataarray) { echo '<TR><TH>'.$name.':</TH><TD><SELECT NAME="'.$name.'">'; foreach ($dataarray as $key => $value) { echo '<OPTION'.((isset($_POST["$name"]) && ($_POST["$name"] == $value)) ? ' SELECTED' : '').'>'.$value.'</OPTION>'; } echo '</SELECT></TD></TR>'; } if (isset($_POST['bitrate'])) { echo '<TR><TH>Frame Length:</TH><TD>'.(int) MPEGaudioFrameLength($_POST['bitrate'], $_POST['version'], $_POST['layer'], (($_POST['padding'] == 'Y') ? '1' : '0'), $_POST['frequency']).'</TD></TR>'; } echo '</TABLE>'; echo '<INPUT TYPE="SUBMIT" NAME="Generate" VALUE="Generate"></FORM>'; echo '<HR>'; if (isset($_POST['Analyze']) && $_POST['HeaderHexBytes']) { $headerbytearray = explode(' ', $_POST['HeaderHexBytes']); if (count($headerbytearray) != 4) { die('Invalid byte pattern'); } $headerstring = ''; foreach ($headerbytearray as $textbyte) { $headerstring .= chr(hexdec($textbyte)); } $MP3fileInfo['error'] = ''; $MPEGheaderRawArray = MPEGaudioHeaderDecode(substr($headerstring, 0, 4)); if (MPEGaudioHeaderValid($MPEGheaderRawArray, true)) { $MP3fileInfo['raw'] = $MPEGheaderRawArray; $MP3fileInfo['version'] = MPEGaudioVersionLookup($MP3fileInfo['raw']['version']); $MP3fileInfo['layer'] = MPEGaudioLayerLookup($MP3fileInfo['raw']['layer']); $MP3fileInfo['protection'] = MPEGaudioCRCLookup($MP3fileInfo['raw']['protection']); $MP3fileInfo['bitrate'] = MPEGaudioBitrateLookup($MP3fileInfo['version'], $MP3fileInfo['layer'], $MP3fileInfo['raw']['bitrate']); $MP3fileInfo['frequency'] = MPEGaudioFrequencyLookup($MP3fileInfo['version'], $MP3fileInfo['raw']['sample_rate']); $MP3fileInfo['padding'] = (bool) $MP3fileInfo['raw']['padding']; $MP3fileInfo['private'] = (bool) $MP3fileInfo['raw']['private']; $MP3fileInfo['channelmode'] = MPEGaudioChannelModeLookup($MP3fileInfo['raw']['channelmode']); $MP3fileInfo['channels'] = (($MP3fileInfo['channelmode'] == 'mono') ? 1 : 2); $MP3fileInfo['modeextension'] = MPEGaudioModeExtensionLookup($MP3fileInfo['layer'], $MP3fileInfo['raw']['modeextension']); $MP3fileInfo['copyright'] = (bool) $MP3fileInfo['raw']['copyright']; $MP3fileInfo['original'] = (bool) $MP3fileInfo['raw']['original']; $MP3fileInfo['emphasis'] = MPEGaudioEmphasisLookup($MP3fileInfo['raw']['emphasis']); if ($MP3fileInfo['protection']) { $MP3fileInfo['crc'] = BigEndian2Int(substr($headerstring, 4, 2)); } if ($MP3fileInfo['frequency'] > 0) { $MP3fileInfo['framelength'] = MPEGaudioFrameLength($MP3fileInfo['bitrate'], $MP3fileInfo['version'], $MP3fileInfo['layer'], (int) $MP3fileInfo['padding'], $MP3fileInfo['frequency']); } if ($MP3fileInfo['bitrate'] != 'free') { $MP3fileInfo['bitrate'] *= 1000; } } else { $MP3fileInfo['error'] .= "\n".'Invalid MPEG audio header'; } if (!$MP3fileInfo['error']) { unset($MP3fileInfo['error']); } echo table_var_dump($MP3fileInfo); } elseif (isset($_POST['Generate'])) { // AAAA AAAA AAAB BCCD EEEE FFGH IIJJ KLMM $headerbitstream = '11111111111'; // A - Frame sync (all bits set) $MPEGversionLookup = array('2.5'=>'00', '2'=>'10', '1'=>'11'); $headerbitstream .= $MPEGversionLookup[$_POST['version']]; // B - MPEG Audio version ID $MPEGlayerLookup = array('III'=>'01', 'II'=>'10', 'I'=>'11'); $headerbitstream .= $MPEGlayerLookup[$_POST['layer']]; // C - Layer description $headerbitstream .= (($_POST['protection'] == 'Y') ? '0' : '1'); // D - Protection bit $MPEGaudioBitrateLookup['1']['I'] = array('free'=>'0000', '32'=>'0001', '64'=>'0010', '96'=>'0011', '128'=>'0100', '160'=>'0101', '192'=>'0110', '224'=>'0111', '256'=>'1000', '288'=>'1001', '320'=>'1010', '352'=>'1011', '384'=>'1100', '416'=>'1101', '448'=>'1110'); $MPEGaudioBitrateLookup['1']['II'] = array('free'=>'0000', '32'=>'0001', '48'=>'0010', '56'=>'0011', '64'=>'0100', '80'=>'0101', '96'=>'0110', '112'=>'0111', '128'=>'1000', '160'=>'1001', '192'=>'1010', '224'=>'1011', '256'=>'1100', '320'=>'1101', '384'=>'1110'); $MPEGaudioBitrateLookup['1']['III'] = array('free'=>'0000', '32'=>'0001', '40'=>'0010', '48'=>'0011', '56'=>'0100', '64'=>'0101', '80'=>'0110', '96'=>'0111', '112'=>'1000', '128'=>'1001', '160'=>'1010', '192'=>'1011', '224'=>'1100', '256'=>'1101', '320'=>'1110'); $MPEGaudioBitrateLookup['2']['I'] = array('free'=>'0000', '32'=>'0001', '48'=>'0010', '56'=>'0011', '64'=>'0100', '80'=>'0101', '96'=>'0110', '112'=>'0111', '128'=>'1000', '144'=>'1001', '160'=>'1010', '176'=>'1011', '192'=>'1100', '224'=>'1101', '256'=>'1110'); $MPEGaudioBitrateLookup['2']['II'] = array('free'=>'0000', '8'=>'0001', '16'=>'0010', '24'=>'0011', '32'=>'0100', '40'=>'0101', '48'=>'0110', '56'=>'0111', '64'=>'1000', '80'=>'1001', '96'=>'1010', '112'=>'1011', '128'=>'1100', '144'=>'1101', '160'=>'1110'); $MPEGaudioBitrateLookup['2']['III'] = $MPEGaudioBitrateLookup['2']['II']; $MPEGaudioBitrateLookup['2.5']['I'] = $MPEGaudioBitrateLookup['2']['I']; $MPEGaudioBitrateLookup['2.5']['II'] = $MPEGaudioBitrateLookup['2']['II']; $MPEGaudioBitrateLookup['2.5']['III'] = $MPEGaudioBitrateLookup['2']['II']; if (isset($MPEGaudioBitrateLookup[$_POST['version']][$_POST['layer']][$_POST['bitrate']])) { $headerbitstream .= $MPEGaudioBitrateLookup[$_POST['version']][$_POST['layer']][$_POST['bitrate']]; // E - Bitrate index } else { die('Invalid <B>Bitrate</B>'); } $MPEGaudioFrequencyLookup['1'] = array('44100'=>'00', '48000'=>'01', '32000'=>'10'); $MPEGaudioFrequencyLookup['2'] = array('22050'=>'00', '24000'=>'01', '16000'=>'10'); $MPEGaudioFrequencyLookup['2.5'] = array('11025'=>'00', '12000'=>'01', '8000'=>'10'); if (isset($MPEGaudioFrequencyLookup[$_POST['version']][$_POST['frequency']])) { $headerbitstream .= $MPEGaudioFrequencyLookup[$_POST['version']][$_POST['frequency']]; // F - Sampling rate frequency index } else { die('Invalid <B>Frequency</B>'); } $headerbitstream .= (($_POST['padding'] == 'Y') ? '1' : '0'); // G - Padding bit $headerbitstream .= (($_POST['private'] == 'Y') ? '1' : '0'); // H - Private bit $MPEGaudioChannelModeLookup = array('stereo'=>'00', 'joint stereo'=>'01', 'dual channel'=>'10', 'mono'=>'11'); $headerbitstream .= $MPEGaudioChannelModeLookup[$_POST['channelmode']]; // I - Channel Mode $MPEGaudioModeExtensionLookup['I'] = array('4-31'=>'00', '8-31'=>'01', '12-31'=>'10', '16-31'=>'11'); $MPEGaudioModeExtensionLookup['II'] = $MPEGaudioModeExtensionLookup['I']; $MPEGaudioModeExtensionLookup['III'] = array('none'=>'00', 'IS'=>'01', 'MS'=>'10', 'IS+MS'=>'11'); if ($_POST['channelmode'] != 'joint stereo') { $headerbitstream .= '00'; } elseif (isset($MPEGaudioModeExtensionLookup[$_POST['layer']][$_POST['modeextension']])) { $headerbitstream .= $MPEGaudioModeExtensionLookup[$_POST['layer']][$_POST['modeextension']]; // J - Mode extension (Only if Joint stereo) } else { die('Invalid <B>Mode Extension</B>'); } $headerbitstream .= (($_POST['copyright'] == 'Y') ? '1' : '0'); // K - Copyright $headerbitstream .= (($_POST['original'] == 'Y') ? '1' : '0'); // L - Original $MPEGaudioEmphasisLookup = array('none'=>'00', '50/15ms'=>'01', 'CCIT J.17'=>'11'); if (isset($MPEGaudioEmphasisLookup[$_POST['emphasis']])) { $headerbitstream .= $MPEGaudioEmphasisLookup[$_POST['emphasis']]; // M - Emphasis } else { die('Invalid <B>Emphasis</B>'); } echo strtoupper(str_pad(dechex(bindec(substr($headerbitstream, 0, 8))), 2, '0', STR_PAD_LEFT)).' '; echo strtoupper(str_pad(dechex(bindec(substr($headerbitstream, 8, 8))), 2, '0', STR_PAD_LEFT)).' '; echo strtoupper(str_pad(dechex(bindec(substr($headerbitstream, 16, 8))), 2, '0', STR_PAD_LEFT)).' '; echo strtoupper(str_pad(dechex(bindec(substr($headerbitstream, 24, 8))), 2, '0', STR_PAD_LEFT)).'<BR>'; } function MPEGaudioVersionLookup($rawversion) { $MPEGaudioVersionLookup = array('2.5', FALSE, '2', '1'); return (isset($MPEGaudioVersionLookup["$rawversion"]) ? $MPEGaudioVersionLookup["$rawversion"] : FALSE); } function MPEGaudioLayerLookup($rawlayer) { $MPEGaudioLayerLookup = array(FALSE, 'III', 'II', 'I'); return (isset($MPEGaudioLayerLookup["$rawlayer"]) ? $MPEGaudioLayerLookup["$rawlayer"] : FALSE); } function MPEGaudioBitrateLookup($version, $layer, $rawbitrate) { static $MPEGaudioBitrateLookup; if (empty($MPEGaudioBitrateLookup)) { $MPEGaudioBitrateLookup = MPEGaudioBitrateArray(); } return (isset($MPEGaudioBitrateLookup["$version"]["$layer"]["$rawbitrate"]) ? $MPEGaudioBitrateLookup["$version"]["$layer"]["$rawbitrate"] : FALSE); } function MPEGaudioFrequencyLookup($version, $rawfrequency) { static $MPEGaudioFrequencyLookup; if (empty($MPEGaudioFrequencyLookup)) { $MPEGaudioFrequencyLookup = MPEGaudioFrequencyArray(); } return (isset($MPEGaudioFrequencyLookup["$version"]["$rawfrequency"]) ? $MPEGaudioFrequencyLookup["$version"]["$rawfrequency"] : FALSE); } function MPEGaudioChannelModeLookup($rawchannelmode) { $MPEGaudioChannelModeLookup = array('stereo', 'joint stereo', 'dual channel', 'mono'); return (isset($MPEGaudioChannelModeLookup["$rawchannelmode"]) ? $MPEGaudioChannelModeLookup["$rawchannelmode"] : FALSE); } function MPEGaudioModeExtensionLookup($layer, $rawmodeextension) { $MPEGaudioModeExtensionLookup['I'] = array('4-31', '8-31', '12-31', '16-31'); $MPEGaudioModeExtensionLookup['II'] = array('4-31', '8-31', '12-31', '16-31'); $MPEGaudioModeExtensionLookup['III'] = array('', 'IS', 'MS', 'IS+MS'); return (isset($MPEGaudioModeExtensionLookup["$layer"]["$rawmodeextension"]) ? $MPEGaudioModeExtensionLookup["$layer"]["$rawmodeextension"] : FALSE); } function MPEGaudioEmphasisLookup($rawemphasis) { $MPEGaudioEmphasisLookup = array('none', '50/15ms', FALSE, 'CCIT J.17'); return (isset($MPEGaudioEmphasisLookup["$rawemphasis"]) ? $MPEGaudioEmphasisLookup["$rawemphasis"] : FALSE); } function MPEGaudioCRCLookup($CRCbit) { // inverse boolean cast :) if ($CRCbit == '0') { return TRUE; } else { return FALSE; } } ///////////////////////////////////////////////////////////////// /// getID3() by James Heinrich <info@getid3.org> // // available at http://getid3.sourceforge.net /// // or http://www.getid3.org /// ///////////////////////////////////////////////////////////////// // // // getid3.mp3.php - part of getID3() // // See getid3.readme.txt for more details // // // ///////////////////////////////////////////////////////////////// // number of frames to scan to determine if MPEG-audio sequence is valid // Lower this number to 5-20 for faster scanning // Increase this number to 50+ for most accurate detection of valid VBR/CBR // mpeg-audio streams define('MPEG_VALID_CHECK_FRAMES', 35); function getMP3headerFilepointer(&$fd, &$ThisFileInfo) { getOnlyMPEGaudioInfo($fd, $ThisFileInfo, $ThisFileInfo['avdataoffset']); if (isset($ThisFileInfo['mpeg']['audio']['bitrate_mode'])) { $ThisFileInfo['audio']['bitrate_mode'] = strtolower($ThisFileInfo['mpeg']['audio']['bitrate_mode']); } if (((isset($ThisFileInfo['id3v2']) && ($ThisFileInfo['avdataoffset'] > $ThisFileInfo['id3v2']['headerlength'])) || (!isset($ThisFileInfo['id3v2']) && ($ThisFileInfo['avdataoffset'] > 0)))) { $ThisFileInfo['warning'] .= "\n".'Unknown data before synch '; if (isset($ThisFileInfo['id3v2']['headerlength'])) { $ThisFileInfo['warning'] .= '(ID3v2 header ends at '.$ThisFileInfo['id3v2']['headerlength'].', then '.($ThisFileInfo['avdataoffset'] - $ThisFileInfo['id3v2']['headerlength']).' bytes garbage, '; } else { $ThisFileInfo['warning'] .= '(should be at beginning of file, '; } $ThisFileInfo['warning'] .= 'synch detected at '.$ThisFileInfo['avdataoffset'].')'; if ($ThisFileInfo['audio']['bitrate_mode'] == 'cbr') { if (!empty($ThisFileInfo['id3v2']['headerlength']) && (($ThisFileInfo['avdataoffset'] - $ThisFileInfo['id3v2']['headerlength']) == $ThisFileInfo['mpeg']['audio']['framelength'])) { $ThisFileInfo['warning'] .= '. This is a known problem with some versions of LAME (3.91, 3.92) DLL in CBR mode.'; $ThisFileInfo['audio']['codec'] = 'LAME'; } elseif (empty($ThisFileInfo['id3v2']['headerlength']) && ($ThisFileInfo['avdataoffset'] == $ThisFileInfo['mpeg']['audio']['framelength'])) { $ThisFileInfo['warning'] .= '. This is a known problem with some versions of LAME (3.91, 3.92) DLL in CBR mode.'; $ThisFileInfo['audio']['codec'] = 'LAME'; } } } if (isset($ThisFileInfo['mpeg']['audio']['layer']) && ($ThisFileInfo['mpeg']['audio']['layer'] == 'II')) { $ThisFileInfo['audio']['dataformat'] = 'mp2'; } elseif (isset($ThisFileInfo['mpeg']['audio']['layer']) && ($ThisFileInfo['mpeg']['audio']['layer'] == 'I')) { $ThisFileInfo['audio']['dataformat'] = 'mp1'; } if ($ThisFileInfo['fileformat'] == 'mp3') { switch ($ThisFileInfo['audio']['dataformat']) { case 'mp1': case 'mp2': case 'mp3': $ThisFileInfo['fileformat'] = $ThisFileInfo['audio']['dataformat']; break; default: $ThisFileInfo['warning'] .= "\n".'Expecting [audio][dataformat] to be mp1/mp2/mp3 when fileformat == mp3, [audio][dataformat] actually "'.$ThisFileInfo['audio']['dataformat'].'"'; break; } } if (empty($ThisFileInfo['fileformat'])) { $ThisFileInfo['error'] .= "\n".'Synch not found'; unset($ThisFileInfo['fileformat']); unset($ThisFileInfo['audio']['bitrate_mode']); unset($ThisFileInfo['avdataoffset']); unset($ThisFileInfo['avdataend']); return false; } $ThisFileInfo['mime_type'] = 'audio/mpeg'; $ThisFileInfo['audio']['lossless'] = false; // Calculate playtime if (!isset($ThisFileInfo['playtime_seconds']) && isset($ThisFileInfo['audio']['bitrate']) && ($ThisFileInfo['audio']['bitrate'] > 0)) { $ThisFileInfo['playtime_seconds'] = ($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset']) * 8 / $ThisFileInfo['audio']['bitrate']; } if (isset($ThisFileInfo['mpeg']['audio']['LAME'])) { $ThisFileInfo['audio']['codec'] = 'LAME'; if (!empty($ThisFileInfo['mpeg']['audio']['LAME']['long_version'])) { $ThisFileInfo['audio']['encoder'] = trim($ThisFileInfo['mpeg']['audio']['LAME']['long_version']); } } return true; } function decodeMPEGaudioHeader($fd, $offset, &$ThisFileInfo, $recursivesearch=true, $ScanAsCBR=false, $FastMPEGheaderScan=false) { static $MPEGaudioVersionLookup; static $MPEGaudioLayerLookup; static $MPEGaudioBitrateLookup; static $MPEGaudioFrequencyLookup; static $MPEGaudioChannelModeLookup; static $MPEGaudioModeExtensionLookup; static $MPEGaudioEmphasisLookup; if (empty($MPEGaudioVersionLookup)) { $MPEGaudioVersionLookup = MPEGaudioVersionArray(); $MPEGaudioLayerLookup = MPEGaudioLayerArray(); $MPEGaudioBitrateLookup = MPEGaudioBitrateArray(); $MPEGaudioFrequencyLookup = MPEGaudioFrequencyArray(); $MPEGaudioChannelModeLookup = MPEGaudioChannelModeArray(); $MPEGaudioModeExtensionLookup = MPEGaudioModeExtensionArray(); $MPEGaudioEmphasisLookup = MPEGaudioEmphasisArray(); } if ($offset >= $ThisFileInfo['avdataend']) { $ThisFileInfo['error'] .= "\n".'end of file encounter looking for MPEG synch'; return false; } fseek($fd, $offset, SEEK_SET); $headerstring = fread($fd, 1441); // worse-case max length = 32kHz @ 320kbps layer 3 = 1441 bytes/frame // MP3 audio frame structure: // $aa $aa $aa $aa [$bb $bb] $cc... // where $aa..$aa is the four-byte mpeg-audio header (below) // $bb $bb is the optional 2-byte CRC // and $cc... is the audio data $head4 = substr($headerstring, 0, 4); static $MPEGaudioHeaderDecodeCache = array(); if (isset($MPEGaudioHeaderDecodeCache[$head4])) { $MPEGheaderRawArray = $MPEGaudioHeaderDecodeCache[$head4]; } else { $MPEGheaderRawArray = MPEGaudioHeaderDecode($head4); $MPEGaudioHeaderDecodeCache[$head4] = $MPEGheaderRawArray; } static $MPEGaudioHeaderValidCache = array(); // Not in cache if (!isset($MPEGaudioHeaderValidCache[$head4])) { $MPEGaudioHeaderValidCache[$head4] = MPEGaudioHeaderValid($MPEGheaderRawArray); } if ($MPEGaudioHeaderValidCache[$head4]) { $ThisFileInfo['mpeg']['audio']['raw'] = $MPEGheaderRawArray; } else { $ThisFileInfo['error'] .= "\n".'Invalid MPEG audio header at offset '.$offset; return false; } if (!$FastMPEGheaderScan) { $ThisFileInfo['mpeg']['audio']['version'] = $MPEGaudioVersionLookup[$ThisFileInfo['mpeg']['audio']['raw']['version']]; $ThisFileInfo['mpeg']['audio']['layer'] = $MPEGaudioLayerLookup[$ThisFileInfo['mpeg']['audio']['raw']['layer']]; $ThisFileInfo['mpeg']['audio']['channelmode'] = $MPEGaudioChannelModeLookup[$ThisFileInfo['mpeg']['audio']['raw']['channelmode']]; $ThisFileInfo['mpeg']['audio']['channels'] = (($ThisFileInfo['mpeg']['audio']['channelmode'] == 'mono') ? 1 : 2); $ThisFileInfo['mpeg']['audio']['sample_rate'] = $MPEGaudioFrequencyLookup[$ThisFileInfo['mpeg']['audio']['version']][$ThisFileInfo['mpeg']['audio']['raw']['sample_rate']]; $ThisFileInfo['mpeg']['audio']['protection'] = !$ThisFileInfo['mpeg']['audio']['raw']['protection']; $ThisFileInfo['mpeg']['audio']['private'] = (bool) $ThisFileInfo['mpeg']['audio']['raw']['private']; $ThisFileInfo['mpeg']['audio']['modeextension'] = $MPEGaudioModeExtensionLookup[$ThisFileInfo['mpeg']['audio']['layer']][$ThisFileInfo['mpeg']['audio']['raw']['modeextension']]; $ThisFileInfo['mpeg']['audio']['copyright'] = (bool) $ThisFileInfo['mpeg']['audio']['raw']['copyright']; $ThisFileInfo['mpeg']['audio']['original'] = (bool) $ThisFileInfo['mpeg']['audio']['raw']['original']; $ThisFileInfo['mpeg']['audio']['emphasis'] = $MPEGaudioEmphasisLookup[$ThisFileInfo['mpeg']['audio']['raw']['emphasis']]; $ThisFileInfo['audio']['channels'] = $ThisFileInfo['mpeg']['audio']['channels']; $ThisFileInfo['audio']['sample_rate'] = $ThisFileInfo['mpeg']['audio']['sample_rate']; if ($ThisFileInfo['mpeg']['audio']['protection']) { $ThisFileInfo['mpeg']['audio']['crc'] = BigEndian2Int(substr($headerstring, 4, 2)); } } if ($ThisFileInfo['mpeg']['audio']['raw']['bitrate'] == 15) { // http://www.hydrogenaudio.org/?act=ST&f=16&t=9682&st=0 $ThisFileInfo['warning'] .= "\n".'Invalid bitrate index (15), this is a known bug in free-format MP3s encoded by LAME v3.90 - 3.93.1'; $ThisFileInfo['mpeg']['audio']['raw']['bitrate'] = 0; } $ThisFileInfo['mpeg']['audio']['padding'] = (bool) $ThisFileInfo['mpeg']['audio']['raw']['padding']; $ThisFileInfo['mpeg']['audio']['bitrate'] = $MPEGaudioBitrateLookup[$ThisFileInfo['mpeg']['audio']['version']][$ThisFileInfo['mpeg']['audio']['layer']][$ThisFileInfo['mpeg']['audio']['raw']['bitrate']]; if (($ThisFileInfo['mpeg']['audio']['bitrate'] == 'free') && ($offset == $ThisFileInfo['avdataoffset'])) { // only skip multiple frame check if free-format bitstream found at beginning of file // otherwise is quite possibly simply corrupted data $recursivesearch = false; } // For Layer II there are some combinations of bitrate and mode which are not allowed. if (!$FastMPEGheaderScan && ($ThisFileInfo['mpeg']['audio']['layer'] == 'II')) { $ThisFileInfo['audio']['dataformat'] = 'mp2'; switch ($ThisFileInfo['mpeg']['audio']['channelmode']) { case 'mono': if (($ThisFileInfo['mpeg']['audio']['bitrate'] == 'free') || ($ThisFileInfo['mpeg']['audio']['bitrate'] <= 192)) { // these are ok } else { $ThisFileInfo['error'] .= "\n".$ThisFileInfo['mpeg']['audio']['bitrate'].'kbps not allowed in Layer II, '.$ThisFileInfo['mpeg']['audio']['channelmode'].'.'; return false; } break; case 'stereo': case 'joint stereo': case 'dual channel': if (($ThisFileInfo['mpeg']['audio']['bitrate'] == 'free') || ($ThisFileInfo['mpeg']['audio']['bitrate'] == 64) || ($ThisFileInfo['mpeg']['audio']['bitrate'] >= 96)) { // these are ok } else { $ThisFileInfo['error'] .= "\n".$ThisFileInfo['mpeg']['audio']['bitrate'].'kbps not allowed in Layer II, '.$ThisFileInfo['mpeg']['audio']['channelmode'].'.'; return false; } break; } } if ($ThisFileInfo['audio']['sample_rate'] > 0) { $ThisFileInfo['mpeg']['audio']['framelength'] = MPEGaudioFrameLength($ThisFileInfo['mpeg']['audio']['bitrate'], $ThisFileInfo['mpeg']['audio']['version'], $ThisFileInfo['mpeg']['audio']['layer'], (int) $ThisFileInfo['mpeg']['audio']['padding'], $ThisFileInfo['audio']['sample_rate']); } if ($ThisFileInfo['mpeg']['audio']['bitrate'] != 'free') { $ThisFileInfo['audio']['bitrate'] = 1000 * $ThisFileInfo['mpeg']['audio']['bitrate']; if (isset($ThisFileInfo['mpeg']['audio']['framelength'])) { $nextframetestoffset = $offset + $ThisFileInfo['mpeg']['audio']['framelength']; } else { $ThisFileInfo['error'] .= "\n".'Frame at offset('.$offset.') is has an invalid frame length.'; return false; } } $ExpectedNumberOfAudioBytes = 0; //////////////////////////////////////////////////////////////////////////////////// // Variable-bitrate headers if (substr($headerstring, 4 + 32, 4) == 'VBRI') { // Fraunhofer VBR header is hardcoded 'VBRI' at offset 0x24 (36) // specs taken from http://minnie.tuhs.org/pipermail/mp3encoder/2001-January/001800.html $ThisFileInfo['mpeg']['audio']['bitrate_mode'] = 'vbr'; $ThisFileInfo['mpeg']['audio']['VBR_method'] = 'Fraunhofer'; $ThisFileInfo['audio']['codec'] = 'Fraunhofer'; $SideInfoData = substr($headerstring, 4 + 2, 32); $FraunhoferVBROffset = 36; $ThisFileInfo['mpeg']['audio']['VBR_encoder_version'] = BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 4, 2)); $ThisFileInfo['mpeg']['audio']['VBR_encoder_delay'] = BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 6, 2)); $ThisFileInfo['mpeg']['audio']['VBR_quality'] = BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 8, 2)); $ThisFileInfo['mpeg']['audio']['VBR_bytes'] = BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 10, 4)); $ThisFileInfo['mpeg']['audio']['VBR_frames'] = BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 14, 4)); $ThisFileInfo['mpeg']['audio']['VBR_seek_offsets'] = BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 18, 2)); //$ThisFileInfo['mpeg']['audio']['reserved'] = BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 20, 4)); // hardcoded $00 $01 $00 $02 - purpose unknown $ThisFileInfo['mpeg']['audio']['VBR_seek_offsets_stride'] = BigEndian2Int(substr($headerstring, $FraunhoferVBROffset + 24, 2)); $ExpectedNumberOfAudioBytes = $ThisFileInfo['mpeg']['audio']['VBR_bytes']; $previousbyteoffset = $offset; for ($i = 0; $i < $ThisFileInfo['mpeg']['audio']['VBR_seek_offsets']; $i++) { $Fraunhofer_OffsetN = BigEndian2Int(substr($headerstring, $FraunhoferVBROffset, 2)); $FraunhoferVBROffset += 2; $ThisFileInfo['mpeg']['audio']['VBR_offsets_relative'][$i] = $Fraunhofer_OffsetN; $ThisFileInfo['mpeg']['audio']['VBR_offsets_absolute'][$i] = $Fraunhofer_OffsetN + $previousbyteoffset; $previousbyteoffset += $Fraunhofer_OffsetN; } } else { // Xing VBR header is hardcoded 'Xing' at a offset 0x0D (13), 0x15 (21) or 0x24 (36) // depending on MPEG layer and number of channels if ($ThisFileInfo['mpeg']['audio']['version'] == '1') { if ($ThisFileInfo['mpeg']['audio']['channelmode'] == 'mono') { // MPEG-1 (mono) $VBRidOffset = 4 + 17; // 0x15 $SideInfoData = substr($headerstring, 4 + 2, 17); } else { // MPEG-1 (stereo, joint-stereo, dual-channel) $VBRidOffset = 4 + 32; // 0x24 $SideInfoData = substr($headerstring, 4 + 2, 32); } } else { // 2 or 2.5 if ($ThisFileInfo['mpeg']['audio']['channelmode'] == 'mono') { // MPEG-2, MPEG-2.5 (mono) $VBRidOffset = 4 + 9; // 0x0D $SideInfoData = substr($headerstring, 4 + 2, 9); } else { // MPEG-2, MPEG-2.5 (stereo, joint-stereo, dual-channel) $VBRidOffset = 4 + 17; // 0x15 $SideInfoData = substr($headerstring, 4 + 2, 17); } } if ((substr($headerstring, $VBRidOffset, strlen('Xing')) == 'Xing') || (substr($headerstring, $VBRidOffset, strlen('Info')) == 'Info')) { // 'Xing' is traditional Xing VBR frame // 'Info' is LAME-encoded CBR (This was done to avoid CBR files to be recognized as traditional Xing VBR files by some decoders.) $ThisFileInfo['mpeg']['audio']['bitrate_mode'] = 'vbr'; $ThisFileInfo['mpeg']['audio']['VBR_method'] = 'Xing'; $ThisFileInfo['mpeg']['audio']['xing_flags_raw'] = BigEndian2Int(substr($headerstring, $VBRidOffset + 4, 4)); $ThisFileInfo['mpeg']['audio']['xing_flags']['frames'] = (bool) ($ThisFileInfo['mpeg']['audio']['xing_flags_raw'] & 0x00000001); $ThisFileInfo['mpeg']['audio']['xing_flags']['bytes'] = (bool) ($ThisFileInfo['mpeg']['audio']['xing_flags_raw'] & 0x00000002); $ThisFileInfo['mpeg']['audio']['xing_flags']['toc'] = (bool) ($ThisFileInfo['mpeg']['audio']['xing_flags_raw'] & 0x00000004); $ThisFileInfo['mpeg']['audio']['xing_flags']['vbr_scale'] = (bool) ($ThisFileInfo['mpeg']['audio']['xing_flags_raw'] & 0x00000008); if ($ThisFileInfo['mpeg']['audio']['xing_flags']['frames']) { $ThisFileInfo['mpeg']['audio']['VBR_frames'] = BigEndian2Int(substr($headerstring, $VBRidOffset + 8, 4)); } if ($ThisFileInfo['mpeg']['audio']['xing_flags']['bytes']) { $ThisFileInfo['mpeg']['audio']['VBR_bytes'] = BigEndian2Int(substr($headerstring, $VBRidOffset + 12, 4)); } if (($ThisFileInfo['mpeg']['audio']['bitrate'] == 'free') && !empty($ThisFileInfo['mpeg']['audio']['VBR_frames']) && !empty($ThisFileInfo['mpeg']['audio']['VBR_bytes'])) { $framelengthfloat = $ThisFileInfo['mpeg']['audio']['VBR_bytes'] / $ThisFileInfo['mpeg']['audio']['VBR_frames']; if ($ThisFileInfo['mpeg']['audio']['layer'] == 'I') { // BitRate = (((FrameLengthInBytes / 4) - Padding) * SampleRate) / 12 $ThisFileInfo['audio']['bitrate'] = ((($framelengthfloat / 4) - intval($ThisFileInfo['mpeg']['audio']['padding'])) * $ThisFileInfo['mpeg']['audio']['sample_rate']) / 12; } else { // Bitrate = ((FrameLengthInBytes - Padding) * SampleRate) / 144 $ThisFileInfo['audio']['bitrate'] = (($framelengthfloat - intval($ThisFileInfo['mpeg']['audio']['padding'])) * $ThisFileInfo['mpeg']['audio']['sample_rate']) / 144; } $ThisFileInfo['mpeg']['audio']['framelength'] = floor($framelengthfloat); } if ($ThisFileInfo['mpeg']['audio']['xing_flags']['toc']) { $LAMEtocData = substr($headerstring, $VBRidOffset + 16, 100); for ($i = 0; $i < 100; $i++) { $ThisFileInfo['mpeg']['audio']['toc'][$i] = ord($LAMEtocData{$i}); } } if ($ThisFileInfo['mpeg']['audio']['xing_flags']['vbr_scale']) { $ThisFileInfo['mpeg']['audio']['VBR_scale'] = BigEndian2Int(substr($headerstring, $VBRidOffset + 116, 4)); } // http://gabriel.mp3-tech.org/mp3infotag.html if (substr($headerstring, $VBRidOffset + 120, 4) == 'LAME') { $ThisFileInfo['mpeg']['audio']['LAME']['long_version'] = substr($headerstring, $VBRidOffset + 120, 20); $ThisFileInfo['mpeg']['audio']['LAME']['short_version'] = substr($ThisFileInfo['mpeg']['audio']['LAME']['long_version'], 0, 9); $ThisFileInfo['mpeg']['audio']['LAME']['long_version'] = rtrim($ThisFileInfo['mpeg']['audio']['LAME']['long_version'], "\x55\xAA"); if ($ThisFileInfo['mpeg']['audio']['LAME']['short_version'] >= 'LAME3.90.') { // It the LAME tag was only introduced in LAME v3.90 // http://www.hydrogenaudio.org/?act=ST&f=15&t=9933 // Offsets of various bytes in http://gabriel.mp3-tech.org/mp3infotag.html // are assuming a 'Xing' identifier offset of 0x24, which is the case for // MPEG-1 non-mono, but not for other combinations $LAMEtagOffsetContant = $VBRidOffset - 0x24; // byte $9B VBR Quality // This field is there to indicate a quality level, although the scale was not precised in the original Xing specifications. // Actually overwrites original Xing bytes unset($ThisFileInfo['mpeg']['audio']['VBR_scale']); $ThisFileInfo['mpeg']['audio']['LAME']['vbr_quality'] = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0x9B, 1)); // bytes $9C-$A4 Encoder short VersionString $ThisFileInfo['mpeg']['audio']['LAME']['short_version'] = substr($headerstring, $LAMEtagOffsetContant + 0x9C, 9); $ThisFileInfo['mpeg']['audio']['LAME']['long_version'] = $ThisFileInfo['mpeg']['audio']['LAME']['short_version']; // byte $A5 Info Tag revision + VBR method $LAMEtagRevisionVBRmethod = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xA5, 1)); $ThisFileInfo['mpeg']['audio']['LAME']['tag_revision'] = ($LAMEtagRevisionVBRmethod & 0xF0) >> 4; $ThisFileInfo['mpeg']['audio']['LAME']['raw']['vbr_method'] = $LAMEtagRevisionVBRmethod & 0x0F; $ThisFileInfo['mpeg']['audio']['LAME']['vbr_method'] = LAMEvbrMethodLookup($ThisFileInfo['mpeg']['audio']['LAME']['raw']['vbr_method']); // byte $A6 Lowpass filter value $ThisFileInfo['mpeg']['audio']['LAME']['lowpass_frequency'] = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xA6, 1)) * 100; // bytes $A7-$AE Replay Gain // http://privatewww.essex.ac.uk/~djmrob/replaygain/rg_data_format.html // bytes $A7-$AA : 32 bit floating point "Peak signal amplitude" $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['peak_amplitude'] = BigEndian2Float(substr($headerstring, $LAMEtagOffsetContant + 0xA7, 4)); $ThisFileInfo['mpeg']['audio']['LAME']['raw']['RGAD_radio'] = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xAB, 2)); $ThisFileInfo['mpeg']['audio']['LAME']['raw']['RGAD_audiophile'] = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xAD, 2)); if ($ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['peak_amplitude'] == 0) { $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['peak_amplitude'] = false; } if ($ThisFileInfo['mpeg']['audio']['LAME']['raw']['RGAD_radio'] != 0) { require_once(GETID3_INCLUDEPATH.'getid3.rgad.php'); $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['radio']['raw']['name'] = ($ThisFileInfo['mpeg']['audio']['LAME']['raw']['RGAD_radio'] & 0xE000) >> 13; $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['radio']['raw']['originator'] = ($ThisFileInfo['mpeg']['audio']['LAME']['raw']['RGAD_radio'] & 0x1C00) >> 10; $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['radio']['raw']['sign_bit'] = ($ThisFileInfo['mpeg']['audio']['LAME']['raw']['RGAD_radio'] & 0x0200) >> 9; $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['radio']['raw']['gain_adjust'] = $ThisFileInfo['mpeg']['audio']['LAME']['raw']['RGAD_radio'] & 0x01FF; $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['radio']['name'] = RGADnameLookup($ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['radio']['raw']['name']); $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['radio']['originator'] = RGADoriginatorLookup($ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['radio']['raw']['originator']); $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['radio']['gain_db'] = RGADadjustmentLookup($ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['radio']['raw']['gain_adjust'], $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['radio']['raw']['sign_bit']); if ($ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['peak_amplitude'] !== false) { $ThisFileInfo['replay_gain']['radio']['peak'] = $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['peak_amplitude']; } $ThisFileInfo['replay_gain']['radio']['originator'] = $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['radio']['originator']; $ThisFileInfo['replay_gain']['radio']['adjustment'] = $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['radio']['gain_db']; } if ($ThisFileInfo['mpeg']['audio']['LAME']['raw']['RGAD_audiophile'] != 0) { require_once(GETID3_INCLUDEPATH.'getid3.rgad.php'); $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['audiophile']['raw']['name'] = ($ThisFileInfo['mpeg']['audio']['LAME']['raw']['RGAD_audiophile'] & 0xE000) >> 13; $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['audiophile']['raw']['originator'] = ($ThisFileInfo['mpeg']['audio']['LAME']['raw']['RGAD_audiophile'] & 0x1C00) >> 10; $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['audiophile']['raw']['sign_bit'] = ($ThisFileInfo['mpeg']['audio']['LAME']['raw']['RGAD_audiophile'] & 0x0200) >> 9; $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['audiophile']['raw']['gain_adjust'] = $ThisFileInfo['mpeg']['audio']['LAME']['raw']['RGAD_audiophile'] & 0x01FF; $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['audiophile']['name'] = RGADnameLookup($ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['audiophile']['raw']['name']); $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['audiophile']['originator'] = RGADoriginatorLookup($ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['audiophile']['raw']['originator']); $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['audiophile']['gain_db'] = RGADadjustmentLookup($ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['audiophile']['raw']['gain_adjust'], $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['audiophile']['raw']['sign_bit']); if ($ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['peak_amplitude'] !== false) { $ThisFileInfo['replay_gain']['audiophile']['peak'] = $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['peak_amplitude']; } $ThisFileInfo['replay_gain']['audiophile']['originator'] = $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['audiophile']['originator']; $ThisFileInfo['replay_gain']['audiophile']['adjustment'] = $ThisFileInfo['mpeg']['audio']['LAME']['RGAD']['audiophile']['gain_db']; } // byte $AF Encoding flags + ATH Type $EncodingFlagsATHtype = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xAF, 1)); $ThisFileInfo['mpeg']['audio']['LAME']['encoding_flags']['nspsytune'] = (bool) ($EncodingFlagsATHtype & 0x10); $ThisFileInfo['mpeg']['audio']['LAME']['encoding_flags']['nssafejoint'] = (bool) ($EncodingFlagsATHtype & 0x20); $ThisFileInfo['mpeg']['audio']['LAME']['encoding_flags']['nogap_next'] = (bool) ($EncodingFlagsATHtype & 0x40); $ThisFileInfo['mpeg']['audio']['LAME']['encoding_flags']['nogap_prev'] = (bool) ($EncodingFlagsATHtype & 0x80); $ThisFileInfo['mpeg']['audio']['LAME']['ath_type'] = $EncodingFlagsATHtype & 0x0F; // byte $B0 if ABR {specified bitrate} else {minimal bitrate} $ABRbitrateMinBitrate = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB0, 1)); if ($ThisFileInfo['mpeg']['audio']['LAME']['raw']['vbr_method'] == 2) { // Average BitRate (ABR) $ThisFileInfo['mpeg']['audio']['LAME']['bitrate_abr'] = $ABRbitrateMinBitrate; } elseif ($ABRbitrateMinBitrate > 0) { // Variable BitRate (VBR) - minimum bitrate $ThisFileInfo['mpeg']['audio']['LAME']['bitrate_min'] = $ABRbitrateMinBitrate; } // bytes $B1-$B3 Encoder delays $EncoderDelays = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB1, 3)); $ThisFileInfo['mpeg']['audio']['LAME']['encoder_delay'] = ($EncoderDelays & 0xFFF000) >> 12; $ThisFileInfo['mpeg']['audio']['LAME']['end_padding'] = $EncoderDelays & 0x000FFF; // byte $B4 Misc $MiscByte = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB4, 1)); $ThisFileInfo['mpeg']['audio']['LAME']['raw']['noise_shaping'] = ($MiscByte & 0x03); $ThisFileInfo['mpeg']['audio']['LAME']['raw']['stereo_mode'] = ($MiscByte & 0x1C) >> 2; $ThisFileInfo['mpeg']['audio']['LAME']['raw']['not_optimal_quality'] = ($MiscByte & 0x20) >> 5; $ThisFileInfo['mpeg']['audio']['LAME']['raw']['source_sample_freq'] = ($MiscByte & 0xC0) >> 6; $ThisFileInfo['mpeg']['audio']['LAME']['noise_shaping'] = $ThisFileInfo['mpeg']['audio']['LAME']['raw']['noise_shaping']; $ThisFileInfo['mpeg']['audio']['LAME']['stereo_mode'] = LAMEmiscStereoModeLookup($ThisFileInfo['mpeg']['audio']['LAME']['raw']['stereo_mode']); $ThisFileInfo['mpeg']['audio']['LAME']['not_optimal_quality'] = (bool) $ThisFileInfo['mpeg']['audio']['LAME']['raw']['not_optimal_quality']; $ThisFileInfo['mpeg']['audio']['LAME']['source_sample_freq'] = LAMEmiscSourceSampleFrequencyLookup($ThisFileInfo['mpeg']['audio']['LAME']['raw']['source_sample_freq']); // byte $B5 MP3 Gain $ThisFileInfo['mpeg']['audio']['LAME']['raw']['mp3_gain'] = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB5, 1), false, true); $ThisFileInfo['mpeg']['audio']['LAME']['mp3_gain_db'] = 1.5 * $ThisFileInfo['mpeg']['audio']['LAME']['raw']['mp3_gain']; $ThisFileInfo['mpeg']['audio']['LAME']['mp3_gain_factor'] = pow(2, ($ThisFileInfo['mpeg']['audio']['LAME']['mp3_gain_db'] / 6)); // bytes $B6-$B7 Preset and surround info $PresetSurroundBytes = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB6, 2)); // Reserved = ($PresetSurroundBytes & 0xC000); $ThisFileInfo['mpeg']['audio']['LAME']['raw']['surround_info'] = ($PresetSurroundBytes & 0x3800); $ThisFileInfo['mpeg']['audio']['LAME']['surround_info'] = LAMEsurroundInfoLookup($ThisFileInfo['mpeg']['audio']['LAME']['raw']['surround_info']); $ThisFileInfo['mpeg']['audio']['LAME']['preset_used_id'] = ($PresetSurroundBytes & 0x07FF); // bytes $B8-$BB MusicLength $ThisFileInfo['mpeg']['audio']['LAME']['audio_bytes'] = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xB8, 4)); $ExpectedNumberOfAudioBytes = (($ThisFileInfo['mpeg']['audio']['LAME']['audio_bytes'] > 0) ? $ThisFileInfo['mpeg']['audio']['LAME']['audio_bytes'] : $ThisFileInfo['mpeg']['audio']['VBR_bytes']); // bytes $BC-$BD MusicCRC $ThisFileInfo['mpeg']['audio']['LAME']['music_crc'] = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xBC, 2)); // bytes $BE-$BF CRC-16 of Info Tag $ThisFileInfo['mpeg']['audio']['LAME']['lame_tag_crc'] = BigEndian2Int(substr($headerstring, $LAMEtagOffsetContant + 0xBE, 2)); // LAME CBR if ($ThisFileInfo['mpeg']['audio']['LAME']['raw']['vbr_method'] == 1) { $ThisFileInfo['mpeg']['audio']['bitrate_mode'] = 'cbr'; if (empty($ThisFileInfo['mpeg']['audio']['bitrate']) || ($ThisFileInfo['mpeg']['audio']['LAME']['bitrate_min'] != 255)) { $ThisFileInfo['mpeg']['audio']['bitrate'] = $ThisFileInfo['mpeg']['audio']['LAME']['bitrate_min']; } } } } } else { // not Fraunhofer or Xing VBR methods, most likely CBR (but could be VBR with no header) $ThisFileInfo['mpeg']['audio']['bitrate_mode'] = 'cbr'; if ($recursivesearch) { $ThisFileInfo['mpeg']['audio']['bitrate_mode'] = 'vbr'; if (RecursiveFrameScanning($fd, $ThisFileInfo, $offset, $nextframetestoffset, true)) { $recursivesearch = false; $ThisFileInfo['mpeg']['audio']['bitrate_mode'] = 'cbr'; } if ($ThisFileInfo['mpeg']['audio']['bitrate_mode'] == 'vbr') { $ThisFileInfo['warning'] .= "\n".'VBR file with no VBR header. Bitrate values calculated from actual frame bitrates.'; } } } } if (($ExpectedNumberOfAudioBytes > 0) && ($ExpectedNumberOfAudioBytes != ($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset']))) { if (($ExpectedNumberOfAudioBytes - ($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset'])) == 1) { $ThisFileInfo['warning'] .= "\n".'Last byte of data truncated (this is a known bug in Meracl ID3 Tag Writer before v1.3.5)'; } elseif ($ExpectedNumberOfAudioBytes > ($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset'])) { $ThisFileInfo['warning'] .= "\n".'Probable truncated file: expecting '.$ExpectedNumberOfAudioBytes.' bytes of audio data, only found '.($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset']).' (short by '.($ExpectedNumberOfAudioBytes - ($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset'])).' bytes)'; } else { $ThisFileInfo['warning'] .= "\n".'Too much data in file: expecting '.$ExpectedNumberOfAudioBytes.' bytes of audio data, found '.($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset']).' ('.(($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset']) - $ExpectedNumberOfAudioBytes).' bytes too many)'; } } if (($ThisFileInfo['mpeg']['audio']['bitrate'] == 'free') && empty($ThisFileInfo['audio']['bitrate'])) { if (($offset == $ThisFileInfo['avdataoffset']) && empty($ThisFileInfo['mpeg']['audio']['VBR_frames'])) { $framebytelength = FreeFormatFrameLength($fd, $offset, $ThisFileInfo, true); if ($framebytelength > 0) { $ThisFileInfo['mpeg']['audio']['framelength'] = $framebytelength; if ($ThisFileInfo['mpeg']['audio']['layer'] == 'I') { // BitRate = (((FrameLengthInBytes / 4) - Padding) * SampleRate) / 12 $ThisFileInfo['audio']['bitrate'] = ((($framebytelength / 4) - intval($ThisFileInfo['mpeg']['audio']['padding'])) * $ThisFileInfo['mpeg']['audio']['sample_rate']) / 12; } else { // Bitrate = ((FrameLengthInBytes - Padding) * SampleRate) / 144 $ThisFileInfo['audio']['bitrate'] = (($framebytelength - intval($ThisFileInfo['mpeg']['audio']['padding'])) * $ThisFileInfo['mpeg']['audio']['sample_rate']) / 144; } } else { $ThisFileInfo['error'] .= "\n".'Error calculating frame length of free-format MP3 without Xing/LAME header'; } } } if (($ThisFileInfo['mpeg']['audio']['bitrate_mode'] == 'vbr') && isset($ThisFileInfo['mpeg']['audio']['VBR_frames']) && ($ThisFileInfo['mpeg']['audio']['VBR_frames'] > 1)) { $ThisFileInfo['mpeg']['audio']['VBR_frames']--; // don't count the Xing / VBRI frame if (($ThisFileInfo['mpeg']['audio']['version'] == '1') && ($ThisFileInfo['mpeg']['audio']['layer'] == 'I')) { $ThisFileInfo['mpeg']['audio']['VBR_bitrate'] = ((($ThisFileInfo['mpeg']['audio']['VBR_bytes'] / $ThisFileInfo['mpeg']['audio']['VBR_frames']) * 8) * ($ThisFileInfo['audio']['sample_rate'] / 384)) / 1000; } elseif ((($ThisFileInfo['mpeg']['audio']['version'] == '2') || ($ThisFileInfo['mpeg']['audio']['version'] == '2.5')) && ($ThisFileInfo['mpeg']['audio']['layer'] == 'III')) { $ThisFileInfo['mpeg']['audio']['VBR_bitrate'] = ((($ThisFileInfo['mpeg']['audio']['VBR_bytes'] / $ThisFileInfo['mpeg']['audio']['VBR_frames']) * 8) * ($ThisFileInfo['audio']['sample_rate'] / 576)) / 1000; } else { $ThisFileInfo['mpeg']['audio']['VBR_bitrate'] = ((($ThisFileInfo['mpeg']['audio']['VBR_bytes'] / $ThisFileInfo['mpeg']['audio']['VBR_frames']) * 8) * ($ThisFileInfo['audio']['sample_rate'] / 1152)) / 1000; } if ($ThisFileInfo['mpeg']['audio']['VBR_bitrate'] > 0) { $ThisFileInfo['audio']['bitrate'] = 1000 * $ThisFileInfo['mpeg']['audio']['VBR_bitrate']; $ThisFileInfo['mpeg']['audio']['bitrate'] = $ThisFileInfo['mpeg']['audio']['VBR_bitrate']; // to avoid confusion } } // End variable-bitrate headers //////////////////////////////////////////////////////////////////////////////////// if ($recursivesearch) { if (!RecursiveFrameScanning($fd, $ThisFileInfo, $offset, $nextframetestoffset, $ScanAsCBR)) { return false; } } //if (false) { // // experimental side info parsing section - not returning anything useful yet // // $SideInfoBitstream = BigEndian2Bin($SideInfoData); // $SideInfoOffset = 0; // // if ($ThisFileInfo['mpeg']['audio']['version'] == '1') { // if ($ThisFileInfo['mpeg']['audio']['channelmode'] == 'mono') { // // MPEG-1 (mono) // $ThisFileInfo['mpeg']['audio']['side_info']['main_data_begin'] = substr($SideInfoBitstream, $SideInfoOffset, 9); // $SideInfoOffset += 9; // $SideInfoOffset += 5; // } else { // // MPEG-1 (stereo, joint-stereo, dual-channel) // $ThisFileInfo['mpeg']['audio']['side_info']['main_data_begin'] = substr($SideInfoBitstream, $SideInfoOffset, 9); // $SideInfoOffset += 9; // $SideInfoOffset += 3; // } // } else { // 2 or 2.5 // if ($ThisFileInfo['mpeg']['audio']['channelmode'] == 'mono') { // // MPEG-2, MPEG-2.5 (mono) // $ThisFileInfo['mpeg']['audio']['side_info']['main_data_begin'] = substr($SideInfoBitstream, $SideInfoOffset, 8); // $SideInfoOffset += 8; // $SideInfoOffset += 1; // } else { // // MPEG-2, MPEG-2.5 (stereo, joint-stereo, dual-channel) // $ThisFileInfo['mpeg']['audio']['side_info']['main_data_begin'] = substr($SideInfoBitstream, $SideInfoOffset, 8); // $SideInfoOffset += 8; // $SideInfoOffset += 2; // } // } // // if ($ThisFileInfo['mpeg']['audio']['version'] == '1') { // for ($channel = 0; $channel < $ThisFileInfo['audio']['channels']; $channel++) { // for ($scfsi_band = 0; $scfsi_band < 4; $scfsi_band++) { // $ThisFileInfo['mpeg']['audio']['scfsi'][$channel][$scfsi_band] = substr($SideInfoBitstream, $SideInfoOffset, 1); // $SideInfoOffset += 2; // } // } // } // for ($granule = 0; $granule < (($ThisFileInfo['mpeg']['audio']['version'] == '1') ? 2 : 1); $granule++) { // for ($channel = 0; $channel < $ThisFileInfo['audio']['channels']; $channel++) { // $ThisFileInfo['mpeg']['audio']['part2_3_length'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 12); // $SideInfoOffset += 12; // $ThisFileInfo['mpeg']['audio']['big_values'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 9); // $SideInfoOffset += 9; // $ThisFileInfo['mpeg']['audio']['global_gain'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 8); // $SideInfoOffset += 8; // if ($ThisFileInfo['mpeg']['audio']['version'] == '1') { // $ThisFileInfo['mpeg']['audio']['scalefac_compress'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 4); // $SideInfoOffset += 4; // } else { // $ThisFileInfo['mpeg']['audio']['scalefac_compress'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 9); // $SideInfoOffset += 9; // } // $ThisFileInfo['mpeg']['audio']['window_switching_flag'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1); // $SideInfoOffset += 1; // // if ($ThisFileInfo['mpeg']['audio']['window_switching_flag'][$granule][$channel] == '1') { // // $ThisFileInfo['mpeg']['audio']['block_type'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 2); // $SideInfoOffset += 2; // $ThisFileInfo['mpeg']['audio']['mixed_block_flag'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1); // $SideInfoOffset += 1; // // for ($region = 0; $region < 2; $region++) { // $ThisFileInfo['mpeg']['audio']['table_select'][$granule][$channel][$region] = substr($SideInfoBitstream, $SideInfoOffset, 5); // $SideInfoOffset += 5; // } // $ThisFileInfo['mpeg']['audio']['table_select'][$granule][$channel][2] = 0; // // for ($window = 0; $window < 3; $window++) { // $ThisFileInfo['mpeg']['audio']['subblock_gain'][$granule][$channel][$window] = substr($SideInfoBitstream, $SideInfoOffset, 3); // $SideInfoOffset += 3; // } // // } else { // // for ($region = 0; $region < 3; $region++) { // $ThisFileInfo['mpeg']['audio']['table_select'][$granule][$channel][$region] = substr($SideInfoBitstream, $SideInfoOffset, 5); // $SideInfoOffset += 5; // } // // $ThisFileInfo['mpeg']['audio']['region0_count'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 4); // $SideInfoOffset += 4; // $ThisFileInfo['mpeg']['audio']['region1_count'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 3); // $SideInfoOffset += 3; // $ThisFileInfo['mpeg']['audio']['block_type'][$granule][$channel] = 0; // } // // if ($ThisFileInfo['mpeg']['audio']['version'] == '1') { // $ThisFileInfo['mpeg']['audio']['preflag'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1); // $SideInfoOffset += 1; // } // $ThisFileInfo['mpeg']['audio']['scalefac_scale'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1); // $SideInfoOffset += 1; // $ThisFileInfo['mpeg']['audio']['count1table_select'][$granule][$channel] = substr($SideInfoBitstream, $SideInfoOffset, 1); // $SideInfoOffset += 1; // } // } //} return true; } function RecursiveFrameScanning(&$fd, &$ThisFileInfo, &$offset, &$nextframetestoffset, $ScanAsCBR) { for ($i = 0; $i < MPEG_VALID_CHECK_FRAMES; $i++) { // check next MPEG_VALID_CHECK_FRAMES frames for validity, to make sure we haven't run across a false synch if (($nextframetestoffset + 4) >= $ThisFileInfo['avdataend']) { // end of file return true; } $nextframetestarray = array('error'=>'', 'warning'=>'', 'avdataend'=>$ThisFileInfo['avdataend'], 'avdataoffset'=>$ThisFileInfo['avdataoffset']); if (decodeMPEGaudioHeader($fd, $nextframetestoffset, $nextframetestarray, false)) { if ($ScanAsCBR) { // force CBR mode, used for trying to pick out invalid audio streams with // valid(?) VBR headers, or VBR streams with no VBR header if (!isset($nextframetestarray['mpeg']['audio']['bitrate']) || !isset($ThisFileInfo['mpeg']['audio']['bitrate']) || ($nextframetestarray['mpeg']['audio']['bitrate'] != $ThisFileInfo['mpeg']['audio']['bitrate'])) { return false; } } // next frame is OK, get ready to check the one after that if (isset($nextframetestarray['mpeg']['audio']['framelength']) && ($nextframetestarray['mpeg']['audio']['framelength'] > 0)) { $nextframetestoffset += $nextframetestarray['mpeg']['audio']['framelength']; } else { $ThisFileInfo['error'] .= "\n".'Frame at offset ('.$offset.') is has an invalid frame length.'; return false; } } else { // next frame is not valid, note the error and fail, so scanning can contiue for a valid frame sequence $ThisFileInfo['error'] .= "\n".'Frame at offset ('.$offset.') is valid, but the next one at ('.$nextframetestoffset.') is not.'; return false; } } return true; } function FreeFormatFrameLength($fd, $offset, &$ThisFileInfo, $deepscan=false) { fseek($fd, $offset, SEEK_SET); $MPEGaudioData = fread($fd, 32768); $SyncPattern1 = substr($MPEGaudioData, 0, 4); // may be different pattern due to padding $SyncPattern2 = $SyncPattern1{0}.$SyncPattern1{1}.chr(ord($SyncPattern1{2}) | 0x02).$SyncPattern1{3}; if ($SyncPattern2 === $SyncPattern1) { $SyncPattern2 = $SyncPattern1{0}.$SyncPattern1{1}.chr(ord($SyncPattern1{2}) & 0xFD).$SyncPattern1{3}; } $framelength = false; $framelength1 = strpos($MPEGaudioData, $SyncPattern1, 4); $framelength2 = strpos($MPEGaudioData, $SyncPattern2, 4); if ($framelength1 > 4) { $framelength = $framelength1; } if (($framelength2 > 4) && ($framelength2 < $framelength1)) { $framelength = $framelength2; } if (!$framelength) { // LAME 3.88 has a different value for modeextension on the first frame vs the rest $framelength1 = strpos($MPEGaudioData, substr($SyncPattern1, 0, 3), 4); $framelength2 = strpos($MPEGaudioData, substr($SyncPattern2, 0, 3), 4); if ($framelength1 > 4) { $framelength = $framelength1; } if (($framelength2 > 4) && ($framelength2 < $framelength1)) { $framelength = $framelength2; } if (!$framelength) { $ThisFileInfo['error'] .= "\n".'Cannot find next free-format synch pattern ('.PrintHexBytes($SyncPattern1).' or '.PrintHexBytes($SyncPattern2).') after offset '.$offset; return false; } else { $ThisFileInfo['warning'] .= "\n".'ModeExtension varies between first frame and other frames (known free-format issue in LAME 3.88)'; $ThisFileInfo['audio']['codec'] = 'LAME'; $ThisFileInfo['audio']['encoder'] = 'LAME3.88'; $SyncPattern1 = substr($SyncPattern1, 0, 3); $SyncPattern2 = substr($SyncPattern2, 0, 3); } } if ($deepscan) { $ActualFrameLengthValues = array(); $nextoffset = $offset + $framelength; while ($nextoffset < ($ThisFileInfo['avdataend'] - 6)) { fseek($fd, $nextoffset - 1, SEEK_SET); $NextSyncPattern = fread($fd, 6); if ((substr($NextSyncPattern, 1, strlen($SyncPattern1)) == $SyncPattern1) || (substr($NextSyncPattern, 1, strlen($SyncPattern2)) == $SyncPattern2)) { // good - found where expected $ActualFrameLengthValues[] = $framelength; } elseif ((substr($NextSyncPattern, 0, strlen($SyncPattern1)) == $SyncPattern1) || (substr($NextSyncPattern, 0, strlen($SyncPattern2)) == $SyncPattern2)) { // ok - found one byte earlier than expected (last frame wasn't padded, first frame was) $ActualFrameLengthValues[] = ($framelength - 1); $nextoffset--; } elseif ((substr($NextSyncPattern, 2, strlen($SyncPattern1)) == $SyncPattern1) || (substr($NextSyncPattern, 2, strlen($SyncPattern2)) == $SyncPattern2)) { // ok - found one byte later than expected (last frame was padded, first frame wasn't) $ActualFrameLengthValues[] = ($framelength + 1); $nextoffset++; } else { $ThisFileInfo['error'] .= "\n".'Did not find expected free-format sync pattern at offset '.$nextoffset; return false; } $nextoffset += $framelength; } if (count($ActualFrameLengthValues) > 0) { $framelength = round(array_sum($ActualFrameLengthValues) / count($ActualFrameLengthValues)); } } return $framelength; } function getOnlyMPEGaudioInfo($fd, &$ThisFileInfo, $avdataoffset, $BitrateHistogram=false) { // looks for synch, decodes MPEG audio header fseek($fd, $avdataoffset, SEEK_SET); $header = ''; $SynchSeekOffset = 0; if (!defined('CONST_FF')) { define('CONST_FF', chr(0xFF)); define('CONST_E0', chr(0xE0)); } static $MPEGaudioVersionLookup; static $MPEGaudioLayerLookup; static $MPEGaudioBitrateLookup; if (empty($MPEGaudioVersionLookup)) { $MPEGaudioVersionLookup = MPEGaudioVersionArray(); $MPEGaudioLayerLookup = MPEGaudioLayerArray(); $MPEGaudioBitrateLookup = MPEGaudioBitrateArray(); } $header_len = strlen($header) - round(FREAD_BUFFER_SIZE / 2); while (true) { if (($SynchSeekOffset > $header_len) && (($avdataoffset + $SynchSeekOffset) < $ThisFileInfo['avdataend']) && !feof($fd)) { if ($SynchSeekOffset > 131072) { // if a synch's not found within the first 128k bytes, then give up $ThisFileInfo['error'] .= "\n".'could not find valid MPEG synch within the first 131072 bytes'; if (isset($ThisFileInfo['audio']['bitrate'])) { unset($ThisFileInfo['audio']['bitrate']); } if (isset($ThisFileInfo['mpeg']['audio'])) { unset($ThisFileInfo['mpeg']['audio']); } if (isset($ThisFileInfo['mpeg']) && (!is_array($ThisFileInfo['mpeg']) || (count($ThisFileInfo['mpeg']) == 0))) { unset($ThisFileInfo['mpeg']); } return false; } elseif ($header .= fread($fd, FREAD_BUFFER_SIZE)) { // great $header_len = strlen($header) - round(FREAD_BUFFER_SIZE / 2); } else { $ThisFileInfo['error'] .= "\n".'could not find valid MPEG synch before end of file'; if (isset($ThisFileInfo['audio']['bitrate'])) { unset($ThisFileInfo['audio']['bitrate']); } if (isset($ThisFileInfo['mpeg']['audio'])) { unset($ThisFileInfo['mpeg']['audio']); } if (isset($ThisFileInfo['mpeg']) && (!is_array($ThisFileInfo['mpeg']) || (count($ThisFileInfo['mpeg']) == 0))) { unset($ThisFileInfo['mpeg']); } return false; } } if (($SynchSeekOffset + 1) >= strlen($header)) { $ThisFileInfo['error'] .= "\n".'could not find valid MPEG synch before end of file'; return false; } if (($header{$SynchSeekOffset} == CONST_FF) && ($header{($SynchSeekOffset + 1)} > CONST_E0)) { // synch detected if (!isset($FirstFrameThisfileInfo) && !isset($ThisFileInfo['mpeg']['audio'])) { $FirstFrameThisfileInfo = $ThisFileInfo; $FirstFrameAVDataOffset = $avdataoffset + $SynchSeekOffset; if (!decodeMPEGaudioHeader($fd, $avdataoffset + $SynchSeekOffset, $FirstFrameThisfileInfo, false)) { // if this is the first valid MPEG-audio frame, save it in case it's a VBR header frame and there's // garbage between this frame and a valid sequence of MPEG-audio frames, to be restored below unset($FirstFrameThisfileInfo); } } $dummy = $ThisFileInfo; // only overwrite real data if valid header found if (decodeMPEGaudioHeader($fd, $avdataoffset + $SynchSeekOffset, $dummy, true)) { $ThisFileInfo = $dummy; $ThisFileInfo['avdataoffset'] = $avdataoffset + $SynchSeekOffset; switch ($ThisFileInfo['fileformat']) { case '': case 'id3': case 'ape': case 'mp3': $ThisFileInfo['fileformat'] = 'mp3'; $ThisFileInfo['audio']['dataformat'] = 'mp3'; } if (isset($FirstFrameThisfileInfo['mpeg']['audio']['bitrate_mode']) && ($FirstFrameThisfileInfo['mpeg']['audio']['bitrate_mode'] == 'vbr')) { if (!CloseMatch($ThisFileInfo['audio']['bitrate'], $FirstFrameThisfileInfo['audio']['bitrate'], 1)) { // If there is garbage data between a valid VBR header frame and a sequence // of valid MPEG-audio frames the VBR data is no longer discarded. $ThisFileInfo = $FirstFrameThisfileInfo; $ThisFileInfo['avdataoffset'] = $FirstFrameAVDataOffset; $ThisFileInfo['fileformat'] = 'mp3'; $ThisFileInfo['audio']['dataformat'] = 'mp3'; $dummy = $ThisFileInfo; unset($dummy['mpeg']['audio']); $GarbageOffsetStart = $FirstFrameAVDataOffset + $FirstFrameThisfileInfo['mpeg']['audio']['framelength']; $GarbageOffsetEnd = $avdataoffset + $SynchSeekOffset; if (decodeMPEGaudioHeader($fd, $GarbageOffsetEnd, $dummy, true, true)) { $ThisFileInfo = $dummy; $ThisFileInfo['avdataoffset'] = $GarbageOffsetEnd; $ThisFileInfo['warning'] .= "\n".'apparently-valid VBR header not used because could not find '.MPEG_VALID_CHECK_FRAMES.' consecutive MPEG-audio frames immediately after VBR header (garbage data for '.($GarbageOffsetEnd - $GarbageOffsetStart).' bytes between '.$GarbageOffsetStart.' and '.$GarbageOffsetEnd.'), but did find valid CBR stream starting at '.$GarbageOffsetEnd; } else { $ThisFileInfo['warning'] .= "\n".'using data from VBR header even though could not find '.MPEG_VALID_CHECK_FRAMES.' consecutive MPEG-audio frames immediately after VBR header (garbage data for '.($GarbageOffsetEnd - $GarbageOffsetStart).' bytes between '.$GarbageOffsetStart.' and '.$GarbageOffsetEnd.')'; } } } if (isset($ThisFileInfo['mpeg']['audio']['bitrate_mode']) && ($ThisFileInfo['mpeg']['audio']['bitrate_mode'] == 'vbr') && !isset($ThisFileInfo['mpeg']['audio']['VBR_method'])) { // VBR file with no VBR header $BitrateHistogram = true; } if ($BitrateHistogram) { $ThisFileInfo['mpeg']['audio']['stereo_distribution'] = array('stereo'=>0, 'joint stereo'=>0, 'dual channel'=>0, 'mono'=>0); $ThisFileInfo['mpeg']['audio']['version_distribution'] = array('1'=>0, '2'=>0, '2.5'=>0); if ($ThisFileInfo['mpeg']['audio']['version'] == '1') { if ($ThisFileInfo['mpeg']['audio']['layer'] == 'III') { $ThisFileInfo['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 32=>0, 40=>0, 48=>0, 56=>0, 64=>0, 80=>0, 96=>0, 112=>0, 128=>0, 160=>0, 192=>0, 224=>0, 256=>0, 320=>0); } elseif ($ThisFileInfo['mpeg']['audio']['layer'] == 'II') { $ThisFileInfo['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 32=>0, 48=>0, 56=>0, 64=>0, 80=>0, 96=>0, 112=>0, 128=>0, 160=>0, 192=>0, 224=>0, 256=>0, 320=>0, 384=>0); } elseif ($ThisFileInfo['mpeg']['audio']['layer'] == 'I') { $ThisFileInfo['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 32=>0, 64=>0, 96=>0, 128=>0, 160=>0, 192=>0, 224=>0, 256=>0, 288=>0, 320=>0, 352=>0, 384=>0, 416=>0, 448=>0); } } elseif ($ThisFileInfo['mpeg']['audio']['layer'] == 'I') { $ThisFileInfo['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 32=>0, 48=>0, 56=>0, 64=>0, 80=>0, 96=>0, 112=>0, 128=>0, 144=>0, 160=>0, 176=>0, 192=>0, 224=>0, 256=>0); } else { $ThisFileInfo['mpeg']['audio']['bitrate_distribution'] = array('free'=>0, 8=>0, 16=>0, 24=>0, 32=>0, 40=>0, 48=>0, 56=>0, 64=>0, 80=>0, 96=>0, 112=>0, 128=>0, 144=>0, 160=>0); } $dummy = array('error'=>$ThisFileInfo['error'], 'warning'=>$ThisFileInfo['warning'], 'avdataend'=>$ThisFileInfo['avdataend'], 'avdataoffset'=>$ThisFileInfo['avdataoffset']); $synchstartoffset = $ThisFileInfo['avdataoffset']; $FastMode = false; while (decodeMPEGaudioHeader($fd, $synchstartoffset, $dummy, false, false, $FastMode)) { $FastMode = true; $thisframebitrate = $MPEGaudioBitrateLookup[$MPEGaudioVersionLookup[$dummy['mpeg']['audio']['raw']['version']]][$MPEGaudioLayerLookup[$dummy['mpeg']['audio']['raw']['layer']]][$dummy['mpeg']['audio']['raw']['bitrate']]; $ThisFileInfo['mpeg']['audio']['bitrate_distribution'][$thisframebitrate]++; $ThisFileInfo['mpeg']['audio']['stereo_distribution'][$dummy['mpeg']['audio']['channelmode']]++; $ThisFileInfo['mpeg']['audio']['version_distribution'][$dummy['mpeg']['audio']['version']]++; if (empty($dummy['mpeg']['audio']['framelength'])) { $ThisFileInfo['warning'] .= "\n".'Invalid/missing framelength in histogram analysis - aborting'; $synchstartoffset += 4; // return false; } $synchstartoffset += $dummy['mpeg']['audio']['framelength']; } $bittotal = 0; $framecounter = 0; foreach ($ThisFileInfo['mpeg']['audio']['bitrate_distribution'] as $bitratevalue => $bitratecount) { $framecounter += $bitratecount; if ($bitratevalue != 'free') { $bittotal += ($bitratevalue * $bitratecount); } } if ($framecounter == 0) { $ThisFileInfo['error'] .= "\n".'Corrupt MP3 file: framecounter == zero'; return false; } $ThisFileInfo['mpeg']['audio']['frame_count'] = $framecounter; $ThisFileInfo['mpeg']['audio']['bitrate'] = 1000 * ($bittotal / $framecounter); $ThisFileInfo['audio']['bitrate'] = $ThisFileInfo['mpeg']['audio']['bitrate']; // Definitively set VBR vs CBR, even if the Xing/LAME/VBRI header says differently $distinct_bitrates = 0; foreach ($ThisFileInfo['mpeg']['audio']['bitrate_distribution'] as $bitrate_value => $bitrate_count) { if ($bitrate_count > 0) { $distinct_bitrates++; } } if ($distinct_bitrates > 1) { $ThisFileInfo['mpeg']['audio']['bitrate_mode'] = 'vbr'; } else { $ThisFileInfo['mpeg']['audio']['bitrate_mode'] = 'cbr'; } $ThisFileInfo['audio']['bitrate_mode'] = $ThisFileInfo['mpeg']['audio']['bitrate_mode']; } break; // exit while() } } $SynchSeekOffset++; if (($avdataoffset + $SynchSeekOffset) >= $ThisFileInfo['avdataend']) { // end of file/data if (empty($ThisFileInfo['mpeg']['audio'])) { $ThisFileInfo['error'] .= "\n".'could not find valid MPEG synch before end of file'; if (isset($ThisFileInfo['audio']['bitrate'])) { unset($ThisFileInfo['audio']['bitrate']); } if (isset($ThisFileInfo['mpeg']['audio'])) { unset($ThisFileInfo['mpeg']['audio']); } if (isset($ThisFileInfo['mpeg']) && (!is_array($ThisFileInfo['mpeg']) || empty($ThisFileInfo['mpeg']))) { unset($ThisFileInfo['mpeg']); } return false; } break; } } $ThisFileInfo['audio']['bits_per_sample'] = 16; $ThisFileInfo['audio']['channels'] = $ThisFileInfo['mpeg']['audio']['channels']; $ThisFileInfo['audio']['channelmode'] = $ThisFileInfo['mpeg']['audio']['channelmode']; $ThisFileInfo['audio']['sample_rate'] = $ThisFileInfo['mpeg']['audio']['sample_rate']; return true; } function MPEGaudioVersionArray() { static $MPEGaudioVersion = array('2.5', false, '2', '1'); return $MPEGaudioVersion; } function MPEGaudioLayerArray() { static $MPEGaudioLayer = array(false, 'III', 'II', 'I'); return $MPEGaudioLayer; } function MPEGaudioBitrateArray() { static $MPEGaudioBitrate; if (empty($MPEGaudioBitrate)) { $MPEGaudioBitrate['1']['I'] = array('free', 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448); $MPEGaudioBitrate['1']['II'] = array('free', 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384); $MPEGaudioBitrate['1']['III'] = array('free', 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320); $MPEGaudioBitrate['2']['I'] = array('free', 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256); $MPEGaudioBitrate['2']['II'] = array('free', 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160); $MPEGaudioBitrate['2']['III'] = $MPEGaudioBitrate['2']['II']; $MPEGaudioBitrate['2.5']['I'] = $MPEGaudioBitrate['2']['I']; $MPEGaudioBitrate['2.5']['II'] = $MPEGaudioBitrate['2']['II']; $MPEGaudioBitrate['2.5']['III'] = $MPEGaudioBitrate['2']['III']; } return $MPEGaudioBitrate; } function MPEGaudioFrequencyArray() { static $MPEGaudioFrequency; if (empty($MPEGaudioFrequency)) { $MPEGaudioFrequency['1'] = array(44100, 48000, 32000); $MPEGaudioFrequency['2'] = array(22050, 24000, 16000); $MPEGaudioFrequency['2.5'] = array(11025, 12000, 8000); } return $MPEGaudioFrequency; } function MPEGaudioChannelModeArray() { static $MPEGaudioChannelMode = array('stereo', 'joint stereo', 'dual channel', 'mono'); return $MPEGaudioChannelMode; } function MPEGaudioModeExtensionArray() { static $MPEGaudioModeExtension; if (empty($MPEGaudioModeExtension)) { $MPEGaudioModeExtension['I'] = array('4-31', '8-31', '12-31', '16-31'); $MPEGaudioModeExtension['II'] = array('4-31', '8-31', '12-31', '16-31'); $MPEGaudioModeExtension['III'] = array('', 'IS', 'MS', 'IS+MS'); } return $MPEGaudioModeExtension; } function MPEGaudioEmphasisArray() { static $MPEGaudioEmphasis = array('none', '50/15ms', false, 'CCIT J.17'); return $MPEGaudioEmphasis; } function MPEGaudioHeaderBytesValid($head4) { return MPEGaudioHeaderValid(MPEGaudioHeaderDecode($head4)); } function MPEGaudioHeaderValid($rawarray, $echoerrors=false) { if (($rawarray['synch'] & 0x0FFE) != 0x0FFE) { return false; } static $MPEGaudioVersionLookup; static $MPEGaudioLayerLookup; static $MPEGaudioBitrateLookup; static $MPEGaudioFrequencyLookup; static $MPEGaudioChannelModeLookup; static $MPEGaudioModeExtensionLookup; static $MPEGaudioEmphasisLookup; if (empty($MPEGaudioVersionLookup)) { $MPEGaudioVersionLookup = MPEGaudioVersionArray(); $MPEGaudioLayerLookup = MPEGaudioLayerArray(); $MPEGaudioBitrateLookup = MPEGaudioBitrateArray(); $MPEGaudioFrequencyLookup = MPEGaudioFrequencyArray(); $MPEGaudioChannelModeLookup = MPEGaudioChannelModeArray(); $MPEGaudioModeExtensionLookup = MPEGaudioModeExtensionArray(); $MPEGaudioEmphasisLookup = MPEGaudioEmphasisArray(); } if (isset($MPEGaudioVersionLookup[$rawarray['version']])) { $decodedVersion = $MPEGaudioVersionLookup[$rawarray['version']]; } else { if ($echoerrors) { echo "\n".'invalid Version ('.$rawarray['version'].')'; } return false; } if (isset($MPEGaudioLayerLookup[$rawarray['layer']])) { $decodedLayer = $MPEGaudioLayerLookup[$rawarray['layer']]; } else { if ($echoerrors) { echo "\n".'invalid Layer ('.$rawarray['layer'].')'; } return false; } if (!isset($MPEGaudioBitrateLookup[$decodedVersion][$decodedLayer][$rawarray['bitrate']])) { if ($echoerrors) { echo "\n".'invalid Bitrate ('.$rawarray['bitrate'].')'; } if ($rawarray['bitrate'] == 15) { // known issue in LAME 3.90 - 3.93.1 where free-format has bitrate ID of 15 instead of 0 // let it go through here otherwise file will not be identified } else { return false; } } if (!isset($MPEGaudioFrequencyLookup[$decodedVersion][$rawarray['sample_rate']])) { if ($echoerrors) { echo "\n".'invalid Frequency ('.$rawarray['sample_rate'].')'; } return false; } if (!isset($MPEGaudioChannelModeLookup[$rawarray['channelmode']])) { if ($echoerrors) { echo "\n".'invalid ChannelMode ('.$rawarray['channelmode'].')'; } return false; } if (!isset($MPEGaudioModeExtensionLookup[$decodedLayer][$rawarray['modeextension']])) { if ($echoerrors) { echo "\n".'invalid Mode Extension ('.$rawarray['modeextension'].')'; } return false; } if (!isset($MPEGaudioEmphasisLookup[$rawarray['emphasis']])) { if ($echoerrors) { echo "\n".'invalid Emphasis ('.$rawarray['emphasis'].')'; } return false; } // These are just either set or not set, you can't mess that up :) // $rawarray['protection']; // $rawarray['padding']; // $rawarray['private']; // $rawarray['copyright']; // $rawarray['original']; return true; } function MPEGaudioHeaderDecode($Header4Bytes) { // AAAA AAAA AAAB BCCD EEEE FFGH IIJJ KLMM // A - Frame sync (all bits set) // B - MPEG Audio version ID // C - Layer description // D - Protection bit // E - Bitrate index // F - Sampling rate frequency index // G - Padding bit // H - Private bit // I - Channel Mode // J - Mode extension (Only if Joint stereo) // K - Copyright // L - Original // M - Emphasis if (strlen($Header4Bytes) != 4) { return false; } $MPEGrawHeader['synch'] = (BigEndian2Int(substr($Header4Bytes, 0, 2)) & 0xFFE0) >> 4; $MPEGrawHeader['version'] = (ord($Header4Bytes{1}) & 0x18) >> 3; // BB $MPEGrawHeader['layer'] = (ord($Header4Bytes{1}) & 0x06) >> 1; // CC $MPEGrawHeader['protection'] = (ord($Header4Bytes{1}) & 0x01); // D $MPEGrawHeader['bitrate'] = (ord($Header4Bytes{2}) & 0xF0) >> 4; // EEEE $MPEGrawHeader['sample_rate'] = (ord($Header4Bytes{2}) & 0x0C) >> 2; // FF $MPEGrawHeader['padding'] = (ord($Header4Bytes{2}) & 0x02) >> 1; // G $MPEGrawHeader['private'] = (ord($Header4Bytes{2}) & 0x01); // H $MPEGrawHeader['channelmode'] = (ord($Header4Bytes{3}) & 0xC0) >> 6; // II $MPEGrawHeader['modeextension'] = (ord($Header4Bytes{3}) & 0x30) >> 4; // JJ $MPEGrawHeader['copyright'] = (ord($Header4Bytes{3}) & 0x08) >> 3; // K $MPEGrawHeader['original'] = (ord($Header4Bytes{3}) & 0x04) >> 2; // L $MPEGrawHeader['emphasis'] = (ord($Header4Bytes{3}) & 0x03); // MM return $MPEGrawHeader; } function MPEGaudioFrameLength(&$bitrate, &$version, &$layer, $padding, &$samplerate) { static $AudioFrameLengthCache = array(); if (!isset($AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate])) { $AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate] = false; if ($bitrate != 'free') { if ($version == '1') { if ($layer == 'I') { // For Layer I slot is 32 bits long $FrameLengthCoefficient = 48; $SlotLength = 4; } else { // Layer II / III // for Layer II and Layer III slot is 8 bits long. $FrameLengthCoefficient = 144; $SlotLength = 1; } } else { // MPEG-2 / MPEG-2.5 if ($layer == 'I') { // For Layer I slot is 32 bits long $FrameLengthCoefficient = 24; $SlotLength = 4; } elseif ($layer == 'II') { // for Layer II and Layer III slot is 8 bits long. $FrameLengthCoefficient = 144; $SlotLength = 1; } else { // III // for Layer II and Layer III slot is 8 bits long. $FrameLengthCoefficient = 72; $SlotLength = 1; } } // FrameLengthInBytes = ((Coefficient * BitRate) / SampleRate) + Padding // http://66.96.216.160/cgi-bin/YaBB.pl?board=c&action=display&num=1018474068 // -> [Finding the next frame synch] on www.r3mix.net forums if the above link goes dead if ($samplerate > 0) { $NewFramelength = ($FrameLengthCoefficient * $bitrate * 1000) / $samplerate; $NewFramelength = floor($NewFramelength / $SlotLength) * $SlotLength; // round to next-lower multiple of SlotLength (1 byte for Layer II/III, 4 bytes for Layer I) if ($padding) { $NewFramelength += $SlotLength; } $AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate] = (int) $NewFramelength; } } } return $AudioFrameLengthCache[$bitrate][$version][$layer][$padding][$samplerate]; } function LAMEvbrMethodLookup($VBRmethodID) { static $LAMEvbrMethodLookup = array(); if (empty($LAMEvbrMethodLookup)) { $LAMEvbrMethodLookup[0x00] = 'unknown'; $LAMEvbrMethodLookup[0x01] = 'cbr'; $LAMEvbrMethodLookup[0x02] = 'abr'; $LAMEvbrMethodLookup[0x03] = 'vbr-old / vbr-rh'; $LAMEvbrMethodLookup[0x04] = 'vbr-mtrh'; $LAMEvbrMethodLookup[0x05] = 'vbr-new / vbr-mt'; } return (isset($LAMEvbrMethodLookup[$VBRmethodID]) ? $LAMEvbrMethodLookup[$VBRmethodID] : ''); } function LAMEmiscStereoModeLookup($StereoModeID) { static $LAMEmiscStereoModeLookup = array(); if (empty($LAMEmiscStereoModeLookup)) { $LAMEmiscStereoModeLookup[0] = 'mono'; $LAMEmiscStereoModeLookup[1] = 'stereo'; $LAMEmiscStereoModeLookup[2] = 'dual'; $LAMEmiscStereoModeLookup[3] = 'joint'; $LAMEmiscStereoModeLookup[4] = 'forced'; $LAMEmiscStereoModeLookup[5] = 'auto'; $LAMEmiscStereoModeLookup[6] = 'intensity'; $LAMEmiscStereoModeLookup[7] = 'other'; } return (isset($LAMEmiscStereoModeLookup[$StereoModeID]) ? $LAMEmiscStereoModeLookup[$StereoModeID] : ''); } function LAMEmiscSourceSampleFrequencyLookup($SourceSampleFrequencyID) { static $LAMEmiscSourceSampleFrequencyLookup = array(); if (empty($LAMEmiscSourceSampleFrequencyLookup)) { $LAMEmiscSourceSampleFrequencyLookup[0] = '<= 32 kHz'; $LAMEmiscSourceSampleFrequencyLookup[1] = '44.1 kHz'; $LAMEmiscSourceSampleFrequencyLookup[2] = '48 kHz'; $LAMEmiscSourceSampleFrequencyLookup[3] = '> 48kHz'; } return (isset($LAMEmiscSourceSampleFrequencyLookup[$SourceSampleFrequencyID]) ? $LAMEmiscSourceSampleFrequencyLookup[$SourceSampleFrequencyID] : ''); } function LAMEsurroundInfoLookup($SurroundInfoID) { static $LAMEsurroundInfoLookup = array(); if (empty($LAMEsurroundInfoLookup)) { $LAMEsurroundInfoLookup[0] = 'no surround info'; $LAMEsurroundInfoLookup[1] = 'DPL encoding'; $LAMEsurroundInfoLookup[2] = 'DPL2 encoding'; $LAMEsurroundInfoLookup[3] = 'Ambisonic encoding'; } return (isset($LAMEsurroundInfoLookup[$SurroundInfoID]) ? $LAMEsurroundInfoLookup[$SurroundInfoID] : 'reserved'); } ?>
derlangemarkus/Twick.it
blog/de/wp-content/plugins/audio/getid3/demos/demo.mp3header.php
PHP
mit
122,827
def scrape_github(query, location) base_url = "https://jobs.github.com" query_url = base_url +'/positions?description='+ query + '&location=' + location posting_urls = [] # # this is getting us the url's for each of the individual posting pages doc = Nokogiri::HTML(open(query_url)) doc.css("h4 a").each do |job| posting_urls << job['href'] end # x = 0 posting_urls.each do |url_extension| job_page = Nokogiri::HTML(open(base_url + url_extension)) # opening the individual page in the posting_url's array # on each individual page, we are defining our job model with certain attributes # getting the title title = job_page.css(".inner h1").text # getting the location location = job_page.css(".supertitle").text # # getting the job description description = job_page.css(".column.main").text link_to_original = job_page.css(".module.highlighted .inner p").text begin company_name = doc.css(".company")[x].text posted_date = doc.css(".when.relatize")[x].text rescue next end icon="http://devbootcamp.com/assets/img/devbootcamp-logo2x.png" x += 1 if Job.where(:title => title, :description => description).empty? Job.create(:title => title, :icon => icon, :location => location, :description => description, :company_name => company_name, :link_to_original => link_to_original) end end end
iMikie/Boot-Jobs
lib/scrape_github.rb
Ruby
mit
1,518
package utils.db import com.github.tminglei.slickpg._ import models.db.AccountRole trait TetraoPostgresDriver extends ExPostgresDriver with PgArraySupport with PgEnumSupport with PgRangeSupport with PgDate2Support with PgHStoreSupport with PgSearchSupport with PgNetSupport with PgLTreeSupport { override val api = TetraoAPI object TetraoAPI extends API with ArrayImplicits with DateTimeImplicits with NetImplicits with LTreeImplicits with RangeImplicits with HStoreImplicits with SearchImplicits with SearchAssistants { implicit val tAccountRole = createEnumJdbcType("account_role", AccountRole) implicit val lAccountRole = createEnumListJdbcType("account_role", AccountRole) implicit val cAccountRole = createEnumColumnExtensionMethodsBuilder(AccountRole) implicit val oAccountRole = createEnumOptionColumnExtensionMethodsBuilder(AccountRole) implicit val strListTypeMapper = new SimpleArrayJdbcType[String]("text").to(_.toList) } } object TetraoPostgresDriver extends TetraoPostgresDriver
asciiu/halo
arbiter/app/utils/db/TetraoPostgresDriver.scala
Scala
mit
1,070
--- published: true title: Candy Cane layout: post categories: [beverages] rating: 1 --- ### Servings 1 ### Ingredients - 3/4 oz SKYY Berry vodka - 3/4 oz Peppermint Schnapps - 3/4 oz white Crème de Cacao - 1/4 oz grenadine - half and half - Soda water ### Directions 1. Pour the vodka, Peppermint Schnapps, white Creme de Cacao and grenadine into a cocktail shaker with ice. 2. Shake well. 3. Pour into a cocktail glass rimmed with crushed peppermint candy. 4. Fill with half and half. 5. Top with a splash of soda water 6. Rim the glass with crushed candy canes or other peppermint candy, using the Schnapps or Crème de Cacao to wet the rim. ### Source
jrolstad/rolstad-recipes
_posts/2015-12-14-candy-cane.md
Markdown
mit
662
package com.javarush.task.task12.task1211; /* Абстрактный класс Pet */ public class Solution { public static void main(String[] args) { } public static abstract class Pet { public String getName() { return "Я - котенок"; } } }
pshynin/JavaRushTasks
2.JavaCore/src/com/javarush/task/task12/task1211/Solution.java
Java
mit
301
import os import json import six from ddt import ddt, data, file_data, is_hash_randomized from nose.tools import assert_equal, assert_is_not_none, assert_raises @ddt class Dummy(object): """ Dummy class to test the data decorator on """ @data(1, 2, 3, 4) def test_something(self, value): return value @ddt class DummyInvalidIdentifier(): """ Dummy class to test the data decorator receiving values invalid characters indentifiers """ @data('32v2 g #Gmw845h$W b53wi.') def test_data_with_invalid_identifier(self, value): return value @ddt class FileDataDummy(object): """ Dummy class to test the file_data decorator on """ @file_data("test_data_dict.json") def test_something_again(self, value): return value @ddt class FileDataMissingDummy(object): """ Dummy class to test the file_data decorator on when JSON file is missing """ @file_data("test_data_dict_missing.json") def test_something_again(self, value): return value def test_data_decorator(): """ Test the ``data`` method decorator """ def hello(): pass pre_size = len(hello.__dict__) keys = set(hello.__dict__.keys()) data_hello = data(1, 2)(hello) dh_keys = set(data_hello.__dict__.keys()) post_size = len(data_hello.__dict__) assert_equal(post_size, pre_size + 1) extra_attrs = dh_keys - keys assert_equal(len(extra_attrs), 1) extra_attr = extra_attrs.pop() assert_equal(getattr(data_hello, extra_attr), (1, 2)) def test_file_data_decorator_with_dict(): """ Test the ``file_data`` method decorator """ def hello(): pass pre_size = len(hello.__dict__) keys = set(hello.__dict__.keys()) data_hello = data("test_data_dict.json")(hello) dh_keys = set(data_hello.__dict__.keys()) post_size = len(data_hello.__dict__) assert_equal(post_size, pre_size + 1) extra_attrs = dh_keys - keys assert_equal(len(extra_attrs), 1) extra_attr = extra_attrs.pop() assert_equal(getattr(data_hello, extra_attr), ("test_data_dict.json",)) is_test = lambda x: x.startswith('test_') def test_ddt(): """ Test the ``ddt`` class decorator """ tests = len(list(filter(is_test, Dummy.__dict__))) assert_equal(tests, 4) def test_file_data_test_creation(): """ Test that the ``file_data`` decorator creates two tests """ tests = len(list(filter(is_test, FileDataDummy.__dict__))) assert_equal(tests, 2) def test_file_data_test_names_dict(): """ Test that ``file_data`` creates tests with the correct name Name is the the function name plus the key in the JSON data, when it is parsed as a dictionary. """ tests = set(filter(is_test, FileDataDummy.__dict__)) tests_dir = os.path.dirname(__file__) test_data_path = os.path.join(tests_dir, 'test_data_dict.json') test_data = json.loads(open(test_data_path).read()) created_tests = set([ "test_something_again_{0}_{1}".format(index + 1, name) for index, name in enumerate(test_data.keys()) ]) assert_equal(tests, created_tests) def test_feed_data_data(): """ Test that data is fed to the decorated tests """ tests = filter(is_test, Dummy.__dict__) values = [] obj = Dummy() for test in tests: method = getattr(obj, test) values.append(method()) assert_equal(set(values), set([1, 2, 3, 4])) def test_feed_data_file_data(): """ Test that data is fed to the decorated tests from a file """ tests = filter(is_test, FileDataDummy.__dict__) values = [] obj = FileDataDummy() for test in tests: method = getattr(obj, test) values.extend(method()) assert_equal(set(values), set([10, 12, 15, 15, 12, 50])) def test_feed_data_file_data_missing_json(): """ Test that a ValueError is raised """ tests = filter(is_test, FileDataMissingDummy.__dict__) obj = FileDataMissingDummy() for test in tests: method = getattr(obj, test) assert_raises(ValueError, method) def test_ddt_data_name_attribute(): """ Test the ``__name__`` attribute handling of ``data`` items with ``ddt`` """ def hello(): pass class Myint(int): pass class Mytest(object): pass d1 = Myint(1) d1.__name__ = 'data1' d2 = Myint(2) data_hello = data(d1, d2)(hello) setattr(Mytest, 'test_hello', data_hello) ddt_mytest = ddt(Mytest) assert_is_not_none(getattr(ddt_mytest, 'test_hello_1_data1')) assert_is_not_none(getattr(ddt_mytest, 'test_hello_2_2')) def test_ddt_data_unicode(): """ Test that unicode strings are converted to function names correctly """ def hello(): pass # We test unicode support separately for python 2 and 3 if six.PY2: @ddt class Mytest(object): @data(u'ascii', u'non-ascii-\N{SNOWMAN}', {u'\N{SNOWMAN}': 'data'}) def test_hello(self, val): pass assert_is_not_none(getattr(Mytest, 'test_hello_1_ascii')) assert_is_not_none(getattr(Mytest, 'test_hello_2_non_ascii__u2603')) if is_hash_randomized(): assert_is_not_none(getattr(Mytest, 'test_hello_3')) else: assert_is_not_none(getattr(Mytest, 'test_hello_3__u__u2603____data__')) elif six.PY3: @ddt class Mytest(object): @data('ascii', 'non-ascii-\N{SNOWMAN}', {'\N{SNOWMAN}': 'data'}) def test_hello(self, val): pass assert_is_not_none(getattr(Mytest, 'test_hello_1_ascii')) assert_is_not_none(getattr(Mytest, 'test_hello_2_non_ascii__')) if is_hash_randomized(): assert_is_not_none(getattr(Mytest, 'test_hello_3')) else: assert_is_not_none(getattr(Mytest, 'test_hello_3________data__')) def test_feed_data_with_invalid_identifier(): """ Test that data is fed to the decorated tests """ tests = list(filter(is_test, DummyInvalidIdentifier.__dict__)) assert_equal(len(tests), 1) obj = DummyInvalidIdentifier() method = getattr(obj, tests[0]) assert_equal( method.__name__, 'test_data_with_invalid_identifier_1_32v2_g__Gmw845h_W_b53wi_' ) assert_equal(method(), '32v2 g #Gmw845h$W b53wi.')
domidimi/ddt
test/test_functional.py
Python
mit
6,480
package TopCoder; /* * SRM 148 Div2 * Link:https://community.topcoder.com/stat?c=problem_statement&pm=1741&rd=4545 */ public class SRM148DivisorDigits { public static void main(String[] args) { System.out.println(howMany(12345)); System.out.println(howMany(661232)); System.out.println(howMany(52527)); System.out.println(howMany(730000000)); } public static int howMany(int number){ int count=0; String str=number+""; for (int i = 1; i <=9; i++) { if(str.indexOf(i+"")>-1) { if(number%i==0) count++; } } return count; } }
darshanhs90/Java-InterviewPrep
src/TopCoder/SRM148DivisorDigits.java
Java
mit
570
package April2021Leetcode; public class _0344ReverseString { public static void main(String[] args) { reverseString(new char[] { 'h', 'e', 'l', 'l', 'o' }); reverseString(new char[] { 'h', 'a', 'n', 'n', 'a', 'H' }); } public static void reverseString(char[] s) { s } }
darshanhs90/Java-InterviewPrep
src/April2021Leetcode/_0344ReverseString.java
Java
mit
281
<?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magentocommerce.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage * @package Mage_Weee * @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** * Model to calculate Weee amount */ class Mage_Weee_Model_Tax extends Mage_Core_Model_Abstract { /** * Including FPT only */ const DISPLAY_INCL = 0; /** * Including FPT and FPT description */ const DISPLAY_INCL_DESCR = 1; /** * Excluding FPT, FPT description, final price */ const DISPLAY_EXCL_DESCR_INCL = 2; /** * Excluding FPT */ const DISPLAY_EXCL = 3; /** * All weee attributes * * @var array */ protected $_allAttributes = null; /** * Cache product discounts * * @var array */ protected $_productDiscounts = array(); /** * Tax helper * * @var Mage_Tax_Helper_Data */ protected $_taxHelper; /** * Initialize resource */ protected function _construct() { $this->_init('weee/tax', 'weee/tax'); } /** * Initialize tax helper * * @param array $args */ public function __construct(array $args = array()) { parent::__construct(); $this->_taxHelper = !empty($args['helper']) ? $args['helper'] : Mage::helper('tax'); } /** * Calculate weee amount for a product * * @param Mage_Catalog_Model_Product $product * @param Mage_Customer_Model_Address_Abstract $shipping * @param Mage_Customer_Model_Address_Abstract $billing * @param mixed $website * @param boolean $calculateTax * @param boolean $ignoreDiscount * @return float */ public function getWeeeAmount( $product, $shipping = null, $billing = null, $website = null, $calculateTax = false, $ignoreDiscount = false) { $amount = 0; $attributes = $this->getProductWeeeAttributes( $product, $shipping, $billing, $website, $calculateTax, $ignoreDiscount ); foreach ($attributes as $attribute) { $amount += $attribute->getAmount(); } return $amount; } /** * Get a list of Weee attribute codes * * @param boolean $forceEnabled * @return array */ public function getWeeeAttributeCodes($forceEnabled = false) { return $this->getWeeeTaxAttributeCodes($forceEnabled); } /** * Retrieve Weee tax attribute codes * * @param bool $forceEnabled * @return array */ public function getWeeeTaxAttributeCodes($forceEnabled = false) { if (!$forceEnabled && !Mage::helper('weee')->isEnabled()) { return array(); } if (is_null($this->_allAttributes)) { $this->_allAttributes = Mage::getModel('eav/entity_attribute')->getAttributeCodesByFrontendType('weee'); } return $this->_allAttributes; } /** * Get Weee amounts associated with a product * * @param Mage_Catalog_Model_Product $product * @param Mage_Customer_Model_Address_Abstract $shipping * @param Mage_Customer_Model_Address_Abstract $billing * @param mixed $website * @param boolean $calculateTax * @param boolean $ignoreDiscount * @return array|\Varien_Object */ public function getProductWeeeAttributes( $product, $shipping = null, $billing = null, $website = null, $calculateTax = null, $ignoreDiscount = false) { $result = array(); $allWeee = $this->getWeeeTaxAttributeCodes(); if (!$allWeee) { return $result; } $websiteId = Mage::app()->getWebsite($website)->getId(); $store = Mage::app()->getWebsite($website)->getDefaultGroup()->getDefaultStore(); $customer = null; if ($shipping) { $customerTaxClass = $shipping->getQuote()->getCustomerTaxClassId(); $customer = $shipping->getQuote()->getCustomer(); } else { $customerTaxClass = null; } $calculator = Mage::getModel('tax/calculation'); if ($customer) { $calculator->setCustomer($customer); } $rateRequest = $calculator->getRateRequest($shipping, $billing, $customerTaxClass, $store); $currentPercent = $product->getTaxPercent(); if (!$currentPercent) { $currentPercent = Mage::getSingleton('tax/calculation')->getRate( $rateRequest->setProductClassId($product->getTaxClassId())); } $discountPercent = 0; if (!$ignoreDiscount && Mage::helper('weee')->isDiscounted($store)) { $discountPercent = $this->_getDiscountPercentForProduct($product); } $productAttributes = $product->getTypeInstance(true)->getSetAttributes($product); foreach ($productAttributes as $code => $attribute) { if (in_array($code, $allWeee)) { $attributeSelect = $this->getResource()->getReadConnection()->select(); $attributeSelect ->from($this->getResource()->getTable('weee/tax'), 'value') ->where('attribute_id = ?', (int)$attribute->getId()) ->where('website_id IN(?)', array($websiteId, 0)) ->where('country = ?', $rateRequest->getCountryId()) ->where('state IN(?)', array($rateRequest->getRegionId(), '*')) ->where('entity_id = ?', (int)$product->getId()) ->limit(1); $order = array('state ' . Varien_Db_Select::SQL_DESC, 'website_id ' . Varien_Db_Select::SQL_DESC); $attributeSelect->order($order); $value = $this->getResource()->getReadConnection()->fetchOne($attributeSelect); if ($value) { if ($discountPercent) { $value = Mage::app()->getStore()->roundPrice($value - ($value * $discountPercent / 100)); } $taxAmount = 0; $amount = $value; if ($calculateTax && Mage::helper('weee')->isTaxable($store)) { if ($this->_taxHelper->isCrossBorderTradeEnabled($store)) { $defaultPercent = $currentPercent; } else { $defaultRateRequest = $calculator->getDefaultRateRequest($store); $defaultPercent = Mage::getModel('tax/calculation') ->getRate($defaultRateRequest ->setProductClassId($product->getTaxClassId())); } if (Mage::helper('weee')->isTaxIncluded($store)) { $taxAmount = Mage::app()->getStore() ->roundPrice($value / (100 + $defaultPercent) * $currentPercent); $amount = $amount - $taxAmount; } else { $appliedRates = Mage::getModel('tax/calculation')->getAppliedRates($rateRequest); if (count($appliedRates) > 1) { $taxAmount = 0; foreach ($appliedRates as $appliedRate) { $taxRate = $appliedRate['percent']; $taxAmount += Mage::app()->getStore()->roundPrice($value * $taxRate / 100); } } else { $taxAmount = Mage::app()->getStore()->roundPrice($value * $currentPercent / 100); } } } $one = new Varien_Object(); $one->setName(Mage::helper('catalog')->__($attribute->getFrontend()->getLabel())) ->setAmount($amount) ->setTaxAmount($taxAmount) ->setCode($attribute->getAttributeCode()); $result[] = $one; } } } return $result; } /** * Get discount percentage for a product * * @param Mage_Catalog_Model_Product $product * @return int */ protected function _getDiscountPercentForProduct($product) { $website = Mage::app()->getStore()->getWebsiteId(); $group = Mage::getSingleton('customer/session')->getCustomerGroupId(); $key = implode('-', array($website, $group, $product->getId())); if (!isset($this->_productDiscounts[$key])) { $this->_productDiscounts[$key] = (int) $this->getResource() ->getProductDiscountPercent($product->getId(), $website, $group); } $value = $this->_productDiscounts[$key]; if ($value) { return 100 - min(100, max(0, $value)); } else { return 0; } } /** * Update discounts for FPT amounts of all products * * @return Mage_Weee_Model_Tax */ public function updateDiscountPercents() { $this->getResource()->updateDiscountPercents(); return $this; } /** * Update discounts for FPT amounts base on products condiotion * * @param mixed $products * @return Mage_Weee_Model_Tax */ public function updateProductsDiscountPercent($products) { $this->getResource()->updateProductsDiscountPercent($products); return $this; } }
almadaocta/lordbike-production
errors/includes/src/Mage_Weee_Model_Tax.php
PHP
mit
10,885
<?php /** * PHP SDK for QQ登录 OpenAPI * * @version 1.5 * @author connect@qq.com * @copyright © 2011, Tencent Corporation. All rights reserved. */ /** * @brief 本文件包含了OAuth认证过程中会用到的公用方法 */ require_once("config.php"); /** * @brief QQ登录中对url做编解码的统一函数 * 按照RFC 1738 对URL进行编码 * 除了-_.~之外的所有非字母数字字符都将被替换成百分号(%)后跟两位十六进制数 */ $QQhexchars = "0123456789ABCDEF"; /** *@brief 增加一个全局变量 */ $global_arg; function QQConnect_urlencode($str) { global $QQhexchars; $urlencode = ""; $len = strlen($str); for($x = 0 ; $len--; $x++) { if (($str[$x] < '0' && $str[$x] != '-' && $str[$x] != '.') || ($str[$x] < 'A' && $str[$x] > '9') || ($str[$x] > 'Z' && $str[$x] < 'a' && $str[$x] != '_') || ($str[$x] > 'z' && $str[$x] != '~')) { $urlencode .= '%'; $urlencode .= $QQhexchars[(ord($str[$x]) >> 4)]; $urlencode .= $QQhexchars[(ord($str[$x]) & 15)]; } else { $urlencode .= $str[$x]; } } return $urlencode; } function QQConnect_urldecode($str) { global $QQhexchars; $urldecode = ""; $len = strlen($str); for ($x = 0; $x < $len; $x++) { if ($str[$x] == '%' && ($len - $x) > 2 && (strpos($QQhexchars, $str[$x+1]) !== false) && (strpos($QQhexchars, $str[$x+2]) !== false)) { $tmp = $str[$x+1].$str[$x+2]; $urldecode .= chr(hexdec($tmp)); $x += 2; } else { $urldecode .= $str[$x]; } } return $urldecode; } /** * @brief 对参数进行字典升序排序 * * @param $params 参数列表 * * @return 排序后用&链接的key-value对(key1=value1&key2=value2...) */ function get_normalized_string($params) { ksort($params); $normalized = array(); foreach($params as $key => $val) { $normalized[] = $key."=".$val; } return implode("&", $normalized); } /** * @brief 使用HMAC-SHA1算法生成oauth_signature签名值 * * @param $key 密钥 * @param $str 源串 * * @return 签名值 */ function get_signature($str, $key) { $signature = ""; if (function_exists('hash_hmac')) { $signature = base64_encode(hash_hmac("sha1", $str, $key, true)); } else { $blocksize = 64; $hashfunc = 'sha1'; if (strlen($key) > $blocksize) { $key = pack('H*', $hashfunc($key)); } $key = str_pad($key,$blocksize,chr(0x00)); $ipad = str_repeat(chr(0x36),$blocksize); $opad = str_repeat(chr(0x5c),$blocksize); $hmac = pack( 'H*',$hashfunc( ($key^$opad).pack( 'H*',$hashfunc( ($key^$ipad).$str ) ) ) ); $signature = base64_encode($hmac); } return $signature; } /** * @brief 对字符串进行URL编码,遵循rfc1738 urlencode * * @param $params * * @return URL编码后的字符串 */ function get_urlencode_string($params) { ksort($params); $normalized = array(); foreach($params as $key => $val) { $normalized[] = $key."=".QQConnect_urlencode($val); } return implode("&", $normalized); } /** * @brief 检查openid是否合法 * * @param $openid 与用户QQ号码一一对应 * @param $timestamp 时间戳 * @param $sig  签名值 * * @return true or false */ function is_valid_openid($openid, $timestamp, $sig) { global $global_arg; $key = $_SESSION["appkey"]; $str = $openid.$timestamp; $signature = get_signature($str, $key); $global_arg = $signature; return $sig == $signature; } /** * @brief 所有Get请求都可以使用这个方法 * * @param $url * @param $appid * @param $appkey * @param $access_token * @param $access_token_secret * @param $openid * * @return true or false */ function do_get($url, $appid, $appkey, $access_token, $access_token_secret, $openid) { $sigstr = "GET"."&".QQConnect_urlencode("$url")."&"; //必要参数, 不要随便更改!! $params = $_GET; $params["oauth_version"] = "1.0"; $params["oauth_signature_method"] = "HMAC-SHA1"; $params["oauth_timestamp"] = time(); $params["oauth_nonce"] = mt_rand(); $params["oauth_consumer_key"] = $appid; $params["oauth_token"] = $access_token; $params["openid"] = $openid; unset($params["oauth_signature"]); //参数按照字母升序做序列化 $normalized_str = get_normalized_string($params); $sigstr .= QQConnect_urlencode($normalized_str); //签名,确保php版本支持hash_hmac函数 $key = $appkey."&".$access_token_secret; $signature = get_signature($sigstr, $key); $url .= "?".$normalized_str."&"."oauth_signature=".QQConnect_urlencode($signature); //echo "$url\n"; return file_get_contents($url); } /** * @brief 所有multi-part post 请求都可以使用这个方法 * * @param $url * @param $appid * @param $appkey * @param $access_token * @param $access_token_secret * @param $openid * */ function do_multi_post($url, $appid, $appkey, $access_token, $access_token_secret, $openid) { //构造签名串.源串:方法[GET|POST]&uri&参数按照字母升序排列 $sigstr = "POST"."&"."$url"."&"; //必要参数,不要随便更改!! $params = $_POST; $params["oauth_version"] = "1.0"; $params["oauth_signature_method"] = "HMAC-SHA1"; $params["oauth_timestamp"] = time(); $params["oauth_nonce"] = mt_rand(); $params["oauth_consumer_key"] = $appid; $params["oauth_token"] = $access_token; $params["openid"] = $openid; unset($params["oauth_signature"]); //获取上传图片信息 foreach ($_FILES as $filename => $filevalue) { if ($filevalue["error"] != UPLOAD_ERR_OK) { //echo "upload file error $filevalue['error']\n"; //exit; } $params[$filename] = file_get_contents($filevalue["tmp_name"]); } //对参数按照字母升序做序列化 $sigstr .= get_normalized_string($params); //签名,需要确保php版本支持hash_hmac函数 $key = $appkey."&".$access_token_secret; $signature = get_signature($sigstr, $key); $params["oauth_signature"] = $signature; //处理上传图片 foreach ($_FILES as $filename => $filevalue) { $tmpfile = dirname($filevalue["tmp_name"])."/".$filevalue["name"]; move_uploaded_file($filevalue["tmp_name"], $tmpfile); $params[$filename] = "@$tmpfile"; } /* echo "len: ".strlen($sigstr)."\n"; echo "sig: $sigstr\n"; echo "key: $appkey&\n"; */ $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_URL, $url); $ret = curl_exec($ch); //$httpinfo = curl_getinfo($ch); //print_r($httpinfo); curl_close($ch); //删除上传临时文件 unlink($tmpfile); return $ret; } /** * @brief 所有post 请求都可以使用这个方法 * * @param $url * @param $appid * @param $appkey * @param $access_token * @param $access_token_secret * @param $openid * */ function do_post($url, $appid, $appkey, $access_token, $access_token_secret, $openid) { //构造签名串.源串:方法[GET|POST]&uri&参数按照字母升序排列 $sigstr = "POST"."&".QQConnect_urlencode($url)."&"; //必要参数,不要随便更改!! $params = $_POST; $params["oauth_version"] = "1.0"; $params["oauth_signature_method"] = "HMAC-SHA1"; $params["oauth_timestamp"] = time(); $params["oauth_nonce"] = mt_rand(); $params["oauth_consumer_key"] = $appid; $params["oauth_token"] = $access_token; $params["openid"] = $openid; unset($params["oauth_signature"]); //对参数按照字母升序做序列化 $sigstr .= QQConnect_urlencode(get_normalized_string($params)); //签名,需要确保php版本支持hash_hmac函数 $key = $appkey."&".$access_token_secret; $signature = get_signature($sigstr, $key); $params["oauth_signature"] = $signature; $postdata = get_urlencode_string($params); //echo "$sigstr******\n"; //echo "$postdata\n"; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata); curl_setopt($ch, CURLOPT_URL, $url); $ret = curl_exec($ch); curl_close($ch); return $ret; } ?>
guotao2000/ecmall
includes/third/qq_api/comm/utils.php
PHP
mit
9,347
require 'spec_helper' describe Gitlab::Conflict::FileCollection do let(:merge_request) { create(:merge_request, source_branch: 'conflict-resolvable', target_branch: 'conflict-start') } let(:file_collection) { described_class.read_only(merge_request) } describe '#files' do it 'returns an array of Conflict::Files' do expect(file_collection.files).to all(be_an_instance_of(Gitlab::Conflict::File)) end end describe '#default_commit_message' do it 'matches the format of the git CLI commit message' do expect(file_collection.default_commit_message).to eq(<<EOM.chomp) Merge branch 'conflict-start' into 'conflict-resolvable' # Conflicts: # files/ruby/popen.rb # files/ruby/regex.rb EOM end end end
t-zuehlsdorff/gitlabhq
spec/lib/gitlab/conflict/file_collection_spec.rb
Ruby
mit
744
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "wallet.h" #include "walletdb.h" #include "crypter.h" #include "ui_interface.h" #include "base58.h" #include <boost/algorithm/string/replace.hpp> using namespace std; ////////////////////////////////////////////////////////////////////////////// // // mapWallet // struct CompareValueOnly { bool operator()(const pair<int64, pair<const CWalletTx*, unsigned int> >& t1, const pair<int64, pair<const CWalletTx*, unsigned int> >& t2) const { return t1.first < t2.first; } }; CPubKey CWallet::GenerateNewKey(std::string username) { bool fCompressed = CanSupportFeature(FEATURE_COMPRPUBKEY); // default to compressed public keys if we want 0.6.0 wallets RandAddSeedPerfmon(); CKey secret; secret.MakeNewKey(fCompressed); // Compressed public keys were introduced in version 0.6.0 if (fCompressed) SetMinVersion(FEATURE_COMPRPUBKEY); CPubKey pubkey = secret.GetPubKey(); // Create new metadata int64 nCreationTime = GetTime(); mapKeyMetadata[pubkey.GetID()] = CKeyMetadata(nCreationTime, username); if (!nTimeFirstKey || nCreationTime < nTimeFirstKey) nTimeFirstKey = nCreationTime; if (!AddKeyPubKey(secret, pubkey)) throw std::runtime_error("CWallet::GenerateNewKey() : AddKey failed"); if (!vchDefaultKey.IsValid()) vchDefaultKey = pubkey; return pubkey; } bool CWallet::AddKeyPubKey(const CKey& secret, const CPubKey &pubkey) { if (!CCryptoKeyStore::AddKeyPubKey(secret, pubkey)) return false; if (!fFileBacked) return true; if (!IsCrypted()) { return CWalletDB(strWalletFile).WriteKey(pubkey, secret.GetPrivKey(), mapKeyMetadata[pubkey.GetID()]); } return true; } bool CWallet::AddCryptedKey(const CPubKey &vchPubKey, const vector<unsigned char> &vchCryptedSecret) { if (!CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret)) return false; if (!fFileBacked) return true; { LOCK(cs_wallet); if (pwalletdbEncryption) return pwalletdbEncryption->WriteCryptedKey(vchPubKey, vchCryptedSecret, mapKeyMetadata[vchPubKey.GetID()]); else return CWalletDB(strWalletFile).WriteCryptedKey(vchPubKey, vchCryptedSecret, mapKeyMetadata[vchPubKey.GetID()]); } return false; } bool CWallet::LoadKeyMetadata(const CPubKey &pubkey, const CKeyMetadata &meta) { if (meta.nCreateTime && (!nTimeFirstKey || meta.nCreateTime < nTimeFirstKey)) nTimeFirstKey = meta.nCreateTime; mapKeyMetadata[pubkey.GetID()] = meta; return true; } bool CWallet::GetKeyIdFromUsername(std::string username, CKeyID &keyid) { for (std::map<CKeyID, CKeyMetadata>::const_iterator it = mapKeyMetadata.begin(); it != mapKeyMetadata.end(); it++) { if (it->second.username == username) { keyid = it->first; return true; } } return false; } bool CWallet::GetUsernameFromKeyId(CKeyID keyid, std::string &username) { for (std::map<CKeyID, CKeyMetadata>::const_iterator it = mapKeyMetadata.begin(); it != mapKeyMetadata.end(); it++) { if (it->first == keyid) { username = it->second.username; return true; } } return false; } bool CWallet::AddWitnessTo(std::string username, std::string witness) { for (std::map<CKeyID, CKeyMetadata>::iterator it = mapKeyMetadata.begin(); it != mapKeyMetadata.end(); it++) { if (it->second.username == username) { it->second.witness = witness; // [AP] make sure new metadata is updated on disk CPubKey pubkey; CKey secret; printf(BLUE "GetPubKey\n" RESET); GetPubKey(it->first, pubkey); printf(BLUE "GetKey\n" RESET); GetKey(it->first, secret); if (!IsCrypted()) { printf(BLUE "CWalletDB.WriteKey\n" RESET); CWalletDB(strWalletFile).WriteKey(pubkey, secret.GetPrivKey(), it->second); printf(BLUE "witness: %s added to user: %s\n" RESET, witness.c_str(), username.c_str()); } else { printf("WARNING: MoveKeyForReplacement not implemeted for crypted wallet. duplicate metadata may occur![AP](?)\n" ); } return true; } } return false; } bool CWallet::MoveKeyForReplacement(std::string username) { for (std::map<CKeyID, CKeyMetadata>::iterator it = mapKeyMetadata.begin(); it != mapKeyMetadata.end(); it++) { if (it->second.username == username) { mapKeyReplacement.insert(make_pair(it->first, username)); it->second.username += "/replaced"; // prevents being used again with GetKeyIdFromUsername // [MF] make sure old metadata (with new name) is updated on disk CPubKey pubkey; CKey secret; GetPubKey(it->first, pubkey); GetKey(it->first,secret); if (!IsCrypted()) { CWalletDB(strWalletFile).WriteKey(pubkey, secret.GetPrivKey(), it->second); } else { printf("WARNING: MoveKeyForReplacement not implemeted for crypted wallet. duplicate metadata may occur!\n" ); } return true; } } return false; } bool CWallet::GetKeyIdBeingReplaced(std::string username, CKeyID &keyid) { for (std::map<CKeyID, string>::const_iterator it = mapKeyReplacement.begin(); it != mapKeyReplacement.end(); it++) { if (it->second == username) { keyid = it->first; return true; } } return false; } bool CWallet::ForgetReplacementMap(std::string username) { for (std::map<CKeyID, string>::iterator it = mapKeyReplacement.begin(); it != mapKeyReplacement.end(); it++) { if (it->second == username) { mapKeyReplacement.erase(it); return true; } } return false; } bool CWallet::LoadCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret) { return CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret); } bool CWallet::Unlock(const SecureString& strWalletPassphrase) { CCrypter crypter; CKeyingMaterial vMasterKey; { LOCK(cs_wallet); BOOST_FOREACH(const MasterKeyMap::value_type& pMasterKey, mapMasterKeys) { if(!crypter.SetKeyFromPassphrase(strWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod)) return false; if (!crypter.Decrypt(pMasterKey.second.vchCryptedKey, vMasterKey)) continue; // try another master key if (CCryptoKeyStore::Unlock(vMasterKey)) return true; } } return false; } bool CWallet::ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase) { bool fWasLocked = IsLocked(); { LOCK(cs_wallet); Lock(); CCrypter crypter; CKeyingMaterial vMasterKey; BOOST_FOREACH(MasterKeyMap::value_type& pMasterKey, mapMasterKeys) { if(!crypter.SetKeyFromPassphrase(strOldWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod)) return false; if (!crypter.Decrypt(pMasterKey.second.vchCryptedKey, vMasterKey)) return false; if (CCryptoKeyStore::Unlock(vMasterKey)) { int64 nStartTime = GetTimeMillis(); crypter.SetKeyFromPassphrase(strNewWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod); pMasterKey.second.nDeriveIterations = pMasterKey.second.nDeriveIterations * (100 / ((double)(GetTimeMillis() - nStartTime))); nStartTime = GetTimeMillis(); crypter.SetKeyFromPassphrase(strNewWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod); pMasterKey.second.nDeriveIterations = (pMasterKey.second.nDeriveIterations + pMasterKey.second.nDeriveIterations * 100 / ((double)(GetTimeMillis() - nStartTime))) / 2; if (pMasterKey.second.nDeriveIterations < 25000) pMasterKey.second.nDeriveIterations = 25000; printf("Wallet passphrase changed to an nDeriveIterations of %i\n", pMasterKey.second.nDeriveIterations); if (!crypter.SetKeyFromPassphrase(strNewWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod)) return false; if (!crypter.Encrypt(vMasterKey, pMasterKey.second.vchCryptedKey)) return false; CWalletDB(strWalletFile).WriteMasterKey(pMasterKey.first, pMasterKey.second); if (fWasLocked) Lock(); return true; } } } return false; } void CWallet::SetBestChain(const CBlockLocator& loc) { CWalletDB walletdb(strWalletFile); walletdb.WriteBestBlock(loc); } // This class implements an addrIncoming entry that causes pre-0.4 // clients to crash on startup if reading a private-key-encrypted wallet. class CCorruptAddress { public: IMPLEMENT_SERIALIZE ( if (nType & SER_DISK) READWRITE(nVersion); ) }; bool CWallet::SetMinVersion(enum WalletFeature nVersion, CWalletDB* pwalletdbIn, bool fExplicit) { if (nWalletVersion >= nVersion) return true; // when doing an explicit upgrade, if we pass the max version permitted, upgrade all the way if (fExplicit && nVersion > nWalletMaxVersion) nVersion = FEATURE_LATEST; nWalletVersion = nVersion; if (nVersion > nWalletMaxVersion) nWalletMaxVersion = nVersion; if (fFileBacked) { CWalletDB* pwalletdb = pwalletdbIn ? pwalletdbIn : new CWalletDB(strWalletFile); if (nWalletVersion >= 40000) { // Versions prior to 0.4.0 did not support the "minversion" record. // Use a CCorruptAddress to make them crash instead. CCorruptAddress corruptAddress; pwalletdb->WriteSetting("addrIncoming", corruptAddress); } if (nWalletVersion > 40000) pwalletdb->WriteMinVersion(nWalletVersion); if (!pwalletdbIn) delete pwalletdb; } return true; } bool CWallet::SetMaxVersion(int nVersion) { // cannot downgrade below current version if (nWalletVersion > nVersion) return false; nWalletMaxVersion = nVersion; return true; } bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase) { if (IsCrypted()) return false; CKeyingMaterial vMasterKey; RandAddSeedPerfmon(); vMasterKey.resize(WALLET_CRYPTO_KEY_SIZE); RAND_bytes(&vMasterKey[0], WALLET_CRYPTO_KEY_SIZE); CMasterKey kMasterKey; RandAddSeedPerfmon(); kMasterKey.vchSalt.resize(WALLET_CRYPTO_SALT_SIZE); RAND_bytes(&kMasterKey.vchSalt[0], WALLET_CRYPTO_SALT_SIZE); CCrypter crypter; int64 nStartTime = GetTimeMillis(); crypter.SetKeyFromPassphrase(strWalletPassphrase, kMasterKey.vchSalt, 25000, kMasterKey.nDerivationMethod); kMasterKey.nDeriveIterations = 2500000 / ((double)(GetTimeMillis() - nStartTime)); nStartTime = GetTimeMillis(); crypter.SetKeyFromPassphrase(strWalletPassphrase, kMasterKey.vchSalt, kMasterKey.nDeriveIterations, kMasterKey.nDerivationMethod); kMasterKey.nDeriveIterations = (kMasterKey.nDeriveIterations + kMasterKey.nDeriveIterations * 100 / ((double)(GetTimeMillis() - nStartTime))) / 2; if (kMasterKey.nDeriveIterations < 25000) kMasterKey.nDeriveIterations = 25000; printf("Encrypting Wallet with an nDeriveIterations of %i\n", kMasterKey.nDeriveIterations); if (!crypter.SetKeyFromPassphrase(strWalletPassphrase, kMasterKey.vchSalt, kMasterKey.nDeriveIterations, kMasterKey.nDerivationMethod)) return false; if (!crypter.Encrypt(vMasterKey, kMasterKey.vchCryptedKey)) return false; { LOCK(cs_wallet); mapMasterKeys[++nMasterKeyMaxID] = kMasterKey; if (fFileBacked) { pwalletdbEncryption = new CWalletDB(strWalletFile); if (!pwalletdbEncryption->TxnBegin()) return false; pwalletdbEncryption->WriteMasterKey(nMasterKeyMaxID, kMasterKey); } if (!EncryptKeys(vMasterKey)) { if (fFileBacked) pwalletdbEncryption->TxnAbort(); exit(1); //We now probably have half of our keys encrypted in memory, and half not...die and let the user reload their unencrypted wallet. } // Encryption was introduced in version 0.4.0 SetMinVersion(FEATURE_WALLETCRYPT, pwalletdbEncryption, true); if (fFileBacked) { if (!pwalletdbEncryption->TxnCommit()) exit(1); //We now have keys encrypted in memory, but no on disk...die to avoid confusion and let the user reload their unencrypted wallet. delete pwalletdbEncryption; pwalletdbEncryption = NULL; } Lock(); Unlock(strWalletPassphrase); Lock(); // Need to completely rewrite the wallet file; if we don't, bdb might keep // bits of the unencrypted private key in slack space in the database file. CDB::Rewrite(strWalletFile); } NotifyStatusChanged(this); return true; } int64 CWallet::IncOrderPosNext(CWalletDB *pwalletdb) { int64 nRet = nOrderPosNext++; if (pwalletdb) { pwalletdb->WriteOrderPosNext(nOrderPosNext); } else { CWalletDB(strWalletFile).WriteOrderPosNext(nOrderPosNext); } return nRet; } void CWallet::MarkDirty() { { LOCK(cs_wallet); /* BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet) item.second.MarkDirty(); */ } } bool CWallet::AddToWallet(const CWalletTx& wtxIn) { uint256 hash = wtxIn.GetHash(); { LOCK(cs_wallet); // Inserts only if not already there, returns tx inserted or tx found pair<map<uint256, CWalletTx>::iterator, bool> ret = mapWallet.insert(make_pair(hash, wtxIn)); CWalletTx& wtx = (*ret.first).second; wtx.BindWallet(this); bool fInsertedNew = ret.second; if (fInsertedNew) { wtx.nTimeReceived = GetAdjustedTime(); wtx.nOrderPos = IncOrderPosNext(); wtx.nTimeSmart = wtx.nTimeReceived; if (wtxIn.hashBlock != 0) { if (mapBlockIndex.count(wtxIn.hashBlock)) { unsigned int& blocktime = mapBlockIndex[wtxIn.hashBlock]->nTime; wtx.nTimeSmart = blocktime; } else printf("AddToWallet() : found %s in block %s not in index\n", wtxIn.GetHash().ToString().c_str(), wtxIn.hashBlock.ToString().c_str()); } } bool fUpdated = false; if (!fInsertedNew) { // Merge if (wtxIn.hashBlock != 0 && wtxIn.hashBlock != wtx.hashBlock) { wtx.hashBlock = wtxIn.hashBlock; fUpdated = true; } if (wtxIn.nIndex != -1 && (wtxIn.vMerkleBranch != wtx.vMerkleBranch || wtxIn.nIndex != wtx.nIndex)) { wtx.vMerkleBranch = wtxIn.vMerkleBranch; wtx.nIndex = wtxIn.nIndex; fUpdated = true; } if (wtxIn.fFromMe && wtxIn.fFromMe != wtx.fFromMe) { wtx.fFromMe = wtxIn.fFromMe; fUpdated = true; } } //// debug print printf("AddToWallet %s %s%s\n", wtxIn.GetHash().ToString().c_str(), (fInsertedNew ? "new" : ""), (fUpdated ? "update" : "")); // Write to disk if (fInsertedNew || fUpdated) if (!wtx.WriteToDisk()) return false; if (!fHaveGUI) { // If default receiving address gets used, replace it with a new one if (vchDefaultKey.IsValid()) { CScript scriptDefaultKey; scriptDefaultKey.SetDestination(vchDefaultKey.GetID()); /* BOOST_FOREACH(const CTxOut& txout, wtx.vout) { if (txout.scriptPubKey == scriptDefaultKey) { CPubKey newDefaultKey; if (GetKeyFromPool(newDefaultKey, false)) { SetDefaultKey(newDefaultKey); SetAddressBookName(vchDefaultKey.GetID(), ""); } } } */ } } // Notify UI of new or updated transaction NotifyTransactionChanged(this, hash, fInsertedNew ? CT_NEW : CT_UPDATED); // notify an external script when a wallet transaction comes in or is updated std::string strCmd = GetArg("-walletnotify", ""); if ( !strCmd.empty()) { boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex()); boost::thread t(runCommand, strCmd); // thread runs free } } return true; } // Add a transaction to the wallet, or update it. // pblock is optional, but should be provided if the transaction is known to be in a block. // If fUpdate is true, existing transactions will be updated. bool CWallet::AddToWalletIfInvolvingMe(const uint256 &hash, const CTransaction& tx, const CBlock* pblock, bool fUpdate, bool fFindBlock) { { LOCK(cs_wallet); bool fExisted = mapWallet.count(hash); if (fExisted && !fUpdate) return false; if (fExisted || IsMine(tx) || IsFromMe(tx)) { CWalletTx wtx(this,tx); // Get merkle branch if transaction was found in a block if (pblock) wtx.SetMerkleBranch(pblock); return AddToWallet(wtx); } } return false; } bool CWallet::EraseFromWallet(uint256 hash) { if (!fFileBacked) return false; { LOCK(cs_wallet); if (mapWallet.erase(hash)) CWalletDB(strWalletFile).EraseTx(hash); } return true; } int64 CWalletTx::GetTxTime() const { int64 n = nTimeSmart; return n ? n : nTimeReceived; } int CWalletTx::GetRequestCount() const { // Returns -1 if it wasn't being tracked int nRequests = -1; { LOCK(pwallet->cs_wallet); if (IsSpamMessage()) { // Generated block if (hashBlock != 0) { map<uint256, int>::const_iterator mi = pwallet->mapRequestCount.find(hashBlock); if (mi != pwallet->mapRequestCount.end()) nRequests = (*mi).second; } } else { // Did anyone request this transaction? map<uint256, int>::const_iterator mi = pwallet->mapRequestCount.find(GetHash()); if (mi != pwallet->mapRequestCount.end()) { nRequests = (*mi).second; // How about the block it's in? if (nRequests == 0 && hashBlock != 0) { map<uint256, int>::const_iterator mi = pwallet->mapRequestCount.find(hashBlock); if (mi != pwallet->mapRequestCount.end()) nRequests = (*mi).second; else nRequests = 1; // If it's in someone else's block it must have got out } } } } return nRequests; } void CWalletTx::AddSupportingTransactions() { // [MF] remove me } bool CWalletTx::WriteToDisk() { return CWalletDB(pwallet->strWalletFile).WriteTx(GetHash(), *this); } // Scan the block chain (starting in pindexStart) for transactions // from or to us. If fUpdate is true, found transactions that already // exist in the wallet will be updated. int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) { int ret = 0; CBlockIndex* pindex = pindexStart; { LOCK(cs_wallet); while (pindex) { // no need to read and scan block, if block was created before // our wallet birthday (as adjusted for block time variability) if (nTimeFirstKey && (pindex->nTime < (nTimeFirstKey - 7200))) { pindex = pindex->GetNextInMainChain(); continue; } CBlock block; ReadBlockFromDisk(block, pindex); BOOST_FOREACH(CTransaction& tx, block.vtx) { if (AddToWalletIfInvolvingMe(tx.GetHash(), tx, &block, fUpdate)) ret++; } pindex = pindex->GetNextInMainChain(); } } return ret; } void CWallet::ReacceptWalletTransactions() { bool fRepeat = true; while (fRepeat) { LOCK(cs_wallet); fRepeat = false; bool fMissing = false; BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet) { CWalletTx& wtx = item.second; if (wtx.IsSpamMessage() ) continue; CTransaction tx; uint256 hashBlock; //bool fUpdated = false; bool fFound = false; // [MF] can't use GetTransaction from main.cpp here. so? // GetTransaction(wtx.GetUsernameHash(), tx, hashBlock); if (fFound || wtx.GetDepthInMainChain() > 0) { /* // Update fSpent if a tx got spent somewhere else by a copy of wallet.dat for (unsigned int i = 0; i < wtx.vout.size(); i++) { if (wtx.IsSpent(i)) continue; if ((i >= coins.vout.size() || coins.vout[i].IsNull()) && IsMine(wtx.vout[i])) { wtx.MarkSpent(i); fUpdated = true; fMissing = true; } } if (fUpdated) { printf("ReacceptWalletTransactions found spent coin %sbc %s\n", FormatMoney(wtx.GetCredit()).c_str(), wtx.GetHash().ToString().c_str()); wtx.MarkDirty(); wtx.WriteToDisk(); } */ } else { // Re-accept any txes of ours that aren't already in a block if (!wtx.IsSpamMessage()) wtx.AcceptWalletTransaction(); } } if (fMissing) { // TODO: optimize this to scan just part of the block chain? if (ScanForWalletTransactions(pindexGenesisBlock)) fRepeat = true; // Found missing transactions: re-do re-accept. } } } void CWalletTx::RelayWalletTransaction() { if (!IsSpamMessage()) { if (GetDepthInMainChain() == 0) { uint256 hash = GetHash(); printf("Relaying wtx %s\n", hash.ToString().c_str()); RelayTransaction((CTransaction)*this, hash); } } } void CWallet::ResendWalletTransactions() { // Do this infrequently and randomly to avoid giving away // that these are our transactions. static int64 nNextTime; if (GetTime() < nNextTime) return; bool fFirst = (nNextTime == 0); nNextTime = GetTime() + GetRand(30 * 60); if (fFirst) return; // Only do it if there's been a new block since last time static int64 nLastTime; if (nTimeBestReceived < nLastTime) return; nLastTime = GetTime(); // Rebroadcast any of our txes that aren't in a block yet printf("ResendWalletTransactions()\n"); { LOCK(cs_wallet); // Sort them in chronological order multimap<unsigned int, CWalletTx*> mapSorted; BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet) { CWalletTx& wtx = item.second; // Don't rebroadcast until it's had plenty of time that // it should have gotten in already by now. if (nTimeBestReceived - (int64)wtx.nTimeReceived > 5 * 60) mapSorted.insert(make_pair(wtx.nTimeReceived, &wtx)); } BOOST_FOREACH(PAIRTYPE(const unsigned int, CWalletTx*)& item, mapSorted) { CWalletTx& wtx = *item.second; wtx.RelayWalletTransaction(); } } } ////////////////////////////////////////////////////////////////////////////// // // Actions // DBErrors CWallet::LoadWallet(bool& fFirstRunRet) { if (!fFileBacked) return DB_LOAD_OK; fFirstRunRet = false; DBErrors nLoadWalletRet = CWalletDB(strWalletFile,"cr+").LoadWallet(this); if (nLoadWalletRet == DB_NEED_REWRITE) { if (CDB::Rewrite(strWalletFile, "\x04pool")) { setKeyPool.clear(); // Note: can't top-up keypool here, because wallet is locked. // User will be prompted to unlock wallet the next operation // the requires a new key. } } if (nLoadWalletRet != DB_LOAD_OK) return nLoadWalletRet; fFirstRunRet = !vchDefaultKey.IsValid(); return DB_LOAD_OK; } bool CWallet::SetDefaultKey(const CPubKey &vchPubKey) { if (fFileBacked) { if (!CWalletDB(strWalletFile).WriteDefaultKey(vchPubKey)) return false; } vchDefaultKey = vchPubKey; return true; } bool GetWalletFile(CWallet* pwallet, string &strWalletFileOut) { if (!pwallet->fFileBacked) return false; strWalletFileOut = pwallet->strWalletFile; return true; } void CWallet::UpdatedTransaction(const uint256 &hashTx) { { LOCK(cs_wallet); // Only notify UI if this transaction is in this wallet map<uint256, CWalletTx>::const_iterator mi = mapWallet.find(hashTx); if (mi != mapWallet.end()) NotifyTransactionChanged(this, hashTx, CT_UPDATED); } } void CWallet::GetKeyBirthTimes(std::map<CKeyID, int64> &mapKeyBirth) const { mapKeyBirth.clear(); // get birth times for keys with metadata for (std::map<CKeyID, CKeyMetadata>::const_iterator it = mapKeyMetadata.begin(); it != mapKeyMetadata.end(); it++) if (it->second.nCreateTime) mapKeyBirth[it->first] = it->second.nCreateTime; // map in which we'll infer heights of other keys CBlockIndex *pindexMax = FindBlockByHeight(std::max(0, nBestHeight - 144)); // the tip can be reorganised; use a 144-block safety margin std::map<CKeyID, CBlockIndex*> mapKeyFirstBlock; std::set<CKeyID> setKeys; GetKeys(setKeys); BOOST_FOREACH(const CKeyID &keyid, setKeys) { if (mapKeyBirth.count(keyid) == 0) mapKeyFirstBlock[keyid] = pindexMax; } setKeys.clear(); // if there are no such keys, we're done if (mapKeyFirstBlock.empty()) return; /* // find first block that affects those keys, if there are any left std::vector<CKeyID> vAffected; for (std::map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); it++) { // iterate over all wallet transactions... const CWalletTx &wtx = (*it).second; std::map<uint256, CBlockIndex*>::const_iterator blit = mapBlockIndex.find(wtx.hashBlock); if (blit != mapBlockIndex.end() && blit->second->IsInMainChain()) { // ... which are already in a block int nHeight = blit->second->nHeight; BOOST_FOREACH(const CTxOut &txout, wtx.vout) { // iterate over all their outputs ::ExtractAffectedKeys(*this, txout.scriptPubKey, vAffected); BOOST_FOREACH(const CKeyID &keyid, vAffected) { // ... and all their affected keys std::map<CKeyID, CBlockIndex*>::iterator rit = mapKeyFirstBlock.find(keyid); if (rit != mapKeyFirstBlock.end() && nHeight < rit->second->nHeight) rit->second = blit->second; } vAffected.clear(); } } } */ // Extract block timestamps for those keys for (std::map<CKeyID, CBlockIndex*>::const_iterator it = mapKeyFirstBlock.begin(); it != mapKeyFirstBlock.end(); it++) mapKeyBirth[it->first] = it->second->nTime - 7200; // block times can be 2h off }
manuel-zulian/accumunet
src/wallet.cpp
C++
mit
29,384
# frozen_string_literal: true require_relative "data_cleanup/model_check" require_relative "data_cleanup/instance_check" require_relative "data_cleanup/reporting" require_relative "data_cleanup/rules" module DataCleanup COLOR_CODES = { red: 31, green: 32 }.freeze module_function def logger @logger ||= Logger.new(Rails.root.join("log", "validations.log")) end def display(message, inline: false, color: nil) message = "#{message}\n" unless inline message = "\e[#{COLOR_CODES[color]}m#{message}\e[0m" if color print message end end
CDLUC3/dmptool
lib/data_cleanup.rb
Ruby
mit
567
package com.itelg.spring.actuator; import java.util.Properties; import org.springframework.amqp.core.Queue; import org.springframework.amqp.rabbit.core.RabbitAdmin; import org.springframework.util.Assert; public class RabbitQueuePropertiesManager { public RabbitQueueProperties request(Queue queue) { RabbitAdmin rabbitAdmin = validateRabbitAdmin(queue); Properties queueProperties = rabbitAdmin.getQueueProperties(queue.getName()); RabbitQueueProperties properties = new RabbitQueueProperties(); properties.setConsumerCount(Integer.parseInt(queueProperties.get("QUEUE_CONSUMER_COUNT").toString())); properties.setMessageCount(Integer.parseInt(queueProperties.get("QUEUE_MESSAGE_COUNT").toString())); return properties; } private RabbitAdmin validateRabbitAdmin(Queue queue) { Assert.notEmpty(queue.getDeclaringAdmins(), "At least one RabbitAdmin must be declared"); Object object = queue.getDeclaringAdmins().iterator().next(); Assert.isInstanceOf(RabbitAdmin.class, object, "DeclaringAdmin must be a RabbitAdmin"); return (RabbitAdmin) object; } }
julian-eggers/spring-boot-monitoring
src/main/java/com/itelg/spring/actuator/RabbitQueuePropertiesManager.java
Java
mit
1,080
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors # License: MIT. See LICENSE # import frappe import unittest class TestModuleOnboarding(unittest.TestCase): pass
frappe/frappe
frappe/desk/doctype/module_onboarding/test_module_onboarding.py
Python
mit
197
<TS language="sr" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Right-click to edit address or label</source> <translation>Десни клик за измену адресе или ознаке</translation> </message> <message> <source>Create a new address</source> <translation>Направи нову адресу</translation> </message> <message> <source>&amp;New</source> <translation>&amp;Ново</translation> </message> <message> <source>Copy the currently selected address to the system clipboard</source> <translation>Копирај тренутно одабрану адресу</translation> </message> <message> <source>&amp;Copy</source> <translation>&amp;Копирај</translation> </message> <message> <source>C&amp;lose</source> <translation>&amp;Затвори</translation> </message> <message> <source>Delete the currently selected address from the list</source> <translation>Обриши тренутно одабрану адресу са листе</translation> </message> <message> <source>Enter address or label to search</source> <translation>Унеси адресу или назив ознаке за претрагу</translation> </message> <message> <source>Export the data in the current tab to a file</source> <translation>Извези податке из одабране картице у датотеку</translation> </message> <message> <source>&amp;Export</source> <translation>&amp;Извези</translation> </message> <message> <source>&amp;Delete</source> <translation>&amp;Обриши</translation> </message> <message> <source>Choose the address to send coins to</source> <translation>Одабери адресу за слање</translation> </message> <message> <source>Choose the address to receive coins with</source> <translation>Одабери адресу за примање</translation> </message> <message> <source>C&amp;hoose</source> <translation>&amp;Одабери</translation> </message> <message> <source>Sending addresses</source> <translation>Адресе за слање</translation> </message> <message> <source>Receiving addresses</source> <translation>Адресе за примање</translation> </message> <message> <source>These are your Particl addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation>Ово су твоје Биткоин адресе за слање уплата. Увек добро провери износ и адресу на коју шаљеш пре него што пошаљеш уплату.</translation> </message> <message> <source>These are your Particl addresses for receiving payments. Use the 'Create new receiving address' button in the receive tab to create new addresses. Signing is only possible with addresses of the type 'legacy'.</source> <translation>Ово су твоје Биткоин адресе за приманје уплата. Користи дугме „Направи нову адресу за примање” у картици за примање за креирање нових адреса. Потписивање је могуђе само за адресе типа 'legacy'.</translation> </message> <message> <source>&amp;Copy Address</source> <translation>&amp;Копирај Адресу</translation> </message> <message> <source>Copy &amp;Label</source> <translation>Копирај &amp; Обележи</translation> </message> <message> <source>&amp;Edit</source> <translation>&amp;Измени</translation> </message> <message> <source>Export Address List</source> <translation>Извези Листу Адреса</translation> </message> <message> <source>Comma separated file (*.csv)</source> <translation>Зарезом одвојене вредности (*.csv)</translation> </message> <message> <source>Exporting Failed</source> <translation>Извоз Неуспешан</translation> </message> <message> <source>There was an error trying to save the address list to %1. Please try again.</source> <translation>Десила се грешка приликом покушаја да се листа адреса упамти на %1. Молимо покушајте поново.</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <source>Label</source> <translation>Ознака</translation> </message> <message> <source>Address</source> <translation>Адреса</translation> </message> <message> <source>(no label)</source> <translation>(без ознаке)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <source>Passphrase Dialog</source> <translation>Прозор за унос лозинке</translation> </message> <message> <source>Enter passphrase</source> <translation>Унеси лозинку</translation> </message> <message> <source>New passphrase</source> <translation>Нова лозинка</translation> </message> <message> <source>Repeat new passphrase</source> <translation>Понови нову лозинку</translation> </message> <message> <source>Show passphrase</source> <translation>Прикажи лозинку</translation> </message> <message> <source>Encrypt wallet</source> <translation>Шифрирај новчаник</translation> </message> <message> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>Ова операција захтева да унесеш лозинку новчаника како би се новчаник откључао.</translation> </message> <message> <source>Unlock wallet</source> <translation>Откључај новчаник</translation> </message> <message> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>Ова операција захтева да унесеш лозинку новчаника како би новчаник био дешифрован.</translation> </message> <message> <source>Decrypt wallet</source> <translation>Дешифруј новчаник</translation> </message> <message> <source>Change passphrase</source> <translation>Измени лозинку</translation> </message> <message> <source>Confirm wallet encryption</source> <translation>Потврди шифрирање новчаника</translation> </message> <message> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR PARTICL&lt;/b&gt;!</source> <translation>Упозорење: Уколико шифрираш новчаник и изгубиш своју лозинку, &lt;b&gt;ИЗГУБИЋЕШ СВЕ СВОЈЕ БИТКОИНЕ&lt;/b&gt;!</translation> </message> <message> <source>Are you sure you wish to encrypt your wallet?</source> <translation>Да ли сте сигурни да желите да шифрирате свој новчаник?</translation> </message> <message> <source>Wallet encrypted</source> <translation>Новчаник шифриран</translation> </message> <message> <source>Enter the new passphrase for the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>Унеси нову лозинку за новчаник&lt;br/&gt;Молимо користи лозинку од десет или више насумичних карактера&lt;b&gt;,или&lt;b&gt;осам или више речи&lt;/b&gt;.</translation> </message> <message> <source>Enter the old passphrase and new passphrase for the wallet.</source> <translation>Унеси стару лозинку и нову лозинку новчаника.</translation> </message> <message> <source>Remember that encrypting your wallet cannot fully protect your particl from being stolen by malware infecting your computer.</source> <translation>Упамти, шифрирање новчаника не може у потуности заштити твоје биткоине од крађе од стране малвера инфицира твој рачунар.</translation> </message> <message> <source>Wallet to be encrypted</source> <translation>Новчаник за шифрирање</translation> </message> <message> <source>Your wallet is about to be encrypted. </source> <translation>Твој новчаник биће шифриран.</translation> </message> <message> <source>Your wallet is now encrypted. </source> <translation>Твој новчаник сада је шифриран.</translation> </message> <message> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation>ВАЖНО: Свакa претходнa резерва новчаника коју сте имали треба да се замени новим, шифрираним фајлом новчаника. Из сигурносних разлога, свака претходна резерва нешифрираног фајла новчаника постаће сувишна, чим почнете да користите нови, шифрирани новчаник.</translation> </message> <message> <source>Wallet encryption failed</source> <translation>Шифрирање новчаника неуспешно.</translation> </message> <message> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Шифрирање новчаника није успело због интерне грешке. Ваш новчаник није шифриран.</translation> </message> <message> <source>The supplied passphrases do not match.</source> <translation>Лозинке које сте унели нису исте.</translation> </message> <message> <source>Wallet unlock failed</source> <translation>Отључавање новчаника није успело.</translation> </message> <message> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>Лозинка коју сте унели за дешифровање новчаника је погрешна.</translation> </message> <message> <source>Wallet decryption failed</source> <translation>Дешифровање новчаника неуспешно.</translation> </message> <message> <source>Wallet passphrase was successfully changed.</source> <translation>Лозинка новчаника успешно је промењена.</translation> </message> <message> <source>Warning: The Caps Lock key is on!</source> <translation>Упозорање Caps Lock дугме укључено!</translation> </message> </context> <context> <name>BanTableModel</name> <message> <source>IP/Netmask</source> <translation>ИП/Нетмаск</translation> </message> <message> <source>Banned Until</source> <translation>Забрањен до</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <source>Sign &amp;message...</source> <translation>Потпиши &amp;поруку...</translation> </message> <message> <source>Synchronizing with network...</source> <translation>Синхронизација са мрежом у току...</translation> </message> <message> <source>&amp;Overview</source> <translation>&amp;Општи преглед</translation> </message> <message> <source>Show general overview of wallet</source> <translation>Погледајте општи преглед новчаника</translation> </message> <message> <source>&amp;Transactions</source> <translation>&amp;Трансакције</translation> </message> <message> <source>Browse transaction history</source> <translation>Претражите историјат трансакција</translation> </message> <message> <source>E&amp;xit</source> <translation>И&amp;злаз</translation> </message> <message> <source>Quit application</source> <translation>Напустите програм</translation> </message> <message> <source>&amp;About %1</source> <translation>&amp;О %1</translation> </message> <message> <source>Show information about %1</source> <translation>Прикажи информације о %1</translation> </message> <message> <source>About &amp;Qt</source> <translation>О &amp;Qt-у</translation> </message> <message> <source>Show information about Qt</source> <translation>Прегледај информације о Qt-у</translation> </message> <message> <source>&amp;Options...</source> <translation>П&amp;оставке...</translation> </message> <message> <source>Modify configuration options for %1</source> <translation>Измени конфигурацију поставки за %1</translation> </message> <message> <source>&amp;Encrypt Wallet...</source> <translation>&amp;Шифровање новчаника...</translation> </message> <message> <source>&amp;Backup Wallet...</source> <translation>&amp;Резерна копија новчаника</translation> </message> <message> <source>&amp;Change Passphrase...</source> <translation>&amp; Промени лозинку...</translation> </message> <message> <source>Open &amp;URI...</source> <translation>Отвори &amp;URI...</translation> </message> <message> <source>Create Wallet...</source> <translation>Направи Новчаник...</translation> </message> <message> <source>Create a new wallet</source> <translation>Направи нови ночаник</translation> </message> <message> <source>Wallet:</source> <translation>Новчаник:</translation> </message> <message> <source>Click to disable network activity.</source> <translation>Кликни да искључиш активност на мрежи.</translation> </message> <message> <source>Network activity disabled.</source> <translation>Активност на мрежи искључена.</translation> </message> <message> <source>Click to enable network activity again.</source> <translation>Кликни да поново омогућиш активност на мрежи.</translation> </message> <message> <source>Syncing Headers (%1%)...</source> <translation>Синхронизовање Заглавља (%1%)...</translation> </message> <message> <source>Reindexing blocks on disk...</source> <translation>Поново идексирање блокова на диску...</translation> </message> <message> <source>Proxy is &lt;b&gt;enabled&lt;/b&gt;: %1</source> <translation>Прокси је &lt;b&gt;омогућен&lt;/b&gt;: %1</translation> </message> <message> <source>Send coins to a Particl address</source> <translation>Пошаљи новац на Биткоин адресу</translation> </message> <message> <source>Backup wallet to another location</source> <translation>Направи резервну копију новчаника на другој локацији</translation> </message> <message> <source>Change the passphrase used for wallet encryption</source> <translation>Мењање лозинке којом се шифрује новчаник</translation> </message> <message> <source>&amp;Verify message...</source> <translation>&amp;Верификовање поруке...</translation> </message> <message> <source>&amp;Send</source> <translation>&amp;Пошаљи</translation> </message> <message> <source>&amp;Receive</source> <translation>&amp;Прими</translation> </message> <message> <source>&amp;Show / Hide</source> <translation>&amp;Прикажи / Сакриј</translation> </message> <message> <source>Show or hide the main Window</source> <translation>Прикажи или сакрији главни прозор</translation> </message> <message> <source>Encrypt the private keys that belong to your wallet</source> <translation>Шифрирај приватни клуљ који припада новчанику.</translation> </message> <message> <source>Sign messages with your Particl addresses to prove you own them</source> <translation>Потписуј поруку са своје Биткоин адресе као доказ да си њихов власник</translation> </message> <message> <source>Verify messages to ensure they were signed with specified Particl addresses</source> <translation>Верификуј поруке и утврди да ли су потписане од стране спецификованих Биткоин адреса</translation> </message> <message> <source>&amp;File</source> <translation>&amp;Фајл</translation> </message> <message> <source>&amp;Settings</source> <translation>&amp;Подешавања</translation> </message> <message> <source>&amp;Help</source> <translation>&amp;Помоћ</translation> </message> <message> <source>Tabs toolbar</source> <translation>Трака са картицама</translation> </message> <message> <source>Request payments (generates QR codes and particl: URIs)</source> <translation>Затражи плаћање (генерише QR кодове и биткоин: URI-е)</translation> </message> <message> <source>Show the list of used sending addresses and labels</source> <translation>Прегледајте листу коришћених адреса и етикета за слање уплата</translation> </message> <message> <source>Show the list of used receiving addresses and labels</source> <translation>Прегледајте листу коришћених адреса и етикета за пријем уплата</translation> </message> <message> <source>&amp;Command-line options</source> <translation>&amp;Опције командне линије</translation> </message> <message numerus="yes"> <source>%n active connection(s) to Particl network</source> <translation><numerusform>%n aктивна веза са Биткоин мрежом</numerusform><numerusform>%n aктивних веза са Биткоин мрежом</numerusform><numerusform>%n aктивних веза са Биткоин мрежом</numerusform></translation> </message> <message> <source>Indexing blocks on disk...</source> <translation>Идексирање блокова на диску...</translation> </message> <message> <source>Processing blocks on disk...</source> <translation>Обрада блокова на диску...</translation> </message> <message numerus="yes"> <source>Processed %n block(s) of transaction history.</source> <translation><numerusform>Обрађенo %n блокова историјата трансакција.</numerusform><numerusform>Обрађенo %n блокова историјата трансакција.</numerusform><numerusform>Обрађенo је %n блокова историјата трансакција.</numerusform></translation> </message> <message> <source>%1 behind</source> <translation>%1 уназад</translation> </message> <message> <source>Last received block was generated %1 ago.</source> <translation>Последњи примљени блок је направљен пре %1.</translation> </message> <message> <source>Transactions after this will not yet be visible.</source> <translation>Трансакције након овога још неће бити видљиве.</translation> </message> <message> <source>Error</source> <translation>Грешка</translation> </message> <message> <source>Warning</source> <translation>Упозорење</translation> </message> <message> <source>Information</source> <translation>Информације</translation> </message> <message> <source>Up to date</source> <translation>Ажурирано</translation> </message> <message> <source>Node window</source> <translation>Ноде прозор</translation> </message> <message> <source>Open node debugging and diagnostic console</source> <translation>Отвори конзолу за ноде дебуг и дијагностику</translation> </message> <message> <source>&amp;Sending addresses</source> <translation>&amp;Адресе за слање</translation> </message> <message> <source>&amp;Receiving addresses</source> <translation>&amp;Адресе за примање</translation> </message> <message> <source>Open a particl: URI</source> <translation>Отвори биткоин: URI</translation> </message> <message> <source>Open Wallet</source> <translation>Отвори новчаник</translation> </message> <message> <source>Open a wallet</source> <translation>Отвори новчаник</translation> </message> <message> <source>Close Wallet...</source> <translation>Затвори новчаник...</translation> </message> <message> <source>Close wallet</source> <translation>Затвори новчаник</translation> </message> <message> <source>Close all wallets</source> <translation>Затвори све новчанике</translation> </message> <message> <source>Show the %1 help message to get a list with possible Particl command-line options</source> <translation>Прикажи поруку помоћи %1 за листу са могућим опцијама Биткоин командне линије</translation> </message> <message> <source>default wallet</source> <translation>подразумевани новчаник</translation> </message> <message> <source>No wallets available</source> <translation>Нема доступних новчаника</translation> </message> <message> <source>Minimize</source> <translation>Умањи</translation> </message> <message> <source>Zoom</source> <translation>Увећај</translation> </message> <message> <source>Main Window</source> <translation>Главни прозор</translation> </message> <message> <source>%1 client</source> <translation>%1 клијент</translation> </message> <message> <source>Connecting to peers...</source> <translation>Повезивање са клијентима...</translation> </message> <message> <source>Catching up...</source> <translation>Ажурирање у току...</translation> </message> <message> <source>Error: %1</source> <translation>Грешка: %1</translation> </message> <message> <source>Warning: %1</source> <translation>Упозорење: %1</translation> </message> <message> <source>Date: %1 </source> <translation>Датум: %1 </translation> </message> <message> <source>Amount: %1 </source> <translation>Износ: %1 </translation> </message> <message> <source>Wallet: %1 </source> <translation>Новчаник: %1 </translation> </message> <message> <source>Type: %1 </source> <translation>Тип: %1 </translation> </message> <message> <source>Label: %1 </source> <translation>Ознака: %1 </translation> </message> <message> <source>Address: %1 </source> <translation>Адреса: %1 </translation> </message> <message> <source>Sent transaction</source> <translation>Послата трансакција</translation> </message> <message> <source>Incoming transaction</source> <translation>Долазна трансакција</translation> </message> <message> <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source> <translation>Генерисање ХД кључа је &lt;b&gt;омогућено&lt;/b&gt;</translation> </message> <message> <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source> <translation>Генерисање ХД кључа је &lt;b&gt;онеомогућено&lt;/b&gt;</translation> </message> <message> <source>Private key &lt;b&gt;disabled&lt;/b&gt;</source> <translation>Приватни кључ &lt;b&gt;онемогућен&lt;/b&gt;</translation> </message> <message> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>Новчаник јс &lt;b&gt;шифриран&lt;/b&gt; и тренутно &lt;b&gt;откључан&lt;/b&gt;</translation> </message> <message> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>Новчаник јс &lt;b&gt;шифрован&lt;/b&gt; и тренутно &lt;b&gt;закључан&lt;/b&gt;</translation> </message> </context> <context> <name>CoinControlDialog</name> <message> <source>Coin Selection</source> <translation>Избор новчића</translation> </message> <message> <source>Quantity:</source> <translation>Количина:</translation> </message> <message> <source>Bytes:</source> <translation>Бајта:</translation> </message> <message> <source>Amount:</source> <translation>Износ:</translation> </message> <message> <source>Fee:</source> <translation>Накнада:</translation> </message> <message> <source>Dust:</source> <translation>Прашина:</translation> </message> <message> <source>After Fee:</source> <translation>Након накнаде:</translation> </message> <message> <source>Change:</source> <translation>Промени:</translation> </message> <message> <source>(un)select all</source> <translation>(Де)Селектуј све</translation> </message> <message> <source>Tree mode</source> <translation>Прикажи као стабло</translation> </message> <message> <source>List mode</source> <translation>Прикажи као листу</translation> </message> <message> <source>Amount</source> <translation>Износ</translation> </message> <message> <source>Received with label</source> <translation>Примљено са ознаком</translation> </message> <message> <source>Received with address</source> <translation>Примљено са адресом</translation> </message> <message> <source>Date</source> <translation>Датум</translation> </message> <message> <source>Confirmations</source> <translation>Потврде</translation> </message> <message> <source>Confirmed</source> <translation>Потврђено</translation> </message> <message> <source>Copy address</source> <translation>Копирај адресу</translation> </message> <message> <source>Copy label</source> <translation>Копирај ознаку</translation> </message> <message> <source>Copy amount</source> <translation>Копирај износ</translation> </message> <message> <source>Copy transaction ID</source> <translation>Копирај идентификациони број трансакције</translation> </message> <message> <source>Lock unspent</source> <translation>Закључај непотрошено</translation> </message> <message> <source>Unlock unspent</source> <translation>Откључај непотрошено</translation> </message> <message> <source>Copy quantity</source> <translation>Копирај количину</translation> </message> <message> <source>Copy fee</source> <translation>Копирај провизију</translation> </message> <message> <source>Copy after fee</source> <translation>Копирај након провизије</translation> </message> <message> <source>Copy bytes</source> <translation>Копирај бајтове</translation> </message> <message> <source>Copy dust</source> <translation>Копирај прашину</translation> </message> <message> <source>Copy change</source> <translation>Копирај кусур</translation> </message> <message> <source>(%1 locked)</source> <translation>(%1 закључан)</translation> </message> <message> <source>yes</source> <translation>да</translation> </message> <message> <source>no</source> <translation>не</translation> </message> <message> <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source> <translation>Ознака постаје црвена уколико прималац прими износ мањи од износа прашине - сићушног износа.</translation> </message> <message> <source>Can vary +/- %1 satoshi(s) per input.</source> <translation>Може варирати +/- %1 сатоши(ја) по инпуту.</translation> </message> <message> <source>(no label)</source> <translation>(без ознаке)</translation> </message> <message> <source>change from %1 (%2)</source> <translation>Измени од %1 (%2)</translation> </message> <message> <source>(change)</source> <translation>(промени)</translation> </message> </context> <context> <name>CreateWalletActivity</name> <message> <source>Creating Wallet &lt;b&gt;%1&lt;/b&gt;...</source> <translation>Креирање новчаника&lt;b&gt;%1... &lt;/b&gt;...</translation> </message> <message> <source>Create wallet failed</source> <translation>Креирање новчаника неуспешно</translation> </message> <message> <source>Create wallet warning</source> <translation>Направи упозорење за новчаник</translation> </message> </context> <context> <name>CreateWalletDialog</name> <message> <source>Create Wallet</source> <translation>Направи новчаник</translation> </message> <message> <source>Wallet Name</source> <translation>Име Новчаника</translation> </message> <message> <source>Encrypt the wallet. The wallet will be encrypted with a passphrase of your choice.</source> <translation>Шифрирај новчаник. Новчаник ће бити шифриран лозинком коју одаберете.</translation> </message> <message> <source>Encrypt Wallet</source> <translation>Шифрирај новчаник</translation> </message> <message> <source>Disable private keys for this wallet. Wallets with private keys disabled will have no private keys and cannot have an HD seed or imported private keys. This is ideal for watch-only wallets.</source> <translation>Онемогући приватни кључ за овај новчаник. Новчаници са онемогућеним приватним кључем неће имати приватни кључ и не могу имати HD семе или увезени приватни кључ. Ова опција идеална је за новчанике који су искључиво за посматрање.</translation> </message> <message> <source>Disable Private Keys</source> <translation>Онемогући Приватне Кључеве</translation> </message> <message> <source>Make a blank wallet. Blank wallets do not initially have private keys or scripts. Private keys and addresses can be imported, or an HD seed can be set, at a later time.</source> <translation>Направи празан новчаник. Празни новчанци немају приватане кључеве или скрипте. Приватни кључеви могу се увести, или HD семе може бити постављено касније.</translation> </message> <message> <source>Make Blank Wallet</source> <translation>Направи Празан Новчаник</translation> </message> <message> <source>Create</source> <translation>Направи</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <source>Edit Address</source> <translation>Измени адресу</translation> </message> <message> <source>&amp;Label</source> <translation>&amp;Ознака</translation> </message> <message> <source>The label associated with this address list entry</source> <translation>Ознака повезана са овом ставком из листе адреса</translation> </message> <message> <source>The address associated with this address list entry. This can only be modified for sending addresses.</source> <translation>Адреса повезана са овом ставком из листе адреса. Ово можете променити једини у случају адреса за плаћање.</translation> </message> <message> <source>&amp;Address</source> <translation>&amp;Адреса</translation> </message> <message> <source>New sending address</source> <translation>Нова адреса за слање</translation> </message> <message> <source>Edit receiving address</source> <translation>Измени адресу за примање</translation> </message> <message> <source>Edit sending address</source> <translation>Измени адресу за слање</translation> </message> <message> <source>The entered address "%1" is not a valid Particl address.</source> <translation>Унета адреса "%1" није важећа Биткоин адреса.</translation> </message> <message> <source>Address "%1" already exists as a receiving address with label "%2" and so cannot be added as a sending address.</source> <translation>Адреса "%1" већ постоји као примајућа адреса са ознаком "%2" и не може бити додата као адреса за слање.</translation> </message> <message> <source>The entered address "%1" is already in the address book with label "%2".</source> <translation>Унета адреса "%1" већ постоји у адресару са ознаком "%2".</translation> </message> <message> <source>Could not unlock wallet.</source> <translation>Новчаник није могуће откључати.</translation> </message> <message> <source>New key generation failed.</source> <translation>Генерисање новог кључа није успело.</translation> </message> </context> <context> <name>FreespaceChecker</name> <message> <source>A new data directory will be created.</source> <translation>Нови директоријум података биће креиран.</translation> </message> <message> <source>name</source> <translation>име</translation> </message> <message> <source>Directory already exists. Add %1 if you intend to create a new directory here.</source> <translation>Директоријум већ постоји. Додајте %1 ако намеравате да креирате нови директоријум овде.</translation> </message> <message> <source>Path already exists, and is not a directory.</source> <translation>Путања већ постоји и није директоријум.</translation> </message> <message> <source>Cannot create data directory here.</source> <translation>Не можете креирати директоријум података овде.</translation> </message> </context> <context> <name>HelpMessageDialog</name> <message> <source>version</source> <translation>верзија</translation> </message> <message> <source>About %1</source> <translation>Приближно %1</translation> </message> <message> <source>Command-line options</source> <translation>Опције командне линије</translation> </message> </context> <context> <name>Intro</name> <message> <source>Welcome</source> <translation>Добродошли</translation> </message> <message> <source>Welcome to %1.</source> <translation>Добродошли на %1.</translation> </message> <message> <source>As this is the first time the program is launched, you can choose where %1 will store its data.</source> <translation>Пошто је ово први пут да је програм покренут, можете изабрати где ће %1 чувати своје податке.</translation> </message> <message> <source>When you click OK, %1 will begin to download and process the full %4 block chain (%2GB) starting with the earliest transactions in %3 when %4 initially launched.</source> <translation>Када кликнете на ОК, %1 ће почети с преузимањем и процесуирањем целокупног ланца блокова %4 (%2GB), почевши од најранијих трансакција у %3 када је %4 покренут.</translation> </message> <message> <source>Reverting this setting requires re-downloading the entire blockchain. It is faster to download the full chain first and prune it later. Disables some advanced features.</source> <translation>Враћање ове опције захтева поновно преузимање целокупног блокчејна - ланца блокова. Брже је преузети цели ланац и касније га скратити. Онемогућава неке напредне опције.</translation> </message> <message> <source>This initial synchronisation is very demanding, and may expose hardware problems with your computer that had previously gone unnoticed. Each time you run %1, it will continue downloading where it left off.</source> <translation>Првобитна синхронизација веома је захтевна и може изложити ваш рачунар хардверским проблемима који раније нису били примећени. Сваки пут када покренете %1, преузимање ће се наставити тамо где је било прекинуто.</translation> </message> <message> <source>If you have chosen to limit block chain storage (pruning), the historical data must still be downloaded and processed, but will be deleted afterward to keep your disk usage low.</source> <translation>Ако сте одлучили да ограничите складиштење ланаца блокова (тримовање), историјски подаци се ипак морају преузети и обрадити, али ће након тога бити избрисани како би се ограничила употреба диска.</translation> </message> <message> <source>Use the default data directory</source> <translation>Користите подразумевани директоријум података</translation> </message> <message> <source>Use a custom data directory:</source> <translation>Користите прилагођени директоријум података:</translation> </message> <message> <source>Particl</source> <translation>Биткоин</translation> </message> <message> <source>Discard blocks after verification, except most recent %1 GB (prune)</source> <translation>Обриши блокове након верификације, осим најновије %1 GB (скраћено)</translation> </message> <message> <source>At least %1 GB of data will be stored in this directory, and it will grow over time.</source> <translation>Најмање %1 GB подататака биће складиштен у овај директорјиум који ће временом порасти.</translation> </message> <message> <source>Approximately %1 GB of data will be stored in this directory.</source> <translation>Најмање %1 GB подататака биће складиштен у овај директорјиум.</translation> </message> <message> <source>%1 will download and store a copy of the Particl block chain.</source> <translation>%1 биће преузеће и складиштити копију Биткоин ланца блокова.</translation> </message> <message> <source>The wallet will also be stored in this directory.</source> <translation>Новчаник ће бити складиштен у овом директоријуму.</translation> </message> <message> <source>Error: Specified data directory "%1" cannot be created.</source> <translation>Грешка: Одабрана датотека "%1" не може бити креирана.</translation> </message> <message> <source>Error</source> <translation>Грешка</translation> </message> <message numerus="yes"> <source>%n GB of free space available</source> <translation><numerusform>Доступно %n GB слободног простора</numerusform><numerusform>Доступно %n GB слободног простора</numerusform><numerusform>Доступно %n GB слободног простора</numerusform></translation> </message> <message numerus="yes"> <source>(of %n GB needed)</source> <translation><numerusform>(од потребних %n GB)</numerusform><numerusform>(од потребних %n GB)</numerusform><numerusform>(од потребних %n GB)</numerusform></translation> </message> <message numerus="yes"> <source>(%n GB needed for full chain)</source> <translation><numerusform>(%n GB потребно за цео ланац)</numerusform><numerusform>(%n GB потребно за цео ланац)</numerusform><numerusform>(%n GB потребно за цео ланац)</numerusform></translation> </message> </context> <context> <name>ModalOverlay</name> <message> <source>Form</source> <translation>Форма</translation> </message> <message> <source>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the particl network, as detailed below.</source> <translation>Недавне трансакције можда не буду видљиве, зато салдо твог новчаника можда буде нетачан. Ова информација биђе тачна када новчаник заврши са синхронизацијом биткоин мреже, приказаној испод.</translation> </message> <message> <source>Attempting to spend particl that are affected by not-yet-displayed transactions will not be accepted by the network.</source> <translation>Покушај слања биткоина који су под утицајем још не приказаних трансакција неће бити прихваћен од стране мреже.</translation> </message> <message> <source>Number of blocks left</source> <translation>Преостала количина блокова</translation> </message> <message> <source>Unknown...</source> <translation>Непознато...</translation> </message> <message> <source>Last block time</source> <translation>Време последњег блока</translation> </message> <message> <source>Progress</source> <translation>Напредак</translation> </message> <message> <source>Progress increase per hour</source> <translation>Пораст напретка по часу</translation> </message> <message> <source>calculating...</source> <translation>рачунање...</translation> </message> <message> <source>Estimated time left until synced</source> <translation>Оквирно време до краја синхронизације</translation> </message> <message> <source>Hide</source> <translation>Сакриј</translation> </message> <message> <source>Esc</source> <translation>Есц</translation> </message> <message> <source>%1 is currently syncing. It will download headers and blocks from peers and validate them until reaching the tip of the block chain.</source> <translation>%1 се синхронузује. Преузеће заглавља и блокове од клијената и потврдити их док не стигне на крај ланца блокова.</translation> </message> <message> <source>Unknown. Syncing Headers (%1, %2%)...</source> <translation>Непознато. Синхронизација заглавља (%1, %2%)...</translation> </message> </context> <context> <name>OpenURIDialog</name> <message> <source>Open particl URI</source> <translation>Отвори биткоин URI</translation> </message> <message> <source>URI:</source> <translation>URI:</translation> </message> </context> <context> <name>OpenWalletActivity</name> <message> <source>Open wallet failed</source> <translation>Отварање новчаника неуспешно</translation> </message> <message> <source>Open wallet warning</source> <translation>Упозорење приликом отварања новчаника</translation> </message> <message> <source>default wallet</source> <translation>подразумевани новчаник</translation> </message> <message> <source>Opening Wallet &lt;b&gt;%1&lt;/b&gt;...</source> <translation>Отварање новчаника&lt;b&gt;%1&lt;/b&gt;...</translation> </message> </context> <context> <name>OptionsDialog</name> <message> <source>Options</source> <translation>Поставке</translation> </message> <message> <source>&amp;Main</source> <translation>&amp;Главни</translation> </message> <message> <source>Automatically start %1 after logging in to the system.</source> <translation>Аутоматски почети %1 након пријање на систем.</translation> </message> <message> <source>&amp;Start %1 on system login</source> <translation>&amp;Покрени %1 приликом пријаве на систем</translation> </message> <message> <source>Size of &amp;database cache</source> <translation>Величина кеша базе података</translation> </message> <message> <source>Number of script &amp;verification threads</source> <translation>Број скрипти и CPU за верификацију</translation> </message> <message> <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source> <translation>ИП адреса проксија (нпр. IPv4: 127.0.0.1 / IPv6: ::1)</translation> </message> <message> <source>Shows if the supplied default SOCKS5 proxy is used to reach peers via this network type.</source> <translation>Приказује се ако је испоручени уобичајени SOCKS5 проxy коришћен ради проналажења клијената преко овог типа мреже. </translation> </message> <message> <source>Hide the icon from the system tray.</source> <translation>Сакриј икону са системске траке.</translation> </message> <message> <source>&amp;Hide tray icon</source> <translation>&amp;Сакриј икону</translation> </message> <message> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Exit in the menu.</source> <translation>Минимизирање уместо искључивања апликације када се прозор затвори. Када је ова опција омогућена, апликација ће бити затворена тек након одабира Излаз у менију. </translation> </message> <message> <source>Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</source> <translation>URL треће стране (нпр блок претраживач) који се појављује у менију трансакције. %s у URL  замењен је хашом трансакције. Више URL-ова поделено је вертикалом |.</translation> </message> <message> <source>Open the %1 configuration file from the working directory.</source> <translation>Отвори %1 конфигурациони фајл из директоријума у употреби.</translation> </message> <message> <source>Open Configuration File</source> <translation>Отвори Конфигурациону Датотеку</translation> </message> <message> <source>Reset all client options to default.</source> <translation>Ресетуј све опције клијента на почетна подешавања.</translation> </message> <message> <source>&amp;Reset Options</source> <translation>&amp;Ресет Опције</translation> </message> <message> <source>&amp;Network</source> <translation>&amp;Мрежа</translation> </message> <message> <source>Disables some advanced features but all blocks will still be fully validated. Reverting this setting requires re-downloading the entire blockchain. Actual disk usage may be somewhat higher.</source> <translation>Онемогућава поједина напредна својства, али ће сви блокови у потпуности бити валидирани. Враћање ове опције захтева да поновно преузимање целокупонг блокчејна.</translation> </message> <message> <source>Prune &amp;block storage to</source> <translation>Сакрати &amp;block складиштење на</translation> </message> <message> <source>GB</source> <translation>GB</translation> </message> <message> <source>Reverting this setting requires re-downloading the entire blockchain.</source> <translation>Враћање ове опције захтева да поновно преузимање целокупонг блокчејна.</translation> </message> <message> <source>MiB</source> <translation>MiB</translation> </message> <message> <source>(0 = auto, &lt;0 = leave that many cores free)</source> <translation>(0 = аутоматски одреди, &lt;0 = остави слободно толико језгара)</translation> </message> <message> <source>W&amp;allet</source> <translation>Н&amp;овчаник</translation> </message> <message> <source>Expert</source> <translation>Експерт</translation> </message> <message> <source>Enable coin &amp;control features</source> <translation>Омогући опцију контроле новчића</translation> </message> <message> <source>If you disable the spending of unconfirmed change, the change from a transaction cannot be used until that transaction has at least one confirmation. This also affects how your balance is computed.</source> <translation>Уколико онемогућиш трошење непотврђеног кусура, кусур трансакције неће моћи да се користи док транскација нема макар једну потврду. Ово такође утиче како ће се салдо рачунати.</translation> </message> <message> <source>&amp;Spend unconfirmed change</source> <translation>&amp;Троши непотврђени кусур</translation> </message> <message> <source>Automatically open the Particl client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>Аутоматски отвори Биткоин клијент порт на рутеру. Ова опција ради само уколико твој рутер подржава и има омогућен UPnP.</translation> </message> <message> <source>Map port using &amp;UPnP</source> <translation>Мапирај порт користећи &amp;UPnP</translation> </message> <message> <source>Accept connections from outside.</source> <translation>Прихвати спољашње концекције.</translation> </message> <message> <source>Allow incomin&amp;g connections</source> <translation>Дозволи долазеће конекције.</translation> </message> <message> <source>Connect to the Particl network through a SOCKS5 proxy.</source> <translation>Конектуј се на Биткоин мрежу кроз SOCKS5 проксијем.</translation> </message> <message> <source>&amp;Connect through SOCKS5 proxy (default proxy):</source> <translation>&amp;Конектуј се кроз SOCKS5 прокси (уобичајени прокси):</translation> </message> <message> <source>Proxy &amp;IP:</source> <translation>Прокси &amp;IP:</translation> </message> <message> <source>&amp;Port:</source> <translation>&amp;Порт:</translation> </message> <message> <source>Port of the proxy (e.g. 9050)</source> <translation>Прокси порт (нпр. 9050)</translation> </message> <message> <source>Used for reaching peers via:</source> <translation>Коришћен за приступ другим чворовима преко:</translation> </message> <message> <source>IPv4</source> <translation>IPv4</translation> </message> <message> <source>IPv6</source> <translation>IPv6</translation> </message> <message> <source>Tor</source> <translation>Тор</translation> </message> <message> <source>Show only a tray icon after minimizing the window.</source> <translation>Покажи само иконицу у панелу након минимизирања прозора</translation> </message> <message> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>&amp;минимизирај у доњу линију, уместо у програмску траку</translation> </message> <message> <source>M&amp;inimize on close</source> <translation>Минимизирај при затварању</translation> </message> <message> <source>&amp;Display</source> <translation>&amp;Прикажи</translation> </message> <message> <source>User Interface &amp;language:</source> <translation>&amp;Језик корисничког интерфејса:</translation> </message> <message> <source>The user interface language can be set here. This setting will take effect after restarting %1.</source> <translation>Језик корисничког интерфејса може се овде поставити. Ово својство биће на снази након поновног покреања %1.</translation> </message> <message> <source>&amp;Unit to show amounts in:</source> <translation>&amp;Јединица за приказивање износа:</translation> </message> <message> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>Одабери уобичајену подјединицу која се приказује у интерфејсу и када се шаљу новчићи.</translation> </message> <message> <source>Whether to show coin control features or not.</source> <translation>Да ли да се прикажу опције контроле новчића или не.</translation> </message> <message> <source>&amp;Third party transaction URLs</source> <translation>&amp;URL-ови трансакција трећих страна</translation> </message> <message> <source>Options set in this dialog are overridden by the command line or in the configuration file:</source> <translation>Опције постављене у овом диалогу су поништене командном линијом или у конфигурационој датотеци:</translation> </message> <message> <source>&amp;OK</source> <translation>&amp;Уреду</translation> </message> <message> <source>&amp;Cancel</source> <translation>&amp;Откажи</translation> </message> <message> <source>default</source> <translation>подразумевано</translation> </message> <message> <source>none</source> <translation>ниједно</translation> </message> <message> <source>Confirm options reset</source> <translation>Потврди ресет опција</translation> </message> <message> <source>Client restart required to activate changes.</source> <translation>Рестарт клијента захтеван како би се промене активирале.</translation> </message> <message> <source>Client will be shut down. Do you want to proceed?</source> <translation>Клијент ће се искључити. Да ли желите да наставите?</translation> </message> <message> <source>Configuration options</source> <translation>Конфигурација својстава</translation> </message> <message> <source>The configuration file is used to specify advanced user options which override GUI settings. Additionally, any command-line options will override this configuration file.</source> <translation>Конфигурациона датотека се користи да одреди напредне корисничке опције које поништају подешавања у графичком корисничком интерфејсу.</translation> </message> <message> <source>Error</source> <translation>Грешка</translation> </message> <message> <source>The configuration file could not be opened.</source> <translation>Ова конфигурациона датотека не може бити отворена.</translation> </message> <message> <source>This change would require a client restart.</source> <translation>Ова промена захтева да се рачунар поново покрене.</translation> </message> <message> <source>The supplied proxy address is invalid.</source> <translation>Достављена прокси адреса није валидна.</translation> </message> </context> <context> <name>OverviewPage</name> <message> <source>Form</source> <translation>Форма</translation> </message> <message> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Particl network after a connection is established, but this process has not completed yet.</source> <translation>Приказана информација може бити застарела. Ваш новчаник се аутоматски синхронизује са Биткоин мрежом након успостављања конекције, али овај процес је још увек у току.</translation> </message> <message> <source>Watch-only:</source> <translation>Само гледање:</translation> </message> <message> <source>Available:</source> <translation>Доступно:</translation> </message> <message> <source>Your current spendable balance</source> <translation>Салдо који можете потрошити</translation> </message> <message> <source>Pending:</source> <translation>На чекању:</translation> </message> <message> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source> <translation>Укупан број трансакција које још увек нису потврђене, и не рачунају се у салдо рачуна који је могуће потрошити</translation> </message> <message> <source>Immature:</source> <translation>Недоспело:</translation> </message> <message> <source>Mined balance that has not yet matured</source> <translation>Салдо рударења који још увек није доспео</translation> </message> <message> <source>Balances</source> <translation>Салдо</translation> </message> <message> <source>Total:</source> <translation>Укупно:</translation> </message> <message> <source>Your current total balance</source> <translation>Твој тренутни салдо</translation> </message> <message> <source>Your current balance in watch-only addresses</source> <translation>Твој тренутни салдо са гледај-само адресама</translation> </message> <message> <source>Spendable:</source> <translation>Могуће потрошити:</translation> </message> <message> <source>Recent transactions</source> <translation>Недавне трансакције</translation> </message> <message> <source>Unconfirmed transactions to watch-only addresses</source> <translation>Трансакције за гледај-само адресе које нису потврђене</translation> </message> <message> <source>Mined balance in watch-only addresses that has not yet matured</source> <translation>Салдорударења у адресама које су у моду само гледање, који још увек није доспео</translation> </message> <message> <source>Current total balance in watch-only addresses</source> <translation>Тренутни укупни салдо у адресама у опцији само-гледај</translation> </message> </context> <context> <name>PSBTOperationsDialog</name> <message> <source>Dialog</source> <translation>Дијалог</translation> </message> <message> <source>Sign Tx</source> <translation>Потпиши Трансакцију</translation> </message> <message> <source>Broadcast Tx</source> <translation>Емитуј Трансакцију</translation> </message> <message> <source>Copy to Clipboard</source> <translation>Копирајте у клипборд.</translation> </message> <message> <source>Save...</source> <translation>Сачувај...</translation> </message> <message> <source>Close</source> <translation>Затвори</translation> </message> <message> <source>Save Transaction Data</source> <translation>Сачувај Податке Трансакције</translation> </message> <message> <source>Partially Signed Transaction (Binary) (*.psbt)</source> <translation>Парцијално Потписана Трансакција (Binary) (*.psbt)</translation> </message> <message> <source>Total Amount</source> <translation>Укупан износ</translation> </message> <message> <source>or</source> <translation>или</translation> </message> </context> <context> <name>PaymentServer</name> <message> <source>Payment request error</source> <translation>Грешка у захтеву за плаћање</translation> </message> <message> <source>Cannot start particl: click-to-pay handler</source> <translation>Не могу покренути биткоин: "кликни-да-платиш" механизам</translation> </message> <message> <source>URI handling</source> <translation>URI руковање</translation> </message> <message> <source>'particl://' is not a valid URI. Use 'particl:' instead.</source> <translation>'particl://' није важећи URI. Уместо тога користити 'particl:'.</translation> </message> <message> <source>Cannot process payment request because BIP70 is not supported.</source> <translation>Захтев за плаћање не може се обрадити, јер BIP70 није подржан.</translation> </message> <message> <source>Due to widespread security flaws in BIP70 it's strongly recommended that any merchant instructions to switch wallets be ignored.</source> <translation>Због великог броја безбедносних пропуста у BIP70, препоручено је да се све инструкције трговаца за промену новчаника игноришу.</translation> </message> <message> <source>If you are receiving this error you should request the merchant provide a BIP21 compatible URI.</source> <translation>Уколико добијате грешку овог типа, потребно је да захтевате од трговца BIP21 компатибилан URI.</translation> </message> <message> <source>Invalid payment address %1</source> <translation>Неважећа адреса за плаћање %1</translation> </message> <message> <source>URI cannot be parsed! This can be caused by an invalid Particl address or malformed URI parameters.</source> <translation>URI се не може рашчланити! Ово може бити проузроковано неважећом Биткоин адресом или погрешно форматираним URI параметрима.</translation> </message> <message> <source>Payment request file handling</source> <translation>Руковање датотеком захтева за плаћање</translation> </message> </context> <context> <name>PeerTableModel</name> <message> <source>User Agent</source> <translation>Кориснички агент</translation> </message> <message> <source>Node/Service</source> <translation>Ноде/Сервис</translation> </message> <message> <source>NodeId</source> <translation>НодеИД</translation> </message> <message> <source>Ping</source> <translation>Пинг</translation> </message> <message> <source>Sent</source> <translation>Послато</translation> </message> <message> <source>Received</source> <translation>Примљено</translation> </message> </context> <context> <name>QObject</name> <message> <source>Amount</source> <translation>Износ</translation> </message> <message> <source>Enter a Particl address (e.g. %1)</source> <translation>Унеси Биткоин адресу, (нпр %1)</translation> </message> <message> <source>%1 d</source> <translation>%1 d</translation> </message> <message> <source>%1 h</source> <translation>%1 h</translation> </message> <message> <source>%1 m</source> <translation>%1 m</translation> </message> <message> <source>%1 s</source> <translation>%1 s</translation> </message> <message> <source>None</source> <translation>Nijedan</translation> </message> <message> <source>N/A</source> <translation>Није применљиво</translation> </message> <message> <source>%1 ms</source> <translation>%1 ms</translation> </message> <message numerus="yes"> <source>%n second(s)</source> <translation><numerusform>%n секунда</numerusform><numerusform>%n секунди</numerusform><numerusform>%n секунди</numerusform></translation> </message> <message numerus="yes"> <source>%n minute(s)</source> <translation><numerusform>%n минут</numerusform><numerusform>%n минута</numerusform><numerusform>%n минута</numerusform></translation> </message> <message numerus="yes"> <source>%n hour(s)</source> <translation><numerusform>%n час</numerusform><numerusform>%n часа</numerusform><numerusform>%n часова</numerusform></translation> </message> <message numerus="yes"> <source>%n day(s)</source> <translation><numerusform>%n минут</numerusform><numerusform>%n минута</numerusform><numerusform>%n минута</numerusform></translation> </message> <message numerus="yes"> <source>%n week(s)</source> <translation><numerusform>%n недеља</numerusform><numerusform>%n недеље</numerusform><numerusform>%n недеља</numerusform></translation> </message> <message> <source>%1 and %2</source> <translation>%1 и %2</translation> </message> <message numerus="yes"> <source>%n year(s)</source> <translation><numerusform>%n година</numerusform><numerusform>%n године</numerusform><numerusform>%n година</numerusform></translation> </message> <message> <source>%1 B</source> <translation>%1 B</translation> </message> <message> <source>%1 KB</source> <translation>%1 KB</translation> </message> <message> <source>%1 MB</source> <translation>%1 MB</translation> </message> <message> <source>%1 GB</source> <translation>%1 GB</translation> </message> <message> <source>Error: Specified data directory "%1" does not exist.</source> <translation>Грешка: Одабрани директорјиум датотеке "%1" не постоји.</translation> </message> <message> <source>Error: %1</source> <translation>Грешка: %1</translation> </message> <message> <source>%1 didn't yet exit safely...</source> <translation>%1 није изашао безбедно...</translation> </message> <message> <source>unknown</source> <translation>непознато</translation> </message> </context> <context> <name>QRImageWidget</name> <message> <source>&amp;Save Image...</source> <translation>&amp;Сачувај Слику...</translation> </message> <message> <source>&amp;Copy Image</source> <translation>&amp;Копирај Слику</translation> </message> <message> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation>Дати резултат URI  предуг, покушај да сманиш текст за ознаку / поруку.</translation> </message> <message> <source>Error encoding URI into QR Code.</source> <translation>Грешка током енкодирања URI у QR Код.</translation> </message> <message> <source>QR code support not available.</source> <translation>QR код подршка није доступна.</translation> </message> <message> <source>Save QR Code</source> <translation>Упамти QR Код</translation> </message> <message> <source>PNG Image (*.png)</source> <translation>PNG Слка (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <source>N/A</source> <translation>Није применљиво</translation> </message> <message> <source>Client version</source> <translation>Верзија клијента</translation> </message> <message> <source>&amp;Information</source> <translation>&amp;Информације</translation> </message> <message> <source>General</source> <translation>Опште</translation> </message> <message> <source>Using BerkeleyDB version</source> <translation>Коришћење BerkeleyDB верзије.</translation> </message> <message> <source>Datadir</source> <translation>Datadir</translation> </message> <message> <source>To specify a non-default location of the data directory use the '%1' option.</source> <translation>Да би сте одредили локацију која није унапред задата за директоријум података користите '%1' опцију.</translation> </message> <message> <source>Blocksdir</source> <translation>Blocksdir</translation> </message> <message> <source>To specify a non-default location of the blocks directory use the '%1' option.</source> <translation>Да би сте одредили локацију која није унапред задата за директоријум блокова користите '%1' опцију.</translation> </message> <message> <source>Startup time</source> <translation>Време подизања система</translation> </message> <message> <source>Network</source> <translation>Мрежа</translation> </message> <message> <source>Name</source> <translation>Име</translation> </message> <message> <source>Number of connections</source> <translation>Број конекција</translation> </message> <message> <source>Block chain</source> <translation>Блокчејн</translation> </message> <message> <source>Memory Pool</source> <translation>Удружена меморија</translation> </message> <message> <source>Current number of transactions</source> <translation>Тренутни број трансакција</translation> </message> <message> <source>Memory usage</source> <translation>Употреба меморије</translation> </message> <message> <source>Wallet: </source> <translation>Новчаник</translation> </message> <message> <source>(none)</source> <translation>(ниједан)</translation> </message> <message> <source>&amp;Reset</source> <translation>&amp;Ресетуј</translation> </message> <message> <source>Received</source> <translation>Примљено</translation> </message> <message> <source>Sent</source> <translation>Послато</translation> </message> <message> <source>&amp;Peers</source> <translation>&amp;Колеге</translation> </message> <message> <source>Banned peers</source> <translation>Забрањене колеге на мрежи</translation> </message> <message> <source>Select a peer to view detailed information.</source> <translation>Одабери колегу да би видели детаљне информације</translation> </message> <message> <source>Direction</source> <translation>Правац</translation> </message> <message> <source>Version</source> <translation>Верзија</translation> </message> <message> <source>Starting Block</source> <translation>Почетни блок</translation> </message> <message> <source>Synced Headers</source> <translation>Синхронизована заглавља</translation> </message> <message> <source>Synced Blocks</source> <translation>Синхронизовани блокови</translation> </message> <message> <source>The mapped Autonomous System used for diversifying peer selection.</source> <translation>Мапирани аутономни систем који се користи за диверсификацију селекције колега чворова.</translation> </message> <message> <source>Mapped AS</source> <translation>Мапирани АС</translation> </message> <message> <source>User Agent</source> <translation>Кориснички агент</translation> </message> <message> <source>Node window</source> <translation>Ноде прозор</translation> </message> <message> <source>Open the %1 debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation>Отворите %1 датотеку са записима о отклоњеним грешкама из тренутног директоријума датотека. Ово може потрајати неколико секунди за велике датотеке записа.</translation> </message> <message> <source>Decrease font size</source> <translation>Смањи величину фонта</translation> </message> <message> <source>Increase font size</source> <translation>Увећај величину фонта</translation> </message> <message> <source>Services</source> <translation>Услуге</translation> </message> <message> <source>Connection Time</source> <translation>Време конекције</translation> </message> <message> <source>Last Send</source> <translation>Последње послато</translation> </message> <message> <source>Last Receive</source> <translation>Последње примљено</translation> </message> <message> <source>Ping Time</source> <translation>Пинг време</translation> </message> <message> <source>The duration of a currently outstanding ping.</source> <translation>Трајање тренутно неразрешеног пинга.</translation> </message> <message> <source>Ping Wait</source> <translation>Чекање на пинг</translation> </message> <message> <source>Min Ping</source> <translation>Мин Пинг</translation> </message> <message> <source>Time Offset</source> <translation>Помак времена</translation> </message> <message> <source>Last block time</source> <translation>Време последњег блока</translation> </message> <message> <source>&amp;Open</source> <translation>&amp;Отвори</translation> </message> <message> <source>&amp;Console</source> <translation>&amp;Конзола</translation> </message> <message> <source>&amp;Network Traffic</source> <translation>&amp; Саобраћај Мреже</translation> </message> <message> <source>Totals</source> <translation>Укупно</translation> </message> <message> <source>In:</source> <translation>Долазно:</translation> </message> <message> <source>Out:</source> <translation>Одлазно:</translation> </message> <message> <source>Debug log file</source> <translation>Дебугуј лог фајл</translation> </message> <message> <source>Clear console</source> <translation>Очисти конзолу</translation> </message> <message> <source>1 &amp;hour</source> <translation>1 &amp;Сат</translation> </message> <message> <source>1 &amp;day</source> <translation>1 &amp;дан</translation> </message> <message> <source>1 &amp;week</source> <translation>1 &amp;недеља</translation> </message> <message> <source>1 &amp;year</source> <translation>1 &amp;година</translation> </message> <message> <source>&amp;Disconnect</source> <translation>&amp;Прекини везу</translation> </message> <message> <source>Ban for</source> <translation>Забрани за</translation> </message> <message> <source>&amp;Unban</source> <translation>&amp;Уклони забрану</translation> </message> <message> <source>Welcome to the %1 RPC console.</source> <translation>Добродошли на %1 RPC конзоле.</translation> </message> <message> <source>Use up and down arrows to navigate history, and %1 to clear screen.</source> <translation>Користи стрелице горе и доле за навигацију историје, и %1 зa чишћење екрана.</translation> </message> <message> <source>Type %1 for an overview of available commands.</source> <translation>Укуцај %1 за преглед доступних команди.</translation> </message> <message> <source>For more information on using this console type %1.</source> <translation>За више информација о коришћењу конзиле укуцај %1.</translation> </message> <message> <source>WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramifications of a command.</source> <translation>УПОЗОРЕЊЕ: Преваранти активно говоре корисницима да овде укуцају команде, том приликом краду садржај новчаника. Немојте користити конзолу без претходног разумевања последица коришћења команди.</translation> </message> <message> <source>Network activity disabled</source> <translation>Активност мреже онемогућена</translation> </message> <message> <source>Executing command without any wallet</source> <translation>Извршење команде без новчаника</translation> </message> <message> <source>Executing command using "%1" wallet</source> <translation>Извршење команде коришћењем "%1" новчаника</translation> </message> <message> <source>(node id: %1)</source> <translation>(node id: %1)</translation> </message> <message> <source>via %1</source> <translation>преко %1</translation> </message> <message> <source>never</source> <translation>никад</translation> </message> <message> <source>Inbound</source> <translation>Долазеће</translation> </message> <message> <source>Outbound</source> <translation>Одлазеће</translation> </message> <message> <source>Unknown</source> <translation>Непознато</translation> </message> </context> <context> <name>ReceiveCoinsDialog</name> <message> <source>&amp;Amount:</source> <translation>&amp;Износ:</translation> </message> <message> <source>&amp;Label:</source> <translation>&amp;Ознака</translation> </message> <message> <source>&amp;Message:</source> <translation>Poruka:</translation> </message> <message> <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Particl network.</source> <translation>Опциона порука коју можеш прикачити уз захтев за плаћање, која ће бити приказана када захтев буде отворен. Напомена: Порука неће бити послата са уплатом на Биткоин мрежи.</translation> </message> <message> <source>An optional label to associate with the new receiving address.</source> <translation>Опционална ознака за поистовећивање са новом примајућом адресом.</translation> </message> <message> <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source> <translation>Користи ову форму како би захтевао уплату. Сва поља су &lt;b&gt;опционална&lt;/b&gt;.</translation> </message> <message> <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source> <translation>Опциони износ за захтев. Остави празно или нула уколико не желиш прецизирати износ.</translation> </message> <message> <source>An optional label to associate with the new receiving address (used by you to identify an invoice). It is also attached to the payment request.</source> <translation>Опционална ознака за поистовећивање са новом адресом примаоца (користите је за идентификацију рачуна). Она је такође придодата захтеву за плаћање.</translation> </message> <message> <source>An optional message that is attached to the payment request and may be displayed to the sender.</source> <translation>Опциона порука која је придодата захтеву за плаћање и може бити приказана пошиљаоцу.</translation> </message> <message> <source>&amp;Create new receiving address</source> <translation>&amp;Направи нову адресу за примање</translation> </message> <message> <source>Clear all fields of the form.</source> <translation>Очисти сва пола форме.</translation> </message> <message> <source>Clear</source> <translation>Очисти</translation> </message> <message> <source>Native segwit addresses (aka Bech32 or BIP-173) reduce your transaction fees later on and offer better protection against typos, but old wallets don't support them. When unchecked, an address compatible with older wallets will be created instead.</source> <translation>Природне segwit адресе (нпр Bech32 или BIP-173) касније смањују трошкове трансакција и нуде бољу заштиту од грешака у куцању, али их стари новчаници не подржавају. Када није одабрано, биће креирана адреса компатибилна са старијим новчаницима.</translation> </message> <message> <source>Generate native segwit (Bech32) address</source> <translation>Направи segwit (Bech32) адресу</translation> </message> <message> <source>Requested payments history</source> <translation>Историја захтева за плаћање</translation> </message> <message> <source>Show the selected request (does the same as double clicking an entry)</source> <translation>Прикажи селектовани захтев (има исту сврху као и дупли клик на одговарајући унос)</translation> </message> <message> <source>Show</source> <translation>Прикажи</translation> </message> <message> <source>Remove the selected entries from the list</source> <translation>Уклони одабрани унос из листе</translation> </message> <message> <source>Remove</source> <translation>Уклони</translation> </message> <message> <source>Copy URI</source> <translation>Копирај URI</translation> </message> <message> <source>Copy label</source> <translation>Копирај ознаку</translation> </message> <message> <source>Copy message</source> <translation>Копирај поруку</translation> </message> <message> <source>Copy amount</source> <translation>Копирај износ</translation> </message> <message> <source>Could not unlock wallet.</source> <translation>Новчаник није могуће откључати.</translation> </message> </context> <context> <name>ReceiveRequestDialog</name> <message> <source>Address:</source> <translation>Адреса:</translation> </message> <message> <source>Amount:</source> <translation>Износ:</translation> </message> <message> <source>Label:</source> <translation>Етикета</translation> </message> <message> <source>Message:</source> <translation>Порука:</translation> </message> <message> <source>Wallet:</source> <translation>Новчаник:</translation> </message> <message> <source>Copy &amp;URI</source> <translation>Копирај &amp;URI</translation> </message> <message> <source>Copy &amp;Address</source> <translation>Копирај &amp;Адресу</translation> </message> <message> <source>&amp;Save Image...</source> <translation>&amp;Сачувај Слику...</translation> </message> <message> <source>Request payment to %1</source> <translation>Захтевај уплату ка %1</translation> </message> <message> <source>Payment information</source> <translation>Информације о плаћању</translation> </message> </context> <context> <name>RecentRequestsTableModel</name> <message> <source>Date</source> <translation>Датум</translation> </message> <message> <source>Label</source> <translation>Ознака</translation> </message> <message> <source>Message</source> <translation>Poruka</translation> </message> <message> <source>(no label)</source> <translation>(без ознаке)</translation> </message> <message> <source>(no message)</source> <translation>(нема поруке)</translation> </message> <message> <source>(no amount requested)</source> <translation>(нема захтеваног износа)</translation> </message> <message> <source>Requested</source> <translation>Захтевано</translation> </message> </context> <context> <name>SendCoinsDialog</name> <message> <source>Send Coins</source> <translation>Пошаљи новчиће</translation> </message> <message> <source>Coin Control Features</source> <translation>Опција контроле новчића</translation> </message> <message> <source>Inputs...</source> <translation>Инпути...</translation> </message> <message> <source>automatically selected</source> <translation>аутоматски одабрано</translation> </message> <message> <source>Insufficient funds!</source> <translation>Недовољно средстава!</translation> </message> <message> <source>Quantity:</source> <translation>Количина:</translation> </message> <message> <source>Bytes:</source> <translation>Бајта:</translation> </message> <message> <source>Amount:</source> <translation>Износ:</translation> </message> <message> <source>Fee:</source> <translation>Накнада:</translation> </message> <message> <source>After Fee:</source> <translation>Након накнаде:</translation> </message> <message> <source>Change:</source> <translation>Кусур:</translation> </message> <message> <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source> <translation>Уколико је ово активирано, али је промењена адреса празна или неважећа, промена ће бити послата на ново-генерисану адресу.</translation> </message> <message> <source>Custom change address</source> <translation>Прилагођена промењена адреса</translation> </message> <message> <source>Transaction Fee:</source> <translation>Провизија за трансакцију:</translation> </message> <message> <source>Choose...</source> <translation>Одабери...</translation> </message> <message> <source>Using the fallbackfee can result in sending a transaction that will take several hours or days (or never) to confirm. Consider choosing your fee manually or wait until you have validated the complete chain.</source> <translation>Коришћење безбедносне накнаде може резултовати у времену потребно за потврду трансакције од неколико сати или дана (или никад). Размислите о ручном одабиру провизије или сачекајте док нисте потврдили комплетан ланац.</translation> </message> <message> <source>Warning: Fee estimation is currently not possible.</source> <translation>Упозорење: Процена провизије тренутно није могућа.</translation> </message> <message> <source>Specify a custom fee per kB (1,000 bytes) of the transaction's virtual size. Note: Since the fee is calculated on a per-byte basis, a fee of "100 satoshis per kB" for a transaction size of 500 bytes (half of 1 kB) would ultimately yield a fee of only 50 satoshis.</source> <translation>Одредити прилагођену провизију по kB (1,000 битова) виртуелне величине трансакције. Напомена: С обзиром да се провизија рачуна на основу броја бајтова, провизија за "100 сатошија по kB" за величину трансакције од 500 бајтова (пола од 1 kB) ће аутоматски износити само 50 сатошија.</translation> </message> <message> <source>per kilobyte</source> <translation>по килобајту</translation> </message> <message> <source>Hide</source> <translation>Сакриј</translation> </message> <message> <source>Recommended:</source> <translation>Препоручено:</translation> </message> <message> <source>Custom:</source> <translation>Прилагођено:</translation> </message> <message> <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source> <translation>(Паметна накнада још није покренута. Ово уобичајено траје неколико блокова...)</translation> </message> <message> <source>Send to multiple recipients at once</source> <translation>Пошаљи већем броју примаоца одједанпут</translation> </message> <message> <source>Add &amp;Recipient</source> <translation>Додај &amp;Примаоца</translation> </message> <message> <source>Clear all fields of the form.</source> <translation>Очисти сва поља форме.</translation> </message> <message> <source>Dust:</source> <translation>Прашина:</translation> </message> <message> <source>Hide transaction fee settings</source> <translation>Сакријте износ накнаде за трансакцију</translation> </message> <message> <source>When there is less transaction volume than space in the blocks, miners as well as relaying nodes may enforce a minimum fee. Paying only this minimum fee is just fine, but be aware that this can result in a never confirming transaction once there is more demand for particl transactions than the network can process.</source> <translation>Када је мањи обим трансакција од простора у блоку, рудари, као и повезани нодови могу применити минималну провизију. Плаћање само минималне накнаде - провизије је добро, али треба бити свестан да ово може резултовати трансакцијом која неће никада бити потврђена, у случају када је број захтева за биткоин трансакцијама већи од могућности мреже да обради.</translation> </message> <message> <source>A too low fee might result in a never confirming transaction (read the tooltip)</source> <translation>Сувише ниска накнада може резултовати у трансакцији која никад неће бити потврђена (прочитајте опис)</translation> </message> <message> <source>Confirmation time target:</source> <translation>Циљно време потврде:</translation> </message> <message> <source>Enable Replace-By-Fee</source> <translation>Омогући Замени-за-Провизију</translation> </message> <message> <source>With Replace-By-Fee (BIP-125) you can increase a transaction's fee after it is sent. Without this, a higher fee may be recommended to compensate for increased transaction delay risk.</source> <translation>Са Замени-за-Провизију (BIP-125) се може повећати висина провизије за трансакцију након што је послата. Без овога, виша провизија може бити препоручена да се смањи ризик од кашњења трансакције. </translation> </message> <message> <source>Clear &amp;All</source> <translation>Очисти &amp;Све</translation> </message> <message> <source>Balance:</source> <translation>Салдо:</translation> </message> <message> <source>Confirm the send action</source> <translation>Потврди акцију слања</translation> </message> <message> <source>S&amp;end</source> <translation>&amp;Пошаљи</translation> </message> <message> <source>Copy quantity</source> <translation>Копирај количину</translation> </message> <message> <source>Copy amount</source> <translation>Копирај износ</translation> </message> <message> <source>Copy fee</source> <translation>Копирај провизију</translation> </message> <message> <source>Copy after fee</source> <translation>Копирај након провизије</translation> </message> <message> <source>Copy bytes</source> <translation>Копирај бајтове</translation> </message> <message> <source>Copy dust</source> <translation>Копирај прашину</translation> </message> <message> <source>Copy change</source> <translation>Копирај промену</translation> </message> <message> <source>%1 (%2 blocks)</source> <translation>%1 (%2 блокови)</translation> </message> <message> <source>Cr&amp;eate Unsigned</source> <translation>Креирај непотписано</translation> </message> <message> <source>Creates a Partially Signed Particl Transaction (PSBT) for use with e.g. an offline %1 wallet, or a PSBT-compatible hardware wallet.</source> <translation>Креира делимично потписану Биткоин трансакцију (PSBT) за коришћење са нпр. офлајн %1 новчаником, или PSBT компатибилним хардверским новчаником. </translation> </message> <message> <source> from wallet '%1'</source> <translation>из новчаника '%1'</translation> </message> <message> <source>%1 to '%2'</source> <translation>%1 до '%2'</translation> </message> <message> <source>%1 to %2</source> <translation>%1 до %2</translation> </message> <message> <source>Do you want to draft this transaction?</source> <translation>Да ли желите да саставите ову трансакцију?</translation> </message> <message> <source>Are you sure you want to send?</source> <translation>Да ли сте сигурни да желите да пошаљете?</translation> </message> <message> <source>Save Transaction Data</source> <translation>Сачувај Податке Трансакције</translation> </message> <message> <source>Partially Signed Transaction (Binary) (*.psbt)</source> <translation>Делимично Потписана Трансакција (Binary) (*.psbt)</translation> </message> <message> <source>PSBT saved</source> <translation>PSBT сачуван</translation> </message> <message> <source>or</source> <translation>или</translation> </message> <message> <source>You can increase the fee later (signals Replace-By-Fee, BIP-125).</source> <translation>Можете повећати провизију касније (сигнали Замени-са-Провизијом, BIP-125).</translation> </message> <message> <source>Please, review your transaction.</source> <translation>Молим, размотрите вашу трансакцију.</translation> </message> <message> <source>Transaction fee</source> <translation>Провизија за трансакцију</translation> </message> <message> <source>Not signalling Replace-By-Fee, BIP-125.</source> <translation>Не сигнализира Замени-са-Провизијом, BIP-125.</translation> </message> <message> <source>Total Amount</source> <translation>Укупан износ</translation> </message> <message> <source>To review recipient list click "Show Details..."</source> <translation>Да би сте размотрили листу примаоца кликните на "Прикажи детаље..."</translation> </message> <message> <source>Confirm send coins</source> <translation>Потврдите слање новчића</translation> </message> <message> <source>Confirm transaction proposal</source> <translation>Потврдите предлог трансакције</translation> </message> <message> <source>Send</source> <translation>Пошаљи</translation> </message> <message> <source>Watch-only balance:</source> <translation>Само-гледање Стање:</translation> </message> <message> <source>The recipient address is not valid. Please recheck.</source> <translation>Адреса примаоца није валидна. Молим проверите поново.</translation> </message> <message> <source>The amount to pay must be larger than 0.</source> <translation>Овај износ за плаћање мора бити већи од 0.</translation> </message> <message> <source>The amount exceeds your balance.</source> <translation>Овај износ је већи од вашег салда.</translation> </message> <message> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>Укупни износ премашује ваш салдо, када се %1 провизија за трансакцију укључи у износ.</translation> </message> <message> <source>Duplicate address found: addresses should only be used once each.</source> <translation>Пронађена је дуплирана адреса: адресе се требају користити само једном.</translation> </message> <message> <source>Transaction creation failed!</source> <translation>Израда трансакције није успела!</translation> </message> <message> <source>A fee higher than %1 is considered an absurdly high fee.</source> <translation>Провизија већа од %1 се сматра апсурдно високом провизијом.</translation> </message> <message> <source>Payment request expired.</source> <translation>Захтев за плаћање је истекао.</translation> </message> <message numerus="yes"> <source>Estimated to begin confirmation within %n block(s).</source> <translation><numerusform>Процењује се да ће започети потврду унутар %n блока.</numerusform><numerusform>Процењује се да ће започети потврду унутар %n блока.</numerusform><numerusform>Процењује се да ће започети потврду унутар %n блокова.</numerusform></translation> </message> <message> <source>Warning: Invalid Particl address</source> <translation>Упозорење: Неважећа Биткоин адреса</translation> </message> <message> <source>Warning: Unknown change address</source> <translation>Упозорење: Непозната адреса за промену</translation> </message> <message> <source>Confirm custom change address</source> <translation>Потврдите прилагођену адресу за промену</translation> </message> <message> <source>The address you selected for change is not part of this wallet. Any or all funds in your wallet may be sent to this address. Are you sure?</source> <translation>Адреса коју сте одабрали за промену није део овог новчаника. Део или цео износ вашег новчаника може бити послат на ову адресу. Да ли сте сигурни?</translation> </message> <message> <source>(no label)</source> <translation>(без ознаке)</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <source>A&amp;mount:</source> <translation>&amp;Износ:</translation> </message> <message> <source>Pay &amp;To:</source> <translation>Плати &amp;За:</translation> </message> <message> <source>&amp;Label:</source> <translation>&amp;Ознака</translation> </message> <message> <source>Choose previously used address</source> <translation>Одабери претходно коришћену адресу</translation> </message> <message> <source>The Particl address to send the payment to</source> <translation>Биткоин адреса на коју се шаље уплата</translation> </message> <message> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <source>Paste address from clipboard</source> <translation>Налепите адресу из базе за копирање</translation> </message> <message> <source>Alt+P</source> <translation>Alt+П</translation> </message> <message> <source>Remove this entry</source> <translation>Уклоните овај унос</translation> </message> <message> <source>The amount to send in the selected unit</source> <translation>Износ који ће бити послат у одабрану јединицу</translation> </message> <message> <source>The fee will be deducted from the amount being sent. The recipient will receive less particl than you enter in the amount field. If multiple recipients are selected, the fee is split equally.</source> <translation>Провизија ће бити одузета од износа који је послат. Примаоц ће добити мање биткоина него што је унесено у поље за износ. Уколико је одабрано више примаоца, провизија се дели равномерно.</translation> </message> <message> <source>S&amp;ubtract fee from amount</source> <translation>&amp;Одузми провизију од износа</translation> </message> <message> <source>Use available balance</source> <translation>Користи расположиви салдо</translation> </message> <message> <source>Message:</source> <translation>Порука:</translation> </message> <message> <source>This is an unauthenticated payment request.</source> <translation>Ово је неовлашћени захтев за плаћање.</translation> </message> <message> <source>This is an authenticated payment request.</source> <translation>Ово је овлашћени захтев за плаћање.</translation> </message> <message> <source>Enter a label for this address to add it to the list of used addresses</source> <translation>Унесите ознаку за ову адресу да бисте је додали на листу коришћених адреса</translation> </message> <message> <source>A message that was attached to the particl: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Particl network.</source> <translation>Порука која је приложена биткоину: URI која ће бити сачувана уз трансакцију ради референце. Напомена: Ова порука се шаље преко Биткоин мреже.</translation> </message> <message> <source>Pay To:</source> <translation>Плати ка:</translation> </message> <message> <source>Memo:</source> <translation>Мемо:</translation> </message> </context> <context> <name>ShutdownWindow</name> <message> <source>%1 is shutting down...</source> <translation>%1 се искључује</translation> </message> <message> <source>Do not shut down the computer until this window disappears.</source> <translation>Немојте искључити рачунар док овај прозор не нестане.</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <source>Signatures - Sign / Verify a Message</source> <translation>Потписи - Потпиши / Потврди поруку</translation> </message> <message> <source>You can sign messages/agreements with your addresses to prove you can receive particl sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation>Можете потписати поруку/споразум са вашом адресом да би сте доказали да можете примити биткоин послат ка њима. Будите опрезни да не потписујете ништа нејасно или случајно, јер се може десити напад крађе идентитета, да потпишете ваш идентитет нападачу. Потпишите само потпуно детаљне изјаве са којима се слажете.</translation> </message> <message> <source>The Particl address to sign the message with</source> <translation>Биткоин адреса са којом ћете потписати поруку</translation> </message> <message> <source>Choose previously used address</source> <translation>Промени претходно коришћену адресу</translation> </message> <message> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <source>Paste address from clipboard</source> <translation>Налепите адресу из базе за копирање</translation> </message> <message> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <source>Enter the message you want to sign here</source> <translation>Унесите поруку коју желите да потпишете овде</translation> </message> <message> <source>Signature</source> <translation>Потпис</translation> </message> <message> <source>Copy the current signature to the system clipboard</source> <translation>Копирајте тренутни потпис у системску базу за копирање</translation> </message> <message> <source>Sign the message to prove you own this Particl address</source> <translation>Потпишите поруку да докажете да сте власник ове Биткоин адресе</translation> </message> <message> <source>Sign &amp;Message</source> <translation>Потпис &amp;Порука</translation> </message> <message> <source>Reset all sign message fields</source> <translation>Поништите сва поља за потписивање поруке</translation> </message> <message> <source>Clear &amp;All</source> <translation>Очисти &amp;Све</translation> </message> <message> <source>&amp;Verify Message</source> <translation>&amp;Потврди поруку</translation> </message> <message> <source>Enter the receiver's address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack. Note that this only proves the signing party receives with the address, it cannot prove sendership of any transaction!</source> <translation>Унесите адресу примаоца, поруку (осигурајте да тачно копирате прекиде линија, размаке, картице итд) и потпишите испод да потврдите поруку. Будите опрезни да не убаците више у потпис од онога што је у потписаној поруци, да би сте избегли напад посредника. Имајте на уму да потпис само доказује да потписник прима са потписаном адресом, а не може да докаже слање било које трансакције!</translation> </message> <message> <source>The Particl address the message was signed with</source> <translation>Биткоин адреса са којом је потписана порука</translation> </message> <message> <source>The signed message to verify</source> <translation>Потписана порука за потврду</translation> </message> <message> <source>The signature given when the message was signed</source> <translation>Потпис који је дат приликом потписивања поруке</translation> </message> <message> <source>Verify the message to ensure it was signed with the specified Particl address</source> <translation>Потврдите поруку да осигурате да је потписана са одговарајућом Биткоин адресом</translation> </message> <message> <source>Verify &amp;Message</source> <translation>Потврди &amp;Поруку</translation> </message> <message> <source>Reset all verify message fields</source> <translation>Поништите сва поља за потврду поруке</translation> </message> <message> <source>Click "Sign Message" to generate signature</source> <translation>Притисни "Потпиши поруку" за израду потписа</translation> </message> <message> <source>The entered address is invalid.</source> <translation>Унесена адреса није важећа.</translation> </message> <message> <source>Please check the address and try again.</source> <translation>Молим проверите адресу и покушајте поново.</translation> </message> <message> <source>The entered address does not refer to a key.</source> <translation>Унесена адреса се не односи на кључ.</translation> </message> <message> <source>Wallet unlock was cancelled.</source> <translation>Откључавање новчаника је отказано.</translation> </message> <message> <source>No error</source> <translation>Нема грешке</translation> </message> <message> <source>Private key for the entered address is not available.</source> <translation>Приватни кључ за унесену адресу није доступан.</translation> </message> <message> <source>Message signing failed.</source> <translation>Потписивање поруке није успело.</translation> </message> <message> <source>Message signed.</source> <translation>Порука је потписана.</translation> </message> <message> <source>The signature could not be decoded.</source> <translation>Потпис не може бити декодиран.</translation> </message> <message> <source>Please check the signature and try again.</source> <translation>Молим проверите потпис и покушајте поново.</translation> </message> <message> <source>The signature did not match the message digest.</source> <translation>Потпис се не подудара са прегледом порука.</translation> </message> <message> <source>Message verification failed.</source> <translation>Провера поруке није успела.</translation> </message> <message> <source>Message verified.</source> <translation>Порука је проверена.</translation> </message> </context> <context> <name>TrafficGraphWidget</name> <message> <source>KB/s</source> <translation>KB/s</translation> </message> </context> <context> <name>TransactionDesc</name> <message numerus="yes"> <source>Open for %n more block(s)</source> <translation><numerusform>Отворено за још %n блок.</numerusform><numerusform>Отворено за још %n блока</numerusform><numerusform>Отворено за још %n блокова</numerusform></translation> </message> <message> <source>Open until %1</source> <translation>Otvoreno do %1</translation> </message> <message> <source>0/unconfirmed, %1</source> <translation>0/непотврђено, %1</translation> </message> <message> <source>in memory pool</source> <translation>у удруженој меморији</translation> </message> <message> <source>not in memory pool</source> <translation>није у удруженој меморији</translation> </message> <message> <source>abandoned</source> <translation>напуштено</translation> </message> <message> <source>%1/unconfirmed</source> <translation>%1/непотврђено</translation> </message> <message> <source>%1 confirmations</source> <translation>%1 порврде</translation> </message> <message> <source>Status</source> <translation>Статус</translation> </message> <message> <source>Date</source> <translation>Датум</translation> </message> <message> <source>Source</source> <translation>Извор</translation> </message> <message> <source>Generated</source> <translation>Генерисано</translation> </message> <message> <source>From</source> <translation>Од</translation> </message> <message> <source>unknown</source> <translation>непознато</translation> </message> <message> <source>To</source> <translation>За</translation> </message> <message> <source>own address</source> <translation>сопствена адреса</translation> </message> <message> <source>watch-only</source> <translation>гледај-само</translation> </message> <message> <source>label</source> <translation>ознака</translation> </message> <message> <source>Credit</source> <translation>Заслуге</translation> </message> <message numerus="yes"> <source>matures in %n more block(s)</source> <translation><numerusform>сазрева за %n блок</numerusform><numerusform>сазрева за %n блока</numerusform><numerusform>сазрева за %n блокова</numerusform></translation> </message> <message> <source>not accepted</source> <translation>није прихваћено</translation> </message> <message> <source>Debit</source> <translation>Задужење</translation> </message> <message> <source>Total debit</source> <translation>Укупно задужење</translation> </message> <message> <source>Total credit</source> <translation>Укупни кредит</translation> </message> <message> <source>Transaction fee</source> <translation>Провизија за трансакцију</translation> </message> <message> <source>Net amount</source> <translation>Нето износ</translation> </message> <message> <source>Message</source> <translation>Порука</translation> </message> <message> <source>Comment</source> <translation>Коментар</translation> </message> <message> <source>Transaction ID</source> <translation>ID Трансакције</translation> </message> <message> <source>Transaction total size</source> <translation>Укупна величина трансакције</translation> </message> <message> <source>Transaction virtual size</source> <translation>Виртуелна величина трансакције</translation> </message> <message> <source>Output index</source> <translation>Излазни индекс</translation> </message> <message> <source> (Certificate was not verified)</source> <translation>(Сертификат још није проверен)</translation> </message> <message> <source>Merchant</source> <translation>Трговац</translation> </message> <message> <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation>Генерисани новчићи морају доспети %1 блокова пре него што могу бити потрошени. Када генеришете овај блок, он се емитује у мрежу, да би био придодат на ланац блокова. Укупно не успе да се придода на ланац, његово стање се мења у "није прихваћен" и неће га бити могуће потрошити. Ово се може повремено десити уколико други чвор генерише блок у периоду од неколико секунди од вашег.</translation> </message> <message> <source>Debug information</source> <translation>Информације о оклањању грешака</translation> </message> <message> <source>Transaction</source> <translation>Трансакције</translation> </message> <message> <source>Inputs</source> <translation>Инпути</translation> </message> <message> <source>Amount</source> <translation>Износ</translation> </message> <message> <source>true</source> <translation>тачно</translation> </message> <message> <source>false</source> <translation>нетачно</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <source>This pane shows a detailed description of the transaction</source> <translation>Овај одељак приказује детањан приказ трансакције</translation> </message> <message> <source>Details for %1</source> <translation>Детаљи за %1</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <source>Date</source> <translation>Датум</translation> </message> <message> <source>Type</source> <translation>Тип</translation> </message> <message> <source>Label</source> <translation>Ознака</translation> </message> <message numerus="yes"> <source>Open for %n more block(s)</source> <translation><numerusform>Отворено за још %n блок </numerusform><numerusform>Отворено за још %n блока</numerusform><numerusform> Отворено за још %n блокова</numerusform></translation> </message> <message> <source>Open until %1</source> <translation>Отворено до %1</translation> </message> <message> <source>Unconfirmed</source> <translation>Непотврђено</translation> </message> <message> <source>Abandoned</source> <translation>Напуштено</translation> </message> <message> <source>Confirming (%1 of %2 recommended confirmations)</source> <translation>Потврђивање у току (%1 од %2 препоручене потврде)</translation> </message> <message> <source>Confirmed (%1 confirmations)</source> <translation>Potvrdjena (%1 potvrdjenih)</translation> </message> <message> <source>Conflicted</source> <translation>Неуслагашен</translation> </message> <message> <source>Immature (%1 confirmations, will be available after %2)</source> <translation>Није доспео (%1 потврде, биће доступан након %2)</translation> </message> <message> <source>Generated but not accepted</source> <translation>Генерисан али није прихваћен</translation> </message> <message> <source>Received with</source> <translation>Примљен са</translation> </message> <message> <source>Received from</source> <translation>Примљено од</translation> </message> <message> <source>Sent to</source> <translation>Послато ка</translation> </message> <message> <source>Payment to yourself</source> <translation>Уплата самом себи</translation> </message> <message> <source>Mined</source> <translation>Рударено</translation> </message> <message> <source>watch-only</source> <translation>гледај-само</translation> </message> <message> <source>(n/a)</source> <translation>(n/a)</translation> </message> <message> <source>(no label)</source> <translation>(без ознаке)</translation> </message> <message> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Статус трансакције. Пређи мишем преко поља за приказ броја трансакција.</translation> </message> <message> <source>Date and time that the transaction was received.</source> <translation>Датум и време пријема трансакције</translation> </message> <message> <source>Type of transaction.</source> <translation>Тип трансакције.</translation> </message> <message> <source>Whether or not a watch-only address is involved in this transaction.</source> <translation>Без обзира да ли је у ову трансакције укључена или није - адреса само за гледање.</translation> </message> <message> <source>User-defined intent/purpose of the transaction.</source> <translation>Намена / сврха трансакције коју одређује корисник.</translation> </message> <message> <source>Amount removed from or added to balance.</source> <translation>Износ одбијен или додат салду.</translation> </message> </context> <context> <name>TransactionView</name> <message> <source>All</source> <translation>Све</translation> </message> <message> <source>Today</source> <translation>Данас</translation> </message> <message> <source>This week</source> <translation>Oве недеље</translation> </message> <message> <source>This month</source> <translation>Овог месеца</translation> </message> <message> <source>Last month</source> <translation>Претходног месеца</translation> </message> <message> <source>This year</source> <translation>Ове године</translation> </message> <message> <source>Range...</source> <translation>Опсег...</translation> </message> <message> <source>Received with</source> <translation>Примљен са...</translation> </message> <message> <source>Sent to</source> <translation>Послат ка</translation> </message> <message> <source>To yourself</source> <translation>Теби</translation> </message> <message> <source>Mined</source> <translation>Рударено</translation> </message> <message> <source>Other</source> <translation>Други</translation> </message> <message> <source>Enter address, transaction id, or label to search</source> <translation>Унесите адресу, ознаку трансакције, или назив за претрагу</translation> </message> <message> <source>Min amount</source> <translation>Минимални износ</translation> </message> <message> <source>Abandon transaction</source> <translation>Напусти трансакцију</translation> </message> <message> <source>Increase transaction fee</source> <translation>Повећај провизију трансакције</translation> </message> <message> <source>Copy address</source> <translation>Копирај адресу</translation> </message> <message> <source>Copy label</source> <translation>Копирај ознаку</translation> </message> <message> <source>Copy amount</source> <translation>Копирај износ</translation> </message> <message> <source>Copy transaction ID</source> <translation>Копирај идентификациони број трансакције</translation> </message> <message> <source>Copy raw transaction</source> <translation>Копирајте необрађену трансакцију</translation> </message> <message> <source>Copy full transaction details</source> <translation>Копирајте потпуне детаље трансакције</translation> </message> <message> <source>Edit label</source> <translation>Измени ознаку</translation> </message> <message> <source>Show transaction details</source> <translation>Прикажи детаље транакције</translation> </message> <message> <source>Export Transaction History</source> <translation>Извези Детаље Трансакције</translation> </message> <message> <source>Comma separated file (*.csv)</source> <translation>Фајл раздојен тачком (*.csv)</translation> </message> <message> <source>Confirmed</source> <translation>Потврђено</translation> </message> <message> <source>Watch-only</source> <translation>Само-гледање</translation> </message> <message> <source>Date</source> <translation>Датум</translation> </message> <message> <source>Type</source> <translation>Тип</translation> </message> <message> <source>Label</source> <translation>Ознака</translation> </message> <message> <source>Address</source> <translation>Адреса</translation> </message> <message> <source>ID</source> <translation>ID</translation> </message> <message> <source>Exporting Failed</source> <translation>Извоз Неуспешан</translation> </message> <message> <source>There was an error trying to save the transaction history to %1.</source> <translation>Десила се грешка приликом покушаја да се сними историја трансакција на %1.</translation> </message> <message> <source>Exporting Successful</source> <translation>Извоз Успешан</translation> </message> <message> <source>The transaction history was successfully saved to %1.</source> <translation>Историја трансакција је успешно снимљена на %1.</translation> </message> <message> <source>Range:</source> <translation>Опсег:</translation> </message> <message> <source>to</source> <translation>до</translation> </message> </context> <context> <name>UnitDisplayStatusBarControl</name> <message> <source>Unit to show amounts in. Click to select another unit.</source> <translation>Јединица у којој се приказују износи. Притисни да се прикаже друга јединица.</translation> </message> </context> <context> <name>WalletController</name> <message> <source>Close wallet</source> <translation>Затвори новчаник</translation> </message> <message> <source>Are you sure you wish to close the wallet &lt;i&gt;%1&lt;/i&gt;?</source> <translation>Да ли сте сигурни да желите да затворите новчаник &lt;i&gt;%1&lt;/i&gt;?</translation> </message> <message> <source>Closing the wallet for too long can result in having to resync the entire chain if pruning is enabled.</source> <translation>Услед затварања новчаника на дугачки период времена може се десити да је потребна поновна синхронизација комплетног ланца, уколико је дозвољено резање.</translation> </message> <message> <source>Close all wallets</source> <translation>Затвори све новчанике</translation> </message> <message> <source>Are you sure you wish to close all wallets?</source> <translation>Да ли сигурно желите да затворите све новчанике?</translation> </message> </context> <context> <name>WalletFrame</name> <message> <source>Create a new wallet</source> <translation>Направи нови ночаник</translation> </message> </context> <context> <name>WalletModel</name> <message> <source>Send Coins</source> <translation>Слање новца</translation> </message> <message> <source>Fee bump error</source> <translation>Изненадна грешка у накнади</translation> </message> <message> <source>Increasing transaction fee failed</source> <translation>Повећавање провизије за трансакцију није успело</translation> </message> <message> <source>Do you want to increase the fee?</source> <translation>Да ли желиш да увећаш накнаду?</translation> </message> <message> <source>Do you want to draft a transaction with fee increase?</source> <translation>Да ли желите да саставите трансакцију са повећаном провизијом?</translation> </message> <message> <source>Current fee:</source> <translation>Тренутна накнада:</translation> </message> <message> <source>Increase:</source> <translation>Увећај:</translation> </message> <message> <source>New fee:</source> <translation>Нова накнада:</translation> </message> <message> <source>Confirm fee bump</source> <translation>Потврдите ударну провизију</translation> </message> <message> <source>Can't draft transaction.</source> <translation>Није могуће саставити трансакцију.</translation> </message> <message> <source>PSBT copied</source> <translation>PSBT је копиран</translation> </message> <message> <source>Can't sign transaction.</source> <translation>Није могуће потписати трансакцију.</translation> </message> <message> <source>Could not commit transaction</source> <translation>Трансакција није могућа</translation> </message> <message> <source>default wallet</source> <translation>подразумевани новчаник</translation> </message> </context> <context> <name>WalletView</name> <message> <source>&amp;Export</source> <translation>&amp;Извези</translation> </message> <message> <source>Export the data in the current tab to a file</source> <translation>Извези податке из одабране картице у фајлj</translation> </message> <message> <source>Error</source> <translation>Грешка</translation> </message> <message> <source>Unable to decode PSBT from clipboard (invalid base64)</source> <translation>Није могуће декодирати PSBT из клипборд-а (неважећи base64)</translation> </message> <message> <source>Load Transaction Data</source> <translation>Учитај Податке Трансакције</translation> </message> <message> <source>Partially Signed Transaction (*.psbt)</source> <translation>Делимично Потписана Трансакција (*.psbt)</translation> </message> <message> <source>PSBT file must be smaller than 100 MiB</source> <translation>PSBT фајл мора бити мањи од 100 MiB</translation> </message> <message> <source>Unable to decode PSBT</source> <translation>Немогуће декодирати PSBT</translation> </message> <message> <source>Backup Wallet</source> <translation>Резервна копија новчаника</translation> </message> <message> <source>Wallet Data (*.dat)</source> <translation>Датотека новчаника (*.dat)</translation> </message> <message> <source>Backup Failed</source> <translation>Резервна копија није успела</translation> </message> <message> <source>There was an error trying to save the wallet data to %1.</source> <translation>Десила се грешка приликом покушаја да се сними датотека новчаника на %1.</translation> </message> <message> <source>Backup Successful</source> <translation>Резервна копија је успела</translation> </message> <message> <source>The wallet data was successfully saved to %1.</source> <translation>Датотека новчаника је успешно снимљена на %1.</translation> </message> <message> <source>Cancel</source> <translation>Откажи</translation> </message> </context> <context> <name>bitcoin-core</name> <message> <source>Distributed under the MIT software license, see the accompanying file %s or %s</source> <translation>Дистрибуирано под MIT софтверском лиценцом, погледајте придружени документ %s или %s</translation> </message> <message> <source>Prune configured below the minimum of %d MiB. Please use a higher number.</source> <translation>Скраћивање је конфигурисано испод минимума од %d MiB. Молимо користите већи број.</translation> </message> <message> <source>Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node)</source> <translation>Скраћивање: последња синхронизација иде преко одрезаних података. Потребно је урадити ре-индексирање (преузети комплетан ланац блокова поново у случају одсеченог чвора)</translation> </message> <message> <source>Pruning blockstore...</source> <translation>Скраћивање спремљених блокова...</translation> </message> <message> <source>Unable to start HTTP server. See debug log for details.</source> <translation>Стартовање HTTP сервера није могуће. Погледати дневник исправљених грешака за детаље.</translation> </message> <message> <source>The %s developers</source> <translation>%s девелопери</translation> </message> <message> <source>Cannot obtain a lock on data directory %s. %s is probably already running.</source> <translation>Директоријум података се не може закључати %s. %s је вероватно већ покренут.</translation> </message> <message> <source>Cannot provide specific connections and have addrman find outgoing connections at the same.</source> <translation>Не може се обезбедити одређена конекција и да addrman нађе одлазне конекције у исто време.</translation> </message> <message> <source>Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation>Грешка у читању %s! Сви кључеви су прочитани коректно, али подаци о трансакцији или уноси у адресар могу недостајати или бити нетачни.</translation> </message> <message> <source>Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly.</source> <translation>Молим проверите да су време и датум на вашем рачунару тачни. Уколико је сат нетачан, %s неће радити исправно.</translation> </message> <message> <source>Please contribute if you find %s useful. Visit %s for further information about the software.</source> <translation>Молим донирајте, уколико сматрате %s корисним. Посетите %s за више информација о софтверу.</translation> </message> <message> <source>The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct</source> <translation>База података о блоковима садржи блок, за који се чини да је из будућности. Ово може бити услед тога што су време и датум на вашем рачунару нису подешени коректно. Покушајте обнову базе података о блоковима, само уколико сте сигурни да су време и датум на вашем рачунару исправни.</translation> </message> <message> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation>Ово је тестна верзија пред издавање - користите на ваш ризик - не користити за рударење или трговачку примену</translation> </message> <message> <source>This is the transaction fee you may discard if change is smaller than dust at this level</source> <translation>Ово је накнада за трансакцију коју можете одбацити уколико је мања од нивоа прашине</translation> </message> <message> <source>Unable to replay blocks. You will need to rebuild the database using -reindex-chainstate.</source> <translation>Блокове није могуће поново репродуковати. Ви ћете морати да обновите базу података користећи -reindex-chainstate.</translation> </message> <message> <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source> <translation>Није могуће вратити базу података на стање пре форк-а. Ви ћете морати да урадите поновно преузимање ланца блокова.</translation> </message> <message> <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source> <translation>Упозорење: Изгледа да не постоји пуна сагласност на мрежи. Изгледа да одређени рудари имају проблеме.</translation> </message> <message> <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source> <translation>Упозорење: Изгледа да се ми у потпуности не слажемо са нашим чворовима! Можда постоји потреба да урадите надоградњу, или други чворови морају да ураде надоградњу.</translation> </message> <message> <source>-maxmempool must be at least %d MB</source> <translation>-maxmempool мора бити минимално %d MB</translation> </message> <message> <source>Cannot resolve -%s address: '%s'</source> <translation>Не могу решити -%s адреса: '%s'</translation> </message> <message> <source>Change index out of range</source> <translation>Промењен индекс изван домета</translation> </message> <message> <source>Config setting for %s only applied on %s network when in [%s] section.</source> <translation>Подешавање конфигурације за %s је само примењено на %s мрежи када је у [%s] секцији.</translation> </message> <message> <source>Copyright (C) %i-%i</source> <translation>Ауторско право (C) %i-%i</translation> </message> <message> <source>Corrupted block database detected</source> <translation>Детектована је оштећена база података блокова</translation> </message> <message> <source>Could not find asmap file %s</source> <translation>Не могу пронаћи датотеку asmap %s</translation> </message> <message> <source>Could not parse asmap file %s</source> <translation>Не могу рашчланити датотеку asmap %s</translation> </message> <message> <source>Do you want to rebuild the block database now?</source> <translation>Да ли желите да сада обновите базу података блокова?</translation> </message> <message> <source>Error initializing block database</source> <translation>Грешка у иницијализацији базе података блокова</translation> </message> <message> <source>Error initializing wallet database environment %s!</source> <translation>Грешка код иницијализације окружења базе података новчаника %s!</translation> </message> <message> <source>Error loading %s</source> <translation>Грешка током учитавања %s</translation> </message> <message> <source>Error loading %s: Private keys can only be disabled during creation</source> <translation>Грешка током учитавања %s: Приватни кључеви могу бити онемогућени само приликом креирања</translation> </message> <message> <source>Error loading %s: Wallet corrupted</source> <translation>Грешка током учитавања %s: Новчаник је оштећен</translation> </message> <message> <source>Error loading %s: Wallet requires newer version of %s</source> <translation>Грешка током учитавања %s: Новчаник захтева новију верзију %s</translation> </message> <message> <source>Error loading block database</source> <translation>Грешка у учитавању базе података блокова</translation> </message> <message> <source>Error opening block database</source> <translation>Грешка приликом отварања базе података блокова</translation> </message> <message> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>Преслушавање није успело ни на једном порту. Користите -listen=0 уколико желите то.</translation> </message> <message> <source>Failed to rescan the wallet during initialization</source> <translation>Није успело поновно скенирање новчаника приликом иницијализације.</translation> </message> <message> <source>Importing...</source> <translation>Увоз у току...</translation> </message> <message> <source>Incorrect or no genesis block found. Wrong datadir for network?</source> <translation>Почетни блок је погрешан или се не може пронаћи. Погрешан datadir за мрежу?</translation> </message> <message> <source>Initialization sanity check failed. %s is shutting down.</source> <translation>Провера исправности иницијализације није успела. %s се искључује.</translation> </message> <message> <source>Invalid P2P permission: '%s'</source> <translation>Неважећа P2P дозвола: '%s'</translation> </message> <message> <source>Invalid amount for -%s=&lt;amount&gt;: '%s'</source> <translation>Неважећи износ за %s=&lt;amount&gt;: '%s'</translation> </message> <message> <source>Invalid amount for -discardfee=&lt;amount&gt;: '%s'</source> <translation>Неважећи износ за -discardfee=&lt;amount&gt;: '%s'</translation> </message> <message> <source>Invalid amount for -fallbackfee=&lt;amount&gt;: '%s'</source> <translation>Неважећи износ за -fallbackfee=&lt;amount&gt;: '%s'</translation> </message> <message> <source>Specified blocks directory "%s" does not exist.</source> <translation>Наведени директоријум блокова "%s" не постоји.</translation> </message> <message> <source>Unknown address type '%s'</source> <translation>Непознати тип адресе '%s'</translation> </message> <message> <source>Unknown change type '%s'</source> <translation>Непознати тип промене '%s'</translation> </message> <message> <source>Upgrading txindex database</source> <translation>Надоградња txindex базе података</translation> </message> <message> <source>Loading P2P addresses...</source> <translation>Учитавање P2P адреса...</translation> </message> <message> <source>Loading banlist...</source> <translation>Учитавање листе забрана...</translation> </message> <message> <source>Not enough file descriptors available.</source> <translation>Нема довољно доступних дескриптора датотеке.</translation> </message> <message> <source>Prune cannot be configured with a negative value.</source> <translation>Скраћење се не може конфигурисати са негативном вредношћу.</translation> </message> <message> <source>Prune mode is incompatible with -txindex.</source> <translation>Мод скраћивања није компатибилан са -txindex.</translation> </message> <message> <source>Replaying blocks...</source> <translation>Поновно репродуковање блокова...</translation> </message> <message> <source>Rewinding blocks...</source> <translation>Премотавање блокова...</translation> </message> <message> <source>The source code is available from %s.</source> <translation>Изворни код је доступан из %s.</translation> </message> <message> <source>Transaction fee and change calculation failed</source> <translation>Провизија за трансакцију и промена израчуна није успела</translation> </message> <message> <source>Unable to bind to %s on this computer. %s is probably already running.</source> <translation>Није могуће повезивање са %s на овом рачунару. %s је вероватно већ покренут.</translation> </message> <message> <source>Unable to generate keys</source> <translation>Није могуће генерисати кључеве</translation> </message> <message> <source>Unsupported logging category %s=%s.</source> <translation>Категорија записа није подржана %s=%s.</translation> </message> <message> <source>Upgrading UTXO database</source> <translation>Надоградња UTXO базе података</translation> </message> <message> <source>User Agent comment (%s) contains unsafe characters.</source> <translation>Коментар агента корисника (%s) садржи небезбедне знакове.</translation> </message> <message> <source>Verifying blocks...</source> <translation>Потврда блокова у току...</translation> </message> <message> <source>Wallet needed to be rewritten: restart %s to complete</source> <translation>Новчаник треба да буде преписан: поновно покрените %s да завршите</translation> </message> <message> <source>Error: Listening for incoming connections failed (listen returned error %s)</source> <translation>Грешка: Претрага за долазним конекцијама није успела (претрага враћа грешку %s)</translation> </message> <message> <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source> <translation>Неважећи износ за -maxtxfee=&lt;amount&gt;: '%s' (мора бити minrelay провизија од %s да би се спречило да се трансакција заглави)</translation> </message> <message> <source>The transaction amount is too small to send after the fee has been deducted</source> <translation>Износ трансакције је толико мали за слање након што се одузме провизија</translation> </message> <message> <source>You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain</source> <translation>Обновите базу података користећи -reindex да би се вратили у нескраћени мод. Ово ће урадити поновно преузимање комплетног ланца података</translation> </message> <message> <source>Disk space is too low!</source> <translation>Премало простора на диску!</translation> </message> <message> <source>Error reading from database, shutting down.</source> <translation>Грешка приликом читања из базе података, искључивање у току.</translation> </message> <message> <source>Error upgrading chainstate database</source> <translation>Грешка приликом надоградње базе података стања ланца</translation> </message> <message> <source>Error: Disk space is low for %s</source> <translation>Грешка: Простор на диску је мали за %s</translation> </message> <message> <source>Invalid -onion address or hostname: '%s'</source> <translation>Неважећа -onion адреса или име хоста: '%s'</translation> </message> <message> <source>Invalid -proxy address or hostname: '%s'</source> <translation>Неважећа -proxy адреса или име хоста: '%s'</translation> </message> <message> <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source> <translation>Неважећи износ за -paytxfee=&lt;amount&gt;: '%s' (мора бити бар %s)</translation> </message> <message> <source>Invalid netmask specified in -whitelist: '%s'</source> <translation>Неважећа мрежна маска наведена у -whitelist: '%s'</translation> </message> <message> <source>Need to specify a port with -whitebind: '%s'</source> <translation>Ви морате одредити порт са -whitebind: '%s'</translation> </message> <message> <source>Prune mode is incompatible with -blockfilterindex.</source> <translation>Мод скраћења је некомпатибилна са -blockfilterindex.</translation> </message> <message> <source>Reducing -maxconnections from %d to %d, because of system limitations.</source> <translation>Смањивање -maxconnections са %d на %d, због ограничења система.</translation> </message> <message> <source>Section [%s] is not recognized.</source> <translation>Одељак [%s] није препознат.</translation> </message> <message> <source>Signing transaction failed</source> <translation>Потписивање трансакције није успело</translation> </message> <message> <source>Specified -walletdir "%s" does not exist</source> <translation>Наведени -walletdir "%s" не постоји</translation> </message> <message> <source>Specified -walletdir "%s" is a relative path</source> <translation>Наведени -walletdir "%s" је релативна путања</translation> </message> <message> <source>Specified -walletdir "%s" is not a directory</source> <translation>Наведени -walletdir "%s" није директоријум</translation> </message> <message> <source>The specified config file %s does not exist </source> <translation>Наведени конфигурациони документ %s не постоји </translation> </message> <message> <source>The transaction amount is too small to pay the fee</source> <translation>Износ трансакције је сувише мали да се плати трансакција</translation> </message> <message> <source>This is experimental software.</source> <translation>Ово је експерименталн софтвер.</translation> </message> <message> <source>Transaction amount too small</source> <translation>Износ трансакције премали.</translation> </message> <message> <source>Transaction too large</source> <translation>Трансакција превелика.</translation> </message> <message> <source>Unable to bind to %s on this computer (bind returned error %s)</source> <translation>Није могуће повезати %s на овом рачунару (веза враћа грешку %s)</translation> </message> <message> <source>Unable to create the PID file '%s': %s</source> <translation>Стварање PID документа '%s': %s није могуће</translation> </message> <message> <source>Unable to generate initial keys</source> <translation>Генерисање кључева за иницијализацију није могуће</translation> </message> <message> <source>Unknown -blockfilterindex value %s.</source> <translation>Непозната вредност -blockfilterindex %s.</translation> </message> <message> <source>Verifying wallet(s)...</source> <translation>Потврђивање новчаника(а)...</translation> </message> <message> <source>Warning: unknown new rules activated (versionbit %i)</source> <translation>Упозорење: активирано је ново непознато правило (versionbit %i)</translation> </message> <message> <source>-maxtxfee is set very high! Fees this large could be paid on a single transaction.</source> <translation>-maxtxfee је постављен сувише високо! Овако велике провизије могу бити наплаћене на само једној трансакцији.</translation> </message> <message> <source>This is the transaction fee you may pay when fee estimates are not available.</source> <translation>Ово је провизија за трансакцију коју можете платити када процена провизије није доступна.</translation> </message> <message> <source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source> <translation>Укупна дужина мрежне верзије низа (%i) је већа од максималне дужине (%i). Смањити број или величину корисничких коментара.</translation> </message> <message> <source>%s is set very high!</source> <translation>%s је постављен врло високо!</translation> </message> <message> <source>Error loading wallet %s. Duplicate -wallet filename specified.</source> <translation>Грешка приликом учитавања новчаника %s. Наведено је дуплирано име датотеке -wallet.</translation> </message> <message> <source>Starting network threads...</source> <translation>Покретање мрежних тема...</translation> </message> <message> <source>The wallet will avoid paying less than the minimum relay fee.</source> <translation>Новчаник ће избећи плаћање износа мањег него што је минимална повезана провизија.</translation> </message> <message> <source>This is the minimum transaction fee you pay on every transaction.</source> <translation>Ово је минимални износ провизије за трансакцију коју ћете платити на свакој трансакцији.</translation> </message> <message> <source>This is the transaction fee you will pay if you send a transaction.</source> <translation>Ово је износ провизије за трансакцију коју ћете платити уколико шаљете трансакцију.</translation> </message> <message> <source>Transaction amounts must not be negative</source> <translation>Износ трансакције не може бити негативан</translation> </message> <message> <source>Transaction has too long of a mempool chain</source> <translation>Трансакција има предугачак ланац у удруженој меморији</translation> </message> <message> <source>Transaction must have at least one recipient</source> <translation>Трансакција мора имати бар једног примаоца</translation> </message> <message> <source>Unknown network specified in -onlynet: '%s'</source> <translation>Непозната мрежа је наведена у -onlynet: '%s'</translation> </message> <message> <source>Insufficient funds</source> <translation>Недовољно средстава</translation> </message> <message> <source>Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable -fallbackfee.</source> <translation>Процена провизије није успела. Промена провизије током трансакције је онемогућена. Сачекајте неколико блокова или омогућите -fallbackfee.</translation> </message> <message> <source>Warning: Private keys detected in wallet {%s} with disabled private keys</source> <translation>Упозорење: Приватни кључеви су пронађени у новчанику {%s} са онемогућеним приватним кључевима.</translation> </message> <message> <source>Cannot write to data directory '%s'; check permissions.</source> <translation>Није могуће извршити упис у директоријум података '%s'; проверите дозволе за упис.</translation> </message> <message> <source>Loading block index...</source> <translation>Учитавање индекса блокова</translation> </message> <message> <source>Loading wallet...</source> <translation>Новчаник се учитава...</translation> </message> <message> <source>Cannot downgrade wallet</source> <translation>Новчаник се не може уназадити</translation> </message> <message> <source>Rescanning...</source> <translation>Ponovo skeniram...</translation> </message> <message> <source>Done loading</source> <translation>Završeno učitavanje</translation> </message> </context> </TS>
particl/particl-core
src/qt/locale/bitcoin_sr.ts
TypeScript
mit
180,104
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>DesignWare USB 2.0 OTG Controller (DWC_otg) Device Driver: hwcfg3_data Union Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.7 --> <div class="tabs"> <ul> <li><a href="main.html"><span>Main&nbsp;Page</span></a></li> <li id="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li> </ul></div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li> <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li> </ul></div> <h1>hwcfg3_data Union Reference</h1><!-- doxytag: class="hwcfg3_data" -->This union represents the bit fields in the User HW Config3 Register. <a href="#_details">More...</a> <p> <code>#include &lt;<a class="el" href="dwc__otg__regs_8h-source.html">dwc_otg_regs.h</a>&gt;</code> <p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Data Fields</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9daf160f3fc0cc8e4e68c037f6c2f9d7"></a><!-- doxytag: member="hwcfg3_data::d32" ref="9daf160f3fc0cc8e4e68c037f6c2f9d7" args="" --> uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="unionhwcfg3__data.html#9daf160f3fc0cc8e4e68c037f6c2f9d7">d32</a></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">raw register data <br></td></tr> <tr><td class="memItemLeft" nowrap><a class="anchor" name="928c5de42f8af177ce34712123b5093c"></a><!-- doxytag: member="hwcfg3_data::b" ref="928c5de42f8af177ce34712123b5093c" args="" --> struct {</td></tr> <tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;unsigned&nbsp;&nbsp;&nbsp;<a class="el" href="unionhwcfg3__data.html#66f311995decf2f11d620aa6a56fa26e">xfer_size_cntr_width</a>:4</td></tr> <tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;unsigned&nbsp;&nbsp;&nbsp;<a class="el" href="unionhwcfg3__data.html#a397ea503f5155d8e3a66cc82d7937f2">packet_size_cntr_width</a>:3</td></tr> <tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;unsigned&nbsp;&nbsp;&nbsp;<a class="el" href="unionhwcfg3__data.html#dcd27bbcb3f0e0f5fbd6e7e8b7db1865">otg_func</a>:1</td></tr> <tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;unsigned&nbsp;&nbsp;&nbsp;<a class="el" href="unionhwcfg3__data.html#dd2115f4a4bfa47b2c9c9a7b5f42e203">i2c</a>:1</td></tr> <tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;unsigned&nbsp;&nbsp;&nbsp;<a class="el" href="unionhwcfg3__data.html#5008cb6cf85beb23f391e8ccf7306884">vendor_ctrl_if</a>:1</td></tr> <tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;unsigned&nbsp;&nbsp;&nbsp;<a class="el" href="unionhwcfg3__data.html#37ea87e07a63864a3b985df59fe98c8d">optional_features</a>:1</td></tr> <tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;unsigned&nbsp;&nbsp;&nbsp;<a class="el" href="unionhwcfg3__data.html#2aee57ed6a1fb0c63830b9f3b3754373">synch_reset_type</a>:1</td></tr> <tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;unsigned&nbsp;&nbsp;&nbsp;<a class="el" href="unionhwcfg3__data.html#a01a48361a21cb9dfbbd555823b8531b">otg_enable_ic_usb</a>:1</td></tr> <tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;unsigned&nbsp;&nbsp;&nbsp;<a class="el" href="unionhwcfg3__data.html#8c83b7ac3a4bb366119aeb3195126445">otg_enable_hsic</a>:1</td></tr> <tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;unsigned&nbsp;&nbsp;&nbsp;<a class="el" href="unionhwcfg3__data.html#7ef81a007358254606fa96f0c620f8a8">reserved14</a>:1</td></tr> <tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;unsigned&nbsp;&nbsp;&nbsp;<a class="el" href="unionhwcfg3__data.html#2b9c39a4ce021bfd039729ccf2c2c503">otg_lpm_en</a>:1</td></tr> <tr><td class="memItemLeft" nowrap>&nbsp;&nbsp;&nbsp;unsigned&nbsp;&nbsp;&nbsp;<a class="el" href="unionhwcfg3__data.html#f885715ddb953dbe95acc08e49264706">dfifo_depth</a>:16</td></tr> <tr><td class="memItemLeft" nowrap valign="top">}&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="unionhwcfg3__data.html#928c5de42f8af177ce34712123b5093c">b</a></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">register bits <br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> This union represents the bit fields in the User HW Config3 Register. <p> Read the register into the <em>d32</em> element then read out the bits using the <em>b</em>it elements. <p> <p> Definition at line <a class="el" href="dwc__otg__regs_8h-source.html#l00806">806</a> of file <a class="el" href="dwc__otg__regs_8h-source.html">dwc_otg_regs.h</a>.<hr>The documentation for this union was generated from the following file:<ul> <li><a class="el" href="dwc__otg__regs_8h-source.html">dwc_otg_regs.h</a></ul> <hr size="1"><address style="align: right;"><small>Generated on Tue May 5 02:22:49 2009 for DesignWare USB 2.0 OTG Controller (DWC_otg) Device Driver by&nbsp; <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address> </body> </html>
sahdman/rpi_android_kernel
linux-3.1.9/drivers/usb/host/dwc_otg/doc/html/unionhwcfg3__data.html
HTML
mit
5,430
# CKEditor for Symphony CMS (EXPERIMENTAL) - Version: 0.71 beta - Date: Tuesday, 26 June 2010 - Author: Tony Arnold, tony@tonyarnold.com - Repository: <http://github.com/tonyarnold/symphony-ckeditor/> - Requirements: Symphony CMS 2.0.8 <http://github.com/symphony/symphony-2/tree/master> ## Introduction This extension provides [CKEditor](http://ckeditor.com/) as text-formatter for Symphony CMS. For further information about the editor please visit [www.ckeditor.com](http://ckeditor.com/). It is based upon code found in [Nils H&ouml;rrmann's WYMEditor](http://github.com/nilshoerrmann/wymeditor).
tonyarnold/symphony-ckeditor
README.markdown
Markdown
mit
604
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ import type {Tests, Steps} from './Tester'; class Suite { getBeforeEach: Steps; tags: Array<string>; tests: Tests; constructor(tests: Tests) { this.tests = tests; this.tags = []; this.getBeforeEach = () => []; } beforeEach(steps: Steps): this { this.getBeforeEach = steps; return this; } addTags(tags: Array<string>): this { this.tags = (this.tags || []).concat(tags); return this; } } module.exports = { Suite, default: Suite, };
mroch/flow
packages/flow-dev-tools/src/test/Suite.js
JavaScript
mit
701
#!/usr/bin/env python from icqsol.bem.icqPotentialIntegrals import PotentialIntegrals from icqsol.bem.icqLaplaceMatrices import getFullyQualifiedSharedLibraryName import numpy def testObserverOnA(order): paSrc = numpy.array([0., 0., 0.]) pbSrc = numpy.array([1., 0., 0.]) pcSrc = numpy.array([0., 1., 0.]) xObs = paSrc integral = PotentialIntegrals(xObs, pbSrc, pcSrc, order).getIntegralOneOverR() exact = numpy.sqrt(2.) * numpy.arcsinh(1.) print('testObserverOnA: order = {0} integral = {1} exact = {2} error = {3}'.format(\ order, integral, exact, integral - exact)) def testObserverOnB(order): paSrc = numpy.array([0., 0., 0.]) pbSrc = numpy.array([1., 0., 0.]) pcSrc = numpy.array([0., 1., 0.]) xObs = pbSrc integral = PotentialIntegrals(xObs, pcSrc, paSrc, order).getIntegralOneOverR() exact = numpy.arcsinh(1.) print('testObserverOnB: order = {0} integral = {1} exact = {2} error = {3}'.format(\ order, integral, exact, integral - exact)) def testObserverOnC(order): paSrc = numpy.array([0., 0., 0.]) pbSrc = numpy.array([1., 0., 0.]) pcSrc = numpy.array([0., 1., 0.]) xObs = pcSrc integral = PotentialIntegrals(xObs, paSrc, pbSrc, order).getIntegralOneOverR() exact = numpy.arcsinh(1.) print('testObserverOnC: order = {0} integral = {1} exact = {2} error = {3}'.format(\ order, integral, exact, integral - exact)) def testOffDiagonal2Triangles(): import vtk import sys import pkg_resources PY_MAJOR_VERSION = sys.version_info[0] from ctypes import cdll, c_long, POINTER, c_double pdata = vtk.vtkPolyData() points = vtk.vtkPoints() points.SetNumberOfPoints(4) points.SetPoint(0, (0., 0., 0.)) points.SetPoint(1, (1., 0., 0.)) points.SetPoint(2, (1., 1., 0.)) points.SetPoint(3, (0., 1., 0.)) pdata.SetPoints(points) pdata.Allocate(2, 1) ptIds = vtk.vtkIdList() ptIds.SetNumberOfIds(3) ptIds.SetId(0, 0); ptIds.SetId(1, 1); ptIds.SetId(2, 3) pdata.InsertNextCell(vtk.VTK_POLYGON, ptIds) ptIds.SetId(0, 1); ptIds.SetId(1, 2); ptIds.SetId(2, 3) pdata.InsertNextCell(vtk.VTK_POLYGON, ptIds) addr = int(pdata.GetAddressAsString('vtkPolyData')[5:], 0) gMat = numpy.zeros((2,2), numpy.float64) if PY_MAJOR_VERSION < 3: fullyQualifiedLibName = pkg_resources.resource_filename('icqsol', 'icqLaplaceMatricesCpp.so') else: libName = pkg_resources.resource_filename('icqsol', 'icqLaplaceMatricesCpp') fullyQualifiedLibName = getFullyQualifiedSharedLibraryName(libName) lib = cdll.LoadLibrary(fullyQualifiedLibName) lib.computeOffDiagonalTerms(c_long(addr), gMat.ctypes.data_as(POINTER(c_double))) exact = numpy.array([[0, -0.07635909342383773],[-0.07635909342383773, 0]]) print(gMat) print(exact) print('error: {0}'.format(gMat - exact)) if __name__ == '__main__': for order in range(1, 6): testObserverOnA(order) testObserverOnB(order) testObserverOnC(order) print('-'*80) testOffDiagonal2Triangles()
gregvonkuster/icqsol
tests/testPotentialIntegrals.py
Python
mit
3,128
/*jshint unused:false */ "use strict"; var _verbosity = 0; var _prefix = "[videojs-vast-vpaid] "; function setVerbosity (v) { _verbosity = v; } function handleMsg (method, args) { if ((args.length) > 0 && (typeof args[0] === 'string')) { args[0] = _prefix + args[0]; } if (method.apply) { method.apply (console, Array.prototype.slice.call(args)); } else { method (Array.prototype.slice.call(args)); } } function debug () { if (_verbosity < 4) { return; } if (typeof console.debug === 'undefined') { // IE 10 doesn't have a console.debug() function handleMsg (console.log, arguments); } else { handleMsg (console.debug, arguments); } } function log () { if (_verbosity < 3) { return; } handleMsg (console.log, arguments); } function info () { if (_verbosity < 2) { return; } handleMsg (console.info, arguments); } function warn () { if (_verbosity < 1) { return; } handleMsg (console.warn, arguments); } function error () { handleMsg (console.error, arguments); } var consoleLogger = { setVerbosity: setVerbosity, debug: debug, log: log, info: info, warn: warn, error: error }; if ((typeof (console) === 'undefined') || !console.log) { // no console available; make functions no-op consoleLogger.debug = function () {}; consoleLogger.log = function () {}; consoleLogger.info = function () {}; consoleLogger.warn = function () {}; consoleLogger.error = function () {}; } module.exports = consoleLogger;
MailOnline/videojs-vast-vpaid
src/scripts/utils/consoleLogger.js
JavaScript
mit
1,673
shared_examples "win" do it "works" do Demo.logger.info "works" end context "mainframe" do it "hacks" do Demo.logger.info "hacks" end end end
abstractive/rspec-logsplit
spec/support/shared_examples/win.rb
Ruby
mit
169
module HarvestWheelman VERSION = "1.0.0" end
kfatehi/harvest_wheelman
lib/harvest_wheelman/version.rb
Ruby
mit
47
div, span, body, pre{padding:0; margin:0; max-width:100%; } body{ color:#000; font-size:14px; background:#211F1F; } body, div, pre{ word-wrap:break-word; } .file-name{ color:#00B864; font-weight:bold; padding: 6px; } pre{ max-height:30px;} .file{ width:100%; color:#EF6100; margin: 12px 0; } .error .line, .error .main{ min-height:20px; line-height:20px; padding:4px 6px ; display:block; background:rgba(0,30, 52 ,0.6); } .error .main{background:#121212;} .error .message{ background:rgba(24,24,24,0.6); font-size:18px; color:#F84E49; padding:12px; background:#2a2a2a; } .error .title{ background:#7C4240; width:100%; display:block; padding:6px; font-size:16px; }
JhulFramework/PHPServer4ODK
required/odk/0.1/framework/jhul/Jhul/Components/EX/resources/style.css
CSS
mit
690
/* * Copyright (c) 2014-2017 Kumuluz and/or its affiliates * and other contributors as indicated by the @author tags and * the contributor list. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * The software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, express or * implied, including but not limited to the warranties of merchantability, * fitness for a particular purpose and noninfringement. in no event shall the * authors or copyright holders be liable for any claim, damages or other * liability, whether in an action of contract, tort or otherwise, arising from, * out of or in connection with the software or the use or other dealings in the * software. See the License for the specific language governing permissions and * limitations under the License. */ package com.kumuluz.ee.configuration.utils; import java.util.*; /** * @author Urban Malc * @since 2.5.0 */ public class ConfigurationSourceUtils { public static Optional<Integer> getListSize(String key, Collection<String> allKeys) { Integer maxIndex = -1; for (String propertyKey : allKeys) { if (propertyKey.startsWith(key + "[")) { int openingIndex = key.length() + 1; int closingIndex = propertyKey.indexOf("]", openingIndex + 1); try { Integer idx = Integer.parseInt(propertyKey.substring(openingIndex, closingIndex)); maxIndex = Math.max(maxIndex, idx); } catch (NumberFormatException ignored) { } } } if (maxIndex != -1) { return Optional.of(maxIndex + 1); } return Optional.empty(); } public static Optional<List<String>> getMapKeys(String key, Collection<String> allKeys) { Set<String> mapKeys = new HashSet<>(); for (String propertyKey : allKeys) { String mapKey = ""; if (key.isEmpty()) { mapKey = propertyKey; } else if (propertyKey.startsWith(key)) { int index = key.length() + 1; if (index < propertyKey.length() && propertyKey.charAt(index - 1) == '.') { mapKey = propertyKey.substring(index); } } if (!mapKey.isEmpty()) { int endIndex = mapKey.indexOf("."); if (endIndex > 0) { mapKey = mapKey.substring(0, endIndex); } int bracketIndex = mapKey.indexOf("["); if (bracketIndex > 0) { mapKey = mapKey.substring(0, bracketIndex); } mapKeys.add(mapKey); } } if (mapKeys.isEmpty()) { return Optional.empty(); } return Optional.of(new ArrayList<>(mapKeys)); } }
TFaga/KumuluzEE
common/src/main/java/com/kumuluz/ee/configuration/utils/ConfigurationSourceUtils.java
Java
mit
3,049
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using NUnit.Framework; namespace osu.Game.Rulesets.Mania.Tests { [TestFixture] public class TestCasePerformancePoints : Game.Tests.Visual.TestCasePerformancePoints { public TestCasePerformancePoints() : base(new ManiaRuleset()) { } } }
NeoAdonis/osu
osu.Game.Rulesets.Mania.Tests/TestCasePerformancePoints.cs
C#
mit
440
<?php /** * Created by PhpStorm. * User: mart * Date: 05/10/17 * Time: 13:56 */ namespace Tixi\App\AppBundle\Controller; use Doctrine\ORM\EntityManager; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Sensio\Bundle\GeneratorBundle\Generator\DoctrineFormGenerator; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\Finder\Exception\AccessDeniedException; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Bridge\Monolog\Logger; use Application\Migrations; use Doctrine\DBAL\Schema\Schema; use Symfony\Component\HttpFoundation\Response; /** * REFERENCE: HowToUpdateDatabaseSchemasInTIXI24.docx * * Class MigrationsController * @package Tixi\App\AppBundle\Controller * @Route("/migrations") */ class MigrationsController extends Controller { /** * @Route("/test1",name="tixiapp_migrations_test1") * @Method({"GET"}) * @param Request $request * @throws AccessDeniedException * @return Response */ public function migrateAction(Request $request) { if (false === $this->get('security.context')->isGranted('ROLE_ADMIN')) { throw new AccessDeniedException(); } $mtime1 = microtime(true); $message = $this->postUp(new Schema()); $mtime2 = microtime(true); $mtime = round(($mtime2 - $mtime1), 1); // seconds $response = new Response(); $response->setContent($message."(".$mtime." secs)"); return $response; } /** * Custom code for migrating data (and structure) * @param Schema $schema */ private function postUp(Schema $schema) { // the custom code goes here } /** * @Route("/status",name="tixiapp_migrations_status") * @Method({"GET"}) * @param Request $request * @throws AccessDeniedException * @return Response */ public function migrationsStatus(Request $request) { if (false === $this->get('security.context')->isGranted('ROLE_ADMIN')) { throw new AccessDeniedException(); } $rootDir = $this->get('kernel')->getRootDir(); $command = 'php '.$rootDir.'/console doctrine:migrations:status'; $content = shell_exec($command); $content = str_replace("\n", '<br />', $content); return new Response($content); } }
hertus/sfitixi
src/Tixi/App/AppBundle/Controller/MigrationsController.php
PHP
mit
2,524
#!/usr/bin/python #encoding=utf-8 import urllib, urllib2 import cookielib import re import time from random import random from json import dumps as json_dumps, loads as json_loads import sys reload(sys) sys.setdefaultencoding('utf-8') import os project_root_path = os.path.abspath(os.path.join(os.path.dirname(__file__))) sys.path.append(project_root_path) from logger.logger import logFactory logger = logFactory.getLogger(__name__) class MiaoZuan(object): """docstring for MiaoZuan""" def __init__(self, account_file): super(MiaoZuan, self).__init__() self.headers = headers = { 'User-Agent':'IOS_8.1_IPHONE5C', 'm-lng':'113.331639', 'm-ct':'2', 'm-lat':'23.158624', 'm-cw':'320', 'm-iv':'3.0.1', 'm-ch':'568', 'm-cv':'6.5.2', 'm-lt':'1', 'm-nw':'WIFI', #'Content-Type':'application/json;charset=utf-8' } self.accountList = self.get_account_List(account_file) def get_account_List(self, account_file): accountList = [] try: with open(account_file, 'r') as f: lines = f.readlines() for line in lines: user, userName, passWord, imei = line.strip('\n').split(',') accountList.append([user, userName, passWord, imei]) except Exception as e: logger.exception(e) finally: return accountList def login(self, userName, passWord, imei): postdata = urllib.urlencode({ 'UserName':userName, 'Password':passWord, 'Imei':imei }) req = urllib2.Request( url='http://service.inkey.com/api/Auth/Login', data=postdata, headers=self.headers ) cookie_support = urllib2.HTTPCookieProcessor(cookielib.CookieJar()) opener = urllib2.build_opener(cookie_support, urllib2.HTTPHandler) urllib2.install_opener(opener) try: content = urllib2.urlopen(req).read() resp_dict = json_loads(content) return resp_dict except Exception as e: logger.exception(e) return {"IsSuccess": False, "Desc": ""} def pull_SilverAdvert_List(self, categoryId): postdata = urllib.urlencode({ 'CategoryIds':categoryId }) req = urllib2.Request( url='http://service.inkey.com/api/SilverAdvert/Pull', data = postdata, headers = self.headers ) try: content = urllib2.urlopen(req).read() silverAdvert_pat = re.compile(r'"Id":(.*?),') silverAdvert_list = re.findall(silverAdvert_pat, content) logger.debug("categoryId = %s, pull_SilverAdvert_List = %s", categoryId, silverAdvert_list) except Exception as e: logger.exception(e) silverAdvert_list = [] return silverAdvert_list def viewOne_SilverAdvert_by_advertsID(self, advertsID): postdata = urllib.urlencode({ 'IsGame':"false", "Id":advertsID }) req = urllib2.Request( url='http://service.inkey.com/api/SilverAdvert/GeneratedIntegral', data = postdata, headers = self.headers ) try: content = urllib2.urlopen(req).read() logger.debug("view advert id = %s, Response from the server: %s", advertsID, content) resp_dict = json_loads(content) return resp_dict except Exception as e: logger.exception(e) return {"IsSuccess": False} def viewAll_SilverAdverts_by_categoryId(self, categoryId): silverAdsList = self.pull_SilverAdvert_List(categoryId) silverAdsList_Count = len(silverAdsList) total_data_by_categoryId = 0 result_Code = 0 result_Code_31303_count = 0 selectNum = 0 if silverAdsList_Count > 0: while True: advertsID = silverAdsList[selectNum] resp_dict = self.viewOne_SilverAdvert_by_advertsID(advertsID) selectNum += 1 if selectNum >= silverAdsList_Count: selectNum -= silverAdsList_Count if resp_dict["IsSuccess"]: total_data_by_categoryId += resp_dict["Data"] logger.debug("get %s more points", resp_dict["Data"]) elif resp_dict["Code"] == 31303: logger.debug("view advert id = %s, Response from the server: %s", advertsID, resp_dict["Desc"]) result_Code_31303_count += 1 continue elif resp_dict["Code"] == 31307 or result_Code_31303_count > silverAdsList_Count: logger.debug("Response from the server: %s", resp_dict["Desc"]) break time.sleep(12+3*random()) logger.info("categoryId = %s, total_data_by_categoryId = %s" % (categoryId, total_data_by_categoryId)) return [result_Code, total_data_by_categoryId] def get_all_silvers(self): total_data = 0 result_Code = 0 categoryIds = [-1, 1, -2, 2, -3, 3, -4, 4, 5, 6, 10] categoryIds_Count = len(categoryIds) i = 0 List_Count_equals_0 = 0 #如果获取12次广告,广告数都为零,则切换至下一个帐号 while result_Code != '31307' and List_Count_equals_0 < 12: categoryId = categoryIds[i] [result_Code, data_by_categoryId] = self.viewAll_SilverAdverts_by_categoryId(categoryId) total_data += data_by_categoryId if result_Code == 0: List_Count_equals_0 += 1 i += 1 if i >= categoryIds_Count: i -= categoryIds_Count return total_data def start(self): for account in self.accountList: user, userName, passWord, imei = account logger.info("User Iteration Started: %s", user) login_result_dict = self.login(userName, passWord, imei) if login_result_dict["IsSuccess"]: try: total_data_by_all_categoryIds = self.get_all_silvers() logger.debug("total_data_by_all_categoryIds: %s" % total_data_by_all_categoryIds) except Exception as e: logger.exception(e) finally: logger.info("User Iteration Ended: %s", user) else: logger.warning("Login failed, login user: %s, error description: %s", user, login_result_dict["Desc"]) logger.info("---------------------------------------------------\n") def run_forever(self): while True: self.start() time.sleep(4*3600) if __name__ == '__main__': account_file = os.path.join(project_root_path, 'Config', 'Accounts.dat') mz = MiaoZuan(account_file) mz.run_forever()
debugtalk/MiaoZuanScripts
MiaoZuanScripts.py
Python
mit
7,305
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {Parser as ExpressionParser} from '../expression_parser/parser'; import {StringWrapper, isBlank, isPresent} from '../facade/lang'; import {HtmlAst, HtmlAstVisitor, HtmlAttrAst, HtmlCommentAst, HtmlElementAst, HtmlExpansionAst, HtmlExpansionCaseAst, HtmlTextAst, htmlVisitAll} from '../html_ast'; import {InterpolationConfig} from '../interpolation_config'; import {ParseError, ParseSourceSpan} from '../parse_util'; import {Message} from './message'; export const I18N_ATTR = 'i18n'; export const I18N_ATTR_PREFIX = 'i18n-'; const _CUSTOM_PH_EXP = /\/\/[\s\S]*i18n[\s\S]*\([\s\S]*ph[\s\S]*=[\s\S]*"([\s\S]*?)"[\s\S]*\)/g; /** * An i18n error. */ export class I18nError extends ParseError { constructor(span: ParseSourceSpan, msg: string) { super(span, msg); } } export function partition(nodes: HtmlAst[], errors: ParseError[], implicitTags: string[]): Part[] { let parts: Part[] = []; for (let i = 0; i < nodes.length; ++i) { let node = nodes[i]; let msgNodes: HtmlAst[] = []; // Nodes between `<!-- i18n -->` and `<!-- /i18n -->` if (_isOpeningComment(node)) { let i18n = (<HtmlCommentAst>node).value.replace(/^i18n:?/, '').trim(); while (++i < nodes.length && !_isClosingComment(nodes[i])) { msgNodes.push(nodes[i]); } if (i === nodes.length) { errors.push(new I18nError(node.sourceSpan, 'Missing closing \'i18n\' comment.')); break; } parts.push(new Part(null, null, msgNodes, i18n, true)); } else if (node instanceof HtmlElementAst) { // Node with an `i18n` attribute let i18n = _findI18nAttr(node); let hasI18n: boolean = isPresent(i18n) || implicitTags.indexOf(node.name) > -1; parts.push(new Part(node, null, node.children, isPresent(i18n) ? i18n.value : null, hasI18n)); } else if (node instanceof HtmlTextAst) { parts.push(new Part(null, node, null, null, false)); } } return parts; } export class Part { constructor( public rootElement: HtmlElementAst, public rootTextNode: HtmlTextAst, public children: HtmlAst[], public i18n: string, public hasI18n: boolean) {} get sourceSpan(): ParseSourceSpan { if (isPresent(this.rootElement)) { return this.rootElement.sourceSpan; } if (isPresent(this.rootTextNode)) { return this.rootTextNode.sourceSpan; } return new ParseSourceSpan( this.children[0].sourceSpan.start, this.children[this.children.length - 1].sourceSpan.end); } createMessage(parser: ExpressionParser, interpolationConfig: InterpolationConfig): Message { return new Message( stringifyNodes(this.children, parser, interpolationConfig), meaning(this.i18n), description(this.i18n)); } } function _isOpeningComment(n: HtmlAst): boolean { return n instanceof HtmlCommentAst && isPresent(n.value) && n.value.startsWith('i18n'); } function _isClosingComment(n: HtmlAst): boolean { return n instanceof HtmlCommentAst && isPresent(n.value) && n.value === '/i18n'; } function _findI18nAttr(p: HtmlElementAst): HtmlAttrAst { let attrs = p.attrs; for (let i = 0; i < attrs.length; i++) { if (attrs[i].name === I18N_ATTR) { return attrs[i]; } } return null; } export function meaning(i18n: string): string { if (isBlank(i18n) || i18n == '') return null; return i18n.split('|')[0]; } export function description(i18n: string): string { if (isBlank(i18n) || i18n == '') return null; let parts = i18n.split('|', 2); return parts.length > 1 ? parts[1] : null; } /** * Extract a translation string given an `i18n-` prefixed attribute. * * @internal */ export function messageFromI18nAttribute( parser: ExpressionParser, interpolationConfig: InterpolationConfig, p: HtmlElementAst, i18nAttr: HtmlAttrAst): Message { const expectedName = i18nAttr.name.substring(5); const attr = p.attrs.find(a => a.name == expectedName); if (attr) { return messageFromAttribute( parser, interpolationConfig, attr, meaning(i18nAttr.value), description(i18nAttr.value)); } throw new I18nError(p.sourceSpan, `Missing attribute '${expectedName}'.`); } export function messageFromAttribute( parser: ExpressionParser, interpolationConfig: InterpolationConfig, attr: HtmlAttrAst, meaning: string = null, description: string = null): Message { const value = removeInterpolation(attr.value, attr.sourceSpan, parser, interpolationConfig); return new Message(value, meaning, description); } /** * Replace interpolation in the `value` string with placeholders */ export function removeInterpolation( value: string, source: ParseSourceSpan, expressionParser: ExpressionParser, interpolationConfig: InterpolationConfig): string { try { const parsed = expressionParser.splitInterpolation(value, source.toString(), interpolationConfig); const usedNames = new Map<string, number>(); if (isPresent(parsed)) { let res = ''; for (let i = 0; i < parsed.strings.length; ++i) { res += parsed.strings[i]; if (i != parsed.strings.length - 1) { let customPhName = extractPhNameFromInterpolation(parsed.expressions[i], i); customPhName = dedupePhName(usedNames, customPhName); res += `<ph name="${customPhName}"/>`; } } return res; } return value; } catch (e) { return value; } } /** * Extract the placeholder name from the interpolation. * * Use a custom name when specified (ie: `{{<expression> //i18n(ph="FIRST")}}`) otherwise generate a * unique name. */ export function extractPhNameFromInterpolation(input: string, index: number): string { let customPhMatch = StringWrapper.split(input, _CUSTOM_PH_EXP); return customPhMatch.length > 1 ? customPhMatch[1] : `INTERPOLATION_${index}`; } /** * Return a unique placeholder name based on the given name */ export function dedupePhName(usedNames: Map<string, number>, name: string): string { const duplicateNameCount = usedNames.get(name); if (duplicateNameCount) { usedNames.set(name, duplicateNameCount + 1); return `${name}_${duplicateNameCount}`; } usedNames.set(name, 1); return name; } /** * Convert a list of nodes to a string message. * */ export function stringifyNodes( nodes: HtmlAst[], expressionParser: ExpressionParser, interpolationConfig: InterpolationConfig): string { const visitor = new _StringifyVisitor(expressionParser, interpolationConfig); return htmlVisitAll(visitor, nodes).join(''); } class _StringifyVisitor implements HtmlAstVisitor { private _index: number = 0; constructor( private _parser: ExpressionParser, private _interpolationConfig: InterpolationConfig) {} visitElement(ast: HtmlElementAst, context: any): any { let name = this._index++; let children = this._join(htmlVisitAll(this, ast.children), ''); return `<ph name="e${name}">${children}</ph>`; } visitAttr(ast: HtmlAttrAst, context: any): any { return null; } visitText(ast: HtmlTextAst, context: any): any { let index = this._index++; let noInterpolation = removeInterpolation(ast.value, ast.sourceSpan, this._parser, this._interpolationConfig); if (noInterpolation != ast.value) { return `<ph name="t${index}">${noInterpolation}</ph>`; } return ast.value; } visitComment(ast: HtmlCommentAst, context: any): any { return ''; } visitExpansion(ast: HtmlExpansionAst, context: any): any { return null; } visitExpansionCase(ast: HtmlExpansionCaseAst, context: any): any { return null; } private _join(strs: string[], str: string): string { return strs.filter(s => s.length > 0).join(str); } }
UIUXEngineering/angular
modules/@angular/compiler/src/i18n/shared.ts
TypeScript
mit
7,880
package com.wandercosta.witsgenerator.generator; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import org.junit.Test; /** * Class to test WitsGenerator. * * @author Wander Costa (www.wandercosta.com) */ public class WitsGeneratorTest { private final WitsLineGenerator lineGenerator = new WitsLineGenerator(); private final WitsGenerator generator = new WitsGenerator(lineGenerator); @Test public void shouldGenerate1Block() { String generated = generator.generate(1, 1); String[] lines = generated.split("\n"); assertEquals(3, lines.length); assertTrue(lines[0].equals("&&")); assertTrue(lines[1].startsWith("0101")); assertTrue(lines[2].equals("!!")); } @Test public void shouldGenerate2Blocks() { String generated = generator.generate(2, 10); String[] lines = generated.split("\n"); assertEquals(2 * 12, lines.length); assertTrue(lines[0].equals("&&")); assertTrue(lines[1].startsWith("0101")); for (int i = 1; i < 11; i++) { assertTrue(lines[i].length() > 4); assertRecordItem(lines[i], 1, i); } assertTrue(lines[11].equals("!!")); assertTrue(lines[12].equals("&&")); for (int i = 13; i < 23; i++) { assertTrue(lines[i].length() > 4); assertRecordItem(lines[i], 2, i - 12); } assertTrue(lines[23].equals("!!")); } @Test public void shouldGenerate99Blocks() { String generated = generator.generate(99, 99); String[] lines = generated.split("\n"); assertEquals(99 * 101, lines.length); for (int i = 1; i < 100; i++) { assertTrue(lines[101 * (i - 1)].equals("&&")); for (int j = 1; j < 100; j++) { assertRecordItem(lines[101 * (i - 1) + j], i, j); assertTrue(lines[1].startsWith("0101")); } assertTrue(lines[101 * i - 1].equals("!!")); } } @Test(expected = IllegalArgumentException.class) public void shouldFailToGenerateBlockWith0Records() { generator.generate(0, 1); } @Test(expected = IllegalArgumentException.class) public void shouldFailToGenerateBlockWithNegativeRecords() { generator.generate(-1, 1); } @Test(expected = IllegalArgumentException.class) public void shouldFailToGenerateBlockWith0Items() { generator.generate(1, 0); } @Test(expected = IllegalArgumentException.class) public void shouldFailToGenerateBlockWithNevatigeItems() { generator.generate(1, -1); } private void assertRecordItem(String line, Integer record, Integer item) { assertEquals(record, Integer.valueOf(line.substring(0, 2))); assertEquals(item, Integer.valueOf(line.substring(2, 4))); } }
rwanderc/wits-generator
src/test/java/com/wandercosta/witsgenerator/generator/WitsGeneratorTest.java
Java
mit
2,899
/* Styles for TableAPI Table */ /* Recommended pattern for styling your objects */ .qv-object-swr-tableapitable .hello-world { color:#333; font-weight:bold; }
stefanwalther/qsExtensionPlayground
tableapi-table/src/lib/css/style.css
CSS
mit
164
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- #pragma once template<typename TKey, typename TData> struct SimpleHashEntry { TKey key; TData value; SimpleHashEntry *next; }; // Size should be a power of 2 for optimal performance template< typename TKey, typename TData, typename TAllocator = ArenaAllocator, template <typename DataOrKey> class Comparer = DefaultComparer, bool resize = false, typename SizePolicy = PowerOf2Policy> class SimpleHashTable { typedef SimpleHashEntry<TKey, TData> EntryType; // REVIEW: Consider 5 or 7 as multiplication of these might be faster. static const int MaxAverageChainLength = 6; TAllocator *allocator; EntryType **table; EntryType *free; uint count; uint size; uint freecount; bool disableResize; int modFunctionIndex; #if PROFILE_DICTIONARY DictionaryStats *stats; #endif public: SimpleHashTable(TAllocator *allocator) : allocator(allocator), count(0), freecount(0), modFunctionIndex(UNKNOWN_MOD_INDEX) { this->size = SizePolicy::GetSize(64, &modFunctionIndex); Initialize(); } SimpleHashTable(uint size, TAllocator* allocator) : allocator(allocator), count(0), freecount(0), modFunctionIndex(UNKNOWN_MOD_INDEX) { this->size = SizePolicy::GetSize(size, &modFunctionIndex); Initialize(); } void Initialize() { disableResize = false; free = nullptr; table = AllocatorNewArrayZ(TAllocator, allocator, EntryType*, size); #if PROFILE_DICTIONARY stats = DictionaryStats::Create(typeid(this).name(), size); #endif } ~SimpleHashTable() { for (uint i = 0; i < size; i++) { EntryType * entry = table[i]; while (entry != nullptr) { EntryType * next = entry->next; AllocatorDelete(TAllocator, allocator, entry); entry = next; } } while(free) { EntryType* current = free; free = current->next; AllocatorDelete(TAllocator, allocator, current); } AllocatorDeleteArray(TAllocator, allocator, size, table); } void DisableResize() { Assert(!resize || !disableResize); disableResize = true; } void EnableResize() { Assert(!resize || disableResize); disableResize = false; } void Set(TKey key, TData data) { EntryType* entry = FindOrAddEntry(key); entry->value = data; } bool Add(TKey key, TData data) { uint targetBucket = HashKeyToBucket(key); if(FindEntry(key, targetBucket) != nullptr) { return false; } AddInternal(key, data, targetBucket); return true; } void ReplaceValue(TKey key,TData data) { EntryType *current = FindEntry(key); if (current != nullptr) { current->value = data; } } void Remove(TKey key) { Remove(key, nullptr); } void Remove(TKey key, TData* pOut) { uint val = HashKeyToBucket(key); EntryType **prev=&table[val]; for (EntryType * current = *prev ; current != nullptr; current = current->next) { if (Comparer<TKey>::Equals(key, current->key)) { *prev = current->next; if (pOut != nullptr) { (*pOut) = current->value; } FreeEntry(current); #if PROFILE_DICTIONARY if (stats) stats->Remove(table[val] == nullptr); #endif break; } prev = &current->next; } } BOOL HasEntry(TKey key) { return (FindEntry(key) != nullptr); } uint Count() const { return(count); } // If density is a compile-time constant, then we can optimize (avoids division) // Sometimes the compiler can also make this optimization, but this way it is guaranteed. template< uint density > bool IsDenserThan() const { return count > (size * density); } TData Lookup(TKey key) { EntryType *current = FindEntry(key); if (current != nullptr) { return current->value; } return TData(); } TData LookupIndex(int index) { EntryType *current; int j=0; for (uint i=0; i < size; i++) { for (current = table[i] ; current != nullptr; current = current->next) { if (j==index) { return current->value; } j++; } } return nullptr; } bool TryGetValue(TKey key, TData *dataReference) { EntryType *current = FindEntry(key); if (current != nullptr) { *dataReference = current->value; return true; } return false; } TData& GetReference(TKey key) { EntryType * current = FindOrAddEntry(key); return current->value; } TData * TryGetReference(TKey key) { EntryType * current = FindEntry(key); if (current != nullptr) { return &current->value; } return nullptr; } template <class Fn> void Map(Fn fn) { EntryType *current; for (uint i=0;i<size;i++) { for (current = table[i] ; current != nullptr; current = current->next) { fn(current->key,current->value); } } } template <class Fn> void MapAndRemoveIf(Fn fn) { for (uint i=0; i<size; i++) { EntryType ** prev = &table[i]; while (EntryType * current = *prev) { if (fn(current->key,current->value)) { *prev = current->next; FreeEntry(current); } else { prev = &current->next; } } } } private: uint HashKeyToBucket(TKey hashKey) { return HashKeyToBucket(hashKey, size); } uint HashKeyToBucket(TKey hashKey, int size) { hash_t hashCode = Comparer<TKey>::GetHashCode(hashKey); return SizePolicy::GetBucket(hashCode, size, modFunctionIndex); } EntryType * FindEntry(TKey key) { uint targetBucket = HashKeyToBucket(key); return FindEntry(key, targetBucket); } EntryType * FindEntry(TKey key, uint targetBucket) { for (EntryType * current = table[targetBucket] ; current != nullptr; current = current->next) { if (Comparer<TKey>::Equals(key, current->key)) { return current; } } return nullptr; } EntryType * FindOrAddEntry(TKey key) { uint targetBucket = HashKeyToBucket(key); EntryType * entry = FindEntry(key, targetBucket); if (entry == nullptr) { entry = AddInternal(key, TData(), targetBucket); } return entry; } void FreeEntry(EntryType* current) { count--; if ( freecount < 10 ) { current->key = nullptr; current->value = NULL; current->next = free; free = current; freecount++; } else { AllocatorDelete(TAllocator, allocator, current); } } EntryType* GetFreeEntry() { EntryType* retFree = free; if (nullptr == retFree ) { retFree = AllocatorNewStruct(TAllocator, allocator, EntryType); } else { free = retFree->next; freecount--; } return retFree; } EntryType* AddInternal(TKey key, TData data, uint targetBucket) { if(resize && !disableResize && IsDenserThan<MaxAverageChainLength>()) { Resize(SizePolicy::GetSize(size*2, &modFunctionIndex)); // After resize - we will need to recalculate the bucket targetBucket = HashKeyToBucket(key); } EntryType* entry = GetFreeEntry(); entry->key = key; entry->value = data; entry->next = table[targetBucket]; table[targetBucket] = entry; count++; #if PROFILE_DICTIONARY uint depth = 0; for (EntryType * current = table[targetBucket] ; current != nullptr; current = current->next) { ++depth; } if (stats) stats->Insert(depth); #endif return entry; } void Resize(int newSize) { Assert(!this->disableResize); EntryType** newTable = AllocatorNewArrayZ(TAllocator, allocator, EntryType*, newSize); for (uint i=0; i < size; i++) { EntryType* current = table[i]; while (current != nullptr) { int targetBucket = HashKeyToBucket(current->key, newSize); EntryType* next = current->next; // Cache the next pointer current->next = newTable[targetBucket]; newTable[targetBucket] = current; current = next; } } AllocatorDeleteArray(TAllocator, allocator, this->size, this->table); this->size = newSize; this->table = newTable; #if PROFILE_DICTIONARY if (stats) { uint emptyBuckets = 0 ; for (uint i=0; i < size; i++) { if(table[i] == nullptr) { emptyBuckets++; } } stats->Resize(newSize, emptyBuckets); } #endif } };
Microsoft/ChakraCore
lib/Common/DataStructures/SimpleHashTable.h
C
mit
10,327
using MediaBrowser.ApiInteraction; using MediaBrowser.Model.ApiClient; using MediaBrowser.Model.Logging; using MediaBrowser.Model.Serialization; using MediaBrowser.Theater.Interfaces.Configuration; using System; using System.IO; using System.Threading; using System.Threading.Tasks; namespace MediaBrowser.UI { public class CredentialProvider : ICredentialProvider { private readonly ITheaterConfigurationManager _config; private readonly IJsonSerializer _json; private readonly ILogger _logger; public CredentialProvider(ITheaterConfigurationManager config, IJsonSerializer json, ILogger logger) { _config = config; _json = json; _logger = logger; } private string Path { get { return System.IO.Path.Combine(_config.CommonApplicationPaths.ConfigurationDirectoryPath, "servers.json"); } } private ServerCredentials _servers; private readonly SemaphoreSlim _asyncLock = new SemaphoreSlim(1, 1); public async Task<ServerCredentials> GetServerCredentials() { if (_servers == null) { await _asyncLock.WaitAsync().ConfigureAwait(false); try { if (_servers == null) { try { _servers = _json.DeserializeFromFile<ServerCredentials>(Path); } catch (IOException) { _servers = new ServerCredentials(); } catch (Exception ex) { _logger.ErrorException("Error reading saved credentials", ex); _servers = new ServerCredentials(); } } } finally { _asyncLock.Release(); } } return _servers; } public async Task SaveServerCredentials(ServerCredentials configuration) { var path = Path; Directory.CreateDirectory(System.IO.Path.GetDirectoryName(path)); await _asyncLock.WaitAsync().ConfigureAwait(false); try { _json.SerializeToFile(configuration, path); } finally { _asyncLock.Release(); } } } }
TomGillen/MediaBrowser.Theater
MediaBrowser.UI/CredentialProvider.cs
C#
mit
2,594
<html> <META HTTP-EQUIV=Content-Type Content="text/html; charset=big5"> <!-- Mirrored from lis.ly.gov.tw/lghtml/lawstat/version2/01530/0153062081400.htm by HTTrack Website Copier/3.x [XR&CO'2010], Sun, 24 Mar 2013 09:12:38 GMT --> <head><title>ªk½s¸¹:01530 ª©¥»:062081400</title> <link rel="stylesheet" type="text/css" href="../../version.css" > </HEAD> <body><left> <table><tr><td><FONT COLOR=blue SIZE=5>®üÃö½r¨p±ø¨Ò(01530)</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <tr><td align=left valign=top> <a href=0153023060100.html target=law01530><nobr><font size=2>¤¤µØ¥Á°ê 23 ¦~ 6 ¤ë 1 ¤é</font></nobr></a> </td> <td valign=top><font size=2>¨î©w35±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 23 ¦~ 6 ¤ë 19 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0153062081400.html target=law01530><nobr><font size=2>¤¤µØ¥Á°ê 62 ¦~ 8 ¤ë 14 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿¥þ¤å54±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 62 ¦~ 8 ¤ë 27 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0153067051900.html target=law01530><nobr><font size=2>¤¤µØ¥Á°ê 67 ¦~ 5 ¤ë 19 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä3, 8, 16, 23, 27, 29, 31, 37, 39, 40, 49±ø<br> ¼W­q²Ä16¤§1, 49¤§1±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 67 ¦~ 5 ¤ë 29 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0153072121300.html target=law01530><nobr><font size=2>¤¤µØ¥Á°ê 72 ¦~ 12 ¤ë 13 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä3, 6, 7, 11, 20, 23, 25¦Ü27, 29¦Ü37, 40¦Ü42, 48, 49¤§1, 53±ø<br> ¼W­q²Ä31¤§1, 41¤§1, 45¤§1±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 72 ¦~ 12 ¤ë 28 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0153083122900.html target=law01530><nobr><font size=2>¤¤µØ¥Á°ê 83 ¦~ 12 ¤ë 29 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä27±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 84 ¦~ 1 ¤ë 18 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0153089122200.html target=law01530><nobr><font size=2>¤¤µØ¥Á°ê 89 ¦~ 12 ¤ë 22 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä47, 48±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 90 ¦~ 1 ¤ë 10 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0153093122400.html target=law01530><nobr><font size=2>¤¤µØ¥Á°ê 93 ¦~ 12 ¤ë 24 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä37±ø<br> ¼W­q²Ä39¤§1±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 94 ¦~ 1 ¤ë 19 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0153096030200.html target=law01530><nobr><font size=2>¤¤µØ¥Á°ê 96 ¦~ 3 ¤ë 2 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä41, 41¤§1, 45¤§1±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 96 ¦~ 3 ¤ë 21 ¤é¤½¥¬</font></nobr></td> <tr><td align=left valign=top> <a href=0153099051800.html target=law01530><nobr><font size=2>¤¤µØ¥Á°ê 99 ¦~ 5 ¤ë 18 ¤é</font></nobr></a> </td> <td valign=top><font size=2>­×¥¿²Ä41, 45¤§1±ø</font></td> <tr><td align=left valign=top><nobr><font size=2>¤¤µØ¥Á°ê 99 ¦~ 6 ¤ë 15 ¤é¤½¥¬</font></nobr></td> </table></table></table></table> <p><table><tr><td><font color=blue size=4>¥Á°ê62¦~8¤ë14¤é(«D²{¦æ±ø¤å)</font></td> <td><a href=http://lis.ly.gov.tw/lgcgi/lglawproc?0153062081400 target=proc><font size=2>¥ßªk¬ö¿ý</font></a></td> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤@³¹ Á`«h</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨p¹B³fª«¶i¥X¤f¤§¬d½r¡A¥Ñ®üÃö¨Ì¥»±ø¨Ò¤§³W©w¬°¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥»±ø¨ÒºÙ³q°Ó¤f©¤¡A¿×¸g¬F©²¶}©ñ¹ï¥~¶T©ö¡A¨Ã³]¦³®üÃö¤§´ä¤f¡B¾÷³õ©Î°Ó°ð¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥»±ø¨ÒºÙ¨p¹B³fª«¶i¤f¡B¥X¤f¡A¿×³WÁ×Àˬd¡B°½º|Ãöµ|©Î°kÁ׺ިî¡A¥¼¸g¦V®üÃö¥Ó³ø©Î¥Ó³ø¤£¹ê¡A¦Ó¹B¿é³fª«¶i¥X°ê¹Ò¡C¦ý²î²í¤§²M­Ü¼o«~¡A¸g³øÃö¬dÅç·Ó³¹§¹µ|ªÌ¡A¤£¦b¦¹­­¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥»±ø¨ÒºÙ³ø¹B³fª«¶i¤f¡B¥X¤f¡A¿×¨ÌÃöµ|ªk¤Î¦³Ãöªk¥O³W©w¡A¦V®üÃö¥Ó³ø³fª«¡A¸g¥Ñ³q°Ó¤f©¤¶i¤f©Î¥X¤f¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨Ì¥»±ø¨Ò©Ò³B»@Áì¥H³f»ù¬°·ÇªÌ¡A¶i¤f³fª««ö§¹µ|»ù®æ­pºâ¡A¥X¤f³fª««öÂ÷©¤»ù®æ­pºâ¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤G³¹ ¬d½r</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@®üÃö½r¨pÀ³¦b¤¤µØ¥Á°ê³q°Ó¤f©¤¡Aªu®ü¤Q¤G®ü¨½¥H¤º¤§¤ô°ì¡A¤Î¨Ì¥»±ø¨Ò©Î¨ä¥Lªk«ß±o¬°¬d½r¤§°Ï°ì©Î³õ©Ò¬°¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@®üÃö¦]½r¨p»Ý­n¡A±o°t¸mÄ¥¸¥¡B¯èªÅ¾¹¡B¨®½ø¡BªZ¾¹¤Î¼uÃÄ¡F¨ä¨Ï¥Î¿ìªk¡A¥Ñ¦æ¬F°|©w¤§¡C<br> ¡@¡@®üÃöÃö­û°õ¦æ½r¨p¾°È®É¡A±o¨Ø±aªZ¾¹¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@®üÃö¦]½r¨p¥²­n¡A±o©R¨®½ø©Î²î²í°±¾p¡A¨ä¸g»ï©ñ«H¸¹¡A¥O¨ä°±¾p¦Ó§Ü¤£¿í·ÓªÌ¡A±o®gÀ»¤§¡C¦ýÀ³¶È¥Hªý¤îÄ~Äò¦æ¾p¬°¥Øªº¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@®üÃö¦]½r¨p¥²­n¡A±o¹ï©ó¶i¥X¤f³fª«¡B³q¹B³fª«¡BÂà¹B³fª«¡B«Oµ|³fª«¡B¶l¥]¡B¦æ§õ¡B¹B¿é¤u¨ã¡B¦s©ñ³fª«¤§­Ü®w»P³õ©Ò¤Î¦b³õ¤§Ãö«Y¤H¡A¹ê¬IÀˬd¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@®üÃö¦³¥¿·í²z¥Ñ»{¬°¹H¤Ï¥»±ø¨Ò±¡¨Æ·~¤wµo¥ÍªÌ¡A±o°ÉÅç¡B·j¯ÁÃö«Y³õ©Ò¡C°ÉÅç¡B·j¯Á®É¡AÀ³ÁܦP¸Ó³õ©Ò¥e¦³¤H©Î¨ä¦P©~¤H¡B¹µ¥Î¤H¡B¾F¤H¨Ã·í¦aĵ¹î¦b³õ¨£ÃÒ¡C¦p¦b²î²í¡B¯èªÅ¾¹¡B¨®½ø©Î¨ä¥L¹B¿é¤u¨ã¬I¦æ°ÉÅç¡B·j¯Á®É¡AÀ³ÁܦP¨äºÞ²z¤H¦b³õ¨£ÃÒ¡C<br> ¡@¡@«e¶µÃö«Y³õ©Ò¦p«Y¬F©²¾÷Ãö©Î¤½Àç¨Æ·~¡A°ÉÅç¡B·j¯Á®É¡AÀ³·|¦P¸Ó¾÷Ãö©Î¨Æ·~«ü©w¤H­û¿ì²z¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@®üÃö¦³¥¿·í²z¥Ñ»{¦³¨­±aª«¥ó¨¬¥Hºc¦¨¹H¤Ï¥»±ø¨Ò±¡¨ÆªÌ¡A±o¥O¨ä¥æÅç¸Ó¶µª«¥ó¡A¦p¸g©Úµ´¡A±o·j¯Á¨ä¨­Åé¡C·j¯Á¨­Åé®É¡AÀ³¦³Ãö­û¥H¥~¤§²Ä¤T¤H¦b³õ¡C·j¯Á°ü¤k¨­Åé¡AÀ³¥Ñ¤k©ÊÃö­û¦æ¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@®üÃö¦]½r¨p¥²­n¡A±o¸ß°Ý¶ûºÃ¤H¡BÃÒ¤H¤Î¨ä¥LÃö«Y¤H¡C<br> ¡@¡@«e¶µ¸ß°Ý¡AÀ³§@¦¨µ§¿ý¡A¨ä°O¸ü¨Æ¶µ¡A·Ç¥Î¦D¨Æ¶D³^ªk²Ä¤T¤Q¤E±ø¦Ü²Ä¥|¤Q¤@±ø¤§³W©w¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@°ÉÅç¡B·j¯Á¤£±o¦b¤é¨S«á¤é¥X«e¬°¤§¡C¦ý©ó¤é¨S«e¤w¶}©l¬I¦æ¦Ó¦³Ä~Äò¤§¥²­n¡A©Î¹H¤Ï¥»±ø¨Ò¤§¦æ¬°¥¿¦b¶i¦æªÌ¡A¤£¦b¦¹­­¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@°ÉÅç¡B·j¯ÁÀ³±N¸g¹L±¡§Î§@¦¨µ§¿ý¡A¥æ³Q¸ß°Ý¤H©Î¦b³õÃÒ¤H¾\Äý«á¡A¤@¦Pñ¦W©Î»\³¹¡C¦p¦³¤£¯àñ¦W»\³¹©Î©Úµ´Ã±¦W»\³¹ªÌ¡A¥Ñµ§¿ý¨î§@¤H°O©ú¨ä¨Æ¥Ñ¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@®üÃöÃö­û°õ¦æ½r¨p¾°È®É¡AÀ³µÛ¨îªA©Î¨ØÀ²³¹©Î´£¥Ü¨¬¥HÃÒ©ú¨ä¨­¤À¤§¨ä¥L¾ÌÃÒ¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@®üÃö½r¨p¹J¦³¥²­n®É¡A±o½Ð­xĵ¨ó§U¤§¡C<br> ¡@¡@­xĵ¾÷Ãö¦b«D³q°Ó¤f©¤µoı¹H¤Ï¥»±ø¨Ò¤§±¡¨Æ®É¡A±o³w¦æ¬d½r¡C¦ýÀ³±N¬d½rµ²ªG¡A³s¦P½rÀò¨p³f²¾°e®üÃö³B²z¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤T³¹ ¦©©ã</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@®üÃö¬dÀò³fª«»{¦³¹H¤Ï¥»±ø¨Ò±¡¨ÆªÌ¡AÀ³¤©¦©©ã¡C<br> ¡@¡@«e¶µ³fª«¦p«Y¦b¹B¿é¤u¨ã¤º¬dÀò¦Ó±¡¸`­«¤jªÌ¡A¬°Ä~Äò°ÉÅç»P·j¯Á¡A®üÃö±o¦©©ã¸Ó¹B¿é¤u¨ã¡C¦ý¥H¨¬¨Ñ°ÉÅç»P·j¯Á¤§®É¶¡¬°­­¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²î²í¡B¯èªÅ¾¹¡B¨®½ø©Î¨ä¥L¹B¿é¤u¨ã¡A¨Ì¥»±ø¨ÒÀ³¨ü©Î±o¨ü¨S¤J³B¤ÀªÌ¡A®üÃö±o¤©¥H¦©©ã¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦©©ã¤§³fª«©Î¹B¿é¤u¨ã¡A¦]¸Ñ°e§xÃø©Î«OºÞ¤£©öªÌ¡A±o¥Ñ®üÃö¬d«Ê«á¡A¥æ¨ä©Ò¦³¤H¡BºÞ»â¤H©Î«ù¦³¤H¨ãµ²«OºÞ¡A©Î¥æ·í¦a¤½°È¾÷Ãö«OºÞ¡C¨ä¥æ¤½°È¾÷Ãö«OºÞªÌ¡AÀ³³qª¾¨ä©Ò¦³¤H¡BºÞ»â¤H©Î«ù¦³¤H¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦©©ã³fª«¡A®üÃö»{¦³»G±Ñ©Î­«¤j·lÃa¤§¸·ªÌ¡A±o©ó®×¥ó½T©w«e©ç½æ¡A«OºÞ¨ä»ùª÷¡A¨Ã³qª¾¨ä©Ò¦³¤H¡BºÞ»â¤H©Î«ù¦³¤H¡C<br> ¡@¡@«e¶µ¤§©ç½æ¡AÀ³©ó¨Æ«e¤½§i¤§¡C<br> ¡@¡@©ö¥Í¦MÀI¤§¦©©ãª«±o·´±ó¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦©©ã¤§³fª«©Î¹B¿é¤u¨ã¡A±o¥Ñ¨ä©Ò¦³¤H¡BºÞ»â¤H©Î«ù¦³¤H¦V®üÃö´£¨Ñ¬Û·í¤§«OÃÒª÷©Î¨ä¥L¾á«O¡A¥Ó½ÐºM¾P¦©©ã¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦©©ã¡A°£·Ç¥Î²Ä¤Q¤T±ø¤Î²Ä¤Q¥|±ø¤§³W©w¥~¡AÀ³¥æ¥I¦©©ã¦¬¾Ú¡A¸ü©ú¦©©ãª«¤§¦WºÙ¡B¼Æ¶q¡B¦©©ã¤§¦aÂI¤Î®É¶¡¡A©Ò¦³¤H¡BºÞ»â¤H©Î«ù¦³¤H¤§©m¦W¤Î¨ä¦í©~©Ò¡A¨Ã¥Ñ°õ¦æÃö­ûñ¦W¡C<br> ¡@¡@¦©©ãª«À³¥[«Ê½p©Î¨ä¥L¼ÐÃÑ¡A¥Ñ¦©©ã¤§¾÷Ãö©ÎÃö­û»\¦L¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¥|³¹ »@«h</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²î²í©Î¨®½ø¹H¤Ï²Ä¤K±ø³W©w¡A¸g»ï©ñ«H¸¹¡A¥O¨ä°±¾p¦Ó§Ü¤£¿í·ÓªÌ¡A³B²îªø©ÎºÞ»â¤H¤­¤d¤¸¥H¤W¤@¸U¤¸¥H¤U»@Áì¡F¸g¬d©ú¦³¨p¹B³fª«¶i¥X¤f¤§¨Æ¹êªÌ¡A¨Ã±o¨S¤J¸Ó²î²í©Î¨®½ø¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²î²í¡B¯èªÅ¾¹¡B¨®½ø©Î¨ä¥L¹B¿é¤u¨ã¡A¥¼¸g¤¹³\¾Õ¦Û¾p¤J«D³q°Ó¤f©¤ªÌ¡A¨S¤J¤§¡C¦ý¦]¤£¥i§Ü¤O©Î¦³¨ä¥L¥¿·í²z¥Ñ¡A¸g²îªø©ÎºÞ»â¤H¨ç³ø·í¦a¦³Ãö¥DºÞ¾÷Ãö®Ö¹êÃÒ©úªÌ¡A¤£¦b¦¹­­¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²î²í¦bªu®ü¤Q¤G®ü¨½¬É¤º¡A©Î¸g°l½r°k¥X¬É¥~¡A±N³fª«©Î³fª«¦³Ãö¤å¥ó·´Ãa©Î©ß±ó¤ô¤¤¡A¥H¹ÏÁ×§K½rÀòªÌ¡A³B²îªø¤Î¦æ¬°¤H¦U¤­¤d¤¸¥H¤W¤@¸U¤¸¥H¤U»@Áì¡A¨Ã±o¨S¤J¸Ó²î²í¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@µo»¼¦³Ãö¨«¨p«H¸¹¡A¶Ç°e®ø®§©ó¨p¹B³fª«¶i¥X¤f¤§¹B¿é¤u¨ãªÌ¡A³B¤­¤d¤¸¥H¤U»@Áì¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥H²î²í¡B¯èªÅ¾¹¡B¨®½ø©Î¨ä¥L¹B¿é¤u¨ã¡A¨p¹B³fª«¶i¤f¡B¥X¤f¡B°_©¤©Î·h²¾ªÌ¡A³B²îªø©ÎºÞ»â¤H¤­¤d¤¸¥H¤W¤@¸U¤¸¥H¤U»@Áì¡C<br> ¡@¡@«e¶µ¹B¿é¤u¨ã¥H¸ü¹B¨p³f¬°¥D­n¥ØªºªÌ¡A¨Ã¨S¤J¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²î²í¡B¯èªÅ¾¹¡B¨®½ø©Î¨ä¥L¹B¿é¤u¨ã¥¼¨ì¹F³q°Ó¤f©¤¤§¥¿·í¨ø³f¦aÂI¡A¥¼¸g³\¥i¦Ó¾Õ¦æ°_¨ø³fª«©Î¦Û¥Îª««~ªÌ¡A³B²îªø©ÎºÞ»â¤H¥H³f»ù¤@­¿¦Ü¤G­¿¤§»@Áì¡A¨Ã±o±N¸Ó³fª«¤Îª««~¨S¤J¤§¡C<br> ¡@¡@¾Õ¦ÛÂà¸ü¡B©ñ¸m©Î¦¬¨ü«e¶µ³fª«¡Bª««~©ÎÀ°¦P¸Ë¨øªÌ¡A¨Ì«e¶µ³W©w³B»@¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤G¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²î²í¡B¯èªÅ¾¹¡B¨®½ø©Î¨ä¥L¹B¿é¤u¨ã¸Ë¸ü³fª«¨ì¹F³q°Ó¤f©¤¡A¥¼»â¦³¨ø³f­ã³æ¦Ó¤U¨ø³fª«ªÌ¡A³B²îªø©ÎºÞ»â¤H¤­¤d¤¸¥H¤U»@Áì¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²î²í¡B¯èªÅ¾¹¡B¨®½ø©Î¨ä¥L¹B¿é¤u¨ã¤£¨Ì³W©w¦V®üÃöúÅ翵¤f³æ©Î¸ü³f²M³æªÌ¡A³B²îªø©ÎºÞ»â¤H¤­¦Ê¤¸¥H¤W¤­¤d¤¸¥H¤U»@Áì¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²î²í¡B¯èªÅ¾¹¡B¨®½ø©Î¨ä¥L¹B¿é¤u¨ã©Ò¸ü³fª«¡A¸g®üÃö¬d©ú¦³¥¼¦C¤J¿µ¤f³æ©Î¸ü³f²M³æªÌ¡A³B²îªø©ÎºÞ»â¤H¤Î³f¥D¦U¤@¤d¤¸¥H¤W¤@¸U¤¸¥H¤U»@Áì¡C<br> ¡@¡@³fª«¥Ñ¤G¥]¥H¤W¦X¦¨¤@¥ó¡A¦Ó¥¼¦b¿µ¤f³æ©Î¸ü³f²M³æ¤ºµù©úªÌ¡A¨Ì«e¶µ³W©w³B»@¡C<br> ¡@¡@«e¤G¶µ³fª«¡A¦p¸g®üÃö¬d©ú¥¼¨ã¦³³fª«¹B°e«´¬ù¤å¥óªÌ¡A¨Ì²Ä¤T¤Q¤»±ø²Ä¤@¶µ¤Î²Ä¤T¶µ½×³B¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²î²í¡B¯èªÅ¾¹¡B¨®½ø©Î¨ä¥L¹B¿é¤u¨ã¡A©Ò¸ü³fª«¦p¸û¿µ¤f³æ©Î¸ü³f²M³æ©Ò¦CªÌ¦³µu¤Ö®É¡A³B²îªø©ÎºÞ»â¤H¤­¤d¤¸¥H¤U»@Áì¡C¦ý¸gÃÒ©ú¸Ó¶µ³fª«½T«Y¦bªu³~¤f©¤»~¨ø©Î¦b¤W³f¤f©¤µu¸Ë©Î¦³¨ä¥L¥¿·í²z¥ÑªÌ¡A§K»@¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²î¥Îª«®Æ¡B²îªø©Ò±a¥]¥ó¤Î²î­û¦Û¥Î¤£°_©¤ª««~¥¼¦C³æ¥Ó³ø©Î¥Ó³ø¤£¹êªÌ¡A³B²îªø¤@¤d¤¸¥H¤W¤@¸U¤¸¥H¤U»@Áì¡A¨Ã±o¨S¤J¤§¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@²î²í¡B¯èªÅ¾¹¡B¨®½ø©Î¨ä¥L¹B¿é¤u¨ã¥¼¦V®üÃöúÅç¥X¤f¿µ¤f³æ©Î¸ü³f²M³æ¡A¨Ã¥¼¸g®üÃö®Ö­ãµ²Ãö¥X¤f¡A¦Ó¾ÕÂ÷¤f©¤ªÌ¡A³B²îªø©ÎºÞ»â¤H¤@¤d¤¸¥H¤W¤­¤d¤¸¥H¤U»@Áì¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¤Z¶i¥X¤f³fª«¡B³q¹B³fª«¡BÂà¹B³fª«¡B«Oµ|³fª«¡B¶l¥]¡B¦æ§õ¡B¦s©ñ©ó²î²í¡B¯èªÅ¾¹¡B¨®½ø¡B¨ä¥L¹B¿é¤u¨ã©Î¨ä¥L³B©Ò¡A¦Ó¦b®üÃöºÊºÞ¤U©Î¸g®üÃö¥[«Ê¤UÂê¡A¦³¾Õ¦æ²¾°Ê¡B·h¹B¡B¶î§ï©Î©î«Ê¶}ÂêªÌ¡A³B¤­¦Ê¤¸¥H¤W¤­¤d¤¸¥H¤U»@Áì¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨p¹B³fª«¶i¤f¡B¥X¤f©Î¸gÀç¨p¹B³fª«ªÌ¡A³B³f»ù¤@­¿¦Ü¤T­¿¤§»@Áì¡C<br> ¡@¡@°_¨ø¡B¸Ë¹B¡B¦¬¨ü¡BÂðΡB¦¬¶R©Î¥N¾P¨p¹B³fª«ªÌ¡A³B¤­¤d¤¸¥H¤U»@Áì¡C¨ä©Û¹µ©Î¤Þ»¤¥L¤H¬°¤§ªÌ¡A¥ç¦P¡C<br> ¡@¡@«e¤G¶µ¨p¹B³fª«¨S¤J¤§¡C<br> ¡@¡@¤£ª¾¬°¨p¹B³fª«¦Ó¦³°_¨ø¡B¸Ë¹B¡B¦¬¨ü¡B¶JÂáBÁʶR©Î¥N¾P¤§¦æ¬°¡A¸g®üÃö¬d©úÄݹêªÌ¡A§K»@¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@³ø¹B³fª«¶i¤f¦Ó¦³¥ª¦C±¡¨Æ¤§¤@ªÌ¡A³B¥H©Òº|¶i¤fµ|ÃB¤G­¿¦Ü¤­­¿¤§»@Áì¡A¨Ã±o¨S¤J¨ä³fª«¡G<br> ¡@¡@¤@¡Bµê³ø©Ò¹B³fª«¤§¦WºÙ¡B¼Æ¶q©Î­«¶q¡C<br> ¡@¡@¤G¡Bµê³ø©Ò¹B³fª«¤§«~½è¡B»ù­È©Î³W®æ¡C<br> ¡@¡@¤T¡BúÅç°°³y¡BÅܳy©Î¤£¹ê¤§µo²¼©Î¾ÌÃÒ¡C<br> ¡@¡@¥|¡B¨ä¥L¹Hªk¤§¦æ¬°¡C<br> ¡@¡@³ø¹B³fª«¥X¤f¦³«e¶µ¦U´Ú±¡¨Æ¤§¤@ªÌ¡A³B¤@¤d¤¸¥H¤W¤@¸U¤¸¥H¤U¤§»@Áì¡A¨Ã±o¨S¤J¨ä³fª«¡C<br> ¡@¡@¨R°h¶i¤f­ì®Æµ|®½¤§¥[¤u¥~¾P³fª«¡A³ø¹B¥X¤f¦Ó¦³²Ä¤@¶µ©Ò¦C¦U´Ú±¡¨Æ¤§¤@ªÌ¡A³B¥H·¸ÃB¨R°hµ|ÃB¤G­¿¦Ü¤­­¿¤§»@Áì¡A¨Ã±o¨S¤J¨ä³fª«¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¶l»¼¤§«H¨ç©Î¥]»q¡A¤º¦³À³½ÒÃöµ|¤§³fª«©ÎºÞ¨îª««~¡A¨ä«Ê¥Ö¤W¥¼¥¿½T¸ü©ú¸Ó¶µ³fª«©Îª««~¤§«~½è¡B¼ÆÃB¡B­«¶q¡B»ù­È¡A¥ç¥¼ªþ¦³¸Ó¶µ°O¸üªÌ¡A¸g¬d©ú¦³¨«¨p©Î°kÁ׺ި¨Æ®É¡A±o¨S¤J¨ä³fª«©Îª««~¡A¨Ã³qª¾¶i¤f¦¬¥ó¤H©Î¥X¤f±H¥ó¤H¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤T¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@®È«È¥X¤J°ê¹ÒÄâ±a¦æ§õ¡A¤º¦³À³µ|³fª«©ÎºÞ¨îª««~¦Ó°Î¤£¥Ó³ø©Î³WÁ×ÀˬdªÌ¡A¨Ì²Ä¤T¤Q¤»±ø²Ä¤@¶µ¤Î²Ä¤T¶µ½×³B¡C<br> ¡@¡@®È«È³ø¹B¤£ÀH¨­¦æ§õ¶i¤f¡B¥X¤f¡A¦p¦³¹Hªkº|µ|±¡¨Æ¡A¨Ì²Ä¤T¤Q¤C±ø½×³B¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥Ñ¥~°ê±H»¼¡BÄâ±a©Î¦b°ê¤º«ù¦³¡A·~¸g¥~°êµo³f¼t°Óñ¦r¡A¥i¨Ñ¶ñ¼g§@¬°¶i¤f³fª«µo²¼¤§¹w¯dªÅ¥Õ¤å¥óªÌ¡A³B¤­¤d¤¸¥H¤U»@Áì¡A¨Ã¨S¤J¨ä¤å¥ó¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@³øÃö¦æ¦V®üÃö»¼°e³ø³æ¡A¹ï©ó³fª«¤§­«¶q¡B»ù­È¡B¼Æ¶q¡B«~½è©Î¨ä¥L¨Æ¶µ¡A¬°¤£¹ê°O¸üªÌ¡A³B¥H©Òº|©Î¨R°hµ|ÃB¤G­¿¦Ü¤­­¿¤§»@Áì¡A¨Ã±o°±¤î¨äÀç·~¤@­Ó¤ë¦Ü¤»­Ó¤ë¡F±¡¸`­«¤jªÌ¡A¨ÃºM¾P¨äÀç·~°õ·Ó¡C<br> ¡@¡@«e¶µ¤£¹ê°O¸ü¡A¦p«Y¥Ñ³f¥D®º³y©Ò­P¡A¦Ó«D³øÃö¦æ©Òª¾±xªÌ¡A¶È´N³f¥D¨Ì²Ä¤T¤Q¤C±ø³W©w³B»@¡C<br> ¡@¡@²Ä¤@¶µ¤§¤£¹ê°O¸üµ¥±¡¨Æ¡A¦p«Y³øÃö¦æ»P³f¥D¤§¦@¦P¦æ¬°¡AÀ³¤À§O³B»@¡C<br> ¡@¡@²Ä¤@¶µ¤§¤£¹ê°O¸ü¡A±¡¸`»´·L¡A¥B«Y¦]¿ù»~©Ò­P¡A¦Ó¨¬¥H¼vÅTµ|®½¼x¦¬ªÌ¡A³B¤@¤d¤¸¥H¤W¤­¤d¤¸¥H¤U»@Áì¡C¦ý¤£±o¹O¸Ó¶µ³W©w©Ò±o³B»@¤§¼ÆÃB¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@®üÃö¹ï©ó³ø¹B³fª«¶i¤f¡B¥X¤f»{¦³¹Hªk¶ûºÃ®É¡A±o³qª¾¸Ó¶i¤f°Ó¡B¥X¤f°Ó¡B³f¥D©Î¦¬³f¤H¡A±N¸Ó³fª«¤§µo²¼¡B»ù³æ¡B±b³æ¤Î¨ä¥L³æ¾Ú°eÅç¡A¨Ã±o¬d¾\©Î§Û¿ý¨ä»P¸Ó³fª«¶i¤f¡B¥X¤f¡B¶R½æ¡B¦¨¥»»ù­È¡B¥I´Ú¦U±¡¨Æ¦³Ãö¤§±bï¡B«H¥ó©Îµo²¼Ã¯¡C<br> ¡@¡@¤£¬°°eÅç©Î©Úµ´¬d¾\§Û¿ý¡A©Î·N¹Ï´ó·ÀÃÒ¾Ú¡A±N¸Ó¶µ³æ¾Ú¡B±bï¤Î¨ä¥L¦³Ãö¤å¥óÂðΩη´·lªÌ¡A³B¤­¤d¤¸¥H¤U»@Áì¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥H¤£¥¿·í¤èªk½Ð¨D§Kµ|¡B´îµ|©Î°hµ|ªÌ¡A³B©Òº|©Î¨R°hµ|ÃB¤G­¿¦Ü¤­­¿¤§»@Áì¡A¨Ã±o¨S¤J¨ä³fª«¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¦³¹H¤Ï¥»±ø¨Ò±¡¨ÆªÌ¡A°£¨Ì¥»±ø¨Ò¦³Ãö³W©w³B»@¥~¡A¤´À³°l¼x¨ä©Òº|©Î¨R°h¤§µ|´Ú¡C¦ý¦Û¨ä±¡¨Æµo¥Í¤wº¡¤­¦~ªÌ¡A¤£±o¦A¬°°lÀv©Î³B»@¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤­±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@°l¼x©Î³B»@¤§³B¤À½T©w«á¡A¤­¦~¤º¦A¥Ç¥»±ø¨Ò¦P¤@³W©w¤§¦æ¬°ªÌ¡A¨ä»@Áì±o¥[­«¤G¤À¤§¤@¡A¥Ç¤T¦¸¥H¤WªÌ¡A±o¥[­«¤@­¿¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤­³¹ ³B¤Àµ{§Ç</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤»±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@®üÃö¨Ì¥»±ø¨Ò³B¤À¤§½r¨p®×¥ó¡AÀ³¨î§@³B¤À®Ñ°e¹F¨ü³B¤À¤H¡C<br> ¡@¡@«e¶µ³B¤À®Ñ¤§°e¹F¤èªk¡A·Ç¥Î¦D¨Æ¶D³^ªk¦³Ãö°e¹F¤§³W©w¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤C±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨ü³B¤À¤H¤£ªA«e±ø³B¤ÀªÌ¡A±o©ó¦¬¨ì³B¤À®Ñ«á¤Q¤é¤º¡A¥H®Ñ­±¦V­ì³B¤À®üÃöÁn©ú²§Ä³¡C®üÃö©ó¦¬¨ì²§Ä³®Ñ«á¡A¸g¼f®Ö»{¬°¦³²z¥ÑªÌ¡AÀ³ºM¾P­ì³B¤À©Î¥t¬°¾A·í¤§³B¤À¡F»{¬°µL²z¥ÑªÌ¡Aºû«ù­ì³B¤À¡A¨Ã¥H®Ñ­±³qª¾¨ü³B¤À¤H¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤K±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨ü³B¤À¤H©ó¦¬¨ì«e±ø³qª¾®Ñ«á¡A±o©ó¤Q¤é¤º¦V®üÃöÁ`µ|°È¥q¸p´£°_¶DÄ@¡A©ó¦¬¨ì¶DÄ@¨M©w®Ñ«á¡A¤´¤£ªAªÌ¡A±o©ó¤Q¤é¤º¦V°]¬F³¡Ãö°È¸p´£°_¦A¶DÄ@¡A©ó¦¬¨ì¦A¶DÄ@¨M©w®Ñ«á¤´¤£ªAªÌ¡A±o©ó¤T¤Q¤é¤º´£°_¦æ¬F¶D³^¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤»³¹ °õ¦æ</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¥|¤Q¤E±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@Án©ú²§Ä³®×¥ó¡A¦pµL¦©©ãª«©Î¦©©ãª«¤£¨¬©è¥I»@Áì©Î°l¼xµ|´ÚªÌ¡A®üÃö±o­­´Á©ó¤Q¥|¤é¤ºÃº¯Ç­ì³B¤À©Î¤£¨¬ª÷ÃB¤G¤À¤§¤@«OÃÒª÷©Î´£¨Ñ¦PÃB¾á«O¡A¹O´Á¤£¬°Ãº¯Ç©Î´£¨Ñ¾á«OªÌ¡A¨ä²§Ä³¤£¤©¨ü²z¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨Ì¥»±ø¨Ò³B¤À½T©w®×¥ó¡A¦¬¨ì®üÃö³qª¾«á¤T¤Q¤é¤º¥¼±Nµ|´Ú¤Î»@Áìú¯ÇªÌ¡A±o¥H«OÃÒª÷©è¥I©Î´N¦©©ãª«©Î¾á«O«~ÅÜ»ù¨úÀv¡C¦³¾lµoÁÙ¡A¤£¨¬°l¼x¡C<br> ¡@¡@«e¶µÅÜ»ù¡AÀ³¥H©ç½æ¤è¦¡¬°¤§¡A¨ÃÀ³©ó©ç½æ¤­¤é«e³qª¾¨ü³B¤À¤H¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q¤@±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥¼¨Ì«e±ø³W©wú¯Çµ|´Ú¤Î»@Áì¦ÓµL«OÃÒª÷©è¥I¡A¥çµL¦©©ãª«©Î¾á«O«~¨¬¥HÅÜ»ù¨úÀv¡A©Î©è¥I¡BÅÜ»ù¨úÀv©|¦³¤£¨¬ªÌ¡A²¾°eªk°|±j¨î°õ¦æ¡F®üÃö¨Ã±o°±¤î¨ü³B¤À¤H¦b¥ô¦ó¤f©¤³ø¹B³fª«¶i¤f¡B¥X¤f¡A¦Üµ|´Ú¤Î»@Áìú²M¤§¤é¤î¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q¤G±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¶i¥X¤f¤§²î²í¡B¯èªÅ¾¹¡B¨®½ø©Î¨ä¥L¹B¿é¤u¨ã¤§ªA°È¤H­û¤íú¦U¶µ¶i¤fµ|®½©Î»@Áì¦ÓµL«OÃҩΨä¥L¾á«O¨¬¥H¨úÀvªÌ¡A®üÃö±o°±¤î¸Ó²î²í¡B¯èªÅ¾¹¡B¨®½ø©Î¨ä¥L¹B¿é¤u¨ã¦b¥ô¦ó¤f©¤µ²Ãö¥X¤f¡A¦Ü¨ú±o²Mú«OÃÒ¤§¤é¤î¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q¤T±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¨S¤J³B¤À½T©w«á¡A¨ü³B¤À¤H±o¨Ìªkú¯Çµ|®½¡A¥Ó½Ð¨Ì®Ö©w³f»ù³Æ´ÚÁʦ^¥ª¦C³fª«©Îª««~¡C<br> ¡@¡@¤@¡B­ã³\¶i¥X¤fªÌ¡C<br> ¡@¡@¤G¡B¸gºÞ¨î¶i¥X¤f³f»ù¦b¤­¸U¤¸¥H¤UªÌ¡C¦ýÅé¿n¹L¥¨©Î©ö©ó·lÃaÅܽè¡A©Î¨ä¥L¤£©ö©ç½æ©Î³B²zªÌ¡A±o¤£¨ü³f»ù¤­¸U¤¸¥H¤U¤§­­¨î¡C<br> ¡@¡@¹H¸T«~©Î¸T¤î¶i¥X¤f³fª«¡A¤£¾A¥Î«e¶µ¤§³W©w¡C<br> </td> </table> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <td><font color=4000ff size=4>²Ä¤C³¹ ªþ«h</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>²Ä¤­¤Q¥|±ø</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td> ¡@¡@¥»±ø¨Ò¦Û¤½¥¬¤é¬I¦æ¡C<br> </td> </table> </table> </table> </left> </body> <!-- Mirrored from lis.ly.gov.tw/lghtml/lawstat/version2/01530/0153062081400.htm by HTTrack Website Copier/3.x [XR&CO'2010], Sun, 24 Mar 2013 09:12:38 GMT --> </html>
g0v/laweasyread-data
rawdata/lawstat/version2/01530/0153062081400.html
HTML
mit
24,954
<?php namespace App\Units\Auth\Providers; use App\Units\Auth\Routes\Api; use App\Units\Auth\Routes\Console; use App\Units\Auth\Routes\Web; use Illuminate\Support\Facades\Route; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; class RouteServiceProvider extends ServiceProvider { /** * This namespace is applied to your controller routes. * * In addition, it is set as the URL generator's root namespace. * * @var string */ protected $namespace = 'App\Units\Auth\Http\Controllers'; /** * Define your route model bindings, pattern filters, etc. */ public function boot() { parent::boot(); } /** * Define the routes for the application. */ public function map() { $this->mapWebRoutes(); $this->mapApiRoutes(); $this->mapConsoleRoutes(); } /** * Define the "web" routes for the application. * * These routes all receive session state, CSRF protection, etc. */ protected function mapWebRoutes() { (new Web([ 'middleware' => 'web', 'namespace' => $this->namespace, ]))->register(); } /** * Define the "api" routes for the application. * * These routes are typically stateless. */ protected function mapApiRoutes() { (new Api([ 'middleware' => 'api', 'namespace' => $this->namespace, 'prefix' => 'api', ]))->register(); } /** * Define the "console" routes for the application. * * Those routes are the ones defined by * artisan->command instead of registered directly * on the ConsoleKernel. */ protected function mapConsoleRoutes() { (new Console())->register(); } }
joseferrao/laravel
app/Units/Auth/Providers/RouteServiceProvider.php
PHP
mit
1,847
'use strict'; const path = require('path'); const taskName = path.basename(__dirname); const dist = path.resolve(__dirname, '../dist', taskName); const webpackConfig = { context: __dirname, entry: { 'mod2': './js/index.js' }, output: { path: dist, filename: '[name].[chunkhash].js' }, plugins: [] }; module.exports = webpackConfig;
huanleguang/ci-task-runner
test/file/tasks/mod2/webpack.config.js
JavaScript
mit
381
# Conclusion # Reproduction Package We provide a reproduction package that is publicly available at [link]. All the instructions needed to reproduce our results are self-contained in the provided archive.
PapersOfMathieuNls/bug-taxonomy
06_conclusion.md
Markdown
mit
215
import React from 'react'; import PropTypes from 'prop-types'; import {observer} from 'mobx-react'; import {action} from 'mobx'; import {pluralize} from '../utils'; import { ALL_TODOS, ACTIVE_TODOS, COMPLETED_TODOS } from '../constants'; @observer export default class TodoFooter extends React.Component { render() { const todoStore = this.props.todoStore; if (!todoStore.activeTodoCount && !todoStore.completedCount) return null; const activeTodoWord = pluralize(todoStore.activeTodoCount, 'item'); return ( <footer className="footer"> <span className="todo-count"> <strong>{todoStore.activeTodoCount}</strong> {activeTodoWord} left </span> <ul className="filters"> {this.renderFilterLink(ALL_TODOS, "", "All")} {this.renderFilterLink(ACTIVE_TODOS, "active", "Active")} {this.renderFilterLink(COMPLETED_TODOS, "completed", "Completed")} </ul> { todoStore.completedCount === 0 ? null : <button className="clear-completed" onClick={this.clearCompleted}> Clear completed </button> } </footer> ); } renderFilterLink(filterName, url, caption) { return (<li> <a href={"#/" + url} className={filterName === this.props.viewStore.todoFilter ? "selected" : ""}> {caption} </a> {' '} </li>) } @action clearCompleted = () => { this.props.todoStore.clearCompleted(); }; } TodoFooter.propTypes = { viewStore: PropTypes.object.isRequired, todoStore: PropTypes.object.isRequired }
mobxjs/mobx-react-todomvc
src/components/todoFooter.js
JavaScript
mit
1,506
{ "ADP_currencyISO" : "peseta andorrana", "ADP_currencyPlural" : "pesetas andorranas", "ADP_currencySingular" : "peseta andorrana", "ADP_currencySymbol" : "ADP", "AED_currencyISO" : "dírham de los Emiratos Árabes Unidos", "AED_currencyPlural" : "dirhams de los Emiratos Árabes Unidos", "AED_currencySingular" : "dirham de los Emiratos Árabes Unidos", "AED_currencySymbol" : "AED", "AFA_currencyISO" : "afgani (1927-2002)", "AFA_currencyPlural" : "dirhams de los Emiratos Árabes Unidos", "AFA_currencySingular" : "dirham de los Emiratos Árabes Unidos", "AFA_currencySymbol" : "AFA", "AFN_currencyISO" : "afgani", "AFN_currencyPlural" : "afganis afganos", "AFN_currencySingular" : "afgani afgano", "AFN_currencySymbol" : "Af", "ALK_currencyISO" : "afgani", "ALK_currencyPlural" : "afganis afganos", "ALK_currencySingular" : "afgani afgano", "ALK_currencySymbol" : "Af", "ALL_currencyISO" : "lek albanés", "ALL_currencyPlural" : "lekë albaneses", "ALL_currencySingular" : "lek albanés", "ALL_currencySymbol" : "ALL", "AMD_currencyISO" : "dram armenio", "AMD_currencyPlural" : "dram armenios", "AMD_currencySingular" : "dram armenio", "AMD_currencySymbol" : "AMD", "ANG_currencyISO" : "florín de las Antillas Neerlandesas", "ANG_currencyPlural" : "florines de las Antillas Neerlandesas", "ANG_currencySingular" : "florín de las Antillas Neerlandesas", "ANG_currencySymbol" : "NAf.", "AOA_currencyISO" : "kwanza angoleño", "AOA_currencyPlural" : "kwanzas angoleños", "AOA_currencySingular" : "kwanza angoleño", "AOA_currencySymbol" : "Kz", "AOK_currencyISO" : "kwanza angoleño (1977-1990)", "AOK_currencyPlural" : "kwanzas angoleños", "AOK_currencySingular" : "kwanza angoleño", "AOK_currencySymbol" : "AOK", "AON_currencyISO" : "nuevo kwanza angoleño (1990-2000)", "AON_currencyPlural" : "kwanzas angoleños", "AON_currencySingular" : "kwanza angoleño", "AON_currencySymbol" : "AON", "AOR_currencyISO" : "kwanza reajustado angoleño (1995-1999)", "AOR_currencyPlural" : "kwanzas angoleños", "AOR_currencySingular" : "kwanza angoleño", "AOR_currencySymbol" : "AOR", "ARA_currencyISO" : "austral argentino", "ARA_currencyPlural" : "australes argentinos", "ARA_currencySingular" : "austral argentino", "ARA_currencySymbol" : "₳", "ARL_currencyISO" : "ARL", "ARL_currencyPlural" : "australes argentinos", "ARL_currencySingular" : "austral argentino", "ARL_currencySymbol" : "$L", "ARM_currencyISO" : "ARM", "ARM_currencyPlural" : "australes argentinos", "ARM_currencySingular" : "austral argentino", "ARM_currencySymbol" : "m$n", "ARP_currencyISO" : "peso argentino (1983-1985)", "ARP_currencyPlural" : "pesos argentinos (ARP)", "ARP_currencySingular" : "peso argentino (ARP)", "ARP_currencySymbol" : "ARP", "ARS_currencyISO" : "peso argentino", "ARS_currencyPlural" : "pesos argentinos", "ARS_currencySingular" : "peso argentino", "ARS_currencySymbol" : "AR$", "ATS_currencyISO" : "chelín austriaco", "ATS_currencyPlural" : "chelines austriacos", "ATS_currencySingular" : "chelín austriaco", "ATS_currencySymbol" : "ATS", "AUD_currencyISO" : "dólar australiano", "AUD_currencyPlural" : "dólares australianos", "AUD_currencySingular" : "dólar australiano", "AUD_currencySymbol" : "AU$", "AWG_currencyISO" : "florín de Aruba", "AWG_currencyPlural" : "florines de Aruba", "AWG_currencySingular" : "florín de Aruba", "AWG_currencySymbol" : "Afl.", "AZM_currencyISO" : "manat azerí (1993-2006)", "AZM_currencyPlural" : "florines de Aruba", "AZM_currencySingular" : "florín de Aruba", "AZM_currencySymbol" : "AZM", "AZN_currencyISO" : "manat azerí", "AZN_currencyPlural" : "manat azeríes", "AZN_currencySingular" : "manat azerí", "AZN_currencySymbol" : "man.", "BAD_currencyISO" : "dinar bosnio", "BAD_currencyPlural" : "dinares bosnios", "BAD_currencySingular" : "dinar bosnio", "BAD_currencySymbol" : "BAD", "BAM_currencyISO" : "marco convertible de Bosnia-Herzegovina", "BAM_currencyPlural" : "marcos convertibles de Bosnia-Herzegovina", "BAM_currencySingular" : "marco convertible de Bosnia-Herzegovina", "BAM_currencySymbol" : "KM", "BAN_currencyISO" : "marco convertible de Bosnia-Herzegovina", "BAN_currencyPlural" : "marcos convertibles de Bosnia-Herzegovina", "BAN_currencySingular" : "marco convertible de Bosnia-Herzegovina", "BAN_currencySymbol" : "KM", "BBD_currencyISO" : "dólar de Barbados", "BBD_currencyPlural" : "dólares de Barbados", "BBD_currencySingular" : "dólar de Barbados", "BBD_currencySymbol" : "Bds$", "BDT_currencyISO" : "taka de Bangladesh", "BDT_currencyPlural" : "taka de Bangladesh", "BDT_currencySingular" : "taka de Bangladesh", "BDT_currencySymbol" : "Tk", "BEC_currencyISO" : "franco belga (convertible)", "BEC_currencyPlural" : "francos belgas (convertibles)", "BEC_currencySingular" : "franco belga (convertible)", "BEC_currencySymbol" : "BEC", "BEF_currencyISO" : "franco belga", "BEF_currencyPlural" : "francos belgas", "BEF_currencySingular" : "franco belga", "BEF_currencySymbol" : "BF", "BEL_currencyISO" : "franco belga (financiero)", "BEL_currencyPlural" : "francos belgas (financieros)", "BEL_currencySingular" : "franco belga (financiero)", "BEL_currencySymbol" : "BEL", "BGL_currencyISO" : "lev fuerte búlgaro", "BGL_currencyPlural" : "leva fuertes búlgaros", "BGL_currencySingular" : "lev fuerte búlgaro", "BGL_currencySymbol" : "BGL", "BGM_currencyISO" : "lev fuerte búlgaro", "BGM_currencyPlural" : "leva fuertes búlgaros", "BGM_currencySingular" : "lev fuerte búlgaro", "BGM_currencySymbol" : "BGL", "BGN_currencyISO" : "nuevo lev búlgaro", "BGN_currencyPlural" : "nuevos leva búlgaros", "BGN_currencySingular" : "nuevo lev búlgaro", "BGN_currencySymbol" : "BGN", "BGO_currencyISO" : "nuevo lev búlgaro", "BGO_currencyPlural" : "nuevos leva búlgaros", "BGO_currencySingular" : "nuevo lev búlgaro", "BGO_currencySymbol" : "BGN", "BHD_currencyISO" : "dinar bahreiní", "BHD_currencyPlural" : "dinares bahreiníes", "BHD_currencySingular" : "dinar bahreiní", "BHD_currencySymbol" : "BD", "BIF_currencyISO" : "franco de Burundi", "BIF_currencyPlural" : "francos de Burundi", "BIF_currencySingular" : "franco de Burundi", "BIF_currencySymbol" : "FBu", "BMD_currencyISO" : "dólar de Bermudas", "BMD_currencyPlural" : "dólares de Bermudas", "BMD_currencySingular" : "dólar de Bermudas", "BMD_currencySymbol" : "BD$", "BND_currencyISO" : "dólar de Brunéi", "BND_currencyPlural" : "dólares de Brunéi", "BND_currencySingular" : "dólar de Brunéi", "BND_currencySymbol" : "BN$", "BOB_currencyISO" : "boliviano", "BOB_currencyPlural" : "bolivianos", "BOB_currencySingular" : "boliviano", "BOB_currencySymbol" : "Bs", "BOL_currencyISO" : "boliviano", "BOL_currencyPlural" : "bolivianos", "BOL_currencySingular" : "boliviano", "BOL_currencySymbol" : "Bs", "BOP_currencyISO" : "peso boliviano", "BOP_currencyPlural" : "pesos bolivianos", "BOP_currencySingular" : "peso boliviano", "BOP_currencySymbol" : "$b.", "BOV_currencyISO" : "MVDOL boliviano", "BOV_currencyPlural" : "MVDOL bolivianos", "BOV_currencySingular" : "MVDOL boliviano", "BOV_currencySymbol" : "BOV", "BRB_currencyISO" : "nuevo cruceiro brasileño (1967-1986)", "BRB_currencyPlural" : "nuevos cruzados brasileños (BRB)", "BRB_currencySingular" : "nuevo cruzado brasileño (BRB)", "BRB_currencySymbol" : "BRB", "BRC_currencyISO" : "cruzado brasileño", "BRC_currencyPlural" : "cruzados brasileños", "BRC_currencySingular" : "cruzado brasileño", "BRC_currencySymbol" : "BRC", "BRE_currencyISO" : "cruceiro brasileño (1990-1993)", "BRE_currencyPlural" : "cruceiros brasileños (BRE)", "BRE_currencySingular" : "cruceiro brasileño (BRE)", "BRE_currencySymbol" : "BRE", "BRL_currencyISO" : "real brasileño", "BRL_currencyPlural" : "reales brasileños", "BRL_currencySingular" : "real brasileño", "BRL_currencySymbol" : "R$", "BRN_currencyISO" : "nuevo cruzado brasileño", "BRN_currencyPlural" : "nuevos cruzados brasileños", "BRN_currencySingular" : "nuevo cruzado brasileño", "BRN_currencySymbol" : "BRN", "BRR_currencyISO" : "cruceiro brasileño", "BRR_currencyPlural" : "cruceiros brasileños", "BRR_currencySingular" : "cruceiro brasileño", "BRR_currencySymbol" : "BRR", "BRZ_currencyISO" : "cruceiro brasileño", "BRZ_currencyPlural" : "cruceiros brasileños", "BRZ_currencySingular" : "cruceiro brasileño", "BRZ_currencySymbol" : "BRR", "BSD_currencyISO" : "dólar de las Bahamas", "BSD_currencyPlural" : "dólares de las Bahamas", "BSD_currencySingular" : "dólar de las Bahamas", "BSD_currencySymbol" : "BS$", "BTN_currencyISO" : "ngultrum butanés", "BTN_currencyPlural" : "ngultrum butaneses", "BTN_currencySingular" : "ngultrum butanés", "BTN_currencySymbol" : "Nu.", "BUK_currencyISO" : "kyat birmano", "BUK_currencyPlural" : "kyat birmanos", "BUK_currencySingular" : "kyat birmano", "BUK_currencySymbol" : "BUK", "BWP_currencyISO" : "pula botsuano", "BWP_currencyPlural" : "pula botsuanas", "BWP_currencySingular" : "pula botsuana", "BWP_currencySymbol" : "BWP", "BYB_currencyISO" : "nuevo rublo bielorruso (1994-1999)", "BYB_currencyPlural" : "nuevos rublos bielorrusos", "BYB_currencySingular" : "nuevo rublo bielorruso", "BYB_currencySymbol" : "BYB", "BYR_currencyISO" : "rublo bielorruso", "BYR_currencyPlural" : "rublos bielorrusos", "BYR_currencySingular" : "rublo bielorruso", "BYR_currencySymbol" : "BYR", "BZD_currencyISO" : "dólar de Belice", "BZD_currencyPlural" : "dólares de Belice", "BZD_currencySingular" : "dólar de Belice", "BZD_currencySymbol" : "BZ$", "CAD_currencyISO" : "dólar canadiense", "CAD_currencyPlural" : "dólares canadienses", "CAD_currencySingular" : "dólar canadiense", "CAD_currencySymbol" : "CA$", "CDF_currencyISO" : "franco congoleño", "CDF_currencyPlural" : "francos congoleños", "CDF_currencySingular" : "franco congoleño", "CDF_currencySymbol" : "CDF", "CHE_currencyISO" : "euro WIR", "CHE_currencyPlural" : "euros WIR", "CHE_currencySingular" : "euro WIR", "CHE_currencySymbol" : "CHE", "CHF_currencyISO" : "franco suizo", "CHF_currencyPlural" : "francos suizos", "CHF_currencySingular" : "franco suizo", "CHF_currencySymbol" : "CHF", "CHW_currencyISO" : "franco WIR", "CHW_currencyPlural" : "francos WIR", "CHW_currencySingular" : "franco WIR", "CHW_currencySymbol" : "CHW", "CLE_currencyISO" : "CLE", "CLE_currencyPlural" : "francos WIR", "CLE_currencySingular" : "franco WIR", "CLE_currencySymbol" : "Eº", "CLF_currencyISO" : "unidad de fomento chilena", "CLF_currencyPlural" : "unidades de fomento chilenas", "CLF_currencySingular" : "unidad de fomento chilena", "CLF_currencySymbol" : "CLF", "CLP_currencyISO" : "peso chileno", "CLP_currencyPlural" : "pesos chilenos", "CLP_currencySingular" : "peso chileno", "CLP_currencySymbol" : "CL$", "CNX_currencyISO" : "peso chileno", "CNX_currencyPlural" : "pesos chilenos", "CNX_currencySingular" : "peso chileno", "CNX_currencySymbol" : "CL$", "CNY_currencyISO" : "yuan renminbi chino", "CNY_currencyPlural" : "pesos chilenos", "CNY_currencySingular" : "yuan renminbi chino", "CNY_currencySymbol" : "CN¥", "COP_currencyISO" : "peso colombiano", "COP_currencyPlural" : "pesos colombianos", "COP_currencySingular" : "peso colombiano", "COP_currencySymbol" : "CO$", "COU_currencyISO" : "unidad de valor real colombiana", "COU_currencyPlural" : "unidades de valor reales", "COU_currencySingular" : "unidad de valor real", "COU_currencySymbol" : "COU", "CRC_currencyISO" : "colón costarricense", "CRC_currencyPlural" : "colones costarricenses", "CRC_currencySingular" : "colón costarricense", "CRC_currencySymbol" : "₡", "CSD_currencyISO" : "antiguo dinar serbio", "CSD_currencyPlural" : "antiguos dinares serbios", "CSD_currencySingular" : "antiguo dinar serbio", "CSD_currencySymbol" : "CSD", "CSK_currencyISO" : "corona fuerte checoslovaca", "CSK_currencyPlural" : "coronas fuertes checoslovacas", "CSK_currencySingular" : "corona fuerte checoslovaca", "CSK_currencySymbol" : "CSK", "CUC_currencyISO" : "CUC", "CUC_currencyPlural" : "coronas fuertes checoslovacas", "CUC_currencySingular" : "corona fuerte checoslovaca", "CUC_currencySymbol" : "CUC$", "CUP_currencyISO" : "peso cubano", "CUP_currencyPlural" : "pesos cubanos", "CUP_currencySingular" : "peso cubano", "CUP_currencySymbol" : "CU$", "CVE_currencyISO" : "escudo de Cabo Verde", "CVE_currencyPlural" : "escudos de Cabo Verde", "CVE_currencySingular" : "escudo de Cabo Verde", "CVE_currencySymbol" : "CV$", "CYP_currencyISO" : "libra chipriota", "CYP_currencyPlural" : "libras chipriotas", "CYP_currencySingular" : "libra chipriota", "CYP_currencySymbol" : "CY£", "CZK_currencyISO" : "corona checa", "CZK_currencyPlural" : "coronas checas", "CZK_currencySingular" : "corona checa", "CZK_currencySymbol" : "Kč", "DDM_currencyISO" : "ostmark de Alemania del Este", "DDM_currencyPlural" : "marcos de la República Democrática Alemana", "DDM_currencySingular" : "marco de la República Democrática Alemana", "DDM_currencySymbol" : "DDM", "DEM_currencyISO" : "marco alemán", "DEM_currencyPlural" : "marcos alemanes", "DEM_currencySingular" : "marco alemán", "DEM_currencySymbol" : "DM", "DJF_currencyISO" : "franco de Yibuti", "DJF_currencyPlural" : "marcos alemanes", "DJF_currencySingular" : "marco alemán", "DJF_currencySymbol" : "Fdj", "DKK_currencyISO" : "corona danesa", "DKK_currencyPlural" : "coronas danesas", "DKK_currencySingular" : "corona danesa", "DKK_currencySymbol" : "Dkr", "DOP_currencyISO" : "peso dominicano", "DOP_currencyPlural" : "pesos dominicanos", "DOP_currencySingular" : "peso dominicano", "DOP_currencySymbol" : "RD$", "DZD_currencyISO" : "dinar argelino", "DZD_currencyPlural" : "dinares argelinos", "DZD_currencySingular" : "dinar argelino", "DZD_currencySymbol" : "DA", "ECS_currencyISO" : "sucre ecuatoriano", "ECS_currencyPlural" : "sucres ecuatorianos", "ECS_currencySingular" : "sucre ecuatoriano", "ECS_currencySymbol" : "ECS", "ECV_currencyISO" : "unidad de valor constante (UVC) ecuatoriana", "ECV_currencyPlural" : "unidades de valor constante (UVC) ecuatorianas", "ECV_currencySingular" : "unidad de valor constante (UVC) ecuatoriana", "ECV_currencySymbol" : "ECV", "EEK_currencyISO" : "corona estonia", "EEK_currencyPlural" : "coronas estonias", "EEK_currencySingular" : "corona estonia", "EEK_currencySymbol" : "Ekr", "EGP_currencyISO" : "libra egipcia", "EGP_currencyPlural" : "libras egipcias", "EGP_currencySingular" : "libra egipcia", "EGP_currencySymbol" : "EG£", "ERN_currencyISO" : "nakfa eritreo", "ERN_currencyPlural" : "libras egipcias", "ERN_currencySingular" : "libra egipcia", "ERN_currencySymbol" : "Nfk", "ESA_currencyISO" : "peseta española (cuenta A)", "ESA_currencyPlural" : "pesetas españolas (cuenta A)", "ESA_currencySingular" : "peseta española (cuenta A)", "ESA_currencySymbol" : "ESA", "ESB_currencyISO" : "peseta española (cuenta convertible)", "ESB_currencyPlural" : "pesetas españolas (cuenta convertible)", "ESB_currencySingular" : "peseta española (cuenta convertible)", "ESB_currencySymbol" : "ESB", "ESP_currencyISO" : "peseta española", "ESP_currencyPlural" : "pesetas españolas", "ESP_currencySingular" : "peseta española", "ESP_currencySymbol" : "₧", "ETB_currencyISO" : "birr etíope", "ETB_currencyPlural" : "pesetas españolas", "ETB_currencySingular" : "peseta española", "ETB_currencySymbol" : "Br", "EUR_currencyISO" : "euro", "EUR_currencyPlural" : "euros", "EUR_currencySingular" : "euro", "EUR_currencySymbol" : "€", "FIM_currencyISO" : "marco finlandés", "FIM_currencyPlural" : "marcos finlandeses", "FIM_currencySingular" : "marco finlandés", "FIM_currencySymbol" : "mk", "FJD_currencyISO" : "dólar de las Islas Fiyi", "FJD_currencyPlural" : "marcos finlandeses", "FJD_currencySingular" : "marco finlandés", "FJD_currencySymbol" : "FJ$", "FKP_currencyISO" : "libra de las Islas Malvinas", "FKP_currencyPlural" : "libras de las Islas Malvinas", "FKP_currencySingular" : "libra de las Islas Malvinas", "FKP_currencySymbol" : "FK£", "FRF_currencyISO" : "franco francés", "FRF_currencyPlural" : "francos franceses", "FRF_currencySingular" : "franco francés", "FRF_currencySymbol" : "₣", "GBP_currencyISO" : "libra esterlina británica", "GBP_currencyPlural" : "libras esterlinas británicas", "GBP_currencySingular" : "libra esterlina británica", "GBP_currencySymbol" : "£", "GEK_currencyISO" : "kupon larit georgiano", "GEK_currencyPlural" : "libras esterlinas británicas", "GEK_currencySingular" : "libra esterlina británica", "GEK_currencySymbol" : "GEK", "GEL_currencyISO" : "lari georgiano", "GEL_currencyPlural" : "libras esterlinas británicas", "GEL_currencySingular" : "libra esterlina británica", "GEL_currencySymbol" : "GEL", "GHC_currencyISO" : "cedi ghanés (1979-2007)", "GHC_currencyPlural" : "libras esterlinas británicas", "GHC_currencySingular" : "libra esterlina británica", "GHC_currencySymbol" : "₵", "GHS_currencyISO" : "GHS", "GHS_currencyPlural" : "libras esterlinas británicas", "GHS_currencySingular" : "libra esterlina británica", "GHS_currencySymbol" : "GH₵", "GIP_currencyISO" : "libra de Gibraltar", "GIP_currencyPlural" : "libras gibraltareñas", "GIP_currencySingular" : "libra gibraltareña", "GIP_currencySymbol" : "GI£", "GMD_currencyISO" : "dalasi gambiano", "GMD_currencyPlural" : "libras gibraltareñas", "GMD_currencySingular" : "libra gibraltareña", "GMD_currencySymbol" : "GMD", "GNF_currencyISO" : "franco guineano", "GNF_currencyPlural" : "francos guineanos", "GNF_currencySingular" : "franco guineano", "GNF_currencySymbol" : "FG", "GNS_currencyISO" : "syli guineano", "GNS_currencyPlural" : "francos guineanos", "GNS_currencySingular" : "franco guineano", "GNS_currencySymbol" : "GNS", "GQE_currencyISO" : "ekuele de Guinea Ecuatorial", "GQE_currencyPlural" : "ekueles de Guinea Ecuatorial", "GQE_currencySingular" : "ekuele de Guinea Ecuatorial", "GQE_currencySymbol" : "GQE", "GRD_currencyISO" : "dracma griego", "GRD_currencyPlural" : "dracmas griegos", "GRD_currencySingular" : "dracma griego", "GRD_currencySymbol" : "₯", "GTQ_currencyISO" : "quetzal guatemalteco", "GTQ_currencyPlural" : "quetzales guatemaltecos", "GTQ_currencySingular" : "quetzal guatemalteco", "GTQ_currencySymbol" : "GTQ", "GWE_currencyISO" : "escudo de Guinea Portuguesa", "GWE_currencyPlural" : "quetzales guatemaltecos", "GWE_currencySingular" : "quetzal guatemalteco", "GWE_currencySymbol" : "GWE", "GWP_currencyISO" : "peso de Guinea-Bissáu", "GWP_currencyPlural" : "quetzales guatemaltecos", "GWP_currencySingular" : "quetzal guatemalteco", "GWP_currencySymbol" : "GWP", "GYD_currencyISO" : "dólar guyanés", "GYD_currencyPlural" : "quetzales guatemaltecos", "GYD_currencySingular" : "quetzal guatemalteco", "GYD_currencySymbol" : "GY$", "HKD_currencyISO" : "dólar de Hong Kong", "HKD_currencyPlural" : "dólares de Hong Kong", "HKD_currencySingular" : "dólar de Hong Kong", "HKD_currencySymbol" : "HK$", "HNL_currencyISO" : "lempira hondureño", "HNL_currencyPlural" : "lempiras hondureños", "HNL_currencySingular" : "lempira hondureño", "HNL_currencySymbol" : "HNL", "HRD_currencyISO" : "dinar croata", "HRD_currencyPlural" : "dinares croatas", "HRD_currencySingular" : "dinar croata", "HRD_currencySymbol" : "HRD", "HRK_currencyISO" : "kuna croata", "HRK_currencyPlural" : "kunas croatas", "HRK_currencySingular" : "kuna croata", "HRK_currencySymbol" : "kn", "HTG_currencyISO" : "gourde haitiano", "HTG_currencyPlural" : "kunas croatas", "HTG_currencySingular" : "kuna croata", "HTG_currencySymbol" : "HTG", "HUF_currencyISO" : "florín húngaro", "HUF_currencyPlural" : "florines húngaros", "HUF_currencySingular" : "florín húngaro", "HUF_currencySymbol" : "Ft", "IDR_currencyISO" : "rupia indonesia", "IDR_currencyPlural" : "rupias indonesias", "IDR_currencySingular" : "rupia indonesia", "IDR_currencySymbol" : "Rp", "IEP_currencyISO" : "libra irlandesa", "IEP_currencyPlural" : "libras irlandesas", "IEP_currencySingular" : "libra irlandesa", "IEP_currencySymbol" : "IR£", "ILP_currencyISO" : "libra israelí", "ILP_currencyPlural" : "libras israelíes", "ILP_currencySingular" : "libra israelí", "ILP_currencySymbol" : "I£", "ILR_currencyISO" : "libra israelí", "ILR_currencyPlural" : "libras israelíes", "ILR_currencySingular" : "libra israelí", "ILR_currencySymbol" : "I£", "ILS_currencyISO" : "nuevo sheqel israelí", "ILS_currencyPlural" : "libras israelíes", "ILS_currencySingular" : "libra israelí", "ILS_currencySymbol" : "₪", "INR_currencyISO" : "rupia india", "INR_currencyPlural" : "rupias indias", "INR_currencySingular" : "rupia india", "INR_currencySymbol" : "Rs", "IQD_currencyISO" : "dinar iraquí", "IQD_currencyPlural" : "dinares iraquíes", "IQD_currencySingular" : "dinar iraquí", "IQD_currencySymbol" : "IQD", "IRR_currencyISO" : "rial iraní", "IRR_currencyPlural" : "dinares iraquíes", "IRR_currencySingular" : "dinar iraquí", "IRR_currencySymbol" : "IRR", "ISJ_currencyISO" : "rial iraní", "ISJ_currencyPlural" : "dinares iraquíes", "ISJ_currencySingular" : "dinar iraquí", "ISJ_currencySymbol" : "IRR", "ISK_currencyISO" : "corona islandesa", "ISK_currencyPlural" : "coronas islandesas", "ISK_currencySingular" : "corona islandesa", "ISK_currencySymbol" : "Ikr", "ITL_currencyISO" : "lira italiana", "ITL_currencyPlural" : "liras italianas", "ITL_currencySingular" : "lira italiana", "ITL_currencySymbol" : "IT₤", "JMD_currencyISO" : "dólar de Jamaica", "JMD_currencyPlural" : "dólares de Jamaica", "JMD_currencySingular" : "dólar de Jamaica", "JMD_currencySymbol" : "J$", "JOD_currencyISO" : "dinar jordano", "JOD_currencyPlural" : "dinares jordanos", "JOD_currencySingular" : "dinar jordano", "JOD_currencySymbol" : "JD", "JPY_currencyISO" : "yen japonés", "JPY_currencyPlural" : "yenes japoneses", "JPY_currencySingular" : "yen japonés", "JPY_currencySymbol" : "JP¥", "KES_currencyISO" : "chelín keniata", "KES_currencyPlural" : "yenes japoneses", "KES_currencySingular" : "yen japonés", "KES_currencySymbol" : "Ksh", "KGS_currencyISO" : "som kirguís", "KGS_currencyPlural" : "yenes japoneses", "KGS_currencySingular" : "yen japonés", "KGS_currencySymbol" : "KGS", "KHR_currencyISO" : "riel camboyano", "KHR_currencyPlural" : "yenes japoneses", "KHR_currencySingular" : "yen japonés", "KHR_currencySymbol" : "KHR", "KMF_currencyISO" : "franco comorense", "KMF_currencyPlural" : "yenes japoneses", "KMF_currencySingular" : "yen japonés", "KMF_currencySymbol" : "CF", "KPW_currencyISO" : "won norcoreano", "KPW_currencyPlural" : "yenes japoneses", "KPW_currencySingular" : "yen japonés", "KPW_currencySymbol" : "KPW", "KRH_currencyISO" : "won norcoreano", "KRH_currencyPlural" : "yenes japoneses", "KRH_currencySingular" : "yen japonés", "KRH_currencySymbol" : "KPW", "KRO_currencyISO" : "won norcoreano", "KRO_currencyPlural" : "yenes japoneses", "KRO_currencySingular" : "yen japonés", "KRO_currencySymbol" : "KPW", "KRW_currencyISO" : "won surcoreano", "KRW_currencyPlural" : "yenes japoneses", "KRW_currencySingular" : "yen japonés", "KRW_currencySymbol" : "₩", "KWD_currencyISO" : "dinar kuwaití", "KWD_currencyPlural" : "yenes japoneses", "KWD_currencySingular" : "yen japonés", "KWD_currencySymbol" : "KD", "KYD_currencyISO" : "dólar de las Islas Caimán", "KYD_currencyPlural" : "dólares de las Islas Caimán", "KYD_currencySingular" : "dólar de las Islas Caimán", "KYD_currencySymbol" : "KY$", "KZT_currencyISO" : "tenge kazako", "KZT_currencyPlural" : "dólares de las Islas Caimán", "KZT_currencySingular" : "dólar de las Islas Caimán", "KZT_currencySymbol" : "KZT", "LAK_currencyISO" : "kip laosiano", "LAK_currencyPlural" : "dólares de las Islas Caimán", "LAK_currencySingular" : "dólar de las Islas Caimán", "LAK_currencySymbol" : "₭", "LBP_currencyISO" : "libra libanesa", "LBP_currencyPlural" : "libras libanesas", "LBP_currencySingular" : "libra libanesa", "LBP_currencySymbol" : "LB£", "LKR_currencyISO" : "rupia de Sri Lanka", "LKR_currencyPlural" : "rupias de Sri Lanka", "LKR_currencySingular" : "rupia de Sri Lanka", "LKR_currencySymbol" : "SLRs", "LRD_currencyISO" : "dólar liberiano", "LRD_currencyPlural" : "dólares liberianos", "LRD_currencySingular" : "dólar liberiano", "LRD_currencySymbol" : "L$", "LSL_currencyISO" : "loti lesothense", "LSL_currencyPlural" : "dólares liberianos", "LSL_currencySingular" : "dólar liberiano", "LSL_currencySymbol" : "LSL", "LTL_currencyISO" : "litas lituano", "LTL_currencyPlural" : "litas lituanas", "LTL_currencySingular" : "litas lituana", "LTL_currencySymbol" : "Lt", "LTT_currencyISO" : "talonas lituano", "LTT_currencyPlural" : "talonas lituanas", "LTT_currencySingular" : "talonas lituana", "LTT_currencySymbol" : "LTT", "LUC_currencyISO" : "franco convertible luxemburgués", "LUC_currencyPlural" : "francos convertibles luxemburgueses", "LUC_currencySingular" : "franco convertible luxemburgués", "LUC_currencySymbol" : "LUC", "LUF_currencyISO" : "franco luxemburgués", "LUF_currencyPlural" : "francos luxemburgueses", "LUF_currencySingular" : "franco luxemburgués", "LUF_currencySymbol" : "LUF", "LUL_currencyISO" : "franco financiero luxemburgués", "LUL_currencyPlural" : "francos financieros luxemburgueses", "LUL_currencySingular" : "franco financiero luxemburgués", "LUL_currencySymbol" : "LUL", "LVL_currencyISO" : "lats letón", "LVL_currencyPlural" : "lats letones", "LVL_currencySingular" : "lats letón", "LVL_currencySymbol" : "Ls", "LVR_currencyISO" : "rublo letón", "LVR_currencyPlural" : "rublos letones", "LVR_currencySingular" : "rublo letón", "LVR_currencySymbol" : "LVR", "LYD_currencyISO" : "dinar libio", "LYD_currencyPlural" : "dinares libios", "LYD_currencySingular" : "dinar libio", "LYD_currencySymbol" : "LD", "MAD_currencyISO" : "dirham marroquí", "MAD_currencyPlural" : "dirhams marroquíes", "MAD_currencySingular" : "dirham marroquí", "MAD_currencySymbol" : "MAD", "MAF_currencyISO" : "franco marroquí", "MAF_currencyPlural" : "francos marroquíes", "MAF_currencySingular" : "franco marroquí", "MAF_currencySymbol" : "MAF", "MCF_currencyISO" : "franco marroquí", "MCF_currencyPlural" : "francos marroquíes", "MCF_currencySingular" : "franco marroquí", "MCF_currencySymbol" : "MAF", "MDC_currencyISO" : "franco marroquí", "MDC_currencyPlural" : "francos marroquíes", "MDC_currencySingular" : "franco marroquí", "MDC_currencySymbol" : "MAF", "MDL_currencyISO" : "leu moldavo", "MDL_currencyPlural" : "francos marroquíes", "MDL_currencySingular" : "franco marroquí", "MDL_currencySymbol" : "MDL", "MGA_currencyISO" : "ariary malgache", "MGA_currencyPlural" : "francos marroquíes", "MGA_currencySingular" : "franco marroquí", "MGA_currencySymbol" : "MGA", "MGF_currencyISO" : "franco malgache", "MGF_currencyPlural" : "francos marroquíes", "MGF_currencySingular" : "franco marroquí", "MGF_currencySymbol" : "MGF", "MKD_currencyISO" : "dinar macedonio", "MKD_currencyPlural" : "dinares macedonios", "MKD_currencySingular" : "dinar macedonio", "MKD_currencySymbol" : "MKD", "MKN_currencyISO" : "dinar macedonio", "MKN_currencyPlural" : "dinares macedonios", "MKN_currencySingular" : "dinar macedonio", "MKN_currencySymbol" : "MKD", "MLF_currencyISO" : "franco malí", "MLF_currencyPlural" : "dinares macedonios", "MLF_currencySingular" : "dinar macedonio", "MLF_currencySymbol" : "MLF", "MMK_currencyISO" : "kyat de Myanmar", "MMK_currencyPlural" : "dinares macedonios", "MMK_currencySingular" : "dinar macedonio", "MMK_currencySymbol" : "MMK", "MNT_currencyISO" : "tugrik mongol", "MNT_currencyPlural" : "dinares macedonios", "MNT_currencySingular" : "dinar macedonio", "MNT_currencySymbol" : "₮", "MOP_currencyISO" : "pataca de Macao", "MOP_currencyPlural" : "dinares macedonios", "MOP_currencySingular" : "dinar macedonio", "MOP_currencySymbol" : "MOP$", "MRO_currencyISO" : "ouguiya mauritano", "MRO_currencyPlural" : "dinares macedonios", "MRO_currencySingular" : "dinar macedonio", "MRO_currencySymbol" : "UM", "MTL_currencyISO" : "lira maltesa", "MTL_currencyPlural" : "liras maltesas", "MTL_currencySingular" : "lira maltesa", "MTL_currencySymbol" : "Lm", "MTP_currencyISO" : "libra maltesa", "MTP_currencyPlural" : "libras maltesas", "MTP_currencySingular" : "libra maltesa", "MTP_currencySymbol" : "MT£", "MUR_currencyISO" : "rupia mauriciana", "MUR_currencyPlural" : "libras maltesas", "MUR_currencySingular" : "libra maltesa", "MUR_currencySymbol" : "MURs", "MVP_currencyISO" : "rupia mauriciana", "MVP_currencyPlural" : "libras maltesas", "MVP_currencySingular" : "libra maltesa", "MVP_currencySymbol" : "MURs", "MVR_currencyISO" : "rufiyaa de Maldivas", "MVR_currencyPlural" : "libras maltesas", "MVR_currencySingular" : "libra maltesa", "MVR_currencySymbol" : "MVR", "MWK_currencyISO" : "kwacha de Malawi", "MWK_currencyPlural" : "libras maltesas", "MWK_currencySingular" : "libra maltesa", "MWK_currencySymbol" : "MWK", "MXN_currencyISO" : "peso mexicano", "MXN_currencyPlural" : "pesos mexicanos", "MXN_currencySingular" : "peso mexicano", "MXN_currencySymbol" : "MX$", "MXP_currencyISO" : "peso de plata mexicano (1861-1992)", "MXP_currencyPlural" : "pesos de plata mexicanos (MXP)", "MXP_currencySingular" : "peso de plata mexicano (MXP)", "MXP_currencySymbol" : "MXP", "MXV_currencyISO" : "unidad de inversión (UDI) mexicana", "MXV_currencyPlural" : "unidades de inversión (UDI) mexicanas", "MXV_currencySingular" : "unidad de inversión (UDI) mexicana", "MXV_currencySymbol" : "MXV", "MYR_currencyISO" : "ringgit malasio", "MYR_currencyPlural" : "unidades de inversión (UDI) mexicanas", "MYR_currencySingular" : "unidad de inversión (UDI) mexicana", "MYR_currencySymbol" : "RM", "MZE_currencyISO" : "escudo mozambiqueño", "MZE_currencyPlural" : "escudos mozambiqueños", "MZE_currencySingular" : "escudo mozambiqueño", "MZE_currencySymbol" : "MZE", "MZM_currencyISO" : "antiguo metical mozambiqueño", "MZM_currencyPlural" : "escudos mozambiqueños", "MZM_currencySingular" : "escudo mozambiqueño", "MZM_currencySymbol" : "Mt", "MZN_currencyISO" : "metical mozambiqueño", "MZN_currencyPlural" : "escudos mozambiqueños", "MZN_currencySingular" : "escudo mozambiqueño", "MZN_currencySymbol" : "MTn", "NAD_currencyISO" : "dólar de Namibia", "NAD_currencyPlural" : "escudos mozambiqueños", "NAD_currencySingular" : "escudo mozambiqueño", "NAD_currencySymbol" : "N$", "NGN_currencyISO" : "naira nigeriano", "NGN_currencyPlural" : "escudos mozambiqueños", "NGN_currencySingular" : "escudo mozambiqueño", "NGN_currencySymbol" : "₦", "NIC_currencyISO" : "córdoba nicaragüense", "NIC_currencyPlural" : "córdobas nicaragüenses", "NIC_currencySingular" : "córdoba nicaragüense", "NIC_currencySymbol" : "NIC", "NIO_currencyISO" : "córdoba oro nicaragüense", "NIO_currencyPlural" : "córdobas oro nicaragüenses", "NIO_currencySingular" : "córdoba oro nicaragüense", "NIO_currencySymbol" : "C$", "NLG_currencyISO" : "florín neerlandés", "NLG_currencyPlural" : "florines neerlandeses", "NLG_currencySingular" : "florín neerlandés", "NLG_currencySymbol" : "fl", "NOK_currencyISO" : "corona noruega", "NOK_currencyPlural" : "coronas noruegas", "NOK_currencySingular" : "corona noruega", "NOK_currencySymbol" : "Nkr", "NPR_currencyISO" : "rupia nepalesa", "NPR_currencyPlural" : "rupias nepalesas", "NPR_currencySingular" : "rupia nepalesa", "NPR_currencySymbol" : "NPRs", "NZD_currencyISO" : "dólar neozelandés", "NZD_currencyPlural" : "dólares neozelandeses", "NZD_currencySingular" : "dólar neozelandés", "NZD_currencySymbol" : "NZ$", "OMR_currencyISO" : "rial omaní", "OMR_currencyPlural" : "dólares neozelandeses", "OMR_currencySingular" : "dólar neozelandés", "OMR_currencySymbol" : "OMR", "PAB_currencyISO" : "balboa panameño", "PAB_currencyPlural" : "balboas panameños", "PAB_currencySingular" : "balboa panameño", "PAB_currencySymbol" : "B/.", "PEI_currencyISO" : "inti peruano", "PEI_currencyPlural" : "intis peruanos", "PEI_currencySingular" : "inti peruano", "PEI_currencySymbol" : "I/.", "PEN_currencyISO" : "nuevo sol peruano", "PEN_currencyPlural" : "nuevos soles peruanos", "PEN_currencySingular" : "nuevo sol peruano", "PEN_currencySymbol" : "S/.", "PES_currencyISO" : "sol peruano", "PES_currencyPlural" : "soles peruanos", "PES_currencySingular" : "sol peruano", "PES_currencySymbol" : "PES", "PGK_currencyISO" : "kina de Papúa Nueva Guinea", "PGK_currencyPlural" : "soles peruanos", "PGK_currencySingular" : "sol peruano", "PGK_currencySymbol" : "PGK", "PHP_currencyISO" : "peso filipino", "PHP_currencyPlural" : "pesos filipinos", "PHP_currencySingular" : "peso filipino", "PHP_currencySymbol" : "₱", "PKR_currencyISO" : "rupia pakistaní", "PKR_currencyPlural" : "pesos filipinos", "PKR_currencySingular" : "peso filipino", "PKR_currencySymbol" : "PKRs", "PLN_currencyISO" : "zloty polaco", "PLN_currencyPlural" : "zlotys polacos", "PLN_currencySingular" : "zloty polaco", "PLN_currencySymbol" : "zł", "PLZ_currencyISO" : "zloty polaco (1950-1995)", "PLZ_currencyPlural" : "zlotys polacos (PLZ)", "PLZ_currencySingular" : "zloty polaco (PLZ)", "PLZ_currencySymbol" : "PLZ", "PTE_currencyISO" : "escudo portugués", "PTE_currencyPlural" : "escudos portugueses", "PTE_currencySingular" : "escudo portugués", "PTE_currencySymbol" : "Esc", "PYG_currencyISO" : "guaraní paraguayo", "PYG_currencyPlural" : "guaraníes paraguayos", "PYG_currencySingular" : "guaraní paraguayo", "PYG_currencySymbol" : "₲", "QAR_currencyISO" : "riyal de Qatar", "QAR_currencyPlural" : "guaraníes paraguayos", "QAR_currencySingular" : "guaraní paraguayo", "QAR_currencySymbol" : "QR", "RHD_currencyISO" : "dólar rodesiano", "RHD_currencyPlural" : "guaraníes paraguayos", "RHD_currencySingular" : "guaraní paraguayo", "RHD_currencySymbol" : "RH$", "ROL_currencyISO" : "antiguo leu rumano", "ROL_currencyPlural" : "antiguos lei rumanos", "ROL_currencySingular" : "antiguo leu rumano", "ROL_currencySymbol" : "ROL", "RON_currencyISO" : "leu rumano", "RON_currencyPlural" : "lei rumanos", "RON_currencySingular" : "leu rumano", "RON_currencySymbol" : "RON", "RSD_currencyISO" : "dinar serbio", "RSD_currencyPlural" : "dinares serbios", "RSD_currencySingular" : "dinar serbio", "RSD_currencySymbol" : "din.", "RUB_currencyISO" : "rublo ruso", "RUB_currencyPlural" : "rublos rusos", "RUB_currencySingular" : "rublo ruso", "RUB_currencySymbol" : "RUB", "RUR_currencyISO" : "rublo ruso (1991-1998)", "RUR_currencyPlural" : "rublos rusos (RUR)", "RUR_currencySingular" : "rublo ruso (RUR)", "RUR_currencySymbol" : "RUR", "RWF_currencyISO" : "franco ruandés", "RWF_currencyPlural" : "francos ruandeses", "RWF_currencySingular" : "franco ruandés", "RWF_currencySymbol" : "RWF", "SAR_currencyISO" : "riyal saudí", "SAR_currencyPlural" : "francos ruandeses", "SAR_currencySingular" : "franco ruandés", "SAR_currencySymbol" : "SR", "SBD_currencyISO" : "dólar de las Islas Salomón", "SBD_currencyPlural" : "dólares de las Islas Salomón", "SBD_currencySingular" : "dólar de las Islas Salomón", "SBD_currencySymbol" : "SI$", "SCR_currencyISO" : "rupia de Seychelles", "SCR_currencyPlural" : "dólares de las Islas Salomón", "SCR_currencySingular" : "dólar de las Islas Salomón", "SCR_currencySymbol" : "SRe", "SDD_currencyISO" : "dinar sudanés", "SDD_currencyPlural" : "dinares sudaneses", "SDD_currencySingular" : "dinar sudanés", "SDD_currencySymbol" : "LSd", "SDG_currencyISO" : "libra sudanesa", "SDG_currencyPlural" : "libras sudanesas", "SDG_currencySingular" : "libra sudanesa", "SDG_currencySymbol" : "SDG", "SDP_currencyISO" : "libra sudanesa antigua", "SDP_currencyPlural" : "libras sudanesas antiguas", "SDP_currencySingular" : "libra sudanesa antigua", "SDP_currencySymbol" : "SDP", "SEK_currencyISO" : "corona sueca", "SEK_currencyPlural" : "coronas suecas", "SEK_currencySingular" : "corona sueca", "SEK_currencySymbol" : "Skr", "SGD_currencyISO" : "dólar singapurense", "SGD_currencyPlural" : "coronas suecas", "SGD_currencySingular" : "corona sueca", "SGD_currencySymbol" : "S$", "SHP_currencyISO" : "libra de Santa Elena", "SHP_currencyPlural" : "libras de Santa Elena", "SHP_currencySingular" : "libra de Santa Elena", "SHP_currencySymbol" : "SH£", "SIT_currencyISO" : "tólar esloveno", "SIT_currencyPlural" : "tólares eslovenos", "SIT_currencySingular" : "tólar esloveno", "SIT_currencySymbol" : "SIT", "SKK_currencyISO" : "corona eslovaca", "SKK_currencyPlural" : "coronas eslovacas", "SKK_currencySingular" : "corona eslovaca", "SKK_currencySymbol" : "Sk", "SLL_currencyISO" : "leone de Sierra Leona", "SLL_currencyPlural" : "coronas eslovacas", "SLL_currencySingular" : "corona eslovaca", "SLL_currencySymbol" : "Le", "SOS_currencyISO" : "chelín somalí", "SOS_currencyPlural" : "chelines somalíes", "SOS_currencySingular" : "chelín somalí", "SOS_currencySymbol" : "Ssh", "SRD_currencyISO" : "dólar surinamés", "SRD_currencyPlural" : "chelines somalíes", "SRD_currencySingular" : "chelín somalí", "SRD_currencySymbol" : "SR$", "SRG_currencyISO" : "florín surinamés", "SRG_currencyPlural" : "chelines somalíes", "SRG_currencySingular" : "chelín somalí", "SRG_currencySymbol" : "Sf", "SSP_currencyISO" : "florín surinamés", "SSP_currencyPlural" : "chelines somalíes", "SSP_currencySingular" : "chelín somalí", "SSP_currencySymbol" : "Sf", "STD_currencyISO" : "dobra de Santo Tomé y Príncipe", "STD_currencyPlural" : "chelines somalíes", "STD_currencySingular" : "chelín somalí", "STD_currencySymbol" : "Db", "SUR_currencyISO" : "rublo soviético", "SUR_currencyPlural" : "rublos soviéticos", "SUR_currencySingular" : "rublo soviético", "SUR_currencySymbol" : "SUR", "SVC_currencyISO" : "colón salvadoreño", "SVC_currencyPlural" : "colones salvadoreños", "SVC_currencySingular" : "colón salvadoreño", "SVC_currencySymbol" : "SV₡", "SYP_currencyISO" : "libra siria", "SYP_currencyPlural" : "libras sirias", "SYP_currencySingular" : "libra siria", "SYP_currencySymbol" : "SY£", "SZL_currencyISO" : "lilangeni suazi", "SZL_currencyPlural" : "libras sirias", "SZL_currencySingular" : "libra siria", "SZL_currencySymbol" : "SZL", "THB_currencyISO" : "baht tailandés", "THB_currencyPlural" : "libras sirias", "THB_currencySingular" : "libra siria", "THB_currencySymbol" : "฿", "TJR_currencyISO" : "rublo tayiko", "TJR_currencyPlural" : "libras sirias", "TJR_currencySingular" : "libra siria", "TJR_currencySymbol" : "TJR", "TJS_currencyISO" : "somoni tayiko", "TJS_currencyPlural" : "libras sirias", "TJS_currencySingular" : "libra siria", "TJS_currencySymbol" : "TJS", "TMM_currencyISO" : "manat turcomano", "TMM_currencyPlural" : "libras sirias", "TMM_currencySingular" : "libra siria", "TMM_currencySymbol" : "TMM", "TMT_currencyISO" : "manat turcomano", "TMT_currencyPlural" : "libras sirias", "TMT_currencySingular" : "libra siria", "TMT_currencySymbol" : "TMM", "TND_currencyISO" : "dinar tunecino", "TND_currencyPlural" : "libras sirias", "TND_currencySingular" : "libra siria", "TND_currencySymbol" : "DT", "TOP_currencyISO" : "paʻanga tongano", "TOP_currencyPlural" : "libras sirias", "TOP_currencySingular" : "libra siria", "TOP_currencySymbol" : "T$", "TPE_currencyISO" : "escudo timorense", "TPE_currencyPlural" : "libras sirias", "TPE_currencySingular" : "libra siria", "TPE_currencySymbol" : "TPE", "TRL_currencyISO" : "lira turca antigua", "TRL_currencyPlural" : "liras turcas antiguas", "TRL_currencySingular" : "lira turca antigua", "TRL_currencySymbol" : "TRL", "TRY_currencyISO" : "nueva lira turca", "TRY_currencyPlural" : "liras turcas", "TRY_currencySingular" : "lira turca", "TRY_currencySymbol" : "TL", "TTD_currencyISO" : "dólar de Trinidad y Tobago", "TTD_currencyPlural" : "liras turcas", "TTD_currencySingular" : "lira turca", "TTD_currencySymbol" : "TT$", "TWD_currencyISO" : "nuevo dólar taiwanés", "TWD_currencyPlural" : "liras turcas", "TWD_currencySingular" : "lira turca", "TWD_currencySymbol" : "NT$", "TZS_currencyISO" : "chelín tanzano", "TZS_currencyPlural" : "liras turcas", "TZS_currencySingular" : "lira turca", "TZS_currencySymbol" : "TSh", "UAH_currencyISO" : "grivna ucraniana", "UAH_currencyPlural" : "grivnias ucranianas", "UAH_currencySingular" : "grivnia ucraniana", "UAH_currencySymbol" : "₴", "UAK_currencyISO" : "karbovanet ucraniano", "UAK_currencyPlural" : "karbovanets ucranianos", "UAK_currencySingular" : "karbovanet ucraniano", "UAK_currencySymbol" : "UAK", "UGS_currencyISO" : "chelín ugandés (1966-1987)", "UGS_currencyPlural" : "karbovanets ucranianos", "UGS_currencySingular" : "karbovanet ucraniano", "UGS_currencySymbol" : "UGS", "UGX_currencyISO" : "chelín ugandés", "UGX_currencyPlural" : "chelines ugandeses", "UGX_currencySingular" : "chelín ugandés", "UGX_currencySymbol" : "USh", "USD_currencyISO" : "dólar estadounidense", "USD_currencyPlural" : "dólares estadounidenses", "USD_currencySingular" : "dólar estadounidense", "USD_currencySymbol" : "US$", "USN_currencyISO" : "dólar estadounidense (día siguiente)", "USN_currencyPlural" : "dólares estadounidenses (día siguiente)", "USN_currencySingular" : "dólar estadounidense (día siguiente)", "USN_currencySymbol" : "USN", "USS_currencyISO" : "dólar estadounidense (mismo día)", "USS_currencyPlural" : "dólares estadounidenses (mismo día)", "USS_currencySingular" : "dólar estadounidense (mismo día)", "USS_currencySymbol" : "USS", "UYI_currencyISO" : "peso uruguayo en unidades indexadas", "UYI_currencyPlural" : "pesos uruguayos en unidades indexadas", "UYI_currencySingular" : "peso uruguayo en unidades indexadas", "UYI_currencySymbol" : "UYI", "UYP_currencyISO" : "peso uruguayo (1975-1993)", "UYP_currencyPlural" : "pesos uruguayos (UYP)", "UYP_currencySingular" : "peso uruguayo (UYP)", "UYP_currencySymbol" : "UYP", "UYU_currencyISO" : "peso uruguayo", "UYU_currencyPlural" : "pesos uruguayos", "UYU_currencySingular" : "peso uruguayo", "UYU_currencySymbol" : "$U", "UZS_currencyISO" : "sum uzbeko", "UZS_currencyPlural" : "pesos uruguayos", "UZS_currencySingular" : "peso uruguayo", "UZS_currencySymbol" : "UZS", "VEB_currencyISO" : "bolívar venezolano", "VEB_currencyPlural" : "bolívares venezolanos", "VEB_currencySingular" : "bolívar venezolano", "VEB_currencySymbol" : "VEB", "VEF_currencyISO" : "bolívar fuerte venezolano", "VEF_currencyPlural" : "bolívares fuertes venezolanos", "VEF_currencySingular" : "bolívar fuerte venezolano", "VEF_currencySymbol" : "Bs.F.", "VND_currencyISO" : "dong vietnamita", "VND_currencyPlural" : "bolívares fuertes venezolanos", "VND_currencySingular" : "bolívar fuerte venezolano", "VND_currencySymbol" : "₫", "VNN_currencyISO" : "dong vietnamita", "VNN_currencyPlural" : "bolívares fuertes venezolanos", "VNN_currencySingular" : "bolívar fuerte venezolano", "VNN_currencySymbol" : "₫", "VUV_currencyISO" : "vatu vanuatuense", "VUV_currencyPlural" : "bolívares fuertes venezolanos", "VUV_currencySingular" : "bolívar fuerte venezolano", "VUV_currencySymbol" : "VT", "WST_currencyISO" : "tala samoano", "WST_currencyPlural" : "bolívares fuertes venezolanos", "WST_currencySingular" : "bolívar fuerte venezolano", "WST_currencySymbol" : "WS$", "XAF_currencyISO" : "franco CFA BEAC", "XAF_currencyPlural" : "bolívares fuertes venezolanos", "XAF_currencySingular" : "bolívar fuerte venezolano", "XAF_currencySymbol" : "FCFA", "XAG_currencyISO" : "plata", "XAG_currencyPlural" : "plata", "XAG_currencySingular" : "plata", "XAG_currencySymbol" : "XAG", "XAU_currencyISO" : "oro", "XAU_currencyPlural" : "oro", "XAU_currencySingular" : "oro", "XAU_currencySymbol" : "XAU", "XBA_currencyISO" : "unidad compuesta europea", "XBA_currencyPlural" : "unidades compuestas europeas", "XBA_currencySingular" : "unidad compuesta europea", "XBA_currencySymbol" : "XBA", "XBB_currencyISO" : "unidad monetaria europea", "XBB_currencyPlural" : "unidades monetarias europeas", "XBB_currencySingular" : "unidad monetaria europea", "XBB_currencySymbol" : "XBB", "XBC_currencyISO" : "unidad de cuenta europea (XBC)", "XBC_currencyPlural" : "unidades de cuenta europeas (XBC)", "XBC_currencySingular" : "unidad de cuenta europea (XBC)", "XBC_currencySymbol" : "XBC", "XBD_currencyISO" : "unidad de cuenta europea (XBD)", "XBD_currencyPlural" : "unidades de cuenta europeas (XBD)", "XBD_currencySingular" : "unidad de cuenta europea (XBD)", "XBD_currencySymbol" : "XBD", "XCD_currencyISO" : "dólar del Caribe Oriental", "XCD_currencyPlural" : "dólares del Caribe Oriental", "XCD_currencySingular" : "dólar del Caribe Oriental", "XCD_currencySymbol" : "EC$", "XDR_currencyISO" : "derechos especiales de giro", "XDR_currencyPlural" : "dólares del Caribe Oriental", "XDR_currencySingular" : "dólar del Caribe Oriental", "XDR_currencySymbol" : "XDR", "XEU_currencyISO" : "unidad de moneda europea", "XEU_currencyPlural" : "unidades de moneda europeas", "XEU_currencySingular" : "unidad de moneda europea", "XEU_currencySymbol" : "XEU", "XFO_currencyISO" : "franco oro francés", "XFO_currencyPlural" : "francos oro franceses", "XFO_currencySingular" : "franco oro francés", "XFO_currencySymbol" : "XFO", "XFU_currencyISO" : "franco UIC francés", "XFU_currencyPlural" : "francos UIC franceses", "XFU_currencySingular" : "franco UIC francés", "XFU_currencySymbol" : "XFU", "XOF_currencyISO" : "franco CFA BCEAO", "XOF_currencyPlural" : "francos UIC franceses", "XOF_currencySingular" : "franco UIC francés", "XOF_currencySymbol" : "CFA", "XPD_currencyISO" : "paladio", "XPD_currencyPlural" : "paladio", "XPD_currencySingular" : "paladio", "XPD_currencySymbol" : "XPD", "XPF_currencyISO" : "franco CFP", "XPF_currencyPlural" : "paladio", "XPF_currencySingular" : "paladio", "XPF_currencySymbol" : "CFPF", "XPT_currencyISO" : "platino", "XPT_currencyPlural" : "platino", "XPT_currencySingular" : "platino", "XPT_currencySymbol" : "XPT", "XRE_currencyISO" : "fondos RINET", "XRE_currencyPlural" : "platino", "XRE_currencySingular" : "platino", "XRE_currencySymbol" : "XRE", "XSU_currencyISO" : "fondos RINET", "XSU_currencyPlural" : "platino", "XSU_currencySingular" : "platino", "XSU_currencySymbol" : "XRE", "XTS_currencyISO" : "código reservado para pruebas", "XTS_currencyPlural" : "platino", "XTS_currencySingular" : "platino", "XTS_currencySymbol" : "XTS", "XUA_currencyISO" : "código reservado para pruebas", "XUA_currencyPlural" : "platino", "XUA_currencySingular" : "platino", "XUA_currencySymbol" : "XTS", "XXX_currencyISO" : "Sin divisa", "XXX_currencyPlural" : "monedas desconocidas/no válidas", "XXX_currencySingular" : "moneda desconocida/no válida", "XXX_currencySymbol" : "XXX", "YDD_currencyISO" : "dinar yemení", "YDD_currencyPlural" : "monedas desconocidas/no válidas", "YDD_currencySingular" : "moneda desconocida/no válida", "YDD_currencySymbol" : "YDD", "YER_currencyISO" : "rial yemení", "YER_currencyPlural" : "monedas desconocidas/no válidas", "YER_currencySingular" : "moneda desconocida/no válida", "YER_currencySymbol" : "YR", "YUD_currencyISO" : "dinar fuerte yugoslavo", "YUD_currencyPlural" : "monedas desconocidas/no válidas", "YUD_currencySingular" : "moneda desconocida/no válida", "YUD_currencySymbol" : "YUD", "YUM_currencyISO" : "super dinar yugoslavo", "YUM_currencyPlural" : "monedas desconocidas/no válidas", "YUM_currencySingular" : "moneda desconocida/no válida", "YUM_currencySymbol" : "YUM", "YUN_currencyISO" : "dinar convertible yugoslavo", "YUN_currencyPlural" : "dinares convertibles yugoslavos", "YUN_currencySingular" : "dinar convertible yugoslavo", "YUN_currencySymbol" : "YUN", "YUR_currencyISO" : "dinar convertible yugoslavo", "YUR_currencyPlural" : "dinares convertibles yugoslavos", "YUR_currencySingular" : "dinar convertible yugoslavo", "YUR_currencySymbol" : "YUN", "ZAL_currencyISO" : "rand sudafricano (financiero)", "ZAL_currencyPlural" : "dinares convertibles yugoslavos", "ZAL_currencySingular" : "dinar convertible yugoslavo", "ZAL_currencySymbol" : "ZAL", "ZAR_currencyISO" : "rand sudafricano", "ZAR_currencyPlural" : "dinares convertibles yugoslavos", "ZAR_currencySingular" : "dinar convertible yugoslavo", "ZAR_currencySymbol" : "R", "ZMK_currencyISO" : "kwacha zambiano", "ZMK_currencyPlural" : "dinares convertibles yugoslavos", "ZMK_currencySingular" : "dinar convertible yugoslavo", "ZMK_currencySymbol" : "ZK", "ZRN_currencyISO" : "nuevo zaire zaireño", "ZRN_currencyPlural" : "dinares convertibles yugoslavos", "ZRN_currencySingular" : "dinar convertible yugoslavo", "ZRN_currencySymbol" : "NZ", "ZRZ_currencyISO" : "zaire zaireño", "ZRZ_currencyPlural" : "dinares convertibles yugoslavos", "ZRZ_currencySingular" : "dinar convertible yugoslavo", "ZRZ_currencySymbol" : "ZRZ", "ZWD_currencyISO" : "dólar de Zimbabue", "ZWD_currencyPlural" : "dinares convertibles yugoslavos", "ZWD_currencySingular" : "dinar convertible yugoslavo", "ZWD_currencySymbol" : "Z$", "ZWL_currencyISO" : "dólar de Zimbabue", "ZWL_currencyPlural" : "dinares convertibles yugoslavos", "ZWL_currencySingular" : "dinar convertible yugoslavo", "ZWL_currencySymbol" : "Z$", "ZWR_currencyISO" : "dólar de Zimbabue", "ZWR_currencyPlural" : "dinares convertibles yugoslavos", "ZWR_currencySingular" : "dinar convertible yugoslavo", "ZWR_currencySymbol" : "Z$", "currencyFormat" : "¤ #,##0.00;¤ -#,##0.00", "currencyPatternPlural" : "e u", "currencyPatternSingular" : "{0} {1}", "decimalFormat" : "#,##0.###", "decimalSeparator" : ",", "defaultCurrency" : "PYG", "exponentialSymbol" : "E", "groupingSeparator" : ".", "infinitySign" : "∞", "minusSign" : "-", "nanSymbol" : "NaN", "numberZero" : "0", "perMilleSign" : "‰", "percentFormat" : "#,##0%", "percentSign" : "%", "plusSign" : "+", "scientificFormat" : "#E0" }
inikoo/fact
libs/yui/yui3-gallery/src/gallery-advanced-number-format/lang/gallery-advanced-number-format_es-PY.js
JavaScript
mit
50,696
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; import { coalesce } from 'vs/base/common/arrays'; import { onUnexpectedExternalError } from 'vs/base/common/errors'; import { TPromise } from 'vs/base/common/winjs.base'; import { IReadOnlyModel } from 'vs/editor/common/editorCommon'; import { registerDefaultLanguageCommand } from 'vs/editor/browser/editorExtensions'; import { Hover, HoverProviderRegistry } from 'vs/editor/common/modes'; import { asWinJsPromise } from 'vs/base/common/async'; import { Position } from 'vs/editor/common/core/position'; export function getHover(model: IReadOnlyModel, position: Position): TPromise<Hover[]> { const supports = HoverProviderRegistry.ordered(model); const values: Hover[] = []; const promises = supports.map((support, idx) => { return asWinJsPromise((token) => { return support.provideHover(model, position, token); }).then((result) => { if (result) { let hasRange = (typeof result.range !== 'undefined'); let hasHtmlContent = typeof result.contents !== 'undefined' && result.contents && result.contents.length > 0; if (hasRange && hasHtmlContent) { values[idx] = result; } } }, err => { onUnexpectedExternalError(err); }); }); return TPromise.join(promises).then(() => coalesce(values)); } registerDefaultLanguageCommand('_executeHoverProvider', getHover);
Zalastax/vscode
src/vs/editor/contrib/hover/getHover.ts
TypeScript
mit
1,676
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>DocBlox Documentation</title><link rel="stylesheet" href="css/jquery-ui.css" type="text/css"></link><link rel="stylesheet" href="css/docblox/jquery-ui-1.8.16.custom.css" type="text/css"></link><link rel="stylesheet" href="css/jquery.treeview.css" type="text/css"></link><link rel="stylesheet" href="css/theme.css" type="text/css"></link><script type="text/javascript" src="js/jquery-1.4.2.min.js"></script><script type="text/javascript" src="js/jquery-ui-1.8.2.custom.min.js"></script><script type="text/javascript" src="js/jquery.cookie.js"></script><script type="text/javascript" src="js/jquery.treeview.js"></script><script type="text/javascript"> $(document).ready(function() { $(".filetree").treeview({ collapsed: true, persist: "cookie" }); $("#accordion").accordion({ collapsible: true, autoHeight: false, fillSpace: true }); $(".tabs").tabs(); }); </script></head><body><script xmlns="" type="text/javascript"> $(document).ready(function() { $("#marker-accordion").accordion({ collapsible: true, autoHeight: false }); }); </script><div xmlns="" id="content"> <h1>Compilation Errors</h1> <div id="marker-accordion"> <h3><a href="#">CamelSpider/Entity/AbstractSpiderEgg.php<small>14</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Entity/AbstractSpiderEgg.php</td> </tr> <tr> <td>error</td> <td>16</td> <td>No DocBlock was found for Property $config</td> </tr> <tr> <td>error</td> <td>17</td> <td>No DocBlock was found for Property $logger</td> </tr> <tr> <td>error</td> <td>18</td> <td>No DocBlock was found for Property $cache</td> </tr> <tr> <td>error</td> <td>19</td> <td>No DocBlock was found for Property $name</td> </tr> <tr> <td>error</td> <td>21</td> <td>No DocBlock was found for Method __construct</td> </tr> <tr> <td>error</td> <td>31</td> <td>No DocBlock was found for Method transferDependency</td> </tr> <tr> <td>error</td> <td>40</td> <td>No DocBlock was found for Method getConfig</td> </tr> <tr> <td>notice</td> <td>54</td> <td>Argument $object is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>54</td> <td>Argument $info is missing from the function Docblock</td> </tr> <tr> <td>critical</td> <td>66</td> <td>No short description for method logger</td> </tr> <tr> <td>notice</td> <td>69</td> <td>Argument $string is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>69</td> <td>Argument $type is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>69</td> <td>Argument $level is missing from the function Docblock</td> </tr> </table></div> <h3><a href="#">CamelSpider/Entity/AbstractSubscription.php<small>17</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Entity/AbstractSubscription.php</td> </tr> <tr> <td>error</td> <td>9</td> <td>No DocBlock was found for Class AbstractSubscription</td> </tr> <tr> <td>error</td> <td>12</td> <td>No DocBlock was found for Method setStatus</td> </tr> <tr> <td>error</td> <td>17</td> <td>No DocBlock was found for Method getId</td> </tr> <tr> <td>error</td> <td>53</td> <td>No DocBlock was found for Method getDomain</td> </tr> <tr> <td>error</td> <td>58</td> <td>No DocBlock was found for Method getHref</td> </tr> <tr> <td>error</td> <td>63</td> <td>No DocBlock was found for Method getFilters</td> </tr> <tr> <td>critical</td> <td>68</td> <td>No short description for method getFilter</td> </tr> <tr> <td>error</td> <td>77</td> <td>No DocBlock was found for Method getDomainString</td> </tr> <tr> <td>error</td> <td>81</td> <td>No DocBlock was found for Method __toString</td> </tr> <tr> <td>error</td> <td>86</td> <td>No DocBlock was found for Method getMaxDepth</td> </tr> <tr> <td>error</td> <td>91</td> <td>No DocBlock was found for Method getLink</td> </tr> <tr> <td>error</td> <td>96</td> <td>No DocBlock was found for Method isDone</td> </tr> <tr> <td>error</td> <td>100</td> <td>No DocBlock was found for Method isWaiting</td> </tr> <tr> <td>error</td> <td>105</td> <td>No DocBlock was found for Method toMinimal</td> </tr> <tr> <td>error</td> <td>110</td> <td>No DocBlock was found for Method inDomain</td> </tr> <tr> <td>error</td> <td>121</td> <td>No DocBlock was found for Method insideScope</td> </tr> </table></div> <h3><a href="#">CamelSpider/Entity/Document.php<small>29</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Entity/Document.php</td> </tr> <tr> <td>error</td> <td>25</td> <td>No DocBlock was found for Property $name</td> </tr> <tr> <td>error</td> <td>27</td> <td>No DocBlock was found for Property $crawler</td> </tr> <tr> <td>error</td> <td>29</td> <td>No DocBlock was found for Property $response</td> </tr> <tr> <td>error</td> <td>31</td> <td>No DocBlock was found for Property $subscription</td> </tr> <tr> <td>error</td> <td>33</td> <td>No DocBlock was found for Property $asserts</td> </tr> <tr> <td>error</td> <td>35</td> <td>No DocBlock was found for Property $bigger</td> </tr> <tr> <td>notice</td> <td>48</td> <td>Name of argument $uri does not match with function Docblock</td> </tr> <tr> <td>notice</td> <td>48</td> <td>Argument $crawler is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>49</td> <td>Argument $subscription is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>49</td> <td>Argument $dependency is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>65</td> <td>No DocBlock was found for Method setUri</td> </tr> <tr> <td>error</td> <td>72</td> <td>No DocBlock was found for Method getUri</td> </tr> <tr> <td>notice</td> <td>80</td> <td>Argument $string is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>87</td> <td>No DocBlock was found for Method preStringProccess</td> </tr> <tr> <td>error</td> <td>92</td> <td>No DocBlock was found for Method setTitle</td> </tr> <tr> <td>error</td> <td>99</td> <td>No DocBlock was found for Method getTitle</td> </tr> <tr> <td>error</td> <td>104</td> <td>No DocBlock was found for Method getBody</td> </tr> <tr> <td>error</td> <td>109</td> <td>No DocBlock was found for Method getRaw</td> </tr> <tr> <td>error</td> <td>185</td> <td>No DocBlock was found for Method addRelevancy</td> </tr> <tr> <td>notice</td> <td>195</td> <td>Argument $tag is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>207</td> <td>No DocBlock was found for Method getBiggerTag</td> </tr> <tr> <td>error</td> <td>218</td> <td>No DocBlock was found for Method saveBiggerToFile</td> </tr> <tr> <td>error</td> <td>225</td> <td>No DocBlock was found for Method getHtml</td> </tr> <tr> <td>error</td> <td>253</td> <td>No DocBlock was found for Method getText</td> </tr> <tr> <td>error</td> <td>258</td> <td>No DocBlock was found for Method setSlug</td> </tr> <tr> <td>error</td> <td>263</td> <td>No DocBlock was found for Method getSlug</td> </tr> <tr> <td>error</td> <td>267</td> <td>No DocBlock was found for Method processResponse</td> </tr> <tr> <td>critical</td> <td>313</td> <td>No short description for method toArray</td> </tr> </table></div> <h3><a href="#">CamelSpider/Entity/FactorySubscription.php<small>5</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Entity/FactorySubscription.php</td> </tr> <tr> <td>error</td> <td>8</td> <td>No DocBlock was found for Class FactorySubscription</td> </tr> <tr> <td>error</td> <td>11</td> <td>No DocBlock was found for Method build</td> </tr> <tr> <td>error</td> <td>15</td> <td>No DocBlock was found for Method buildFromDomain</td> </tr> <tr> <td>error</td> <td>28</td> <td>No DocBlock was found for Method buildCollectionFromDomain</td> </tr> </table></div> <h3><a href="#">CamelSpider/Entity/InterfaceLink.php<small>7</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Entity/InterfaceLink.php</td> </tr> <tr> <td>error</td> <td>5</td> <td>No DocBlock was found for Interface InterfaceLink</td> </tr> <tr> <td>error</td> <td>8</td> <td>No DocBlock was found for Method getId</td> </tr> <tr> <td>error</td> <td>9</td> <td>No DocBlock was found for Method isDone</td> </tr> <tr> <td>error</td> <td>10</td> <td>No DocBlock was found for Method isWaiting</td> </tr> <tr> <td>error</td> <td>11</td> <td>No DocBlock was found for Method toMinimal</td> </tr> <tr> <td>error</td> <td>12</td> <td>No DocBlock was found for Method setStatus</td> </tr> </table></div> <h3><a href="#">CamelSpider/Entity/InterfaceSubscription.php<small>8</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Entity/InterfaceSubscription.php</td> </tr> <tr> <td>error</td> <td>5</td> <td>No DocBlock was found for Interface InterfaceSubscription</td> </tr> <tr> <td>error</td> <td>7</td> <td>No DocBlock was found for Method getDomain</td> </tr> <tr> <td>error</td> <td>8</td> <td>No DocBlock was found for Method getHref</td> </tr> <tr> <td>error</td> <td>9</td> <td>No DocBlock was found for Method getFilters</td> </tr> <tr> <td>error</td> <td>10</td> <td>No DocBlock was found for Method getMaxDepth</td> </tr> <tr> <td>error</td> <td>12</td> <td>No DocBlock was found for Method getLink</td> </tr> <tr> <td>error</td> <td>13</td> <td>No DocBlock was found for Method getSourceType</td> </tr> </table></div> <h3><a href="#">CamelSpider/Entity/Link.php<small>12</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Entity/Link.php</td> </tr> <tr> <td>error</td> <td>8</td> <td>No DocBlock was found for Class Link</td> </tr> <tr> <td>error</td> <td>10</td> <td>No DocBlock was found for Method __construct</td> </tr> <tr> <td>error</td> <td>26</td> <td>No DocBlock was found for Method setStatus</td> </tr> <tr> <td>notice</td> <td>34</td> <td>Argument $mode is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>39</td> <td>No DocBlock was found for Method getHref</td> </tr> <tr> <td>error</td> <td>44</td> <td>No DocBlock was found for Method isWaiting</td> </tr> <tr> <td>error</td> <td>48</td> <td>No DocBlock was found for Method isDone</td> </tr> <tr> <td>error</td> <td>53</td> <td>No DocBlock was found for Method setDocument</td> </tr> <tr> <td>error</td> <td>62</td> <td>No DocBlock was found for Method getDocument</td> </tr> <tr> <td>error</td> <td>79</td> <td>No DocBlock was found for Method toPackage</td> </tr> <tr> <td>error</td> <td>89</td> <td>No DocBlock was found for Method toArray</td> </tr> </table></div> <h3><a href="#">CamelSpider/Entity/Pool.php<small>9</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Entity/Pool.php</td> </tr> <tr> <td>error</td> <td>18</td> <td>No DocBlock was found for Property $name</td> </tr> <tr> <td>error</td> <td>20</td> <td>No DocBlock was found for Method __construct</td> </tr> <tr> <td>critical</td> <td>70</td> <td>No short description for method getPool</td> </tr> <tr> <td>notice</td> <td>73</td> <td>Argument $mode is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>88</td> <td>Argument $link is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>97</td> <td>No DocBlock was found for Method _save</td> </tr> <tr> <td>notice</td> <td>105</td> <td>Argument $link is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>121</td> <td>No DocBlock was found for Method errLink</td> </tr> </table></div> <h3><a href="#">CamelSpider/Entity/Subscription.php<small>2</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Entity/Subscription.php</td> </tr> <tr> <td>error</td> <td>5</td> <td>No DocBlock was found for Class Subscription</td> </tr> </table></div> <h3><a href="#">CamelSpider/Spider/AbstractCache.php<small>19</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Spider/AbstractCache.php</td> </tr> <tr> <td>error</td> <td>20</td> <td>No DocBlock was found for Class AbstractCache</td> </tr> <tr> <td>error</td> <td>22</td> <td>No DocBlock was found for Property $name</td> </tr> <tr> <td>error</td> <td>23</td> <td>No DocBlock was found for Property $cache_dir</td> </tr> <tr> <td>error</td> <td>24</td> <td>No DocBlock was found for Property $cache</td> </tr> <tr> <td>error</td> <td>26</td> <td>No DocBlock was found for Method checkDir</td> </tr> <tr> <td>error</td> <td>34</td> <td>No DocBlock was found for Method mkdir</td> </tr> <tr> <td>notice</td> <td>55</td> <td>Argument $dir is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>68</td> <td>No DocBlock was found for Method clean</td> </tr> <tr> <td>error</td> <td>74</td> <td>No DocBlock was found for Method save</td> </tr> <tr> <td>error</td> <td>85</td> <td>No DocBlock was found for Method loadObject</td> </tr> <tr> <td>error</td> <td>90</td> <td>No DocBlock was found for Method getObject</td> </tr> <tr> <td>error</td> <td>96</td> <td>No DocBlock was found for Method isObject</td> </tr> <tr> <td>error</td> <td>111</td> <td>No DocBlock was found for Method getFileRandomPath</td> </tr> <tr> <td>critical</td> <td>124</td> <td>No short description for method saveDomToHtmlFile</td> </tr> <tr> <td>notice</td> <td>127</td> <td>Argument $e is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>127</td> <td>Argument $slug is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>134</td> <td>No DocBlock was found for Method saveToHtmlFile</td> </tr> <tr> <td>error</td> <td>141</td> <td>No DocBlock was found for Method saveDomToTxtFile</td> </tr> </table></div> <h3><a href="#">CamelSpider/Spider/AbstractLauncher.php<small>7</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Spider/AbstractLauncher.php</td> </tr> <tr> <td>error</td> <td>25</td> <td>No DocBlock was found for Property $name</td> </tr> <tr> <td>error</td> <td>27</td> <td>No DocBlock was found for Property $indexer</td> </tr> <tr> <td>error</td> <td>29</td> <td>No DocBlock was found for Method __construct</td> </tr> <tr> <td>error</td> <td>35</td> <td>No DocBlock was found for Method getSampleSubscriptions</td> </tr> <tr> <td>error</td> <td>45</td> <td>No DocBlock was found for Method doSave</td> </tr> <tr> <td>error</td> <td>60</td> <td>No DocBlock was found for Method run</td> </tr> </table></div> <h3><a href="#">CamelSpider/Spider/AbstractSpider.php<small>48</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Spider/AbstractSpider.php</td> </tr> <tr> <td>error</td> <td>9</td> <td>No DocBlock was found for Class AbstractSpider</td> </tr> <tr> <td>error</td> <td>11</td> <td>No DocBlock was found for Property $name</td> </tr> <tr> <td>error</td> <td>13</td> <td>No DocBlock was found for Property $time</td> </tr> <tr> <td>error</td> <td>15</td> <td>No DocBlock was found for Property $pool</td> </tr> <tr> <td>error</td> <td>17</td> <td>No DocBlock was found for Property $hiperlinks</td> </tr> <tr> <td>error</td> <td>19</td> <td>No DocBlock was found for Property $requests</td> </tr> <tr> <td>error</td> <td>21</td> <td>No DocBlock was found for Property $cached</td> </tr> <tr> <td>error</td> <td>23</td> <td>No DocBlock was found for Property $errors</td> </tr> <tr> <td>error</td> <td>25</td> <td>No DocBlock was found for Property $success</td> </tr> <tr> <td>error</td> <td>27</td> <td>No DocBlock was found for Property $subscription</td> </tr> <tr> <td>error</td> <td>29</td> <td>No DocBlock was found for Property $timeParcial</td> </tr> <tr> <td>error</td> <td>31</td> <td>No DocBlock was found for Property $goutte</td> </tr> <tr> <td>error</td> <td>33</td> <td>No DocBlock was found for Property $limitReached</td> </tr> <tr> <td>error</td> <td>35</td> <td>No DocBlock was found for Property $backendLogger</td> </tr> <tr> <td>error</td> <td>37</td> <td>No DocBlock was found for Property $logger_level</td> </tr> <tr> <td>notice</td> <td>42</td> <td>Argument $URI is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>42</td> <td>Argument $mode is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>42</td> <td>Argument $type is missing from the function Docblock</td> </tr> <tr> <td>critical</td> <td>86</td> <td>No short description for method getResponseErrorMessage</td> </tr> <tr> <td>notice</td> <td>89</td> <td>Argument $client is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>94</td> <td>No DocBlock was found for Method addBackendLogger</td> </tr> <tr> <td>error</td> <td>100</td> <td>No DocBlock was found for Method getBackendLogger</td> </tr> <tr> <td>error</td> <td>105</td> <td>No DocBlock was found for Method resetBackendLogger</td> </tr> <tr> <td>error</td> <td>110</td> <td>No DocBlock was found for Method getCurrentUri</td> </tr> <tr> <td>error</td> <td>115</td> <td>No DocBlock was found for Method getClient</td> </tr> <tr> <td>error</td> <td>120</td> <td>No DocBlock was found for Method getBodyText</td> </tr> <tr> <td>error</td> <td>125</td> <td>No DocBlock was found for Method getBody</td> </tr> <tr> <td>error</td> <td>130</td> <td>No DocBlock was found for Method getRequest</td> </tr> <tr> <td>error</td> <td>135</td> <td>No DocBlock was found for Method getResponse</td> </tr> <tr> <td>error</td> <td>140</td> <td>No DocBlock was found for Method getSubscription</td> </tr> <tr> <td>error</td> <td>145</td> <td>No DocBlock was found for Method getDomain</td> </tr> <tr> <td>error</td> <td>150</td> <td>No DocBlock was found for Method getLinkTags</td> </tr> <tr> <td>error</td> <td>159</td> <td>No DocBlock was found for Method getResumeTemplate</td> </tr> <tr> <td>error</td> <td>206</td> <td>No DocBlock was found for Method debug</td> </tr> <tr> <td>error</td> <td>214</td> <td>No DocBlock was found for Method getCookies</td> </tr> <tr> <td>error</td> <td>219</td> <td>No DocBlock was found for Method getCookie</td> </tr> <tr> <td>error</td> <td>226</td> <td>No DocBlock was found for Method performLogin</td> </tr> <tr> <td>error</td> <td>253</td> <td>No DocBlock was found for Method loginFormRequirements</td> </tr> <tr> <td>critical</td> <td>258</td> <td>No short description for method loginFormLocate</td> </tr> <tr> <td>notice</td> <td>261</td> <td>Argument $crawler is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>261</td> <td>Argument $credentials is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>282</td> <td>Argument $crawler is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>282</td> <td>Argument $credentials is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>434</td> <td>No DocBlock was found for Method start</td> </tr> <tr> <td>critical</td> <td>450</td> <td>No short description for method getTimeUsage</td> </tr> <tr> <td>notice</td> <td>453</td> <td>Argument $type is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>494</td> <td>No DocBlock was found for Method setTime</td> </tr> </table></div> <h3><a href="#">CamelSpider/Spider/DocumentManager.php<small>4</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Spider/DocumentManager.php</td> </tr> <tr> <td>notice</td> <td>21</td> <td>Argument $body is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>21</td> <td>Argument $link is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>22</td> <td>Argument $subscription is missing from the function Docblock</td> </tr> </table></div> <h3><a href="#">CamelSpider/Spider/FeedReader.php<small>9</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Spider/FeedReader.php</td> </tr> <tr> <td>error</td> <td>32</td> <td>No DocBlock was found for Property $name</td> </tr> <tr> <td>error</td> <td>33</td> <td>No DocBlock was found for Property $feed</td> </tr> <tr> <td>error</td> <td>34</td> <td>No DocBlock was found for Property $uri</td> </tr> <tr> <td>error</td> <td>35</td> <td>No DocBlock was found for Property $logger_level</td> </tr> <tr> <td>error</td> <td>37</td> <td>No DocBlock was found for Method __construct</td> </tr> <tr> <td>error</td> <td>46</td> <td>No DocBlock was found for Method request</td> </tr> <tr> <td>error</td> <td>55</td> <td>No DocBlock was found for Method import</td> </tr> <tr> <td>error</td> <td>70</td> <td>No DocBlock was found for Method getLinks</td> </tr> </table></div> <h3><a href="#">CamelSpider/Spider/Indexer.php<small>13</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Spider/Indexer.php</td> </tr> <tr> <td>error</td> <td>30</td> <td>No DocBlock was found for Property $name</td> </tr> <tr> <td>critical</td> <td>32</td> <td>No short description for method __construct</td> </tr> <tr> <td>error</td> <td>53</td> <td>No DocBlock was found for Method isDone</td> </tr> <tr> <td>error</td> <td>60</td> <td>No DocBlock was found for Method addLink</td> </tr> <tr> <td>error</td> <td>95</td> <td>No DocBlock was found for Method collect</td> </tr> <tr> <td>notice</td> <td>198</td> <td>Argument $obj is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>198</td> <td>Argument $mode is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>222</td> <td>Argument $reader is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>239</td> <td>Argument $crawler is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>268</td> <td>No DocBlock was found for Method poolCollect</td> </tr> <tr> <td>error</td> <td>304</td> <td>No DocBlock was found for Method getCapture</td> </tr> <tr> <td>notice</td> <td>315</td> <td>Argument $subscription is missing from the function Docblock</td> </tr> </table></div> <h3><a href="#">CamelSpider/Spider/InterfaceCache.php<small>5</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Spider/InterfaceCache.php</td> </tr> <tr> <td>error</td> <td>18</td> <td>No DocBlock was found for Interface InterfaceCache</td> </tr> <tr> <td>error</td> <td>21</td> <td>No DocBlock was found for Method save</td> </tr> <tr> <td>error</td> <td>22</td> <td>No DocBlock was found for Method getObject</td> </tr> <tr> <td>error</td> <td>23</td> <td>No DocBlock was found for Method isObject</td> </tr> </table></div> <h3><a href="#">CamelSpider/Spider/InterfaceFeedReader.php<small>4</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Spider/InterfaceFeedReader.php</td> </tr> <tr> <td>error</td> <td>5</td> <td>No DocBlock was found for Interface InterfaceFeedReader</td> </tr> <tr> <td>error</td> <td>7</td> <td>No DocBlock was found for Method import</td> </tr> <tr> <td>error</td> <td>8</td> <td>No DocBlock was found for Method request</td> </tr> </table></div> <h3><a href="#">CamelSpider/Spider/SpiderAsserts.php<small>5</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Spider/SpiderAsserts.php</td> </tr> <tr> <td>error</td> <td>9</td> <td>No DocBlock was found for Class SpiderAsserts</td> </tr> <tr> <td>error</td> <td>12</td> <td>No DocBlock was found for Method containKeywords</td> </tr> <tr> <td>error</td> <td>26</td> <td>No DocBlock was found for Method isDocumentHref</td> </tr> <tr> <td>error</td> <td>53</td> <td>No DocBlock was found for Method isDocumentLink</td> </tr> </table></div> <h3><a href="#">CamelSpider/Spider/SpiderDom.php<small>26</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Spider/SpiderDom.php</td> </tr> <tr> <td>error</td> <td>17</td> <td>No DocBlock was found for Constant rootTag</td> </tr> <tr> <td>error</td> <td>19</td> <td>No DocBlock was found for Property $stripedTags</td> </tr> <tr> <td>notice</td> <td>42</td> <td>Argument $node is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>62</td> <td>No DocBlock was found for Method getGreater</td> </tr> <tr> <td>critical</td> <td>74</td> <td>No short description for method oldToHtml</td> </tr> <tr> <td>notice</td> <td>77</td> <td>Argument $node is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>87</td> <td>Argument $node is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>97</td> <td>Argument $doc is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>114</td> <td>No DocBlock was found for Method normalizeDocument</td> </tr> <tr> <td>error</td> <td>130</td> <td>No DocBlock was found for Method removeChild</td> </tr> <tr> <td>error</td> <td>150</td> <td>No DocBlock was found for Method toCleanHtml</td> </tr> <tr> <td>notice</td> <td>163</td> <td>Argument $html is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>170</td> <td>No DocBlock was found for Method htmlToIntro</td> </tr> <tr> <td>error</td> <td>182</td> <td>No DocBlock was found for Method strip_tags</td> </tr> <tr> <td>error</td> <td>251</td> <td>No DocBlock was found for Method removeTag</td> </tr> <tr> <td>error</td> <td>263</td> <td>No DocBlock was found for Method removeTrashBlock</td> </tr> <tr> <td>notice</td> <td>275</td> <td>Argument $html is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>298</td> <td>Argument $node is missing from the function Docblock</td> </tr> <tr> <td>notice</td> <td>298</td> <td>Argument $mode is missing from the function Docblock</td> </tr> <tr> <td>error</td> <td>309</td> <td>No DocBlock was found for Method normalizeDomNode</td> </tr> <tr> <td>error</td> <td>335</td> <td>No DocBlock was found for Method substr_count</td> </tr> <tr> <td>error</td> <td>340</td> <td>No DocBlock was found for Method saveDomToHtmlFile</td> </tr> <tr> <td>error</td> <td>344</td> <td>No DocBlock was found for Method saveHtmlToFile</td> </tr> <tr> <td>error</td> <td>348</td> <td>No DocBlock was found for Method saveTxtToFile</td> </tr> <tr> <td>error</td> <td>354</td> <td>No DocBlock was found for Method countInnerTags</td> </tr> </table></div> <h3><a href="#">CamelSpider/Spider/SpiderTxt.php<small>2</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Spider/SpiderTxt.php</td> </tr> <tr> <td>error</td> <td>13</td> <td>No DocBlock was found for Method diffPercentage</td> </tr> </table></div> <h3><a href="#">CamelSpider/Tools/IdeiasLang.php<small>2</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Tools/IdeiasLang.php</td> </tr> <tr> <td>critical</td> <td>5</td> <td>No short description for class IdeiasLang</td> </tr> </table></div> <h3><a href="#">CamelSpider/Tools/Urlizer.php<small>1</small></a></h3> <div><table> <tr> <th>Type</th> <th>Line</th> <th>Description</th> </tr> <tr> <td>error</td> <td>1</td> <td>No DocBlock was found for File CamelSpider/Tools/Urlizer.php</td> </tr> </table></div> </div> </div></body></html>
gpupo/CamelSpider
doc/report_parse_markers.html
HTML
mit
28,943
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os.path import string import TestSCons _python_ = TestSCons._python_ test = TestSCons.TestSCons() test.subdir('subdir', 'sub2') test.write('build.py', r""" import sys contents = open(sys.argv[2], 'rb').read() + open(sys.argv[3], 'rb').read() file = open(sys.argv[1], 'wb') file.write(contents) file.close() """) test.write('SConstruct', """ Foo = Builder(action = r'%(_python_)s build.py $TARGET $SOURCES subdir/foo.dep') Bar = Builder(action = r'%(_python_)s build.py $TARGET $SOURCES subdir/bar.dep') env = Environment(BUILDERS = { 'Foo' : Foo, 'Bar' : Bar }, SUBDIR='subdir') env.ParseDepends('foo.d') env.ParseDepends('bar.d') env.Foo(target = 'f1.out', source = 'f1.in') env.Foo(target = 'f2.out', source = 'f2.in') env.Bar(target = 'subdir/f3.out', source = 'f3.in') SConscript('subdir/SConscript', "env") env.Foo(target = 'f5.out', source = 'f5.in') env.Bar(target = 'sub2/f6.out', source = 'f6.in') """ % locals()) test.write('foo.d', "f1.out f2.out: %s\n" % os.path.join('subdir', 'foo.dep')) test.write('bar.d', "%s: %s\nf5.out: sub2" % (os.path.join('subdir', 'f3.out'), os.path.join('subdir', 'bar.dep'))) test.write(['subdir', 'SConscript'], """ Import("env") ParseDepends('bar.d') env.Bar(target = 'f4.out', source = 'f4.in') """) test.write(['subdir', 'bar.d'], "f4.out: bar.dep\n") test.write('f1.in', "f1.in\n") test.write('f2.in', "f2.in\n") test.write('f3.in', "f3.in\n") test.write(['subdir', 'f4.in'], "subdir/f4.in\n") test.write('f5.in', "f5.in\n") test.write('f6.in', "f6.in\n") test.write(['subdir', 'foo.dep'], "subdir/foo.dep 1\n") test.write(['subdir', 'bar.dep'], "subdir/bar.dep 1\n") test.run(arguments = '.') test.must_match('f1.out', "f1.in\nsubdir/foo.dep 1\n") test.must_match('f2.out', "f2.in\nsubdir/foo.dep 1\n") test.must_match(['subdir', 'f3.out'], "f3.in\nsubdir/bar.dep 1\n") test.must_match(['subdir', 'f4.out'], "subdir/f4.in\nsubdir/bar.dep 1\n") test.must_match('f5.out', "f5.in\nsubdir/foo.dep 1\n") test.must_match(['sub2', 'f6.out'], "f6.in\nsubdir/bar.dep 1\n") # test.write(['subdir', 'foo.dep'], "subdir/foo.dep 2\n") test.write(['subdir', 'bar.dep'], "subdir/bar.dep 2\n") test.write('f6.in', "f6.in 2\n") test.run(arguments = '.') test.must_match('f1.out', "f1.in\nsubdir/foo.dep 2\n") test.must_match('f2.out', "f2.in\nsubdir/foo.dep 2\n") test.must_match(['subdir', 'f3.out'], "f3.in\nsubdir/bar.dep 2\n") test.must_match(['subdir', 'f4.out'], "subdir/f4.in\nsubdir/bar.dep 2\n") test.must_match('f5.out', "f5.in\nsubdir/foo.dep 2\n") test.must_match(['sub2', 'f6.out'], "f6.in 2\nsubdir/bar.dep 2\n") # test.write(['subdir', 'foo.dep'], "subdir/foo.dep 3\n") test.run(arguments = '.') test.must_match('f1.out', "f1.in\nsubdir/foo.dep 3\n") test.must_match('f2.out', "f2.in\nsubdir/foo.dep 3\n") test.must_match(['subdir', 'f3.out'], "f3.in\nsubdir/bar.dep 2\n") test.must_match(['subdir', 'f4.out'], "subdir/f4.in\nsubdir/bar.dep 2\n") test.must_match('f5.out', "f5.in\nsubdir/foo.dep 2\n") test.must_match(['sub2', 'f6.out'], "f6.in 2\nsubdir/bar.dep 2\n") # test.write(['subdir', 'bar.dep'], "subdir/bar.dep 3\n") test.run(arguments = '.') test.must_match('f1.out', "f1.in\nsubdir/foo.dep 3\n") test.must_match('f2.out', "f2.in\nsubdir/foo.dep 3\n") test.must_match(['subdir', 'f3.out'], "f3.in\nsubdir/bar.dep 3\n") test.must_match(['subdir', 'f4.out'], "subdir/f4.in\nsubdir/bar.dep 3\n") test.must_match('f5.out', "f5.in\nsubdir/foo.dep 2\n") test.must_match(['sub2', 'f6.out'], "f6.in 2\nsubdir/bar.dep 2\n") # test.write('f6.in', "f6.in 3\n") test.run(arguments = '.') test.must_match('f1.out', "f1.in\nsubdir/foo.dep 3\n") test.must_match('f2.out', "f2.in\nsubdir/foo.dep 3\n") test.must_match(['subdir', 'f3.out'], "f3.in\nsubdir/bar.dep 3\n") test.must_match(['subdir', 'f4.out'], "subdir/f4.in\nsubdir/bar.dep 3\n") test.must_match('f5.out', "f5.in\nsubdir/foo.dep 3\n") test.must_match(['sub2', 'f6.out'], "f6.in 3\nsubdir/bar.dep 3\n") test.write('SConstruct', """ ParseDepends('nonexistent_file') """) test.run() test.write('SConstruct', """ ParseDepends('nonexistent_file', must_exist=1) """) test.run(status=2, stderr=None) test.fail_test(string.find(test.stderr(), "No such file or directory") == -1) test.pass_test()
datalogics/scons
test/ParseDepends.py
Python
mit
5,431
export * from './navbar.component'
wootencl/carterwooten_site_v3
app/client-app/+navbar/index.js
JavaScript
mit
34
The toh-4 is a refactoring of toh-3. The app component is simplified, factoring out the `HeroService`. Given that toh-4 is a refactoring, the toh-2 `app_test`s run, without change. Changes/new features: - Test a component requiring a service, that is _not_ replaced by a mock service. In this particular case, we don't need to create a mock `HeroService` since it is already a mock service. No extra steps are needed; DI injects an instance of `HeroService` as specified by the app component `providers` list.
googlearchive/toh-4
test/README.md
Markdown
mit
514
#include "kadimus_socket.h" int valid_ip_hostname(const char *hostname){ struct addrinfo *servinfo, hints; int rv; memset(&hints, 0, sizeof hints); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags |= AI_CANONNAME; if( (rv = getaddrinfo(hostname, NULL, &hints, &servinfo)) != 0){ fprintf(stderr, "[-] getaddrinfo(%s) : %s\n", hostname, gai_strerror(rv)); exit(1); } freeaddrinfo(servinfo); return 1; } int kadimus_connect(const char *hostname, unsigned short port, char **ip){ struct addrinfo hints, *servinfo, *i; int status = 0, sockfd = 0; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags |= AI_CANONNAME; if( (status = getaddrinfo(hostname, NULL, &hints, &servinfo)) != 0){ fprintf(stderr, "[-] getaddrinfo: %s\n", gai_strerror(status)); exit(1); } for(i=servinfo; i != NULL; i = i->ai_next){ if((sockfd = socket(i->ai_family, i->ai_socktype, i->ai_protocol)) == -1) continue; ((struct sockaddr_in *)i->ai_addr)->sin_port = htons(port); if( connect(sockfd, i->ai_addr, i->ai_addrlen) == -1){ close(sockfd); continue; } break; } if(i){ if(ip != NULL){ if(i->ai_family == AF_INET){ *ip = xmalloc(INET_ADDRSTRLEN); inet_ntop(AF_INET, &((struct sockaddr_in *)(i->ai_addr))->sin_addr, *ip, INET_ADDRSTRLEN); } else if(i->ai_family == AF_INET6){ *ip = xmalloc(INET6_ADDRSTRLEN); inet_ntop(AF_INET6, &((struct sockaddr_in6 *)(i->ai_addr))->sin6_addr, *ip, INET6_ADDRSTRLEN); } } freeaddrinfo(servinfo); } else { freeaddrinfo(servinfo); return -1; } return sockfd; } void start_listen(int *sock_fd, int port){ struct sockaddr_in server_addr; int optval = 1; if( (*sock_fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) die("socket() error",1); server_addr.sin_family = AF_INET; server_addr.sin_port = htons(port); server_addr.sin_addr.s_addr = INADDR_ANY; bzero(&(server_addr.sin_zero), 8); if(setsockopt(*sock_fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof optval) == -1) die("setsockopt() error",1); if(bind(*sock_fd, (struct sockaddr *)&server_addr, sizeof(struct sockaddr)) == -1) die("bind() error",1); if(listen(*sock_fd,1) == -1) die("listen() error",1); } void reverse_shell(int port){ int sock, i, ret, sock_con = 0; struct sockaddr cli_addr; struct pollfd pfds[2]; struct timeval timeout; char ip_connection[INET6_ADDRSTRLEN] = {0}; char buf[1024]; fd_set fd; socklen_t sockaddr_len = sizeof(struct sockaddr_in); start_listen(&sock, port); FD_ZERO(&fd); FD_SET(sock, &fd); printf("Listen in background, port: %d, pid: %lld\nWaiting connection ...\n", port, (long long int) getpid()); timeout.tv_sec = LISTEN_TIMEOUT; timeout.tv_usec = 0; ret = select(sock+1, &fd, NULL, NULL, &timeout); if(ret == -1) die("select() error",1); else if(!ret){ printf("Connection timeout %d !!!\n",LISTEN_TIMEOUT); exit(0); } if( (sock_con = accept(sock, (struct sockaddr *) &cli_addr, &sockaddr_len)) == -1 ) die("accept() error",1); if(cli_addr.sa_family == AF_INET){ inet_ntop(AF_INET, &((struct sockaddr_in *)&cli_addr)->sin_addr, ip_connection, INET_ADDRSTRLEN); } else if(cli_addr.sa_family == AF_INET6){ inet_ntop(AF_INET6, &(((struct sockaddr_in6 *)&cli_addr)->sin6_addr), ip_connection, INET6_ADDRSTRLEN); } else { strcpy(ip_connection, "unknow"); } printf("Connection from: %s\n\n", ip_connection); pfds[1].fd = 0; pfds[1].events = POLLIN; pfds[0].fd = sock_con; pfds[0].events = POLLIN; while(1){ poll(pfds, 2, -1); if(pfds[1].revents & POLLIN){ i = read(0, buf, 1023); if(!i) break; write(sock_con, buf, i); } if(pfds[0].revents & POLLIN){ i = read(sock_con, buf, 1023); if(!i) break; write(1, buf, i); } } exit(0); } int socks5_connection(int proxyfd, const char *host, unsigned short port){ char hello[]={ 0x5, 0x1, 0x0 }; char step_two[256]={ 0x5, 0x1, 0x0, 0x1 }; char recvbuffer[256]; struct sockaddr_in addr; struct hostent *hostx; if( (hostx = gethostbyname(host)) == NULL) return SOCKS_GETHOST_ERROR; if( send(proxyfd, hello, sizeof(hello), 0) != sizeof(hello) ) return SOCKS_SEND_ERROR; if( recv(proxyfd, recvbuffer, 256, 0) < 2 ) return SOCKS_RECV_ERROR; if(recvbuffer[0] != 5) return SOCKS_VERSION_ERROR; if(recvbuffer[1] != 0) return SOCKS_AUTH_REQUIRED; addr.sin_port = htons( port ); addr.sin_addr = *((struct in_addr *)hostx->h_addr); memcpy(step_two + 4, &addr.sin_addr.s_addr, 4); memcpy(step_two + 8, &addr.sin_port, 2); if( send(proxyfd, step_two, 10, 0) != 10 ) return SOCKS_SEND_ERROR; memset(recvbuffer, 0x0, 256); if( recv(proxyfd, recvbuffer, 10, 0) < 4 ) return SOCKS_RECV_ERROR; if(recvbuffer[0] != 5) return SOCKS_VERSION_ERROR; if(recvbuffer[1] != 0) return SOCKS_CON_ERROR; if(recvbuffer[3] != 1) return SOCKS_CON_ERROR; return SOCKS_SUCCESS; } const char *socks5_str_error(int status){ static const char *errors[]= { "error while send data", "error whilte receveid data", "uncompatible socks version", "auth required", "connection to target failed", "gethostbyname() error" }; if( status < 0 || status > SOCKS_TOTAL) return NULL; return errors[status-1]; } void bind_shell(const char *con, int port, const char *proxy, int proxy_port){ struct pollfd pfds[2]; int sockfd, i, status; char buf[1024], *ip; if( proxy != NULL && proxy_port != 0 ){ printf("[~] Trying connect to proxy server %s:%d\n", proxy, proxy_port); if( (sockfd = kadimus_connect(proxy, (unsigned short)proxy_port, &ip)) == -1){ die("connect() error",1); } printf("[~] Connected to proxy server !!!\n"); printf("[~] IP: %s\n", ip); printf("[~] Trying connect to target\n"); if( (status = socks5_connection(sockfd, con, (unsigned short)port)) != SOCKS_SUCCESS ){ fprintf(stderr, "[-] socks5 connection error: %s\n\n", socks5_str_error(status)); close(sockfd); exit(1); } printf("[~] Successfully connect to the target\n\n"); } else { printf("[~] Trying connect to %s:%d\n", con, port); if( (sockfd = kadimus_connect(con, (unsigned short)port, &ip)) == -1){ die("connect() error", 1); } printf("[~] Connected !!!\n"); printf("[~] IP: %s\n\n", ip); } pfds[1].fd = 0; pfds[1].events = POLLIN; pfds[0].fd = sockfd; pfds[0].events = POLLIN; while(1){ poll(pfds, 2, -1); if(pfds[1].revents & POLLIN){ i = read(0, buf, 1023); if(!i) break; write(sockfd, buf, i); } if(pfds[0].revents & POLLIN){ i = read(sockfd, buf, 1023); if(!i) break; write(1, buf, i); } } close(sockfd); xfree(ip); }
Yas3r/Kadimus
src/kadimus_socket.c
C
mit
6,681
.header-type-7 #top .pattern > .container { padding-top: 1px;padding-bottom: 26px; } @media (min-width: 1098px) { .header-type-7 #top .search_form { width: 352px !important;max-width: 352px; } } @media (max-width: 767px) { .responsive #top .search_form { margin-top: 15px; } } .body-white-type-2 #mfilter-content-container { margin-top: 30px; } .megamenu-type-28 .megamenu-background .vertical .megamenuToogle-wrapper .megamenuToogle-pattern, .megamenu-background .vertical .megamenuToogle-wrapper .container { background-image: none !important; }
monkdaf/skuter77-opencart
catalog/view/theme/fastor/skins/store_default/Computer7/css/custom_code.css
CSS
mit
555
<?php namespace Bistro\Session; /** * Interface for all session storage engines. * * @package Bistro */ interface Session { /** * @return boolean Has the session been started yet? */ public function isStarted(); /** * @return string The session id */ public function getId(); /** * @param string $id The session id * @return \Bistro\Session $this */ public function setId($id); /** * Checks to see if a session property exists. * * @param string $key The session key * @return boolean */ public function has($key); /** * Gets a session variable by key. * * @param string $key The session key * @param mixed $default The default value if one isn't found * @return mixed The found value */ public function get($key, $default = null); /** * Gets a key from the session and removes it immediately. * Useful in saving messages. * * @param string $key The key to get * @param mixed $default The default value * @return mixed The found value */ public function getOnce($key, $default = null); /** * Gets all of the session data * * @return array The session data */ public function toArray(); /** * Sets a session variable. * * @param string $key The session key * @param mixed $value The value to set * @return \Bistro\Session $this */ public function set($key, $value); /** * Removes a session key. * * @param string $key The session key to delete * @return \Bistro\Session $this */ public function delete($key); /** * Clears out the session data. * * @return \Bistro\Session $this */ public function clear(); /** * Regererates the session id. * * @return boolean */ public function regenerate(); /** * Restarts the current session. * * @return boolean Success */ public function restart(); /** * Destroys the current session. * * @return boolean Success */ public function destroy(); /** * Reads data from the storage engine. * * @param array $data Initial data * @return \Bistro\Session $this */ public function read(array $data = null); /** * Writes the session data. * * @return \Bistro\Session $this */ public function write(); /** * Closes the session. * * @return \Bistro\Session $this */ public function close(); }
FernandoBatels/blitz-framework
src/vendor/libs/bistro/Session.php
PHP
mit
2,402
<!DOCTYPE html> <html lang="en"> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- jQuery --> <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script> <!-- bootstrap --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> <!-- Firebase --> <script src="https://cdn.firebase.com/js/client/2.2.1/firebase.js"></script> <link rel="stylesheet" href="assets/screen.css"> <script> $('document').ready(function () { // Firebase var gameRef = new Firebase("https://<your-firebase>.firebaseio.com/game"); var playersRef = new Firebase("https://<your-firebase>.firebaseio.com/players"); // Constants // ms between game steps var GAME_STEP_SPEED = 200; // Number of features across the game field var LOGICAL_GAME_SIZE = 100; // Player's client spawns a new apple every this many ms var APPLE_INTERVAL_MS = 5000; // Count down to next apple var untilNextApple = APPLE_INTERVAL_MS; var currentUserUid; var cachedAuthData; var playersState = []; var gameState = {apples: []}; // Listen for changes to all players (including mine) playersRef.on("value", function (snapshot) { playersState = snapshot.val(); }); // Listen for changes to the shared game state gameRef.on("value", function (snapshot) { // only load non-null games. if (snapshot.val() != null) { gameState = snapshot.val(); } }); // Listen for added or removed players (for currently playing list) playersRef.on("child_added", function (snapshot) { var player = snapshot.val(); var uid = snapshot.key(); // Update currently playing list var newPlayerHtml = ""; // Sanitize to prevent XSS var sanitizedUid = $("#hiddencruft").text(uid).html(); var sanitizedImageUrl = $("#hiddencruft").text(player.imageUrl).html(); var sanitizedDisplayName = $("#hiddencruft").text(player.displayName).html(); newPlayerHtml += "<li class='player' id='player" + sanitizedUid.replace(":", "-") + "' style='background-color: hsla(" + getPlayerHue(sanitizedUid) + ", 80%, 50%, 1)'>" + "<img src='" + sanitizedImageUrl + "'/>" + sanitizedDisplayName + "</li>"; $("#currently-playing").append(newPlayerHtml); }); // Listen for added or removed players (for currently playing list) playersRef.on("child_removed", function (snapshot) { var uid = snapshot.key(); var currentlyPlayingId = "player" + uid.replace(":", "-"); // Update currently playing list $("#" + currentlyPlayingId).remove(); }); // Login click handler $("#login-button").click(function () { playersRef.authWithOAuthPopup("google", function (error, authData) { if (error) { console.log("Login Failed!", error); } else { console.log("Authenticated successfully with payload:", authData); } }); }); playersRef.onAuth(function (authData) { if (authData) { console.log("Authenticated with uid:", authData.uid); createNewPlayer(authData); // Set which player is the current player currentUserUid = authData.uid; cachedAuthData = authData; $("#login-container").hide(); } else { console.log("Client unauthenticated."); $("#login-container").show(); } }); $("#play-again").click(function () { $("#score-alert").hide(); createNewPlayer(cachedAuthData); }); function createNewPlayer(authData) { var playerState = { displayName: authData.google.displayName, imageUrl: authData.google.cachedUserProfile.picture, snakeDirection: "e", snakePieces: [] }; playerState.snakePieces.push(getRandomUnusedLocation()); growSnake(playerState); growSnake(playerState); // Save the player playersRef.child(authData.uid).set(playerState); // Remove this player on disconnect playersRef.child(authData.uid).onDisconnect().remove(); } // Listen for keystrokes var lastKeystroke; $('html').keydown(function (e) { lastKeystroke = e.which; }); // start the game gameLoop(); function gameLoop() { var $gameCanvas = $("#game-canvas"); var gameContext = $gameCanvas.get(0).getContext("2d"); var canvasSize = $gameCanvas.width(); var featureSize = canvasSize / LOGICAL_GAME_SIZE; var playerState = null; if (playersState != null) { playerState = playersState[currentUserUid]; } if (playerState != null && playerState.snakePieces != null) { // process key input switch (lastKeystroke) { case 38: if (playerState.snakeDirection != "s") { playerState.snakeDirection = "n"; } break; case 39: if (playerState.snakeDirection != "w") { playerState.snakeDirection = "e"; } break; case 40: if (playerState.snakeDirection != "n") { playerState.snakeDirection = "s"; } break; case 37: if (playerState.snakeDirection != "e") { playerState.snakeDirection = "w"; } } lastKeystroke = 0; // Move the player's snake // Remove last element playerState.snakePieces.pop(); // Create a new first element in the leading direction var newPiece = {}; newPiece.x = playerState.snakePieces[0].x; newPiece.y = playerState.snakePieces[0].y; switch (playerState.snakeDirection) { case "n": newPiece.y -= 1; break; case "e": newPiece.x += 1; break; case "s": newPiece.y += 1; break; case "w": newPiece.x -= 1; } playerState.snakePieces.unshift(newPiece); playersRef.child(currentUserUid).set(playerState); // Spawn apples if (untilNextApple > 0) { untilNextApple -= GAME_STEP_SPEED; } else { gameRef.child("apples").push(getRandomUnusedLocation()); untilNextApple = APPLE_INTERVAL_MS; } // Get the current player's head to do collision maths var snakeHead = playerState.snakePieces[0]; // If the player went off the edge, end their game if (snakeHead.x <= 0 || snakeHead.x >= LOGICAL_GAME_SIZE || snakeHead.y <= 0 || snakeHead.y >= LOGICAL_GAME_SIZE) { playerDies(playerState); } // If the player collides with self, end their game // skip own snakes head for (var i = 1; i < playerState.snakePieces.length; i++) { var snakePiece = playerState.snakePieces[i]; if (snakePiece.x === snakeHead.x && snakePiece.y === snakeHead.y) { playerDies(playerState); } } // If player collides with any other snake, end their game for (var playerUid in playersState) { // Skip current player (it already got special treatment) if (playerUid == currentUserUid) { break; } var otherPlayer = playersState[playerUid]; // Skip dead players if (otherPlayer.snakePieces == null) { break; } for (var i = 0; i < otherPlayer.snakePieces.length; i++) { var snakePiece = otherPlayer.snakePieces[i]; if (snakePiece.x === snakeHead.x && snakePiece.y === snakeHead.y) { playerDies(playerState); } } } // check for apple collisions for (var i in gameState.apples) { var apple = gameState.apples[i]; if (apple.x === snakeHead.x && apple.y === snakeHead.y) { gameRef.child("apples").child(i).remove(); growSnake(playerState); playersRef.child(currentUserUid).set(playerState); } } } // Stop draws gameContext.save(); // Clear the field by painting black gameContext.fillStyle = "#000"; gameContext.fillRect(0, 0, canvasSize, canvasSize); // Draw snakes for (var playerUid in playersState) { var player = playersState[playerUid]; for (var i in player.snakePieces) { var snakePiece = player.snakePieces[i]; gameContext.fillStyle = "hsla(" + getPlayerHue(playerUid) + ", 80%, 50%, 1)"; gameContext.fillRect(snakePiece.x * featureSize, snakePiece.y * featureSize, featureSize, featureSize); } } // Draw apples for (var i in gameState.apples) { var apple = gameState.apples[i]; gameContext.fillStyle = "#F00"; gameContext.fillRect(apple.x * featureSize, apple.y * featureSize, featureSize, featureSize); } // Allow draw gameContext.restore(); setTimeout(gameLoop, GAME_STEP_SPEED); function playerDies(playerState) { var score = Object.keys(playerState.snakePieces).length; // Remove the current player playersRef.child(currentUserUid).remove(); // Display the score and the play again button $("#score").text(score); $("#score-alert").show(200); } } /** * Gets a random location that is at least 3 squares from any existing stuff */ function getRandomUnusedLocation() { var MIN_SPACE = 3; var randomLocation = {}; do { randomLocation.x = Math.floor(Math.random() * LOGICAL_GAME_SIZE); randomLocation.y = Math.floor(Math.random() * LOGICAL_GAME_SIZE); var collision = false; // Check existing game pieces var gamePieces = []; for (var i in gameState.apples) { gamePieces.push(gameState.apples[i]); } for (var i in playersState) { var playerState = playersState[i]; gamePieces = gamePieces.concat(playerState.snakePieces); } for (var i in gamePieces) { var gamePiece = gamePieces[i]; if (gamePiece != undefined && gamePiece.x - MIN_SPACE <= randomLocation.x && gamePiece.x + MIN_SPACE >= randomLocation.x && gamePiece.y - MIN_SPACE <= randomLocation.y && gamePiece.y + MIN_SPACE >= randomLocation.y) { collision = true; break; } } } while (collision); return randomLocation; } /** * Add 1 segment to the player's snake (on top of existing tail) */ function growSnake(playerState) { var newPiece = {}; newPiece.x = playerState.snakePieces[playerState.snakePieces.length - 1].x; newPiece.y = playerState.snakePieces[playerState.snakePieces.length - 1].y; playerState.snakePieces.push(newPiece); } function getPlayerHue(playerUid) { return playerUid.split(":")[1] % 360; } }); </script> </head> <body> <div class="container-narrow"> <div class="jumbotron"> <canvas id="game-canvas" height="500" width="500"></canvas> <hr> <div class="alert alert-info" role="alert" id="score-alert" style="display: none;"> You died! Final score: <span id="score">0</span> <button id='play-again'>Play again?</button> </div> </div> <div class="row"> <div class="two-col"> <h4>How to play</h4> <ol> <li id="login-container"><a id="login-button" href="javascript:void(0);"> <img style="width: 182px;" src="assets/sign-in-with-google.png"/> </a></li> <li>Move with arrow keys.</li> <li>Eat apples.</li> </ol> </div> <div class="two-col"> <h4>Playing now</h4> <ul id="currently-playing"></ul> </div> </div> </div> <div style="display:none;" id="hiddencruft"></div> </body> </html>
mimming/firesnake
step-5/index.html
HTML
mit
11,673
/* Driver for routine qtrap */ #include <stdio.h> #include <math.h> #define NRANSI #include "nr.h" #define PIO2 1.5707963 /* Test function */ float func(float x) { return x*x*(x*x-2.0)*sin(x); } /* Integral of test function */ float fint(float x) { return 4.0*x*(x*x-7.0)*sin(x)-(pow(x,4.0)-14.0*x*x+28.0)*cos(x); } int main(void) { float a=0.0,b=PIO2,s; printf("Integral of func computed with QTRAP\n\n"); printf("Actual value of integral is %12.6f\n",fint(b)-fint(a)); s=qtrap(func,a,b); printf("Result from routine QTRAP is %12.6f\n",s); return 0; } #undef NRANSI
bamford/astrobamf
nr/cpy/demos/xqtrap.c
C
mit
581
!function(){var t='<br/>Filter: <select id="section-filter"><option value="all">All</option>',i=$("ol li");i.each(function(){var i=$(this).text(),e=i.split("—")[0].trim();t+='<option value="'+e+'">'+e+"</option>"}),t+="</select>";var e=$("table.listing tbody.link");$("h2#sessions").after(t),$("#section-filter").change(function(){var t=$(this).attr("value").trim(),i=[];"ALL"==t.toUpperCase()?i=e:e.each(function(){var e=$(this).find("tr:eq(1)").find("td:eq(3)").text();e.trim().toUpperCase()==t.trim().toUpperCase()&&i.push($(this))}),$("table.listing tbody.link").remove(),$("table.listing").append(i)})}();
shrayasr/pycon-funnel-filter
pycon_funnel_filter.min.js
JavaScript
mit
613
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>{{{ $pageTitle }}}</title> @foreach (\SleepingOwl\Admin\AssetManager\AssetManager::styles() as $style) <link media="all" type="text/css" rel="stylesheet" href="{{ $style }}" > @endforeach <style> /* Override SleepingOwl all.min.css conflicts */ .sidebar { width: inherit; margin-top: inherit; } .sidebar ul li { border: none; } .sidebar ul li a.active { background-color: transparent; } </style> @include('adminlte::_layout.css') @foreach (\SleepingOwl\Admin\AssetManager\AssetManager::scripts() as $script) <script src="{{ $script }}"></script> @endforeach </head> <body class="skin-red"> @yield('content') @include('adminlte::_layout.js') </body> </html>
matheusgomes17/laravel-adminlte
src/views/_layout/base.blade.php
PHP
mit
919
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef DYNAMIC_LIBRARY_H #define DYNAMIC_LIBRARY_H #include "azure_c_shared_utility/macro_utils.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif typedef void* DYNAMIC_LIBRARY_HANDLE; MOCKABLE_FUNCTION(, DYNAMIC_LIBRARY_HANDLE, DynamicLibrary_LoadLibrary, const char*, dynamicLibraryFileName); MOCKABLE_FUNCTION(, void, DynamicLibrary_UnloadLibrary, DYNAMIC_LIBRARY_HANDLE, libraryHandle); MOCKABLE_FUNCTION(, void*, DynamicLibrary_FindSymbol, DYNAMIC_LIBRARY_HANDLE, libraryHandle, const char*, symbolName); #ifdef __cplusplus } #endif #endif // DYNAMIC_LIBRARY_H
tkopacz/2017IotHubGatewaySDK
INC/IotSdkGateway/dynamic_library.h
C
mit
765
<?php /** * BootPager class file. * @author Christoffer Niska <ChristofferNiska@gmail.com> * @copyright Copyright &copy; Christoffer Niska 2011- * @license http://www.opensource.org/licenses/bsd-license.php New BSD License * @package bootstrap.widgets */ /** * Bootstrap pager widget. */ class BootPager extends CLinkPager { /** * @var boolean whether to display the first and last items. */ public $displayFirstAndLast = false; /** * Initializes the pager by setting some default property values. */ public function init() { if ($this->header === null) $this->header = ''; // Bootstrap does not use a header if ($this->nextPageLabel === null) $this->nextPageLabel=Yii::t('bootstrap','Next').' &rarr;'; if ($this->prevPageLabel === null) $this->prevPageLabel='&larr; '.Yii::t('bootstrap','Previous'); if ($this->firstPageLabel === null) $this->firstPageLabel=Yii::t('bootstrap','First'); if ($this->lastPageLabel === null) $this->lastPageLabel=Yii::t('bootstrap','Last'); if ($this->cssFile === null) $this->cssFile = false; // Bootstrap has its own css if (!isset($this->htmlOptions['class'])) $this->htmlOptions['class'] = ''; // would default to yiiPager parent::init(); } /** * Creates the page buttons. * @return array a list of page buttons (in HTML code). */ protected function createPageButtons() { if (($pageCount = $this->getPageCount()) <= 1) return array(); list ($beginPage, $endPage) = $this->getPageRange(); $currentPage = $this->getCurrentPage(false); // currentPage is calculated in getPageRange() $buttons = array(); // first page if ($this->displayFirstAndLast) $buttons[] = $this->createPageButton($this->firstPageLabel, 0, 'first', $currentPage <= 0, false); // prev page if (($page = $currentPage - 1) < 0) $page = 0; $buttons[] = $this->createPageButton($this->prevPageLabel, $page, 'previous', $currentPage <= 0, false); // internal pages for ($i = $beginPage; $i <= $endPage; ++$i) $buttons[] = $this->createPageButton($i + 1, $i, '', false, $i == $currentPage); // next page if (($page = $currentPage+1) >= $pageCount-1) $page = $pageCount-1; $buttons[] = $this->createPageButton($this->nextPageLabel, $page, 'next', $currentPage >= ($pageCount - 1), false); // last page if ($this->displayFirstAndLast) $buttons[] = $this->createPageButton($this->lastPageLabel, $pageCount - 1, 'last', $currentPage >= ($pageCount - 1), false); return $buttons; } /** * Creates a page button. * You may override this method to customize the page buttons. * @param string $label the text label for the button * @param integer $page the page number * @param string $class the CSS class for the page button. This could be 'page', 'first', 'last', 'next' or 'previous'. * @param boolean $hidden whether this page button is visible * @param boolean $selected whether this page button is selected * @return string the generated button */ protected function createPageButton($label, $page, $class, $hidden, $selected) { if ($hidden || $selected) $class .= ' '.($hidden ? 'disabled' : 'active'); return CHtml::tag('li', array('class'=>$class), CHtml::link($label, $this->createPageUrl($page))); } }
NikolaiJeliazkov/class-b
doc/backup/public_html.1/protected/extensions/bootstrap/widgets/BootPager.php
PHP
mit
3,274
/************************************************************************** * * Copyright 2009-2010 VMware, Inc. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sub license, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * USE OR OTHER DEALINGS IN THE SOFTWARE. * * The above copyright notice and this permission notice (including the * next paragraph) shall be included in all copies or substantial portions * of the Software. * * **************************************************************************/ /** * @file * Softpipe/LLVMpipe support. * * @author Jose Fonseca <jfonseca@vmware.com> */ #include <windows.h> #include "util/u_debug.h" #include "stw_winsys.h" #include "gdi/gdi_sw_winsys.h" #include "softpipe/sp_texture.h" #include "softpipe/sp_screen.h" #include "softpipe/sp_public.h" #ifdef HAVE_LLVMPIPE #include "llvmpipe/lp_texture.h" #include "llvmpipe/lp_screen.h" #include "llvmpipe/lp_public.h" #endif static boolean use_llvmpipe = FALSE; static struct pipe_screen * gdi_screen_create(void) { const char *default_driver; const char *driver; struct pipe_screen *screen = NULL; struct sw_winsys *winsys; winsys = gdi_create_sw_winsys(); if(!winsys) goto no_winsys; #ifdef HAVE_LLVMPIPE default_driver = "llvmpipe"; #else default_driver = "softpipe"; #endif driver = debug_get_option("GALLIUM_DRIVER", default_driver); #ifdef HAVE_LLVMPIPE if (strcmp(driver, "llvmpipe") == 0) { screen = llvmpipe_create_screen( winsys ); } #endif if (screen == NULL) { screen = softpipe_create_screen( winsys ); } else { use_llvmpipe = TRUE; } if(!screen) goto no_screen; return screen; no_screen: winsys->destroy(winsys); no_winsys: return NULL; } static void gdi_present(struct pipe_screen *screen, struct pipe_resource *res, HDC hDC) { /* This will fail if any interposing layer (trace, debug, etc) has * been introduced between the state-trackers and the pipe driver. * * Ideally this would get replaced with a call to * pipe_screen::flush_frontbuffer(). * * Failing that, it may be necessary for intervening layers to wrap * other structs such as this stw_winsys as well... */ struct sw_winsys *winsys = NULL; struct sw_displaytarget *dt = NULL; #ifdef HAVE_LLVMPIPE if (use_llvmpipe) { winsys = llvmpipe_screen(screen)->winsys; dt = llvmpipe_resource(res)->dt; gdi_sw_display(winsys, dt, hDC); return; } #endif winsys = softpipe_screen(screen)->winsys, dt = softpipe_resource(res)->dt, gdi_sw_display(winsys, dt, hDC); } static const struct stw_winsys stw_winsys = { &gdi_screen_create, &gdi_present, NULL, /* get_adapter_luid */ NULL, /* shared_surface_open */ NULL, /* shared_surface_close */ NULL /* compose */ }; BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) { switch (fdwReason) { case DLL_PROCESS_ATTACH: stw_init(&stw_winsys); stw_init_thread(); break; case DLL_THREAD_ATTACH: stw_init_thread(); break; case DLL_THREAD_DETACH: stw_cleanup_thread(); break; case DLL_PROCESS_DETACH: if (lpReserved == NULL) { stw_cleanup_thread(); stw_cleanup(); } break; } return TRUE; }
devlato/kolibrios-llvm
contrib/sdk/sources/Mesa/src/gallium/targets/libgl-gdi/libgl_gdi.c
C
mit
4,206
<!DOCTYPE html> <html> <head> <title>ms-mouseenter, ms-mouseleave</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <script src="../avalon.js"></script> <script> avalon.define("test", function(vm) { vm.fn1 = function(e) { console.log(e) console.log(this) } vm.fn2 = function(e) { console.log(e) console.log(this) } }) </script> </head> <body ms-controller="test"> <div ms-mouseenter="fn1" ms-mouseleave="fn2" style="background: red;width:200px;height: 200px;padding:20px;"> <div style="background: blue;width:160px;height: 160px;margin:20px;"></div> </div> </body> </html>
yexiaochai/avalon
examples/on4.html
HTML
mit
917
# Deploy a simple Windows VM with monitoring and diagnostics ![Azure Public Test Date](https://azurequickstartsservice.blob.core.windows.net/badges/201-vm-monitoring-diagnostics-extension/PublicLastTestDate.svg) ![Azure Public Test Result](https://azurequickstartsservice.blob.core.windows.net/badges/201-vm-monitoring-diagnostics-extension/PublicDeployment.svg) ![Azure US Gov Last Test Date](https://azurequickstartsservice.blob.core.windows.net/badges/201-vm-monitoring-diagnostics-extension/FairfaxLastTestDate.svg) ![Azure US Gov Last Test Result](https://azurequickstartsservice.blob.core.windows.net/badges/201-vm-monitoring-diagnostics-extension/FairfaxDeployment.svg) ![Best Practice Check](https://azurequickstartsservice.blob.core.windows.net/badges/201-vm-monitoring-diagnostics-extension/BestPracticeResult.svg) ![Cred Scan Check](https://azurequickstartsservice.blob.core.windows.net/badges/201-vm-monitoring-diagnostics-extension/CredScanResult.svg) [![Deploy To Azure](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazure.svg?sanitize=true)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F201-vm-monitoring-diagnostics-extension%2Fazuredeploy.json) [![Deploy To Azure US Gov](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazuregov.svg?sanitize=true)](https://portal.azure.us/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F201-vm-monitoring-diagnostics-extension%2Fazuredeploy.json) [![Visualize](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/visualizebutton.svg?sanitize=true)](http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F201-vm-monitoring-diagnostics-extension%2Fazuredeploy.json) This template deploys a Windows VM along with the diagnostics extension. For more information on the diagnostics configuration see [Azure Diagnostics Extension in a resource manager template](http://azure.microsoft.com/documentation/articles/virtual-machines-extensions-diagnostics-windows-template).
daltskin/azure-quickstart-templates
201-vm-monitoring-diagnostics-extension/README.md
Markdown
mit
2,325
module Netzke::Core # The client-server communication between the JavaScript and Ruby side of a component is provided by means of "endpoints". # # == Defining an endpoint # # An endpoint is defined through the +endpoint+ class method on the Ruby class: # # endpoint :do_something do |params, this| # # ... # end # # The first block argument will contain the hash of arguments provided at the moment of calling the endpoint from the JavaScript side (see "Calling an endpoint from JavaScript"). # The second block argument is used for "calling" JavaScript methods as a response from the server (see "Envoking JavaScript methods from the server"). # # == Calling an endpoint from JavaScript # # By defining the endpoint on the Ruby class, the client side automatically gets an equally named (but camelcased) method that is used to call the endpoint at the server. In the previous example, that would be +doSomething+. Its signature goes as follows: # # this.doSomething(argsObject, callbackFunction, scope); # # * +argsObject+ is what the server side will receive as the +params+ argument # * +callbackFunction+ (optional) will be called after the server successfully processes the request # * +scope+ (optional) the scope in which +callbackFunction+ will be called # # The callback function can optionally receive an argument set by the endpoint at the server (see "Providing the argument to the callback function"). # # == Envoking JavaScript methods from the server # # An endpoint, after doing some useful job at the server, is able to instruct the client side of the component to call multiple methods (preserving the call order) with provided arguments. It's done by using the second parameter of the endpoint block (which is illustratively called 'this'): # # endpoint :do_something do |params, this| # # ... do the thing # this.set_title("New title") # this.add_class("some-extra-css") # end # # This will result in successive calling the +setTitle+ and +addClass+ methods on the JavaScript instance of our component. # # Besides "calling" methods on the current component itself, it's also possible to address its instantiated children at any level of the hierarchy: # # endpoint :do_something do |params, this| # # ... do the thing # this.east_panel_component.set_title("New east panel title") # this.east_panel_component.deep_nested_component.do_something_very_special("With", "some", "arguments") # end # # == Providing arguments to the callback function # # The callback function provided at the moment of calling an endpoint may receive an argument set by the endpoint by "calling" the special +netzke_set_result+ method. : # # endpoint :do_something do |params, this| # # ... do the thing # this.netzke_set_result(42) # end # # By calling the endpoint from the client side like this: # # this.doSomething({}, function(result){ console.debug(result); }); # # ... the value of +result+ after the execution of the endpoint will be set to 42. Using this mechanism can be seen as doing an asyncronous call to a function at the server, which returns a value. # # == Overriding an endpoint # # When overriding an endpoint, you can call the original endpoint by using +super+ and explicitely providing the block parameters to it: # # endpoint :do_something do |params, this| # super(params, this) # this.doMore # end # # If you want to reuse the original arguments set in +super+, you can access them from the +this+ object. Provided we are overriding the +do_something+ endpoint from the example in "Envoking JavaScript methods from the server", we will have: # # endpoint :do_something do |params, this| # super(params, this) # original_arguments_for_set_title = this.set_title # => ["New title"] # original_arguments_for_add_class = this.add_class # => ["some-extra-css"] # end module Services extend ActiveSupport::Concern included do # Returns all endpoints as a hash class_attribute :endpoints self.endpoints = {} end module ClassMethods def endpoint(name, options = {}, &block) register_endpoint(name) define_method("#{name}_endpoint", &block) end protected # Registers an endpoint at the class level def register_endpoint(ep) self.endpoints = self.endpoints.dup if self.superclass.respond_to?(:endpoints) && self.endpoints == self.superclass.endpoints # only dup for the first endpoint declaration self.endpoints[ep.to_sym] = true end end # Invokes an endpoint call # +endpoint+ may contain the path to the endpoint in a component down the hierarchy, e.g.: # # invoke_endpoint(:users__center__get_data, params) def invoke_endpoint(endpoint, params) if self.class.endpoints[endpoint.to_sym] endpoint_response = Netzke::Core::EndpointResponse.new send("#{endpoint}_endpoint", params, endpoint_response) endpoint_response else # Let's try to find it recursively in a component down the hierarchy child_component, *action = endpoint.to_s.split('__') child_component = child_component.to_sym action = !action.empty? && action.join("__").to_sym raise RuntimeError, "Component '#{self.class.name}' does not have endpoint '#{endpoint}'" if !action if components[child_component] component_instance(child_component).invoke_endpoint(action, params) else # component_missing can be overridden if necessary component_missing(child_component) end end end end end
Mahaswami/netzke-core
lib/netzke/core/services.rb
Ruby
mit
5,837
"""Tests for base extension.""" import unittest from grow.extensions import base_extension class BaseExtensionTestCase(unittest.TestCase): """Test the base extension.""" def test_config_disabled(self): """Uses the disabled config.""" ext = base_extension.BaseExtension(None, { 'disabled': [ 'a', ], 'enabled': [ 'a', ], }) self.assertFalse(ext.hooks.is_enabled('a')) self.assertFalse(ext.hooks.is_enabled('b')) def test_config_enabled(self): """Uses the enabled config.""" ext = base_extension.BaseExtension(None, { 'enabled': [ 'a', ], }) self.assertTrue(ext.hooks.is_enabled('a')) self.assertFalse(ext.hooks.is_enabled('b'))
grow/pygrow
grow/extensions/base_extension_test.py
Python
mit
844
class PlayerSkill < ActiveRecord::Base belongs_to :player belongs_to :skill end
vyorkin-archive/proto
app/models/player_skill.rb
Ruby
mit
84
function loadLevel(levelname){ GameObject.Regenerate = function (){ var geometry = new THREE.Geometry(); var selfGenGeom = new THREE.Geometry(); var pipes; var forageGeom = new THREE.Geometry(); var dynamicGeom = new THREE.Geometry(); var specialvert = []; // map[getblock(3,3,3)].air = false; var uvs = []; calculateMajorTriangle(); function calculateMajorTriangle(){ for (var z = 1; z <= mapDepth; z++){ for (var y = 1; y <= mapHeight; y++){ for (var x = 1; x <= mapWidth; x++){ /*nz is the conversion of fakez coordinates to realworld coordinates*/ var nz = -z + 1; var blockOffset = map[getblock(x,y,z)].offsetPOS; var blk = { current: getblock(x ,y ,z ), // id of current block left: getblock(x-1,y ,z ), // id of block left right: getblock(x+1,y ,z ), // id of block right above: getblock(x ,y+1,z ), // id of block above below: getblock(x ,y-1,z ), // id of block below back: getblock(x ,y ,z-1), // id of block it back front: getblock(x ,y ,z+1), // id of block in front right_front: getblock(x+1, y ,z+1 ), right_back: getblock(x+1, y ,z-1 ) } /*Static Geometry*/ if (map[blk.current].air === false){ var geometryClass; if (map[blk.current].dynamic == false){ geometryClass = selfGenGeom; } else { geometryClass = dynamicGeom; } if (x > 1){ if (map[blk.left].air === true & map[blk.current].faceEnab.left == true | map[blk.left].dynamic == true & map[blk.current].dynamic == false) { var vertices=[]; /*Calculates Vertices*/ vertices[0] = new THREE.Vector3(x-1, y-1, nz); vertices[1] = new THREE.Vector3(x-1, y , nz); vertices[2] = new THREE.Vector3(x-1, y-1, nz-1); vertices[3] = new THREE.Vector3(x-1, y , nz-1); /*Offsets The Vertices based on the block offset in the map*/ vertices[0].add(blockOffset); vertices[1].add(blockOffset); vertices[2].add(blockOffset); vertices[3].add(blockOffset); /*Pushes the Vertices to the Geometry*/ geometryClass.vertices.push(vertices[0]); geometryClass.vertices.push(vertices[1]); geometryClass.vertices.push(vertices[2]); geometryClass.vertices.push(vertices[3]); /*Gets the correct uv for the material of the block*/ uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1, 0)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1, 1)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0, 0)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0, 1)); /*Calculates the the offset of the specific instance of verttices and uv*/ var offset = geometryClass.vertices.length - 4; var uvoffset = uvs.length - 4; /*Pushes The Faces to the geometry*/ geometryClass.faces.push( new THREE.Face3( offset , offset +1 , offset + 2 ) ); geometryClass.faces.push( new THREE.Face3( offset + 1, offset +3 , offset + 2 ) ); /*THESE UV MAPS DIFFER, because they are rotated*/ geometryClass.faceVertexUvs[0].push( [uvs[uvoffset + 0], uvs[uvoffset + 1], uvs[uvoffset + 2]] ); geometryClass.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 3], uvs[uvoffset + 2]] ); } } if (x < mapWidth){ if (map[blk.right].air === true & map[blk.current].faceEnab.right == true | map[blk.right].dynamic == true & map[blk.current].dynamic == false) { var vertices=[]; vertices[0] = new THREE.Vector3(x, y , nz ); vertices[1] = new THREE.Vector3(x, y-1, nz ); vertices[2] = new THREE.Vector3(x, y , nz-1); vertices[3] = new THREE.Vector3(x, y-1, nz-1); vertices[0].add(blockOffset); vertices[1].add(blockOffset); vertices[2].add(blockOffset); vertices[3].add(blockOffset); geometryClass.vertices.push(vertices[0], vertices[1], vertices[2], vertices[3]); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1,0)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1,1)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0,0)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0,1)); var offset = geometryClass.vertices.length - vertices.length; var uvoffset = uvs.length - vertices.length; geometryClass.faces.push( new THREE.Face3( offset , offset +1 , offset + 2 ) ); geometryClass.faces.push( new THREE.Face3( offset + 1, offset +3 , offset + 2 ) ); geometryClass.faceVertexUvs[0].push( [uvs[uvoffset + 3], uvs[uvoffset + 2], uvs[uvoffset + 1]] ); geometryClass.faceVertexUvs[0].push( [uvs[uvoffset + 2], uvs[uvoffset + 0], uvs[uvoffset + 1]] ); } } if (y < mapHeight){ if (map[blk.above].air === true & map[blk.current].faceEnab.top == true | map[blk.above].dynamic == true & map[blk.current].dynamic == false) { if (map[getblock(x,y,z)].materialID == 4){ map[getblock(x,y,z)].materialID = 5; } var vertices=[]; vertices[0] = new THREE.Vector3( x, y, nz), vertices[1] = new THREE.Vector3((x-1), y, nz), vertices[2] = new THREE.Vector3( x, y, nz-1), vertices[3] = new THREE.Vector3((x-1), y, nz-1) vertices[0].add(blockOffset); vertices[1].add(blockOffset); vertices[2].add(blockOffset); vertices[3].add(blockOffset); geometryClass.vertices.push(vertices[0]); geometryClass.vertices.push(vertices[1]); geometryClass.vertices.push(vertices[2]); geometryClass.vertices.push(vertices[3]); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1, 1)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0, 1)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1, 0)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0, 0)); if (map[getblock(x,y,z)].materialID == 5){ map[getblock(x,y,z)].materialID = 4; } var offset = geometryClass.vertices.length - 4; var uvoffset = uvs.length - 4; geometryClass.faces.push( new THREE.Face3( offset , offset +2 , offset + 1 ) ); geometryClass.faces.push( new THREE.Face3( offset + 1, offset +2 , offset + 3 ) ); geometryClass.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 3]] ); geometryClass.faceVertexUvs[0].push( [uvs[uvoffset + 3], uvs[uvoffset + 0], uvs[uvoffset + 2]] ); } } if (y > 1){ if (map[blk.below].air === true & map[blk.current].faceEnab.bottom == true | map[blk.below].dynamic == true & map[blk.current].dynamic == false) { if (map[getblock(x,y,z)].materialID == 4){ map[getblock(x,y,z)].materialID = 5; } var vertices=[]; vertices[0] = new THREE.Vector3( x, (y -1), nz), vertices[1] = new THREE.Vector3( x, (y -1), nz-1), vertices[2] = new THREE.Vector3((x-1), (y -1), nz), vertices[3] = new THREE.Vector3((x-1), (y -1), nz-1) vertices[0].add(blockOffset); vertices[1].add(blockOffset); vertices[2].add(blockOffset); vertices[3].add(blockOffset); geometryClass.vertices.push(vertices[0]); geometryClass.vertices.push(vertices[1]); geometryClass.vertices.push(vertices[2]); geometryClass.vertices.push(vertices[3]); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1, 1)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1, 0)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0, 1)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0, 0)); if (map[getblock(x,y,z)].materialID == 5){ map[getblock(x,y,z)].materialID = 4; } var offset = geometryClass.vertices.length - 4; var uvoffset = uvs.length - 4; geometryClass.faces.push( new THREE.Face3( offset , offset +2 , offset + 1 ) ); geometryClass.faces.push( new THREE.Face3( offset + 1, offset +2 , offset + 3 ) ); geometryClass.faceVertexUvs[0].push( [uvs[uvoffset + 0], uvs[uvoffset + 2], uvs[uvoffset + 1]] ); geometryClass.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 2], uvs[uvoffset + 3]] ); } } if (z > 1){ if (map[blk.back].air === true & map[blk.current].faceEnab.back == false) { var vertices = []; vertices[0] = new THREE.Vector3( x, y, nz), vertices[1] = new THREE.Vector3( x, (y -1), nz), vertices[2] = new THREE.Vector3((x-1), y, nz), vertices[3] = new THREE.Vector3((x-1), (y-1), nz) vertices[0].add(blockOffset); vertices[1].add(blockOffset); vertices[2].add(blockOffset); vertices[3].add(blockOffset); geometryClass.vertices.push(vertices[0]); geometryClass.vertices.push(vertices[1]); geometryClass.vertices.push(vertices[2]); geometryClass.vertices.push(vertices[3]); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1, 1)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1, 0)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0, 1)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0, 0)); var offset = geometryClass.vertices.length - 4; var uvoffset = uvs.length - 4; geometryClass.faces.push( new THREE.Face3( offset , offset +2 , offset + 1 ) ); geometryClass.faces.push( new THREE.Face3( offset + 1, offset +2 , offset + 3 ) ); geometryClass.faceVertexUvs[0].push( [uvs[uvoffset + 0], uvs[uvoffset + 2], uvs[uvoffset + 1]] ); geometryClass.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 2], uvs[uvoffset + 3]] ); } } else { var vertices = []; vertices[0] = new THREE.Vector3( x, y, nz); vertices[1] = new THREE.Vector3( x, (y -1), nz); vertices[2] = new THREE.Vector3((x-1), y, nz); vertices[3] = new THREE.Vector3((x-1), (y-1), nz); vertices[0].add(blockOffset); vertices[1].add(blockOffset); vertices[2].add(blockOffset); vertices[3].add(blockOffset); geometryClass.vertices.push(vertices[0]); geometryClass.vertices.push(vertices[1]); geometryClass.vertices.push(vertices[2]); geometryClass.vertices.push(vertices[3]); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1, 1)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1, 0)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0, 1)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0, 0)); var offset = geometryClass.vertices.length - 4; var uvoffset = uvs.length - 4; geometryClass.faces.push( new THREE.Face3( offset , offset +2 , offset + 1 ) ); geometryClass.faces.push( new THREE.Face3( offset + 1, offset +2 , offset + 3 ) ); geometryClass.faceVertexUvs[0].push( [uvs[uvoffset + 0], uvs[uvoffset + 2], uvs[uvoffset + 1]] ); geometryClass.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 2], uvs[uvoffset + 3]] ); var faceOffset = geometryClass.faces.length - 2; var color1 = new THREE.Color( 0x00FFFF); var color2 = new THREE.Color( 0x00FF00); var color3 = new THREE.Color( 0x0000FF); geometryClass.faces[faceOffset].color.set(0x0000FF); geometryClass.faces[faceOffset+1].vertexColors = [color1, color1, color1]; // console.log(selfGenGeom.faces[faceOffset+1].vertexColors.__proto__); } } if ((map[blk.current].transparent === true)){ var vertices = []; vertices[0] = new THREE.Vector3( x + (map[getblock(x,y,z)].blocksx -1), y + (map[getblock(x,y,z)].blocksy -1), nz), vertices[1] = new THREE.Vector3( x + (map[getblock(x,y,z)].blocksx -1), y-1, nz), vertices[2] = new THREE.Vector3( x-1, y + (map[getblock(x,y,z)].blocksy -1), nz), vertices[3] = new THREE.Vector3( x-1, y-1, nz) vertices[0].add(blockOffset); vertices[1].add(blockOffset); vertices[2].add(blockOffset); vertices[3].add(blockOffset); forageGeom.vertices.push(vertices[0]); forageGeom.vertices.push(vertices[1]); forageGeom.vertices.push(vertices[2]); forageGeom.vertices.push(vertices[3]); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1, 1)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 1, 0)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0, 1)); uvs.push( GameObject.getUVmapCords(map[getblock(x,y,z)].materialID, 0, 0)); var offset = forageGeom.vertices.length - 4; var uvoffset = uvs.length - 4; forageGeom.faces.push( new THREE.Face3( offset , offset +2 , offset + 1 ) ); forageGeom.faces.push( new THREE.Face3( offset + 1, offset +2 , offset + 3 ) ); var faceindex = forageGeom.faces.length; if (map[blk.current].wave == true){ specialvert.push({face: faceindex, vert:"a", waveoffset:(3*Math.random())}); specialvert.push({face: (faceindex-1), vert:"b", waveoffset:(-3*Math.random())}); } forageGeom.faceVertexUvs[0].push( [uvs[uvoffset + 0], uvs[uvoffset + 2], uvs[uvoffset + 1]] ); forageGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 2], uvs[uvoffset + 3]] ); } if (map[blk.current].pipe === true){ pipes1 = new THREE.CylinderGeometry( 0.8, 0.8, 2, 32 ); pipes2 = new THREE.CylinderGeometry( 1, 1, 1, 32 ); // console.log("pipes"); // console.log(pipes); if (z <= 1 ) { pipe(map[blk.current].pipeHeight, new THREE.Vector3(x,y,z)); } function pipe(height, position){ var negative = [], nAngles = []; heightmid = []; var x, y, z; position.z = -Math.abs(position.z); position.y = position.y -1; heightmid[0] = 0; heightmid[1] = height - 14/16; heightmid[2] = height - 14/16; heightmid[3] = height; heightmid[4] = height; heightmid[5] = height - 0.2; heightmid[6] = height - 0.2; radius = []; radius[0] = 13/16; radius[1] = 13/16; radius[2] = 1; radius[3] = 1; radius[4] = 13/16; radius[5] = 13/16; radius[6] = 0; segments = 20; thetaStart = 0; thetaLength = Math.PI * 2; for ( i = 0; i <= (segments+2); i ++ ) { for (q = 0; q < 7; q++){ var vertex = new THREE.Vector3(); var segment = thetaStart + i / segments * thetaLength; vertex.x = radius[q] * Math.cos( segment ) + position.x; vertex.y = heightmid[q] + position.y; vertex.z = radius[q] * Math.sin( segment ) + position.z; // console.log("xvertex x:" + vertex.x + "xvertex y:" + vertex.y + " xvertext z:" + vertex.z ); // console.log(q); selfGenGeom.vertices.push( vertex ); } uvs.push( GameObject.getUVmapCords(20, 0, 0)); uvs.push( GameObject.getUVmapCords(20, 0, 1)); uvs.push( GameObject.getUVmapCords(20, 1, 0)); uvs.push( GameObject.getUVmapCords(20, 1, 1)); if (i != 0){ var offsetRIGHT = selfGenGeom.vertices.length - (q * 2); var offsetLEFTT = selfGenGeom.vertices.length - q; var uvoffset = uvs.length - (q * 2); selfGenGeom.faces.push( new THREE.Face3( offsetLEFTT + 1, offsetLEFTT + 0, offsetRIGHT + 0)); selfGenGeom.faces.push( new THREE.Face3( offsetRIGHT + 1, offsetLEFTT + 1, offsetRIGHT + 0)); selfGenGeom.faces.push( new THREE.Face3( offsetRIGHT + 2, offsetLEFTT + 1, offsetRIGHT + 1)); selfGenGeom.faces.push( new THREE.Face3( offsetLEFTT + 2, offsetLEFTT + 1, offsetRIGHT + 2)); selfGenGeom.faces.push( new THREE.Face3( offsetLEFTT + 3, offsetLEFTT + 2, offsetRIGHT + 2)); selfGenGeom.faces.push( new THREE.Face3( offsetRIGHT + 2, offsetRIGHT + 3, offsetLEFTT + 3)); selfGenGeom.faces.push( new THREE.Face3( offsetRIGHT + 3, offsetRIGHT + 4, offsetLEFTT + 3)); selfGenGeom.faces.push( new THREE.Face3( offsetRIGHT + 4, offsetLEFTT + 4, offsetLEFTT + 3)); selfGenGeom.faces.push( new THREE.Face3( offsetRIGHT + 4, offsetLEFTT + 5, offsetLEFTT + 4)); selfGenGeom.faces.push( new THREE.Face3( offsetLEFTT + 5, offsetRIGHT + 4, offsetRIGHT + 5)); selfGenGeom.faces.push( new THREE.Face3( offsetLEFTT + 5, offsetRIGHT + 5, offsetRIGHT + 6)); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 2]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 1], uvs[uvoffset + 2]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 2]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 2]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 2]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 2], uvs[uvoffset + 0], uvs[uvoffset + 3]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 2]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 2]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 2]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 2]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 2]]); } } var vertices = []; var diameter = radius[2]*2; vertices[0] = new THREE.Vector3(position.x-1, position.y , 0); vertices[1] = new THREE.Vector3(position.x-1, position.y , -diameter); vertices[2] = new THREE.Vector3(position.x-1, position.y+height, 0); vertices[3] = new THREE.Vector3(position.x-1, position.y+height, -diameter); vertices[4] = new THREE.Vector3(position.x+diameter-1, position.y+height, 0); vertices[5] = new THREE.Vector3(position.x+diameter-1, position.y+height,-diameter); vertices[6] = new THREE.Vector3(position.x+diameter-1, position.y, 0); vertices[7] = new THREE.Vector3(position.x+diameter-1, position.y, -diameter); uvs.push( GameObject.getUVmapCords(19, 0, 0)); uvs.push( GameObject.getUVmapCords(19, 0, 1)); uvs.push( GameObject.getUVmapCords(19, 1, 0)); uvs.push( GameObject.getUVmapCords(19, 1, 1)); for (lmnop = 0; lmnop < vertices.length; lmnop++){ selfGenGeom.vertices.push( vertices[lmnop] ); // selfGenGeom.faceVertexUvs[0].push(); } var verticesbopundryoffset = selfGenGeom.vertices.length - vertices.length; var uvoffset = uvs.length - 4; selfGenGeom.faces.push( new THREE.Face3( verticesbopundryoffset + 2, verticesbopundryoffset + 1, verticesbopundryoffset + 0)); selfGenGeom.faces.push( new THREE.Face3( verticesbopundryoffset + 1, verticesbopundryoffset + 2, verticesbopundryoffset + 3)); selfGenGeom.faces.push( new THREE.Face3( verticesbopundryoffset + 2, verticesbopundryoffset + 4, verticesbopundryoffset + 3)); selfGenGeom.faces.push( new THREE.Face3( verticesbopundryoffset + 3, verticesbopundryoffset + 4, verticesbopundryoffset + 5)); selfGenGeom.faces.push( new THREE.Face3( verticesbopundryoffset + 4, verticesbopundryoffset + 6, verticesbopundryoffset + 5)); selfGenGeom.faces.push( new THREE.Face3( verticesbopundryoffset + 5, verticesbopundryoffset + 6, verticesbopundryoffset + 7)); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 2], uvs[uvoffset + 1], uvs[uvoffset + 0]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 1], uvs[uvoffset + 2]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 2]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 2]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 2]]); selfGenGeom.faceVertexUvs[0].push( [uvs[uvoffset + 1], uvs[uvoffset + 0], uvs[uvoffset + 2]]); console.log(position.z); } } } } } // console.log(selfGenGeom); } var oldVERT = selfGenGeom.vertices; selfGenGeom.computeFaceNormals(); selfGenGeom.mergeVertices(); selfGenGeom.computeVertexNormals(); forageGeom.computeFaceNormals(); forageGeom.mergeVertices(); forageGeom.computeVertexNormals(); dynamicGeom.computeFaceNormals(); dynamicGeom.mergeVertices(); dynamicGeom.computeVertexNormals(); var newVERT = selfGenGeom.vertices; var texture = new THREE.ImageUtils.loadTexture( "/textures/WorldTextureMap.png" ); texture.magFilter = THREE.NearestFilter; texture.minFilter = THREE.LinearMipMapLinearFilter; texture.wrapS = texture.wrapT = THREE.RepeatWrapping; texture.repeat.set( 1, 1 ); texture.anisotropy = 1; var platform_topp = new THREE.MeshLambertMaterial({map: GameObject.WorldTextureMap, color:0xFFFFFF, alphaTest: 0.5}); // var platform_top = new THREE.MeshLambertMaterial({color: 0xFF0000, wireframe: true}); var platform_top = new THREE.ShaderMaterial({ uniforms: { "tDiffuse": { type: "t", value: GameObject.WorldTextureMap }, "uDirLight": { type: "c", value: new THREE.Color(0xFFCC00)}, "uMaterialColor": { type: "c", value: new THREE.Color(0xFFFFFF)}, "color": { type: "c", value: new THREE.Color( 0xFFFFFF ) }, "time": { type: "f", value: 90 }, "pi": { type: "f", value: Math.PI} }, attributes: { "vert": { type: "f", value: []}, "offset": { type: "f", value: []} }, vertexShader: [ "uniform float time;", "uniform float pi;", "uniform vec3 uDirLight;", "uniform vec3 uMaterialColor;", "attribute float vert;", "attribute float offset;", "varying vec2 vUv;", "varying vec3 vColor;", "void main() {", "vUv = uv;", "vec3 jus = vec3(vert * 0.2 * sin((time * 1.0 * pi / 180.0) - offset),0,vert * 0.2*sin((time * 3.0 * pi / 180.0) + offset));", "vec3 newPosition = position + jus - vec3(0,0,0);", "gl_Position = projectionMatrix * modelViewMatrix * vec4( newPosition, 1.0 );", "vec3 light = normalize( uDirLight + vec3(0.2,0.8,0.6) );", "float diffuse = max( dot( normal, light), 0.0);", "vColor = vec3(diffuse, diffuse, diffuse) - 0.7;", "}" ].join("\n"), fragmentShader: [ "uniform vec3 color;", "uniform sampler2D tDiffuse;", "varying vec2 vUv;", "varying vec3 vColor;", "void main() {", "vec4 texel = texture2D( tDiffuse, vUv );", "vec3 luma = vec3( 0.299, 0.587, 0.114 );", "float v = dot( texel.xyz, luma );", // "if ( gl_FragColor.a < 0.5 ) discard;", "gl_FragColor = vec4( (texel.xyz * vec3(1.2,1.2,1.2)) + vColor, texel.w );", "if(gl_FragColor.a < 0.5)", "discard;", // "gl_FragColor = vec4( v * color, texel.w );", "}" ].join("\n") }); console.log(platform_top); var arryasz = []; var waveoffset = []; console.log(selfGenGeom.faces); /*Finds Specific Verticies and Gives them specific vertex attributes for the vertex shader*/ console.log(forageGeom.faces); console.log(specialvert); console.log(forageGeom.faces[specialvert[0].face][specialvert[0].vert]); console.log(forageGeom.vertices.length); for (var ngt = 0; ngt < forageGeom.vertices.length; ngt++){ arryasz[ngt] = 0; waveoffset[ngt] = 0; } for (var ogt = 0; ogt < (specialvert.length-2); ogt++){ arryasz[forageGeom.faces[specialvert[ogt].face][specialvert[ogt].vert]] = 1; waveoffset[forageGeom.faces[specialvert[ogt].face][specialvert[ogt].vert]] = specialvert[ogt].waveoffset; } platform_top.attributes.vert.value = arryasz; platform_top.attributes.offset.value = waveoffset; platform_top.attributes.vert.needsUpdate = true; platform_top.attributes.offset.needsUpdate = true; // console.log(platform_top.attributes.vert); console.log(platform_top) var pipemat = new THREE.MeshLambertMaterial({color: 0x00FF00}); var material = new THREE.MeshPhongMaterial( { color: 0xDDDDDD, shininess: 30, metal: false, shading: THREE.FlatShading, wireframe: true} ); GameObject.WorldGeom = {STATIC: new THREE.Mesh( selfGenGeom, platform_topp ), DYNAMIC: new THREE.Mesh( dynamicGeom, platform_topp ), FORAGE: new THREE.Mesh( forageGeom, platform_top )}; GameObject.WorldGeom.STATIC.castShadow = true; GameObject.WorldGeom.STATIC.receiveShadow = true; GameObject.WorldGeom.STATIC.shadowBias = 0.001; GameObject.WorldGeom.FORAGE.castShadow = true; GameObject.WorldGeom.FORAGE.receiveShadow = true; GameObject.WorldGeom.FORAGE.shadowBias = 0.001; // GameObject.WorldGeom.STATIC.scale.set(10,10,10); // GameObject.WorldGeom.position.y = -8; // GameObject.WorldGeom.position.x = -8; // GameObject.WorldGeom.position.z = 0; // var hill = GameObject.Hill(new THREE.Vector3(3,3.5,-3)); // var bush = GameObject.Bush(new THREE.Vector3(12,2.5,-2)); GameObject.WorldGeom.DYNAMIC.position.z = -0.5; console.log(GameObject.WorldGeom.FORAGE); scene.add(GameObject.WorldGeom.STATIC, GameObject.WorldGeom.FORAGE, GameObject.WorldGeom.DYNAMIC); } //*PLZZPLLZZ Fix me MAx. I am broken ;( I cri erytime i dont work*/ GameObject.getUVmapCords = function(materialID, u, v){ var ppb = 16; var blocksInRow = textureWidth / ppb; var material = []; material[0] = {pos: new THREE.Vector2(1,9), l: 1, h: 1}; material[1] = {pos: new THREE.Vector2(2,9), l: 1, h: 1}; material[2] = {pos: new THREE.Vector2(3,9), l: 1, h: 1}; material[3] = {pos: new THREE.Vector2(1,8), l: 1, h: 1}; material[4] = {pos: new THREE.Vector2(2,8), l: 1, h: 1}; material[5] = {pos: new THREE.Vector2(3,8), l: 1, h: 1}; material[6] = {pos: new THREE.Vector2(1,7), l: 1, h: 1}; material[7] = {pos: new THREE.Vector2(2,7), l: 1, h: 1}; material[8] = {pos: new THREE.Vector2(1,5), l: 4, h: 1}; material[9] = {pos: new THREE.Vector2(5,4), l: 5, h: 2 + 3/16}; material[10] = {pos: new THREE.Vector2(6,5), l: 3, h: 1 + 3/16}; material[11] = {pos: new THREE.Vector2(1,4), l: 3, h: 1}; material[12] = {pos: new THREE.Vector2(1,3), l: 3, h: 1}; material[13] = {pos: new THREE.Vector2(1.5,5), l: 2, h: 1}; material[14] = {pos: new THREE.Vector2(2.5,3), l: 1, h: 1}; material[15] = {pos: new THREE.Vector2(3,7), l: 1, h: 1}; material[16] = {pos: new THREE.Vector2(4,7), l: 1, h: 1}; material[17] = {pos: new THREE.Vector2(1,6), l: 1, h: 1}; material[18] = {pos: new THREE.Vector2(2,6), l: 1, h: 1}; material[19] = {pos: new THREE.Vector2(3,3), l: 1, h: 1}; material[20] = {pos: new THREE.Vector2(9,7), l: 1-3/16, h: 1-1/16}; material[materialID].h--; material[materialID].l--; u--; v--; var realU = ((material[materialID].pos.x + u + (material[materialID].l * (u + 1)))* ppb) / textureWidth ; var realV = ((material[materialID].pos.y + v + (material[materialID].h * (v + 1)))* ppb) / textureHeight; var realUV = new THREE.Vector2(realU, realV); //console.log(realUV); return realUV; } function get_Material_Id_If_MultiBlock(){ } function getblock(x, y, z){ /*This Formula Calculates the Id number, based on a position entered*/ var id = (((y - 1) * mapWidth + (x -1)) + (mapWidth * mapHeight * (z -1))); return id; } function getMap(){ var xmlhttp = new XMLHttpRequest(); var url = levelname; xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { var myArr = JSON.parse(xmlhttp.responseText); map = myArr.blocks; mapWidth = myArr.mapWidth; mapHeight= myArr.mapHeight; mapDepth = myArr.mapDepth; console.log(myArr); GameObject.Regenerate(); GameObject.Developer.showGrids(myArr); } } xmlhttp.open("GET", url, true); xmlhttp.send(); } getMap(); } GameObject.GetWorldTextureMap = function(){ var blocktexture = THREE.ImageUtils.loadTexture( "/textures/WorldTextureMap.png", { magFilter: THREE.NearestFilter, minFilter: THREE.LinearMipMapLinearFilter, flipY: false, wrapS: THREE.RepeatWrapping, wrapT: THREE.RepeatWrapping, repeat: 1, anisotropy: 1 }, function(texturemap){ texturemap.magFilter= THREE.NearestFilter; texturemap.minFilter= THREE.LinearMipMapLinearFilter; textureWidth = texturemap.image.width; textureHeight = texturemap.image.height; GameObject.WorldTextureMap = texturemap; console.log("textywexy wdth: "+textureWidth+" tashasdheight:"+textureHeight); // generateGeometry(); } ); }
MaxKotlan/SuperMarioBrosTHREE.js
maps/genGeom.js
JavaScript
mit
33,835
#!/usr/bin/python # -*- coding: utf-8 -*- # isprime.py # # Author: Billy Wilson Arante # Created: 2016/06/16 PHT # Modified: 2016/10/01 EDT (America/New York) from sys import argv def isprime(x): """Checks if x is prime number Returns true if x is a prime number, otherwise false. """ if x <= 1: return False for n in range(2, (x - 1)): if x % n == 0: return False return True def main(): """Main""" filename, number = argv print isprime(int(number)) if __name__ == "__main__": main()
arantebillywilson/python-snippets
py2/cool-things/isprime.py
Python
mit
565
/* ===================================================== Forms w3c.github.io/html/sec-forms.html ===================================================== */ /** * 1. Remove the margin in Firefox and Safari. * 2. Change text/font properties to `inherit` in all browsers (opinionated). */ button, input, optgroup, select, textarea { margin: 0; /* 1 */ font: inherit; /* 2 */ text-transform: inherit; /* 2 */ } /** * Remove the default vertical scrollbar in IE. */ textarea { overflow: auto; } /** * 1. Show the overflow in Edge. * 2. Show the overflow in Edge, Firefox, and IE. * 3. Ensure inputs inherit text colour of parent element */ button, input, /* 1 */ select { /* 2 */ overflow: visible; color: inherit; /* 3 */ } /** * Change the cursor in all browsers (opinionated). */ button, [type=submit], label { cursor: pointer; } /** * 1. Correct the inability to style clickable types in iOS. * 2. Remove default styling (opinionated). */ button, [type=reset], [type=submit] { -webkit-appearance: button; /* 1 */ background: none; /* 2 */ border: 0; /* 2 */ padding: 0; /* 2 */ } /** * Remove the inner border and padding in Firefox. */ button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner { border: 0; padding: 0; } /** * Restore the focus styles unset by the previous rule. */ button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner { outline: 1px dotted ButtonText; } /** * https://thatemil.com/blog/2015/01/03/reset-your-fieldset/ * 1. Reset minimum width based on content inside fieldset in * WebKit/Blink/Firefox * 2. Adjust display mode to ensure 1 works in Firefox * 3. Remove default margin and border * 4. Fix margin-collapsing behavior coupled with rendering of legend element */ fieldset { min-width: 0; /* 1 */ margin: 0; /* 3 */ border: 0; /* 3 */ padding: 0.01em 0 0; /* 4 */ body:not(:-moz-handler-blocked) & { display: table-cell; /* 2 */ } @media print { display: none; } } /** * 1. Correct the text wrapping in Edge and IE. * 2. Correct the color inheritance from `fieldset` elements in IE. * 3. Remove the padding so developers are not caught out when they zero out * `fieldset` elements in all browsers. */ legend { box-sizing: border-box; /* 1 */ color: inherit; /* 2 */ display: table; /* 1 */ max-width: 100%; /* 1 */ padding: 0; /* 3 */ white-space: normal; /* 1 */ } /** * 1. Add the correct box sizing in IE 10-. * 2. Remove the padding in IE 10-. */ [type=checkbox], [type=radio] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } /** * 1. Correct the odd appearance in Chrome and Safari. * 2. Correct the outline style in Safari. */ [type=search] { -webkit-appearance: none; /* 1 */ outline-offset: -2px; /* 2 */ } /** * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. */ [type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration { -webkit-appearance: none; }
culturebook/pablo
src/assets/styles/base/_forms.css
CSS
mit
3,124
module.exports={A:{A:{"1":"B","16":"hB","132":"K D G E A"},B:{"1":"2 C d J M H I"},C:{"1":"0 1 3 4 6 7 8 9 Y Z a b c e f g h i j k l m n o L q r s t u v w x y z HB GB BB CB FB","132":"2 eB DB F N K D G E A B C d J M H I O P Q R S T U V W X YB XB"},D:{"1":"0 1 3 4 6 7 8 9 T U V W X Y Z a b c e f g h i j k l m n o L q r s t u v w x y z HB GB BB CB FB RB MB LB kB JB NB OB PB","132":"2 F N K D G E A B C d J M H I O P Q R S"},E:{"1":"5 A B C WB p ZB","132":"F N K D G E QB IB SB TB UB VB"},F:{"1":"0 1 6 J M H I O P Q R S T U V W X Y Z a b c e f g h i j k l m n o L q r s t u v w x y z","16":"E B C aB bB cB dB p AB fB","132":"5"},G:{"1":"oB pB qB rB sB tB","132":"G IB gB EB iB jB KB lB mB nB"},H:{"132":"uB"},I:{"1":"4 zB 0B","132":"DB F vB wB xB yB EB"},J:{"132":"D A"},K:{"1":"L","16":"A B C p AB","132":"5"},L:{"1":"JB"},M:{"1":"3"},N:{"1":"B","132":"A"},O:{"132":"1B"},P:{"1":"2B 3B 4B 5B 6B","132":"F"},Q:{"132":"7B"},R:{"1":"8B"},S:{"4":"9B"}},B:6,C:"localeCompare()"};
pcclarke/civ-techs
node_modules/caniuse-lite/data/features/localecompare.js
JavaScript
mit
977
// This file is part of the "x0" project, http://github.com/christianparpart/x0> // (c) 2009-2018 Christian Parpart <christian@parpart.family> // // Licensed under the MIT License (the "License"); you may not use this // file except in compliance with the License. You may obtain a copy of // the License at: http://opensource.org/licenses/MIT #include <xzero/BufferUtil.h> #include <xzero/inspect.h> #include <xzero/defines.h> #ifdef XZERO_OS_WIN32 #include <string.h> #else #include <strings.h> #endif namespace xzero { void BufferUtil::stripTrailingBytes(Buffer* buf, unsigned char byte) { auto begin = (const unsigned char*) buf->data(); auto cur = begin + buf->size(); while (cur > begin && *(cur - 1) == byte) { cur--; } buf->truncate(cur - begin); } void BufferUtil::stripTrailingSlashes(Buffer* buf) { stripTrailingBytes(buf, '/'); } std::string BufferUtil::hexPrint( Buffer* buf, bool sep /* = true */, bool reverse /* = fase */) { static const char hexTable[] = "0123456789abcdef"; auto data = (const unsigned char*) buf->data(); int size = static_cast<int>(buf->size()); std::string str; if (!reverse) { for (int i = 0; i < size; ++i) { if (sep && i > 0) { str += " "; } auto byte = data[i]; str += hexTable[(byte & 0xf0) >> 4]; str += hexTable[byte & 0x0f]; } } else { for (int i = size - 1; i >= 0; --i) { if (sep && i < size - 1) { str += " "; } auto byte = data[i]; str += hexTable[(byte & 0xf0) >> 4]; str += hexTable[byte & 0x0f]; } } return str; } bool BufferUtil::beginsWith(const BufferRef& data, const BufferRef& prefix) { if (data.size() < prefix.size()) return false; return data.ref(0, prefix.size()) == prefix; } bool BufferUtil::beginsWithIgnoreCase(const BufferRef& str, const BufferRef& prefix) { if (str.size() < prefix.size()) { return false; } #if defined(_WIN32) || defined(_WIN64) return _strnicmp(str.data(), prefix.data(), prefix.size()) == 0; #else return strncasecmp(str.data(), prefix.data(), prefix.size()) == 0; #endif } bool BufferUtil::endsWith(const BufferRef& data, const BufferRef& suffix) { if (data.size() < suffix.size()) return false; return data.ref(data.size() - suffix.size()) == suffix; } bool BufferUtil::endsWithIgnoreCase(const BufferRef& str, const BufferRef& suffix) { if (str.size() < suffix.size()) { return false; } #if defined(_WIN32) || defined(_WIN64) return _strnicmp(str.data() + str.size() - suffix.size(), suffix.data(), suffix.size()) == 0; #else return strncasecmp(str.data() + str.size() - suffix.size(), suffix.data(), suffix.size()) == 0; #endif } std::string BufferUtil::binPrint(const BufferRef& data, bool spacing) { std::string s; for (size_t i = 0; i < data.size(); ++i) { if (spacing && i != 0) s += ' '; uint8_t byte = data[i]; for (size_t k = 0; k < 8; ++k) { if (byte & (1 << (7 - k))) { s += '1'; } else { s += '0'; } } } return s; } std::function<void(const uint8_t*, size_t)> BufferUtil::writer(Buffer* output) { return [output](const uint8_t* data, size_t len) { output->push_back(data, len); }; } std::function<void(const uint8_t*, size_t)> BufferUtil::writer(std::vector<uint8_t>* output) { return [output](const uint8_t* data, size_t len) { for (size_t i = 0; i < len; ++i) { output->push_back(data[i]); } }; } } // namespace xzero
christianparpart/x0
src/xzero/BufferUtil.cc
C++
mit
3,644
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import React from 'react'; import clsx from 'clsx'; import PropTypes from 'prop-types'; import { chainPropTypes, getDisplayName } from '@material-ui/utils'; import hoistNonReactStatics from 'hoist-non-react-statics'; import makeStyles from '../makeStyles'; function omit(input, fields) { const output = {}; Object.keys(input).forEach(prop => { if (fields.indexOf(prop) === -1) { output[prop] = input[prop]; } }); return output; } // styled-components's API removes the mapping between components and styles. // Using components as a low-level styling construct can be simpler. export default function styled(Component) { const componentCreator = (style, options = {}) => { const { name } = options, stylesOptions = _objectWithoutPropertiesLoose(options, ["name"]); if (process.env.NODE_ENV !== 'production' && Component === undefined) { throw new Error(['You are calling styled(Component)(style) with an undefined component.', 'You may have forgotten to import it.'].join('\n')); } let classNamePrefix = name; if (process.env.NODE_ENV !== 'production') { if (!name) { // Provide a better DX outside production. const displayName = getDisplayName(Component); if (displayName !== undefined) { classNamePrefix = displayName; } } } const stylesOrCreator = typeof style === 'function' ? theme => ({ root: props => style(_extends({ theme }, props)) }) : { root: style }; const useStyles = makeStyles(stylesOrCreator, _extends({ Component, name: name || Component.displayName, classNamePrefix }, stylesOptions)); let filterProps; let propTypes = {}; if (style.filterProps) { filterProps = style.filterProps; delete style.filterProps; } /* eslint-disable react/forbid-foreign-prop-types */ if (style.propTypes) { propTypes = style.propTypes; delete style.propTypes; } /* eslint-enable react/forbid-foreign-prop-types */ const StyledComponent = /*#__PURE__*/React.forwardRef(function StyledComponent(props, ref) { const { children, className: classNameProp, clone, component: ComponentProp } = props, other = _objectWithoutPropertiesLoose(props, ["children", "className", "clone", "component"]); const classes = useStyles(props); const className = clsx(classes.root, classNameProp); let spread = other; if (filterProps) { spread = omit(spread, filterProps); } if (clone) { return /*#__PURE__*/React.cloneElement(children, _extends({ className: clsx(children.props.className, className) }, spread)); } if (typeof children === 'function') { return children(_extends({ className }, spread)); } const FinalComponent = ComponentProp || Component; return /*#__PURE__*/React.createElement(FinalComponent, _extends({ ref: ref, className: className }, spread), children); }); process.env.NODE_ENV !== "production" ? StyledComponent.propTypes = _extends({ /** * A render function or node. */ children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]), /** * @ignore */ className: PropTypes.string, /** * If `true`, the component will recycle it's children HTML element. * It's using `React.cloneElement` internally. * * This prop will be deprecated and removed in v5 */ clone: chainPropTypes(PropTypes.bool, props => { if (props.clone && props.component) { return new Error('You can not use the clone and component prop at the same time.'); } return null; }), /** * The component used for the root node. * Either a string to use a HTML element or a component. */ component: PropTypes /* @typescript-to-proptypes-ignore */ .elementType }, propTypes) : void 0; if (process.env.NODE_ENV !== 'production') { StyledComponent.displayName = `Styled(${classNamePrefix})`; } hoistNonReactStatics(StyledComponent, Component); return StyledComponent; }; return componentCreator; }
jerednel/jerednel.github.io
node_modules/@material-ui/styles/es/styled/styled.js
JavaScript
mit
4,518
/******************************************************************************* * Copyright (c) 2014 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this distribution. * * The Eclipse Public License is available at * http://www.eclipse.org/legal/epl-v10.html * and the Eclipse Distribution License is available at * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Mike Robertson - initial contribution *******************************************************************************/ package com.ibm.iot.android.iotstarter.utils; import android.content.Context; import android.content.Intent; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.util.Log; import com.ibm.iot.android.iotstarter.IoTStarterApplication; import com.ibm.iot.android.iotstarter.fragments.IoTFragment; import java.util.Timer; import java.util.TimerTask; /** * This class implements the SensorEventListener interface. When the application creates the MQTT * connection, it registers listeners for the accelerometer and magnetometer sensors. * Output from these sensors is used to publish accel event messages. */ public class DeviceSensor implements SensorEventListener { private final String TAG = DeviceSensor.class.getName(); private static DeviceSensor instance; private IoTStarterApplication app; private SensorManager sensorManager; private Sensor accelerometer; private Sensor magnetometer; private Context context; private Timer timer; private boolean isEnabled = false; public DeviceSensor(Context context) { this.context = context; sensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); magnetometer = sensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD); app = (IoTStarterApplication) context.getApplicationContext(); } /** * @param context The application context for the object. * @return The MqttHandler object for the application. */ public static DeviceSensor getInstance(Context context) { if (instance == null) { Log.i(DeviceSensor.class.getName(), "Creating new DeviceSensor"); instance = new DeviceSensor(context); } return instance; } /** * Register the listeners for the sensors the application is interested in. */ public void enableSensor() { Log.i(TAG, ".enableSensor() entered"); if (isEnabled == false) { sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_NORMAL); sensorManager.registerListener(this, magnetometer, SensorManager.SENSOR_DELAY_NORMAL); timer = new Timer(); timer.scheduleAtFixedRate(new SendTimerTask(), 1000, 1000); isEnabled = true; } } /** * Disable the listeners. */ public void disableSensor() { Log.d(TAG, ".disableSensor() entered"); if (timer != null && isEnabled) { timer.cancel(); sensorManager.unregisterListener(this); isEnabled = false; } } // Values used for accelerometer, magnetometer, orientation sensor data float G[] = new float[3]; // gravity x,y,z float M[] = new float[3]; // geomagnetic field x,y,z float R[] = new float[9]; // rotation matrix float I[] = new float[9]; // inclination matrix float O[] = new float[3]; // orientation azimuth, pitch, roll float previousO[] = new float[3]; // orientation azimuth, pitch, roll float yaw; float W[] = new float[3]; // gravity x,y,z float SC[] = new float[1]; // step counter /** * Callback for processing data from the registered sensors. Accelerometer and magnetometer * data are used together to get orientation data. * * @param sensorEvent The event containing the sensor data values. */ @Override public void onSensorChanged(SensorEvent sensorEvent) { Log.v(TAG, "onSensorChanged() entered"); if (sensorEvent.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { Log.v(TAG, "Accelerometer -- x: " + sensorEvent.values[0] + " y: " + sensorEvent.values[1] + " z: " + sensorEvent.values[2]); G = sensorEvent.values; } else if (sensorEvent.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) { Log.v(TAG, "Magnetometer -- x: " + sensorEvent.values[0] + " y: " + sensorEvent.values[1] + " z: " + sensorEvent.values[2]); M = sensorEvent.values; } else if (sensorEvent.sensor.getType() == Sensor.TYPE_STEP_COUNTER) { Log.v(TAG, "Step counter -- x: " + sensorEvent.values[0]); SC = sensorEvent.values; } if (G != null && M != null ) { if (sensorManager.getRotationMatrix(R, I, G, M)) { previousO = O.clone(); O = sensorManager.getOrientation(R, O); yaw = O[0] - previousO[0]; Log.v(TAG, "Orientation: azimuth: " + O[0] + " pitch: " + O[1] + " roll: " + O[2] + " yaw: " + yaw); } } } /** * Callback for the SensorEventListener interface. Unused. * * @param sensor The sensor that changed. * @param i The change in accuracy for the sensor. */ @Override public void onAccuracyChanged(Sensor sensor, int i) { Log.d(TAG, "onAccuracyChanged() entered"); } /** * Timer task for sending accel data on 1000ms intervals */ private class SendTimerTask extends TimerTask { /** * Publish an accel event message. */ @Override public void run() { Log.v(TAG, "SendTimerTask.run() entered"); double lon = 0.0; double lat = 0.0; if (app.getCurrentLocation() != null) { lon = app.getCurrentLocation().getLongitude(); lat = app.getCurrentLocation().getLatitude(); } W = app.getAccelDataWatch(); SC = app.getStepCounterDataWatch(); String messageData = MessageFactory.getAccelMessage(G, O, yaw, lon, lat, W, SC); String topic; if (app.getConnectionType() == Constants.ConnectionType.QUICKSTART) { topic = TopicFactory.getEventTopic(Constants.STATUS_EVENT); } else { topic = TopicFactory.getEventTopic(Constants.ACCEL_EVENT); } MqttHandler mqttHandler = MqttHandler.getInstance(context); mqttHandler.publish(topic, messageData, false, 0); app.setAccelData(G); String runningActivity = app.getCurrentRunningActivity(); if (runningActivity != null && runningActivity.equals(IoTFragment.class.getName())) { Intent actionIntent = new Intent(Constants.APP_ID + Constants.INTENT_IOT); actionIntent.putExtra(Constants.INTENT_DATA, Constants.ACCEL_EVENT); context.sendBroadcast(actionIntent); } } } }
cllebrun/IoTwatch
app/src/main/java/com/ibm/iot/android/iotstarter/utils/DeviceSensor.java
Java
mit
7,456
<?php //session_start(); ?> <!DOCTYPE html> <html> <head> <?php require ("head.php"); ?> </head> <?php //if(isset($_SESSION['id'])){ ?> <body> <div class="container"> <div class="selection"> <h1>ACHETER UN ABONNNEMENT</h1> <form class="formed" action="" method="post"> <input type="text" name="name" readonly="readonly" value="William" class="name-secure"/><br/> <!-- <?php echo $_SESSION['name']; ?> --> <select class="select" name="options"> <option value="default">Choisir une durée</option> <option value="1">1 mois</option> <option value="3">3 mois</option> <option value="6">6 mois</option> <option value="12">1 an / 12 mois</option> </select><br/> <h4 class="inline">TYPE DE PAIEMENT : <b>PAYPAL</b> !</h4> <input type="submit" class="href3 inline" value="Payer" name="submit"> </form> <div class="more" id="element"> <div class="alert3"> <p class="alert-text">INFOS : un abonnement dure un certaine période, elle commencera au moment ou vous aurez payé , pas de remboursements possibles !</p> </div> </div> </div> </div> </body> <?php //} //else{ ?> <body> <?php //require ("problem.php"); ?> </body> <?php // } ?> </html> <?php require ("verify.php"); ?>
KamevoTeam/Kamevo
kamevo_src/shop/shop.php
PHP
mit
1,264
// // AppDelegate.h // AMTumblrHud // // Created by Mustafin Askar on 23/05/2014. // Copyright (c) 2014 Asich. All rights reserved. // #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; @end
RamVadranam/AMTumblrHud
AMTumblrHudDemo/AppDelegate.h
C
mit
391
package edu.sdsu.its.fit_welcome_tests; import edu.sdsu.its.Vault; import org.apache.log4j.Logger; import org.junit.Test; import static org.junit.Assert.assertTrue; /** * Test the Vault Environment Variable configuration and Test Connection to Vault. * The Vault must be unsealed for these tests to pass. * * @author Tom Paulus * Created on 11/3/16. */ public class TestVault { final static Logger LOGGER = Logger.getLogger(TestVault.class); /** * Check that the environment variables that are used by the Key Server are set. */ @Test public void checkENV() { final String VAULT_ADDR = System.getenv("VAULT_ADDR"); final String ROLE_ID = System.getenv("VAULT_ROLE"); final String SECRET_ID = System.getenv("VAULT_SECRET"); final String APP_NAME = System.getenv("WELCOME_APP"); LOGGER.debug("ENV.VAULT_ADDR =" + VAULT_ADDR); LOGGER.debug("ENV.ROLE_ID =" + ROLE_ID); LOGGER.debug("ENV.SECRET_ID =" + SECRET_ID); LOGGER.debug("ENV.WELCOME_APP =" + APP_NAME); assertTrue("Empty Vault Address", VAULT_ADDR != null && VAULT_ADDR.length() > 0); assertTrue("Empty Vault Role ID", ROLE_ID != null && ROLE_ID.length() > 0); assertTrue("Empty Vault Secret ID", SECRET_ID != null && SECRET_ID.length() > 0); assertTrue("Empty App Name", APP_NAME != null && APP_NAME.length() > 0); } /** * Perform a self-test of the connection to the server. * Validity of the app-name and api-key are NOT checked. */ @Test public void checkConnection() { assertTrue(Vault.testConnection()); } }
sdsu-its/welcome
src/test/java/edu/sdsu/its/fit_welcome_tests/TestVault.java
Java
mit
1,653
if(typeof Language != "undefined" && Language == 'English'){ setText({ 'flat' : 'Flat', 'folder' : 'Folder', 'rate' : 'Rate', 'subscribers' : 'Subscribers', 'domain' : 'Domain' }); // sort setText({ 'modified_on' : 'By Recency', 'modified_on:reverse' : 'By Age', 'unread_count' : 'Many unreads', 'unread_count:reverse' : 'Less unread', 'title:reverse' : 'By Title', 'rate' : 'By Rate', 'subscribers_count' : 'Many subscribers', 'subscribers_count:reverse' : 'Less subscribers' }); // api setText({ 'set_rate_complete' : 'change rate', 'create_folder_complete' : 'I created folder', 'print_discover_loading' : 'I am looking for feed. Please wait a little.', 'print_discover_notfound': 'Umm. I can not find valid feed.' }); setText({ 'prefetching' : 'prefetching.', 'prefetch_complete' : 'prefetching done.' }); // errors setText({ 'cannot_popup' : 'Please disable the pop up block for this domain to use this function.' }) } else { // japanese resource // mode setText({ 'flat' : 'フラット', 'folder' : 'フォルダ', 'rate' : 'レート', 'subscribers' : '購読者数', 'domain' : 'ドメイン' }); // sort setText({ 'modified_on' : '新着順', 'modified_on:reverse' : '旧着順', 'unread_count' : '未読が多い', 'unread_count:reverse' : '未読が少ない', 'title:reverse' : 'タイトル', 'rate' : 'レート', 'subscribers_count' : '読者が多い', 'subscribers_count:reverse' : '読者が少ない' }); // api setText({ 'set_rate_complete' : 'レートを変更しました', 'create_folder_complete' : 'フォルダを作成しました', 'print_discover_loading' : 'フィードを探しています', 'print_discover_notfound': '登録可能なフィードが見つかりませんでした' }); setText({ 'prefetching' : '先読み中', 'prefetch_complete' : '先読み完了' }); // errors setText({ 'cannot_popup' : 'この機能を使うにはポップアップブロックを解除してください。' }) // keyboard help setText({ 'close' : '閉じる', 'show more' : 'もっと表示', 'hide' : '隠す', 'open in window' : '別ウィンドウで開く' }); } /* system default */ var LDR_VARS = { LeftpaneWidth : 250, // マイフィードの幅 DefaultPrefetch : 2, // デフォルトの先読み件数 MaxPrefetch : 5, // 最大先読み件数 PrintFeedFirstNum : 3, // 初回に描画する件数 PrintFeedDelay : 500, // 2件目以降を描画するまでの待ち時間 PrintFeedDelay2 : 100, // 21件目以降を描画するまでの待ち時間 PrintFeedNum : 20, // 一度に描画する件数 SubsLimit1 : 100, // 初回にロードするSubsの件数 SubsLimit2 : 200, // 二回目以降にロードするSubsの件数 ViewModes : ['flat','folder','rate','subscribers'] }; var DefaultConfig = { current_font : 14, use_autoreload : 0, autoreload : 60, view_mode : 'folder', sort_mode : 'modified_on', touch_when : 'onload', reverse_mode : false, keep_new : false, show_all : true, max_pin : 5, prefetch_num : 2, use_wait : false, scroll_type : 'px', scroll_px : 100, limit_subs : 100, use_pinsaver : 1, use_prefetch_hack : false, use_scroll_hilight: 0, use_instant_clip : -1, use_inline_clip : 1, use_custom_clip : "off", use_clip_public : "on", use_limit_subs : 0, clip_tags : "", instant_clip_tags : "", use_instant_clip_public : "on", use_clip_ratecopy : 1, use_instant_clip_ratecopy : 1, default_public_status : 1 }; var TypeofConfig = { keep_new : 'Boolean', show_all : 'Boolean', use_autoreload : 'Boolean', use_wait : 'Boolean', use_pinsaver : 'Boolean', use_scroll_hilight: 'Boolean', use_prefetch_hack : 'Boolean', use_clip_ratecopy : 'Boolean', use_instant_clip_ratecopy : 'Boolean', reverse_mode : 'Boolean', use_inline_clip : 'Boolean', use_limit_subs : 'Boolean', default_public_status : 'Boolean', current_font : 'Number', autoreload : 'Number', scroll_px : 'Number', wait : 'Number', max_pin : 'Number', max_view : 'Number', items_per_page : 'Number', prefetch_num : 'Number', use_instant_clip : 'Number', limit_subs : 'Number', view_mode : 'String', sort_mode : 'String', touch_when : 'String', scroll_type : 'String' }; var KeyConfig = { 'read_next_subs' : 's|shift+ctrl|shift+down', 'read_prev_subs' : 'a|ctrl+shift|shift+up', 'read_head_subs' : 'w|shift+home', 'read_end_subs' : 'W|shift+end', 'feed_next' : '>|J', 'feed_prev' : '<|K', 'reload_subs' : 'r', 'scroll_next_page' : 'space|pagedown', 'scroll_prev_page' : 'shift+space|pageup', 'pin' : 'p', 'open_pin' : 'o', 'view_original' : 'v|ctrl+enter', 'scroll_next_item' : 'j|enter', 'scroll_prev_item' : 'k|shift+enter', 'compact' : 'c', 'focus_findbox' : 'f', 'blur_findbox' : 'esc', 'unsubscribe' : 'delete', 'toggle_leftpane' : 'z', 'toggle_fullscreen': 'Z', 'toggle_keyhelp' : '?' }; var KeyHelp = { 'scroll_next_item' : '次のアイテム', 'scroll_prev_item' : '前のアイテム', 'scroll_next_page' : '下にスクロール', 'scroll_prev_page' : '上にスクロール', 'feed_next' : '過去の記事に移動', 'feed_prev' : '未来の記事に移動', 'view_original' : '元記事を開く', 'pin' : 'ピンを付ける / 外す', 'open_pin' : 'ピンを開く', 'toggle_clip' : 'クリップボタン', 'instant_clip' : '一発クリップ', 'compact' : '本文の表示 / 非表示', 'unsubscribe' : '購読停止', 'reload_subs' : 'フィード一覧の更新', 'toggle_leftpane' : 'マイフィードを畳む / 戻す', 'focus_findbox' : '検索ボックスに移動', 'read_next_subs' : '次のフィードに移動', 'read_prev_subs' : '前のフィードに移動', 'read_head_subs' : '最初の未読に移動', 'read_end_subs' : '最後の未読に移動', 'toggle_keyhelp' : 'ヘルプを表示 / 非表示' }; var KeyHelpOrder = [ [ 'read_next_subs', 'scroll_next_item', 'pin' ], [ 'read_prev_subs', 'scroll_prev_item', 'open_pin'], [ 'reload_subs', 'unsubscribe', 'view_original'], [ 'compact', 'scroll_next_page', 'feed_next'], [ '', 'scroll_prev_page', 'feed_prev'], [ '', 'toggle_leftpane', 'focus_findbox'], [ '', 'toggle_clip', 'instant_clip'] ];
cuzic/fastmars
public/js/reader_pref.js
JavaScript
mit
6,701
// NSOperation-WebFetches-MadeEasy (TM) // Copyright (C) 2012 by David Hoerl // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // @protocol OperationsRunnerProtocol <NSObject> - (void)operationFinished:(NSOperation *)op; // can get this on main thread (default) or anyThread (flag below) @end
lydonchandra/PhotoScrollerNetwork
PhotoScroller/Classes/OperationsRunnerProtocol.h
C
mit
1,324
<html dir="LTR"> <head> <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" /> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" /> <title>Sender Property</title> <xml> </xml> <link rel="stylesheet" type="text/css" href="MSDN.css" /> </head> <body id="bodyID" class="dtBODY"> <div id="nsbanner"> <div id="bannerrow1"> <table class="bannerparthead" cellspacing="0"> <tr id="hdr"> <td class="runninghead">Apache log4net™ SDK Documentation - Microsoft .NET Framework 4.0</td> <td class="product"> </td> </tr> </table> </div> <div id="TitleRow"> <h1 class="dtH1">NetSendAppender.Sender Property</h1> </div> </div> <div id="nstext"> <p> Gets or sets the sender of the message. </p> <div class="syntax"> <span class="lang">[Visual Basic]</span> <br />Public Property Sender As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">String</a></div> <div class="syntax"> <span class="lang">[C#]</span> <br />public <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">string</a> Sender {get; set;}</div> <p> </p> <h4 class="dtH4">Property Value</h4> <p> The sender of the message. </p> <h4 class="dtH4">Remarks</h4> <p> If this property is not specified, the message is sent from the local computer. </p> <h4 class="dtH4">See Also</h4> <p> <a href="log4net.Appender.NetSendAppender.html">NetSendAppender Class</a> | <a href="log4net.Appender.html">log4net.Appender Namespace</a></p> <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;"> <param name="Keyword" value="Sender property"> </param> <param name="Keyword" value="Sender property, NetSendAppender class"> </param> <param name="Keyword" value="NetSendAppender.Sender property"> </param> </object> <hr /> <div id="footer"><a href='http://logging.apache.org/log4net/'>Copyright 2004-2013 The Apache Software Foundation.</a><br></br>Apache log4net, Apache and log4net are trademarks of The Apache Software Foundation.</div> </div> </body> </html>
YOTOV-LIMITED/pokerleaguemanager
lib/Log4net 1.2.13/doc/release/sdk/log4net.Appender.NetSendAppender.Sender.html
HTML
mit
2,424
/** @jsx React.DOM */ 'use strict'; // Boats is for presentation, No change. var AllBoatClass = React.createClass({displayName: 'AllBoatClass', render:function(){ var boats = this.props.boat return( React.DOM.li(null, "All Boats", React.DOM.span({className:"boat"}, {data: data}) ) ) } }); React.render(AllBoatClass(null), document.getElementById('boatname') );
Shauky/divendive
content/themes/traveller/assets/src/scripts/.module-cache/1431fe665c487a5eb3e05fb17156d702e3e4b464.js
JavaScript
mit
404
/* layout –––––––––––––––––––––––––––––––––––––––––––––––––– */ #sidebar { position: fixed; width: 20%; top: 0; bottom: 0; } #container, footer { margin-left: 20%; } /* background-colors –––––––––––––––––––––––––––––––––––––––––––––––––– */ #sidebar { background-color: #484848; } body { background-color: #F8F8F8; } /* paddings –––––––––––––––––––––––––––––––––––––––––––––––––– */ .sidebar { padding: 2rem; height: 100%; } #container { padding: 2rem 4rem;; } footer { padding: 1rem; } /* sidebar –––––––––––––––––––––––––––––––––––––––––––––––––– */ .sidebar-about { text-align: center; margin-bottom: 15px; } .sidebar-about img { box-shadow: 0 0 20px rgba(0, 0, 0, 0.9); } .sidebar-about a{ color:#fff; text-decoration: none; } .sidebar-tagline { font-size: 2rem; color: #b2b87a; text-shadow: 0px 0px 15px #0A0F10; line-height: 1; } .sidebar-nav { margin: 20px -20px; padding: 0px 20px; } .side-tags{ position:relative; margin: 0px -20px; padding: 5px; height:200px; } a.sidebar-tags-link { position:absolute; top:0px; left:0px; font-weight:bold; color: #b5bd68; font-size: 18px; text-decoration: none; padding: 5px; background:grey; } a.sidebar-tags-link:hover { color: #ffa; } .sidebar-nav-list { margin: auto; list-style-type: none; } a.sidebar-link { color: #b5bd68; font-size: 20px; text-decoration: none; transition: all 0.2s ease-in-out 0s; } a.sidebar-link:hover { color: #ffa; padding-left: 10px; } .sidebar-nav-item.nav-home { margin-bottom: 40px; } .sidebar-nav-item.nav-home .genericon-home, .sidebar-nav-item.nav-home a { color: #1EAEDB; } .sidebar-nav-item .genericon { color: #DE935F; font-size: 22px; margin-top: 4px; margin-right: 10px; transition: all 0.5s ease; } .sidebar-nav-item .genericon:hover{ transform: scale(1.5); } .sidebar-externals { margin-top: 30px; text-align: center; font-size: 30px; } .sidebar-externals a { font-size: 30px; vertical-align: middle; color: #b5bd68; } .sidebar-externals a:hover { color: #ffa; } .sidebar-bottom { position: absolute; bottom: 0; color: rgba(255,255,255,.5); font-size: 16px; padding: 2rem; } .sidebar-bottom p { margin: 0; } .sidebar-bottom a { text-decoration: none; } @media screen and (max-height:830px) { .sidebar-bottom { display: none; } } @media screen and (max-width:1600px) { .sidebar-bottom { display: none; } } /* home –––––––––––––––––––––––––––––––––––––––––––––––––– */ .post-infos, .footnote { font-family: verdana,arial,helvetica,sans-serif; color: #888; font-size: x-small; margin-bottom: 0; } .post-infos { color: #AAA; text-transform: uppercase; letter-spacing: 0.1em; border-bottom: 1px solid #EEE; } .post-header h2 { font-family: Arial,sans-serif; margin-top: 4px; } section.post { margin-bottom: 30px; } .section { width: 60%; margin: auto; font-size: 20px; } .section .posts { list-style-type: disc; } .section .posts li a { color:#369; text-decoration: none; } .section .posts li a:hover { text-decoration: underline; } .section time { float: right; color: #c9c9c9; font-family: "Helvetica Neue", helvetica, "Open Sans", sans-serif; text-shadow: 1px 1px #fff; } /* post –––––––––––––––––––––––––––––––––––––––––––––––––– */ .post { font-family: proxima-nova,"Helvetica Neue",Helvetica,Roboto,Arial,sans-serif; color: #484848; font-size: 16px; line-height: 25px; text-align: justify; } .post .genericon { vertical-align: middle; } .post ul { padding-left: 30px; } .post a { color: #c05b4d; text-decoration: none; } .post a:hover { color: #a5473a; text-decoration: underline; } a.readmore { color: #484848; background-color: #C05B4D; padding: 6px 20px; } a.readmore:hover { color: #C05B4D; background-color: #484848; text-decoration: none; } .post h1 { color: #C05B4D; font-weight:900; font-size: 26px; letter-spacing:normal; font-variant:small-caps; } .post h2 { color: #C05B4D; font-size: 22px; letter-spacing:normal; } .post h3 { color: #C05B4D; font-size: 21px; letter-spacing:normal; } .post h4 { color: #C05B4D; font-size: 20px; letter-spacing:normal; } .post h5 { color: #C05B4D; font-size: 19px; letter-spacing: normal; } .post h6 { color: #C05B4D; font-size: 18px; letter-spacing: normal; } #post-header h1 { font-weight: bold; } /*pre and next ---------------------------------------------------*/ .prenext{ float:right; color:grey; font-size: 20px; line-height: 25px; padding:20px,50px; margin:10px; } .prenext a { color:#b2b87a; font-weight: bold; text-decoration: none; } /* payment –––––––––––––––––––––––––––––––––––––––––––––––––– */ .payment{ margin:20px 0; } /* TableOfContents –––––––––––––––––––––––––––––––––––––––––––––––––– */ .mlistence { float: left; width: 100%; padding: 0 0 2rem 2rem; border-left: 1px solid #eee; font-size: 0.9rem; background:#ad826d; } .mlistence a{ color:#aabd68; } .toc { float: right; width: 20%; padding: 0 0 2rem 2rem; border-left: 1px solid #eee; font-size: 0.9rem; } .toc-label { font-size: 2rem; color: #de935f; font-variant:small-caps; } #TableOfContents { padding-top: 1rem; } #TableOfContents a { letter-spacing: 0.05rem; text-transform: uppercase; font-size: 0.85rem; text-decoration: none; line-height: 1.5rem; color: #de935f; } /* footer –––––––––––––––––––––––––––––––––––––––––––––––––– */ footer { text-align: center; } .footnote a { color: #888; } .footnote a:hover{ text-decoration: underline; color:#369; } /* shortcodes –––––––––––––––––––––––––––––––––––––––––––––––––– */ .youtube-player { border: 0; }
lynn8570/lynn8570-hugo
static/css/custom.css
CSS
mit
6,438
#!/usr/bin/python # -*- coding: utf-8 -*- from holmes.validators.base import Validator from holmes.utils import _ class ImageAltValidator(Validator): @classmethod def get_without_alt_parsed_value(cls, value): result = [] for src, name in value: data = '<a href="%s" target="_blank">%s</a>' % (src, name) result.append(data) return {'images': ', '.join(result)} @classmethod def get_alt_too_big_parsed_value(cls, value): result = [] for src, name, alt in value['images']: data = u'<a href="{}" alt="{}" target="_blank">{}</a>'.format( src, alt, name ) result.append(data) return { 'max_size': value['max_size'], 'images': ', '.join(result) } @classmethod def get_violation_definitions(cls): return { 'invalid.images.alt': { 'title': _('Image(s) without alt attribute'), 'description': _( 'Images without alt text are not good for ' 'Search Engines. Images without alt were ' 'found for: %(images)s.'), 'value_parser': cls.get_without_alt_parsed_value, 'category': _('SEO'), 'generic_description': _( 'Images without alt attribute are not good for ' 'search engines. They are searchable by the content ' 'of this attribute, so if it\'s empty, it cause bad ' 'indexing optimization.' ) }, 'invalid.images.alt_too_big': { 'title': _('Image(s) with alt attribute too big'), 'description': _( 'Images with alt text bigger than %(max_size)d chars are ' 'not good for search engines. Images with a too big alt ' 'were found for: %(images)s.'), 'value_parser': cls.get_alt_too_big_parsed_value, 'category': _('SEO'), 'generic_description': _( 'Images with alt text too long are not good to SEO. ' 'This maximum value are configurable ' 'by Holmes configuration.' ), 'unit': 'number' } } @classmethod def get_default_violations_values(cls, config): return { 'invalid.images.alt_too_big': { 'value': config.MAX_IMAGE_ALT_SIZE, 'description': config.get_description('MAX_IMAGE_ALT_SIZE') } } def validate(self): max_alt_size = self.get_violation_pref('invalid.images.alt_too_big') imgs = self.get_imgs() result_no_alt = [] result_alt_too_big = [] for img in imgs: src = img.get('src') if not src: continue src = self.normalize_url(src) img_alt = img.get('alt') if src: name = src.rsplit('/', 1)[-1] if not img_alt: result_no_alt.append((src, name)) elif len(img_alt) > max_alt_size: result_alt_too_big.append((src, name, img_alt)) if result_no_alt: self.add_violation( key='invalid.images.alt', value=result_no_alt, points=20 * len(result_no_alt) ) if result_alt_too_big: self.add_violation( key='invalid.images.alt_too_big', value={ 'images': result_alt_too_big, 'max_size': max_alt_size }, points=20 * len(result_alt_too_big) ) def get_imgs(self): return self.review.data.get('page.all_images', None)
holmes-app/holmes-api
holmes/validators/image_alt.py
Python
mit
3,935
module Kuromoji VERSION = '0.0.4' end
yalab/kuromoji-ruby
lib/kuromoji/version.rb
Ruby
mit
40
module Shoulda module Matchers module ActiveModel # The `validate_numericality_of` matcher tests usage of the # `validates_numericality_of` validation. # # class Person # include ActiveModel::Model # attr_accessor :gpa # # validates_numericality_of :gpa # end # # # RSpec # RSpec.describe Person, type: :model do # it { should validate_numericality_of(:gpa) } # end # # # Minitest (Shoulda) # class PersonTest < ActiveSupport::TestCase # should validate_numericality_of(:gpa) # end # # #### Qualifiers # # ##### on # # Use `on` if your validation applies only under a certain context. # # class Person # include ActiveModel::Model # attr_accessor :number_of_dependents # # validates_numericality_of :number_of_dependents, on: :create # end # # # RSpec # RSpec.describe Person, type: :model do # it do # should validate_numericality_of(:number_of_dependents). # on(:create) # end # end # # # Minitest (Shoulda) # class PersonTest < ActiveSupport::TestCase # should validate_numericality_of(:number_of_dependents).on(:create) # end # # ##### only_integer # # Use `only_integer` to test usage of the `:only_integer` option. This # asserts that your attribute only allows integer numbers and disallows # non-integer ones. # # class Person # include ActiveModel::Model # attr_accessor :age # # validates_numericality_of :age, only_integer: true # end # # # RSpec # RSpec.describe Person, type: :model do # it { should validate_numericality_of(:age).only_integer } # end # # # Minitest (Shoulda) # class PersonTest < ActiveSupport::TestCase # should validate_numericality_of(:age).only_integer # end # # ##### is_less_than # # Use `is_less_than` to test usage of the the `:less_than` option. This # asserts that the attribute can take a number which is less than the # given value and cannot take a number which is greater than or equal to # it. # # class Person # include ActiveModel::Model # attr_accessor :number_of_cars # # validates_numericality_of :number_of_cars, less_than: 2 # end # # # RSpec # RSpec.describe Person, type: :model do # it do # should validate_numericality_of(:number_of_cars). # is_less_than(2) # end # end # # # Minitest (Shoulda) # class PersonTest < ActiveSupport::TestCase # should validate_numericality_of(:number_of_cars). # is_less_than(2) # end # # ##### is_less_than_or_equal_to # # Use `is_less_than_or_equal_to` to test usage of the # `:less_than_or_equal_to` option. This asserts that the attribute can # take a number which is less than or equal to the given value and cannot # take a number which is greater than it. # # class Person # include ActiveModel::Model # attr_accessor :birth_year # # validates_numericality_of :birth_year, less_than_or_equal_to: 1987 # end # # # RSpec # RSpec.describe Person, type: :model do # it do # should validate_numericality_of(:birth_year). # is_less_than_or_equal_to(1987) # end # end # # # Minitest (Shoulda) # class PersonTest < ActiveSupport::TestCase # should validate_numericality_of(:birth_year). # is_less_than_or_equal_to(1987) # end # # ##### is_equal_to # # Use `is_equal_to` to test usage of the `:equal_to` option. This asserts # that the attribute can take a number which is equal to the given value # and cannot take a number which is not equal. # # class Person # include ActiveModel::Model # attr_accessor :weight # # validates_numericality_of :weight, equal_to: 150 # end # # # RSpec # RSpec.describe Person, type: :model do # it { should validate_numericality_of(:weight).is_equal_to(150) } # end # # # Minitest (Shoulda) # class PersonTest < ActiveSupport::TestCase # should validate_numericality_of(:weight).is_equal_to(150) # end # # ##### is_greater_than_or_equal_to # # Use `is_greater_than_or_equal_to` to test usage of the # `:greater_than_or_equal_to` option. This asserts that the attribute can # take a number which is greater than or equal to the given value and # cannot take a number which is less than it. # # class Person # include ActiveModel::Model # attr_accessor :height # # validates_numericality_of :height, greater_than_or_equal_to: 55 # end # # # RSpec # RSpec.describe Person, type: :model do # it do # should validate_numericality_of(:height). # is_greater_than_or_equal_to(55) # end # end # # # Minitest (Shoulda) # class PersonTest < ActiveSupport::TestCase # should validate_numericality_of(:height). # is_greater_than_or_equal_to(55) # end # # ##### is_greater_than # # Use `is_greater_than` to test usage of the `:greater_than` option. # This asserts that the attribute can take a number which is greater than # the given value and cannot take a number less than or equal to it. # # class Person # include ActiveModel::Model # attr_accessor :legal_age # # validates_numericality_of :legal_age, greater_than: 21 # end # # # RSpec # RSpec.describe Person, type: :model do # it do # should validate_numericality_of(:legal_age). # is_greater_than(21) # end # end # # # Minitest (Shoulda) # class PersonTest < ActiveSupport::TestCase # should validate_numericality_of(:legal_age). # is_greater_than(21) # end # # ##### is_other_than # # Use `is_other_than` to test usage of the `:other_than` option. # This asserts that the attribute can take a number which is not equal to # the given value. # # class Person # include ActiveModel::Model # attr_accessor :legal_age # # validates_numericality_of :legal_age, other_than: 21 # end # # # RSpec # RSpec.describe Person, type: :model do # it do # should validate_numericality_of(:legal_age). # is_other_than(21) # end # end # # # Minitest (Shoulda) # class PersonTest < ActiveSupport::TestCase # should validate_numericality_of(:legal_age). # is_other_than(21) # end # # ##### even # # Use `even` to test usage of the `:even` option. This asserts that the # attribute can take odd numbers and cannot take even ones. # # class Person # include ActiveModel::Model # attr_accessor :birth_month # # validates_numericality_of :birth_month, even: true # end # # # RSpec # RSpec.describe Person, type: :model do # it { should validate_numericality_of(:birth_month).even } # end # # # Minitest (Shoulda) # class PersonTest < ActiveSupport::TestCase # should validate_numericality_of(:birth_month).even # end # # ##### odd # # Use `odd` to test usage of the `:odd` option. This asserts that the # attribute can take a number which is odd and cannot take a number which # is even. # # class Person # include ActiveModel::Model # attr_accessor :birth_day # # validates_numericality_of :birth_day, odd: true # end # # # RSpec # RSpec.describe Person, type: :model do # it { should validate_numericality_of(:birth_day).odd } # end # # # Minitest (Shoulda) # class PersonTest < ActiveSupport::TestCase # should validate_numericality_of(:birth_day).odd # end # # ##### with_message # # Use `with_message` if you are using a custom validation message. # # class Person # include ActiveModel::Model # attr_accessor :number_of_dependents # # validates_numericality_of :number_of_dependents, # message: 'Number of dependents must be a number' # end # # # RSpec # RSpec.describe Person, type: :model do # it do # should validate_numericality_of(:number_of_dependents). # with_message('Number of dependents must be a number') # end # end # # # Minitest (Shoulda) # class PersonTest < ActiveSupport::TestCase # should validate_numericality_of(:number_of_dependents). # with_message('Number of dependents must be a number') # end # # ##### allow_nil # # Use `allow_nil` to assert that the attribute allows nil. # # class Post # include ActiveModel::Model # attr_accessor :age # # validates_numericality_of :age, allow_nil: true # end # # # RSpec # RSpec.describe Post, type: :model do # it { should validate_numericality_of(:age).allow_nil } # end # # # Minitest (Shoulda) # class PostTest < ActiveSupport::TestCase # should validate_numericality_of(:age).allow_nil # end # # @return [ValidateNumericalityOfMatcher] # def validate_numericality_of(attr) ValidateNumericalityOfMatcher.new(attr) end # @private class ValidateNumericalityOfMatcher NUMERIC_NAME = 'number'.freeze DEFAULT_DIFF_TO_COMPARE = 1 include Qualifiers::IgnoringInterferenceByWriter attr_reader :diff_to_compare def initialize(attribute) super @attribute = attribute @submatchers = [] @diff_to_compare = DEFAULT_DIFF_TO_COMPARE @expects_custom_validation_message = false @expects_to_allow_nil = false @expects_strict = false @allowed_type_adjective = nil @allowed_type_name = 'number' @context = nil @expected_message = nil end def strict @expects_strict = true self end def expects_strict? @expects_strict end def only_integer prepare_submatcher( NumericalityMatchers::OnlyIntegerMatcher.new(self, @attribute), ) self end def allow_nil @expects_to_allow_nil = true prepare_submatcher( AllowValueMatcher.new(nil). for(@attribute). with_message(:not_a_number), ) self end def expects_to_allow_nil? @expects_to_allow_nil end def odd prepare_submatcher( NumericalityMatchers::OddNumberMatcher.new(self, @attribute), ) self end def even prepare_submatcher( NumericalityMatchers::EvenNumberMatcher.new(self, @attribute), ) self end def is_greater_than(value) prepare_submatcher(comparison_matcher_for(value, :>).for(@attribute)) self end def is_greater_than_or_equal_to(value) prepare_submatcher(comparison_matcher_for(value, :>=).for(@attribute)) self end def is_equal_to(value) prepare_submatcher(comparison_matcher_for(value, :==).for(@attribute)) self end def is_less_than(value) prepare_submatcher(comparison_matcher_for(value, :<).for(@attribute)) self end def is_less_than_or_equal_to(value) prepare_submatcher(comparison_matcher_for(value, :<=).for(@attribute)) self end def is_other_than(value) prepare_submatcher(comparison_matcher_for(value, :!=).for(@attribute)) self end def with_message(message) @expects_custom_validation_message = true @expected_message = message self end def expects_custom_validation_message? @expects_custom_validation_message end def on(context) @context = context self end def matches?(subject) matches_or_does_not_match?(subject) first_submatcher_that_fails_to_match.nil? end def does_not_match?(subject) matches_or_does_not_match?(subject) first_submatcher_that_fails_to_not_match.nil? end def simple_description description = '' description << "validate that :#{@attribute} looks like " description << Shoulda::Matchers::Util.a_or_an(full_allowed_type) if comparison_descriptions.present? description << " #{comparison_descriptions}" end description end def description ValidationMatcher::BuildDescription.call(self, simple_description) end def failure_message overall_failure_message.dup.tap do |message| message << "\n" message << failure_message_for_first_submatcher_that_fails_to_match end end def failure_message_when_negated overall_failure_message_when_negated.dup.tap do |message| message << "\n" message << failure_message_for_first_submatcher_that_fails_to_not_match end end def given_numeric_column? attribute_is_active_record_column? && [:integer, :float, :decimal].include?(column_type) end private def matches_or_does_not_match?(subject) @subject = subject @number_of_submatchers = @submatchers.size add_disallow_value_matcher qualify_submatchers end def overall_failure_message Shoulda::Matchers.word_wrap( "Expected #{model.name} to #{description}, but this could not "\ 'be proved.', ) end def overall_failure_message_when_negated Shoulda::Matchers.word_wrap( "Expected #{model.name} not to #{description}, but this could not "\ 'be proved.', ) end def attribute_is_active_record_column? columns_hash.key?(@attribute.to_s) end def column_type columns_hash[@attribute.to_s].type end def columns_hash if @subject.class.respond_to?(:columns_hash) @subject.class.columns_hash else {} end end def add_disallow_value_matcher disallow_value_matcher = DisallowValueMatcher. new(non_numeric_value). for(@attribute). with_message(:not_a_number) add_submatcher(disallow_value_matcher) end def prepare_submatcher(submatcher) add_submatcher(submatcher) submatcher end def comparison_matcher_for(value, operator) NumericalityMatchers::ComparisonMatcher. new(self, value, operator). for(@attribute) end def add_submatcher(submatcher) if submatcher.respond_to?(:allowed_type_name) @allowed_type_name = submatcher.allowed_type_name end if submatcher.respond_to?(:allowed_type_adjective) @allowed_type_adjective = submatcher.allowed_type_adjective end if submatcher.respond_to?(:diff_to_compare) @diff_to_compare = [ @diff_to_compare, submatcher.diff_to_compare, ].max end @submatchers << submatcher end def qualify_submatchers @submatchers.each do |submatcher| if @expects_strict submatcher.strict(@expects_strict) end if @expected_message.present? submatcher.with_message(@expected_message) end if @context submatcher.on(@context) end submatcher.ignoring_interference_by_writer( ignore_interference_by_writer, ) end end def number_of_submatchers_for_failure_message if has_been_qualified? @submatchers.size - 1 else @submatchers.size end end def has_been_qualified? @submatchers.any? do |submatcher| Shoulda::Matchers::RailsShim.parent_of(submatcher.class) == NumericalityMatchers end end def first_submatcher_that_fails_to_match @_first_submatcher_that_fails_to_match ||= @submatchers.detect do |submatcher| !submatcher.matches?(@subject) end end def first_submatcher_that_fails_to_not_match @_first_submatcher_that_fails_to_not_match ||= @submatchers.detect do |submatcher| !submatcher.does_not_match?(@subject) end end def failure_message_for_first_submatcher_that_fails_to_match build_submatcher_failure_message_for( first_submatcher_that_fails_to_match, :failure_message, ) end def failure_message_for_first_submatcher_that_fails_to_not_match build_submatcher_failure_message_for( first_submatcher_that_fails_to_not_match, :failure_message_when_negated, ) end def build_submatcher_failure_message_for( submatcher, failure_message_method ) failure_message = submatcher.public_send(failure_message_method) submatcher_description = submatcher.simple_description. sub(/\bvalidate that\b/, 'validates'). sub(/\bdisallow\b/, 'disallows'). sub(/\ballow\b/, 'allows') submatcher_message = if number_of_submatchers_for_failure_message > 1 "In checking that #{model.name} #{submatcher_description}, " + failure_message[0].downcase + failure_message[1..] else failure_message end Shoulda::Matchers.word_wrap(submatcher_message, indent: 2) end def full_allowed_type "#{@allowed_type_adjective} #{@allowed_type_name}".strip end def comparison_descriptions description_array = submatcher_comparison_descriptions if description_array.empty? '' else submatcher_comparison_descriptions.join(' and ') end end def submatcher_comparison_descriptions @submatchers.inject([]) do |arr, submatcher| if submatcher.respond_to? :comparison_description arr << submatcher.comparison_description end arr end end def model @subject.class end def non_numeric_value 'abcd' end end end end end
thoughtbot/shoulda-matchers
lib/shoulda/matchers/active_model/validate_numericality_of_matcher.rb
Ruby
mit
20,746
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Serializer\Normalizer; use Symfony\Component\PropertyAccess\Exception\InvalidArgumentException; use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\PropertyInfo\Type; use Symfony\Component\Serializer\Encoder\JsonEncoder; use Symfony\Component\Serializer\Exception\ExtraAttributesException; use Symfony\Component\Serializer\Exception\LogicException; use Symfony\Component\Serializer\Exception\NotNormalizableValueException; use Symfony\Component\Serializer\Exception\RuntimeException; use Symfony\Component\Serializer\Mapping\AttributeMetadataInterface; use Symfony\Component\Serializer\Mapping\ClassDiscriminatorFromClassMetadata; use Symfony\Component\Serializer\Mapping\ClassDiscriminatorResolverInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; /** * Base class for a normalizer dealing with objects. * * @author Kévin Dunglas <dunglas@gmail.com> */ abstract class AbstractObjectNormalizer extends AbstractNormalizer { /** * Set to true to respect the max depth metadata on fields. */ public const ENABLE_MAX_DEPTH = 'enable_max_depth'; /** * How to track the current depth in the context. */ public const DEPTH_KEY_PATTERN = 'depth_%s::%s'; /** * While denormalizing, we can verify that types match. * * You can disable this by setting this flag to true. */ public const DISABLE_TYPE_ENFORCEMENT = 'disable_type_enforcement'; /** * Flag to control whether fields with the value `null` should be output * when normalizing or omitted. */ public const SKIP_NULL_VALUES = 'skip_null_values'; /** * Callback to allow to set a value for an attribute when the max depth has * been reached. * * If no callback is given, the attribute is skipped. If a callable is * given, its return value is used (even if null). * * The arguments are: * * - mixed $attributeValue value of this field * - object $object the whole object being normalized * - string $attributeName name of the attribute being normalized * - string $format the requested format * - array $context the serialization context */ public const MAX_DEPTH_HANDLER = 'max_depth_handler'; /** * Specify which context key are not relevant to determine which attributes * of an object to (de)normalize. */ public const EXCLUDE_FROM_CACHE_KEY = 'exclude_from_cache_key'; /** * Flag to tell the denormalizer to also populate existing objects on * attributes of the main object. * * Setting this to true is only useful if you also specify the root object * in OBJECT_TO_POPULATE. */ public const DEEP_OBJECT_TO_POPULATE = 'deep_object_to_populate'; public const PRESERVE_EMPTY_OBJECTS = 'preserve_empty_objects'; private $propertyTypeExtractor; private $typesCache = []; private $attributesCache = []; private $objectClassResolver; /** * @var ClassDiscriminatorResolverInterface|null */ protected $classDiscriminatorResolver; public function __construct(ClassMetadataFactoryInterface $classMetadataFactory = null, NameConverterInterface $nameConverter = null, PropertyTypeExtractorInterface $propertyTypeExtractor = null, ClassDiscriminatorResolverInterface $classDiscriminatorResolver = null, callable $objectClassResolver = null, array $defaultContext = []) { parent::__construct($classMetadataFactory, $nameConverter, $defaultContext); if (isset($this->defaultContext[self::MAX_DEPTH_HANDLER]) && !\is_callable($this->defaultContext[self::MAX_DEPTH_HANDLER])) { throw new InvalidArgumentException(sprintf('The "%s" given in the default context is not callable.', self::MAX_DEPTH_HANDLER)); } $this->defaultContext[self::EXCLUDE_FROM_CACHE_KEY] = array_merge($this->defaultContext[self::EXCLUDE_FROM_CACHE_KEY] ?? [], [self::CIRCULAR_REFERENCE_LIMIT_COUNTERS]); $this->propertyTypeExtractor = $propertyTypeExtractor; if (null === $classDiscriminatorResolver && null !== $classMetadataFactory) { $classDiscriminatorResolver = new ClassDiscriminatorFromClassMetadata($classMetadataFactory); } $this->classDiscriminatorResolver = $classDiscriminatorResolver; $this->objectClassResolver = $objectClassResolver; } /** * {@inheritdoc} */ public function supportsNormalization($data, string $format = null) { return \is_object($data) && !$data instanceof \Traversable; } /** * {@inheritdoc} */ public function normalize($object, string $format = null, array $context = []) { if (!isset($context['cache_key'])) { $context['cache_key'] = $this->getCacheKey($format, $context); } if (isset($context[self::CALLBACKS])) { if (!\is_array($context[self::CALLBACKS])) { throw new InvalidArgumentException(sprintf('The "%s" context option must be an array of callables.', self::CALLBACKS)); } foreach ($context[self::CALLBACKS] as $attribute => $callback) { if (!\is_callable($callback)) { throw new InvalidArgumentException(sprintf('Invalid callback found for attribute "%s" in the "%s" context option.', $attribute, self::CALLBACKS)); } } } if ($this->isCircularReference($object, $context)) { return $this->handleCircularReference($object, $format, $context); } $data = []; $stack = []; $attributes = $this->getAttributes($object, $format, $context); $class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object); $attributesMetadata = $this->classMetadataFactory ? $this->classMetadataFactory->getMetadataFor($class)->getAttributesMetadata() : null; if (isset($context[self::MAX_DEPTH_HANDLER])) { $maxDepthHandler = $context[self::MAX_DEPTH_HANDLER]; if (!\is_callable($maxDepthHandler)) { throw new InvalidArgumentException(sprintf('The "%s" given in the context is not callable.', self::MAX_DEPTH_HANDLER)); } } else { $maxDepthHandler = null; } foreach ($attributes as $attribute) { $maxDepthReached = false; if (null !== $attributesMetadata && ($maxDepthReached = $this->isMaxDepthReached($attributesMetadata, $class, $attribute, $context)) && !$maxDepthHandler) { continue; } $attributeValue = $this->getAttributeValue($object, $attribute, $format, $context); if ($maxDepthReached) { $attributeValue = $maxDepthHandler($attributeValue, $object, $attribute, $format, $context); } /** * @var callable|null */ $callback = $context[self::CALLBACKS][$attribute] ?? $this->defaultContext[self::CALLBACKS][$attribute] ?? null; if ($callback) { $attributeValue = $callback($attributeValue, $object, $attribute, $format, $context); } if (null !== $attributeValue && !is_scalar($attributeValue)) { $stack[$attribute] = $attributeValue; } $data = $this->updateData($data, $attribute, $attributeValue, $class, $format, $context); } foreach ($stack as $attribute => $attributeValue) { if (!$this->serializer instanceof NormalizerInterface) { throw new LogicException(sprintf('Cannot normalize attribute "%s" because the injected serializer is not a normalizer.', $attribute)); } $data = $this->updateData($data, $attribute, $this->serializer->normalize($attributeValue, $format, $this->createChildContext($context, $attribute, $format)), $class, $format, $context); } if (isset($context[self::PRESERVE_EMPTY_OBJECTS]) && !\count($data)) { return new \ArrayObject(); } return $data; } /** * {@inheritdoc} */ protected function instantiateObject(array &$data, string $class, array &$context, \ReflectionClass $reflectionClass, $allowedAttributes, string $format = null) { if ($this->classDiscriminatorResolver && $mapping = $this->classDiscriminatorResolver->getMappingForClass($class)) { if (!isset($data[$mapping->getTypeProperty()])) { throw new RuntimeException(sprintf('Type property "%s" not found for the abstract object "%s".', $mapping->getTypeProperty(), $class)); } $type = $data[$mapping->getTypeProperty()]; if (null === ($mappedClass = $mapping->getClassForType($type))) { throw new RuntimeException(sprintf('The type "%s" has no mapped class for the abstract object "%s".', $type, $class)); } if ($mappedClass !== $class) { return $this->instantiateObject($data, $mappedClass, $context, new \ReflectionClass($mappedClass), $allowedAttributes, $format); } } return parent::instantiateObject($data, $class, $context, $reflectionClass, $allowedAttributes, $format); } /** * Gets and caches attributes for the given object, format and context. * * @param object $object * * @return string[] */ protected function getAttributes($object, ?string $format, array $context) { $class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object); $key = $class.'-'.$context['cache_key']; if (isset($this->attributesCache[$key])) { return $this->attributesCache[$key]; } $allowedAttributes = $this->getAllowedAttributes($object, $context, true); if (false !== $allowedAttributes) { if ($context['cache_key']) { $this->attributesCache[$key] = $allowedAttributes; } return $allowedAttributes; } $attributes = $this->extractAttributes($object, $format, $context); if ($this->classDiscriminatorResolver && $mapping = $this->classDiscriminatorResolver->getMappingForMappedObject($object)) { array_unshift($attributes, $mapping->getTypeProperty()); } if ($context['cache_key'] && \stdClass::class !== $class) { $this->attributesCache[$key] = $attributes; } return $attributes; } /** * Extracts attributes to normalize from the class of the given object, format and context. * * @return string[] */ abstract protected function extractAttributes(object $object, string $format = null, array $context = []); /** * Gets the attribute value. * * @return mixed */ abstract protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []); /** * {@inheritdoc} */ public function supportsDenormalization($data, string $type, string $format = null) { return class_exists($type) || (interface_exists($type, false) && $this->classDiscriminatorResolver && null !== $this->classDiscriminatorResolver->getMappingForClass($type)); } /** * {@inheritdoc} */ public function denormalize($data, string $type, string $format = null, array $context = []) { if (!isset($context['cache_key'])) { $context['cache_key'] = $this->getCacheKey($format, $context); } $allowedAttributes = $this->getAllowedAttributes($type, $context, true); $normalizedData = $this->prepareForDenormalization($data); $extraAttributes = []; $reflectionClass = new \ReflectionClass($type); $object = $this->instantiateObject($normalizedData, $type, $context, $reflectionClass, $allowedAttributes, $format); $resolvedClass = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object); foreach ($normalizedData as $attribute => $value) { if ($this->nameConverter) { $attribute = $this->nameConverter->denormalize($attribute, $resolvedClass, $format, $context); } if ((false !== $allowedAttributes && !\in_array($attribute, $allowedAttributes)) || !$this->isAllowedAttribute($resolvedClass, $attribute, $format, $context)) { if (!($context[self::ALLOW_EXTRA_ATTRIBUTES] ?? $this->defaultContext[self::ALLOW_EXTRA_ATTRIBUTES])) { $extraAttributes[] = $attribute; } continue; } if ($context[self::DEEP_OBJECT_TO_POPULATE] ?? $this->defaultContext[self::DEEP_OBJECT_TO_POPULATE] ?? false) { try { $context[self::OBJECT_TO_POPULATE] = $this->getAttributeValue($object, $attribute, $format, $context); } catch (NoSuchPropertyException $e) { } } $value = $this->validateAndDenormalize($resolvedClass, $attribute, $value, $format, $context); try { $this->setAttributeValue($object, $attribute, $value, $format, $context); } catch (InvalidArgumentException $e) { throw new NotNormalizableValueException(sprintf('Failed to denormalize attribute "%s" value for class "%s": '.$e->getMessage(), $attribute, $type), $e->getCode(), $e); } } if (!empty($extraAttributes)) { throw new ExtraAttributesException($extraAttributes); } return $object; } /** * Sets attribute value. */ abstract protected function setAttributeValue(object $object, string $attribute, $value, string $format = null, array $context = []); /** * Validates the submitted data and denormalizes it. * * @param mixed $data * * @return mixed * * @throws NotNormalizableValueException * @throws LogicException */ private function validateAndDenormalize(string $currentClass, string $attribute, $data, ?string $format, array $context) { if (null === $types = $this->getTypes($currentClass, $attribute)) { return $data; } $expectedTypes = []; foreach ($types as $type) { if (null === $data && $type->isNullable()) { return null; } $collectionValueType = $type->isCollection() ? $type->getCollectionValueType() : null; // Fix a collection that contains the only one element // This is special to xml format only if ('xml' === $format && null !== $collectionValueType && (!\is_array($data) || !\is_int(key($data)))) { $data = [$data]; } if (null !== $collectionValueType && Type::BUILTIN_TYPE_OBJECT === $collectionValueType->getBuiltinType()) { $builtinType = Type::BUILTIN_TYPE_OBJECT; $class = $collectionValueType->getClassName().'[]'; if (null !== $collectionKeyType = $type->getCollectionKeyType()) { $context['key_type'] = $collectionKeyType; } } elseif ($type->isCollection() && null !== ($collectionValueType = $type->getCollectionValueType()) && Type::BUILTIN_TYPE_ARRAY === $collectionValueType->getBuiltinType()) { // get inner type for any nested array $innerType = $collectionValueType; // note that it will break for any other builtinType $dimensions = '[]'; while (null !== $innerType->getCollectionValueType() && Type::BUILTIN_TYPE_ARRAY === $innerType->getBuiltinType()) { $dimensions .= '[]'; $innerType = $innerType->getCollectionValueType(); } if (null !== $innerType->getClassName()) { // the builtinType is the inner one and the class is the class followed by []...[] $builtinType = $innerType->getBuiltinType(); $class = $innerType->getClassName().$dimensions; } else { // default fallback (keep it as array) $builtinType = $type->getBuiltinType(); $class = $type->getClassName(); } } else { $builtinType = $type->getBuiltinType(); $class = $type->getClassName(); } $expectedTypes[Type::BUILTIN_TYPE_OBJECT === $builtinType && $class ? $class : $builtinType] = true; if (Type::BUILTIN_TYPE_OBJECT === $builtinType) { if (!$this->serializer instanceof DenormalizerInterface) { throw new LogicException(sprintf('Cannot denormalize attribute "%s" for class "%s" because injected serializer is not a denormalizer.', $attribute, $class)); } $childContext = $this->createChildContext($context, $attribute, $format); if ($this->serializer->supportsDenormalization($data, $class, $format, $childContext)) { return $this->serializer->denormalize($data, $class, $format, $childContext); } } // JSON only has a Number type corresponding to both int and float PHP types. // PHP's json_encode, JavaScript's JSON.stringify, Go's json.Marshal as well as most other JSON encoders convert // floating-point numbers like 12.0 to 12 (the decimal part is dropped when possible). // PHP's json_decode automatically converts Numbers without a decimal part to integers. // To circumvent this behavior, integers are converted to floats when denormalizing JSON based formats and when // a float is expected. if (Type::BUILTIN_TYPE_FLOAT === $builtinType && \is_int($data) && false !== strpos($format, JsonEncoder::FORMAT)) { return (float) $data; } if (('is_'.$builtinType)($data)) { return $data; } } if ($context[self::DISABLE_TYPE_ENFORCEMENT] ?? $this->defaultContext[self::DISABLE_TYPE_ENFORCEMENT] ?? false) { return $data; } throw new NotNormalizableValueException(sprintf('The type of the "%s" attribute for class "%s" must be one of "%s" ("%s" given).', $attribute, $currentClass, implode('", "', array_keys($expectedTypes)), get_debug_type($data))); } /** * @internal */ protected function denormalizeParameter(\ReflectionClass $class, \ReflectionParameter $parameter, string $parameterName, $parameterData, array $context, string $format = null) { if ($parameter->isVariadic() || null === $this->propertyTypeExtractor || null === $this->propertyTypeExtractor->getTypes($class->getName(), $parameterName)) { return parent::denormalizeParameter($class, $parameter, $parameterName, $parameterData, $context, $format); } return $this->validateAndDenormalize($class->getName(), $parameterName, $parameterData, $format, $context); } /** * @return Type[]|null */ private function getTypes(string $currentClass, string $attribute): ?array { if (null === $this->propertyTypeExtractor) { return null; } $key = $currentClass.'::'.$attribute; if (isset($this->typesCache[$key])) { return false === $this->typesCache[$key] ? null : $this->typesCache[$key]; } if (null !== $types = $this->propertyTypeExtractor->getTypes($currentClass, $attribute)) { return $this->typesCache[$key] = $types; } if (null !== $this->classDiscriminatorResolver && null !== $discriminatorMapping = $this->classDiscriminatorResolver->getMappingForClass($currentClass)) { if ($discriminatorMapping->getTypeProperty() === $attribute) { return $this->typesCache[$key] = [ new Type(Type::BUILTIN_TYPE_STRING), ]; } foreach ($discriminatorMapping->getTypesMapping() as $mappedClass) { if (null !== $types = $this->propertyTypeExtractor->getTypes($mappedClass, $attribute)) { return $this->typesCache[$key] = $types; } } } $this->typesCache[$key] = false; return null; } /** * Sets an attribute and apply the name converter if necessary. * * @param mixed $attributeValue */ private function updateData(array $data, string $attribute, $attributeValue, string $class, ?string $format, array $context): array { if (null === $attributeValue && ($context[self::SKIP_NULL_VALUES] ?? $this->defaultContext[self::SKIP_NULL_VALUES] ?? false)) { return $data; } if ($this->nameConverter) { $attribute = $this->nameConverter->normalize($attribute, $class, $format, $context); } $data[$attribute] = $attributeValue; return $data; } /** * Is the max depth reached for the given attribute? * * @param AttributeMetadataInterface[] $attributesMetadata */ private function isMaxDepthReached(array $attributesMetadata, string $class, string $attribute, array &$context): bool { $enableMaxDepth = $context[self::ENABLE_MAX_DEPTH] ?? $this->defaultContext[self::ENABLE_MAX_DEPTH] ?? false; if ( !$enableMaxDepth || !isset($attributesMetadata[$attribute]) || null === $maxDepth = $attributesMetadata[$attribute]->getMaxDepth() ) { return false; } $key = sprintf(self::DEPTH_KEY_PATTERN, $class, $attribute); if (!isset($context[$key])) { $context[$key] = 1; return false; } if ($context[$key] === $maxDepth) { return true; } ++$context[$key]; return false; } /** * Overwritten to update the cache key for the child. * * We must not mix up the attribute cache between parent and children. * * {@inheritdoc} * * @internal */ protected function createChildContext(array $parentContext, string $attribute, ?string $format): array { $context = parent::createChildContext($parentContext, $attribute, $format); $context['cache_key'] = $this->getCacheKey($format, $context); return $context; } /** * Builds the cache key for the attributes cache. * * The key must be different for every option in the context that could change which attributes should be handled. * * @return bool|string */ private function getCacheKey(?string $format, array $context) { foreach ($context[self::EXCLUDE_FROM_CACHE_KEY] ?? $this->defaultContext[self::EXCLUDE_FROM_CACHE_KEY] as $key) { unset($context[$key]); } unset($context[self::EXCLUDE_FROM_CACHE_KEY]); unset($context[self::OBJECT_TO_POPULATE]); unset($context['cache_key']); // avoid artificially different keys try { return md5($format.serialize([ 'context' => $context, 'ignored' => $context[self::IGNORED_ATTRIBUTES] ?? $this->defaultContext[self::IGNORED_ATTRIBUTES], ])); } catch (\Exception $exception) { // The context cannot be serialized, skip the cache return false; } } }
xabbuh/symfony
src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php
PHP
mit
24,245
module MS Proton = 1.00782503207 def precursor_mass(seq, charge) mass = NTerm + CTerm seq.chars.map(&:to_sym).each do |residue| mass += MS::MonoResidueMasses[residue] end charge_state(mass, charge) end def charge_state(mass, charge) if charge > 0 (mass + charge) / charge.to_f else (mass - charge) / charge.to_f end end IonTypeMassDelta = { a: (- 29.00273), a_star: (-(29.00273+17.02654)), a_not: (-(17.02654 + 29.00273+18.01056)), b: (-1.00782), b_star: ( - 1.00782 - 17.02654), b_not: (-17.02654 - 1.00782 - 18.01056), c: (16.01872), x: (27.99491 - 1.00782), y: (1.00782), y_star: (1.00782 - 17.02654), y_not: (1.00782 - 18.01056), z: (- 16.01872) } NTerm = 1.00782 CTerm = 27.99491 - 10.9742 MonoResidueMasses = { :A => 71.037114, :R => 156.101111, :N => 114.042927, :D => 115.026943, :C => 103.009185, :E => 129.042593, :Q => 128.058578, :G => 57.021464, :H => 137.058912, :I => 113.084064, :L => 113.084064, :K => 128.094963, :M => 131.040485, :F => 147.068414, :P => 97.052764, :S => 87.032028, :T => 101.047679, :U => 150.95363, :W => 186.079313, :Y => 163.06332, :V => 99.068414, :* => 118.805716, :B => 172.048405, :X => 118.805716, :Z => 128.550585 } AvgResidueMasses = { :* => 118.88603, :A => 71.0779, :B => 172.1405, :C => 103.1429, :D => 115.0874, :E => 129.11398, :F => 147.17386, :G => 57.05132, :H => 137.13928, :I => 113.15764, :K => 128.17228, :L => 113.15764, :M => 131.19606, :N => 114.10264, :O => 211.28076, :P => 97.11518, :Q => 128.12922, :R => 156.18568, :S => 87.0773, :T => 101.10388, :U => 150.0379, :V => 99.13106, :W => 186.2099, :X => 118.88603, :Y => 163.17326, :Z => 128.6231 } end ################ =begin Formula: H3N1 Monoisotopic mass : 17.02654 Formula: C1H1O1 Monoisotopic mass : 29.00273 Formula: H2O1 Monoisotopic mass : 18.01056 Formula: H1 Monoisotopic mass : 1.00782 Formula: H2N1 Monoisotopic mass : 16.01872 Formula: C1O1 Monoisotopic mass : 27.99491 =end
ryanmt/search_engine
lib/tools/fragmenter/masses.rb
Ruby
mit
2,200
// warning: This file is auto generated by `npm run build:tests` // Do not edit by hand! process.env.TZ = 'UTC' var expect = require('chai').expect var ini_set = require('../../../../src/php/info/ini_set') // eslint-disable-line no-unused-vars,camelcase var ini_get = require('../../../../src/php/info/ini_get') // eslint-disable-line no-unused-vars,camelcase var array_fill = require('../../../../src/php/array/array_fill.js') // eslint-disable-line no-unused-vars,camelcase describe('src/php/array/array_fill.js (tested in test/languages/php/array/test-array_fill.js)', function () { it('should pass example 1', function (done) { var expected = { 5: 'banana', 6: 'banana', 7: 'banana', 8: 'banana', 9: 'banana', 10: 'banana' } var result = array_fill(5, 6, 'banana') expect(result).to.deep.equal(expected) done() }) })
kvz/phpjs
test/languages/php/array/test-array_fill.js
JavaScript
mit
842
<html> <META HTTP-EQUIV=Content-Type Content="text/html; charset=utf8"> <!-- Mirrored from lis.ly.gov.tw/lghtml/lawstat/version2/01034/0103486032100.htm by HTTrack Website Copier/3.x [XR&CO'2010], Sun, 24 Mar 2013 09:06:42 GMT --> <head><title>法編號:01034 版本:086032100</title> <link rel="stylesheet" type="text/css" href="../../version.css" > </HEAD> <body><left> <table><tr><td><FONT COLOR=blue SIZE=5>行政院研究發展考核委員會組織條例(01034)</font> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td> <table><tr><td>&nbsp;&nbsp;&nbsp;</td> <tr><td align=left valign=top> <a href=0103475123000.html target=law01034><nobr><font size=2>中華民國 75 年 12 月 30 日</font></nobr></a> </td> <td valign=top><font size=2>制定18條</font></td> <tr><td align=left valign=top><nobr><font size=2>中華民國 76 年 1 月 14 日公布</font></nobr></td> <tr><td align=left valign=top><nobr><font size=2>中華民國 76 年 1 月 26 日施行</font></nobr></td> <tr><td align=left valign=top> <a href=0103486032100.html target=law01034><nobr><font size=2>中華民國 86 年 3 月 21 日</font></nobr></a> </td> <td valign=top><font size=2>修正全文19條</font></td> <tr><td align=left valign=top><nobr><font size=2>中華民國 86 年 4 月 16 日公布</font></nobr></td> <tr><td align=left valign=top> <a href=0103490100400.html target=law01034><nobr><font size=2>中華民國 90 年 10 月 4 日</font></nobr></a> </td> <td valign=top><font size=2>增訂第7之1, 7之2條<br> 修正第1, 2, 11, 19條</font></td> <tr><td align=left valign=top><nobr><font size=2>中華民國 90 年 10 月 17 日公布</font></nobr></td> <tr><td align=left valign=top><nobr><font size=2>中華民國 90 年 10 月 26 日施行</font></nobr></td> </table></table></table></table> <p><table><tr><td><font color=blue size=4>民國86年3月21日(非現行條文)</font></td> <td><a href=http://lis.ly.gov.tw/lgcgi/lglawproc?0103486032100 target=proc><font size=2>立法紀錄</font></a></td> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第一條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   行政院為辦理研究發展、綜合規劃、管制考核、行政資訊管理及政府出版品管理工作,設行政院研究發展考核委員會(以下簡稱本會)。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第二條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   本會設左列各處、室:<br>   一、研究發展處。<br>   二、綜合計畫處。<br>   三、管制考核處。<br>   四、資訊管理處。<br>   五、政府出版品管理處。<br>   六、秘書室。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第三條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   研究發展處掌理左列事項:<br>   一、關於政治及社會發展相關問題之研究分析事項。<br>   二、關於行政院施政有關問題及行政業務研究發展事項。<br>   三、關於民意調查之舉辦及輿情分析事項。<br>   四、關於行政院所屬各機關民意調查工作之協調及推動事項。<br>   五、關於行政院所屬各機關研究發展工作之規劃、協調及推動事項。<br>   六、關於行政效率與為民服務工作之規劃、協調及推動事項。<br>   七、其他有關研究發展事項。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第四條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   綜合計畫處掌理左列事項:<br>   一、關於行政院年度施政方針之研議事項。<br>   二、關於行政院年度施政計畫之編製事項。<br>   三、關於行政院所屬各機關年度施政計畫之審議事項。<br>   四、關於施政計畫相關法令之研訂事項。<br>   五、關於行政院及所屬各機關中、長程計畫之審議、協調及推動事項。<br>   六、關於行政院及所屬各機關組織結構及功能之研析事項。<br>   七、其他有關施政規劃事項。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第五條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   管制考核處掌理左列事項:<br>   一、關於行政院所屬各機關施政計畫之管制及考核事項。<br>   二、關於行政院重要會議決定、決議及院長指示事項之追蹤事項。<br>   三、關於行政院施政問題之專案調查、追蹤、協調及考核事項。<br>   四、關於行政院及所屬各機關公文時效管制之規劃及推動事項。<br>   五、關於行政院所屬各機關年度工作考成事項。<br>   六、關於國營事業年度工作考成事項。<br>   七、其他有關管制考核事項。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第六條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   資訊管理處掌理左列事項:<br>   一、關於行政院所屬各機關行政資訊系統之統籌規劃、協調及推動事項。<br>   二、關於發展行政資訊計畫優先順序研訂事項。<br>   三、關於行政院所屬各機關行政資訊計畫之審議、管制及考核事項。<br>   四、關於政府機關辦公室自動化之規劃、協調及推動事項。<br>   五、關於行政資訊管理相關問題之研究發展及綜合研議事項。<br>   六、關於本會資訊系統之發展及管理事項。<br>   七、其他有關資訊管理事項。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第七條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   政府出版品管理處掌理左列事項:<br>   一、關於政府出版品管理制度及相關法令之研訂事項。<br>   二、關於政府出版品管理之規劃、協調及推動事項。<br>   三、關於政府出版品之推廣事項。<br>   四、關於行政院及所屬各機關出國人員出國報告之綜合處理事項。<br>   五、關於施政問題相關資料之蒐集及整理事項。<br>   六、關於本會出版品之發行及管理事項。<br>   七、其他有關政府出版品管理事項。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第八條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   秘書室掌理議事、公共關係、新聞發布、會內重要案件管制、文書、印信典守、檔案管理、出納、事務管理、財產管理及不屬於其他各處、室事項。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第九條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   本會置主任委員一人,特任,綜理會務;副主任委員二人,職務比照簡任第十四職等,襄助會務。<br>   本會置委員十二人至十八人,由行政院院長派兼或聘兼之。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第十條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   本會委員會議,每月舉行一次,由主任委員召集;主任委員因故不能召集時,指定副主任委員一人代理。必要時得召開臨時會議。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第十一條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   本會置主任秘書一人,處長五人,職務均列簡任第十二職等;研究委員三人,職務列簡任第十職等至第十二職等;副處長五人,職務列簡任第十一職等;室主任一人,專門委員七人至九人,高級分析師一人至三人,職務均列簡任第十職等至第十一職等;科長二十一人至二十五人,職務列薦任第九職等;視察十三人至十七人,職務列薦任第八職等至第九職等,其中八人得列簡任第十職等至第十一職等;專員三十四人至三十六人,分析師七人至九人,職務均列薦任第七職等至第九職等;設計師一人至三人,職務列薦任第六職等至第八職等;科員二十四人至二十八人,職務列委任第五職等或薦任第六職等至第七職等;助理設計師一人至三人,職務列委任第四職等至第五職等,其中一人得列薦任第六職等;辦事員五人,職務列委任第三職等至第五職等;書記九人,職務列委任第一職等至第三職等。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第十二條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   本會設人事室,置主任一人,職務列簡任第十職等至第十一職等,依法辦理人事管理事項;其餘所需工作人員,應就本條例所定員額內派充之。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第十三條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   本會設會計室,置會計主任一人,職務列簡任第十職等至第十一職等,依法辦理歲計、會計事項,並兼辦統計事項;其餘所需工作人員應就本條例所定員額內派充之。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第十四條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   本會設政風室,置主任一人,職務列簡任第十職等至第十一職等,依法辦理政風事項;其餘所需工作人員,應就本條例所定員額內派充之。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第十五條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   第十一條至第十四條所定各職稱列有官等職等人員,其職務所適用之職系,依公務人員任用法第八條之規定,就有關職系選用之。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第十六條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   本會因業務需要,經報請行政院核准,得聘用研究員、副研究員、助理研究員。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第十七條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   本會得視業務需要,遴聘專家、學者為顧問及諮詢委員,研究專門問題。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第十八條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   本會會議規則及辦事細則,由本會定之。<br> </td> </table> </table> <table><tr><td>&nbsp;&nbsp;&nbsp;</td><td><font color=8000ff>第十九條</font> </font> <table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td> <td>   本條例施行日期,由行政院以命令定之。<br>   本條例修正條文自公布日施行。<br> </td> </table> </table> </left> </body> <!-- Mirrored from lis.ly.gov.tw/lghtml/lawstat/version2/01034/0103486032100.htm by HTTrack Website Copier/3.x [XR&CO'2010], Sun, 24 Mar 2013 09:06:42 GMT --> </html>
g0v/laweasyread-data
rawdata/utf8_lawstat/version2/01034/0103486032100.html
HTML
mit
11,631
/** * Copyright 2013-2014 Facebook, Inc. * * 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. * * @providesModule copyProperties */ 'use strict'; /** * Copy properties from one or more objects (up to 5) into the first object. * This is a shallow copy. It mutates the first object and also returns it. * * NOTE: `arguments` has a very significant performance penalty, which is why * we don't support unlimited arguments. */ function copyProperties(obj, a, b, c, d, e, f) { obj = obj || {}; if (process.env.NODE_ENV !== 'production') { if (f) { throw new Error('Too many arguments passed to copyProperties'); } } var args = [a, b, c, d, e]; var ii = 0, v; while (args[ii]) { v = args[ii++]; for (var k in v) { obj[k] = v[k]; } // IE ignores toString in object iteration.. See: // webreflection.blogspot.com/2007/07/quick-fix-internet-explorer-and.html if (v.hasOwnProperty && v.hasOwnProperty('toString') && (typeof v.toString !== 'undefined') && (obj.toString !== v.toString)) { obj.toString = v.toString; } } return obj; } module.exports = copyProperties;
andreypopp/rrouter
src/copyProperties.js
JavaScript
mit
1,651
module PantryTest class Named < ActiveRecord::Base has_many :assets, :as => :owner, :class_name => 'Composite', :dependent => :destroy end end
habanerohq/pantry
spec/support/models/named.rb
Ruby
mit
151
#!/usr/bin/env python #coding: utf-8 # Definition for a binary tree node class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: # @param root, a tree node # @return a list of integers def postorderTraversal(self, root): pass
wh-acmer/minixalpha-acm
LeetCode/Python/binary_tree_postorder_traversal_iter.py
Python
mit
324
#ifndef Magnum_Implementation_BufferState_h #define Magnum_Implementation_BufferState_h /* This file is part of Magnum. Copyright © 2010, 2011, 2012, 2013, 2014, 2015 Vladimír Vondruš <mosra@centrum.cz> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "Magnum/Buffer.h" namespace Magnum { namespace Implementation { struct BufferState { enum: std::size_t { #ifndef MAGNUM_TARGET_GLES TargetCount = 13+1 #elif !defined(MAGNUM_TARGET_GLES2) && defined(MAGNUM_TARGET_WEBGL) TargetCount = 8+1 #elif !defined(MAGNUM_TARGET_GLES2) TargetCount = 12+1 #else TargetCount = 2+1 #endif }; /* Target <-> index mapping */ static std::size_t indexForTarget(Buffer::TargetHint target); static const Buffer::TargetHint targetForIndex[TargetCount-1]; explicit BufferState(Context& context, std::vector<std::string>& extensions); void reset(); #ifndef MAGNUM_TARGET_GLES2 void(*bindBasesImplementation)(Buffer::Target, UnsignedInt, Containers::ArrayView<Buffer* const>); void(*bindRangesImplementation)(Buffer::Target, UnsignedInt, Containers::ArrayView<const std::tuple<Buffer*, GLintptr, GLsizeiptr>>); void(*copyImplementation)(Buffer&, Buffer&, GLintptr, GLintptr, GLsizeiptr); #endif void(Buffer::*createImplementation)(); void(Buffer::*getParameterImplementation)(GLenum, GLint*); #ifndef MAGNUM_TARGET_GLES2 void(Buffer::*getSubDataImplementation)(GLintptr, GLsizeiptr, GLvoid*); #endif void(Buffer::*dataImplementation)(GLsizeiptr, const GLvoid*, BufferUsage); void(Buffer::*subDataImplementation)(GLintptr, GLsizeiptr, const GLvoid*); void(Buffer::*invalidateImplementation)(); void(Buffer::*invalidateSubImplementation)(GLintptr, GLsizeiptr); #ifndef MAGNUM_TARGET_WEBGL void*(Buffer::*mapImplementation)(Buffer::MapAccess); void*(Buffer::*mapRangeImplementation)(GLintptr, GLsizeiptr, Buffer::MapFlags); void(Buffer::*flushMappedRangeImplementation)(GLintptr, GLsizeiptr); bool(Buffer::*unmapImplementation)(); #endif /* Currently bound buffer for all targets */ GLuint bindings[TargetCount]; /* Limits */ #ifndef MAGNUM_TARGET_GLES2 GLint #ifndef MAGNUM_TARGET_GLES minMapAlignment, #endif #ifndef MAGNUM_TARGET_WEBGL maxAtomicCounterBindings, maxShaderStorageBindings, shaderStorageOffsetAlignment, #endif uniformOffsetAlignment, maxUniformBindings; #endif }; }} #endif
ashimidashajia/magnum
src/Magnum/Implementation/BufferState.h
C
mit
3,633
// Copyright (c) 2001, 2004 Per M.A. Bothner and Brainfood Inc. // This is free software; for terms and warranty disclaimer see ./COPYING. package gnu.lists; import java.io.*; /** Simple adjustable-length vector whose elements are 32-bit floats. * Used for the Scheme string type. * @author Per Bothner */ public class FString extends SimpleVector implements /* #ifdef JAVA2 */ Comparable, /* #endif */ /* #ifdef JAVA5 */ Appendable, /* #endif */ CharSeq, Externalizable, Consumable { public char[] data; protected static char[] empty = new char[0]; public FString () { data = empty; } public FString (int num) { size = num; data = new char[num]; } public FString (int num, char value) { char[] array = new char[num]; data = array; size = num; while (--num >= 0) array[num] = value; } /** Create an FString from a char[]. * Note that this contructor does *not* copy the argument. */ public FString (char[] values) { size = values.length; data = values; } public FString (String str) { data = str.toCharArray(); size = data.length; } public FString (StringBuffer buffer) { this(buffer, 0, buffer.length()); } public FString (StringBuffer buffer, int offset, int length) { this.size = length; data = new char[length]; if (length > 0) buffer.getChars (offset, offset+length, data, 0); } public FString (char[] buffer, int offset, int length) { this.size = length; data = new char[length]; System.arraycopy(buffer, offset, data, 0, length); } public FString(Sequence seq) { this.data = new char[seq.size()]; addAll(seq); } public FString(CharSeq seq) { this(seq, 0, seq.size()); } public FString(CharSeq seq, int offset, int length) { char[] data = new char[length]; seq.getChars(offset, offset+length, data, 0); this.data = data; this.size = length; } /* #ifdef use:java.lang.CharSequence */ public FString (CharSequence seq) { this(seq, 0, seq.length()); } public FString(CharSequence seq, int offset, int length) { char[] data = new char[length]; for (int i = length; --i >= 0; ) data[i] = seq.charAt(offset+i); this.data = data; this.size = length; } /* #endif */ public int length() { return size; } /** Get the allocated length of the data buffer. */ public int getBufferLength() { return data.length; } public void setBufferLength(int length) { int oldLength = data.length; if (oldLength != length) { char[] tmp = new char[length]; System.arraycopy(data, 0, tmp, 0, oldLength < length ? oldLength : length); data = tmp; } } public void ensureBufferLength (int sz) { if (sz > data.length) { char[] d = new char[sz < 60 ? 120 : 2 * sz]; System.arraycopy(data, 0, d, 0, sz); data = d; } } protected Object getBuffer() { return data; } public final Object getBuffer(int index) { return Convert.toObject(data[index]); } public final Object setBuffer(int index, Object value) { Object old = Convert.toObject(data[index]); data[index] = Convert.toChar(value); return old; } public final Object get (int index) { if (index >= size) throw new ArrayIndexOutOfBoundsException(); return Convert.toObject(data[index]); } public final char charAt(int index) { if (index >= size) throw new StringIndexOutOfBoundsException(index); return data[index]; } public final char charAtBuffer(int index) { return data[index]; } public void getChars (int srcBegin, int srcEnd, char dst[], int dstBegin) { if (srcBegin < 0 || srcBegin > srcEnd) throw new StringIndexOutOfBoundsException(srcBegin); if (srcEnd > size) throw new StringIndexOutOfBoundsException(srcEnd); if (dstBegin+srcEnd-srcBegin > dst.length) throw new StringIndexOutOfBoundsException(dstBegin); if (srcBegin < srcEnd) System.arraycopy(data, srcBegin, dst, dstBegin, srcEnd - srcBegin); } public void getChars (int srcBegin, int srcEnd, StringBuffer dst) { if (srcBegin < 0 || srcBegin > srcEnd) throw new StringIndexOutOfBoundsException(srcBegin); if (srcEnd > size) throw new StringIndexOutOfBoundsException(srcEnd); if (srcBegin < srcEnd) dst.append(data, srcBegin, srcEnd - srcBegin); } public void getChars (StringBuffer dst) { dst.append(data, 0, size); } /** Return a char[] contain the characters of this string. * It is unspecified if the result is a copy or shares with this FString. */ public char[] toCharArray() { int val_length = data.length; int seq_length = size; if (seq_length == val_length) return data; else { char[] tmp = new char[seq_length]; System.arraycopy(data, 0, tmp, 0, seq_length); return tmp; } } public void shift(int srcStart, int dstStart, int count) { System.arraycopy(data, srcStart, data, dstStart, count); } public FString copy (int start, int end) { char[] copy = new char[end-start]; char[] src = data; // Move to local to help optimizer. for (int i = start; i < end; i++) copy[i-start] = src[i]; return new FString(copy); } /** Append all the characters of another <code>FString</code>. */ public boolean addAll(FString s) { int newSize = size + s.size; if (data.length < newSize) setBufferLength(newSize); System.arraycopy(s.data, 0, data, size, s.size); size = newSize; return s.size > 0; } /* #ifdef use:java.lang.CharSequence */ public boolean addAll (CharSequence s) { int ssize = s.length(); int newSize = size + ssize; if (data.length < newSize) setBufferLength(newSize); if (s instanceof FString) System.arraycopy(((FString) s).data, 0, data, size, ssize); else if (s instanceof String) ((String) s).getChars(0, ssize, data, size); else if (s instanceof CharSeq) ((CharSeq) s).getChars(0, ssize, data, size); else for (int i = ssize; --i >= 0; ) data[size+i] = s.charAt(i); size = newSize; return ssize > 0; } /* #else */ // public boolean addAll (String s) // { // int ssize = s.length(); // int newSize = size + ssize; // if (data.length < newSize) // setBufferLength(newSize); // s.getChars(0, ssize, data, size); // size = newSize; // return ssize > 0; // } // public boolean addAll (CharSeq s) // { // int ssize = s.length(); // int newSize = size + ssize; // if (data.length < newSize) // setBufferLength(newSize); // s.getChars(0, ssize, data, size); // size = newSize; // return ssize > 0; // } /* #endif */ /** Append arguments to this FString. * Used to implement Scheme's string-append and string-append/shared. * @param args an array of FString value * @param startIndex index of first string in <code>args</code> to use */ public void addAllStrings(Object[] args, int startIndex) { int total = size; for (int i = startIndex; i < args.length; ++i) { Object arg = args[i]; /* #ifdef use:java.lang.CharSequence */ total += ((CharSequence) arg).length(); /* #else */ // if (arg instanceof String) // total += ((String) arg).length(); // else // total += ((CharSeq) arg).length(); /* #endif */ } if (data.length < total) setBufferLength(total); for (int i = startIndex; i < args.length; ++i) { Object arg = args[i]; /* #ifdef use:java.lang.CharSequence */ addAll((CharSequence) arg); /* #else */ // if (arg instanceof String) // addAll((String) arg); // else // addAll((CharSeq) arg); /* #endif */ } } public String toString () { return new String (data, 0, size); } public String substring(int start, int end) { return new String (data, start, end - start); } /* #ifdef use:java.lang.CharSequence */ public CharSequence subSequence(int start, int end) { return new FString(data, start, end-start); } /* #endif */ public void setCharAt (int index, char ch) { if (index < 0 || index >= size) throw new StringIndexOutOfBoundsException(index); data[index] = ch; } public void setCharAtBuffer (int index, char ch) { data[index] = ch; } /** Set all the elements to a given character. */ public final void fill (char ch) { char[] d = data; // Move to local to help optimizer. for (int i = size; --i >= 0; ) d[i] = ch; } public void fill(int fromIndex, int toIndex, char value) { if (fromIndex < 0 || toIndex > size) throw new IndexOutOfBoundsException(); char[] d = data; // Move to local to help optimizer. for (int i = fromIndex; i < toIndex; i++) d[i] = value; } protected void clearBuffer(int start, int count) { char[] d = data; // Move to local to help optimizer. while (--count >= 0) d[start++] = 0; } public void replace(int where, char[] chars, int start, int count) { System.arraycopy(chars, start, data, where, count); } public void replace(int where, String string) { string.getChars(0, string.length(), data, where); } public int hashCode () { /* Matches String.hashCode specification, as updated specification in http://www.javasoft.com/docs/books/jls/clarify.html. */ char[] val = data; int len = size; int hash = 0; for (int i = 0; i < len; i++) hash = 31 * hash + val[i]; return hash; } public boolean equals (Object obj) { if (obj == null || !(obj instanceof FString)) return false; char[] str = ((FString) obj).data; int n = size; if (str == null || str.length != n) return false; char[] d = data; // Move to local to help optimizer. for (int i = n; --i >= 0; ) { if (d[i] != str[i]) return false; } return true; } public int compareTo(Object obj) { FString str2 = (FString) obj; char[] cs1 = data; char[] cs2 = str2.data; int n1 = size; int n2 = str2.size; int n = n1 > n2 ? n2 : n1; for (int i = 0; i < n; i++) { char c1 = cs1[i]; char c2 = cs2[i]; int d = c1 - c2; if (d != 0) return d; } return n1 - n2; } public int getElementKind() { return CHAR_VALUE; } public void consume(Consumer out) { out.write(data, 0, data.length); } public boolean consumeNext (int ipos, Consumer out) { int index = ipos >>> 1; if (index >= size) return false; out.write(data[index]); return true; } public void consumePosRange (int iposStart, int iposEnd, Consumer out) { if (out.ignoring()) return; int i = iposStart >>> 1; int end = iposEnd >>> 1; if (end > size) end = size; if (end > i) out.write(data, i, end - i); } public FString append (char c) { int sz = size; if (sz >= data.length) ensureBufferLength(sz+1); char[] d = data; d[sz] = c; size = sz + 1; return this; } /* #ifdef use:java.lang.CharSequence */ public FString append (CharSequence csq) { if (csq == null) csq = "null"; return append(csq, 0, csq.length()); } public FString append (CharSequence csq, int start, int end) { if (csq == null) csq = "null"; int len = end - start; int sz = size; if (sz+len > data.length) ensureBufferLength(sz+len); char[] d = data; if (csq instanceof String) ((String) csq).getChars(start, end, d, sz); else if (csq instanceof CharSeq) ((CharSeq) csq).getChars(start, end, d, sz); else { int j = sz; for (int i = start; i < end; i++) d[j++] = csq.charAt(i);; } size = sz; return this; } /* #else */ // public FString append (String str) // { // int len = str.length(); // ensureBufferLength(size+len); // str.getChars(0, len, data, size); // size += len; // return this; // } /* #endif */ /* #ifdef JAVA5 */ public void writeTo(int start, int count, Appendable dest) throws java.io.IOException { if (dest instanceof java.io.Writer) { try { ((java.io.Writer) dest).write(data, start, count); } catch (java.io.IOException ex) { throw new RuntimeException(ex); } } else { dest.append(this, start, start+count); } } public void writeTo(Appendable dest) throws java.io.IOException { writeTo(0, size, dest); } /* #else */ // public void writeTo(int start, int count, java.io.Writer dest) // throws java.io.IOException // { // dest.write(data, start, count); // } // public void writeTo(java.io.Writer dest) throws java.io.IOException // { // dest.write(data, 0, size); // } /* #endif */ /** * @serialData Write 'size' (using writeInt), * followed by 'size' elements in order (using writeChar). */ public void writeExternal(ObjectOutput out) throws IOException { int size = this.size; out.writeInt(size); char[] d = data; // Move to local to help optimizer. for (int i = 0; i < size; i++) out.writeChar(d[i]); } public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { int size = in.readInt(); char[] data = new char[size]; for (int i = 0; i < size; i++) data[i] = in.readChar(); this.data = data; this.size = size; } }
thequixotic/ai2-kawa
gnu/lists/FString.java
Java
mit
13,789
## TestKit Writing tests are essential to keep code using actors robust. But it is challenging to write test code with actors because they are inherently asynchronous and therefore not deterministic. Akka.NET provides [TestKit](https://www.nuget.org/packages/Akka.TestKit/) to handle those difficulties. It provides a simple way to write deterministic test code and many utilities that help you. If you are new to test code on Akka.NET, read [How to Unit Test Akka.NET Actors with Akka.TestKit](https://petabridge.com/blog/how-to-unit-test-akkadotnet-actors-akka-testkit/). #### Test Code Writing test code with interfaced actors is not that different with regular ones. ```csharp var greeter = new GreeterRef(system.ActorOf<GreetingActor>()); Assert.Equal("Hello World!", await greeter.Greet("World")); Assert.Equal(1, await greeter.GetCount()); ``` But writing test code with `ActorBoundSession` is not simple so `Akka.Interfaced.TestKit` is provided. #### TestActorBoundSession ActorBoundSession is a base class for implementing the gateway for slim client. But setup for slim client and service actor and inspection are not easy. To solve this problem, `Akka.Interfaced.TestKit` is provided. Following code arranges a test client and `TestActorBoundSession` and tests the user login process. ```csharp // Arrange (Create session and bind UserLogin actor to it) TestActorBoundSession session = ...; // Act (Ask UserLogin actor to login and get User actor reference) var userLogin = session.CreateRef<UserLoginRef>(); var observer = session.CreateObserver<IUserObserver>(null); var user = await userLogin.Login("userid", "password", observer); // Assert Assert.Equal("userid", await user.GetId()); ```
SaladbowlCreative/Akka.Interfaced
docs/TestKit.md
Markdown
mit
1,717
using UnityEngine; using System.Collections; using CotcSdk; using UnityEngine.UI; using CotcSdk.InappPurchase; using System; public class CotcInappPurchaseSampleScene : MonoBehaviour { // The cloud allows to make generic operations (non user related) private Cloud Cloud; // The gamer is the base to perform most operations. A gamer object is obtained after successfully signing in. private Gamer Gamer; // The friend, when fetched, can be used to send messages and such private string FriendId; // When a gamer is logged in, the loop is launched for domain private. Only one is run at once. private DomainEventLoop Loop; // Input field public InputField EmailInput; // Default parameters private const string DefaultEmailAddress = "me@localhost.localdomain"; private const string DefaultPassword = "Pass1234"; // Use this for initialization void Start() { // Link with the CotC Game Object var cb = FindObjectOfType<CotcGameObject>(); if (cb == null) { Debug.LogError("Please put a Clan of the Cloud prefab in your scene!"); return; } // Log unhandled exceptions (.Done block without .Catch -- not called if there is any .Then) Promise.UnhandledException += (object sender, ExceptionEventArgs e) => { Debug.LogError("Unhandled exception: " + e.Exception.ToString()); }; // Initiate getting the main Cloud object cb.GetCloud().Done(cloud => { Cloud = cloud; // Retry failed HTTP requests once Cloud.HttpRequestFailedHandler = (HttpRequestFailedEventArgs e) => { if (e.UserData == null) { e.UserData = new object(); e.RetryIn(1000); } else e.Abort(); }; Debug.Log("Setup done"); }); // Use a default text in the e-mail address EmailInput.text = DefaultEmailAddress; } // Signs in with an anonymous account public void DoLogin() { // Call the API method which returns an Promise<Gamer> (promising a Gamer result). // It may fail, in which case the .Then or .Done handlers are not called, so you // should provide a .Catch handler. Cloud.LoginAnonymously() .Then(gamer => DidLogin(gamer)) .Catch(ex => { // The exception should always be CotcException CotcException error = (CotcException)ex; Debug.LogError("Failed to login: " + error.ErrorCode + " (" + error.HttpStatusCode + ")"); }); } // Log in by e-mail public void DoLoginEmail() { // You may also not provide a .Catch handler and use .Done instead of .Then. In that // case the Promise.UnhandledException handler will be called instead of the .Done // block if the call fails. Cloud.Login( network: LoginNetwork.Email.Describe(), networkId: EmailInput.text, networkSecret: DefaultPassword) .Done(this.DidLogin); } // Converts the account to e-mail public void DoConvertToEmail() { if (!RequireGamer()) return; Gamer.Account.Convert( network: LoginNetwork.Email.ToString().ToLower(), networkId: EmailInput.text, networkSecret: DefaultPassword) .Done(dummy => { Debug.Log("Successfully converted account"); }); } // Fetches a friend with the given e-mail address public void DoFetchFriend() { string address = EmailInput.text; Cloud.ListUsers(filter: address) .Done(friends => { if (friends.Total != 1) { Debug.LogWarning("Failed to find account with e-mail " + address + ": " + friends.ToString()); } else { FriendId = friends[0].UserId; Debug.Log(string.Format("Found friend {0} ({1} on {2})", FriendId, friends[0].NetworkId, friends[0].Network)); } }); } // Sends a message to the current friend public void DoSendMessage() { if (!RequireGamer() || !RequireFriend()) return; Gamer.Community.SendEvent( gamerId: FriendId, eventData: Bundle.CreateObject("hello", "world"), notification: new PushNotification().Message("en", "Please open the app")) .Done(dummy => Debug.Log("Sent event to gamer " + FriendId)); } // Posts a sample transaction public void DoPostTransaction() { if (!RequireGamer()) return; Gamer.Transactions.Post(Bundle.CreateObject("gold", 50)) .Done(result => { Debug.Log("TX result: " + result.ToString()); }); } public void DoListProducts() { var inApp = FindObjectOfType<CotcInappPurchaseGameObject>(); if (!RequireGamer()) return; var pp = new PurchasedProduct[1]; var result = new ValidateReceiptResult[1]; Gamer.Store.ListConfiguredProducts() .Then(products => { Debug.Log("Got BO products."); return inApp.FetchProductInfo(products); }) .Then(enrichedProducts => { Debug.Log("Received enriched products"); foreach (ProductInfo pi in enrichedProducts) { Debug.Log(pi.ToJson()); } // Purchase the first one return inApp.LaunchPurchase(Gamer, enrichedProducts[0]); }) .Then(purchasedProduct => { Debug.Log("Purchase ok: " + purchasedProduct.ToString()); pp[0] = purchasedProduct; return Gamer.Store.ValidateReceipt(purchasedProduct.StoreType, purchasedProduct.CotcProductId, purchasedProduct.PaidPrice, purchasedProduct.PaidCurrency, purchasedProduct.Receipt); }) .Then(validationResult => { Debug.Log("Validated receipt"); result[0] = validationResult; return inApp.CloseTransaction(pp[0]); }) .Then(done => { Debug.Log("Purchase transaction completed successfully: " + result[0].ToString()); }) .Catch(ex => { Debug.LogError("Error during purchase: " + ex.ToString()); }); } public void DoAcknowledgePendingPurchase() { var inApp = FindObjectOfType<CotcInappPurchaseGameObject>(); if (!RequireGamer()) return; Gamer.Store.ListConfiguredProducts() .Then(products => { Debug.Log("Got BO products."); return inApp.FetchProductInfo(products); }) .Then(enrichedProducts => { Debug.Log("Received enriched products"); // Purchase the first one return inApp.LaunchPurchase(Gamer, enrichedProducts[0]); }) .Then(purchasedProduct => { Debug.Log("Purchase ok: " + purchasedProduct.ToString() + ", closing it without sending it to CotC"); // Important: we should be validating the purchase through CotC. The thing is, under some circumstances // (test orders, certificate not yet configured on our BO) it might be refused by our server. // This button acknowledges it locally. Never do that in production. return inApp.CloseTransaction(purchasedProduct); }) .Then(done => { Debug.Log("Purchase closed successfully"); }) .Catch(ex => { Debug.LogError("Error during purchase: " + ex.ToString()); }); } // Invoked when any sign in operation has completed private void DidLogin(Gamer newGamer) { if (Gamer != null) { Debug.LogWarning("Current gamer " + Gamer.GamerId + " has been dismissed"); Loop.Stop(); } Gamer = newGamer; Loop = Gamer.StartEventLoop(); Loop.ReceivedEvent += Loop_ReceivedEvent; Debug.Log("Signed in successfully (ID = " + Gamer.GamerId + ")"); } private void Loop_ReceivedEvent(DomainEventLoop sender, EventLoopArgs e) { Debug.Log("Received event of type " + e.Message.Type + ": " + e.Message.ToJson()); } private bool RequireGamer() { if (Gamer == null) Debug.LogError("You need to login first. Click on a login button."); return Gamer != null; } private bool RequireFriend() { if (FriendId == null) Debug.LogError("You need to fetch a friend first. Fill the e-mail address field and click Fetch Friend."); return FriendId != null; } }
xtralifecloud/unity-sdk
UnityProject/Assets/Cotc.InAppPurchase/Scripts/CotcInappPurchaseSampleScene.cs
C#
mit
7,422
window.onload =function () { var subObj = document.getElementsByTagName('button')[0]; if( subObj && subObj.className=='btn_submit') subObj.onclick = submit_login; }; // end function window.onload function submit_login() { this.innerHTML = 'Wait...'; this.disabled = true; document.getElementById('form_login').submit(); return false; }; // end function submit_login // ----------------------------------------------------------------------------------- // ------------------ ...give me liberty of give me death! --------------------------- // -------------------- - American patriots of the 1700 and early 1800s -------------- // ----------------------------------------------------------------------------------- // ------------------ ...Give me your money or die! ---------------------------------- // -------------------- - The Neo-American voter of the 1900s ------------------------ // ----------------------------------------------------------------------------------- // ----------------- Do you know if Jak was really the Mar who built Haven City? -----
da99/surferhearts
backup/public/javascripts/pages/login.js
JavaScript
mit
1,126
/* * Globals */ /* Links */ a, a:focus, a:hover { color: #fff; } /* Custom default button */ .btn-default, .btn-default:hover, .btn-default:focus { color: #333; text-shadow: none; /* Prevent inheritence from `body` */ background-color: #fff; border: 1px solid #fff; } .space-after { margin-bottom: 25px; } .space-before { margin-top: 25px; } /* * Base structure */ html, body { height: 100%; background-color: #333; } body { color: #fff; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.5); } /* Extra markup and styles for table-esque vertical and horizontal centering */ .site-wrapper { display: table; width: 100%; height: 100%; /* For at least Firefox */ min-height: 100%; -webkit-box-shadow: inset 0 0 100px rgba(0,0,0,.5); box-shadow: inset 0 0 100px rgba(0,0,0,.5); } .site-wrapper-inner { display: table-cell; vertical-align: top; } .cover-container { margin-right: auto; margin-left: auto; } /* Padding for spacing */ .inner { padding: 30px; } /* * Header */ .masthead-brand { margin-top: 10px; margin-bottom: 10px; } .masthead-nav > li { display: inline-block; } .masthead-nav > li + li { margin-left: 20px; } .masthead-nav > li > a { padding-right: 0; padding-left: 0; font-size: 16px; font-weight: bold; color: #fff; /* IE8 proofing */ color: rgba(255,255,255,.75); border-bottom: 2px solid transparent; } .masthead-nav > li > a:hover, .masthead-nav > li > a:focus { background-color: transparent; border-bottom-color: #a9a9a9; border-bottom-color: rgba(255,255,255,.25); } .masthead-nav > .active > a, .masthead-nav > .active > a:hover, .masthead-nav > .active > a:focus { color: #fff; border-bottom-color: #fff; } @media (min-width: 768px) { .masthead-brand { float: left; } .masthead-nav { float: right; } } /* * Cover */ .cover { padding: 0 20px; } .cover .btn-lg { padding: 10px 20px; font-weight: bold; } /* * Footer */ .mastfoot { color: #999; /* IE8 proofing */ color: rgba(255,255,255,.5); } /* * Affix and center */ @media (min-width: 768px) { /* Pull out the header and footer */ .masthead { position: fixed; top: 0; } .mastfoot { position: fixed; bottom: 0; } /* Start the vertical centering */ .site-wrapper-inner { vertical-align: middle; } /* Handle the widths */ .masthead, .mastfoot, .cover-container { width: 100%; /* Must be percentage or pixels for horizontal alignment */ } } @media (min-width: 992px) { .masthead, .mastfoot, .cover-container { width: 700px; } }
KevinMellott91/react-nest-thermostat
example/css/cover.css
CSS
mit
2,610
using System; using System.IO; using Aspose.Email.AntiSpam; using Aspose.Email.Mail; /* This project uses Automatic Package Restore feature of NuGet to resolve Aspose.Email for .NET API reference when the project is build. Please check https://Docs.nuget.org/consume/nuget-faq for more information. If you do not wish to use NuGet, you can manually download Aspose.Email for .NET API from http://www.aspose.com/downloads, install it and then add its reference to this project. For any issues, questions or suggestions please feel free to contact us using http://www.aspose.com/community/forums/default.aspx */ namespace Aspose.Email.Examples.CSharp.Email { internal class DetermineAttachmentEmbeddedMessage { public static void Run() { // ExStart:DetermineAttachmentEmbeddedMessage string dataDir = RunExamples.GetDataDir_Email() + "EmailWithAttandEmbedded.eml"; MailMessage eml = MailMessage.Load(dataDir); if (eml.Attachments[0].IsEmbeddedMessage) Console.WriteLine("Attachment is an embedded message"); // ExEnd:DetermineAttachmentEmbeddedMessage } } }
maria-shahid-aspose/Aspose.Email-for-.NET
Examples/CSharp/Email/DetermineAttachmentEmbeddedMessage.cs
C#
mit
1,178
[![Build Status](https://travis-ci.org/watu/table_builder.png?branch=master)](https://travis-ci.org/watu/table_builder) [![Coverage Status](https://coveralls.io/repos/watu/table_builder/badge.png)](https://coveralls.io/r/watu/table_builder) [![Code Climate](https://codeclimate.com/github/watu/table_builder.png)](https://codeclimate.com/github/watu/table_builder) [![Gem Version](https://badge.fury.io/rb/watu_table_builder.png)](http://badge.fury.io/rb/watu_table_builder) About watu_table_builder ======================== watu_table_builder is a fork of [table_builder](https://github.com/jchunky/table_builder) in an effort to bring it up to speed with the current Ruby and Rails practices (bundler, gem, ci) as well as maybe re-vive it, start merging useful branches, implementing new features, fixing bugs, etc. Install ======= Add this to your Gemfile: gem "watu_table_builder", :require => "table_builder" or if you prefer to use it straight from GitHub: gem "watu_table_builder", :require => "table_builder", :git => "git://github.com/watu/table_builder.git" TableBuilder ============ Rails builder for creating tables and calendars inspired by ActionView's FormBuilder, updated for Rails 3.0beta This is a fork of Petrik de Heus plugin for earlier versions of Rails. Note the new idiomatic use of "<%=" for the table_for and calendar_for functions. Examples ======== table_for has methods for each tag used in a table (table, thead, tr, td, etc.) A basic example would look like this: @front_men = [FrontMan.new(1, 'David St. Hubbins'), FrontMan.new(2, 'David Lee Roth')] and <%= table_for(@front_men) do |t| %> <%= t.head do %> <%= t.r do %> <%= t.h('Id') %> <%= t.h('Name') %> <% end %> <% end %> <%= t.body do |front_man| %> <%= t.r do %> <%= t.d(h(front_man.id)) %> <%= t.d(h(front_man.name)) %> <% end %> <% end %> <% end %> You can pass an array to the head method: <%= t.head('Id', 'Name') %> The body and r method can be combined for easier usage: <%= t.body_r do |front_man| %> <%= t.d(h(front_man.id)) %> <%= t.d(h(front_man.name)) %> <% end %> You can also pass blocks to the d and h methods for more flexibility: <%= t.d(:class => 'name') do %> <%= link_to(h(front_man.name), front_man_url(front_man)) %> <% end %> All tag methods are rails tag methods, so they can have extra html options. @drummers = [Drummer.new(1, 'John "Stumpy" Pepys'), Drummer.new(2, 'Eric "Stumpy Joe" Childs')] and <%= table_for(@drummers, :html => { :id => 'spinal_tap', :class => 'drummers'}) do |t| %> <%= t.body_r(:class => 'row') do |e| %> <%= t.d(h(e.id), :title => 'id') %> <%= t.d(h(e.name)) %> <% end %> <% end %> which produces the following html: <table class="drummers" id="spinal_tap"> <tbody> <tr class="row"> <td title="id">1</td> <td>John &quot;Stumpy&quot; Pepys</td> </tr> <tr class="row"> <td title="id">2</td> <td>Eric &quot;Stumpy Joe&quot; Childs</td> </tr> </tbody> </table> You can customize the table by creating your own TableBuilder: <%= table_for(@drummers, :builder => PagedTableBuilder) do |t| %> Calendar Table ============== calendar_for creates a table like table_for. All objects get sorted per day of the month A basic example would look like this: @tasks = Task.this_month and <%= calendar_for(@tasks) do |t| %> <%= t.head('mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun') %> <%= t.day do |day, tasks| %> <%= day.day %> <% tasks.each do |task| %> <%= h(task.name) %> <% end %> <% end %> <% end %> To show a different month you can pass the :year and :month options: <%= calendar_for(@tasks, :year => 2009, :month => 1) do |t| %> To highlight a different day you can pass the :today option: <%= calendar_for(@tasks, :today => Date.civil(2008, 12, 26)) do |t| %> By default the :date method is called on the objects for sorting. To use another method you can pass the :day_method option: <%= t.day(:day_method => :calendar_date) do |day, tasks| %> If you want to add id's to your td tag you can pass a pattern: <%= t.day(:id => 'day_%d') do |day, tasks| %> To have a header at the begining of each row: <%= calendar_for(@tasks, :row_header => true) do |t| %> and then in your block you get nil as the list of objects and the first day of thet upcoming week. For example: <%= calendar_for(@tasks) do |t| %> <%= t.day do |day, tasks| %> <% if tasks.nil? %> <%= day.cweek %> <% else %> <%= day.day %> <% tasks.each do |task| %> <%= h(task.name) %> <% end %> <% end %> <% end %> <% end %> Contributing ============ Document any new options and verify the documentation looks correct by running: yard server --reload and going to http://localhost:8808 Contributors ============ Petrik de Heus, Sean Dague, F. Kocherga, John Duff, Andrew C. Greenberg, Jason Cheong-Kee-You, [J. Pablo Fernández](http://pupeno.com). Original Work Copyright (c) 2008 Petrik de Heus, released under the MIT license. Fork revisions Copyright (c) 2010 Andrew C. Greenberg, released under the MIT license. Fork revisions Copyright (c) 2012 [Carrousel Apps Ltd (Watu)](http://watuhq.com), released under the MIT license.
AJesus1412/calendario
README.md
Markdown
mit
5,556
// AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from libunity.djinni #pragma once #include <cstdint> #include <string> #include <unordered_map> struct WitnessAccountStatisticsRecord; struct WitnessEstimateInfoRecord; struct WitnessFundingResultRecord; /** C++ interface to control witness accounts */ class IWitnessController { public: virtual ~IWitnessController() {} /** Get information on min/max witness periods, weights etc. */ static std::unordered_map<std::string, std::string> getNetworkLimits(); /** Get an estimate of weights/parts that a witness account will be funded with */ static WitnessEstimateInfoRecord getEstimatedWeight(int64_t amount_to_lock, int64_t lock_period_in_blocks); /** Fund a witness account */ static WitnessFundingResultRecord fundWitnessAccount(const std::string & funding_account_UUID, const std::string & witness_account_UUID, int64_t funding_amount, int64_t requestedLockPeriodInBlocks); /** Renew a witness account */ static WitnessFundingResultRecord renewWitnessAccount(const std::string & funding_account_UUID, const std::string & witness_account_UUID); /** Get information on account weight and other witness statistics for account */ static WitnessAccountStatisticsRecord getAccountWitnessStatistics(const std::string & witnessAccountUUID); /** Turn compounding on/off */ static void setAccountCompounding(const std::string & witnessAccountUUID, bool should_compound); /** Check state of compounding */ static bool isAccountCompounding(const std::string & witnessAccountUUID); };
nlgcoin/guldencoin-official
src/unity/djinni/cpp/i_witness_controller.hpp
C++
mit
1,618
var fs = require("fs"), url = require("url"), http = require("http"), https = require("https"), godauth = require("prezi-godauth"); // // =============================================== // // HttpServer // // =============================================== // var HttpServer = function(settings) { // public: this.addUrlRewrite = function(pattern, rule) { _rewrites.push({"pattern": pattern, "rule": rule}); }; this.addGetHandler = function(pattern, callback) { _getHandlers.push({"pattern": pattern, "callback": callback}); }; this.addPostHandler = function(pattern, callback) { _postHandlers.push({"pattern": pattern, "callback": callback}); }; this.addDefaultGetHandler = function(callback) { _defaultGetHandler = callback; }; this.addDefaultPostHandler = function(callback) { _defaultPostHandler = callback; }; this.addGetLogger = function(callback) { _getLoggers.push(callback); }; this.addPostLogger = function(callback) { _postLoggers.push(callback); }; this.run = function() { if (_settings.catchExceptions) { try { _createServer(); } catch(err) { log.error(err); } } else { _createServer(); } }; // private: var _createServer = function() { if (_settings.port == 443) { https.createServer(_options, function(request, response) { if (_settings.catchExceptions) { try { _handleRequest(request, response); } catch(err) { log.error(err); } } else { _handleRequest(request, response); } }).listen(_settings.port); } else { http.createServer(function(request, response) { if (_settings.catchExceptions) { try { _handleRequest(request, response); } catch(err) { log.error(err); } } else { _handleRequest(request, response); } }).listen(_settings.port); } }; var _getHTTPAuthCredentials = function(request) { // Credits: http://stackoverflow.com/questions/5951552/basic-http-authentication-in-node-js var header = request.headers['authorization']||'', // get the header token = header.split(/\s+/).pop()||''; // and the encoded auth token if (token != '') { auth = new Buffer(token, 'base64').toString(), // convert from base64 parts = auth.split(/:/), // split on colon username = parts[0], password = parts[1]; return { 'username': username, 'password': password }; } else { return null; } } var _overrideGodAuthWithCredentials = function(request) { creds = _getHTTPAuthCredentials(request); if (creds === null) return false; else return (creds.username == _settings.godAuth.bypassUsername && creds.password == _settings.godAuth.bypassPassword); } var _handleRequest = function(request, response) { if ("godAuth" in _settings) { if (!_overrideGodAuthWithCredentials(request)) { var authenticator = godauth.create(_settings.godAuth.secret, "https://" + request.headers.host + request.url); authSuccess = authenticator.authenticateRequest(request, response); console.log(authSuccess); if (!authSuccess) { console.log("GodAuth Authentication failed"); return; } console.log("GodAuth authentication succeeded"); } else { console.log("Using HTTP Authentication instead of GodAuth"); } } _handleTrailingSlashes(request, response); _handleUrlRewrites(request, response); request.urls = url.parse(request.url, true); if (!request.urls.pathname) request.urls.pathname = ""; request.path = request.urls.pathname.substring(1); // get rid of leading '/' log.info("request to " + request.originalUrl); if (request.method == "GET") _handleGetRequest(request, response); else if (request.method == "POST") _handlePostRequest(request, response); }; var _handleTrailingSlashes = function(request, response) { request.originalUrl = request.url; if (_settings.removeTrailingSlashes) { if (request.url[request.url.length - 1] == "/") request.url = request.url.substring(0, request.url.length - 1); } }; var _handleUrlRewrites = function(request, response) { var i, max; for (i = 0, max = _rewrites.length; i < max; i += 1) { var rewrite = _rewrites[i]; if (rewrite.pattern.test(request.url)) { request.url = rewrite.rule(request.url); return; } } }; var _routeRequest = function(handlers, defaultHandler, request, response) { var i, max; for (i = 0, max = handlers.length; i < max; i += 1) { var handler = handlers[i]; if (handler.pattern.test(request.url)) { handler.callback(request, response); return; } } defaultHandler(request, response); }; var _handleGetRequest = function(request, response) { var i, max; for (i = 0, max = _getLoggers.length; i < max; i += 1) { _getLoggers[i](request); } _routeRequest(_getHandlers, _defaultGetHandler, request, response); }; var _handlePostRequest = function(request, response) { var i, max; _savePostData(request); for (i = 0, max = _postLoggers.length; i < max; i += 1) { _postLoggers[i](request); } request.on("end", function() { _routeRequest(_postHandlers, _defaultPostHandler, request, response); }); }; var _savePostData = function(request) { request.postData = ""; request.on("data", function(chunk) { request.postData += chunk.toString(); }); }; var log = settings["logger"]; var _settings = settings; var _rewrites = []; var _getHandlers = []; var _postHandlers = []; var _defaultGetHandler = function(request, response) {}; var _defaultPostHandler = function(request, response) {}; var _getLoggers = []; var _postLoggers = []; if (_settings.port == 443) { var _options = { key: fs.readFileSync(_settings.httpsOptions.key), cert: fs.readFileSync(_settings.httpsOptions.cert), secureProtocol: 'SSLv23_method', secureOptions: require('constants').SSL_OP_NO_SSLv3 }; } }; module.exports.create = function(settings) { return new HttpServer(settings); };
prezi/plotserver
httpserver.js
JavaScript
mit
7,353