answer
stringlengths
15
1.25M
using System.Composition; using Microsoft.CodeQuality.Analyzers.ApiDesignGuidelines; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeFixes; namespace Microsoft.CodeQuality.CSharp.Analyzers.ApiDesignGuidelines { <summary> CA1008: Enums should have zero value </summary> [<API key>(LanguageNames.CSharp), Shared] public class <API key> : <API key> { } }
// <auto-generated> // :4.0.30319.42000 // </auto-generated> namespace <API key>.Properties { [global::System.Runtime.CompilerServices.<API key>()] [global::System.CodeDom.Compiler.<API key>("Microsoft.VisualStudio.Editors.SettingsDesigner.<API key>", "12.0.0.0")] internal sealed partial class Settings : global::System.Configuration.<API key> { private static Settings defaultInstance = ((Settings)(global::System.Configuration.<API key>.Synchronized(new Settings()))); public static Settings Default { get { return defaultInstance; } } } }
<html> <head> <title>Karina Okotel's panel show appearances</title> <script type="text/javascript" src="../common.js"></script> <link rel="stylesheet" media="all" href="../style.css" type="text/css"/> <script type="text/javascript" src="../people.js"></script> <!--#include virtual="head.txt" --> </head> <body> <!--#include virtual="nav.txt" --> <div class="page"> <h1>Karina Okotel's panel show appearances</h1> <p>Karina Okotel has appeared in <span class="total">1</span> episodes between 2017-2017. <a href="https://en.wikipedia.org/wiki/Karina_Okotel">Karina Okotel on Wikipedia</a>.</p> <div class="performerholder"> <table class="performer"> <tr style="vertical-align:bottom;"> <td><div style="height:100px;" class="performances female" title="1"></div><span class="year">2017</span></td> </tr> </table> </div> <ol class="episodes"> <li><strong>2017-11-15</strong> / <a href="../shows/the-drum.html">The Drum</a></li> </ol> </div> </body> </html>
function getDirective(e){function i(e){function i(i,r,o){var a=e(o[t]);r.on(n,function(e){i.$apply(function(){a(i,{$event:e})})})}return{restrict:"A",link:i}}var t="md"+e,n="$md."+e.toLowerCase();return i.$inject=["$parse"],i}goog.provide("ng.material.components.swipe"),goog.require("ng.material.core"),angular.module("material.components.swipe",["material.core"]).directive("mdSwipeLeft",getDirective("SwipeLeft")).directive("mdSwipeRight",getDirective("SwipeRight")),ng.material.components.swipe=angular.module("material.components.swipe");
package lombok.javac; import java.lang.annotation.Annotation; import lombok.core.AnnotationValues; import com.sun.tools.javac.tree.JCTree.JCAnnotation; /** * Implement this interface if you want to be triggered for a specific annotation. * * You MUST replace 'T' with a specific annotation type, such as: * * {@code public class HandleGetter implements <API key><Getter>} * * Because this generics parameter is inspected to figure out which class you're interested in. * * You also need to register yourself via SPI discovery as being an implementation of {@code <API key>}. */ public abstract class <API key><T extends Annotation> { /** * Called when an annotation is found that is likely to match the annotation you're interested in. * * Be aware that you'll be called for ANY annotation node in the source that looks like a match. There is, * for example, no guarantee that the annotation node belongs to a method, even if you set your * TargetType in the annotation to methods only. * * @param annotation The actual annotation - use this object to retrieve the annotation parameters. * @param ast The javac AST node representing the annotation. * @param annotationNode The Lombok AST wrapper around the 'ast' parameter. You can use this object * to travel back up the chain (something javac AST can't do) to the parent of the annotation, as well * as access useful methods such as generating warnings or errors focused on the annotation. */ public abstract void handle(AnnotationValues<T> annotation, JCAnnotation ast, JavacNode annotationNode); /** * Return true if this handler requires resolution. */ public boolean isResolutionBased() { return false; } }
package nokogiri; import static nokogiri.internals.NokogiriHelpers.getNokogiriClass; import static nokogiri.internals.NokogiriHelpers.stringOrBlank; import java.io.<API key>; import java.io.IOException; import java.io.PipedReader; import java.io.PipedWriter; import java.io.StringReader; import java.nio.CharBuffer; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.xml.transform.Templates; import javax.xml.transform.Transformer; import javax.xml.transform.<API key>; import javax.xml.transform.<API key>; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMResult; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import nokogiri.internals.<API key>; import org.apache.xalan.transformer.TransformerImpl; import org.apache.xml.serializer.<API key>; import org.jruby.Ruby; import org.jruby.RubyArray; import org.jruby.RubyClass; import org.jruby.RubyHash; import org.jruby.RubyObject; import org.jruby.RubyString; import org.jruby.anno.JRubyClass; import org.jruby.anno.JRubyMethod; import org.jruby.javasupport.util.RuntimeHelpers; import org.jruby.runtime.ThreadContext; import org.jruby.runtime.builtin.IRubyObject; import org.w3c.dom.Document; /** * Class for Nokogiri::XSLT::Stylesheet * * @author sergio * @author Yoko Harada <yokolet@gmail.com> */ @JRubyClass(name="Nokogiri::XSLT::Stylesheet") public class XsltStylesheet extends RubyObject { private static Map<String, Object> registry = new HashMap<String, Object>(); private TransformerFactory factory = null; private Templates sheet = null; private IRubyObject stylesheet = null; private boolean htmlish = false; public static Map<String, Object> getRegistry() { return registry; } public XsltStylesheet(Ruby ruby, RubyClass rubyClass) { super(ruby, rubyClass); } /** * Create and return a copy of this object. * * @return a clone of this object */ @Override public Object clone() throws <API key> { return super.clone(); } private void <API key>(ThreadContext context, Transformer transf, IRubyObject parameters) { Ruby runtime = context.getRuntime(); if (parameters instanceof RubyHash) { setHashParameters(transf, (RubyHash)parameters); } else if (parameters instanceof RubyArray) { setArrayParameters(transf, runtime, (RubyArray)parameters); } else { throw runtime.newTypeError("parameters should be given either Array or Hash"); } } private void setHashParameters(Transformer transformer, RubyHash hash) { Set<String> keys = hash.keySet(); for (String key : keys) { String value = (String)hash.get(key); transformer.setParameter(key, unparseValue(value)); } } private void setArrayParameters(Transformer transformer, Ruby runtime, RubyArray params) { int limit = params.getLength(); if(limit % 2 == 1) limit for(int i = 0; i < limit; i+=2) { String name = params.aref(runtime.newFixnum(i)).asJavaString(); String value = params.aref(runtime.newFixnum(i+1)).asJavaString(); transformer.setParameter(name, unparseValue(value)); } } private Pattern p = Pattern.compile("'.{1,}'"); private String unparseValue(String orig) { Matcher m = p.matcher(orig); if ((orig.startsWith("\"") && orig.endsWith("\"")) || m.matches()) { orig = orig.substring(1, orig.length()-1); } return orig; } @JRubyMethod(meta = true, rest = true) public static IRubyObject <API key>(ThreadContext context, IRubyObject klazz, IRubyObject[] args) { Ruby runtime = context.getRuntime(); <API key>(runtime, args[0]); XmlDocument xmlDoc = (XmlDocument) args[0]; <API key>(context, xmlDoc); Document doc = ((XmlDocument) xmlDoc.dup_implementation(context, true)).getDocument(); XsltStylesheet xslt = (XsltStylesheet) NokogiriService.<API key>.allocate(runtime, (RubyClass)klazz); try { xslt.init(args[1], doc); } catch (<API key> ex) { throw runtime.newRuntimeError("could not parse xslt stylesheet"); } return xslt; } private void init(IRubyObject stylesheet, Document document) throws <API key> { this.stylesheet = stylesheet; // either RubyString or RubyFile if (factory == null) factory = TransformerFactory.newInstance(); <API key> elistener = new <API key>(); factory.setErrorListener(elistener); sheet = factory.newTemplates(new DOMSource(document)); } private static void <API key>(Ruby runtime, IRubyObject arg) { if (arg instanceof XmlDocument) { return; } else { throw runtime.newArgumentError("doc must be a Nokogiri::XML::Document instance"); } } private static void <API key>(ThreadContext context, XmlDocument xmlDoc) { Ruby runtime = context.getRuntime(); RubyArray errors_of_xmlDoc = (RubyArray) xmlDoc.getInstanceVariable("@errors"); if (!errors_of_xmlDoc.isEmpty()) { throw runtime.newRuntimeError(errors_of_xmlDoc.first().asString().asJavaString()); } } @JRubyMethod public IRubyObject serialize(ThreadContext context, IRubyObject doc) throws IOException, <API key> { XmlDocument xmlDoc = (XmlDocument) doc; TransformerImpl transformer = (TransformerImpl) this.sheet.newTransformer(); <API key> writer = new <API key>(); StreamResult streamResult = new StreamResult(writer); <API key> <API key> = transformer.<API key>(streamResult); <API key>.serialize(xmlDoc.getNode()); return context.getRuntime().newString(writer.toString()); } @JRubyMethod(rest = true, required=1, optional=2) public IRubyObject transform(ThreadContext context, IRubyObject[] args) { Ruby runtime = context.getRuntime(); argumentTypeCheck(runtime, args[0]); <API key> elistener = new <API key>(); DOMSource domSource = new DOMSource(((XmlDocument) args[0]).getDocument()); DOMResult result = null; String stringResult = null; try{ result = <API key>(context, args, domSource, elistener); // DOMResult if (result.getNode().getFirstChild() == null) { stringResult = <API key>(context, args, domSource, elistener); // StreamResult } } catch(<API key> ex) { throw runtime.newRuntimeError(ex.getMessage()); } catch(<API key> ex) { throw runtime.newRuntimeError(ex.getMessage()); } catch (IOException ex) { throw runtime.newRuntimeError(ex.getMessage()); } switch (elistener.getErrorType()) { case ERROR: case FATAL: throw runtime.newRuntimeError(elistener.getErrorMessage()); case WARNING: default: // no-op } if (stringResult == null) { return <API key>(context, runtime, result); } else { return <API key>(context, runtime, stringResult); } } private DOMResult <API key>(ThreadContext context, IRubyObject[] args, DOMSource domSource, <API key> elistener) throws <API key> { Transformer transf = sheet.newTransformer(); transf.reset(); transf.setErrorListener(elistener); if (args.length > 1) { <API key>(context, transf, args[1]); } DOMResult result = new DOMResult(); transf.transform(domSource, result); return result; } private String <API key>(ThreadContext context, IRubyObject[] args, DOMSource domSource, <API key> elistener) throws <API key>, IOException { Templates templates = <API key>(); Transformer transf = templates.newTransformer(); transf.setErrorListener(elistener); if (args.length > 1) { <API key>(context, transf, args[1]); } PipedWriter pwriter = new PipedWriter(); PipedReader preader = new PipedReader(); pwriter.connect(preader); StreamResult result = new StreamResult(pwriter); transf.transform(domSource, result); char[] cbuf = new char[1024]; int len = preader.read(cbuf, 0, 1024); StringBuilder builder = new StringBuilder(); builder.append(CharBuffer.wrap(cbuf, 0, len)); htmlish = isHtml(builder.toString()); // judge from the first chunk while (len == 1024) { len = preader.read(cbuf, 0, 1024); if (len > 0) { builder.append(CharBuffer.wrap(cbuf, 0, len)); } } preader.close(); pwriter.close(); return builder.toString(); } private IRubyObject <API key>(ThreadContext context, Ruby runtime, DOMResult domResult) { if ("html".equals(domResult.getNode().getFirstChild().getNodeName())) { HtmlDocument htmlDocument = (HtmlDocument) getNokogiriClass(runtime, "Nokogiri::HTML::Document").allocate(); htmlDocument.setDocumentNode(context, (Document) domResult.getNode()); return htmlDocument; } else { XmlDocument xmlDocument = (XmlDocument) NokogiriService.<API key>.allocate(runtime, getNokogiriClass(runtime, "Nokogiri::XML::Document")); xmlDocument.setDocumentNode(context, (Document) domResult.getNode()); return xmlDocument; } } private Templates <API key>() throws <API key> { if (stylesheet instanceof RubyString) { StringReader reader = new StringReader((String)stylesheet.toJava(String.class)); StreamSource xsltStreamSource = new StreamSource(reader); return factory.newTemplates(xsltStreamSource); } return null; } private static Pattern html_tag = Pattern.compile("<(%s)*html", Pattern.CASE_INSENSITIVE); private boolean isHtml(String chunk) { Matcher m = XsltStylesheet.html_tag.matcher(chunk); if (m.find()) return true; else return false; } private IRubyObject <API key>(ThreadContext context, Ruby runtime, String stringResult) { IRubyObject[] args = new IRubyObject[4]; args[0] = stringOrBlank(runtime, stringResult); args[1] = runtime.getNil(); // url args[2] = runtime.getNil(); // encoding RubyClass parse_options = (RubyClass)runtime.getClassFromPath("Nokogiri::XML::ParseOptions"); if (htmlish) { args[3] = parse_options.getConstant("DEFAULT_HTML"); RubyClass htmlDocumentClass = getNokogiriClass(runtime, "Nokogiri::HTML::Document"); return RuntimeHelpers.invoke(context, htmlDocumentClass, "parse", args); } else { args[3] = parse_options.getConstant("DEFAULT_XML"); RubyClass xmlDocumentClass = getNokogiriClass(runtime, "Nokogiri::XML::Document"); XmlDocument xmlDocument = (XmlDocument) RuntimeHelpers.invoke(context, xmlDocumentClass, "parse", args); if (((Document)xmlDocument.getNode()).getDocumentElement() == null) { RubyArray errors = (RubyArray) xmlDocument.getInstanceVariable("@errors"); RuntimeHelpers.invoke(context, errors, "<<", args[0]); } return xmlDocument; } } private void argumentTypeCheck(Ruby runtime, IRubyObject arg) { if (arg instanceof XmlDocument) { return; } else { throw runtime.newArgumentError("argument must be a Nokogiri::XML::Document"); } } @JRubyMethod(name = {"registr", "register"}, meta = true) public static IRubyObject register(ThreadContext context, IRubyObject cls, IRubyObject uri, IRubyObject receiver) { throw context.getRuntime().<API key>("Nokogiri::XSLT.register method is not implemented"); /* When API conflict is solved, this method should be below: // ThreadContext is used while executing xslt extension function registry.put("context", context); registry.put("receiver", receiver); return context.getRuntime().getNil(); */ } }
html { font-family: sans-serif; -<API key>: 100%; -ms-text-size-adjust: 100%; } body { margin: 0; } article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } audio, canvas, progress, video { display: inline-block; vertical-align: baseline; } audio:not([controls]) { display: none; height: 0; } [hidden], template { display: none; } a { background-color: transparent; } a:active, a:hover { outline: 0; } abbr[title] { border-bottom: 1px dotted; } b, strong { font-weight: bold; } dfn { font-style: italic; } h1 { margin: .67em 0; font-size: 3em; } mark { color: #000; background: #ff0; } small { font-size: 80%; } sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; } sup { top: -.5em; } sub { bottom: -.25em; } img { border: 0; } svg:not(:root) { overflow: hidden; } figure { margin: 1em 40px; } hr { height: 0; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; } pre { overflow: auto; } code, kbd, pre, samp { font-family: monospace, monospace; font-size: 1em; } button, input, optgroup, select, textarea { margin: 0; font: inherit; color: inherit; } button { overflow: visible; } button, select { text-transform: none; } button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; } button[disabled], html input[disabled] { cursor: default; } button::-moz-focus-inner, input::-moz-focus-inner { padding: 0; border: 0; } input { line-height: normal; } input[type="checkbox"], input[type="radio"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; } input[type="number"]::-<API key>, input[type="number"]::-<API key> { height: auto; } input[type="search"] { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; -webkit-appearance: textfield; } input[type="search"]::-<API key>, input[type="search"]::-<API key> { -webkit-appearance: none; } fieldset { padding: .35em .625em .75em; margin: 0 2px; border: 1px solid #c0c0c0; } legend { padding: 0; border: 0; } textarea { overflow: auto; } optgroup { font-weight: bold; } table { border-spacing: 0; border-collapse: collapse; } td, th { padding: 0; } @media print { *, *:before, *:after { color: #000 !important; text-shadow: none !important; background: transparent !important; -webkit-box-shadow: none !important; box-shadow: none !important; } a, a:visited { text-decoration: underline; } a[href]:after { content: " (" attr(href) ")"; } abbr[title]:after { content: " (" attr(title) ")"; } a[href^="#"]:after, a[href^="javascript:"]:after { content: ""; } pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } thead { display: table-header-group; } tr, img { page-break-inside: avoid; } img { max-width: 100% !important; } p, h2, h3 { orphans: 3; widows: 3; } h2, h3 { page-break-after: avoid; } .navbar { display: none; } .btn > .caret, .dropup > .btn > .caret { border-top-color: #000 !important; } .label { border: 1px solid #000; } .table { border-collapse: collapse !important; } .table td, .table th { background-color: #fff !important; } .table-bordered th, .table-bordered td { border: 1px solid #ddd !important; } } @font-face { font-family: 'Glyphicons Halflings'; src: url('../fonts/<API key>.eot'); src: url('../fonts/<API key>.eot?#iefix') format('embedded-opentype'), url('../fonts/<API key>.woff2') format('woff2'), url('../fonts/<API key>.woff') format('woff'), url('../fonts/<API key>.ttf') format('truetype'), url('../fonts/<API key>.svg#<API key>') format('svg'); } .glyphicon { position: relative; top: 1px; display: inline-block; font-family: 'Glyphicons Halflings'; font-style: normal; font-weight: normal; line-height: 1; -<API key>: antialiased; -<API key>: grayscale; } .glyphicon-asterisk:before { content: "\002a"; } .glyphicon-plus:before { content: "\002b"; } .glyphicon-euro:before, .glyphicon-eur:before { content: "\20ac"; } .glyphicon-minus:before { content: "\2212"; } .glyphicon-cloud:before { content: "\2601"; } .glyphicon-envelope:before { content: "\2709"; } .glyphicon-pencil:before { content: "\270f"; } .glyphicon-glass:before { content: "\e001"; } .glyphicon-music:before { content: "\e002"; } .glyphicon-search:before { content: "\e003"; } .glyphicon-heart:before { content: "\e005"; } .glyphicon-star:before { content: "\e006"; } .<API key>:before { content: "\e007"; } .glyphicon-user:before { content: "\e008"; } .glyphicon-film:before { content: "\e009"; } .glyphicon-th-large:before { content: "\e010"; } .glyphicon-th:before { content: "\e011"; } .glyphicon-th-list:before { content: "\e012"; } .glyphicon-ok:before { content: "\e013"; } .glyphicon-remove:before { content: "\e014"; } .glyphicon-zoom-in:before { content: "\e015"; } .glyphicon-zoom-out:before { content: "\e016"; } .glyphicon-off:before { content: "\e017"; } .glyphicon-signal:before { content: "\e018"; } .glyphicon-cog:before { content: "\e019"; } .glyphicon-trash:before { content: "\e020"; } .glyphicon-home:before { content: "\e021"; } .glyphicon-file:before { content: "\e022"; } .glyphicon-time:before { content: "\e023"; } .glyphicon-road:before { content: "\e024"; } .<API key>:before { content: "\e025"; } .glyphicon-download:before { content: "\e026"; } .glyphicon-upload:before { content: "\e027"; } .glyphicon-inbox:before { content: "\e028"; } .<API key>:before { content: "\e029"; } .glyphicon-repeat:before { content: "\e030"; } .glyphicon-refresh:before { content: "\e031"; } .glyphicon-list-alt:before { content: "\e032"; } .glyphicon-lock:before { content: "\e033"; } .glyphicon-flag:before { content: "\e034"; } .<API key>:before { content: "\e035"; } .<API key>:before { content: "\e036"; } .<API key>:before { content: "\e037"; } .glyphicon-volume-up:before { content: "\e038"; } .glyphicon-qrcode:before { content: "\e039"; } .glyphicon-barcode:before { content: "\e040"; } .glyphicon-tag:before { content: "\e041"; } .glyphicon-tags:before { content: "\e042"; } .glyphicon-book:before { content: "\e043"; } .glyphicon-bookmark:before { content: "\e044"; } .glyphicon-print:before { content: "\e045"; } .glyphicon-camera:before { content: "\e046"; } .glyphicon-font:before { content: "\e047"; } .glyphicon-bold:before { content: "\e048"; } .glyphicon-italic:before { content: "\e049"; } .<API key>:before { content: "\e050"; } .<API key>:before { content: "\e051"; } .<API key>:before { content: "\e052"; } .<API key>:before { content: "\e053"; } .<API key>:before { content: "\e054"; } .<API key>:before { content: "\e055"; } .glyphicon-list:before { content: "\e056"; } .<API key>:before { content: "\e057"; } .<API key>:before { content: "\e058"; } .<API key>:before { content: "\e059"; } .glyphicon-picture:before { content: "\e060"; } .<API key>:before { content: "\e062"; } .glyphicon-adjust:before { content: "\e063"; } .glyphicon-tint:before { content: "\e064"; } .glyphicon-edit:before { content: "\e065"; } .glyphicon-share:before { content: "\e066"; } .glyphicon-check:before { content: "\e067"; } .glyphicon-move:before { content: "\e068"; } .<API key>:before { content: "\e069"; } .<API key>:before { content: "\e070"; } .glyphicon-backward:before { content: "\e071"; } .glyphicon-play:before { content: "\e072"; } .glyphicon-pause:before { content: "\e073"; } .glyphicon-stop:before { content: "\e074"; } .glyphicon-forward:before { content: "\e075"; } .<API key>:before { content: "\e076"; } .<API key>:before { content: "\e077"; } .glyphicon-eject:before { content: "\e078"; } .<API key>:before { content: "\e079"; } .<API key>:before { content: "\e080"; } .glyphicon-plus-sign:before { content: "\e081"; } .<API key>:before { content: "\e082"; } .<API key>:before { content: "\e083"; } .glyphicon-ok-sign:before { content: "\e084"; } .<API key>:before { content: "\e085"; } .glyphicon-info-sign:before { content: "\e086"; } .<API key>:before { content: "\e087"; } .<API key>:before { content: "\e088"; } .glyphicon-ok-circle:before { content: "\e089"; } .<API key>:before { content: "\e090"; } .<API key>:before { content: "\e091"; } .<API key>:before { content: "\e092"; } .glyphicon-arrow-up:before { content: "\e093"; } .<API key>:before { content: "\e094"; } .glyphicon-share-alt:before { content: "\e095"; } .<API key>:before { content: "\e096"; } .<API key>:before { content: "\e097"; } .<API key>:before { content: "\e101"; } .glyphicon-gift:before { content: "\e102"; } .glyphicon-leaf:before { content: "\e103"; } .glyphicon-fire:before { content: "\e104"; } .glyphicon-eye-open:before { content: "\e105"; } .glyphicon-eye-close:before { content: "\e106"; } .<API key>:before { content: "\e107"; } .glyphicon-plane:before { content: "\e108"; } .glyphicon-calendar:before { content: "\e109"; } .glyphicon-random:before { content: "\e110"; } .glyphicon-comment:before { content: "\e111"; } .glyphicon-magnet:before { content: "\e112"; } .<API key>:before { content: "\e113"; } .<API key>:before { content: "\e114"; } .glyphicon-retweet:before { content: "\e115"; } .<API key>:before { content: "\e116"; } .<API key>:before { content: "\e117"; } .<API key>:before { content: "\e118"; } .<API key>:before { content: "\e119"; } .<API key>:before { content: "\e120"; } .glyphicon-hdd:before { content: "\e121"; } .glyphicon-bullhorn:before { content: "\e122"; } .glyphicon-bell:before { content: "\e123"; } .<API key>:before { content: "\e124"; } .glyphicon-thumbs-up:before { content: "\e125"; } .<API key>:before { content: "\e126"; } .<API key>:before { content: "\e127"; } .glyphicon-hand-left:before { content: "\e128"; } .glyphicon-hand-up:before { content: "\e129"; } .glyphicon-hand-down:before { content: "\e130"; } .<API key>:before { content: "\e131"; } .<API key>:before { content: "\e132"; } .<API key>:before { content: "\e133"; } .<API key>:before { content: "\e134"; } .glyphicon-globe:before { content: "\e135"; } .glyphicon-wrench:before { content: "\e136"; } .glyphicon-tasks:before { content: "\e137"; } .glyphicon-filter:before { content: "\e138"; } .glyphicon-briefcase:before { content: "\e139"; } .<API key>:before { content: "\e140"; } .glyphicon-dashboard:before { content: "\e141"; } .glyphicon-paperclip:before { content: "\e142"; } .<API key>:before { content: "\e143"; } .glyphicon-link:before { content: "\e144"; } .glyphicon-phone:before { content: "\e145"; } .glyphicon-pushpin:before { content: "\e146"; } .glyphicon-usd:before { content: "\e148"; } .glyphicon-gbp:before { content: "\e149"; } .glyphicon-sort:before { content: "\e150"; } .<API key>:before { content: "\e151"; } .<API key>:before { content: "\e152"; } .<API key>:before { content: "\e153"; } .<API key>:before { content: "\e154"; } .<API key>:before { content: "\e155"; } .<API key>:before { content: "\e156"; } .glyphicon-unchecked:before { content: "\e157"; } .glyphicon-expand:before { content: "\e158"; } .<API key>:before { content: "\e159"; } .<API key>:before { content: "\e160"; } .glyphicon-log-in:before { content: "\e161"; } .glyphicon-flash:before { content: "\e162"; } .glyphicon-log-out:before { content: "\e163"; } .<API key>:before { content: "\e164"; } .glyphicon-record:before { content: "\e165"; } .glyphicon-save:before { content: "\e166"; } .glyphicon-open:before { content: "\e167"; } .glyphicon-saved:before { content: "\e168"; } .glyphicon-import:before { content: "\e169"; } .glyphicon-export:before { content: "\e170"; } .glyphicon-send:before { content: "\e171"; } .<API key>:before { content: "\e172"; } .<API key>:before { content: "\e173"; } .<API key>:before { content: "\e174"; } .<API key>:before { content: "\e175"; } .<API key>:before { content: "\e176"; } .<API key>:before { content: "\e177"; } .glyphicon-transfer:before { content: "\e178"; } .glyphicon-cutlery:before { content: "\e179"; } .glyphicon-header:before { content: "\e180"; } .<API key>:before { content: "\e181"; } .glyphicon-earphone:before { content: "\e182"; } .glyphicon-phone-alt:before { content: "\e183"; } .glyphicon-tower:before { content: "\e184"; } .glyphicon-stats:before { content: "\e185"; } .glyphicon-sd-video:before { content: "\e186"; } .glyphicon-hd-video:before { content: "\e187"; } .glyphicon-subtitles:before { content: "\e188"; } .<API key>:before { content: "\e189"; } .<API key>:before { content: "\e190"; } .glyphicon-sound-5-1:before { content: "\e191"; } .glyphicon-sound-6-1:before { content: "\e192"; } .glyphicon-sound-7-1:before { content: "\e193"; } .<API key>:before { content: "\e194"; } .<API key>:before { content: "\e195"; } .<API key>:before { content: "\e197"; } .<API key>:before { content: "\e198"; } .<API key>:before { content: "\e199"; } .<API key>:before { content: "\e200"; } .glyphicon-cd:before { content: "\e201"; } .glyphicon-save-file:before { content: "\e202"; } .glyphicon-open-file:before { content: "\e203"; } .glyphicon-level-up:before { content: "\e204"; } .glyphicon-copy:before { content: "\e205"; } .glyphicon-paste:before { content: "\e206"; } .glyphicon-alert:before { content: "\e209"; } .glyphicon-equalizer:before { content: "\e210"; } .glyphicon-king:before { content: "\e211"; } .glyphicon-queen:before { content: "\e212"; } .glyphicon-pawn:before { content: "\e213"; } .glyphicon-bishop:before { content: "\e214"; } .glyphicon-knight:before { content: "\e215"; } .<API key>:before { content: "\e216"; } .glyphicon-tent:before { content: "\26fa"; } .<API key>:before { content: "\e218"; } .glyphicon-bed:before { content: "\e219"; } .glyphicon-apple:before { content: "\f8ff"; } .glyphicon-erase:before { content: "\e221"; } .glyphicon-hourglass:before { content: "\231b"; } .glyphicon-lamp:before { content: "\e223"; } .glyphicon-duplicate:before { content: "\e224"; } .<API key>:before { content: "\e225"; } .glyphicon-scissors:before { content: "\e226"; } .glyphicon-bitcoin:before { content: "\e227"; } .glyphicon-btc:before { content: "\e227"; } .glyphicon-xbt:before { content: "\e227"; } .glyphicon-yen:before { content: "\00a5"; } .glyphicon-jpy:before { content: "\00a5"; } .glyphicon-ruble:before { content: "\20bd"; } .glyphicon-rub:before { content: "\20bd"; } .glyphicon-scale:before { content: "\e230"; } .glyphicon-ice-lolly:before { content: "\e231"; } .<API key>:before { content: "\e232"; } .glyphicon-education:before { content: "\e233"; } .<API key>:before { content: "\e234"; } .<API key>:before { content: "\e235"; } .<API key>:before { content: "\e236"; } .<API key>:before { content: "\e237"; } .glyphicon-oil:before { content: "\e238"; } .glyphicon-grain:before { content: "\e239"; } .<API key>:before { content: "\e240"; } .glyphicon-text-size:before { content: "\e241"; } .<API key>:before { content: "\e242"; } .<API key>:before { content: "\e243"; } .<API key>:before { content: "\e244"; } .<API key>:before { content: "\e245"; } .<API key>:before { content: "\e246"; } .<API key>:before { content: "\e247"; } .<API key>:before { content: "\e248"; } .<API key>:before { content: "\e249"; } .<API key>:before { content: "\e250"; } .<API key>:before { content: "\e251"; } .<API key>:before { content: "\e252"; } .<API key>:before { content: "\e253"; } .glyphicon-console:before { content: "\e254"; } .<API key>:before { content: "\e255"; } .glyphicon-subscript:before { content: "\e256"; } .glyphicon-menu-left:before { content: "\e257"; } .<API key>:before { content: "\e258"; } .glyphicon-menu-down:before { content: "\e259"; } .glyphicon-menu-up:before { content: "\e260"; } * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } html { font-size: 10px; -<API key>: rgba(0, 0, 0, 0); } body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333; background-color: #fff; } input, button, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; } a { color: #337ab7; text-decoration: none; } a:hover, a:focus { color: #23527c; text-decoration: underline; } a:focus { outline: 5px auto -<API key>; outline-offset: -2px; } figure { margin: 0; } img { vertical-align: middle; } .img-responsive, .thumbnail > img, .thumbnail a > img, .carousel-inner > .item > img, .carousel-inner > .item > a > img { display: block; max-width: 100%; height: auto; } .img-rounded { border-radius: 6px; } .img-thumbnail { display: inline-block; max-width: 100%; height: auto; padding: 4px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; -webkit-transition: all .2s ease-in-out; -o-transition: all .2s ease-in-out; transition: all .2s ease-in-out; } .img-circle { border-radius: 50%; } hr { margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid #eee; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } .sr-only-focusable:active, .sr-only-focusable:focus { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; } [role="button"] { cursor: pointer; } h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: inherit; font-weight: 500; line-height: 1.1; color: inherit; } h1 small, h2 small, h3 small, h4 small, h5 small, h6 small, .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small, h1 .small, h2 .small, h3 .small, h4 .small, h5 .small, h6 .small, .h1 .small, .h2 .small, .h3 .small, .h4 .small, .h5 .small, .h6 .small { font-weight: normal; line-height: 1; color: #777; } h1, .h1, h2, .h2, h3, .h3 { margin-top: 20px; margin-bottom: 10px; } h1 small, .h1 small, h2 small, .h2 small, h3 small, .h3 small, h1 .small, .h1 .small, h2 .small, .h2 .small, h3 .small, .h3 .small { font-size: 65%; } h4, .h4, h5, .h5, h6, .h6 { margin-top: 10px; margin-bottom: 10px; } h4 small, .h4 small, h5 small, .h5 small, h6 small, .h6 small, h4 .small, .h4 .small, h5 .small, .h5 .small, h6 .small, .h6 .small { font-size: 75%; } h1, .h1 { font-size: 36px; } h2, .h2 { font-size: 30px; } h3, .h3 { font-size: 24px; } h4, .h4 { font-size: 18px; } h5, .h5 { font-size: 14px; } h6, .h6 { font-size: 12px; } p { margin: 0 0 10px; } .lead { margin-bottom: 20px; font-size: 16px; font-weight: 300; line-height: 1.4; } @media (min-width: 768px) { .lead { font-size: 21px; } } small, .small { font-size: 85%; } mark, .mark { padding: .2em; background-color: #fcf8e3; } .text-left { text-align: left; } .text-right { text-align: right; } .text-center { text-align: center; } .text-justify { text-align: justify; } .text-nowrap { white-space: nowrap; } .text-lowercase { text-transform: lowercase; } .text-uppercase { text-transform: uppercase; } .text-capitalize { text-transform: capitalize; } .text-muted { color: #777; } .text-primary { color: #337ab7; } a.text-primary:hover, a.text-primary:focus { color: #286090; } .text-success { color: #3c763d; } a.text-success:hover, a.text-success:focus { color: #2b542c; } .text-info { color: #31708f; } a.text-info:hover, a.text-info:focus { color: #245269; } .text-warning { color: #8a6d3b; } a.text-warning:hover, a.text-warning:focus { color: #66512c; } .text-danger { color: #a94442; } a.text-danger:hover, a.text-danger:focus { color: #843534; } .bg-primary { color: #fff; background-color: #337ab7; } a.bg-primary:hover, a.bg-primary:focus { background-color: #286090; } .bg-success { background-color: #dff0d8; } a.bg-success:hover, a.bg-success:focus { background-color: #c1e2b3; } .bg-info { background-color: #d9edf7; } a.bg-info:hover, a.bg-info:focus { background-color: #afd9ee; } .bg-warning { background-color: #fcf8e3; } a.bg-warning:hover, a.bg-warning:focus { background-color: #f7ecb5; } .bg-danger { background-color: #f2dede; } a.bg-danger:hover, a.bg-danger:focus { background-color: #e4b9b9; } .page-header { padding-bottom: 9px; margin: 40px 0 20px; border-bottom: 1px solid #eee; } ul, ol { margin-top: 0; margin-bottom: 10px; } ul ul, ol ul, ul ol, ol ol { margin-bottom: 0; } .list-unstyled { padding-left: 0; list-style: none; } .list-inline { padding-left: 0; margin-left: -5px; list-style: none; } .list-inline > li { display: inline-block; padding-right: 5px; padding-left: 5px; } dl { margin-top: 0; margin-bottom: 20px; } dt, dd { line-height: 1.42857143; } dt { font-weight: bold; } dd { margin-left: 0; } @media (min-width: 768px) { .dl-horizontal dt { float: left; width: 160px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; } .dl-horizontal dd { margin-left: 180px; } } abbr[title], abbr[data-original-title] { cursor: help; border-bottom: 1px dotted #777; } .initialism { font-size: 90%; text-transform: uppercase; } blockquote { padding: 10px 20px; margin: 0 0 20px; font-size: 17.5px; border-left: 5px solid #eee; } blockquote p:last-child, blockquote ul:last-child, blockquote ol:last-child { margin-bottom: 0; } blockquote footer, blockquote small, blockquote .small { display: block; font-size: 80%; line-height: 1.42857143; color: #777; } blockquote footer:before, blockquote small:before, blockquote .small:before { content: '\2014 \00A0'; } .blockquote-reverse, blockquote.pull-right { padding-right: 15px; padding-left: 0; text-align: right; border-right: 5px solid #eee; border-left: 0; } .blockquote-reverse footer:before, blockquote.pull-right footer:before, .blockquote-reverse small:before, blockquote.pull-right small:before, .blockquote-reverse .small:before, blockquote.pull-right .small:before { content: ''; } .blockquote-reverse footer:after, blockquote.pull-right footer:after, .blockquote-reverse small:after, blockquote.pull-right small:after, .blockquote-reverse .small:after, blockquote.pull-right .small:after { content: '\00A0 \2014'; } address { margin-bottom: 20px; font-style: normal; line-height: 1.42857143; } code, kbd, pre, samp { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; } code { padding: 2px 4px; font-size: 90%; color: #c7254e; background-color: #f9f2f4; border-radius: 4px; } kbd { padding: 2px 4px; font-size: 90%; color: #fff; background-color: #333; border-radius: 3px; -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); } kbd kbd { padding: 0; font-size: 100%; font-weight: bold; -webkit-box-shadow: none; box-shadow: none; } pre { display: block; padding: 9.5px; margin: 0 0 10px; font-size: 13px; line-height: 1.42857143; color: #333; word-break: break-all; word-wrap: break-word; background-color: #f5f5f5; border: 1px solid #ccc; border-radius: 4px; } pre code { padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0; } .pre-scrollable { max-height: 340px; overflow-y: scroll; } .container { padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; } @media (min-width: 768px) { .container { width: 750px; } } @media (min-width: 992px) { .container { width: 970px; } } @media (min-width: 1200px) { .container { width: 1170px; } } .container-fluid { padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; } .row { margin-left:-15px; margin-right:-15px; } .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px; } .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { float: left; } .col-xs-12 { width: 100%; } .col-xs-11 { width: 91.66666667%; } .col-xs-10 { width: 83.33333333%; } .col-xs-9 { width: 75%; } .col-xs-8 { width: 66.66666667%; } .col-xs-7 { width: 58.33333333%; } .col-xs-6 { width: 50%; } .col-xs-5 { width: 41.66666667%; } .col-xs-4 { width: 33.33333333%; } .col-xs-3 { width: 25%; } .col-xs-2 { width: 16.66666667%; } .col-xs-1 { width: 8.33333333%; } .col-xs-pull-12 { right: 100%; } .col-xs-pull-11 { right: 91.66666667%; } .col-xs-pull-10 { right: 83.33333333%; } .col-xs-pull-9 { right: 75%; } .col-xs-pull-8 { right: 66.66666667%; } .col-xs-pull-7 { right: 58.33333333%; } .col-xs-pull-6 { right: 50%; } .col-xs-pull-5 { right: 41.66666667%; } .col-xs-pull-4 { right: 33.33333333%; } .col-xs-pull-3 { right: 25%; } .col-xs-pull-2 { right: 16.66666667%; } .col-xs-pull-1 { right: 8.33333333%; } .col-xs-pull-0 { right: auto; } .col-xs-push-12 { left: 100%; } .col-xs-push-11 { left: 91.66666667%; } .col-xs-push-10 { left: 83.33333333%; } .col-xs-push-9 { left: 75%; } .col-xs-push-8 { left: 66.66666667%; } .col-xs-push-7 { left: 58.33333333%; } .col-xs-push-6 { left: 50%; } .col-xs-push-5 { left: 41.66666667%; } .col-xs-push-4 { left: 33.33333333%; } .col-xs-push-3 { left: 25%; } .col-xs-push-2 { left: 16.66666667%; } .col-xs-push-1 { left: 8.33333333%; } .col-xs-push-0 { left: auto; } .col-xs-offset-12 { margin-left: 100%; } .col-xs-offset-11 { margin-left: 91.66666667%; } .col-xs-offset-10 { margin-left: 83.33333333%; } .col-xs-offset-9 { margin-left: 75%; } .col-xs-offset-8 { margin-left: 66.66666667%; } .col-xs-offset-7 { margin-left: 58.33333333%; } .col-xs-offset-6 { margin-left: 50%; } .col-xs-offset-5 { margin-left: 41.66666667%; } .col-xs-offset-4 { margin-left: 33.33333333%; } .col-xs-offset-3 { margin-left: 25%; } .col-xs-offset-2 { margin-left: 16.66666667%; } .col-xs-offset-1 { margin-left: 8.33333333%; } .col-xs-offset-0 { margin-left: 0; } @media (min-width: 768px) { .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { float: left; } .col-sm-12 { width: 100%; } .col-sm-11 { width: 91.66666667%; } .col-sm-10 { width: 83.33333333%; } .col-sm-9 { width: 75%; } .col-sm-8 { width: 66.66666667%; } .col-sm-7 { width: 58.33333333%; } .col-sm-6 { width: 50%; } .col-sm-5 { width: 41.66666667%; } .col-sm-4 { width: 33.33333333%; } .col-sm-3 { width: 25%; } .col-sm-2 { width: 16.66666667%; } .col-sm-1 { width: 8.33333333%; } .col-sm-pull-12 { right: 100%; } .col-sm-pull-11 { right: 91.66666667%; } .col-sm-pull-10 { right: 83.33333333%; } .col-sm-pull-9 { right: 75%; } .col-sm-pull-8 { right: 66.66666667%; } .col-sm-pull-7 { right: 58.33333333%; } .col-sm-pull-6 { right: 50%; } .col-sm-pull-5 { right: 41.66666667%; } .col-sm-pull-4 { right: 33.33333333%; } .col-sm-pull-3 { right: 25%; } .col-sm-pull-2 { right: 16.66666667%; } .col-sm-pull-1 { right: 8.33333333%; } .col-sm-pull-0 { right: auto; } .col-sm-push-12 { left: 100%; } .col-sm-push-11 { left: 91.66666667%; } .col-sm-push-10 { left: 83.33333333%; } .col-sm-push-9 { left: 75%; } .col-sm-push-8 { left: 66.66666667%; } .col-sm-push-7 { left: 58.33333333%; } .col-sm-push-6 { left: 50%; } .col-sm-push-5 { left: 41.66666667%; } .col-sm-push-4 { left: 33.33333333%; } .col-sm-push-3 { left: 25%; } .col-sm-push-2 { left: 16.66666667%; } .col-sm-push-1 { left: 8.33333333%; } .col-sm-push-0 { left: auto; } .col-sm-offset-12 { margin-left: 100%; } .col-sm-offset-11 { margin-left: 91.66666667%; } .col-sm-offset-10 { margin-left: 83.33333333%; } .col-sm-offset-9 { margin-left: 75%; } .col-sm-offset-8 { margin-left: 66.66666667%; } .col-sm-offset-7 { margin-left: 58.33333333%; } .col-sm-offset-6 { margin-left: 50%; } .col-sm-offset-5 { margin-left: 41.66666667%; } .col-sm-offset-4 { margin-left: 33.33333333%; } .col-sm-offset-3 { margin-left: 25%; } .col-sm-offset-2 { margin-left: 16.66666667%; } .col-sm-offset-1 { margin-left: 8.33333333%; } .col-sm-offset-0 { margin-left: 0; } } @media (min-width: 992px) { .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { float: left; } .col-md-12 { width: 100%; } .col-md-11 { width: 91.66666667%; } .col-md-10 { width: 83.33333333%; } .col-md-9 { width: 75%; } .col-md-8 { width: 66.66666667%; } .col-md-7 { width: 58.33333333%; } .col-md-6 { width: 50%; } .col-md-5 { width: 41.66666667%; } .col-md-4 { width: 33.33333333%; } .col-md-3 { width: 25%; } .col-md-2 { width: 16.66666667%; } .col-md-1 { width: 8.33333333%; } .col-md-pull-12 { right: 100%; } .col-md-pull-11 { right: 91.66666667%; } .col-md-pull-10 { right: 83.33333333%; } .col-md-pull-9 { right: 75%; } .col-md-pull-8 { right: 66.66666667%; } .col-md-pull-7 { right: 58.33333333%; } .col-md-pull-6 { right: 50%; } .col-md-pull-5 { right: 41.66666667%; } .col-md-pull-4 { right: 33.33333333%; } .col-md-pull-3 { right: 25%; } .col-md-pull-2 { right: 16.66666667%; } .col-md-pull-1 { right: 8.33333333%; } .col-md-pull-0 { right: auto; } .col-md-push-12 { left: 100%; } .col-md-push-11 { left: 91.66666667%; } .col-md-push-10 { left: 83.33333333%; } .col-md-push-9 { left: 75%; } .col-md-push-8 { left: 66.66666667%; } .col-md-push-7 { left: 58.33333333%; } .col-md-push-6 { left: 50%; } .col-md-push-5 { left: 41.66666667%; } .col-md-push-4 { left: 33.33333333%; } .col-md-push-3 { left: 25%; } .col-md-push-2 { left: 16.66666667%; } .col-md-push-1 { left: 8.33333333%; } .col-md-push-0 { left: auto; } .col-md-offset-12 { margin-left: 100%; } .col-md-offset-11 { margin-left: 91.66666667%; } .col-md-offset-10 { margin-left: 83.33333333%; } .col-md-offset-9 { margin-left: 75%; } .col-md-offset-8 { margin-left: 66.66666667%; } .col-md-offset-7 { margin-left: 58.33333333%; } .col-md-offset-6 { margin-left: 50%; } .col-md-offset-5 { margin-left: 41.66666667%; } .col-md-offset-4 { margin-left: 33.33333333%; } .col-md-offset-3 { margin-left: 25%; } .col-md-offset-2 { margin-left: 16.66666667%; } .col-md-offset-1 { margin-left: 8.33333333%; } .col-md-offset-0 { margin-left: 0; } } @media (min-width: 1200px) { .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { float: left; } .col-lg-12 { width: 100%; } .col-lg-11 { width: 91.66666667%; } .col-lg-10 { width: 83.33333333%; } .col-lg-9 { width: 75%; } .col-lg-8 { width: 66.66666667%; } .col-lg-7 { width: 58.33333333%; } .col-lg-6 { width: 50%; } .col-lg-5 { width: 41.66666667%; } .col-lg-4 { width: 33.33333333%; } .col-lg-3 { width: 25%; } .col-lg-2 { width: 16.66666667%; } .col-lg-1 { width: 8.33333333%; } .col-lg-pull-12 { right: 100%; } .col-lg-pull-11 { right: 91.66666667%; } .col-lg-pull-10 { right: 83.33333333%; } .col-lg-pull-9 { right: 75%; } .col-lg-pull-8 { right: 66.66666667%; } .col-lg-pull-7 { right: 58.33333333%; } .col-lg-pull-6 { right: 50%; } .col-lg-pull-5 { right: 41.66666667%; } .col-lg-pull-4 { right: 33.33333333%; } .col-lg-pull-3 { right: 25%; } .col-lg-pull-2 { right: 16.66666667%; } .col-lg-pull-1 { right: 8.33333333%; } .col-lg-pull-0 { right: auto; } .col-lg-push-12 { left: 100%; } .col-lg-push-11 { left: 91.66666667%; } .col-lg-push-10 { left: 83.33333333%; } .col-lg-push-9 { left: 75%; } .col-lg-push-8 { left: 66.66666667%; } .col-lg-push-7 { left: 58.33333333%; } .col-lg-push-6 { left: 50%; } .col-lg-push-5 { left: 41.66666667%; } .col-lg-push-4 { left: 33.33333333%; } .col-lg-push-3 { left: 25%; } .col-lg-push-2 { left: 16.66666667%; } .col-lg-push-1 { left: 8.33333333%; } .col-lg-push-0 { left: auto; } .col-lg-offset-12 { margin-left: 100%; } .col-lg-offset-11 { margin-left: 91.66666667%; } .col-lg-offset-10 { margin-left: 83.33333333%; } .col-lg-offset-9 { margin-left: 75%; } .col-lg-offset-8 { margin-left: 66.66666667%; } .col-lg-offset-7 { margin-left: 58.33333333%; } .col-lg-offset-6 { margin-left: 50%; } .col-lg-offset-5 { margin-left: 41.66666667%; } .col-lg-offset-4 { margin-left: 33.33333333%; } .col-lg-offset-3 { margin-left: 25%; } .col-lg-offset-2 { margin-left: 16.66666667%; } .col-lg-offset-1 { margin-left: 8.33333333%; } .col-lg-offset-0 { margin-left: 0; } } table { background-color: transparent; } caption { padding-top: 8px; padding-bottom: 8px; color: #777; text-align: left; } th { text-align: left; } .table { width: 100%; max-width: 100%; margin-bottom: 20px; } .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { padding: 8px; line-height: 1.42857143; vertical-align: top; border-top: 1px solid #ddd; } .table > thead > tr > th { vertical-align: bottom; border-bottom: 2px solid #ddd; } .table > caption + thead > tr:first-child > th, .table > colgroup + thead > tr:first-child > th, .table > thead:first-child > tr:first-child > th, .table > caption + thead > tr:first-child > td, .table > colgroup + thead > tr:first-child > td, .table > thead:first-child > tr:first-child > td { border-top: 0; } .table > tbody + tbody { border-top: 2px solid #ddd; } .table .table { background-color: #fff; } .table-condensed > thead > tr > th, .table-condensed > tbody > tr > th, .table-condensed > tfoot > tr > th, .table-condensed > thead > tr > td, .table-condensed > tbody > tr > td, .table-condensed > tfoot > tr > td { padding: 5px; } .table-bordered { border: 1px solid #ddd; } .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td { border: 1px solid #ddd; } .table-bordered > thead > tr > th, .table-bordered > thead > tr > td { border-bottom-width: 2px; } .table-striped > tbody > tr:nth-of-type(odd) { background-color: #f9f9f9; } .table-hover > tbody > tr:hover { background-color: #f5f5f5; } table col[class*="col-"] { position: static; display: table-column; float: none; } table td[class*="col-"], table th[class*="col-"] { position: static; display: table-cell; float: none; } .table > thead > tr > td.active, .table > tbody > tr > td.active, .table > tfoot > tr > td.active, .table > thead > tr > th.active, .table > tbody > tr > th.active, .table > tfoot > tr > th.active, .table > thead > tr.active > td, .table > tbody > tr.active > td, .table > tfoot > tr.active > td, .table > thead > tr.active > th, .table > tbody > tr.active > th, .table > tfoot > tr.active > th { background-color: #f5f5f5; } .table-hover > tbody > tr > td.active:hover, .table-hover > tbody > tr > th.active:hover, .table-hover > tbody > tr.active:hover > td, .table-hover > tbody > tr:hover > .active, .table-hover > tbody > tr.active:hover > th { background-color: #e8e8e8; } .table > thead > tr > td.success, .table > tbody > tr > td.success, .table > tfoot > tr > td.success, .table > thead > tr > th.success, .table > tbody > tr > th.success, .table > tfoot > tr > th.success, .table > thead > tr.success > td, .table > tbody > tr.success > td, .table > tfoot > tr.success > td, .table > thead > tr.success > th, .table > tbody > tr.success > th, .table > tfoot > tr.success > th { background-color: #dff0d8; } .table-hover > tbody > tr > td.success:hover, .table-hover > tbody > tr > th.success:hover, .table-hover > tbody > tr.success:hover > td, .table-hover > tbody > tr:hover > .success, .table-hover > tbody > tr.success:hover > th { background-color: #d0e9c6; } .table > thead > tr > td.info, .table > tbody > tr > td.info, .table > tfoot > tr > td.info, .table > thead > tr > th.info, .table > tbody > tr > th.info, .table > tfoot > tr > th.info, .table > thead > tr.info > td, .table > tbody > tr.info > td, .table > tfoot > tr.info > td, .table > thead > tr.info > th, .table > tbody > tr.info > th, .table > tfoot > tr.info > th { background-color: #d9edf7; } .table-hover > tbody > tr > td.info:hover, .table-hover > tbody > tr > th.info:hover, .table-hover > tbody > tr.info:hover > td, .table-hover > tbody > tr:hover > .info, .table-hover > tbody > tr.info:hover > th { background-color: #c4e3f3; } .table > thead > tr > td.warning, .table > tbody > tr > td.warning, .table > tfoot > tr > td.warning, .table > thead > tr > th.warning, .table > tbody > tr > th.warning, .table > tfoot > tr > th.warning, .table > thead > tr.warning > td, .table > tbody > tr.warning > td, .table > tfoot > tr.warning > td, .table > thead > tr.warning > th, .table > tbody > tr.warning > th, .table > tfoot > tr.warning > th { background-color: #fcf8e3; } .table-hover > tbody > tr > td.warning:hover, .table-hover > tbody > tr > th.warning:hover, .table-hover > tbody > tr.warning:hover > td, .table-hover > tbody > tr:hover > .warning, .table-hover > tbody > tr.warning:hover > th { background-color: #faf2cc; } .table > thead > tr > td.danger, .table > tbody > tr > td.danger, .table > tfoot > tr > td.danger, .table > thead > tr > th.danger, .table > tbody > tr > th.danger, .table > tfoot > tr > th.danger, .table > thead > tr.danger > td, .table > tbody > tr.danger > td, .table > tfoot > tr.danger > td, .table > thead > tr.danger > th, .table > tbody > tr.danger > th, .table > tfoot > tr.danger > th { background-color: #f2dede; } .table-hover > tbody > tr > td.danger:hover, .table-hover > tbody > tr > th.danger:hover, .table-hover > tbody > tr.danger:hover > td, .table-hover > tbody > tr:hover > .danger, .table-hover > tbody > tr.danger:hover > th { background-color: #ebcccc; } .table-responsive { min-height: .01%; overflow-x: auto; } @media screen and (max-width: 767px) { .table-responsive { width: 100%; margin-bottom: 15px; overflow-y: hidden; -ms-overflow-style: -<API key>; border: 1px solid #ddd; } .table-responsive > .table { margin-bottom: 0; } .table-responsive > .table > thead > tr > th, .table-responsive > .table > tbody > tr > th, .table-responsive > .table > tfoot > tr > th, .table-responsive > .table > thead > tr > td, .table-responsive > .table > tbody > tr > td, .table-responsive > .table > tfoot > tr > td { white-space: nowrap; } .table-responsive > .table-bordered { border: 0; } .table-responsive > .table-bordered > thead > tr > th:first-child, .table-responsive > .table-bordered > tbody > tr > th:first-child, .table-responsive > .table-bordered > tfoot > tr > th:first-child, .table-responsive > .table-bordered > thead > tr > td:first-child, .table-responsive > .table-bordered > tbody > tr > td:first-child, .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .table-responsive > .table-bordered > thead > tr > th:last-child, .table-responsive > .table-bordered > tbody > tr > th:last-child, .table-responsive > .table-bordered > tfoot > tr > th:last-child, .table-responsive > .table-bordered > thead > tr > td:last-child, .table-responsive > .table-bordered > tbody > tr > td:last-child, .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .table-responsive > .table-bordered > tbody > tr:last-child > th, .table-responsive > .table-bordered > tfoot > tr:last-child > th, .table-responsive > .table-bordered > tbody > tr:last-child > td, .table-responsive > .table-bordered > tfoot > tr:last-child > td { border-bottom: 0; } } fieldset { min-width: 0; padding: 0; margin: 0; border: 0; } legend { display: block; width: 100%; padding: 0; margin-bottom: 20px; font-size: 21px; line-height: inherit; color: #333; border: 0; border-bottom: 1px solid #e5e5e5; } label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: bold; } input[type="search"] { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } input[type="radio"], input[type="checkbox"] { margin: 4px 0 0; margin-top: 1px \9; line-height: normal; } input[type="file"] { display: block; } input[type="range"] { display: block; width: 100%; } select[multiple], select[size] { height: auto; } input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { outline: 5px auto -<API key>; outline-offset: -2px; } output { display: block; padding-top: 7px; font-size: 14px; line-height: 1.42857143; color: #555; } .form-control { display: block; width: 100%; height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; color: #555; background-color: #fff; background-image: none; border: 1px solid #ccc; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; } .form-control:focus { border-color: #66afe9; outline: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); } .form-control::-moz-placeholder { color: #999; opacity: 1; } .form-control:-<API key> { color: #999; } .form-control::-<API key> { color: #999; } .form-control::-ms-expand { background-color: transparent; border: 0; } .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { background-color: #eee; opacity: 1; } .form-control[disabled], fieldset[disabled] .form-control { cursor: not-allowed; } textarea.form-control { height: auto; } input[type="search"] { -webkit-appearance: none; } @media screen and (-<API key>: 0) { input[type="date"].form-control, input[type="time"].form-control, input[type="datetime-local"].form-control, input[type="month"].form-control { line-height: 34px; } input[type="date"].input-sm, input[type="time"].input-sm, input[type="datetime-local"].input-sm, input[type="month"].input-sm, .input-group-sm input[type="date"], .input-group-sm input[type="time"], .input-group-sm input[type="datetime-local"], .input-group-sm input[type="month"] { line-height: 30px; } input[type="date"].input-lg, input[type="time"].input-lg, input[type="datetime-local"].input-lg, input[type="month"].input-lg, .input-group-lg input[type="date"], .input-group-lg input[type="time"], .input-group-lg input[type="datetime-local"], .input-group-lg input[type="month"] { line-height: 46px; } } .form-group { margin-bottom: 15px; } .radio, .checkbox { position: relative; display: block; margin-top: 10px; margin-bottom: 10px; } .radio label, .checkbox label { min-height: 20px; padding-left: 20px; margin-bottom: 0; font-weight: normal; cursor: pointer; } .radio input[type="radio"], .radio-inline input[type="radio"], .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"] { position: absolute; margin-top: 4px \9; margin-left: -20px; } .radio + .radio, .checkbox + .checkbox { margin-top: -5px; } .radio-inline, .checkbox-inline { position: relative; display: inline-block; padding-left: 20px; margin-bottom: 0; font-weight: normal; vertical-align: middle; cursor: pointer; } .radio-inline + .radio-inline, .checkbox-inline + .checkbox-inline { margin-top: 0; margin-left: 10px; } input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"].disabled, input[type="checkbox"].disabled, fieldset[disabled] input[type="radio"], fieldset[disabled] input[type="checkbox"] { cursor: not-allowed; } .radio-inline.disabled, .checkbox-inline.disabled, fieldset[disabled] .radio-inline, fieldset[disabled] .checkbox-inline { cursor: not-allowed; } .radio.disabled label, .checkbox.disabled label, fieldset[disabled] .radio label, fieldset[disabled] .checkbox label { cursor: not-allowed; } .form-control-static { min-height: 34px; padding-top: 7px; padding-bottom: 7px; margin-bottom: 0; } .form-control-static.input-lg, .form-control-static.input-sm { padding-right: 0; padding-left: 0; } .input-sm { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } select.input-sm { height: 30px; line-height: 30px; } textarea.input-sm, select[multiple].input-sm { height: auto; } .form-group-sm .form-control { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } .form-group-sm select.form-control { height: 30px; line-height: 30px; } .form-group-sm textarea.form-control, .form-group-sm select[multiple].form-control { height: auto; } .form-group-sm .form-control-static { height: 30px; min-height: 32px; padding: 6px 10px; font-size: 12px; line-height: 1.5; } .input-lg { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; } select.input-lg { height: 46px; line-height: 46px; } textarea.input-lg, select[multiple].input-lg { height: auto; } .form-group-lg .form-control { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; } .form-group-lg select.form-control { height: 46px; line-height: 46px; } .form-group-lg textarea.form-control, .form-group-lg select[multiple].form-control { height: auto; } .form-group-lg .form-control-static { height: 46px; min-height: 38px; padding: 11px 16px; font-size: 18px; line-height: 1.3333333; } .has-feedback { position: relative; } .has-feedback .form-control { padding-right: 42.5px; } .<API key> { position: absolute; top: 0; right: 0; z-index: 2; display: block; width: 34px; height: 34px; line-height: 34px; text-align: center; pointer-events: none; } .input-lg + .<API key>, .input-group-lg + .<API key>, .form-group-lg .form-control + .<API key> { width: 46px; height: 46px; line-height: 46px; } .input-sm + .<API key>, .input-group-sm + .<API key>, .form-group-sm .form-control + .<API key> { width: 30px; height: 30px; line-height: 30px; } .has-success .help-block, .has-success .control-label, .has-success .radio, .has-success .checkbox, .has-success .radio-inline, .has-success .checkbox-inline, .has-success.radio label, .has-success.checkbox label, .has-success.radio-inline label, .has-success.checkbox-inline label { color: #3c763d; } .has-success .form-control { border-color: #3c763d; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); } .has-success .form-control:focus { border-color: #2b542c; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; } .has-success .input-group-addon { color: #3c763d; background-color: #dff0d8; border-color: #3c763d; } .has-success .<API key> { color: #3c763d; } .has-warning .help-block, .has-warning .control-label, .has-warning .radio, .has-warning .checkbox, .has-warning .radio-inline, .has-warning .checkbox-inline, .has-warning.radio label, .has-warning.checkbox label, .has-warning.radio-inline label, .has-warning.checkbox-inline label { color: #8a6d3b; } .has-warning .form-control { border-color: #8a6d3b; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); } .has-warning .form-control:focus { border-color: #66512c; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; } .has-warning .input-group-addon { color: #8a6d3b; background-color: #fcf8e3; border-color: #8a6d3b; } .has-warning .<API key> { color: #8a6d3b; } .has-error .help-block, .has-error .control-label, .has-error .radio, .has-error .checkbox, .has-error .radio-inline, .has-error .checkbox-inline, .has-error.radio label, .has-error.checkbox label, .has-error.radio-inline label, .has-error.checkbox-inline label { color: #a94442; } .has-error .form-control { border-color: #a94442; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); } .has-error .form-control:focus { border-color: #843534; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; } .has-error .input-group-addon { color: #a94442; background-color: #f2dede; border-color: #a94442; } .has-error .<API key> { color: #a94442; } .has-feedback label ~ .<API key> { top: 25px; } .has-feedback label.sr-only ~ .<API key> { top: 0; } .help-block { display: block; margin-top: 5px; margin-bottom: 10px; color: #737373; } @media (min-width: 768px) { .form-inline .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; } .form-inline .form-control-static { display: inline-block; } .form-inline .input-group { display: inline-table; vertical-align: middle; } .form-inline .input-group .input-group-addon, .form-inline .input-group .input-group-btn, .form-inline .input-group .form-control { width: auto; } .form-inline .input-group > .form-control { width: 100%; } .form-inline .control-label { margin-bottom: 0; vertical-align: middle; } .form-inline .radio, .form-inline .checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; } .form-inline .radio label, .form-inline .checkbox label { padding-left: 0; } .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] { position: relative; margin-left: 0; } .form-inline .has-feedback .<API key> { top: 0; } } .form-horizontal .radio, .form-horizontal .checkbox, .form-horizontal .radio-inline, .form-horizontal .checkbox-inline { padding-top: 7px; margin-top: 0; margin-bottom: 0; } .form-horizontal .radio, .form-horizontal .checkbox { min-height: 27px; } .form-horizontal .form-group { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { .form-horizontal .control-label { padding-top: 7px; margin-bottom: 0; text-align: right; } } .form-horizontal .has-feedback .<API key> { right: 15px; } @media (min-width: 768px) { .form-horizontal .form-group-lg .control-label { padding-top: 11px; font-size: 18px; } } @media (min-width: 768px) { .form-horizontal .form-group-sm .control-label { padding-top: 6px; font-size: 12px; } } .btn { display: inline-block; padding: 6px 12px; margin-bottom: 0; font-size: 14px; font-weight: normal; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; -ms-touch-action: manipulation; touch-action: manipulation; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-image: none; border: 1px solid transparent; border-radius: 4px; } .btn:focus, .btn:active:focus, .btn.active:focus, .btn.focus, .btn:active.focus, .btn.active.focus { outline: 5px auto -<API key>; outline-offset: -2px; } .btn:hover, .btn:focus, .btn.focus { color: #333; text-decoration: none; } .btn:active, .btn.active { background-image: none; outline: 0; -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); } .btn.disabled, .btn[disabled], fieldset[disabled] .btn { cursor: not-allowed; filter: alpha(opacity=65); -webkit-box-shadow: none; box-shadow: none; opacity: .65; } a.btn.disabled, fieldset[disabled] a.btn { pointer-events: none; } .btn-default { color: #333; background-color: #fff; border-color: #ccc; } .btn-default:focus, .btn-default.focus { color: #333; background-color: #e6e6e6; border-color: #8c8c8c; } .btn-default:hover { color: #333; background-color: #e6e6e6; border-color: #adadad; } .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { color: #333; background-color: #e6e6e6; border-color: #adadad; } .btn-default:active:hover, .btn-default.active:hover, .open > .dropdown-toggle.btn-default:hover, .btn-default:active:focus, .btn-default.active:focus, .open > .dropdown-toggle.btn-default:focus, .btn-default:active.focus, .btn-default.active.focus, .open > .dropdown-toggle.btn-default.focus { color: #333; background-color: #d4d4d4; border-color: #8c8c8c; } .btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default { background-image: none; } .btn-default.disabled:hover, .btn-default[disabled]:hover, fieldset[disabled] .btn-default:hover, .btn-default.disabled:focus, .btn-default[disabled]:focus, fieldset[disabled] .btn-default:focus, .btn-default.disabled.focus, .btn-default[disabled].focus, fieldset[disabled] .btn-default.focus { background-color: #fff; border-color: #ccc; } .btn-default .badge { color: #fff; background-color: #333; } .btn-primary { color: #fff; background-color: #337ab7; border-color: #2e6da4; } .btn-primary:focus, .btn-primary.focus { color: #fff; background-color: #286090; border-color: #122b40; } .btn-primary:hover { color: #fff; background-color: #286090; border-color: #204d74; } .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { color: #fff; background-color: #286090; border-color: #204d74; } .btn-primary:active:hover, .btn-primary.active:hover, .open > .dropdown-toggle.btn-primary:hover, .btn-primary:active:focus, .btn-primary.active:focus, .open > .dropdown-toggle.btn-primary:focus, .btn-primary:active.focus, .btn-primary.active.focus, .open > .dropdown-toggle.btn-primary.focus { color: #fff; background-color: #204d74; border-color: #122b40; } .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { background-image: none; } .btn-primary.disabled:hover, .btn-primary[disabled]:hover, fieldset[disabled] .btn-primary:hover, .btn-primary.disabled:focus, .btn-primary[disabled]:focus, fieldset[disabled] .btn-primary:focus, .btn-primary.disabled.focus, .btn-primary[disabled].focus, fieldset[disabled] .btn-primary.focus { background-color: #337ab7; border-color: #2e6da4; } .btn-primary .badge { color: #337ab7; background-color: #fff; } .btn-success { color: #fff; background-color: #5cb85c; border-color: #4cae4c; } .btn-success:focus, .btn-success.focus { color: #fff; background-color: #449d44; border-color: #255625; } .btn-success:hover { color: #fff; background-color: #449d44; border-color: #398439; } .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success { color: #fff; background-color: #449d44; border-color: #398439; } .btn-success:active:hover, .btn-success.active:hover, .open > .dropdown-toggle.btn-success:hover, .btn-success:active:focus, .btn-success.active:focus, .open > .dropdown-toggle.btn-success:focus, .btn-success:active.focus, .btn-success.active.focus, .open > .dropdown-toggle.btn-success.focus { color: #fff; background-color: #398439; border-color: #255625; } .btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success { background-image: none; } .btn-success.disabled:hover, .btn-success[disabled]:hover, fieldset[disabled] .btn-success:hover, .btn-success.disabled:focus, .btn-success[disabled]:focus, fieldset[disabled] .btn-success:focus, .btn-success.disabled.focus, .btn-success[disabled].focus, fieldset[disabled] .btn-success.focus { background-color: #5cb85c; border-color: #4cae4c; } .btn-success .badge { color: #5cb85c; background-color: #fff; } .btn-info { color: #fff; background-color: #5bc0de; border-color: #46b8da; } .btn-info:focus, .btn-info.focus { color: #fff; background-color: #31b0d5; border-color: #1b6d85; } .btn-info:hover { color: #fff; background-color: #31b0d5; border-color: #269abc; } .btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info { color: #fff; background-color: #31b0d5; border-color: #269abc; } .btn-info:active:hover, .btn-info.active:hover, .open > .dropdown-toggle.btn-info:hover, .btn-info:active:focus, .btn-info.active:focus, .open > .dropdown-toggle.btn-info:focus, .btn-info:active.focus, .btn-info.active.focus, .open > .dropdown-toggle.btn-info.focus { color: #fff; background-color: #269abc; border-color: #1b6d85; } .btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info { background-image: none; } .btn-info.disabled:hover, .btn-info[disabled]:hover, fieldset[disabled] .btn-info:hover, .btn-info.disabled:focus, .btn-info[disabled]:focus, fieldset[disabled] .btn-info:focus, .btn-info.disabled.focus, .btn-info[disabled].focus, fieldset[disabled] .btn-info.focus { background-color: #5bc0de; border-color: #46b8da; } .btn-info .badge { color: #5bc0de; background-color: #fff; } .btn-warning { color: #fff; background-color: #f0ad4e; border-color: #eea236; } .btn-warning:focus, .btn-warning.focus { color: #fff; background-color: #ec971f; border-color: #985f0d; } .btn-warning:hover { color: #fff; background-color: #ec971f; border-color: #d58512; } .btn-warning:active, .btn-warning.active, .open > .dropdown-toggle.btn-warning { color: #fff; background-color: #ec971f; border-color: #d58512; } .btn-warning:active:hover, .btn-warning.active:hover, .open > .dropdown-toggle.btn-warning:hover, .btn-warning:active:focus, .btn-warning.active:focus, .open > .dropdown-toggle.btn-warning:focus, .btn-warning:active.focus, .btn-warning.active.focus, .open > .dropdown-toggle.btn-warning.focus { color: #fff; background-color: #d58512; border-color: #985f0d; } .btn-warning:active, .btn-warning.active, .open > .dropdown-toggle.btn-warning { background-image: none; } .btn-warning.disabled:hover, .btn-warning[disabled]:hover, fieldset[disabled] .btn-warning:hover, .btn-warning.disabled:focus, .btn-warning[disabled]:focus, fieldset[disabled] .btn-warning:focus, .btn-warning.disabled.focus, .btn-warning[disabled].focus, fieldset[disabled] .btn-warning.focus { background-color: #f0ad4e; border-color: #eea236; } .btn-warning .badge { color: #f0ad4e; background-color: #fff; } .btn-danger { color: #fff; background-color: #d9534f; border-color: #d43f3a; } .btn-danger:focus, .btn-danger.focus { color: #fff; background-color: #c9302c; border-color: #761c19; } .btn-danger:hover { color: #fff; background-color: #c9302c; border-color: #ac2925; } .btn-danger:active, .btn-danger.active, .open > .dropdown-toggle.btn-danger { color: #fff; background-color: #c9302c; border-color: #ac2925; } .btn-danger:active:hover, .btn-danger.active:hover, .open > .dropdown-toggle.btn-danger:hover, .btn-danger:active:focus, .btn-danger.active:focus, .open > .dropdown-toggle.btn-danger:focus, .btn-danger:active.focus, .btn-danger.active.focus, .open > .dropdown-toggle.btn-danger.focus { color: #fff; background-color: #ac2925; border-color: #761c19; } .btn-danger:active, .btn-danger.active, .open > .dropdown-toggle.btn-danger { background-image: none; } .btn-danger.disabled:hover, .btn-danger[disabled]:hover, fieldset[disabled] .btn-danger:hover, .btn-danger.disabled:focus, .btn-danger[disabled]:focus, fieldset[disabled] .btn-danger:focus, .btn-danger.disabled.focus, .btn-danger[disabled].focus, fieldset[disabled] .btn-danger.focus { background-color: #d9534f; border-color: #d43f3a; } .btn-danger .badge { color: #d9534f; background-color: #fff; } .btn-link { font-weight: normal; color: #337ab7; border-radius: 0; } .btn-link, .btn-link:active, .btn-link.active, .btn-link[disabled], fieldset[disabled] .btn-link { background-color: transparent; -webkit-box-shadow: none; box-shadow: none; } .btn-link, .btn-link:hover, .btn-link:focus, .btn-link:active { border-color: transparent; } .btn-link:hover, .btn-link:focus { color: #23527c; text-decoration: underline; background-color: transparent; } .btn-link[disabled]:hover, fieldset[disabled] .btn-link:hover, .btn-link[disabled]:focus, fieldset[disabled] .btn-link:focus { color: #777; text-decoration: none; } .btn-lg, .btn-group-lg > .btn { padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; } .btn-sm, .btn-group-sm > .btn { padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } .btn-xs, .btn-group-xs > .btn { padding: 1px 5px; font-size: 12px; line-height: 1.5; border-radius: 3px; } .btn-block { display: block; width: 100%; } .btn-block + .btn-block { margin-top: 5px; } input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block { width: 100%; } .fade { opacity: 0; -webkit-transition: opacity .15s linear; -o-transition: opacity .15s linear; transition: opacity .15s linear; } .fade.in { opacity: 1; } .collapse { display: none; } .collapse.in { display: block; } tr.collapse.in { display: table-row; } tbody.collapse.in { display: table-row-group; } .collapsing { position: relative; height: 0; overflow: hidden; -<API key>: ease; -<API key>: ease; <API key>: ease; -<API key>: .35s; -<API key>: .35s; transition-duration: .35s; -<API key>: height, visibility; -<API key>: height, visibility; transition-property: height, visibility; } .caret { display: inline-block; width: 0; height: 0; margin-left: 2px; vertical-align: middle; border-top: 4px dashed; border-top: 4px solid \9; border-right: 4px solid transparent; border-left: 4px solid transparent; } .dropup, .dropdown { position: relative; } .dropdown-toggle:focus { outline: 0; } .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; min-width: 160px; padding: 5px 0; margin: 2px 0 0; font-size: 14px; text-align: left; list-style: none; background-color: #fff; -<API key>: padding-box; background-clip: padding-box; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, .15); border-radius: 4px; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); box-shadow: 0 6px 12px rgba(0, 0, 0, .175); } .dropdown-menu.pull-right { right: 0; left: auto; } .dropdown-menu .divider { height: 1px; margin: 9px 0; overflow: hidden; background-color: #e5e5e5; } .dropdown-menu > li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.42857143; color: #333; white-space: nowrap; } .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { color: #262626; text-decoration: none; background-color: #f5f5f5; } .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { color: #fff; text-decoration: none; background-color: #337ab7; outline: 0; } .dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { color: #777; } .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { text-decoration: none; cursor: not-allowed; background-color: transparent; background-image: none; filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .open > .dropdown-menu { display: block; } .open > a { outline: 0; } .dropdown-menu-right { right: 0; left: auto; } .dropdown-menu-left { right: auto; left: 0; } .dropdown-header { display: block; padding: 3px 20px; font-size: 12px; line-height: 1.42857143; color: #777; white-space: nowrap; } .dropdown-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 990; } .pull-right > .dropdown-menu { right: 0; left: auto; } .dropup .caret, .navbar-fixed-bottom .dropdown .caret { content: ""; border-top: 0; border-bottom: 4px dashed; border-bottom: 4px solid \9; } .dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { top: auto; bottom: 100%; margin-bottom: 2px; } @media (min-width: 768px) { .navbar-right .dropdown-menu { right: 0; left: auto; } .navbar-right .dropdown-menu-left { right: auto; left: 0; } } .btn-group, .btn-group-vertical { position: relative; display: inline-block; vertical-align: middle; } .btn-group > .btn, .btn-group-vertical > .btn { position: relative; float: left; } .btn-group > .btn:hover, .btn-group-vertical > .btn:hover, .btn-group > .btn:focus, .btn-group-vertical > .btn:focus, .btn-group > .btn:active, .btn-group-vertical > .btn:active, .btn-group > .btn.active, .btn-group-vertical > .btn.active { z-index: 2; } .btn-group .btn + .btn, .btn-group .btn + .btn-group, .btn-group .btn-group + .btn, .btn-group .btn-group + .btn-group { margin-left: -1px; } .btn-toolbar { margin-left: -5px; } .btn-toolbar .btn, .btn-toolbar .btn-group, .btn-toolbar .input-group { float: left; } .btn-toolbar > .btn, .btn-toolbar > .btn-group, .btn-toolbar > .input-group { margin-left: 5px; } .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { border-radius: 0; } .btn-group > .btn:first-child { margin-left: 0; } .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { <API key>: 0; <API key>: 0; } .btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { <API key>: 0; <API key>: 0; } .btn-group > .btn-group { float: left; } .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { <API key>: 0; <API key>: 0; } .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { <API key>: 0; <API key>: 0; } .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } .btn-group > .btn + .dropdown-toggle { padding-right: 8px; padding-left: 8px; } .btn-group > .btn-lg + .dropdown-toggle { padding-right: 12px; padding-left: 12px; } .btn-group.open .dropdown-toggle { -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); } .btn-group.open .dropdown-toggle.btn-link { -webkit-box-shadow: none; box-shadow: none; } .btn .caret { margin-left: 0; } .btn-lg .caret { border-width: 5px 5px 0; border-bottom-width: 0; } .dropup .btn-lg .caret { border-width: 0 5px 5px; } .btn-group-vertical > .btn, .btn-group-vertical > .btn-group, .btn-group-vertical > .btn-group > .btn { display: block; float: none; width: 100%; max-width: 100%; } .btn-group-vertical > .btn-group > .btn { float: none; } .btn-group-vertical > .btn + .btn, .btn-group-vertical > .btn + .btn-group, .btn-group-vertical > .btn-group + .btn, .btn-group-vertical > .btn-group + .btn-group { margin-top: -1px; margin-left: 0; } .btn-group-vertical > .btn:not(:first-child):not(:last-child) { border-radius: 0; } .btn-group-vertical > .btn:first-child:not(:last-child) { <API key>: 4px; <API key>: 4px; <API key>: 0; <API key>: 0; } .btn-group-vertical > .btn:last-child:not(:first-child) { <API key>: 0; <API key>: 0; <API key>: 4px; <API key>: 4px; } .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { <API key>: 0; <API key>: 0; } .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { <API key>: 0; <API key>: 0; } .btn-group-justified { display: table; width: 100%; table-layout: fixed; border-collapse: separate; } .btn-group-justified > .btn, .btn-group-justified > .btn-group { display: table-cell; float: none; width: 1%; } .btn-group-justified > .btn-group .btn { width: 100%; } .btn-group-justified > .btn-group .dropdown-menu { left: auto; } [data-toggle="buttons"] > .btn input[type="radio"], [data-toggle="buttons"] > .btn-group > .btn input[type="radio"], [data-toggle="buttons"] > .btn input[type="checkbox"], [data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { position: absolute; clip: rect(0, 0, 0, 0); pointer-events: none; } .input-group { position: relative; display: table; border-collapse: separate; } .input-group[class*="col-"] { float: none; padding-right: 0; padding-left: 0; } .input-group .form-control { position: relative; z-index: 2; float: left; width: 100%; margin-bottom: 0; } .input-group .form-control:focus { z-index: 3; } .input-group-lg > .form-control, .input-group-lg > .input-group-addon, .input-group-lg > .input-group-btn > .btn { height: 46px; padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; } select.input-group-lg > .form-control, select.input-group-lg > .input-group-addon, select.input-group-lg > .input-group-btn > .btn { height: 46px; line-height: 46px; } textarea.input-group-lg > .form-control, textarea.input-group-lg > .input-group-addon, textarea.input-group-lg > .input-group-btn > .btn, select[multiple].input-group-lg > .form-control, select[multiple].input-group-lg > .input-group-addon, select[multiple].input-group-lg > .input-group-btn > .btn { height: auto; } .input-group-sm > .form-control, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .btn { height: 30px; padding: 5px 10px; font-size: 12px; line-height: 1.5; border-radius: 3px; } select.input-group-sm > .form-control, select.input-group-sm > .input-group-addon, select.input-group-sm > .input-group-btn > .btn { height: 30px; line-height: 30px; } textarea.input-group-sm > .form-control, textarea.input-group-sm > .input-group-addon, textarea.input-group-sm > .input-group-btn > .btn, select[multiple].input-group-sm > .form-control, select[multiple].input-group-sm > .input-group-addon, select[multiple].input-group-sm > .input-group-btn > .btn { height: auto; } .input-group-addon, .input-group-btn, .input-group .form-control { display: table-cell; } .input-group-addon:not(:first-child):not(:last-child), .input-group-btn:not(:first-child):not(:last-child), .input-group .form-control:not(:first-child):not(:last-child) { border-radius: 0; } .input-group-addon, .input-group-btn { width: 1%; white-space: nowrap; vertical-align: middle; } .input-group-addon { padding: 6px 12px; font-size: 14px; font-weight: normal; line-height: 1; color: #555; text-align: center; background-color: #eee; border: 1px solid #ccc; border-radius: 4px; } .input-group-addon.input-sm { padding: 5px 10px; font-size: 12px; border-radius: 3px; } .input-group-addon.input-lg { padding: 10px 16px; font-size: 18px; border-radius: 6px; } .input-group-addon input[type="radio"], .input-group-addon input[type="checkbox"] { margin-top: 0; } .input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group > .btn, .input-group-btn:first-child > .dropdown-toggle, .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), .input-group-btn:last-child > .btn-group:not(:last-child) > .btn { <API key>: 0; <API key>: 0; } .input-group-addon:first-child { border-right: 0; } .input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group > .btn, .input-group-btn:last-child > .dropdown-toggle, .input-group-btn:first-child > .btn:not(:first-child), .input-group-btn:first-child > .btn-group:not(:first-child) > .btn { <API key>: 0; <API key>: 0; } .input-group-addon:last-child { border-left: 0; } .input-group-btn { position: relative; font-size: 0; white-space: nowrap; } .input-group-btn > .btn { position: relative; } .input-group-btn > .btn + .btn { margin-left: -1px; } .input-group-btn > .btn:hover, .input-group-btn > .btn:focus, .input-group-btn > .btn:active { z-index: 2; } .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group { margin-right: -1px; } .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group { z-index: 2; margin-left: -1px; } .nav { padding-left: 0; margin-bottom: 0; list-style: none; } .nav > li { position: relative; display: block; } .nav > li > a { position: relative; display: block; padding: 10px 15px; } .nav > li > a:hover, .nav > li > a:focus { text-decoration: none; background-color: #eee; } .nav > li.disabled > a { color: #777; } .nav > li.disabled > a:hover, .nav > li.disabled > a:focus { color: #777; text-decoration: none; cursor: not-allowed; background-color: transparent; } .nav .open > a, .nav .open > a:hover, .nav .open > a:focus { background-color: #eee; border-color: #337ab7; } .nav .nav-divider { height: 1px; margin: 9px 0; overflow: hidden; background-color: #e5e5e5; } .nav > li > a > img { max-width: none; } .nav-tabs { border-bottom: 1px solid #ddd; } .nav-tabs > li { float: left; margin-bottom: -1px; } .nav-tabs > li > a { margin-right: 2px; line-height: 1.42857143; border: 1px solid transparent; border-radius: 4px 4px 0 0; } .nav-tabs > li > a:hover { border-color: #eee #eee #ddd; } .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus { color: #555; cursor: default; background-color: #fff; border: 1px solid #ddd; border-bottom-color: transparent; } .nav-tabs.nav-justified { width: 100%; border-bottom: 0; } .nav-tabs.nav-justified > li { float: none; } .nav-tabs.nav-justified > li > a { margin-bottom: 5px; text-align: center; } .nav-tabs.nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-tabs.nav-justified > li { display: table-cell; width: 1%; } .nav-tabs.nav-justified > li > a { margin-bottom: 0; } } .nav-tabs.nav-justified > li > a { margin-right: 0; border-radius: 4px; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border: 1px solid #ddd; } @media (min-width: 768px) { .nav-tabs.nav-justified > li > a { border-bottom: 1px solid #ddd; border-radius: 4px 4px 0 0; } .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:focus { border-bottom-color: #fff; } } .nav-pills > li { float: left; } .nav-pills > li > a { border-radius: 4px; } .nav-pills > li + li { margin-left: 2px; } .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { color: #fff; background-color: #337ab7; } .nav-stacked > li { float: none; } .nav-stacked > li + li { margin-top: 2px; margin-left: 0; } .nav-justified { width: 100%; } .nav-justified > li { float: none; } .nav-justified > li > a { margin-bottom: 5px; text-align: center; } .nav-justified > .dropdown .dropdown-menu { top: auto; left: auto; } @media (min-width: 768px) { .nav-justified > li { display: table-cell; width: 1%; } .nav-justified > li > a { margin-bottom: 0; } } .nav-tabs-justified { border-bottom: 0; } .nav-tabs-justified > li > a { margin-right: 0; border-radius: 4px; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border: 1px solid #ddd; } @media (min-width: 768px) { .nav-tabs-justified > li > a { border-bottom: 1px solid #ddd; border-radius: 4px 4px 0 0; } .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:hover, .nav-tabs-justified > .active > a:focus { border-bottom-color: #fff; } } .tab-content > .tab-pane { display: none; } .tab-content > .active { display: block; } .nav-tabs .dropdown-menu { margin-top: -1px; <API key>: 0; <API key>: 0; } .navbar { position: relative; min-height: 50px; margin-bottom: 20px; border: 1px solid transparent; } @media (min-width: 768px) { .navbar { border-radius: 4px; } } @media (min-width: 768px) { .navbar-header { float: left; } } .navbar-collapse { padding-right: 15px; padding-left: 15px; overflow-x: visible; -<API key>: touch; border-top: 1px solid transparent; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); } .navbar-collapse.in { overflow-y: auto; } @media (min-width: 768px) { .navbar-collapse { width: auto; border-top: 0; -webkit-box-shadow: none; box-shadow: none; } .navbar-collapse.collapse { display: block !important; height: auto !important; padding-bottom: 0; overflow: visible !important; } .navbar-collapse.in { overflow-y: visible; } .navbar-fixed-top .navbar-collapse, .navbar-static-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { padding-right: 0; padding-left: 0; } } .navbar-fixed-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { max-height: 340px; } @media (max-device-width: 480px) and (orientation: landscape) { .navbar-fixed-top .navbar-collapse, .navbar-fixed-bottom .navbar-collapse { max-height: 200px; } } .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: -15px; margin-left: -15px; } @media (min-width: 768px) { .container > .navbar-header, .container-fluid > .navbar-header, .container > .navbar-collapse, .container-fluid > .navbar-collapse { margin-right: 0; margin-left: 0; } } .navbar-static-top { z-index: 1000; border-width: 0 0 1px; } @media (min-width: 768px) { .navbar-static-top { border-radius: 0; } } .navbar-fixed-top, .navbar-fixed-bottom { position: fixed; right: 0; left: 0; z-index: 1030; } @media (min-width: 768px) { .navbar-fixed-top, .navbar-fixed-bottom { border-radius: 0; } } .navbar-fixed-top { top: 0; border-width: 0 0 1px; } .navbar-fixed-bottom { bottom: 0; margin-bottom: 0; border-width: 1px 0 0; } .navbar-brand { float: left; height: 50px; padding: 15px 15px; font-size: 18px; line-height: 20px; } .navbar-brand:hover, .navbar-brand:focus { text-decoration: none; } .navbar-brand > img { display: block; } @media (min-width: 768px) { .navbar > .container .navbar-brand, .navbar > .container-fluid .navbar-brand { margin-left: -15px; } } .navbar-toggle { position: relative; float: right; padding: 9px 10px; margin-top: 8px; margin-right: 15px; margin-bottom: 8px; background-color: transparent; background-image: none; border: 1px solid transparent; border-radius: 4px; } .navbar-toggle:focus { outline: 0; } .navbar-toggle .icon-bar { display: block; width: 22px; height: 2px; border-radius: 1px; } .navbar-toggle .icon-bar + .icon-bar { margin-top: 4px; } @media (min-width: 768px) { .navbar-toggle { display: none; } } .navbar-nav { margin: 7.5px -15px; } .navbar-nav > li > a { padding-top: 10px; padding-bottom: 10px; line-height: 20px; } @media (max-width: 767px) { .navbar-nav .open .dropdown-menu { position: static; float: none; width: auto; margin-top: 0; background-color: transparent; border: 0; -webkit-box-shadow: none; box-shadow: none; } .navbar-nav .open .dropdown-menu > li > a, .navbar-nav .open .dropdown-menu .dropdown-header { padding: 5px 15px 5px 25px; } .navbar-nav .open .dropdown-menu > li > a { line-height: 20px; } .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-nav .open .dropdown-menu > li > a:focus { background-image: none; } } @media (min-width: 768px) { .navbar-nav { float: left; margin: 0; } .navbar-nav > li { float: left; } .navbar-nav > li > a { padding-top: 15px; padding-bottom: 15px; } } .navbar-form { padding: 10px 15px; margin-top: 8px; margin-right: -15px; margin-bottom: 8px; margin-left: -15px; border-top: 1px solid transparent; border-bottom: 1px solid transparent; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); } @media (min-width: 768px) { .navbar-form .form-group { display: inline-block; margin-bottom: 0; vertical-align: middle; } .navbar-form .form-control { display: inline-block; width: auto; vertical-align: middle; } .navbar-form .form-control-static { display: inline-block; } .navbar-form .input-group { display: inline-table; vertical-align: middle; } .navbar-form .input-group .input-group-addon, .navbar-form .input-group .input-group-btn, .navbar-form .input-group .form-control { width: auto; } .navbar-form .input-group > .form-control { width: 100%; } .navbar-form .control-label { margin-bottom: 0; vertical-align: middle; } .navbar-form .radio, .navbar-form .checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; vertical-align: middle; } .navbar-form .radio label, .navbar-form .checkbox label { padding-left: 0; } .navbar-form .radio input[type="radio"], .navbar-form .checkbox input[type="checkbox"] { position: relative; margin-left: 0; } .navbar-form .has-feedback .<API key> { top: 0; } } @media (max-width: 767px) { .navbar-form .form-group { margin-bottom: 5px; } .navbar-form .form-group:last-child { margin-bottom: 0; } } @media (min-width: 768px) { .navbar-form { width: auto; padding-top: 0; padding-bottom: 0; margin-right: 0; margin-left: 0; border: 0; -webkit-box-shadow: none; box-shadow: none; } } .navbar-nav > li > .dropdown-menu { margin-top: 0; <API key>: 0; <API key>: 0; } .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { margin-bottom: 0; <API key>: 4px; <API key>: 4px; <API key>: 0; <API key>: 0; } .navbar-btn { margin-top: 8px; margin-bottom: 8px; } .navbar-btn.btn-sm { margin-top: 10px; margin-bottom: 10px; } .navbar-btn.btn-xs { margin-top: 14px; margin-bottom: 14px; } .navbar-text { margin-top: 15px; margin-bottom: 15px; } @media (min-width: 768px) { .navbar-text { float: left; margin-right: 15px; margin-left: 15px; } } @media (min-width: 768px) { .navbar-left { float: left !important; } .navbar-right { float: right !important; margin-right: -15px; } .navbar-right ~ .navbar-right { margin-right: 0; } } .navbar-default { background-color: #f8f8f8; border-color: #e7e7e7; } .navbar-default .navbar-brand { color: #777; } .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus { color: #5e5e5e; background-color: transparent; } .navbar-default .navbar-text { color: #777; } .navbar-default .navbar-nav > li > a { color: #777; } .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus { color: #333; background-color: transparent; } .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { color: #555; background-color: #e7e7e7; } .navbar-default .navbar-nav > .disabled > a, .navbar-default .navbar-nav > .disabled > a:hover, .navbar-default .navbar-nav > .disabled > a:focus { color: #ccc; background-color: transparent; } .navbar-default .navbar-toggle { border-color: #ddd; } .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { background-color: #ddd; } .navbar-default .navbar-toggle .icon-bar { background-color: #888; } .navbar-default .navbar-collapse, .navbar-default .navbar-form { border-color: #e7e7e7; } .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus { color: #555; background-color: #e7e7e7; } @media (max-width: 767px) { .navbar-default .navbar-nav .open .dropdown-menu > li > a { color: #777; } .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { color: #333; background-color: transparent; } .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { color: #555; background-color: #e7e7e7; } .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #ccc; background-color: transparent; } } .navbar-default .navbar-link { color: #777; } .navbar-default .navbar-link:hover { color: #333; } .navbar-default .btn-link { color: #777; } .navbar-default .btn-link:hover, .navbar-default .btn-link:focus { color: #333; } .navbar-default .btn-link[disabled]:hover, fieldset[disabled] .navbar-default .btn-link:hover, .navbar-default .btn-link[disabled]:focus, fieldset[disabled] .navbar-default .btn-link:focus { color: #ccc; } .navbar-inverse { background-color: #222; border-color: #080808; } .navbar-inverse .navbar-brand { color: #9d9d9d; } .navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus { color: #fff; background-color: transparent; } .navbar-inverse .navbar-text { color: #9d9d9d; } .navbar-inverse .navbar-nav > li > a { color: #9d9d9d; } .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { color: #fff; background-color: transparent; } .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus { color: #fff; background-color: #080808; } .navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:hover, .navbar-inverse .navbar-nav > .disabled > a:focus { color: #444; background-color: transparent; } .navbar-inverse .navbar-toggle { border-color: #333; } .navbar-inverse .navbar-toggle:hover, .navbar-inverse .navbar-toggle:focus { background-color: #333; } .navbar-inverse .navbar-toggle .icon-bar { background-color: #fff; } .navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form { border-color: #101010; } .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus { color: #fff; background-color: #080808; } @media (max-width: 767px) { .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { border-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu .divider { background-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { color: #9d9d9d; } .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { color: #fff; background-color: transparent; } .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { color: #fff; background-color: #080808; } .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { color: #444; background-color: transparent; } } .navbar-inverse .navbar-link { color: #9d9d9d; } .navbar-inverse .navbar-link:hover { color: #fff; } .navbar-inverse .btn-link { color: #9d9d9d; } .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link:focus { color: #fff; } .navbar-inverse .btn-link[disabled]:hover, fieldset[disabled] .navbar-inverse .btn-link:hover, .navbar-inverse .btn-link[disabled]:focus, fieldset[disabled] .navbar-inverse .btn-link:focus { color: #444; } .breadcrumb { padding: 8px 15px; margin-bottom: 20px; list-style: none; background-color: #f5f5f5; border-radius: 4px; } .breadcrumb > li { display: inline-block; } .breadcrumb > li + li:before { padding: 0 5px; color: #ccc; content: "/\00a0"; } .breadcrumb > .active { color: #777; } .pagination { display: inline-block; padding-left: 0; margin: 20px 0; border-radius: 4px; } .pagination > li { display: inline; } .pagination > li > a, .pagination > li > span { position: relative; float: left; padding: 6px 12px; margin-left: -1px; line-height: 1.42857143; color: #337ab7; text-decoration: none; background-color: #fff; border: 1px solid #ddd; } .pagination > li:first-child > a, .pagination > li:first-child > span { margin-left: 0; <API key>: 4px; <API key>: 4px; } .pagination > li:last-child > a, .pagination > li:last-child > span { <API key>: 4px; <API key>: 4px; } .pagination > li > a:hover, .pagination > li > span:hover, .pagination > li > a:focus, .pagination > li > span:focus { z-index: 2; color: #23527c; background-color: #eee; border-color: #ddd; } .pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus { z-index: 3; color: #fff; cursor: default; background-color: #337ab7; border-color: #337ab7; } .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus { color: #777; cursor: not-allowed; background-color: #fff; border-color: #ddd; } .pagination-lg > li > a, .pagination-lg > li > span { padding: 10px 16px; font-size: 18px; line-height: 1.3333333; } .pagination-lg > li:first-child > a, .pagination-lg > li:first-child > span { <API key>: 6px; <API key>: 6px; } .pagination-lg > li:last-child > a, .pagination-lg > li:last-child > span { <API key>: 6px; <API key>: 6px; } .pagination-sm > li > a, .pagination-sm > li > span { padding: 5px 10px; font-size: 12px; line-height: 1.5; } .pagination-sm > li:first-child > a, .pagination-sm > li:first-child > span { <API key>: 3px; <API key>: 3px; } .pagination-sm > li:last-child > a, .pagination-sm > li:last-child > span { <API key>: 3px; <API key>: 3px; } .pager { padding-left: 0; margin: 20px 0; text-align: center; list-style: none; } .pager li { display: inline; } .pager li > a, .pager li > span { display: inline-block; padding: 5px 14px; background-color: #fff; border: 1px solid #ddd; border-radius: 15px; } .pager li > a:hover, .pager li > a:focus { text-decoration: none; background-color: #eee; } .pager .next > a, .pager .next > span { float: right; } .pager .previous > a, .pager .previous > span { float: left; } .pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > a:focus, .pager .disabled > span { color: #777; cursor: not-allowed; background-color: #fff; } .label { display: inline; padding: .2em .6em .3em; font-size: 75%; font-weight: bold; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: .25em; } a.label:hover, a.label:focus { color: #fff; text-decoration: none; cursor: pointer; } .label:empty { display: none; } .btn .label { position: relative; top: -1px; } .label-default { background-color: #777; } .label-default[href]:hover, .label-default[href]:focus { background-color: #5e5e5e; } .label-primary { background-color: #337ab7; } .label-primary[href]:hover, .label-primary[href]:focus { background-color: #286090; } .label-success { background-color: #5cb85c; } .label-success[href]:hover, .label-success[href]:focus { background-color: #449d44; } .label-info { background-color: #5bc0de; } .label-info[href]:hover, .label-info[href]:focus { background-color: #31b0d5; } .label-warning { background-color: #f0ad4e; } .label-warning[href]:hover, .label-warning[href]:focus { background-color: #ec971f; } .label-danger { background-color: #d9534f; } .label-danger[href]:hover, .label-danger[href]:focus { background-color: #c9302c; } .badge { display: inline-block; min-width: 10px; padding: 3px 7px; font-size: 12px; font-weight: bold; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: middle; background-color: #777; border-radius: 10px; } .badge:empty { display: none; } .btn .badge { position: relative; top: -1px; } .btn-xs .badge, .btn-group-xs > .btn .badge { top: 0; padding: 1px 5px; } a.badge:hover, a.badge:focus { color: #fff; text-decoration: none; cursor: pointer; } .list-group-item.active > .badge, .nav-pills > .active > a > .badge { color: #337ab7; background-color: #fff; } .list-group-item > .badge { float: right; } .list-group-item > .badge + .badge { margin-right: 5px; } .nav-pills > li > a > .badge { margin-left: 3px; } .jumbotron { padding-top: 30px; padding-bottom: 30px; margin-bottom: 30px; color: inherit; background-color: #eee; } .jumbotron h1, .jumbotron .h1 { color: inherit; } .jumbotron p { margin-bottom: 15px; font-size: 21px; font-weight: 200; } .jumbotron > hr { border-top-color: #d5d5d5; } .container .jumbotron, .container-fluid .jumbotron { padding-right: 15px; padding-left: 15px; border-radius: 6px; } .jumbotron .container { max-width: 100%; } @media screen and (min-width: 768px) { .jumbotron { padding-top: 48px; padding-bottom: 48px; } .container .jumbotron, .container-fluid .jumbotron { padding-right: 60px; padding-left: 60px; } .jumbotron h1, .jumbotron .h1 { font-size: 63px; } } .thumbnail { display: block; padding: 4px; margin-bottom: 20px; line-height: 1.42857143; background-color: #fff; border: 1px solid #ddd; border-radius: 4px; -webkit-transition: border .2s ease-in-out; -o-transition: border .2s ease-in-out; transition: border .2s ease-in-out; } .thumbnail > img, .thumbnail a > img { margin-right: auto; margin-left: auto; } a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active { border-color: #337ab7; } .thumbnail .caption { padding: 9px; color: #333; } .alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; } .alert h4 { margin-top: 0; color: inherit; } .alert .alert-link { font-weight: bold; } .alert > p, .alert > ul { margin-bottom: 0; } .alert > p + p { margin-top: 5px; } .alert-dismissable, .alert-dismissible { padding-right: 35px; } .alert-dismissable .close, .alert-dismissible .close { position: relative; top: -2px; right: -21px; color: inherit; } .alert-success { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; } .alert-success hr { border-top-color: #c9e2b3; } .alert-success .alert-link { color: #2b542c; } .alert-info { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; } .alert-info hr { border-top-color: #a6e1ec; } .alert-info .alert-link { color: #245269; } .alert-warning { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; } .alert-warning hr { border-top-color: #f7e1b5; } .alert-warning .alert-link { color: #66512c; } .alert-danger { color: #a94442; background-color: #f2dede; border-color: #ebccd1; } .alert-danger hr { border-top-color: #e4b9c0; } .alert-danger .alert-link { color: #843534; } @-webkit-keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } @-o-keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } @keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } .progress { height: 20px; margin-bottom: 20px; overflow: hidden; background-color: #f5f5f5; border-radius: 4px; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); } .progress-bar { float: left; width: 0; height: 100%; font-size: 12px; line-height: 20px; color: #fff; text-align: center; background-color: #337ab7; -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); -webkit-transition: width .6s ease; -o-transition: width .6s ease; transition: width .6s ease; } .progress-striped .progress-bar, .<API key> { background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -<API key>: 40px 40px; background-size: 40px 40px; } .progress.active .progress-bar, .progress-bar.active { -webkit-animation: <API key> 2s linear infinite; -o-animation: <API key> 2s linear infinite; animation: <API key> 2s linear infinite; } .<API key> { background-color: #5cb85c; } .progress-striped .<API key> { background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); } .progress-bar-info { background-color: #5bc0de; } .progress-striped .progress-bar-info { background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); } .<API key> { background-color: #f0ad4e; } .progress-striped .<API key> { background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); } .progress-bar-danger { background-color: #d9534f; } .progress-striped .progress-bar-danger { background-image: -<API key>(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); } .media { margin-top: 15px; } .media:first-child { margin-top: 0; } .media, .media-body { overflow: hidden; zoom: 1; } .media-body { width: 10000px; } .media-object { display: block; } .media-object.img-thumbnail { max-width: none; } .media-right, .media > .pull-right { padding-left: 10px; } .media-left, .media > .pull-left { padding-right: 10px; } .media-left, .media-right, .media-body { display: table-cell; vertical-align: top; } .media-middle { vertical-align: middle; } .media-bottom { vertical-align: bottom; } .media-heading { margin-top: 0; margin-bottom: 5px; } .media-list { padding-left: 0; list-style: none; } .list-group { padding-left: 0; margin-bottom: 20px; } .list-group-item { position: relative; display: block; padding: 10px 15px; margin-bottom: -1px; background-color: #fff; border: 1px solid #ddd; } .list-group-item:first-child { <API key>: 4px; <API key>: 4px; } .list-group-item:last-child { margin-bottom: 0; <API key>: 4px; <API key>: 4px; } a.list-group-item, button.list-group-item { color: #555; } a.list-group-item .<API key>, button.list-group-item .<API key> { color: #333; } a.list-group-item:hover, button.list-group-item:hover, a.list-group-item:focus, button.list-group-item:focus { color: #555; text-decoration: none; background-color: #f5f5f5; } button.list-group-item { width: 100%; text-align: left; } .list-group-item.disabled, .list-group-item.disabled:hover, .list-group-item.disabled:focus { color: #777; cursor: not-allowed; background-color: #eee; } .list-group-item.disabled .<API key>, .list-group-item.disabled:hover .<API key>, .list-group-item.disabled:focus .<API key> { color: inherit; } .list-group-item.disabled .<API key>, .list-group-item.disabled:hover .<API key>, .list-group-item.disabled:focus .<API key> { color: #777; } .list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { z-index: 2; color: #fff; background-color: #337ab7; border-color: #337ab7; } .list-group-item.active .<API key>, .list-group-item.active:hover .<API key>, .list-group-item.active:focus .<API key>, .list-group-item.active .<API key> > small, .list-group-item.active:hover .<API key> > small, .list-group-item.active:focus .<API key> > small, .list-group-item.active .<API key> > .small, .list-group-item.active:hover .<API key> > .small, .list-group-item.active:focus .<API key> > .small { color: inherit; } .list-group-item.active .<API key>, .list-group-item.active:hover .<API key>, .list-group-item.active:focus .<API key> { color: #c7ddef; } .<API key> { color: #3c763d; background-color: #dff0d8; } a.<API key>, button.<API key> { color: #3c763d; } a.<API key> .<API key>, button.<API key> .<API key> { color: inherit; } a.<API key>:hover, button.<API key>:hover, a.<API key>:focus, button.<API key>:focus { color: #3c763d; background-color: #d0e9c6; } a.<API key>.active, button.<API key>.active, a.<API key>.active:hover, button.<API key>.active:hover, a.<API key>.active:focus, button.<API key>.active:focus { color: #fff; background-color: #3c763d; border-color: #3c763d; } .<API key> { color: #31708f; background-color: #d9edf7; } a.<API key>, button.<API key> { color: #31708f; } a.<API key> .<API key>, button.<API key> .<API key> { color: inherit; } a.<API key>:hover, button.<API key>:hover, a.<API key>:focus, button.<API key>:focus { color: #31708f; background-color: #c4e3f3; } a.<API key>.active, button.<API key>.active, a.<API key>.active:hover, button.<API key>.active:hover, a.<API key>.active:focus, button.<API key>.active:focus { color: #fff; background-color: #31708f; border-color: #31708f; } .<API key> { color: #8a6d3b; background-color: #fcf8e3; } a.<API key>, button.<API key> { color: #8a6d3b; } a.<API key> .<API key>, button.<API key> .<API key> { color: inherit; } a.<API key>:hover, button.<API key>:hover, a.<API key>:focus, button.<API key>:focus { color: #8a6d3b; background-color: #faf2cc; } a.<API key>.active, button.<API key>.active, a.<API key>.active:hover, button.<API key>.active:hover, a.<API key>.active:focus, button.<API key>.active:focus { color: #fff; background-color: #8a6d3b; border-color: #8a6d3b; } .<API key> { color: #a94442; background-color: #f2dede; } a.<API key>, button.<API key> { color: #a94442; } a.<API key> .<API key>, button.<API key> .<API key> { color: inherit; } a.<API key>:hover, button.<API key>:hover, a.<API key>:focus, button.<API key>:focus { color: #a94442; background-color: #ebcccc; } a.<API key>.active, button.<API key>.active, a.<API key>.active:hover, button.<API key>.active:hover, a.<API key>.active:focus, button.<API key>.active:focus { color: #fff; background-color: #a94442; border-color: #a94442; } .<API key> { margin-top: 0; margin-bottom: 5px; } .<API key> { margin-bottom: 0; line-height: 1.3; } .panel { margin-bottom: 20px; background-color: #fff; border: 1px solid transparent; border-radius: 4px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); box-shadow: 0 1px 1px rgba(0, 0, 0, .05); } .panel-body { padding: 15px; } .panel-heading { padding: 10px 15px; border-bottom: 1px solid transparent; <API key>: 3px; <API key>: 3px; } .panel-heading > .dropdown .dropdown-toggle { color: inherit; } .panel-title { margin-top: 0; margin-bottom: 0; font-size: 16px; color: inherit; } .panel-title > a, .panel-title > small, .panel-title > .small, .panel-title > small > a, .panel-title > .small > a { color: inherit; } .panel-footer { padding: 10px 15px; background-color: #f5f5f5; border-top: 1px solid #ddd; <API key>: 3px; <API key>: 3px; } .panel > .list-group, .panel > .panel-collapse > .list-group { margin-bottom: 0; } .panel > .list-group .list-group-item, .panel > .panel-collapse > .list-group .list-group-item { border-width: 1px 0; border-radius: 0; } .panel > .list-group:first-child .list-group-item:first-child, .panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { border-top: 0; <API key>: 3px; <API key>: 3px; } .panel > .list-group:last-child .list-group-item:last-child, .panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { border-bottom: 0; <API key>: 3px; <API key>: 3px; } .panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { <API key>: 0; <API key>: 0; } .panel-heading + .list-group .list-group-item:first-child { border-top-width: 0; } .list-group + .panel-footer { border-top-width: 0; } .panel > .table, .panel > .table-responsive > .table, .panel > .panel-collapse > .table { margin-bottom: 0; } .panel > .table caption, .panel > .table-responsive > .table caption, .panel > .panel-collapse > .table caption { padding-right: 15px; padding-left: 15px; } .panel > .table:first-child, .panel > .table-responsive:first-child > .table:first-child { <API key>: 3px; <API key>: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { <API key>: 3px; <API key>: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table:first-child > thead:first-child > tr:first-child th:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { <API key>: 3px; } .panel > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table:first-child > thead:first-child > tr:first-child th:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { <API key>: 3px; } .panel > .table:last-child, .panel > .table-responsive:last-child > .table:last-child { <API key>: 3px; <API key>: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { <API key>: 3px; <API key>: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { <API key>: 3px; } .panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { <API key>: 3px; } .panel > .panel-body + .table, .panel > .panel-body + .table-responsive, .panel > .table + .panel-body, .panel > .table-responsive + .panel-body { border-top: 1px solid #ddd; } .panel > .table > tbody:first-child > tr:first-child th, .panel > .table > tbody:first-child > tr:first-child td { border-top: 0; } .panel > .table-bordered, .panel > .table-responsive > .table-bordered { border: 0; } .panel > .table-bordered > thead > tr > th:first-child, .panel > .table-responsive > .table-bordered > thead > tr > th:first-child, .panel > .table-bordered > tbody > tr > th:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, .panel > .table-bordered > tfoot > tr > th:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, .panel > .table-bordered > thead > tr > td:first-child, .panel > .table-responsive > .table-bordered > thead > tr > td:first-child, .panel > .table-bordered > tbody > tr > td:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, .panel > .table-bordered > tfoot > tr > td:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { border-left: 0; } .panel > .table-bordered > thead > tr > th:last-child, .panel > .table-responsive > .table-bordered > thead > tr > th:last-child, .panel > .table-bordered > tbody > tr > th:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, .panel > .table-bordered > tfoot > tr > th:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, .panel > .table-bordered > thead > tr > td:last-child, .panel > .table-responsive > .table-bordered > thead > tr > td:last-child, .panel > .table-bordered > tbody > tr > td:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, .panel > .table-bordered > tfoot > tr > td:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { border-right: 0; } .panel > .table-bordered > thead > tr:first-child > td, .panel > .table-responsive > .table-bordered > thead > tr:first-child > td, .panel > .table-bordered > tbody > tr:first-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, .panel > .table-bordered > thead > tr:first-child > th, .panel > .table-responsive > .table-bordered > thead > tr:first-child > th, .panel > .table-bordered > tbody > tr:first-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { border-bottom: 0; } .panel > .table-bordered > tbody > tr:last-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, .panel > .table-bordered > tfoot > tr:last-child > td, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, .panel > .table-bordered > tbody > tr:last-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, .panel > .table-bordered > tfoot > tr:last-child > th, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { border-bottom: 0; } .panel > .table-responsive { margin-bottom: 0; border: 0; } .panel-group { margin-bottom: 20px; } .panel-group .panel { margin-bottom: 0; border-radius: 4px; } .panel-group .panel + .panel { margin-top: 5px; } .panel-group .panel-heading { border-bottom: 0; } .panel-group .panel-heading + .panel-collapse > .panel-body, .panel-group .panel-heading + .panel-collapse > .list-group { border-top: 1px solid #ddd; } .panel-group .panel-footer { border-top: 0; } .panel-group .panel-footer + .panel-collapse .panel-body { border-bottom: 1px solid #ddd; } .panel-default { border-color: #ddd; } .panel-default > .panel-heading { color: #333; background-color: #f5f5f5; border-color: #ddd; } .panel-default > .panel-heading + .panel-collapse > .panel-body { border-top-color: #ddd; } .panel-default > .panel-heading .badge { color: #f5f5f5; background-color: #333; } .panel-default > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #ddd; } .panel-primary { border-color: #337ab7; } .panel-primary > .panel-heading { color: #fff; background-color: #337ab7; border-color: #337ab7; } .panel-primary > .panel-heading + .panel-collapse > .panel-body { border-top-color: #337ab7; } .panel-primary > .panel-heading .badge { color: #337ab7; background-color: #fff; } .panel-primary > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #337ab7; } .panel-success { border-color: #d6e9c6; } .panel-success > .panel-heading { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; } .panel-success > .panel-heading + .panel-collapse > .panel-body { border-top-color: #d6e9c6; } .panel-success > .panel-heading .badge { color: #dff0d8; background-color: #3c763d; } .panel-success > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #d6e9c6; } .panel-info { border-color: #bce8f1; } .panel-info > .panel-heading { color: #31708f; background-color: #d9edf7; border-color: #bce8f1; } .panel-info > .panel-heading + .panel-collapse > .panel-body { border-top-color: #bce8f1; } .panel-info > .panel-heading .badge { color: #d9edf7; background-color: #31708f; } .panel-info > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #bce8f1; } .panel-warning { border-color: #faebcc; } .panel-warning > .panel-heading { color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; } .panel-warning > .panel-heading + .panel-collapse > .panel-body { border-top-color: #faebcc; } .panel-warning > .panel-heading .badge { color: #fcf8e3; background-color: #8a6d3b; } .panel-warning > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #faebcc; } .panel-danger { border-color: #ebccd1; } .panel-danger > .panel-heading { color: #a94442; background-color: #f2dede; border-color: #ebccd1; } .panel-danger > .panel-heading + .panel-collapse > .panel-body { border-top-color: #ebccd1; } .panel-danger > .panel-heading .badge { color: #f2dede; background-color: #a94442; } .panel-danger > .panel-footer + .panel-collapse > .panel-body { border-bottom-color: #ebccd1; } .embed-responsive { position: relative; display: block; height: 0; padding: 0; overflow: hidden; } .embed-responsive .<API key>, .embed-responsive iframe, .embed-responsive embed, .embed-responsive object, .embed-responsive video { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; height: 100%; border: 0; } .<API key> { padding-bottom: 56.25%; } .<API key> { padding-bottom: 75%; } .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); } .well blockquote { border-color: #ddd; border-color: rgba(0, 0, 0, .15); } .well-lg { padding: 24px; border-radius: 6px; } .well-sm { padding: 9px; border-radius: 3px; } .close { float: right; font-size: 21px; font-weight: bold; line-height: 1; color: #000; text-shadow: 0 1px 0 #fff; filter: alpha(opacity=20); opacity: .2; } .close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; filter: alpha(opacity=50); opacity: .5; } button.close { -webkit-appearance: none; padding: 0; cursor: pointer; background: transparent; border: 0; } .modal-open { overflow: hidden; } .modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1050; display: none; overflow: hidden; -<API key>: touch; outline: 0; } .modal.fade .modal-dialog { -webkit-transition: -webkit-transform .3s ease-out; -o-transition: -o-transform .3s ease-out; transition: transform .3s ease-out; -webkit-transform: translate(0, -25%); -ms-transform: translate(0, -25%); -o-transform: translate(0, -25%); transform: translate(0, -25%); } .modal.in .modal-dialog { -webkit-transform: translate(0, 0); -ms-transform: translate(0, 0); -o-transform: translate(0, 0); transform: translate(0, 0); } .modal-open .modal { overflow-x: hidden; overflow-y: auto; } .modal-dialog { position: relative; width: auto; margin: 10px; } .modal-content { position: relative; background-color: #fff; -<API key>: padding-box; background-clip: padding-box; border: 1px solid #999; border: 1px solid rgba(0, 0, 0, .2); border-radius: 6px; outline: 0; -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); box-shadow: 0 3px 9px rgba(0, 0, 0, .5); } .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000; } .modal-backdrop.fade { filter: alpha(opacity=0); opacity: 0; } .modal-backdrop.in { filter: alpha(opacity=50); opacity: .5; } .modal-header { padding: 15px; border-bottom: 1px solid #e5e5e5; } .modal-header .close { margin-top: -2px; } .modal-title { margin: 0; line-height: 1.42857143; } .modal-body { position: relative; padding: 15px; } .modal-footer { padding: 15px; text-align: right; border-top: 1px solid #e5e5e5; } .modal-footer .btn + .btn { margin-bottom: 0; margin-left: 5px; } .modal-footer .btn-group .btn + .btn { margin-left: -1px; } .modal-footer .btn-block + .btn-block { margin-left: 0; } .<API key> { position: absolute; top: -9999px; width: 50px; height: 50px; overflow: scroll; } @media (min-width: 768px) { .modal-dialog { width: 600px; margin: 30px auto; } .modal-content { -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); box-shadow: 0 5px 15px rgba(0, 0, 0, .5); } .modal-sm { width: 300px; } } @media (min-width: 992px) { .modal-lg { width: 900px; } } .tooltip { position: absolute; z-index: 1070; display: block; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 12px; font-style: normal; font-weight: normal; line-height: 1.42857143; text-align: left; text-align: start; text-decoration: none; text-shadow: none; text-transform: none; letter-spacing: normal; word-break: normal; word-spacing: normal; word-wrap: normal; white-space: normal; filter: alpha(opacity=0); opacity: 0; line-break: auto; } .tooltip.in { filter: alpha(opacity=90); opacity: .9; } .tooltip.top { padding: 5px 0; margin-top: -3px; } .tooltip.right { padding: 0 5px; margin-left: 3px; } .tooltip.bottom { padding: 5px 0; margin-top: 3px; } .tooltip.left { padding: 0 5px; margin-left: -3px; } .tooltip-inner { max-width: 200px; padding: 3px 8px; color: #fff; text-align: center; background-color: #000; border-radius: 4px; } .tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .tooltip.top .tooltip-arrow { bottom: 0; left: 50%; margin-left: -5px; border-width: 5px 5px 0; border-top-color: #000; } .tooltip.top-left .tooltip-arrow { right: 5px; bottom: 0; margin-bottom: -5px; border-width: 5px 5px 0; border-top-color: #000; } .tooltip.top-right .tooltip-arrow { bottom: 0; left: 5px; margin-bottom: -5px; border-width: 5px 5px 0; border-top-color: #000; } .tooltip.right .tooltip-arrow { top: 50%; left: 0; margin-top: -5px; border-width: 5px 5px 5px 0; border-right-color: #000; } .tooltip.left .tooltip-arrow { top: 50%; right: 0; margin-top: -5px; border-width: 5px 0 5px 5px; border-left-color: #000; } .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-width: 0 5px 5px; border-bottom-color: #000; } .tooltip.bottom-left .tooltip-arrow { top: 0; right: 5px; margin-top: -5px; border-width: 0 5px 5px; border-bottom-color: #000; } .tooltip.bottom-right .tooltip-arrow { top: 0; left: 5px; margin-top: -5px; border-width: 0 5px 5px; border-bottom-color: #000; } .popover { position: absolute; top: 0; left: 0; z-index: 1060; display: none; max-width: 276px; padding: 1px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; line-height: 1.42857143; text-align: left; text-align: start; text-decoration: none; text-shadow: none; text-transform: none; letter-spacing: normal; word-break: normal; word-spacing: normal; word-wrap: normal; white-space: normal; background-color: #fff; -<API key>: padding-box; background-clip: padding-box; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, .2); border-radius: 6px; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); box-shadow: 0 5px 10px rgba(0, 0, 0, .2); line-break: auto; } .popover.top { margin-top: -10px; } .popover.right { margin-left: 10px; } .popover.bottom { margin-top: 10px; } .popover.left { margin-left: -10px; } .popover-title { padding: 8px 14px; margin: 0; font-size: 14px; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; border-radius: 5px 5px 0 0; } .popover-content { padding: 9px 14px; } .popover > .arrow, .popover > .arrow:after { position: absolute; display: block; width: 0; height: 0; border-color: transparent; border-style: solid; } .popover > .arrow { border-width: 11px; } .popover > .arrow:after { content: ""; border-width: 10px; } .popover.top > .arrow { bottom: -11px; left: 50%; margin-left: -11px; border-top-color: #999; border-top-color: rgba(0, 0, 0, .25); border-bottom-width: 0; } .popover.top > .arrow:after { bottom: 1px; margin-left: -10px; content: " "; border-top-color: #fff; border-bottom-width: 0; } .popover.right > .arrow { top: 50%; left: -11px; margin-top: -11px; border-right-color: #999; border-right-color: rgba(0, 0, 0, .25); border-left-width: 0; } .popover.right > .arrow:after { bottom: -10px; left: 1px; content: " "; border-right-color: #fff; border-left-width: 0; } .popover.bottom > .arrow { top: -11px; left: 50%; margin-left: -11px; border-top-width: 0; border-bottom-color: #999; border-bottom-color: rgba(0, 0, 0, .25); } .popover.bottom > .arrow:after { top: 1px; margin-left: -10px; content: " "; border-top-width: 0; border-bottom-color: #fff; } .popover.left > .arrow { top: 50%; right: -11px; margin-top: -11px; border-right-width: 0; border-left-color: #999; border-left-color: rgba(0, 0, 0, .25); } .popover.left > .arrow:after { right: 1px; bottom: -10px; content: " "; border-right-width: 0; border-left-color: #fff; } .carousel { position: relative; } .carousel-inner { position: relative; width: 100%; overflow: hidden; } .carousel-inner > .item { position: relative; display: none; -webkit-transition: .6s ease-in-out left; -o-transition: .6s ease-in-out left; transition: .6s ease-in-out left; } .carousel-inner > .item > img, .carousel-inner > .item > a > img { line-height: 1; } @media all and (transform-3d), (-webkit-transform-3d) { .carousel-inner > .item { -webkit-transition: -webkit-transform .6s ease-in-out; -o-transition: -o-transform .6s ease-in-out; transition: transform .6s ease-in-out; -<API key>: hidden; backface-visibility: hidden; -webkit-perspective: 1000px; perspective: 1000px; } .carousel-inner > .item.next, .carousel-inner > .item.active.right { left: 0; -webkit-transform: translate3d(100%, 0, 0); transform: translate3d(100%, 0, 0); } .carousel-inner > .item.prev, .carousel-inner > .item.active.left { left: 0; -webkit-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); } .carousel-inner > .item.next.left, .carousel-inner > .item.prev.right, .carousel-inner > .item.active { left: 0; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } .carousel-inner > .active, .carousel-inner > .next, .carousel-inner > .prev { display: block; } .carousel-inner > .active { left: 0; } .carousel-inner > .next, .carousel-inner > .prev { position: absolute; top: 0; width: 100%; } .carousel-inner > .next { left: 100%; } .carousel-inner > .prev { left: -100%; } .carousel-inner > .next.left, .carousel-inner > .prev.right { left: 0; } .carousel-inner > .active.left { left: -100%; } .carousel-inner > .active.right { left: 100%; } .carousel-control { position: absolute; top: 0; bottom: 0; left: 0; width: 15%; font-size: 20px; color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); background-color: rgba(0, 0, 0, 0); filter: alpha(opacity=50); opacity: .5; } .carousel-control.left { background-image: -<API key>(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); background-repeat: repeat-x; } .carousel-control.right { right: 0; left: auto; background-image: -<API key>(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); background-repeat: repeat-x; } .carousel-control:hover, .carousel-control:focus { color: #fff; text-decoration: none; filter: alpha(opacity=90); outline: 0; opacity: .9; } .carousel-control .icon-prev, .carousel-control .icon-next, .carousel-control .<API key>, .carousel-control .<API key> { position: absolute; top: 50%; z-index: 5; display: inline-block; margin-top: -10px; } .carousel-control .icon-prev, .carousel-control .<API key> { left: 50%; margin-left: -10px; } .carousel-control .icon-next, .carousel-control .<API key> { right: 50%; margin-right: -10px; } .carousel-control .icon-prev, .carousel-control .icon-next { width: 20px; height: 20px; font-family: serif; line-height: 1; } .carousel-control .icon-prev:before { content: '\2039'; } .carousel-control .icon-next:before { content: '\203a'; } .carousel-indicators { position: absolute; bottom: 10px; left: 50%; z-index: 15; width: 60%; padding-left: 0; margin-left: -30%; text-align: center; list-style: none; } .carousel-indicators li { display: inline-block; width: 10px; height: 10px; margin: 1px; text-indent: -999px; cursor: pointer; background-color: #000 \9; background-color: rgba(0, 0, 0, 0); border: 1px solid #fff; border-radius: 10px; } .carousel-indicators .active { width: 12px; height: 12px; margin: 0; background-color: #fff; } .carousel-caption { position: absolute; right: 15%; bottom: 20px; left: 15%; z-index: 10; padding-top: 20px; padding-bottom: 20px; color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); } .carousel-caption .btn { text-shadow: none; } @media screen and (min-width: 768px) { .carousel-control .<API key>, .carousel-control .<API key>, .carousel-control .icon-prev, .carousel-control .icon-next { width: 30px; height: 30px; margin-top: -10px; font-size: 30px; } .carousel-control .<API key>, .carousel-control .icon-prev { margin-left: -10px; } .carousel-control .<API key>, .carousel-control .icon-next { margin-right: -10px; } .carousel-caption { right: 20%; left: 20%; padding-bottom: 30px; } .carousel-indicators { bottom: 20px; } } .clearfix:before, .clearfix:after, .dl-horizontal dd:before, .dl-horizontal dd:after, .container:before, .container:after, .container-fluid:before, .container-fluid:after, .row:before, .row:after, .form-horizontal .form-group:before, .form-horizontal .form-group:after, .btn-toolbar:before, .btn-toolbar:after, .btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after, .nav:before, .nav:after, .navbar:before, .navbar:after, .navbar-header:before, .navbar-header:after, .navbar-collapse:before, .navbar-collapse:after, .pager:before, .pager:after, .panel-body:before, .panel-body:after, .modal-header:before, .modal-header:after, .modal-footer:before, .modal-footer:after { display: table; content: " "; } .clearfix:after, .dl-horizontal dd:after, .container:after, .container-fluid:after, .row:after, .form-horizontal .form-group:after, .btn-toolbar:after, .btn-group-vertical > .btn-group:after, .nav:after, .navbar:after, .navbar-header:after, .navbar-collapse:after, .pager:after, .panel-body:after, .modal-header:after, .modal-footer:after { clear: both; } .center-block { display: block; margin-right: auto; margin-left: auto; } .pull-right { float: right !important; } .pull-left { float: left !important; } .hide { display: none !important; } .show { display: block !important; } .invisible { visibility: hidden; } .text-hide { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; } .hidden { display: none !important; } .affix { position: fixed; } @-ms-viewport { width: device-width; } .visible-xs, .visible-sm, .visible-md, .visible-lg { display: none !important; } .visible-xs-block, .visible-xs-inline, .<API key>, .visible-sm-block, .visible-sm-inline, .<API key>, .visible-md-block, .visible-md-inline, .<API key>, .visible-lg-block, .visible-lg-inline, .<API key> { display: none !important; } @media (max-width: 767px) { .visible-xs { display: block !important; } table.visible-xs { display: table !important; } tr.visible-xs { display: table-row !important; } th.visible-xs, td.visible-xs { display: table-cell !important; } } @media (max-width: 767px) { .visible-xs-block { display: block !important; } } @media (max-width: 767px) { .visible-xs-inline { display: inline !important; } } @media (max-width: 767px) { .<API key> { display: inline-block !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm { display: block !important; } table.visible-sm { display: table !important; } tr.visible-sm { display: table-row !important; } th.visible-sm, td.visible-sm { display: table-cell !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-block { display: block !important; } } @media (min-width: 768px) and (max-width: 991px) { .visible-sm-inline { display: inline !important; } } @media (min-width: 768px) and (max-width: 991px) { .<API key> { display: inline-block !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md { display: block !important; } table.visible-md { display: table !important; } tr.visible-md { display: table-row !important; } th.visible-md, td.visible-md { display: table-cell !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-block { display: block !important; } } @media (min-width: 992px) and (max-width: 1199px) { .visible-md-inline { display: inline !important; } } @media (min-width: 992px) and (max-width: 1199px) { .<API key> { display: inline-block !important; } } @media (min-width: 1200px) { .visible-lg { display: block !important; } table.visible-lg { display: table !important; } tr.visible-lg { display: table-row !important; } th.visible-lg, td.visible-lg { display: table-cell !important; } } @media (min-width: 1200px) { .visible-lg-block { display: block !important; } } @media (min-width: 1200px) { .visible-lg-inline { display: inline !important; } } @media (min-width: 1200px) { .<API key> { display: inline-block !important; } } @media (max-width: 767px) { .hidden-xs { display: none !important; } } @media (min-width: 768px) and (max-width: 991px) { .hidden-sm { display: none !important; } } @media (min-width: 992px) and (max-width: 1199px) { .hidden-md { display: none !important; } } @media (min-width: 1200px) { .hidden-lg { display: none !important; } } .visible-print { display: none !important; } @media print { .visible-print { display: block !important; } table.visible-print { display: table !important; } tr.visible-print { display: table-row !important; } th.visible-print, td.visible-print { display: table-cell !important; } } .visible-print-block { display: none !important; } @media print { .visible-print-block { display: block !important; } } .<API key> { display: none !important; } @media print { .<API key> { display: inline !important; } } .<API key> { display: none !important; } @media print { .<API key> { display: inline-block !important; } } @media print { .hidden-print { display: none !important; } } /*# sourceMappingURL=bootstrap.css.map */
angular .module('material.components.autocomplete') .controller('MdAutocompleteCtrl', MdAutocompleteCtrl); var ITEM_HEIGHT = 41, MAX_HEIGHT = 5.5 * ITEM_HEIGHT, MENU_PADDING = 8; function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $mdTheming, $window, $animate, $rootElement, $attrs) { //-- private variables var ctrl = this, itemParts = $scope.itemsExpr.split(/ in /i), itemExpr = itemParts[1], elements = null, promise = null, cache = {}, noBlur = false, <API key> = [], hasFocus = false, lastCount = 0; //-- public variables with handlers defineProperty('hidden', handleHiddenChange, true); //-- public variables ctrl.scope = $scope; ctrl.parent = $scope.$parent; ctrl.itemName = itemParts[0]; ctrl.matches = []; ctrl.loading = false; ctrl.hidden = true; ctrl.index = null; ctrl.messages = []; ctrl.id = $mdUtil.nextUid(); ctrl.isDisabled = null; ctrl.isRequired = null; //-- public methods ctrl.keydown = keydown; ctrl.blur = blur; ctrl.focus = focus; ctrl.clear = clearValue; ctrl.select = select; ctrl.listEnter = onListEnter; ctrl.listLeave = onListLeave; ctrl.mouseUp = onMouseup; ctrl.<API key> = <API key>; ctrl.<API key> = <API key>; ctrl.<API key> = <API key>; return init(); //-- initialization methods /** * Initialize the controller, setup watchers, gather elements */ function init () { $mdUtil.<API key>($scope, $attrs, { searchText: null, selectedItem: null } ); $mdTheming($element); configureWatchers(); $timeout(function () { gatherElements(); focusElement(); moveDropdown(); }); } /** * Calculates the dropdown's position and applies the new styles to the menu element * @returns {*} */ function positionDropdown () { if (!elements) return $timeout(positionDropdown, 0, false); var hrect = elements.wrap.<API key>(), vrect = elements.snap.<API key>(), root = elements.root.<API key>(), top = vrect.bottom - root.top, bot = root.bottom - vrect.top, left = hrect.left - root.left, width = hrect.width, styles = { left: left + 'px', minWidth: width + 'px', maxWidth: Math.max(hrect.right - root.left, root.right - hrect.left) - MENU_PADDING + 'px' }; if (top > bot && root.height - hrect.bottom - MENU_PADDING < MAX_HEIGHT) { styles.top = 'auto'; styles.bottom = bot + 'px'; styles.maxHeight = Math.min(MAX_HEIGHT, hrect.top - root.top - MENU_PADDING) + 'px'; } else { styles.top = top + 'px'; styles.bottom = 'auto'; styles.maxHeight = Math.min(MAX_HEIGHT, root.bottom - hrect.bottom - MENU_PADDING) + 'px'; } elements.$.ul.css(styles); $timeout(<API key>, 0, false); /** * Makes sure that the menu doesn't go off of the screen on either side. */ function <API key> () { var dropdown = elements.ul.<API key>(), styles = {}; if (dropdown.right > root.right - MENU_PADDING) { styles.left = (hrect.right - dropdown.width) + 'px'; } elements.$.ul.css(styles); } } /** * Moves the dropdown menu to the body tag in order to avoid z-index and overflow issues. */ function moveDropdown () { if (!elements.$.root.length) return; $mdTheming(elements.$.ul); elements.$.ul.detach(); elements.$.root.append(elements.$.ul); if ($animate.pin) $animate.pin(elements.$.ul, $rootElement); } /** * Sends focus to the input element. */ function focusElement () { if ($scope.autofocus) elements.input.focus(); } /** * Sets up any watchers used by autocomplete */ function configureWatchers () { var wait = parseInt($scope.delay, 10) || 0; $attrs.$observe('disabled', function (value) { ctrl.isDisabled = value; }); $attrs.$observe('required', function (value) { ctrl.isRequired = value !== null; }); $scope.$watch('searchText', wait ? $mdUtil.debounce(handleSearchText, wait) : handleSearchText); <API key>(selectedItemChange); $scope.$watch('selectedItem', <API key>); angular.element($window).on('resize', positionDropdown); $scope.$on('$destroy', cleanup); } function cleanup () { angular.element($window).off('resize', positionDropdown); elements.$.ul.remove(); } /** * Gathers all of the elements needed for this controller */ function gatherElements () { elements = { main: $element[0], ul: $element.find('ul')[0], input: $element.find('input')[0], wrap: $element.find('<API key>')[0], root: document.body }; elements.li = elements.ul.<API key>('li'); elements.snap = getSnapTarget(); elements.$ = getAngularElements(elements); } /** * Finds the element that the menu will base its position on * @returns {*} */ function getSnapTarget () { for (var element = $element; element.length; element = element.parent()) { if (angular.isDefined(element.attr('<API key>'))) return element[0]; } return elements.wrap; } /** * Gathers angular-wrapped versions of each element * @param elements * @returns {{}} */ function getAngularElements (elements) { var obj = {}; for (var key in elements) { obj[key] = angular.element(elements[key]); } return obj; } //-- event/change handlers /** * Handles changes to the `hidden` property. * @param hidden * @param oldHidden */ function handleHiddenChange (hidden, oldHidden) { if (!hidden && oldHidden) positionDropdown(); if (!hidden) { if (elements) $timeout(function () { $mdUtil.disableScrollAround(elements.ul); }, 0, false); } else { $mdUtil.enableScrolling(); } } /** * When the user mouses over the dropdown menu, ignore blur events. */ function onListEnter () { noBlur = true; } /** * When the user's mouse leaves the menu, blur events may hide the menu again. */ function onListLeave () { noBlur = false; if (!hasFocus) ctrl.hidden = true; } /** * When the mouse button is released, send focus back to the input field. */ function onMouseup () { elements.input.focus(); } /** * Handles changes to the selected item. * @param selectedItem * @param <API key> */ function selectedItemChange (selectedItem, <API key>) { if (selectedItem) { $scope.searchText = getDisplayValue(selectedItem); } if ($scope.itemChange && selectedItem !== <API key>) $scope.itemChange(getItemScope(selectedItem)); } /** * Calls any external watchers listening for the selected item. Used in conjunction with * `<API key>`. * @param selectedItem * @param <API key> */ function <API key>(selectedItem, <API key>) { for (var i = 0; i < <API key>.length; ++i) { <API key>[i](selectedItem, <API key>); } } /** * Register a function to be called when the selected item changes. * @param cb */ function <API key>(cb) { if (<API key>.indexOf(cb) == -1) { <API key>.push(cb); } } /** * Unregister a function previously registered for selected item changes. * @param cb */ function <API key>(cb) { var i = <API key>.indexOf(cb); if (i != -1) { <API key>.splice(i, 1); } } /** * Handles changes to the searchText property. * @param searchText * @param previousSearchText */ function handleSearchText (searchText, previousSearchText) { ctrl.index = getDefaultIndex(); //-- do nothing on init if (searchText === previousSearchText) return; //-- clear selected item if search text no longer matches it if (searchText !== getDisplayValue($scope.selectedItem)) $scope.selectedItem = null; else return; //-- trigger change event if available if ($scope.textChange && searchText !== previousSearchText) $scope.textChange(getItemScope($scope.selectedItem)); //-- cancel results if search text is not long enough if (!isMinLengthMet()) { ctrl.loading = false; ctrl.matches = []; ctrl.hidden = shouldHide(); updateMessages(); } else { handleQuery(); } } /** * Handles input blur event, determines if the dropdown should hide. */ function blur () { hasFocus = false; if (!noBlur) ctrl.hidden = true; } /** * Handles input focus event, determines if the dropdown should show. */ function focus () { hasFocus = true; //-- if searchText is null, let's force it to be a string if (!angular.isString($scope.searchText)) $scope.searchText = ''; if ($scope.minLength > 0) return; ctrl.hidden = shouldHide(); if (!ctrl.hidden) handleQuery(); } /** * Handles keyboard input. * @param event */ function keydown (event) { switch (event.keyCode) { case $mdConstant.KEY_CODE.DOWN_ARROW: if (ctrl.loading) return; event.preventDefault(); ctrl.index = Math.min(ctrl.index + 1, ctrl.matches.length - 1); updateScroll(); updateMessages(); break; case $mdConstant.KEY_CODE.UP_ARROW: if (ctrl.loading) return; event.preventDefault(); ctrl.index = ctrl.index < 0 ? ctrl.matches.length - 1 : Math.max(0, ctrl.index - 1); updateScroll(); updateMessages(); break; case $mdConstant.KEY_CODE.TAB: case $mdConstant.KEY_CODE.ENTER: if (ctrl.hidden || ctrl.loading || ctrl.index < 0 || ctrl.matches.length < 1) return; event.preventDefault(); select(ctrl.index); break; case $mdConstant.KEY_CODE.ESCAPE: ctrl.matches = []; ctrl.hidden = true; ctrl.index = getDefaultIndex(); break; default: } } //-- getters /** * Returns the minimum length needed to display the dropdown. * @returns {*} */ function getMinLength () { return angular.isNumber($scope.minLength) ? $scope.minLength : 1; } /** * Returns the display value for an item. * @param item * @returns {*} */ function getDisplayValue (item) { return (item && $scope.itemText) ? $scope.itemText(getItemScope(item)) : item; } /** * Returns the locals object for compiling item templates. * @param item * @returns {{}} */ function getItemScope (item) { if (!item) return; var locals = {}; if (ctrl.itemName) locals[ctrl.itemName] = item; return locals; } /** * Returns the default index based on whether or not autoselect is enabled. * @returns {number} */ function getDefaultIndex () { return $scope.autoselect ? 0 : -1; } /** * Determines if the menu should be hidden. * @returns {boolean} */ function shouldHide () { if (!isMinLengthMet()) return true; } /** * Returns the display value of the current item. * @returns {*} */ function <API key> () { return getDisplayValue(ctrl.matches[ctrl.index]); } /** * Determines if the minimum length is met by the search text. * @returns {*} */ function isMinLengthMet () { return angular.isDefined($scope.searchText) && $scope.searchText.length >= getMinLength(); } //-- actions /** * Defines a public property with a handler and a default value. * @param key * @param handler * @param value */ function defineProperty (key, handler, value) { Object.defineProperty(ctrl, key, { get: function () { return value; }, set: function (newValue) { var oldValue = value; value = newValue; handler(newValue, oldValue); } }); } /** * Selects the item at the given index. * @param index */ function select (index) { $scope.selectedItem = ctrl.matches[index]; ctrl.hidden = true; ctrl.index = 0; ctrl.matches = []; //-- force form to update state for validation $timeout(function () { elements.$.input.controller('ngModel').$setViewValue(getDisplayValue($scope.selectedItem) || $scope.searchText); ctrl.hidden = true; }); } /** * Clears the searchText value and selected item. */ function clearValue () { $scope.searchText = ''; select(-1); var eventObj = document.createEvent('CustomEvent'); eventObj.initCustomEvent('input', true, true, {value: $scope.searchText}); elements.input.dispatchEvent(eventObj); elements.input.focus(); } /** * Fetches the results for the provided search text. * @param searchText */ function fetchResults (searchText) { var items = $scope.$parent.$eval(itemExpr), term = searchText.toLowerCase(); if (angular.isArray(items)) { handleResults(items); } else { ctrl.loading = true; if (items.success) items.success(handleResults); if (items.then) items.then(handleResults); if (items.error) items.error(function () { ctrl.loading = false; }); } function handleResults (matches) { cache[term] = matches; if (searchText !== $scope.searchText) return; //-- just cache the results if old request ctrl.loading = false; promise = null; ctrl.matches = matches; ctrl.hidden = shouldHide(); updateMessages(); positionDropdown(); } } /** * Updates the ARIA messages */ function updateMessages () { ctrl.messages = [ getCountMessage(), <API key>() ]; } /** * Returns the ARIA message for how many results match the current query. * @returns {*} */ function getCountMessage () { if (lastCount === ctrl.matches.length) return ''; lastCount = ctrl.matches.length; switch (ctrl.matches.length) { case 0: return 'There are no matches available.'; case 1: return 'There is 1 match available.'; default: return 'There are ' + ctrl.matches.length + ' matches available.'; } } /** * Makes sure that the focused element is within view. */ function updateScroll () { if (!elements.li[ctrl.index]) return; var li = elements.li[ctrl.index], top = li.offsetTop, bot = top + li.offsetHeight, hgt = elements.ul.clientHeight; if (top < elements.ul.scrollTop) { elements.ul.scrollTop = top; } else if (bot > elements.ul.scrollTop + hgt) { elements.ul.scrollTop = bot - hgt; } } /** * Starts the query to gather the results for the current searchText. Attempts to return cached * results first, then forwards the process to `fetchResults` if necessary. */ function handleQuery () { var searchText = $scope.searchText, term = searchText.toLowerCase(); //-- cancel promise if a promise is in progress if (promise && promise.cancel) { promise.cancel(); promise = null; } //-- if results are cached, pull in cached results if (!$scope.noCache && cache[term]) { ctrl.matches = cache[term]; updateMessages(); } else { fetchResults(searchText); } if (hasFocus) ctrl.hidden = shouldHide(); } }
import_module('Athena.Math'); v1 = new Athena.Math.Vector4(1, 2, 3, 4); v2 = new Athena.Math.Vector4(-1, -2, -3, -4); CHECK_CLOSE(-30, v1.dot(v2)); CHECK_CLOSE(30, v1.absDot(v2));
package at.fhjoanneum.ippr.gateway.config; import java.util.concurrent.Executor; import org.springframework.aop.interceptor.<API key>; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.AsyncConfigurer; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.concurrent.<API key>; @Configuration @EnableAsync public class SpringAsyncConfig implements AsyncConfigurer { @Override @Bean public Executor getAsyncExecutor() { final <API key> taskExecutor = new <API key>(); taskExecutor.setCorePoolSize(5); taskExecutor.setMaxPoolSize(100); taskExecutor.setThreadNamePrefix("Thread-"); return taskExecutor; } @Override public <API key> <API key>() { return new <API key>(); } }
package main import ( "errors" "fmt" "github.com/bluele/greq" "io/ioutil" "net/http" ) func main() { res, err := greq.Get("http://example.com/notfound.html"). RequestHandler(greq.RetryBackoff(3, greq.NewBackOff())). ResponseHandler(func(res *http.Response, err error) error { if res != nil && res.StatusCode >= 400 && res.StatusCode < 500 { return errors.New("40X error") } return err }).Do() if err != nil { fmt.Println("error:", err.Error()) return } body, _ := ioutil.ReadAll(res.Body) fmt.Println(string(body)) }
var gulp = require('gulp'); var jest = require('jest-cli'); var jestConfig = { "rootDir": '.', "<API key>": [ "js", "jsx", "json" ], "scriptPreprocessor": "./preprocessor.js", "<API key>": [ "./node_modules/react" ] }; gulp.task('test', function(done) { jest.runCLI({ config : jestConfig }, ".", function() { done(); }); }); gulp.task('watch', ['test'], function(done) { gulp.watch(['.*.js', '.*.jsx'], [ 'test' ]); }); gulp.task('default', ['watch']);
package org.jtuples; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; /** * This class provides skeletal implementations of common methods for tuples. * * @author Andre Santos * @author Benjamim Sonntag */ public abstract class AbstractTuple implements Tuple { /** * {@inheritDoc} */ @Override public List<?> asList() { return Collections.unmodifiableList(Arrays.asList(this.toArray())); } /** * {@inheritDoc} */ @Override public final boolean equals(Object obj) { if (this == obj) { return true; } else if (!(obj instanceof Tuple)) { return false; } else { return equalsTuple((Tuple) obj); } } private boolean equalsTuple(Tuple other) { if (this.arity() != other.arity()) { return false; } else { return Arrays.equals(this.toArray(), other.toArray()); } } /** * {@inheritDoc} */ @Override public final int hashCode() { return this.asList().hashCode(); } /** * {@inheritDoc} */ @Override public final String toString() { return this.asList().stream() .map(String::valueOf) .collect(Collectors.joining(", ", "(", ")")); } }
package main import ( "bufio" "flag" "fmt" "os" "path/filepath" ) var showVerbose bool = false // Show verbose output func processFile(writer *bufio.Writer, path string) { tag := NewTag(path) ext := filepath.Ext(path) if ext == ".rake" || filepath.Base(path) == "Rakefile" { ext = ".rb" } rset := Rules[ext] if rset != nil { if showVerbose { fmt.Println(path) } source, err := OpenLineSource(path) if err != nil { fmt.Println("Error opening file '" + path + "': " + err.Error()) return } defer source.Close() for { line, err := source.ReadLine() if err != nil { break } rset.CheckLine(tag, line, source.Loc) } tag.WriteOn(writer) } } func walkDir(writer *bufio.Writer, path string, info os.FileInfo, err error) error { if info != nil && ! info.IsDir() { processFile(writer, path) } return nil } var version = "1.2.0" func main() { var showVersion bool = false var showHelp bool = false flag.BoolVar(&showVersion, "v", false, "Display the version number") flag.BoolVar(&showVerbose, "V", false, "Display files as processed") flag.BoolVar(&showHelp, "h", false, "Display help text") flag.BoolVar(&showHelp, "help", false, "Display help text") flag.Parse() if showVersion { fmt.Println(version) os.Exit(0) } if showHelp { fmt.Println("Usage: gotags [options] [file...]") fmt.Println() fmt.Println("Options are:") flag.PrintDefaults() os.Exit(0) } fo, _ := os.Create("TAGS") defer fo.Close() writer := bufio.NewWriter(fo) defer writer.Flush() walkFunc := func(path string, info os.FileInfo, err error) error { return walkDir(writer, path, info, err) } var err error = nil if len(flag.Args()) == 0 { err = filepath.Walk(".", walkFunc) } else { for _, arg := range flag.Args() { err = filepath.Walk(arg, walkFunc) } } if err != nil { fmt.Println("Error: " + err.Error()) os.Exit(-1) } }
from reportlab.pdfgen.canvas import Canvas from reportlab.lib.units import inch from xml.etree.ElementTree import ElementTree import Image, re, sys class HocrConverter(): def __init__(self, hocrFileName = None): self.hocr = None self.xmlns = '' self.boxPattern = re.compile('bbox((\s+\d+){4})') if hocrFileName is not None: self.parse_hocr(hocrFileName) def __str__(self): """ Return the textual content of the HTML body """ if self.hocr is None: return '' body = self.hocr.find(".//%sbody"%(self.xmlns)) if body: return self._get_element_text(body).encode('utf-8') # XML gives unicode else: return '' def _get_element_text(self, element): """ Return the textual content of the element and its children """ text = '' if element.text is not None: text = text + element.text for child in element.getchildren(): text = text + self._get_element_text(child) if element.tail is not None: text = text + element.tail return text def element_coordinates(self, element): """ Returns a tuple containing the coordinates of the bounding box around an element """ out = (0,0,0,0) if 'title' in element.attrib: matches = self.boxPattern.search(element.attrib['title']) if matches: coords = matches.group(1).split() out = (int(coords[0]),int(coords[1]),int(coords[2]),int(coords[3])) return out def parse_hocr(self, hocrFileName): """ Reads an XML/XHTML file into an ElementTree object """ self.hocr = ElementTree() self.hocr.parse(hocrFileName) # if the hOCR file has a namespace, ElementTree requires its use to find elements matches = re.match('({.*})html', self.hocr.getroot().tag) if matches: self.xmlns = matches.group(1) else: self.xmlns = '' def to_pdf(self, imageFileName, outFileName, fontname="Courier", fontsize=8): """ Creates a PDF file with an image superimposed on top of the text. Text is positioned according to the bounding box of the lines in the hOCR file. The image need not be identical to the image used to create the hOCR file. It can be scaled, have a lower resolution, different color mode, etc. """ if self.hocr is None: # warn that no text will be embedded in the output PDF print "Warning: No hOCR file specified. PDF will be image-only." im = Image.open(imageFileName) imwidthpx, imheightpx = im.size if 'dpi' in im.info: width = float(im.size[0])/im.info['dpi'][0] height = float(im.size[1])/im.info['dpi'][1] else: # we have to make a reasonable guess # set to None for now and try again using info from hOCR file width = height = None ocr_dpi = (300, 300) # a default, in case we can't find it # get dimensions of the OCR, which may not match the image if self.hocr is not None: for div in self.hocr.findall(".//%sdiv"%(self.xmlns)): if div.attrib['class'] == 'ocr_page': coords = self.element_coordinates(div) ocrwidth = coords[2]-coords[0] ocrheight = coords[3]-coords[1] if width is None: # no dpi info with the image # assume OCR was done at 300 dpi width = ocrwidth/300 height = ocrheight/300 ocr_dpi = (ocrwidth/width, ocrheight/height) break # there shouldn't be more than one, and if there is, we don't want it if width is None: # no dpi info with the image, and no help from the hOCR file either # this will probably end up looking awful, so issue a warning print "Warning: DPI unavailable for image %s. Assuming 96 DPI."%(imageFileName) width = float(im.size[0])/96 height = float(im.size[1])/96 # create the PDF file pdf = Canvas(outFileName, pagesize=(width*inch, height*inch), pageCompression=1) # page size in points (1/72 in.) # put the image on the page, scaled to fill the page pdf.drawInlineImage(im, 0, 0, width=width*inch, height=height*inch) if self.hocr is not None: for line in self.hocr.findall(".//%sspan"%(self.xmlns)): if line.attrib['class'] == 'ocr_line': coords = self.element_coordinates(line) text = pdf.beginText() text.setFont(fontname, fontsize) text.setTextRenderMode(3) # invisible # set cursor to bottom left corner of line bbox (adjust for dpi) text.setTextOrigin((float(coords[0])/ocr_dpi[0])*inch, (height*inch)-(float(coords[3])/ocr_dpi[1])*inch) # scale the width of the text to fill the width of the line's bbox text.setHorizScale((((float(coords[2])/ocr_dpi[0]*inch)-(float(coords[0])/ocr_dpi[0]*inch))/pdf.stringWidth(line.text.rstrip(), fontname, fontsize))*100) # write the text to the page text.textLine(line.text.rstrip()) pdf.drawText(text) # finish up the page and save it pdf.showPage() pdf.save() def to_text(self, outFileName): """ Writes the textual content of the hOCR body to a file. """ f = open(outFileName, "w") f.write(self.__str__()) f.close() if __name__ == "__main__": if len(sys.argv) < 4: print 'Usage: python HocrConverter.py inputHocrFile inputImageFile outputPdfFile' sys.exit(1) hocr = HocrConverter(sys.argv[1]) hocr.to_pdf(sys.argv[2], sys.argv[3])
/* global describe, it, expect, before */ import Cldr from "../../../src/core.js"; import parentLookup from "../../../src/bundle/parent_lookup.js"; import parentLocalesJson from "cldr-data/supplemental/parentLocales.json"; import "../../../src/unresolved.js"; describe("Bundle Parent Lookup", function() { before(function() { Cldr.load(parentLocalesJson); }); it("should truncate locale", function() { expect(parentLookup(Cldr, ["pt", "BR"].join(Cldr.localeSep))).to.equal( "pt" ); }); it("should end with root", function() { expect(parentLookup(Cldr, "en")).to.equal("root"); }); it("should use supplemental resource", function() { expect(parentLookup(Cldr, ["en", "IN"].join(Cldr.localeSep))).to.equal( ["en", "001"].join(Cldr.localeSep) ); }); });
<?php namespace Shtumi\UsefulBundle\Form\DataTransformer; use Symfony\Component\Form\<API key>; use Doctrine\ORM\EntityManager; use Symfony\Component\Form\Exception\<API key>; use Symfony\Component\Form\Exception\<API key>; use Symfony\Component\Form\Exception\FormException; class AjaxFileTransformer implements <API key> { public function transform($data) { } public function reverseTransform($value) { } }
< .SYNOPSIS Sets the version of all components used when building PrtgAPI .DESCRIPTION The Set-PrtgVersion cmdlet updates the version of PrtgAPI. The Set-PrtgVersion cmdlet allows the major, minor, build and revision components to be replaced with any arbitrary version. Typically the Set-PrtgVersion cmdlet is used to revert mistakes made when utilizing the Update-PrtgVersion cmdlet as part of a normal release, or to reset the version when updating the major or minor version components. .PARAMETER Version The version to set PrtgAPI to. Must at least include a major and minor version number. .PARAMETER Legacy Specifies whether to increase the version used when compiling PrtgAPI using the .NET Core SDK or the legacy .NET Framework tooling. .EXAMPLE C:\> Set-PrtgVersion 1.2.3 Set the version to version 1.2.3.0 .EXAMPLE C:\> Set-PrtgVersion 1.2.3.4 Set the version to version 1.2.3.4. Systems that only utilize the first three version components will be versioned as 1.2.3 .LINK Get-PrtgVersion Update-PrtgVersion function Set-PrtgVersion { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0)] [Version]$Version, [ValidateScript({ if($_ -and !(Test-IsWindows)) { throw "Parameter is only supported on Windows." } return $true })] [Parameter(Mandatory = $false)] [switch]$Legacy ) $old = Get-PrtgVersion -Legacy:$Legacy -ErrorAction SilentlyContinue Set-CIVersion $Version -IsCore:(-not $Legacy) -ErrorAction SilentlyContinue $new = Get-PrtgVersion -Legacy:$Legacy -ErrorAction SilentlyContinue $result = [PSCustomObject]@{ Package = $null Assembly = $null File = $null Info = $null Module = $null ModuleTag = $null } if($old.PreviousTag) { $result | Add-Member PreviousTag $null } foreach($property in $old.PSObject.Properties) { $result.($property.Name) = ([PrtgVersionChange]::new($old.($property.Name), $new.($property.Name))) } return $result } class PrtgVersionChange { [string]$Old [string]$New PrtgVersionChange($old, $new) { $this.Old = $old $this.New = $new } [string]ToString() { if($this.Old -eq $this.New) { return $this.Old } return "$($this.Old) -> $($this.New)" } }
<?php include("functions.php"); if(isset($_GET['term'])) { connect_to_db($sql_host, $sql_username, $sql_password, $sql_db_name); $return_arr = array(); $term = <API key>($sql, $_GET['term']); $sqlQuery = mysqli_query($sql, "SELECT name FROM <API key> WHERE name LIKE '%$term%'"); while ($rows = mysqli_fetch_array($sqlQuery)) { $return_arr[] = $rows['name']; } echo json_encode($return_arr); } ?>
// Title=Valid Parentheses #include <stdbool.h> #include <stdio.h> #include <string.h> bool isValid(char* s); int main(void) { printf("%d\n", isValid("")); printf("%d\n", isValid("[")); printf("%d\n", isValid("[[")); printf("%d\n", isValid("]")); printf("%d\n", isValid("]]")); printf("%d\n", isValid("[]")); printf("%d\n", isValid("[[]")); printf("%d\n", isValid("[]]")); printf("%d\n", isValid("[][]")); printf("%d\n", isValid("[[][]")); printf("%d\n", isValid("[][]]")); printf("%d\n", isValid("[]][]")); printf("%d\n", isValid("[][[]")); } bool isValid(char* s) { int len = strlen(s); if (!len) { return true; } char str[len]; strncpy(str, s, len); char* startPos = str; char* endPos = startPos + len - 1; char* rightPos = startPos; while (rightPos <= endPos) { if (*rightPos == ')' || *rightPos == ']' || *rightPos == '}' ) { int clear = 0; char* leftPos = rightPos - 1; while (leftPos >= startPos) { if (*leftPos == ' ') { leftPos continue; } if ((*rightPos == ')' && *leftPos == '(') || (*rightPos == ']' && *leftPos == '[') || (*rightPos == '}' && *leftPos == '{') ) { *rightPos = ' '; *leftPos = ' '; clear = 1; break; } return false; } if (!clear) { return false; } } rightPos++; } rightPos = endPos; while (rightPos >= startPos) { if (*rightPos != ' ') { return false; } rightPos } return true; }
{% load i18n %} {{ <API key> }} <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key={{ google_map_key }}"> </script> <div class="form-group"> <label for="id_name" class="col-sm-3">{% trans "Event Name" %}<br><small><i>{% trans "(Input up to 20 characters)" %}</i></small></label> <div class="col-sm-9"> <input id="id_name" class="form-control" maxlength="20" name="name" type="text" value="{{ event.name }}" required/> </div> </div> <div class="form-group"> <label for="id_start_time" class="col-sm-3">{% trans "Start at:" %}</label> <div class="col-sm-9"> <div class="input-group date datetimepicker start-date"> <input id="id_start_time" class="form-control" name="start_time" type="text" value="{{ event.start_time | date:'Y-m-d H:i' }}" required/> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div> <input id="start_time_blank" value="{{ event.start_time | date:'Y-m-d H:i' }}" type="hidden"> </div> <div class="form-group"> <label for="id_end_time" class="col-sm-3">{% trans "End by:" %}</label> <div class="col-sm-9"> <div class="input-group date datetimepicker end-date"> <input id="id_end_time" class="form-control" name="end_time" type="text" value="{{ event.end_time | date:'Y-m-d H:i' }}" required/> <span class="input-group-addon"> <span class="glyphicon glyphicon-calendar"></span> </span> </div> </div> <input id="end_time_blank" value="{{ event.end_time | date:'Y-m-d H:i' }}" type="hidden"> </div> <div class="form-group"> <label for="id_region" class="col-sm-3">{% trans "Location:" %}</label> <div class="col-sm-9"> <select class="form-control" id="id_region" name="region"> {% for v,pref in user.region_list %} <option value="{{ v }}" {% if v == event.region %}selected{% endif %}>{{ pref }}</option> {% endfor %} </select> </div> </div> <div class="form-group"> <label for="id_meeting_place" class="col-sm-3">{% trans "Meet at:" %}</label> <div class="col-sm-9"> <div class="input-group"> <input id="id_meeting_place" class="form-control" maxlength="400" name="meeting_place" type="text" value="{{ event.meeting_place }}" required/> <span class="input-group-addon input-loc"> <span class="btn btn-link input-loc-btn" onClick="getnow(); return false;"> <span class="fa fa-compass"></span> </span> </span> <span class="input-group-btn"> <button class="btn btn-primary input-loc-btn_2" onClick="getlatlng(); return false;"> {% trans "Search" %} </button> </span> </div> <input id="id_latitude" type="hidden" name="latitude" value="{{event.latitude}}"> <input id="id_longitude" type="hidden" name="longitude" value="{{event.longitude}}" > <p>{% trans "Drag your pin to set to more detailed location" %}</p> <div id="map_canvas" class="center-block"></div> </div> </div> <script type="text/javascript"> // XXX: dup: gmap // XXX: global variables var gmap; var geocoder; var marker; function initialize(){ var lat = parseFloat($('#id_latitude').val()); var lng = parseFloat($('#id_longitude').val()); if (isNaN(lat) || isNaN(lng)) { lat = 35.7291213; lng = 139.7191322; } var latlng = new google.maps.LatLng(lat, lng); var opts = { zoom: 15, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; gmap = new google.maps.Map(document.getElementById("map_canvas"), opts); gmap.setCenter(latlng); setPin(latlng); geocoder = new google.maps.Geocoder(); } function getnow() { navigator.geolocation.getCurrentPosition(function(position) { var now = new google.maps.LatLng( position.coords.latitude, position.coords.longitude ); gmap.setCenter(now); $('#id_meeting_place').val(position.formatted_address); setPin(now); geocoder.geocode({location: now}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { $('#id_meeting_place').val(results[0].formatted_address); } }); }, function() { alert('{% trans "Failed to get location" %}'); }); } function getlatlng() { var address = document.getElementById("id_meeting_place").value; geocoder.geocode({address: address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { gmap.setCenter(results[0].geometry.location); setPin(results[0].geometry.location); } else { alert('{% trans "Failed to get latitude and longitude" %}'); } }); } function setPin(pos) { $(('#id_latitude')).val(pos.lat()); $(('#id_longitude')).val(pos.lng()); if (!marker) { marker = new google.maps.Marker({ map: gmap, draggable: true }); marker.addListener('dragend', function () { $(('#id_latitude')).val(marker.position.lat()); $(('#id_longitude')).val(marker.position.lng()); geocoder.geocode({location: marker.position}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { $('#id_meeting_place').val(results[0].formatted_address); gmap.setCenter(results[0].geometry.location); } else { alert('{% trans "Failed to get latitude and longitude" %}'); } }); }) } marker.setPosition(pos); } $(function () { initialize(); }); </script> <div class="form-group"> <label for="id_image" class="col-sm-3">{% trans "Event image" %}</label> <div class="col-sm-9"> {% if event.image %} <p>{% trans "Image:" %}</p> <div class="custom_thumbnail <API key>" style="background-image: url({{event.get_image_url}});"></div> <input id="id_image_url" type="hidden" name="image_url" value="{{ event.get_image_url }}"> <p>{% trans "Change image to:" %}</p> {% endif %} <input class="filestyle" id="id_image" name="image" type="file" data-buttonName="btn-primary" data-buttonText="{% trans 'Browse...' %}" /> </div> </div> <div class="form-group"> <label for="id_contact" class="col-sm-3">{% trans "Organizer's contact information" %}</label> <div class="col-sm-9"> {% if event.contact != null %} <input id="id_contact" class="form-control" maxlength="200" name="contact" type="text" value="{{ event.contact }}" required/> {% else %} <input id="id_contact" class="form-control" maxlength="200" name="contact" type="text" value="{{ user.email }}" required/> {% endif %} </div> </div> <div class="form-group"> <label for="id_details" class="col-sm-3">{% trans "Details:" %}</label> <div class="col-sm-9"> <textarea cols="40" id="id_details" class="form-control" name="details" rows="10" required>{{ event.details }}</textarea> </div> </div> <div class="form-group"> <label for="id_notes" class="col-sm-3">{% trans "Informations:" %}<br> {% trans "(shown to anyone)" %}</label> <div class="col-sm-9"> <textarea cols="40" id="id_notes" class="form-control" name="notes" rows="10" placeholder="{% trans 'e.g.)a rough quota' %}">{{ event.notes }}</textarea> </div> </div> <div class="form-group"> <label for="id_notes" class="col-sm-3">{% trans "Informations:" %}<br>{% trans "(shown only to applicants)" %}</label> <div class="col-sm-9"> <textarea cols="40" id="id_private_notes" class="form-control" name="private_notes" rows="10">{{ event.private_notes }}</textarea> </div> </div> <div class="form-group"> <label class="col-sm-3">{% trans "Organizer:" %}</label> <div class="col-sm-9"> <div id="admins"> {% for admin in event.admin.all %} <label> <div class="checkbox"><span><input name="admins" type="checkbox" value="{{ admin.username }}" checked>{{ admin.username }}</span></div> </label> {% endfor %} </div> <div class="input-group" id="adder"> <input class="form-control" type="text" id="admin_name" placeholder="{% trans 'Nickname' %}"> <span class="input-group-btn"> <button class="btn btn-primary" id="add_admin" type="button"> <span class="glyphicon glyphicon-plus"></span> </button> </span> </div> <script type="text/javascript"> (function () { var admins = document.querySelector("#admins"); var admin_name = document.querySelector('#admin_name'); var add_admin = document.querySelector('#add_admin'); add_admin.addEventListener('click', function (e) { if (admin_name.value === "") { return; } var label = document.createElement('label'); var value = admin_name.value; // FIXME: Possible XSS vulnerability label.innerHTML = "<div class='checkbox'><span><input name='admins' type='checkbox' value=" + value + " checked>" + value + "<\/span><\/div>"; admin_name.value = ""; admins.appendChild(label); }); admin_name.addEventListener('keypress', function (e) { if (e.keyCode === 13) { e.preventDefault(); add_admin.click(); } return false; }); })(); </script> </div> </div> <div class="form-group"> <label class="col-sm-3">{% trans "Position" %}</label> <div class="col-sm-9"> <div id="frames"> {% for frame in event.frame_set.all %} <div class="panel panel-default panel-body" style="margin:0"> <div class="row"> <input type="hidden" name="frame_number" value="{{ forloop.counter }}"> {% if not request.GET.copy_event_id %} <input type="hidden" name="frame_{{ forloop.counter }}_id" value="{{ frame.id }}"> {% endif %} <label class="col-sm-3">{% trans "Job Description:" %}</label> <div class="col-sm-9"> <textarea class="form-control" name="frame_{{ forloop.counter }}_description">{{ frame.description }}</textarea> </div> <label class="col-sm-3">{% trans "up to:" %}</label> <div class="col-sm-9"> <input class="form-control" type="number" min="1" max="2147483647" step="1" name="frame_{{ forloop.counter }}_upperlimit" value="{{ frame.upper_limit|default_if_none:'' }}"> </div> <label class="col-sm-3">{% trans "Deadline:" %}</label> <div class='col-sm-9'> <input class="form-control datetimepicker" name="frame_{{ forloop.counter }}_deadline" type="text" value="{{ frame.deadline }}"> </div> </div> </div> {% empty %} <div class="panel panel-default panel-body" style="margin:0"> <div class="row"> <input type="hidden" name="frame_number" value="1"> <!--<input type="hidden" name="frame_1_id" value="{{ frame.id }}">--> <label class="col-sm-3">{% trans 'Job Description' %}<sup><font color="red"></font></sup></label> <div class="col-sm-9"> <textarea class="form-control" name="frame_1_description"></textarea> </div> <label class="col-sm-3">{% trans 'up to' %}</label> <div class="col-sm-9"> <input class="form-control" type="number" min="0" step="1" max="2147483647" name="frame_1_upperlimit" placeholder="{% trans 'optional' %}"> </div> <label class="col-sm-3">{% trans 'Deadline' %}</label> <div class='col-sm-9'> <input class="form-control datetimepicker deadend" name="frame_1_deadline" type="text" placeholder="{% trans 'optional' %}"> </div> </div> </div> {% endfor %} </div> <button class="btn btn-primary pull-right" id="add_frame" type="button"> <span class="glyphicon glyphicon-plus"></span> </button> <script type="text/javascript"> $(function () { $('#add_frame').on('click', function (event) { var X = $('#frames>div').length + 1; var tmpl = $('#tmpl-frame').html(); $wrapper = $('<div>'); $wrapper.html(Mustache.to_html(tmpl, {X: X})); $('#frames').append($wrapper); }); }); </script> <button class="btn btn-primary pull-right" id="delete_frame" type="button"> <span class="glyphicon glyphicon-minus"></span> </button> <script type="text/javascript"> $('#delete_frame').click(function() { $wrapper = $('<div>'); $('#frames div.panel:last').remove(); }); </script> </div> </div> <script id="tmpl-frame" type="text/template"> <div class="panel panel-default panel-body" style="margin:0" id="frame_number_[[ X ]]"> <div class="row"> <input type="hidden" name="frame_number" value="[[ X ]]"> <label class="col-sm-3">{% trans 'Job Description' %}<sup><font color="red"></font></sup></label> <div class="col-sm-9"> <textarea class="form-control" name="frame_[[ X ]]_description"></textarea> </div> <label class="col-sm-3">{% trans 'up to' %}</label> <div class="col-sm-9"> <input class="form-control" type="number" min="0" max="2147483647" step="1" name="frame_[[ X ]]_upperlimit" placeholder="{% trans 'optional' %}"> </div> <label class="col-sm-3">{% trans 'Deadline' %}</label> <div class="col-sm-9"> <input class="form-control datetimepicker deadend" name="frame_[[ X ]]_deadline" type="text" placeholder="{% trans 'optional' %}"> <script type="text/javascript"> (function () { // FIXME: Variable interpolation with jQuery() $("#frame_number_[[ X ]] .datetimepicker").datetimepicker({ locale: moment.locale("ja"), format: "YYYY-MM-DD HH:mm", sideBySide:true, minDate: moment(), stepping: 15 }); })(); <[[!]]/script> </div> </div> </div> </script> <div class="form-group"> <label class="col-sm-3">{% trans "Related to:" %}</label> <div class="checkbox col-sm-9"> {% for tag in all_tags %} <label><input type="checkbox" name="tags" value="{{ tag.id }}" {% if tag in event.tag.all %}checked{% endif %}>{{ tag.name }}</label> {% endfor %} </div> </div> <style> #tags label { display: block; } #admins label { display: block; } #groups label { display: block; } </style> <!--datetimepicker <script type="text/javascript"> (function (global) { var $ = global.jQuery; var moment = global.moment; var fmt = 'YYYY-MM-DD HH:mm'; var jq_start = $('#id_start_time'); var jq_end = $('#id_end_time'); var jq_frames = $('#frames'); var start = function () { return jq_start.val(); }; var end = function () { return jq_end.val(); }; var start_blank = $('#start_time_blank').val(); var end_blank = $('#end_time_blank').val(); $(function () { $('.start-date').datetimepicker({ locale: moment.locale('ja'), format: fmt, sideBySide: true, minDate: moment(), stepping: 15, defaultDate: moment().add(1, 'days').hours(8).minutes(0) }); $('.end-date').datetimepicker({ locale: moment.locale('ja'), format: fmt, sideBySide: true, minDate: moment(), stepping: 15, defaultDate: moment().add(1, 'days').hours(17).minutes(0) }); $('.datetimepicker').datetimepicker({ locale: moment.locale('ja'), format: fmt, sideBySide: true, minDate: moment(), stepping: 15 }); if(start_blank){ jq_start.val(start_blank); jq_end.val(end_blank); } }); var overwrap = function (s_start, s_end) { if (s_start.length === 0) { return true; } if (s_end.length === 0) { return true; } var m_start = moment(s_start, fmt); var m_end = moment(s_end, fmt); return m_start.diff(m_end) > 0; }; $.fn.extend({ reduce: function (cb, init) { this.each(function (i) { if (i === 0 && typeof init === 'undefined') { init = $(this); } else { init = cb.call($(this), init); } }); return init; } }); var deadend = function () { return jq_frames.find('.deadend') .reduce(function (e) { // minimum date return overwrap(this.val(), e.val()) ? e : this; }) .val(); }; $(function () { jq_frames.on('dp.change', '.deadend', function () { var de = deadend(); if (overwrap(de, start())) { jq_start.val(de); } if (overwrap(de, end())) { jq_end.val(de); } return true; }) jq_start.closest('.datetimepicker').on('dp.change', function () { var st = start(); if (overwrap(st, end())) { jq_end.val(st); } jq_frames.find('.deadend').each(function () { var self = $(this); if (overwrap(self.val(), st)) { self.val(st); } return true; }); return true; }); jq_end.closest('.datetimepicker').on('dp.change', function () { var en = end(); if (overwrap(start(), en)) { jq_start.val(en); } jq_frames.find('.deadend').each(function () { var self = $(this); if (overwrap(self.val(), en)) { self.val(en); } return true; }); return true; }); }); })(this); </script>
'use strict' const React = require('react') function markIt (input, query) { const escaped = query.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&') const regex = RegExp(escaped, 'gi') return { __html: input.replace(regex, '<mark>$&</mark>') } } function filterSuggestions (query, suggestions, length) { const regex = new RegExp(`\\b${query}`, 'i') return suggestions.filter((item) => regex.test(item.name)).slice(0, length) } class Suggestions extends React.Component { constructor (props) { super(props) this.state = { options: filterSuggestions(this.props.query, this.props.suggestions, this.props.<API key>) } } <API key> (newProps) { this.setState({ options: filterSuggestions(newProps.query, newProps.suggestions, newProps.<API key>) }) } render () { if (!this.props.expandable || !this.state.options.length) { return null } const options = this.state.options.map((item, i) => { const key = `${this.props.listboxId}-${i}` const classNames = [] if (this.props.selectedIndex === i) { classNames.push(this.props.classNames.suggestionActive) } if (item.disabled) { classNames.push(this.props.classNames.suggestionDisabled) } return ( <li id={key} key={key} role='option' className={classNames.join(' ')} aria-disabled={item.disabled === true} onMouseDown={() => this.props.addTag(item)}> <span <API key>={markIt(item.name, this.props.query)} /> </li> ) }) return ( <div className={this.props.classNames.suggestions}> <ul role='listbox' id={this.props.listboxId}>{options}</ul> </div> ) } } module.exports = Suggestions
package com.xeiam.xchange.coinbase.dto.merchant; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import com.xeiam.xchange.coinbase.dto.CoinbasePagedResult; /** * @author jamespedwards42 */ public class <API key> extends CoinbasePagedResult { private final List<<API key>> subscriptions; private <API key>(@JsonProperty("recurring_payments") final List<<API key>> subscriptions, @JsonProperty("total_count") final int totalCount, @JsonProperty("num_pages") final int numPages, @JsonProperty("current_page") final int currentPage) { super(totalCount, numPages, currentPage); this.subscriptions = subscriptions; } public List<<API key>> getSubscriptions() { return subscriptions; } @Override public String toString() { return "<API key> [subscriptions=" + subscriptions + "]"; } }
import datetime from typing import Optional, TypedDict from backend.common.sitevars.sitevar import Sitevar class WebConfig(TypedDict): travis_job: str <API key>: str current_commit: str deploy_time: str endpoints_sha: str commit_time: str class AndroidConfig(TypedDict): min_app_version: int latest_app_version: int class IOSConfig(TypedDict): min_app_version: int latest_app_version: int class ContentType(TypedDict): current_season: int max_season: int web: Optional[WebConfig] android: Optional[AndroidConfig] ios: Optional[IOSConfig] class ApiStatus(Sitevar[ContentType]): @staticmethod def key() -> str: return "apistatus" @staticmethod def description() -> str: return "For setting max year, min app versions, etc." @staticmethod def default_value() -> ContentType: current_year = datetime.datetime.now().year return ContentType( current_season=current_year, max_season=current_year, web=None, android=None, ios=None, ) @classmethod def status(cls) -> ContentType: return cls.get()
import test from 'tapes'; import Shapedom, { Variable, Template } from '../../dist/shapedom'; test('shapedom.createTemplate with element shape', function (t) { let shapedom; t.beforeEach(function (t) { shapedom = new Shapedom(document); t.end(); }); t.test('without children', function (t) { const result = shapedom.createTemplate({ tag: 'div', attrs: { id: 'someId', class: 'someClass anotherClass' } }); t.assert(result instanceof Template); t.end(); }); t.test('with children', function (t) { const <API key> = shapedom.createTemplate({ tag: 'div', attrs: { id: 'someId' } }); const result = shapedom.createTemplate({ tag: 'div', attrs: { id: 'someId', class: 'someClass anotherClass' }, children: [ 'header', { tag: 'span', attrs: { class: 'content' } }, <API key>, new Variable('footer') ] }); t.assert(result instanceof Template); t.end(); }); t.end(); });
class CCBDocument(): fileName = "" exportPath = "" exportPlugIn = "" exportFlattenPaths = False docData = {} lastEditedProperty = "" isDirty = False stageScrollOffset = (0,0) stageZoom = 1 resolutions = [] currentResolution = 0 sequences = [] currentSequenceId = 0
describe("extend", function() { var extend = p.extend it("should assign the source object's properties to the target", function() { var target = {} extend(target, { foo: 3, bar: 23 }) target.foo.should.equal(3) target.bar.should.equal(23) }) })
# Ambari Server Configuration ## General Options * `db_hive.database` (string) Name of the database storing the Hive database. * `db_hive.enabled` (boolean) Prepare the Hive database. * `db_hive.engine` (boolean) Type of database; one of "mariadb", "mysql" or "postgresql". * `db_hive.password` (boolean) Password associated with the database administrator user. * `db_hive.username` (boolean) Hive database administrator user. ## LDAP options * `ldap.ldap-url` (string) Primary URL for LDAP (must not be used together with `ldap-primary-host` and `ldap-primary-port`) * `ldap.ldap-primary-host` (string) Primary Host for LDAP (must not be used together with --ldap-url) * `ldap.ldap-primary-port` (string|number) Primary Port for LDAP (must not be used together with --ldap-url) * `ldap.ldap-secondary-url` (string) Secondary URL for LDAP (must not be used together with --ldap-secondary-host and --ldap-secondary-port) * `ldap.ldap-secondary-host` (string) Secondary Host for LDAP (must not be used together with --ldap-secondary-url) * `ldap.ldap-secondary-port` (string|number) Secondary Port for LDAP (must not be used together with --ldap-secondary-url) * `ldap.ldap-ssl` (boolean|string) Use SSL [true/false] for LDAP * `ldap.ldap-type` (string) Specify ldap type [AD/IPA/Generic] for offering defaults for missing options. * `ldap.ldap-user-class` (string) User Attribute Object Class for LDAP * `ldap.ldap-user-attr` (string) User Attribute Name for LDAP * `ldap.ldap-group-class` (string) Group Attribute Object Class for LDAP * `ldap.ldap-group-attr` (string) Group Attribute Name for LDAP * `ldap.ldap-member-attr` (string) Group Membership Attribute Name for LDAP * `ldap.ldap-dn` (string) Distinguished name attribute for LDAP * `ldap.ldap-base-dn` (string) Base DN for LDAP * `ldap.ldap-manager-dn` (string) Manager DN for LDAP * `ldap.<API key>` (string) Manager Password For LDAP * `ldap.ldap-save-settings` (boolean|string) Save without review for LDAP * `ldap.ldap-referral` (string) Referral method [follow/ignore] for LDAP * `ldap.ldap-bind-anonym` (string) Bind anonymously [true/false] for LDAP * `ldap.<API key>` (string) Handling behavior for username collisions [convert/skip] for LDAP sync * `ldap.<API key>` (string) Determines whether to disable endpoint identification (hostname verification) during SSL handshake for LDAP sync. This option takes effect only if --ldap-ssl is set to 'true' * `ldap.<API key>` (string) Declares whether to force the ldap user name to be lowercase or leave as-is * `ldap.<API key>` (string) Determines whether results from LDAP are paginated when requested * `ldap.ldap-force-setup` (boolean|string) Forces the use of LDAP even if other (i.e. PAM) authentication method is configured already or if there is no authentication method configured at all * `ldap.<API key>` (string) Ambari administrator username for accessing Ambari's REST API * `ldap.<API key>` (string) Ambari administrator password for accessing Ambari's REST API * `ldap.truststore-type` (string) Type of TrustStore (jks|jceks|pkcs12) * `ldap.truststore-path` (string) Path of TrustStore * `ldap.truststore-password` (string) Password for TrustStore * `ldap.<API key>` (string) Force to reconfigure TrustStore if exits ## Minimal Example yaml config: admin_password: MySecret db: password: MySecret ## Database Encryption yaml config: master_key: MySecret ## Enable sudoer yaml config: ambari-server.user: ambari ## LDAP Connection yaml config: client.security: ldap authentication.ldap.useSSL: true, authentication.ldap.primaryUrl: master3.ryba:636 authentication.ldap.baseDn: ou=users,dc=ryba authentication.ldap.bindAnonymously: false, authentication.ldap.managerDn: cn=admin,ou=users,dc=ryba authentication.ldap.managerPassword: XXX authentication.ldap.usernameAttribute: cn module.exports = ({deps, node, options}) -> ## Environment options.fqdn = node.fqdn # options.http ?= '/var/www/html' options.conf_dir ?= '/etc/ambari-server/conf' options.iptables ?= deps.iptables and deps.iptables.options.action is 'start' options.java_home ?= deps.java and deps.java.options.java_home options.master_key ?= null options.admin ?= {} options.<API key> ?= 'admin' throw Error "Required Option: admin_password" unless options.admin_password ## Identities Note, there are no identities created by the Ambari package. Identities are only used in case the server and its agents run as sudoers. The non-root user you choose to run the Ambari Server should be part of the Hadoop group. The default group name is "hadoop". # Hadoop Group options.hadoop_group ?= deps.hadoop_core.options.hadoop_group if deps.hadoop_core options.hadoop_group = name: options.group if typeof options.group is 'string' options.hadoop_group ?= {} options.hadoop_group.name ?= 'hadoop' options.hadoop_group.system ?= true options.hadoop_group.comment ?= 'Hadoop Group' # Group options.group = name: options.group if typeof options.group is 'string' options.group ?= {} options.group.name ?= 'ambari' options.group.system ?= true # User options.user = name: options.user if typeof options.user is 'string' options.user ?= {} options.user.name ?= 'ambari' options.user.system ?= true options.user.comment ?= 'Ambari User' options.user.home ?= "/var/lib/#{options.user.name}" options.user.groups ?= ['hadoop'] options.user.gid = options.group.name # test User options.test_group = name: options.test_group if typeof options.test_group is 'string' options.test_group ?= {} options.test_group.name ?= 'ambari-qa' options.test_group.system ?= true options.test_user = name: options.test_user if typeof options.v is 'string' options.test_user ?= {} options.test_user.name ?= 'ambari-qa' options.test_user.system ?= true options.test_user.comment ?= 'Ambari Test User' options.test_user.home ?= "/var/lib/#{options.test_user.name}" options.test_user.groups ?= ['hadoop'] options.test_user.gid = options.test_group.name # test User # options.explorer_group = name: options.explorer_group if typeof options.explorer_group is 'string' # options.explorer_group ?= {} # options.explorer_group.name ?= 'activity_explorer' # options.explorer_group.system ?= true # options.explorer_user = name: options.explorer_user if typeof options.v is 'string' # options.explorer_user ?= {} # options.explorer_user.name ?= 'activity_explorer' # options.explorer_user.system ?= true # options.explorer_user.comment ?= 'Ambari Activity Explorer User' # options.explorer_user.home ?= "/var/lib/#{options.explorer_user.name}" # options.explorer_user.groups ?= ['hadoop'] # options.explorer_user.gid = options.explorer_group.name # test User # options.analyzer_group = name: options.analyzer_group if typeof options.analyzer_group is 'string' # options.analyzer_group ?= {} # options.analyzer_group.name ?= 'activity_analyzer' # options.analyzer_group.system ?= true # options.analyzer_user = name: options.analyzer_user if typeof options.v is 'string' # options.analyzer_user ?= {} # options.analyzer_user.name ?= 'activity_analyzer' # options.analyzer_user.system ?= true # options.analyzer_user.comment ?= 'Ambari Activity Analyzer User' # options.analyzer_user.home ?= "/var/lib/#{options.analyzer_user.name}" # options.analyzer_user.groups ?= ['hadoop'] # options.analyzer_user.gid = options.analyzer_group.name ## Ambari TLS and Truststore options.ssl = merge deps.ssl?.options, options.ssl options.ssl.enabled ?= !!deps.ssl options.truststore ?= {} if options.ssl.enabled throw Error "Required Option: ssl.cert" if not options.ssl.cert throw Error "Required Option: ssl.key" if not options.ssl.key throw Error "Required Option: ssl.cacert" if not options.ssl.cacert options.truststore.target ?= "#{options.conf_dir}/truststore" throw Error "Required Property: truststore.password" if not options.truststore.password options.truststore.caname ?= 'hadoop_root_ca' options.truststore.type ?= 'jks' throw Error "Invalid Truststore Type: #{truststore.type}" unless options.truststore.type in ['jks', 'jceks', 'pkcs12'] ## JAAS Multiple ambari instance on a same server involve a different principal or the principal must point to the same keytab. `auth=KERBEROS;proxyuser=ambari` # Krb5 Import options.krb5 ?= {} # Krb5 Client adapter if deps.krb5_client options.krb5.realm ?= deps.krb5_client.options.etc_krb5_conf?.libdefaults?.default_realm options.krb5.admin ?= deps.krb5_client.options.admin[options.krb5.realm] if options.krb5.enabled throw Error 'Required Options: "realm"' unless options.krb5.realm # Krb5 Validation throw Error "Require Property: krb5.admin.kadmin_principal" unless options.krb5.admin.kadmin_principal throw Error "Require Property: krb5.admin.kadmin_password" unless options.krb5.admin.kadmin_password throw Error "Require Property: krb5.admin.admin_server" unless options.krb5.admin.admin_server # JAAS options.jaas ?= {} options.jaas.enabled ?= options.krb5.enabled options.jaas.keytab ?= '/etc/security/keytabs/ambari.service.keytab' if options.jaas.enabled throw Error 'jaas.enabled required krb5.enabled' unless options.krb5.enabled options.jaas.principal ?= "ambari/_HOST@#{options.krb5.realm}" options.jaas.principal = options.jaas.principal.replace '_HOST', node.fqdn # options.analyzer_user.principal ?= "#{options.analyzer_user.name}/_HOST@#{options.krb5.realm}" # options.analyzer_user.keytab ?= "/etc/security/keytabs/activity-analyzer.headless.keytab" # options.explorer_user.principal ?= "#{options.explorer_user.name}/_HOST@#{options.krb5.realm}" # options.explorer_user.keytab ?= "/etc/security/keytabs/activity-explorer.headless.keytab" ## Configuration options.config ?= {} options.config['ambari-server.user'] ?= 'root' options.config['server.url_port'] ?= "8440" options.config['server.secured_url_port'] ?= "8441" options.config['api.ssl'] ?= if options.ssl.enabled then 'true' else 'false' options.config['client.api.port'] ?= "8080" # Be Carefull, collision in HDP 2.5.3 on port 8443 between Ambari and Knox options.config['client.api.ssl.port'] ?= "8442" ## MPack A management pack (MPack) bundles service definitions, stack definitions, and stack add- on service definitions so they do not need to be included with the Ambari core functionality and can be updated in between major releases. The only MPack file to be registered in the configuration is the one for HDF. It is desactivated by default. options.mpacks ?= {} options.mpacks.hdf = merge enabled: false arch: 'centos' version: '7' source: 'https://public-repo-1.hortonworks.com/HDF/centos7/2.x/updates/2.1.3.0/tars/hdf_ambari_mp/hdf-ambari-mpack-2.1.3.0-6.tar.gz' , options.mpacks.hdf or {} ## Database Ambari DB password is stash into "/etc/ambari-server/conf/password.dat". options.<API key> ?= ['mysql', 'mariadb', 'postgresql'] options.db ?= {} options.db.engine ?= deps.db_admin.options.engine Error "Unsupported Database Engine: got #{options.db.engine}" unless options.db.engine in options.<API key> options.db = merge deps.db_admin.options[options.db.engine], options.db options.db.database ?= 'ambari' options.db.username ?= 'ambari' options.db.jdbc += "/#{options.db.database}?<API key>=true" throw Error "Required Option: db.password" unless options.db?.password ## Hive provisionning options.db_hive ?= {} options.db_hive.enabled ?= false if options.db_hive.enabled options.db_hive.engine ?= options.db.engine options.db_hive = merge deps.db_admin.options[options.db_hive.engine], options.db_hive options.db_hive.database ?= 'hive' options.db_hive.username ?= 'hive' throw Error "Required Option: db_hive.password" unless options.db_hive.password ## Oozie provisionning options.db_oozie ?= {} options.db_oozie.enabled ?= false if options.db_oozie.enabled options.db_oozie.engine ?= options.db.engine options.db_oozie = merge deps.db_admin.options[options.db_oozie.engine], options.db_oozie options.db_oozie.database ?= 'oozie' options.db_oozie.username ?= 'oozie' throw Error "Required Option: db_oozie.password" unless options.db_oozie.password ## Ranger provisionning options.db_ranger ?= {} options.db_ranger.enabled ?= false if options.db_ranger.enabled options.db_ranger.engine ?= options.db.engine options.db_ranger = merge deps.db_admin.options[options.db_ranger.engine], options.db_ranger options.db_ranger.database ?= 'ranger' options.db_ranger.username ?= 'ranger' throw Error "Required Option: db_ranger.password" unless options.db_ranger.password ## Ranger provisionning options.db_rangerkms ?= {} options.db_rangerkms.enabled ?= false if options.db_rangerkms.enabled options.db_rangerkms.engine ?= options.db.engine options.db_rangerkms = merge deps.db_admin.options[options.db_rangerkms.engine], options.db_rangerkms options.db_rangerkms.database ?= 'rangerkms' options.db_rangerkms.username ?= 'rangerkms' throw Error "Required Option: db_rangerkms.password" unless options.db_rangerkms.password ## Setup LDAP options.ldap ?= {} options.ldap.enabled ?= false options.ldap['ldap-ssl'] ?= false options.ldap['ldap-ssl'] = switch options.ldap['ldap-ssl'] when 'true', true then true when 'false', false then true else throw Error "Invalid Option: ldap.ldap-ssl must be true or false, got #{options.ldap['ldap-ssl']}" options.ldap['ldap-type'] ?= 'Generic' throw Error "Invalid Option: ldap.ldap-type must be one of AD, IPA or Generic, got #{options.ldap['ldap-type']}" unless options.ldap['ldap-type'] in ['AD', 'IPA', 'Generic'] options.ldap['ldap-save-settings'] ?= false options.ldap['ldap-save-settings'] = switch options.ldap['ldap-save-settings'] when 'true', true then true when 'false', false then true else throw Error "Invalid Option: ldap.ldap-save-settings must be true or false, got #{options.ldap['ldap-save-settings']}" options.ldap['ldap-force-setup'] ?= false options.ldap['ldap-force-setup'] = switch options.ldap['ldap-force-setup'] when 'true', true then true when 'false', false then true else throw Error "Invalid Option: ldap.ldap-force-setup must be true or false, got #{options.ldap['ldap-force-setup']}" ## Client Rest API Url options.ambari_url ?= if options.config['api.ssl'] is 'false' then "http://#{node.fqdn}:#{options.config['client.api.port']}" else "https://#{node.fqdn}:#{options.config['client.api.ssl.port']}" options.<API key> ?= options.admin_password #options.cluster_name ?= options.cluster_name ## Wait options.wait_db_admin = deps.db_admin.options.wait options.wait = {} options.wait.rest = for srv in deps.ambari_server clusters_url: url.format protocol: if srv.options.config['api.ssl'] is 'true' then 'https' else 'http' hostname: srv.options.fqdn port: if srv.options.config['api.ssl'] is 'true' then srv.options.config['client.api.ssl.port'] else srv.options.config['client.api.port'] pathname: '/api/v1/clusters' oldcred: "admin:#{srv.options.<API key>}" newcred: "admin:#{srv.options.admin_password}" ## Dependencies url = require 'url' {merge} = require 'mixme'
<div class="commune_descr limited"> <p> Montgreleix est un village géographiquement positionné dans le département de Cantal en Auvergne. On dénombrait 56 habitants en 2008.</p> <p>Le parc de logements, à Montgreleix, était réparti en 2011 en huit appartements et 77 maisons soit un marché relativement équilibré.</p> <p>À proximité de Montgreleix sont localisées les villes de <a href="{{VLROOT}}/immobilier/lugarde_15110/">Lugarde</a> à 10&nbsp;km, 162 habitants, <a href="{{VLROOT}}/immobilier/condat_15054/">Condat</a> à 8&nbsp;km, 1&nbsp;025 habitants, <a href="{{VLROOT}}/immobilier/espinchal_63153/">Espinchal</a> située à 5&nbsp;km, 106 habitants, <a href="{{VLROOT}}/immobilier/pradiers_15155/">Pradiers</a> à 9&nbsp;km, 115 habitants, <a href="{{VLROOT}}/immobilier/godivelle_63169/">La&nbsp;Godivelle</a> située à 6&nbsp;km, 22 habitants, <a href="{{VLROOT}}/immobilier/<API key>/">Égliseneuve-d'Entraigues</a> localisée à 7&nbsp;km, 488 habitants, entre autres. De plus, Montgreleix est située à seulement 29&nbsp;km de <a href="{{VLROOT}}/immobilier/<API key>/">Bort-les-Orgues</a>.</p> <p>La ville compte quelques aménagements, elle dispose, entre autres, de deux boucles de randonnée.</p> <p>Si vous pensez demenager à Montgreleix, vous pourrez facilement trouver une maison à acheter. </p> </div>
# Dropcaster - Simple Podcast Publishing [![Build Status](https: _This project is developed with the [readme-driven development](http://tom.preston-werner.com/2010/08/23/<API key>.html) method. This file describes the functionality that is actually implemented, whereas the [vision](VISION.markdown) reflects where the tool should go._ [Dropcaster](http://nerab.github.io/dropcaster/) is a podcast feed generator for the command line. It works with any (static file) web hoster. Author: Nicolas E. Rabenau <nerab@gmx.at> # What is the problem that Dropcaster is trying to solve? You have a number of podcast episodes that you would like to publish as a feed. Nothing else - no fancy website, no stats, nothing but the pure podcast. With Dropcaster, you simply put the mp3 files into the `public_html` folder of your web host. Then run `dropcaster` - it generates the feed and writes it to a file, e.g. `index.rss`. You can then take the RSS file's URL and publish it as the feed URL. The feed URL can be consumed by any podcatcher, e.g. [iTunes](http: # Installation ## As a Ruby Gem command $ gem install dropcaster $ dropcaster --help `libxml-ruby` is a frequent offender with installation problems. As usual, [Stack Overflow](https://stackoverflow.com/questions/38129330/<API key>#<API key>) has the answer (at least for macOS with Homebrew): command $ gem install --no-document libxml-ruby -- --with-xml2-config="$(brew --prefix libxml2)/bin/xml2-config" ## Docker If you prefer Docker over a local installation, use command $ docker run -it --rm nerab/dropcaster dropcaster --help The container will need access to the mp3 files on your workstation [with a bind mount](https://docs.docker.com/storage/bind-mounts/). For instance, running `dropcaster` with the [test fixtures](test/fixtures) will look like this: command $ docker \ run \ -it \ --rm \ --mount type=bind,source="$(pwd)"/test/fixtures,target=/public_html \ nerab/dropcaster Replace `"$(pwd)"/test/fixtures` with your own folder of mp3s, and you can run the command above without even installing Ruby. # Basic Usage Once Dropcaster is installed, the only two other things you will need are a channel definition and one or more mp3 files to publish. Let's start with the channel definition. It is a simple [YAML](http://yaml.org/) file that holds the general information about your podcast channel. According to the [RSS 2.0 spec](http://blogs.law.harvard.edu/tech/rss#<API key>), the only mandatory information that your channel absolutely needs are a title, a description and a link to a web site where the channel belongs to. The simplest channel file looks like this: yaml :title: 'All About Everything' :description: 'A show about everything' :url: 'http: Store this file as channel.yml in the same directory where the mp3 files of your podcast reside. The channel definition is expected to be present in the same directory as your mp3 files, but this can be overridden using a command line switch. You can find a [more elaborate example](http://github.com/nerab/dropcaster/blob/master/doc/sample-channel.yml) for the channel definition in the doc folder of the Dropcaster gem. You can find it by running `gem open dropcaster`. Now that we have the podcast channel defined, we need at least one episode (an audio file) in it. From Dropcaster's perspective, it does not matter how the episode was produced, but the critical information is the meta data in the mp3 file, because that is the authoritative source for the episode information. Almost all audio editors can write metadata, usually called ID3 tags. Dropcaster reads these tags from the mp3 files and fills the item element in the feed (that's how an episode is defined, technically) from it. With all required pieces in place, we could generate the podcast feed. Just before we do that, we will inspect the feed by running the following commands: command $ cd ~/public_html $ dropcaster (The above lines assume that `public_html` is the web server's document root, and that there is at least one mp3 file in `public_html`). Dropcaster will print the feed to standard-out, without writing it to disk. When you are happy with the results, call Dropcaster again, but redirect the output to a file, this time: command $ dropcaster > index.rss If all went well, you will now have a valid podcast feed in `public_html`, listing all mp3 files as podcast episodes. Please see the section [Publish Your Feed](#publish-your-feed) for details on how to find the public URL of your feed. # Use Cases ## Publish a New Episode 1. Drop the mp3 file into the `public_html` folder, and then run the following command in that directory: command $ dropcaster > index.rss 1. Sync the updated index.rss file to the public web server, and any podcast client will download the new episode as soon as it has loaded the updated index.rss. ## Delete an Episode 1. Remove the mp3 you want to delete from the `public_html` folder, and then run the following command in the directory where the remaining mp3 files reside: command $ dropcaster > index.rss 1. Sync the updated index.rss file to the public web server. Podcast clients will no longer download the removed episode. ## Replace an Episode With an Updated File 1. In the `public_html` folder, replace the mp3 you want to update with a new version, and then run the following command in the directory where the mp3 files reside: command $ dropcaster > index.rss 1. Sync the updated index.rss file to the public web server. Podcast clients detect the change and download the updated episode. ## Generate a Podcast Feed for a Subset of the Available MP3 Files Dropcaster accepts any number of files or directories as episodes. For directories, all files ending in .mp3 will be included. For advanced filtering, you can use regular shell patterns to further specify which files will be included. These patterns will be resolved by the shell itself (e.g. bash), and not by Dropcaster. For example, in order to generate a feed that only publishes MP3 files where the name starts with 'A', call Dropcaster like this: command $ dropcaster A*.mp3 > index.rss ## Publish More than One Feed command $ dropcaster project1 > project1.rss $ dropcaster project2 > project2.rss or command $ cd project1 $ dropcaster > index.rss $ cd ../project2 $ dropcaster > index.rss ## Include Episodes From Two Subdirectories Into a Single Feed command $ dropcaster project1 project2 > index.rss # Advanced features ## Overriding defaults Dropcaster is opinionated software. That means, it makes a number of assumptions about names, files, and directory structures. Dropcaster will be most simple to use if these assumptions and opinions apply to your way of using the program. However, it is still possible to override Dropcaster's behavior in many ways. You can, for instance, host your episode files on a different URL than the channel. Instead of writing title, subtitle, etc. to a channel.yml, you may also spedify them on the command line. In order to find out about all the options, simply run command $ dropcaster --help ## Using custom channel templates Dropcaster generates a feed that is suitable for most podcast clients, especially iTunes. By default, dropcaster follows [Apple's podcast specs / recommendations](http: It is also possible to customize the channel by supplying an alternative channel template on the command line. Start your own template by copying the default template, or look at the test directory of the dropcaster gem. You can get there by running `gem open dropcaster`. ## Generate a HTML page for your podcast Besides generating an RSS feed, dropcaster can also generate HTML that can be used as a home page for your podcast. The template directory contains a sample template that can be used to get started: $ dropcaster --channel-template templates/channel.html.erb As discussed above, the output of this command can be written to a file, too: command $ dropcaster --channel-template templates/channel.html.erb > ~/public_html/allabouteverything.html Dropcaster works exactly the same, whether it generates an RSS feed or a HTML page. Therefore, all options discussed before also apply when generating HTML. ## A Note on iTunes The generated XML file contains all elements required for iTunes. However, Dropcaster will not notify the iTunes store about new episodes. ## Using Dropcaster With S3 or Digital Ocean Spaces If you set up an S3 bucket or Digital Ocean Space (or any other s3 compatible static asset host), you can easily sync your local podcast directory using a command line tool like [s3cmd](https://github.com/s3tools/s3cmd). After installing s3cmd, make sure you have the right credentials to write to your bucket/space. Add your mp3 files to your folder, run `dropcaster > index.rss` and then `s3cmd sync ./ s3://$your-bucket-name --acl public-read`. S3cmd will now upload any new or changed files to your bucket. ## Episode Identifier (uuid) Dropcaster uses a rather simple approach to uniquely identify the episodes. It simply generates a SHA1 hash of the mp3 file. If it changes, for whatever reason (even if only a tag was changed), the episode will get a new UUID, and any podcatcher will fetch the episode again (which is what you want, in most cases). ## I Don't Like the Output Format that Dropcaster produces Dropcaster uses an ERB template to generate the XML feed. The template was written so that it is easy to understand, but not necessarily in a way that would make the output rather nice-looking. That should not be an issue, as long as the XML is correct. It you prefer a more aesthetically pleasing output, just pipe the output of Dropcaster through `xmllint`, which is part of [libxml](http://xmlsoft.org/): command $ dropcaster | xmllint --format - For writing the output to a file, just redirect the ouput of the above command: command $ dropcaster | xmllint --format - > index.rss # Web site Dropcaster uses Steve Klabnik's [approach](https: Copyright (c) 2011-2021 Nicolas E. Rabenau. See [LICENSE.txt](https:
package disk import "testing" func TestDisk_GetFile(t *testing.T) { type fields struct { Host string Path string } type args struct { bucketName string fileName string } tests := []struct { name string fields fields args args want string }{ { name: "without host", fields: fields{ Path: "./data/", }, args: args{ bucketName: "test", fileName: "a.png", }, want: "data/test/a.png", }, { name: "without host and absolute path", fields: fields{ Path: "/data/", }, args: args{ bucketName: "test", fileName: "a.png", }, want: "/data/test/a.png", }, { name: "with host", fields: fields{ Host: "http://localhost:8080/", Path: "./data/", }, args: args{ bucketName: "test", fileName: "a.png", }, want: "http://localhost:8080/data/test/a.png", }, { name: "with host and absolute path", fields: fields{ Host: "http://localhost:8080/", Path: "/data/", }, args: args{ bucketName: "test", fileName: "a.png", }, want: "http://localhost:8080/data/test/a.png", }, { name: "wrong host format", fields: fields{ Host: "localhost", Path: "/data/", }, args: args{ bucketName: "test", fileName: "a.png", }, want: "localhost/data/test/a.png", }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { d := &Disk{ Host: tt.fields.Host, Path: tt.fields.Path, } if got := d.GetFile(tt.args.bucketName, tt.args.fileName); got != tt.want { t.Errorf("Disk.GetFile() = %v, want %v", got, tt.want) } }) } }
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.awt.Color; /** * Write a description of class ScreenInstructions here. * * @author Ashutosh Singh * @email ashutosh.singh@sjsu.edu * @version 9/16/16 */ public class ScreenInstructions extends Actor { String Looted = " This house has already been looted !! You lost 1 hour! "; String notLooted = " This house is safe!! "; String foundThief = " Thief's here ! You won! "; GreenfootImage inner = new GreenfootImage(Looted, 48, Color.blue, new Color(0, 0, 0, 96)); public ScreenInstructions() { } public void setLooted(World world) { int width = world.getWidth(); int height = world.getHeight(); GreenfootImage outer = new GreenfootImage(width, height); int topX = (width - inner.getWidth())/2; int topY = (height - inner.getHeight())/2; outer.drawImage(inner, topX, topY); setImage(outer); } public void setNotLooted(World world) { GreenfootImage inner = new GreenfootImage(notLooted, 48, Color.blue, new Color(0, 0, 0, 96)); int width = world.getWidth(); int height = world.getHeight(); GreenfootImage outer = new GreenfootImage(width, height); int topX = (width - inner.getWidth())/2; int topY = (height - inner.getHeight())/2; outer.drawImage(inner, topX, topY); setImage(outer); } public void setFoundLooted(World world) { GreenfootImage inner = new GreenfootImage(foundThief, 48, Color.blue, new Color(0, 0, 0, 96)); int width = world.getWidth(); int height = world.getHeight(); GreenfootImage outer = new GreenfootImage(width, height); int topX = (width - inner.getWidth())/2; int topY = (height - inner.getHeight())/2; outer.drawImage(inner, topX, topY); setImage(outer); } public void act(){ if(Greenfoot.mouseClicked(this)){ getWorld().removeObject(this); } } }
layout: nav-update title: "Study Hub | Experience Victoria" NavColor: "white" LogoColor: "green" horizontalNav: "true" main-header: main-ia: - International students - Current students - Research - Engage sub-header: - About - Library - Blackboard - Maps - Staff Intranet - myTools - Learning & teaching footer: links: - Why choose Victoria? - Living in Wellington - Life on campus - Getting involved - Student support - Student services phones: - phone1: number: 0800 VICTORIA (842 867) label: general enquiries - phone2: number: +64 4 463 5350 label: international enquiries mails: - info@wgtn.ac.nz <!-- Study hub About --> <section class="layout"> <div class="content-panel"> <!-- Center 'content' column --> <main class="hub"> <div class="hub-banner reset-formatting centraliser"> <a href="http://" target="_blank" rel="noopener noreferrer"> <figure class=""> <div class="banner-image" style="background-image: url(../images/<API key>.jpg);"> <img alt="" src="../images/<API key>.jpg"> <div class=" banner-title"> <h1>Fture students</h1> </div> </div> <div class="banner-body "> <div class=" banner-text"> <p>Find out about ways you can collaborate with Victoria research and access our technologies, expertise, business solutions, students and staff.</p> </div> </div> </figure> </a> </div> <!-- Search panel --> <div class="centraliser"> <div class="block"> <div class="search-panel"> <form class="form wide-search-bar" method="GET" action="https: <h1 style="margin-bottom: 0.5rem">Find an expert</h1> <div class="group required"> <input type="text" name="search" id="search" class="panel-search-input" placeholder="Find an expert.."> <input type="submit" class="button large primary" value="Search"> </div> </form> </div> </div> </div> <!-- card panel --> <div class="centraliser "> <div class="block formatting"> <h2>At a glance</h2> <div class="card-panel icon-cards"> <section class="card"> <span><i class="icon-globe"></i></span> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields.</p> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields.</p> <a title="Why to study at Victoria" href="#" class="button large primary">Performance and rankings</a> </section> <section class="card"> <span><i class="icon-people"></i></span> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields.</p> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields.</p> </section> </div> </div> </div> <!-- Quote panel --> <!-- <div class="quote-panel"> <div class="centraliser "> <div class="block "> <figure class="quote full"> <blockquote> <h3>Our researchers are making a positive impact - on the lives and wellbeing of people - not just in New Zealand, but around the world - through exceptional innovation and research.</h3> </blockquote> <figcaption>Professor Kate Mcgrath <br> Vice-Provost (Research)</figcaption> </figure> </div> </div> </div> <!-- New quote panel --> <div class="quote-panel quote-image"> <div class="centraliser "> <div class=" "> <figure class="quote full"> <img alt="Prof Kate McGrath" src="https: <div class="quote-content"> <blockquote> <h3>Our researchers are making a positive impact - on the lives and wellbeing of people - not just in New Zealand, but around the world - through exceptional innovation and research.</h3> </blockquote> <figcaption> <h4>Professor Kate Mcgrath</h4> <p>Vice-Provost (Research)</p> <a title="Why to study at Victoria" href="#" class="button large ">Explore</a> </figcaption> </div> </figure> </div> </div> </div> <!-- New quote panel white bg --> <div class="quote-panel quote-image quote-white"> <div class="centraliser "> <div class=" "> <figure class="quote full"> <img alt="Prof Kate McGrath" src="https: <div class="quote-content"> <blockquote> <h3>Our researchers are making a positive impact - on the lives and wellbeing of people - not just in New Zealand, but around the world - through exceptional innovation and research.</h3> </blockquote> <figcaption> <h4>Professor Kate Mcgrath</h4> <p>Vice-Provost (Research)</p> <a title="Why to study at Victoria" href="#" class="button large ">Explore</a> </figcaption> </div> </figure> </div> </div> </div> <!-- card panel --> <div class="centraliser "> <div class="block formatting"> <div class="card-panel"> <section class="card"> <h2>Research culture</h2> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields.</p> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields.</p> <a title="Why to study at Victoria" href="#" class="button large primary">Learn more</a> <a title="Why to study at Victoria" href="#" class="button large ">Information for staff</a> </section> <section class="card"> <h2>Maori research practices</h2> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields.</p> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields.</p> <a title="Why to study at Victoria" href="#" class="button large primary">Learn more</a> </section> </div> </div> </div> <!-- //promo panel right aligned image --> <div class="promo-panel"> <div class="centraliser block formatting"> <figure class=" "> <figcaption> <h1>Featured researchers</h1> <p>In these profiles, discover the inspiring stories behind our researchers’ ground-breaking work meeting local, national and global challenges, the impact it is having, and how they came to be a researcher in the first place.</p> <a href="#" title="Play the video about Wellington" class="button large">Discover more</a> </figcaption> <img alt="Wellington waterfront" src="https: </figure> </div> </div> <!-- card panel --> <div class="centraliser "> <div class="block formatting"> <div class="card-panel"> <section class="card"> <h2>Research publications</h2> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields. This output is used at community, national and international levels.</p> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields. This output is used at community, national and international levels.</p> <a title="Why to study at Victoria" href="#" class="button large primary">Learn more</a> </section> <section class="card"> <h2>Why join Victoria?</h2> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields. This output is used at community, national and international levels.</p> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields. This output is used at community, national and international levels.</p> <a title="Why to study at Victoria" href="#" class="button large primary">Learn more</a> </section> </div> </div> </div> <!-- promo panel with left aligned text box --> <div class="promo-panel "> <figure class="photo left-text-panel"> <img alt="Wellington waterfront" src="https: <figcaption> <div class="block formatting"> <h2>Careers at Victoria</h2> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields.</p> <a href="#" class="button primary large">Learn more</a> </div> </figcaption> </figure> </div> <!-- Tiled study hub 3 col pattern images no gutter--> <div class="tiles-panel "> <div class="centraliser block"> <div class="updated-tile-grid "> <h2>Contact us</h2> <div class="tiles-wrap three-col image-no-gutter"> <ul> <li class="tile"> <a href=""> <h3 class="">Media contacts</h3> <div class="sub-text"> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields.</p> </div> <span href="#" class="button ">Email the Communications team</span> </a> </li> <li class="tile"> <a href=""> <h3>VicLink</h3> <div class="sub-text"> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields.</p> </div> <span href="#" class="button ">Email VicLink</span> </a> </li> <li class="tile"> <a href=""> <h3>Research Development Office</h3> <div class="sub-text"> <p>Victoria’s research output is used at community, national and international levels. Our academic and business partnerships have global impacts in many fields.</p> </div> <span href="#" class="button ">Email the Research Development office</span> </a> </li> </ul> </div> </div> </div> </div> </main> </div> </section>
@keyframes fadeInUp { 0% { opacity: 0; transform: translate3d(0, 100%, 0); } 100% { opacity: 1; transform: none; } } .fadeInUp { animation-name: fadeInUp; }
Given /^(?:has )?a valid service ticket for "([^"]*)"$/ do |service| step %Q{a user requests a service ticket for "#{service}"} @st.present! @st.should be_ok end When /^(?:that user )?requests a proxy ticket for "([^"]*)"$/ do |service| # The request is deferred because some steps expect exceptions to be raised. @deferred_request = lambda do @st.retrieve_pgt! @pt = issue_proxy_ticket(@st.pgt, service) @previous_service = service end end When /^that user uses their proxy ticket to request a proxy ticket for "([^"]*)"$/ do |service| # retrieves a proxy ticket... @deferred_request.call # which will be used in a future step to get another proxy ticket. # This would be done from a CAS-protected service A that is using a proxy # ticket (issued from some other service) to proxy to another CAS-protected # service B. In a situation like this, neither service A nor service B would # have access to the original PGT. @deferred_request = lambda do @pt = proxy_ticket(@pt.ticket, @previous_service) @pt.present! @pt.retrieve_pgt! @pt = issue_proxy_ticket(@pt.pgt, service) end end When /^that user requests a proxy ticket for "([^"]*)" with a bad PGT$/ do |service| @deferred_request = lambda do @pt = issue_proxy_ticket('PGT-1bad', service) end end When /^that proxy ticket is checked for "([^"]*)"$/ do |service| @deferred_request.call @ticket = proxy_ticket(@pt, service).tap { |t| t.present! } end When /^that proxy ticket is checked again for "([^"]*)"$/ do |service| @ticket = proxy_ticket(@pt, service).tap { |t| t.present! } end When /^the proxy ticket "([^"]*)" is checked for "([^"]*)"$/ do |pt, service| @ticket = proxy_ticket(pt, service).tap { |t| t.present! } end Then /^that user should receive a proxy ticket$/ do @deferred_request.should_not raise_error @pt.should be_issued end Then /^that proxy ticket should be valid$/ do @ticket.should be_ok end Then /^that proxy ticket should not be valid$/ do @ticket.should_not be_ok end Then /^the proxy ticket request should fail with "([^"]*)"$/ do |message| @deferred_request.should raise_error(Castanet::ProxyTicketError, /#{message}/) end
// **NOTE** This file was generated by a tool and any changes will be overwritten. // Template Source: Templates\CSharp\Requests\<API key>.cs.tt namespace Microsoft.Graph { using System; using System.Collections.Generic; <summary> The interface <API key>. </summary> public partial interface <API key> { <summary> Builds the request. </summary> <returns>The built request.</returns> <API key> Request(); <summary> Builds the request. </summary> <param name="options">The query and header options for the request.</param> <returns>The built request.</returns> <API key> Request(IEnumerable<Option> options); <summary> Gets an <see cref="<API key>"/> for the specified Subscription. </summary> <param name="id">The ID for the Subscription.</param> <returns>The <see cref="<API key>"/>.</returns> <API key> this[string id] { get; } } }
#!/usr/bin/env bash # Write a shell script that takes input as command line # arguments and prints them out backwards. for (( i=$#; i > 0 ; i-- )); do echo ${!i} done
import datetime from dateutil.relativedelta import * ## give final date and time after parsing by changing current date-time def change_datetime ( c="0", y=0, mt=0, w=0, d=0, h=0, m=0, s=0): #mt = mt + 12*y #d = d + 30*mt now = datetime.datetime.now() change = relativedelta( years =+ y, months =+ mt, weeks =+ w, days =+ d, hours =+ h, minutes =+ m, seconds =+ s) #print (now + change) if c == "date": return (now + change).date() elif c == "time": return (now + change).time() ## make separate date and time functions #def change_date (y=0, m=0, w=0, d=0): #def change_time (h=0, m=0, s=0): ## make separate functions for setting date and time and print -- if not provided the data ## give final date and time after parsing by setting date-time def set_datetime (y=0, mt=0, d=0, h=0, m=0, s=0, c="0"): a = "" if d!=0: a = a + str(d) + "/" if mt!=0: a = a + str(mt) + "/" if y!=0: a = a + str(y) #a = a + " " if h!=0: a = a + str(h) + ":" if m!=0: a = a + str(m) + ":" if s!=0: a = a + str(s) if c!="0": a = a + " " a = a + str(c) #print (a, "a") return a ## make function for am/pm def get_disease (string): with open("dataset.txt") as f: content = f.readlines() names = [] definitions = [] values = [] check = 1 ## TODO ## remove the common words from defintion (or input) (or use replace) like a, the,disease, etc. while splitting definition in words ## Also do stemming ## Go through dataset once manually to get these words for word in content: if word[0] == 'n': ## TODO think better way in which pop is not required, directly append only if required if check == 1: names.append(word) check = 0 if check == 0: names.pop() names.append(word) if word[0] == 'd': definitions.append(word) check = 1 values.append(0) #string = input("Give Text:") words = string.split(" ") for word in words: for defintion in definitions: defintion.replace('. ',' ') defintion.replace(', ',' ') definition_words = defintion.split(" ") if word in definition_words: values[definitions.index(defintion)] += 1 #print (word) highest = 0 index_of_highest = 0 answer = [] ## TODO if there are more than one highest for value in values: if value > highest: highest = value index_of_highest = values.index(value) answer.append(names[index_of_highest]) answer.append(highest) answer.append(definitions[index_of_highest]) for word in words: newd = definitions[index_of_highest].replace('. ',' ') newda = newd.replace(', ',' ') definition_words = newda.split(" ") ## cannot pass with or in split, find better way #print (definition_words) if word in definition_words: values[definitions.index(defintion)] += 1 answer.append(word) # print (definitions[index_of_highest][defintion.index(word)]) ## make definition sort only usable things ## find a way like , and parameters for passing more than value in relplace return answer def get_sentences(str): import re ## use of regular expressions ## str cannot be changed further, always make a new object words = str.split(" ") Abbrs = ['Mr.', 'mr.', 'Mrs.', 'mrs.', 'Dr.', 'dr.' , 'Er.', 'er.', 'Prof.', 'prof.', 'Br.', 'br.', 'Fr.', 'fr.', 'Sr.', 'sr.', 'Jr.', 'jr.'] SentenceType = [] for abbr in Abbrs: if abbr in words: new_word = abbr.replace(abbr[len(abbr)-1], "") str = str.replace(abbr, new_word) #print (new_str) ## str.replace(abbr[len(abbr)-1], " ") ## Do directly in string without using words for word in words: if re.findall(r'\.(.)+\.', word): new_word = word.replace('.','') str = str.replace(word, new_word) #print (word) #print (new_word) #print (new_str2) if '.' in word[0:len(word)-2]: new_word = word.replace('.', '[dot]') str = str.replace(word, new_word) for letter in str: if letter == '.': SentenceType.append("Assertive") if letter == '?': SentenceType.append("Interrogative") if letter == '!' or letter == '!!': SentenceType.append('Exclamatory') sentences = re.split("[ ]*[.|?|!|!!]+[ ]*", str) if (str[len(str)-1] == '.') or (str[len(str)-1] == '?') or (str[len(str)-1] == '!'): sentences.pop() return dict(zip(sentences, SentenceType)) ## TODOs ## Extend Abbrs list ## Dots back in sentences ## If abbr of acronyms with dots at end of a sentence? ## what if sentence doesn't end with !!? Get the expression from this word. ## If already a new line exist. ## Also implement through machine learning to obtain results without help of punctuation. ## Sentence Type : What about Imperative, compound, complex etc. Exclamatory Sentence or Word ## ensure sentences are returned sequentially def get_tokens(str): words = str.split(" ") return words ## Make an algorithm for different kind of words for forming effective tokens before returning
/** File: bopen-02.c Project: DCPU-16 Toolchain Component: LibDCPU Test Suite Authors: James Rhodes Description: Tests the bopen() and bclose() methods to ensure that they correctly open and close files. **/ #ifndef WIN32 #include <unistd.h> #endif #include <bfile.h> #include "tests.h" int bopen_02() { BFILE* f; f = bfopen("nonexistant.blah", "wb"); TEST_EXPECT(f != NULL); bfclose(f); unlink("nonexistant.blah"); TEST_SUCCESS; }
'use strict'; /** * Module dependencies. */ var passport = require('passport'), User = require('mongoose').model('User'), path = require('path'), config = require(path.resolve('./config/config')); module.exports = function(app) { // Serialize sessions passport.serializeUser(function(user, done) { done(null, user.id); }); // Deserialize sessions passport.deserializeUser(function(id, done) { User.findOne({ _id: id }, '-salt -password', function(err, user) { done(err, user); }); }); // Initialize strategies config.utils.getGlobbedPaths(path.join(__dirname, './strategies*.js')).forEach(function(strategy) { require(path.resolve(strategy))(config); }); // Add passport's middleware app.use(passport.initialize()); app.use(passport.session()); };
using System; using LuaInterface; public class <API key> { public static string AdditionNameSpace = "System.Collections.Generic"; [NoToLuaAttribute] public static string op_AdditionDefined = @" try { ToLua.CheckArgsCount(L, 2); Delegate arg0 = (Delegate)ToLua.CheckObject<Delegate>(L, 1); LuaTypes type = LuaDLL.lua_type(L, 2); if (type == LuaTypes.LUA_TFUNCTION) { LuaFunction func = ToLua.ToLuaFunction(L, 2); Type t = arg0.GetType(); Delegate arg1 = DelegateFactory.CreateDelegate(t, func); Delegate arg2 = Delegate.Combine(arg0, arg1); ToLua.Push(L, arg2); return 1; } else { Delegate arg1 = ToLua.ToObject(L, 2) as Delegate; Delegate o = Delegate.Combine(arg0, arg1); ToLua.Push(L, o); return 1; } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); }"; [NoToLuaAttribute] public static string <API key> = @" try { ToLua.CheckArgsCount(L, 2); Delegate arg0 = (Delegate)ToLua.CheckObject<Delegate>(L, 1); LuaTypes type = LuaDLL.lua_type(L, 2); if (type == LuaTypes.LUA_TFUNCTION) { LuaState state = LuaState.Get(L); LuaFunction func = ToLua.ToLuaFunction(L, 2); Delegate[] ds = arg0.GetInvocationList(); for (int i = 0; i < ds.Length; i++) { LuaDelegate ld = ds[i].Target as LuaDelegate; if (ld != null && ld.func == func && ld.self == null) { arg0 = Delegate.Remove(arg0, ds[i]); state.DelayDispose(ld.func); break; } } func.Dispose(); ToLua.Push(L, arg0); return 1; } else { Delegate arg1 = (Delegate)ToLua.CheckObject<Delegate>(L, 2); arg0 = DelegateFactory.RemoveDelegate(arg0, arg1); ToLua.Push(L, arg0); return 1; } } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); }"; public static bool operator ==(<API key> lhs, <API key> rhs) { return false; } public static bool operator !=(<API key> lhs, <API key> rhs) { return false; } [UseDefinedAttribute] public static <API key> operator +(<API key> a, <API key> b) { return null; } [UseDefinedAttribute] public static <API key> operator -(<API key> a, <API key> b) { return null; } public override bool Equals(object other) { return false; } public override int GetHashCode() { return 0; } public static string DestroyDefined = @" Delegate arg0 = (Delegate)ToLua.CheckObject<Delegate>(L, 1); Delegate[] ds = arg0.GetInvocationList(); for (int i = 0; i < ds.Length; i++) { LuaDelegate ld = ds[i].Target as LuaDelegate; if (ld != null) { ld.Dispose(); } } return 0;"; [UseDefinedAttribute] public static void Destroy(object obj) { } }
# THJAlertController [![Version](https: [![License](https: [![Platform](https: UIAlertController that displays on top of any UIViewController. Moving away from UIAlertView to UIAlertController is not fun because the fundamental of UIAlertView and UIAlertController is so different. iOS treats UIAlertView as a subclass of UIView and put it on top of UIWindow for us. UIAlertController is now a subclass of UIViewController. To present the alert, we need to call `- <API key>:animated:completion:` from the UIViewController. Since legacy codes does not always present UIAlertView inside the UIViewController (ie. some singleton classes dealing with location service, etc.) So, I need a UIAlertController that could display anywhere on top of the app like UIAlertView used to do. So, I looked around and found https://github.com/dbettermann/DBAlertController which is what I want. The only problem is I need objective-c version. So, I created THJAlertController which is a subclass of UIAlertController create a new UIWindow and UIViewController on top of the current UIWindow. ## Usage To run the example project, clone the repo, and run `pod install` from the Example directory first. ## Requirements ## Installation THJAlertController is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile: ruby pod "THJAlertController" ## Author Thanyaluk Jirapech-umpai THJAlertController is available under the MIT license. See the LICENSE file for more info.
require File.join(File.dirname(__FILE__), '..', 'spec_helper.rb') require File.join( File.dirname(__FILE__), "..", "user_spec_helper") require File.join( File.dirname(__FILE__), "..", "<API key>) describe Users, "new action" do include UserSpecHelper before(:each) do User.auto_migrate! end it 'should respond successfully' do dispatch_to(Users, :new).should <API key> end end describe Users, "create action" do include UserSpecHelper before(:each) do User.auto_migrate! end it 'allows signup' do lambda do controller = dispatch_to(Users, :create, :user => valid_user_hash) controller.should redirect end.should change(User, :count).by(1) end end describe Users, "activate action" do include UserSpecHelper before(:each) do User.auto_migrate! end it 'should respond successfully' do dispatch_to(Users, :activate).should <API key> end it 'activates user' do user = {:login => "aaron", :password => "test", :<API key> => "test"} controller = dispatch_to(Users, :create, :user => valid_user_hash.merge(user)) @user = controller.assigns(:user) User.authenticate('aaron', 'test').should be_nil controller = dispatch_to(Users, :activate, :activation_code => @user.activation_code) controller.should redirect end end describe Users, "routes" do it "routed to Users#activate from 'users/activate/1234'" do request = request_to("/users/activate/1234") request[:controller].should == "users" request[:action].should == "activate" request[:activation_code].should == "1234" end it "routed to Users#create from 'users' post" do request = request_to("/users", :post) request[:controller].should == "users" request[:action].should == "create" end it "routed to Users#new from 'users/new'" do request = request_to("/users/new") request[:controller].should == "users" request[:action].should == "new" end it "routed to Users#new from 'signup'" do request = request_to("/signup") request[:controller].should == "users" request[:action].should == "new" end end
const SpacesWorld = require("./gameshare/world.js") //console.log(SpacesWorld) var line = ""; for(var i = 0;i < SpacesWorld.array.length;i++) { if(i % SpacesWorld.size[0] == 0) { console.log(line); line = ""; } if(SpacesWorld.array[i] == null) line += " "; else line += SpacesWorld.array[i]; }
module Cany::Recipes # This recipes install the Unicorn Rack HTTP server. It is registered # and started as service. # information about the project # @note The receives relies that the 'unicorn' gem is included in your # Gemfile and therefore installed via bundler (and the bundler recipe). class Unicorn < WebServer register_as :unicorn def launch_command %W(unicorn --config-file /etc/#{spec.name}/unicorn.rb --env production) end end end
import React, { Component } from 'react'; import { StyleSheet, Image, TouchableOpacity, View, Dimensions } from 'react-native'; const {height, width} = Dimensions.get('window'); import {gutter} from '../variables' const GalleryOffset = ({imagesArray, display, onPress}) => { const images = imagesArray; // row if(display === 'row'){ return ( <View style={styles.row}> <TouchableOpacity onPress={onPress}> <Image source={{uri: images[0]}} style={styles.full}/> </TouchableOpacity> <View style={styles.lowerSection}> <TouchableOpacity onPress={onPress}> <Image source={{uri: images[1]}} style={styles.half}/> </TouchableOpacity> <TouchableOpacity onPress={onPress}> <Image source={{uri: images[2]}} style={styles.half}/> </TouchableOpacity> </View> </View> ); } // column else { return ( <View style={styles.column}> <TouchableOpacity onPress={onPress}> <Image source={{uri: images[0]}} style={styles.mainHalf}/> </TouchableOpacity> <View style={styles.lowerSectionColumn}> <TouchableOpacity onPress={onPress}> <Image source={{uri: images[1]}} style={styles.half}/> </TouchableOpacity> <TouchableOpacity onPress={onPress}> <Image source={{uri: images[2]}} style={styles.half}/> </TouchableOpacity> </View> </View> ); } } const styles = StyleSheet.create({ row: { flexDirection: 'column', justifyContent: 'space-between', paddingHorizontal: width/2*0.025 }, column: { flexDirection: 'row', justifyContent: 'space-between', paddingHorizontal: width/2*0.025 }, lowerSection: { flexDirection: 'row', justifyContent: 'space-between', }, lowerSectionColumn: { flexDirection: 'column', justifyContent: 'space-between', width: width/2.025-(width/2*0.025), height: width-(width/2*0.025), }, full: { width: width - (width/2*0.025)*2, height: width/2.05, marginBottom: width/2*0.025 }, mainHalf: { height: width-(width/2*0.025)*2, marginBottom: width/2*0.025, width: width/2.025-(width/2*0.025), }, half: { width: width/2.025-(width/2*0.025), height: width/2.025-(width/2*0.025), marginBottom: width/2*0.025 } }) GalleryOffset.defaultProps = { display: 'column', gutter: gutter, } GalleryOffset.propTypes = { display: React.PropTypes.oneOf(['row', 'column']), gutter: React.PropTypes.number, onPress: React.PropTypes.func, } export default GalleryOffset;
#ifndef <API key> #define <API key> #include "fd.hpp" #include "own.hpp" #include "stdint.hpp" #include "io_object.hpp" #include "tcp_address.hpp" #include "zmq.h" namespace zmq { class io_thread_t; class socket_base_t; class tcp_listener_t : public own_t, public io_object_t { public: tcp_listener_t (zmq::io_thread_t *io_thread_, zmq::socket_base_t *socket_, const options_t &options_); ~tcp_listener_t (); // Set address to listen on. int set_address (const char *addr_); // Get the bound address for use with wildcard int get_address (std::string &addr_); private: // Handlers for incoming commands. void process_plug (); void process_term (int linger_); // Handlers for I/O events. void in_event (); // Close the listening socket. void close (); // Accept the new connection. Returns the file descriptor of the // newly created connection. The function may return retired_fd // if the connection was dropped while waiting in the listen backlog // or was denied because of accept filters. fd_t accept (); // Address to listen on. tcp_address_t address; // Underlying socket. fd_t s; // Handle corresponding to the listening socket. handle_t handle; // Socket the listerner belongs to. zmq::socket_base_t *socket; // String representation of endpoint to bind to std::string endpoint; tcp_listener_t (const tcp_listener_t&); const tcp_listener_t &operator = (const tcp_listener_t&); }; } #endif
import '../less/NewProject.less'; import React, { Component } from 'react'; import { Modal, Button, Form, Input, DatePicker, Col, Transfer } from 'antd'; import AlertMsg from './AlertMsg'; import { ProjectNameRule, DateRule, TextareaRule } from '../validate/rules'; import { addProject } from '../actions/projects'; import { fetchUsers } from '../actions/users'; const createForm = Form.create; const FormItem = Form.Item; class NewProject extends Component{ constructor(props){ super(props); this.getMock = this.getMock.bind(this); this.handleOk = this.handleOk.bind(this); this.handleCancel = this.handleCancel.bind(this); this.handleChange = this.handleChange.bind(this); this.disabledStartDate = this.disabledStartDate.bind(this); this.disabledEndDate = this.disabledEndDate.bind(this); this.onChange = this.onChange.bind(this); this.onStartChange = this.onStartChange.bind(this); this.onEndChange = this.onEndChange.bind(this); this.handleStartToggle = this.handleStartToggle.bind(this); this.handleEndToggle = this.handleEndToggle.bind(this); this.state = { startValue: null, endValue: null, endOpen: false, mockData: [], targetKeys: [], startError: '', startErrorMsg: '', endError: '', endErrorMsg: '', membersError: '', membersErrorMsg: '' }; } componentDidMount() { this.props.dispatch(fetchUsers()); } getMock(){ return this.props.users.map(user => { return {key: user.id, title: user.name, chosen: false}; }); } handleOk(e) { e.preventDefault(); const { dispatch } = this.props; this.props.form.validateFields((errs, values) => { let errFlag = false; if(!this.state.startValue){ this.setState({ startError: 'has-error', startErrorMsg: '' }); errFlag = true; } if(!this.state.endValue){ this.setState({ endError: 'has-error', endErrorMsg: '' }); errFlag = true; } if(this.state.targetKeys.length === 0){ this.setState({ membersError: 'has-error', membersErrorMsg: '' }); errFlag = true; } if(!!errs || errFlag){ console.log('errors in form'); return; } values.start = this.state.startValue.getTime(); values.end = this.state.endValue.getTime(); console.log(this.props.users); console.log(this.state.targetKeys); values.members = this.state.targetKeys; dispatch(addProject(values)); }); } handleCancel() { const { hide } = this.props; hide(); } disabledStartDate(startValue) { let isDisable = false; if (this.state.endValue) { isDisable = isDisable || startValue.getTime() > this.state.endValue.getTime(); } return isDisable || startValue.getTime() < new Date().getTime(); } disabledEndDate(endValue) { let isDisable = false; if (this.state.startValue) { isDisable = isDisable || endValue.getTime() < this.state.startValue.getTime(); } return isDisable || endValue.getTime() < new Date().getTime(); } onChange(field, value) { console.log(field, 'change', value); this.setState({ [field]: value, }); } onStartChange(value) { if(value){ this.setState({ startError: '', startErrorMsg: '' }); }else{ this.setState({ startError: 'has-error', startErrorMsg: '' }); } this.onChange('startValue', value); } onEndChange(value) { if(value){ this.setState({ endError: '', endErrorMsg: '' }); }else{ this.setState({ endError: 'has-error', endErrorMsg: '' }); } this.onChange('endValue', value); } handleStartToggle({ open }) { if (!open) { this.setState({ endOpen: true }); } } handleEndToggle({ open }) { this.setState({ endOpen: open }); } handleChange(targetKeys) { console.log('targetKeys', targetKeys); if(targetKeys.length === 0){ this.setState({ membersError: 'has-error', membersErrorMsg: '' }); }else{ this.setState({ membersError: '', membersErrorMsg: '' }); } this.setState({ targetKeys }); } render(){ const { alert, btnStatus } = this.props; const { getFieldProps, getFieldError, isFieldValidating } = this.props.form; const formItemLayout = { labelCol: { span: 5 }, wrapperCol: { span: 18 }, }; return( <Modal ref="modal" visible={true} title="" onOk={this.handleOk} onCancel={this.handleCancel} closable={false} footer={[ <Button key="submit" type="primary" size="large" onClick={this.handleOk} disabled={!btnStatus}></Button>, <Button key="back" type="ghost" size="large" onClick={this.handleCancel} disabled={!btnStatus}></Button> ]} > <AlertMsg alert={alert}/> <Form horizontal> <FormItem {...formItemLayout} label='' hasFeedback help={isFieldValidating('name') ? '...' : (getFieldError('name') || []).join(', ')}> <Input {...getFieldProps('name', ProjectNameRule)}/> </FormItem> <FormItem {...formItemLayout} label='' required> <Col span="11"> <div className={this.state.startError}> <DatePicker disabledDate={this.disabledStartDate} value={this.state.startValue} placeholder="" onChange={this.onStartChange} toggleOpen={this.handleStartToggle} /> <div className='err-msg'>{this.state.startErrorMsg}</div> </div> </Col> <Col span="2"> <p className="ant-form-split">-</p> </Col> <Col span="11"> <div className={this.state.endError}> <DatePicker disabledDate={this.disabledEndDate} value={this.state.endValue} placeholder="" onChange={this.onEndChange} open={this.state.endOpen} toggleOpen={this.handleEndToggle} /> <div className='err-msg'>{this.state.endErrorMsg}</div> </div> </Col> </FormItem> <FormItem {...formItemLayout} label='' required> <div className={this.state.membersError}> <Transfer dataSource={this.getMock()} targetKeys={this.state.targetKeys} onChange={this.handleChange} titles={['', '']} render={item => item.title} /> <div className='err-msg'>{this.state.membersErrorMsg}</div> </div> </FormItem> <FormItem {...formItemLayout} label='' required> <Input {...getFieldProps('intro', TextareaRule)} type="textarea" rows={5}/> </FormItem> </Form> </Modal> ); } } export default createForm()(NewProject);
from flask import jsonify def error_404_handler(error): resp = jsonify({'code': -1, 'msg': 'not found', 'data': None}) resp.status_code = 404 return resp def error_429_handler(error): resp = jsonify({'code': -1, 'msg': 'to many requests', 'data': None}) resp.status_code = 429 return resp def error_handler(error): response = jsonify(error.to_dict()) return response
package com.gamaset.sonicbot.collector.repository.entity; import java.util.Date; import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.fasterxml.jackson.annotation.JsonFormat; import com.gamaset.sonicbot.collector.dto.MatchStatusEnum; @Entity @Table(name = "coupon") public class Coupon { @Id @Column(name = "COUP_CD_ID_PK") private Long id; @Column(name = "COUP_DS_DATE") private String date; @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss") @Temporal(TemporalType.TIMESTAMP) @Column(name = "COUP_DT_CREATED") private Date createdDate; @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss") @Temporal(TemporalType.TIMESTAMP) @Column(name = "COUP_DT_UPDATED") private Date updatedDate; @OneToMany(mappedBy = "coupon") private List<CouponMatch> couponMatches; public Coupon() { } public Date getCreatedDate() { return createdDate; } public void setCreatedDate(Date createdDate) { this.createdDate = createdDate; } public Date getUpdatedDate() { return updatedDate; } public void setUpdatedDate(Date updatedDate) { this.updatedDate = updatedDate; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getStatus(){ for (CouponMatch couponMatch : couponMatches) { if(!couponMatch.getMatchStatus().equals(MatchStatusEnum.TERMINADO)){ return "Há Jogos não Finalizados."; } } return "Jogos Finalizados."; } /* (non-Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { return EqualsBuilder.reflectionEquals(this, obj); } }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http: <html xmlns="http: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Installation &#8212; Web App For Day Ahead Market Clearing 0.1 documentation</title> <link rel="stylesheet" href="_static/alabaster.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var <API key> = { URL_ROOT: './', VERSION: '0.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=<API key>"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="next" title="Tutorial" href="tut.html" /> <link rel="prev" title="Welcome to Web App Day Ahead Clearing’s documentation!" href="index.html" /> <link rel="stylesheet" href="_static/custom.css" type="text/css" /> <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" /> </head> <body role="document"> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="installation"> <h1>Installation<a class="headerlink" href=" <div class="section" id="getting-python"> <h2>Getting Python<a class="headerlink" href=" <p>This web application uses python3 To install python on a debian based linux machine simply run:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">python3</span> </pre></div> </div> <p>it& installation.</p> </div> <div class="section" id="<API key>"> <h2>Getting a solver for linear optimisation<a class="headerlink" href=" <p>The web app is known to work with the free software GLPK. The web application should also work using the Gurobi software (and whatever else Pyomo works with).</p> <p>For Debian-based systems you can get GLPK with:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">glpk</span><span class="o">-</span><span class="n">utils</span> </pre></div> </div> <p>There are similar packages for other GNU/Linux distributions. For Windows there is <a class="reference external" href="http://winglpk.sourceforge.net/">WinGLPK</a>. For Mac OS X <a class="reference external" href="http://brew.sh/">brew</a> is your friend.</p> </div> <div class="section" id="<API key>"> <h2>Installing the backend of the web app<a class="headerlink" href=" <p>If you have the Python package installed ( <code class="docutils literal"><span class="pre">pip3</span></code>) just run:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">pip3</span> <span class="n">install</span> <span class="o">-</span><span class="n">r</span> <span class="n">requirements</span><span class="o">.</span><span class="n">txt</span> </pre></div> </div> <p>Please make sure to install the dependencies for Python 3, since the web application is programmed in Python 3</p> </div> <div class="section" id="<API key>"> <h2>Backend dependencies<a class="headerlink" href=" <p>The web application relies on the following packages which are not contained in a standard Python installation:</p> <ul class="simple"> <li>pypsa</li> <li>numpy</li> <li>scipy</li> <li>pandas</li> <li>networkx</li> <li>pyomo</li> <li>moreitertools</li> <li>Django</li> </ul> <p>Using above installation technique these packages are installed.</p> </div> <div class="section" id="getting-nodejs"> <h2>Getting Nodejs<a class="headerlink" href=" <p>NodeJs can be installed by going to <a href=" To install NodeJs run</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">node</span> </pre></div> </div> <p>Also webpack is needed wich may be installed using npm:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">npm</span> <span class="n">install</span> <span class="n">webpack</span> <span class="o">-</span><span class="n">g</span> </pre></div> </div> <p>After installing Node.Js and webpack run</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">npm</span> <span class="n">install</span> </pre></div> </div> <p>In the asset folder located in mysite/assets</p> <p>Also make sure to run</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">webpack</span> <span class="o">--</span><span class="n">config</span> <span class="n">webpack</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">js</span> <span class="o">--</span><span class="n">watch</span> </pre></div> </div> <p>In side the asset folder</p> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="<API key>"> <h3><a href="index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Installation</a><ul> <li><a class="reference internal" href="#getting-python">Getting Python</a></li> <li><a class="reference internal" href="#<API key>">Getting a solver for linear optimisation</a></li> <li><a class="reference internal" href="#<API key>">Installing the backend of the web app</a></li> <li><a class="reference internal" href="#<API key>">Backend dependencies</a></li> <li><a class="reference internal" href="#getting-nodejs">Getting Nodejs</a></li> </ul> </li> </ul> <div class="relations"> <h3>Related Topics</h3> <ul> <li><a href="index.html">Documentation overview</a><ul> <li>Previous: <a href="index.html" title="previous chapter">Welcome to Web App Day Ahead Clearing&#8217;s documentation!</a></li> <li>Next: <a href="tut.html" title="next chapter">Tutorial</a></li> </ul></li> </ul> </div> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/install.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <div><input type="text" name="q" /></div> <div><input type="submit" value="Go" /></div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="footer"> &copy;2017, Martyn van Dijke & Yuanlong Li . | Powered by <a href="http://sphinx-doc.org/">Sphinx 1.5.5</a> &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a> | <a href="_sources/install.rst.txt" rel="nofollow">Page source</a> </div> </body> </html>
'use strict'; /** * Module dependencies */ var _ = require('lodash'); /** * Extend user's controller */ module.exports = _.extend( require('./users.authentication.controller'), require('./users.authorization.controller'), require('./users.profile.controller') );
#if defined(__APPLE__) || defined(__OpenBSD__) #include <sys/syslimits.h> #include <sys/stat.h> #endif #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <errno.h> #include <fcntl.h> #include <ctype.h> #include <dirent.h> #include <unistd.h> #include <regex.h> #ifdef CYGWIN #include <limits.h> /* PATH_MAX */ #endif /* pacman */ #include "util.h" #include "list.h" #include "conf.h" #include "log.h" extern int maxcols; extern config_t *config; extern int neednl; /* does the same thing as 'mkdir -p' */ int makepath(char *path) { char *orig, *str, *ptr; char full[PATH_MAX] = ""; mode_t oldmask; oldmask = umask(0000); orig = strdup(path); str = orig; while((ptr = strsep(&str, "/"))) { if(strlen(ptr)) { struct stat buf; strcat(full, "/"); strcat(full, ptr); if(stat(full, &buf)) { if(mkdir(full, 0755)) { free(orig); umask(oldmask); return(1); } } } } free(orig); umask(oldmask); return(0); } /* does the same thing as 'rm -rf' */ int rmrf(char *path) { int errflag = 0; struct dirent *dp; DIR *dirp; if(!unlink(path)) { return(0); } else { if(errno == ENOENT) { return(0); } else if(errno == EPERM) { /* fallthrough */ } else if(errno == EISDIR) { /* fallthrough */ } else if(errno == ENOTDIR) { return(1); } else { /* not a directory */ return(1); } if((dirp = opendir(path)) == (DIR *)-1) { return(1); } for(dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) { if(dp->d_ino) { char name[PATH_MAX]; sprintf(name, "%s/%s", path, dp->d_name); if(strcmp(dp->d_name, "..") && strcmp(dp->d_name, ".")) { errflag += rmrf(name); } } } closedir(dirp); if(rmdir(path)) { errflag++; } return(errflag); } return(0); } /* output a string, but wrap words properly with a specified indentation */ void indentprint(char *str, int indent) { char *p = str; int cidx = indent; while(*p) { if(*p == ' ') { char *next = NULL; int len; p++; if(p == NULL || *p == ' ') continue; next = strchr(p, ' '); if(next == NULL) { next = p + strlen(p); } len = next - p; if(len > (maxcols-cidx-1)) { /* newline */ int i; fprintf(stdout, "\n"); for(i = 0; i < indent; i++) { fprintf(stdout, " "); } cidx = indent; } else { printf(" "); cidx++; } } fprintf(stdout, "%c", *p); p++; cidx++; } } /* Condense a list of strings into one long (space-delimited) string */ char *buildstring(list_t *strlist) { char *str; int size = 1; list_t *lp; for(lp = strlist; lp; lp = lp->next) { size += strlen(lp->data) + 1; } str = (char *)malloc(size); if(str == NULL) { ERR(NL, "failed to allocated %d bytes\n", size); } str[0] = '\0'; for(lp = strlist; lp; lp = lp->next) { strcat(str, lp->data); strcat(str, " "); } /* shave off the last space */ str[strlen(str)-1] = '\0'; return(str); } /* Convert a string to uppercase */ char *strtoupper(char *str) { char *ptr = str; while(*ptr) { (*ptr) = toupper(*ptr); ptr++; } return str; } /* Trim whitespace and newlines from a string */ char *strtrim(char *str) { char *pch = str; while(isspace(*pch)) { pch++; } if(pch != str) { memmove(str, pch, (strlen(pch) + 1)); } pch = (char *)(str + (strlen(str) - 1)); while(isspace(*pch)) { pch } *++pch = '\0'; return str; } /* match a string against a regular expression */ int reg_match(char *string, char *pattern) { int result; regex_t reg; if(regcomp(&reg, pattern, REG_EXTENDED | REG_NOSUB | REG_ICASE) != 0) { ERR(NL, "%s is not a valid regular expression.\n", pattern); return(-1); } result = regexec(&reg, string, 0, 0, 0); regfree(&reg); return(!(result)); } /* vim: set ts=2 sw=2 noet: */
package main import ( "database/sql" "encoding/json" "flag" "fmt" "io/ioutil" "net" "time" // "log" "net/http" "os" "runtime" "strconv" "html/template" ) const version = "0.0.0" const indexFile = "index.html" const starTemplateFile = "startemplate.html" var port uint var dataservice string var filePath string func init() { const ( portDefault = 0 portUsage = "http serve port" dataserviceDefault = "" dataserviceUsage = "URL for data service" filePathDefault = "" filePathUsage = "Working directory, for html files" ) flag.UintVar(&port, "port", portDefault, portUsage) flag.UintVar(&port, "p", portDefault, portUsage+" (shorthand)") flag.StringVar(&dataservice, "data-service", dataserviceDefault, dataserviceUsage) flag.StringVar(&dataservice, "d", dataserviceDefault, dataserviceUsage+" (shorthand)") flag.StringVar(&filePath, "files", filePathDefault, filePathUsage) flag.StringVar(&filePath, "f", filePathDefault, filePathUsage+" (shorthand)") } func printUsage() { exeName := os.Args[0] fmt.Println(exeName + " " + version + " usage: ") fmt.Println("\t" + exeName + "-d data-service-url -p serve-port -f html-files-path") fmt.Println("flags:") flag.PrintDefaults() fmt.Println("example:\n\t" + exeName + "-d 192.168.0.42 -p 80 -f data") } type Star struct { Id int64 `json:"id"` Name string `json:"name"` X float64 `json:"x"` Y float64 `json:"y"` Z float64 `json:"z"` Color float32 `json:"color"` AbsoluteMagnitude float32 `json:"absolute-magnitude"` Spectrum string `json:"spectrum"` } func (star *Star) Json() []byte { bytes, err := json.Marshal(star) if err != nil { return nil ///< @todo fix to return JSON error } return bytes } func JsonToStar(starjson []byte) (Star, error) { var star Star err := json.Unmarshal(starjson, &star) if err != nil { return Star {}, err ///< @todo fix to return JSON error } return star, nil } type NullStar struct { Id sql.NullInt64 Name sql.NullString X sql.NullFloat64 Y sql.NullFloat64 Z sql.NullFloat64 Color sql.NullFloat64 AbsoluteMagnitude sql.NullFloat64 Spectrum sql.NullString } returns a Star, with zero values for any null values in the NullStar func (nstar *NullStar) Star() Star { var star Star if nstar.Id.Valid { star.Id = nstar.Id.Int64 } if nstar.Name.Valid { star.Name = nstar.Name.String } if nstar.X.Valid { star.X = nstar.X.Float64 } if nstar.Y.Valid { star.Y = nstar.Y.Float64 } if nstar.Z.Valid { star.Z = nstar.Z.Float64 } if nstar.Color.Valid { star.Color = float32(nstar.Color.Float64) } if nstar.AbsoluteMagnitude.Valid { star.AbsoluteMagnitude = float32(nstar.AbsoluteMagnitude.Float64) } if nstar.Spectrum.Valid { star.Spectrum = nstar.Spectrum.String } return star } func getstar(id int64) (Star, error) { response, err := http.Get("http://" + dataservice + "/star/" + strconv.FormatInt(id, 10)) if err != nil { return Star{}, err } starjson, err := ioutil.ReadAll(response.Body) response.Body.Close() if err != nil { return Star{}, err } star, err := JsonToStar(starjson) if err != nil { return Star{}, err } return star, nil } func reachable(uri string) bool { return true timeout := time.Second * 10 _, err := net.DialTimeout("tcp", uri, timeout) return err == nil } func main() { runtime.GOMAXPROCS(runtime.NumCPU()) flag.Parse() if dataservice == "" { printUsage() return } if(len(dataservice) > len("http: dataservice = dataservice[len("http: } if !reachable(dataservice) { fmt.Println("Could not reach data service " + dataservice) return } indexHtml, err := ioutil.ReadFile(filePath + "/" + indexFile) if err != nil { fmt.Println("Error reading index file: ") fmt.Println(err) return } starTemplate, err := template.ParseFiles(filePath + "/" + starTemplateFile) if err != nil { fmt.Println("Error reading star template file: ") fmt.Println(err) return } serveIndex := func(w http.ResponseWriter) error { w.Header().Add("Content-Type", "text/html") w.Header().Add("Content-Length", strconv.Itoa(len(indexHtml))) _, err = w.Write(indexHtml) return err }; serveStar := func(w http.ResponseWriter, id int64) error { star, err := getstar(id) if err != nil { return err } return starTemplate.Execute(w, star) }; http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { fmt.Println("Serving request to " + r.URL.Path) err := serveIndex(w) if err != nil { fmt.Println(err) return } }) http.HandleFunc("/star/", func(w http.ResponseWriter, r *http.Request) { fmt.Println("Serving request to " + r.URL.Path) staridStr := r.URL.Path[len("/star/"):] starid, err := strconv.ParseInt(staridStr, 10, 64) _, err = strconv.Atoi(staridStr) if err != nil { serveIndex(w) } err = serveStar(w, starid) if err != nil { fmt.Println(err) return } }) fmt.Println("Serving on " + strconv.Itoa(int(port)) + "...") http.ListenAndServe(":"+strconv.Itoa(int(port)), nil) }
<?php /* Safe sample input : use shell_exec to cat /tmp/tainted.txt sanitize : cast via + = 0.0 construction : interpretation */ $tainted = shell_exec('cat /tmp/tainted.txt'); $tainted += 0.0 ; $query = "//User[@id= $tainted ]"; $xml = simplexml_load_file("users.xml");//file load echo "query : ". $query ."<br /><br />" ; $res=$xml->xpath($query);//execution print_r($res); echo "<br />" ; ?>
function getDays(inDate) { var now = new Date(); var days = Math.floor((now - inDate) / 1000 / 60 / 60 / 24); if (days == 0) days = "Today"; else if (days == 1) days = "1 day ago"; else days = days + " days ago" return days; }; function getHeat(inVotes) { if (inVotes < 2) { return "hot0"; } else if (inVotes < 5) { return "hot1"; } else if (inVotes < 10) { return "hot2"; } else if (inVotes < 15) { return "hot3"; } else if (inVotes < 20) { return "hot4"; } else if (inVotes < 25) { return "hot5"; } else { return "hot6"; } } function getNews() { var promise = $.getJSON("http: promise.done(function(json) { var objArr = [] $(json).each(function(idx, obj) { var dat = { hl: obj.headline, link: obj.link, imageLink: obj.image, meta: obj.metaDescription, poster: obj.upVotes[0].upVotedByUsername, posted: obj.timePosted, upvotes: obj.rank, } dat["days"] = getDays(dat.posted); dat["heat"] = getHeat(parseInt(dat.upvotes)); objArr.push(dat); }); var n = objArr.length; for (var i = 0; i < n; i++) { //'<img src="' + objArr[i].imageLink + '"/>' + $(".listing").append('<article class="' + objArr[i].heat + '">' + '<img class="lazy" data-original="' + objArr[i].imageLink + '"/>' + '<div>' + objArr[i].days + '</div>' + '<div>' + objArr[i].upvotes + ' Upvotes</div>' + '<div>Posted by: ' + objArr[i].poster + '</div>' + '<h2>' + objArr[i].hl + '</h2>' + '<p>' + objArr[i].meta + '</p>' + '<a href="' + objArr[i].link + '">Read More</a>' + '</article>') } $(".lazy").lazyload({ effect : "fadeIn" }); }); promise.fail(function() { $('body').append('<p>Oh no, something went wrong!</p>'); }); }; function main() { getNews(); }; $('document').ready(main);
#include "rain.h" Rain::Rain(const Shader &shader, const bool is_debug) : // Setup Constants MAX_PARTICLES_(100000), // Setup shader and uniforms shader_(shader), initialVerticesLoc_(glGetAttribLocation(shader_.Id, "initial_vertices")), positionsLoc_( glGetAttribLocation(shader_.Id, "displaced_vertices")), colourLoc_( glGetAttribLocation(shader_.Id, "colour")), camRightHandle_(<API key>(shader_.Id, "cam_right")), camUpHandle_( <API key>(shader_.Id, "cam_up")), // Setup VAO rain_vao_(CreateVao()) { // DEBUGGING PRINTS to stderr (if error) and stdout (else) if (is_debug) { const char * shader_name = "Rain shader"; // Check the attrib locations in debugging mode Shader::CheckAttrib(initialVerticesLoc_, "initialVerticesLoc_", shader_name); Shader::CheckAttrib(positionsLoc_, "positionsLoc_", shader_name); Shader::CheckAttrib(colourLoc_, "colourLoc_", shader_name); // Check the uniform locations in debugging mode Shader::CheckHandle(camRightHandle_, "camRightHandle_", shader_name); Shader::CheckHandle(camUpHandle_, "camUpHandle_", shader_name); } // Initialize the particle buffers particles_ = new Particle[MAX_PARTICLES_]; <API key> = new GLfloat[MAX_PARTICLES_ * 3]; <API key> = new GLfloat[MAX_PARTICLES_ * 4]; // Set the range in which the rain is generated maxx_ = 100.0f; maxy_ = 30.0f; maxz_ = 100.0f; // Run initialization Init(); } Rain::~Rain() { delete [] particles_; delete [] <API key>; delete [] <API key>; } GLuint Rain::CreateVao() { glUseProgram(shader_.Id); // Initial declaration of the shape of the 'raindrop' // these values can be modified to change the shape of the rain static const GLfloat vertices[] = { -0.01f, -0.05f, 0.0f, 0.01f, -0.05f, 0.0f, -0.01f, 0.05f, 0.0f, 0.01f, 0.05f, 0.0f, }; // Create a VAO for the rain GLuint vao; glGenVertexArrays(1, &vao); glBindVertexArray(vao); // VBO containing a single instance of a particle glGenBuffers(1, &<API key>); glBindBuffer(GL_ARRAY_BUFFER, <API key>); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); // VBO containing position of each particle instance glGenBuffers(1, &<API key>); glBindBuffer(GL_ARRAY_BUFFER, <API key>); // Initially set data to NULL glBufferData(GL_ARRAY_BUFFER, MAX_PARTICLES_ * 3 * sizeof(GLfloat), NULL, GL_STREAM_DRAW); // VBO containing colours of each particle instance glGenBuffers(1, &<API key>); glBindBuffer(GL_ARRAY_BUFFER, <API key>); // Initially set data to NULL glBufferData(GL_ARRAY_BUFFER, MAX_PARTICLES_ * 4 * sizeof(GLfloat), NULL, GL_STREAM_DRAW); // Unbind glBindVertexArray(0); glBindBuffer(GL_ARRAY_BUFFER, 0); return vao; } void Rain::Init() { // Random generation engines to generate uniform floats between a range std::random_device rd; std::mt19937 eng(rd()); // One for each axis std::<API key><> xgen(0,maxx_); std::<API key><> ygen(0,maxy_); std::<API key><> zgen(0,maxz_); // Initialize the position/speed/colour for all particles // int maxx = 50.0f; // int maxy = 20.0f; // int maxz = 50.0f; for (int i = 0; i < MAX_PARTICLES_; i++) { // Randomly generate the positions of the particle particles_[i].pos = glm::vec3(xgen(eng), ygen(eng), zgen(eng)); particles_[i].speed = 0.1f; // Slightly randomize colours between a certain range (Blue/Blue-Grey) float red = (rand() % 49 + 24) / 255.0f; float green = (rand() % 77 + 17) / 255.0f; float blue = (rand() % 176 + 70) / 255.0f; particles_[i].colour = glm::vec4(red, green, blue, 1.0f); } } void Rain::UpdatePosition() { // Updates particles and puts in data arrays for (int i = 0; i < MAX_PARTICLES_; i++) { // Reduce y so the rain travels towards the ground particles_[i].pos.y -= particles_[i].speed; // Reduce x so rain appears to be sweeping across the scene particles_[i].pos.x += particles_[i].speed; if(particles_[i].pos.y < -5) { particles_[i].pos.y = maxy_ - (rand() % 5); } if (particles_[i].pos.x > maxx_) { particles_[i].pos.x = 0.0f; } // Store the particles data inside the buffer, to be put in to the VBO <API key>[i*3 + 0] = particles_[i].pos.x; <API key>[i*3 + 1] = particles_[i].pos.y; <API key>[i*3 + 2] = particles_[i].pos.z; <API key>[i*4 + 0] = particles_[i].colour.x; <API key>[i*4 + 1] = particles_[i].colour.y; <API key>[i*4 + 2] = particles_[i].colour.z; <API key>[i*4 + 3] = particles_[i].colour.w; } } void Rain::Render(Camera &camera, Object * car, Skybox * skybox) const { glUseProgram(shader_.Id); // Enable blending so that rain is slightly transparent, transparency is set in the frag shader glEnable(GL_BLEND); glBlendFunc( GL_SRC_ALPHA, <API key> ); // Cull Appropriately glCullFace(GL_BACK); glBindVertexArray(rain_vao_); // Set the Buffer subdata to be the positions array that we filled in UpdatePosition() glBindBuffer(GL_ARRAY_BUFFER, <API key>); glBufferData(GL_ARRAY_BUFFER, MAX_PARTICLES_ * 3 * sizeof(GLfloat), NULL, GL_STREAM_DRAW); glBufferSubData(GL_ARRAY_BUFFER, 0, MAX_PARTICLES_ * 3 * sizeof(GLfloat), <API key>); // Set the colour subdata to be the positions array that we filled in UpdatePosition() glBindBuffer(GL_ARRAY_BUFFER, <API key>); glBufferData(GL_ARRAY_BUFFER, MAX_PARTICLES_ * 4 * sizeof(GLfloat), NULL, GL_STREAM_DRAW); glBufferSubData(GL_ARRAY_BUFFER, 0, MAX_PARTICLES_ * 4 * sizeof(GLfloat), <API key>); // Translate based on the car, so the rain follows the car const glm::mat4 object_translate = glm::translate(glm::mat4(1.0f), glm::vec3(car->translation().x, 1.0f , car->translation().z)); // Translate the rain so its centre is roughly around the centre of the car const glm::mat4 rain_translate = glm::translate(glm::mat4(1.0f), glm::vec3(-maxx_ / 2.0f, 0.0f, -maxz_ / 2.0f)); // Get the view and projection matrices from the camera const glm::mat4 &VIEW = camera.view_matrix(); const glm::mat4 &PROJECTION = camera.projection_matrix(); // Calculate MVP const glm::mat4 MODELVIEW = VIEW * object_translate * rain_translate; const glm::mat4 MVP = PROJECTION * MODELVIEW; glUniformMatrix4fv(shader_.mvpHandle, 1, false, glm::value_ptr(MVP)); // The cameras up vector is (0,1,0) transform it to world space by // by multiplying my camera->world (view) matrix inverse glUniform3f(camRightHandle_, VIEW[0][0], VIEW[1][0], VIEW[2][0]); glUniform3f(camUpHandle_ , VIEW[0][1], VIEW[1][1], VIEW[2][1]); glBindBuffer(GL_ARRAY_BUFFER, <API key>); <API key>(initialVerticesLoc_); <API key>(initialVerticesLoc_, 3, GL_FLOAT, GL_FALSE, 0, 0); glBindBuffer(GL_ARRAY_BUFFER, <API key>); <API key>(positionsLoc_); <API key>(positionsLoc_, 3, GL_FLOAT, GL_FALSE, 0, 0); glBindBuffer(GL_ARRAY_BUFFER, <API key>); <API key>(colourLoc_); <API key>(colourLoc_, 4, GL_FLOAT, GL_FALSE, 0, 0); // Needed for instanced draws <API key>(initialVerticesLoc_, 0); // Same every particle <API key>(positionsLoc_, 1); // One per particle <API key>(colourLoc_, 1); // One per particle // Equivalent to looping over all particles (with 4 vertices) <API key>(GL_TRIANGLE_STRIP, 0, 4, MAX_PARTICLES_); // Unbind glBindVertexArray(0); glDisable(GL_BLEND); }
#ifndef <API key> #define <API key> #ifdef __cplusplus extern "C" { #endif #include <stdbool.h> #include "<API key>.h" /** @brief initialize list management @return #true is initialize successfully */ bool <API key> ( void ); /** @brief termiante list management @return #true is terminated successfully */ bool <API key> ( void ); /** @brief insert node into list @details node->key will be populated upon insertion @param[in] node node to insert @return #true is inserted successfully */ bool <API key> ( MALLOCNODE * node ); /** @brief remove node from list based on node->key @param[in] node node to remove @return #true is inserted successfully */ bool <API key> ( MALLOCNODE * node ); /** @brief find memory pointer (node->mallocPointer) @return returns !NULL on success */ MALLOCNODE * <API key> ( void * memptr ); /** @brief get entry count @return returns list size */ uint32_t <API key> ( void ); /** @brief get node at index @brief index node to retrive @return returns !NULL on success */ MALLOCNODE * <API key> ( uint32_t index ); #ifdef __cplusplus } #endif #endif /* <API key> */
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="de"> <head> <!-- Generated by javadoc (version 1.7.0_10) on Sun Mar 03 20:29:33 CET 2013 --> <title>Uses of Class de.hdm.hettich.studienarbeit.view.DefectView</title> <meta name="date" content="2013-03-03"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><! if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class de.hdm.hettich.studienarbeit.view.DefectView"; } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar_top"> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../de/hdm/hettich/studienarbeit/view/DefectView.html" title="class in de.hdm.hettich.studienarbeit.view">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?de/hdm/hettich/studienarbeit/view/class-use/DefectView.html" target="_top">Frames</a></li> <li><a href="DefectView.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip-navbar_top"> </a></div> <div class="header"> <h2 title="Uses of Class de.hdm.hettich.studienarbeit.view.DefectView" class="title">Uses of Class<br>de.hdm.hettich.studienarbeit.view.DefectView</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../de/hdm/hettich/studienarbeit/view/DefectView.html" title="class in de.hdm.hettich.studienarbeit.view">DefectView</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#de.hdm.hettich.studienarbeit.factory">de.hdm.hettich.studienarbeit.factory</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="de.hdm.hettich.studienarbeit.factory"> </a> <h3>Uses of <a href="../../../../../../de/hdm/hettich/studienarbeit/view/DefectView.html" title="class in de.hdm.hettich.studienarbeit.view">DefectView</a> in <a href="../../../../../../de/hdm/hettich/studienarbeit/factory/package-summary.html">de.hdm.hettich.studienarbeit.factory</a></h3> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../de/hdm/hettich/studienarbeit/factory/package-summary.html">de.hdm.hettich.studienarbeit.factory</a> that return <a href="../../../../../../de/hdm/hettich/studienarbeit/view/DefectView.html" title="class in de.hdm.hettich.studienarbeit.view">DefectView</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../de/hdm/hettich/studienarbeit/view/DefectView.html" title="class in de.hdm.hettich.studienarbeit.view">DefectView</a></code></td> <td class="colLast"><span class="strong">Defect2ViewFactory.</span><code><strong><a href="../../../../../../de/hdm/hettich/studienarbeit/factory/Defect2ViewFactory.html#<API key>(de.hdm.hettich.studienarbeit.bo.Defect, float)"><API key></a></strong>(<a href="../../../../../../de/hdm/hettich/studienarbeit/bo/Defect.html" title="class in de.hdm.hettich.studienarbeit.bo">Defect</a>&nbsp;defect, float&nbsp;scaleFactor)</code> <div class="block">In dieser Methode wird der <code>DefectView</code> erzeugt, als Information werden <code>Defect</code> und der aktuelle Skalierungsfaktor übergeben.</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <div class="bottomNav"><a name="navbar_bottom"> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../de/hdm/hettich/studienarbeit/view/DefectView.html" title="class in de.hdm.hettich.studienarbeit.view">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?de/hdm/hettich/studienarbeit/view/class-use/DefectView.html" target="_top">Frames</a></li> <li><a href="DefectView.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip-navbar_bottom"> </a></div> </body> </html>
require "rollerskates/orm/helpers/<API key>" require "rollerskates/orm/associable" require "rollerskates/orm/query_builder" module Rollerskates class BaseModel extend Rollerskates::Associable extend Rollerskates::DatabaseTableHelper def initialize(values = {}) hash_to_properties(values) unless values.empty? end def save self.class.query.build(to_hash).save end def self.find(value) query.where({ id: value }, true) end def self.find_by(find_conditions) query.where(find_conditions, true) end def self.last(number = nil) query.order("id DESC").first(number) end def self.create(create_parameters) query.build(create_parameters).save end def self.all query end def self.query Rollerskates::QueryBuilder.new self end def self.method_missing(method, *args, &block) query.send(method, *args, &block) end private def hash_to_properties(hash) hash.each do |column, value| <API key>("@#{column}", value) end end def to_hash hashed_object = {} instance_variables.each do |property| hashed_object[property[1..-1].to_sym] = <API key>(property.to_s) end hashed_object end end end
{% extends "public/components/base.html" %} {% load static %} {% block title %}Open States Bulk Geo Data{% endblock %} {% block og_title %}Open States Bulk Geo Data{% endblock %} {% block description %}Download bulk geo data from Open States{% endblock %} {% block content %} <h1 class="heading--large">Open States Boundary Data</h1> <p>We provide files that serve as a static API for obtaining simplified GeoJSON describing the boundaries of legislative districts.</p> <p>If you obtain an Open Civic Data Division ID (e.g. <code>ocd-division/country:us/state:ks/sldl:1</code> you can convert it to a URL like <code>https://data.openstates.org/boundaries/2018/ocd-division/country:us/state:ks/sldl:1.json</code>.</p> <p>The URL consists of a few parts:</p> <ul> <li><code>https://data.openstates.org/boundaries/</code> - base URL</li> <li><code>2018</code> - division issue year, currently only 2018 supported (divisions do not change most years)</li> <li><code>ocd-division/country:us/state:ks/sldl:1</code> - Open Civic Data Division ID</li> <li><code>json</code> - end URL with `.json`</li> </ul> <section> <h2 class="heading--medium">File Format</h2> <ul> <li> <code>division_id</code> - Open Civic Data Division ID, same as URL.</li> <li> <code>year</code> - Issue year for Boundary, same as URL.</li> <li> <code>centroid</code> - GeoJSON Point representing the centroid of this boundary.</li> <li> <code>extent</code> - Coordinates for upper-left &amp; lower-right extent of boundary.</li> <li> <code>shape</code> - Simplified GeoJSON MultiPolygon for display purposes. This data has been simplified (losing some detail to gain speed when drawing/processing) and should be used for display but not intersection/point-in-polygon testing.</li> <li> <code>metadata</code> - Metadata that was provided by issuer, typically a bit of Census data. No particular guarantee is made about what is here.</li> </ul> </section> <section> <h2 class="heading--medium">Obtaining ocd-division IDs</h2> <p>If you're using Open States data you'll see ocd-division IDs in a few places:</p> <ul> <li>The id attribute on <a href="https://docs.openstates.org/api-v2/types/#divisionnode">DivisionNode</a> in our GraphQL API.</li> </ul> </section> {% endblock %}
<?php namespace Skaphandrus\AppBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\<API key>; use Symfony\Component\OptionsResolver\<API key>; class <API key> extends AbstractType { /** * @param <API key> $builder * @param array $options */ public function buildForm(<API key> $builder, array $options) { $builder ->add('translations', 'a2lix_translations', array( 'fields' => array( 'name' => array( 'attr' => array('class' => 'form-control'), ) ) )) ->add('orderBy', 'text', array('attr' => array('class' => 'form-control'))) ->add('isCumulative') ->add('type') ->add('selectionType', 'choice', array( 'choices' => array('1' => 'Normal', '2' => 'Slider'), 'required' => true) ) ->add('groups') ->add('characters', 'collection', array('type' => new <API key>(), 'allow_add' => TRUE, 'prototype' => TRUE, 'by_reference' => FALSE, )) ; } /** * @param <API key> $resolver */ public function setDefaultOptions(<API key> $resolver) { $resolver->setDefaults(array( 'data_class' => 'Skaphandrus\AppBundle\Entity\<API key>' )); } /** * @return string */ public function getName() { return '<API key>'; } }
class NagiosConfig < CloudstackNagios::Base TEMPLATE_DIR = File.join(File.dirname(__FILE__), '..', 'templates') desc "generate [type]", "generate all nagios configs" option :bin_path, desc: "absolute path to the nagios-cloudstack binary" option :template, desc: "Path of ERB template to use. Only valid when generating a single configuration", aliases: '-t' option :if_speed, desc: 'network interface speed in bits per second', type: :numeric, default: 1000000, aliases: '-s' option :ssh_key, desc: 'ssh private key to use', default: '/var/lib/cloud/management/.ssh/id_rsa' option :ssh_port, desc: 'ssh port to use', type: :numeric, default: 3922, aliases: '-p' option :over_provisioning, type: :numeric, default: 1.0 def generate(*configs) configs = get_configs(configs) if configs.size == 0 say "Please specify a valid configuration.", :green say "Possible values are..." invoke "nagios_config:list", [] exit end routers = configs.include?("router_hosts") ? cs_routers : nil system_vms = configs.include?("system_vm_hosts") ? cs_system_vms : nil pools = configs.include?("storage_pools") ? storage_pools : nil zones = client.list_zones config_name = configs.size == 1 ? "#{configs[0]} configuration" : "all configurations" header = load_template(File.join(TEMPLATE_DIR, "header.cfg.erb")) output = header.result( config_name: config_name, date: date_string ) configs.each do |config| if configs.size == 1 && options[:template] tmpl_file = options[:template] else tmpl_file = File.join(TEMPLATE_DIR, "cloudstack_#{config}.cfg.erb") end template = load_template(tmpl_file) output += template.result( routers: routers, system_vms: system_vms, bin_path: bin_path, if_speed: options[:if_speed], config_file: options[:config], zones: zones, capacity_types: Capacity::CAPACITY_TYPES, storage_pools: pools, over_provisioning: options[:over_provisioning], ssh_key: options[:ssh_key], ssh_port: options[:ssh_port] ) end footer = load_template(File.join(TEMPLATE_DIR, "footer.cfg.erb")) output += footer.result( config_name: config_name ) puts output end desc "list", "show a list of possible configurations which can be generated." def list configs = get_configs puts ["all"] << configs end no_commands do def get_configs(configs = []) all_configs = %w(hostgroups zone_hosts router_hosts router_services system_vm_hosts system_vm_services capacities async_jobs snapshots storage_pools) if configs.size == 0 return all_configs else if configs.size == 1 && configs[0].downcase == "all" return all_configs end return all_configs.select { |config| configs.include? config } end end def date_string Time.new.strftime("%d.%m.%Y - %H:%M:%S") end def bin_path unless options[:bin_path] return '' else return options[:bin_path].end_with?('/') ? options[:bin_path] : options[:bin_path] + "/" end end end end
/* *Removes the player when he is dead and resets him. */ game.HeroDeathManager = Object.extend({ //Is he dead, if so we will execute some stuff init: function(x, y, settings){ this.alwaysUpdate = true; }, update: function(){ if(game.data.player.dead){ me.game.world.removeChild(game.data.player); me.game.world.removeChild(game.data.miniPlayer); me.state.current().resetPlayer(10, 0); } return true; } });
# Master Makefile for building the server. # Makefile for firmware/arm/server # Location: firmware/arm/server/Makefile # Authors: Noah Huesser <yatekii@yatekii.ch> # Raphael Frey <rmfrey@alpenwasser.net> # Call Structure # . this file # Called by: user # Working Directory: firmware/arm/server EXT_DIR := $(shell pwd)/external EXT_MF := Makefile# ./external/Makefile ARM_MF := Makefile.arm#./Makefile.arm OSX_MF := Makefile.osx#./Makefile.osx # NOTE: # firmware/arm/server/external/Makefile and # firmware/arm/server/Makefile.arm have default values set in case they are # not called from this file. In the interest of everyone's sanity, make sure # that those values and the ones here are the same. # These values will override the values in the called Makefiles. OSSL_VER := 1.1.0e ZL_VER := 1.2.11 MF_ARGS := OSSL_VER=$(OSSL_VER) ZL_VER=$(ZL_VER) all: external arm # External libraries .PHONY: external external: make -C $(EXT_DIR) -f $(EXT_MF) $(MF_ARGS) all # The server itself, for ARM arm: make -f $(ARM_MF) $(MF_ARGS) all # The server itself, for macOS osx: make -f $(OSX_MF) all clean: make -f Makefile.osx clean make -C $(EXT_DIR) clean
package com.percero.amqp; import java.io.IOException; import org.codehaus.jackson.JsonGenerator; import org.codehaus.jackson.<API key>; import org.codehaus.jackson.map.JsonSerializer; import org.codehaus.jackson.map.SerializerProvider; import com.percero.agents.sync.vo.BaseDataObject; import com.percero.agents.sync.vo.ClassIDPair; public class OneToSerializer extends JsonSerializer<BaseDataObject> { @Override public void serialize(BaseDataObject ob, JsonGenerator gen, SerializerProvider provider) throws IOException, <API key> { // TODO Auto-generated method stub gen.writeObject(new ClassIDPair(ob.getID(), ob.getClass().getName())); } }
<?php namespace App\Providers; use Illuminate\Support\Facades\Route; use Illuminate\Foundation\Support\Providers\<API key> as ServiceProvider; class <API key> extends ServiceProvider { /** * This namespace is applied to the controller routes in your routes file. * * In addition, it is set as the URL generator's root namespace. * * @var string */ protected $namespace = 'App\Http\Controllers'; /** * Removes one or more '@' characters from the beginning * of the string, if they are there. * * Primarily targeted towards /twitch routes where * `@` is used to mention Twitch usernames and thus causing a 404. * * In this scenario it should just remove the first `@` characters and continue * passing the value to the controller. * * @param string $value * * @return string */ private function removeAtSigns($value) { return ltrim($value, '@'); } /** * Define your route model bindings, pattern filters, etc. * * @return void */ public function boot() { /** * Remove one or more '@' if they're at the * beginning of the parameter. */ Route::bind('channel', function($channel) { return $this->removeAtSigns($channel); }); Route::bind('user', function($user) { return $this->removeAtSigns($user); }); $this->routes(function () { Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/web.php')); Route::prefix('api') ->middleware('api') ->namespace($this->namespace) ->group(base_path('routes/api.php')); }); parent::boot(); } /** * Define the routes for the application. * * @return void */ public function map() { $this->mapWebRoutes(); $this->mapApiRoutes(); } /** * These routes all receive session state, CSRF protection, etc. * * @return void */ protected function mapWebRoutes() { Route::middleware('web') ->namespace($this->namespace) ->group(base_path('routes/web.php')); } /** * Define the "api" routes for the application. * * These routes are typically stateless. * * @return void */ protected function mapApiRoutes() { Route::prefix('api') ->middleware('api') ->namespace($this->namespace) ->group(base_path('routes/api.php')); } }
using ServiceStack; namespace Demo.Presentation.ServiceStack.Authentication.Users.Models { [Api("Authentication")] [Route("/user/logout", "POST")] public class AuLogout : Infrastructure.Commands.ServiceCommand { // Manual logout, timeout, or other public string Event { get; set; } } }
package com.azure.ai.metricsadvisor; import com.azure.ai.metricsadvisor.administration.<API key>; import com.azure.ai.metricsadvisor.models.<API key>; import com.azure.ai.metricsadvisor.models.ErrorCodeException; import com.azure.ai.metricsadvisor.models.<API key>; import com.azure.ai.metricsadvisor.models.<API key>; import com.azure.ai.metricsadvisor.models.<API key>; import com.azure.ai.metricsadvisor.models.<API key>; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import io.netty.handler.codec.http.HttpResponseStatus; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import reactor.test.StepVerifier; import java.time.Duration; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; import static com.azure.ai.metricsadvisor.TestUtils.<API key>; import static com.azure.ai.metricsadvisor.TestUtils.INCORRECT_UUID; import static com.azure.ai.metricsadvisor.TestUtils.<API key>; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; public class AnomalyAlertTest extends <API key> { private <API key> client; @BeforeAll static void beforeAll() { StepVerifier.setDefaultTimeout(Duration.ofSeconds(30)); } @AfterAll static void afterAll() { StepVerifier.resetDefaultTimeout(); } /** * Verifies the result of the list anomaly alert configuration method when no options specified. */ @ParameterizedTest(name = <API key>) @MethodSource("com.azure.ai.metricsadvisor.TestUtils#getTestParameters") void <API key>(HttpClient httpClient, <API key> serviceVersion) { // Arrange client = <API key>(httpClient, serviceVersion).buildClient(); <API key>(<API key> -> { List<<API key>> <API key> = new ArrayList<>(); List<<API key>> <API key> = <API key>.stream().map(inputAnomalyAlert -> client.<API key>(inputAnomalyAlert)) .collect(Collectors.toList()); // Act final AtomicInteger i = new AtomicInteger(-1); client.<API key>(<API key>.get(i.incrementAndGet()) .<API key>().get(i.get()).<API key>()) .forEach(<API key>::add); final List<String> <API key> = <API key> .stream() .map(<API key>::getId) .collect(Collectors.toList()); final List<<API key>> actualList = <API key>.stream().filter(actualConfiguration -> <API key> .contains(actualConfiguration.getId())) .collect(Collectors.toList()); // Assert assertEquals(<API key>.size(), actualList.size()); <API key>.sort(Comparator.comparing(<API key>::getName)); actualList.sort(Comparator.comparing(<API key>::getName)); <API key>.forEach(<API key> -> <API key>(<API key>, actualList.get(i.get()))); <API key>.forEach(<API key> -> client.<API key>(<API key>.get(i.get()) .<API key>().get(i.get()).<API key>())); }); } // Get Anomaly Alert Configuration /** * Verifies that an exception is thrown for null detection configuration Id parameter. */ @ParameterizedTest(name = <API key>) @MethodSource("com.azure.ai.metricsadvisor.TestUtils#getTestParameters") public void <API key>(HttpClient httpClient, <API key> serviceVersion) { // Arrange client = <API key>(httpClient, serviceVersion).buildClient(); // Act & Assert Exception exception = assertThrows(<API key>.class, () -> client.<API key>(null)); assertEquals(exception.getMessage(), "'<API key>' is required."); } /** * Verifies that an exception is thrown for invalid alert configuration Id. */ @ParameterizedTest(name = <API key>) @MethodSource("com.azure.ai.metricsadvisor.TestUtils#getTestParameters") public void <API key>(HttpClient httpClient, <API key> serviceVersion) { // Arrange client = <API key>(httpClient, serviceVersion).buildClient(); // Act & Assert Exception exception = assertThrows(<API key>.class, () -> client.<API key>(INCORRECT_UUID)); assertEquals(exception.getMessage(), <API key>); } /** * Verifies a valid alert configuration info is returned with response for a valid alert configuration Id. */ @ParameterizedTest(name = <API key>) @MethodSource("com.azure.ai.metricsadvisor.TestUtils#getTestParameters") public void <API key>(HttpClient httpClient, <API key> serviceVersion) { // Arrange client = <API key>(httpClient, serviceVersion).buildClient(); final AtomicReference<String> <API key> = new AtomicReference<>(); <API key>(<API key> -> { final <API key> <API key> = <API key>.get(0); final <API key> createdAnomalyAlert = client.<API key>(<API key>); <API key>.set(createdAnomalyAlert.getId()); // Act & Assert Response<<API key>> <API key> = client.<API key>(<API key>.get(), Context.NONE); assertEquals(<API key>.getStatusCode(), HttpResponseStatus.OK.code()); <API key>(createdAnomalyAlert, <API key>.getValue()); }); client.<API key>(<API key>.get()); } // Create Anomaly alert configuration /** * Verifies valid anomaly alert configuration created for required anomaly alert configuration details. */ @ParameterizedTest(name = <API key>) @MethodSource("com.azure.ai.metricsadvisor.TestUtils#getTestParameters") public void <API key>(HttpClient httpClient, <API key> serviceVersion) { // Arrange client = <API key>(httpClient, serviceVersion).buildClient(); final AtomicReference<String> <API key> = new AtomicReference<>(); <API key>(<API key> -> { // Act & Assert <API key> <API key> = client.<API key>(<API key>); <API key>.set(<API key>.getId()); <API key>(<API key>, <API key>); }); client.<API key>(<API key>.get()); } /** * Verifies happy path for delete anomaly alert configuration. */ @ParameterizedTest(name = <API key>) @MethodSource("com.azure.ai.metricsadvisor.TestUtils#getTestParameters") public void <API key>(HttpClient httpClient, <API key> serviceVersion) { // Arrange client = <API key>(httpClient, serviceVersion).buildClient(); <API key>(<API key> -> { final <API key> createdAnomalyAlert = client.<API key>(<API key>); Response<Void> response = client.<API key>(createdAnomalyAlert.getId(), Context.NONE); assertEquals(response.getStatusCode(), HttpResponseStatus.NO_CONTENT.code()); // Act & Assert Exception exception = assertThrows(ErrorCodeException.class, () -> client.<API key>(createdAnomalyAlert.getId())); assertEquals(ErrorCodeException.class, exception.getClass()); final ErrorCodeException errorCodeException = ((ErrorCodeException) exception); assertEquals(HttpResponseStatus.NOT_FOUND.code(), errorCodeException.getResponse().getStatusCode()); }); } // Update anomaly alert configuration /** * Verifies previously created anomaly alert configuration can be updated successfully to update the metrics * operator. */ @ParameterizedTest(name = <API key>) @MethodSource("com.azure.ai.metricsadvisor.TestUtils#getTestParameters") public void <API key>(HttpClient httpClient, <API key> serviceVersion) { // Arrange client = <API key>(httpClient, serviceVersion).buildClient(); final AtomicReference<String> <API key> = new AtomicReference<>(); <API key>(inputAnomalyAlert -> { // Arrange final <API key> createdAnomalyAlert = client.<API key>(inputAnomalyAlert); <API key>.set(createdAnomalyAlert.getId()); final <API key> <API key> = new <API key>(<API key>, <API key>.forWholeSeries()); final <API key> <API key> = new <API key>("<API key>", <API key>.forWholeSeries()); // Act & Assert // add <API key> and operator final <API key> <API key> = client.<API key>( createdAnomalyAlert.<API key>( Arrays.asList(<API key>, <API key>)) .<API key>(<API key>.XOR)); <API key>(inputAnomalyAlert .<API key>(<API key>), <API key>); assertEquals(<API key>.XOR.toString(), <API key>.<API key>().toString()); // clear the set configurations, not allowed Exception exception = assertThrows(<API key>.class, () -> client.<API key>(createdAnomalyAlert.<API key>(null))); assertEquals("'alertConfiguration.<API key>' is " + "required and cannot be empty", exception.getMessage()); }); client.<API key>(<API key>.get()); } // TODO (savaity) update cannot be used to clear a set description? // /** // * Verifies update for a previously created anomaly alert configuration's description and clear off description. // */ // @ParameterizedTest(name = <API key>) // @MethodSource("com.azure.ai.metricsadvisor.TestUtils#getTestParameters") // public void <API key>(HttpClient httpClient, <API key> serviceVersion) { // // Arrange // client = <API key>(httpClient, serviceVersion).buildClient(); // final AtomicReference<String> <API key> = new AtomicReference<>(); // <API key>(inputAnomalyAlert -> { // // Arrange // final <API key> createdAnomalyAlert = // client.<API key>(inputAnomalyAlert).block(); // <API key>.set(createdAnomalyAlert.getId()); // // Act & Assert // StepVerifier.create(client.<API key>( // createdAnomalyAlert.setDescription("updated_description") // .<API key>(<API key>.XOR))) // .assertNext(updatedAnomalyAlert -> // assertEquals("updated_description", updatedAnomalyAlert.getDescription())).verifyComplete(); // // clear the set description, not allowed // StepVerifier.create(client.<API key>( // createdAnomalyAlert.setDescription(null))) // .assertNext(<API key> -> assertNull(<API key>.getDescription())) // .verifyComplete(); // client.<API key>(<API key>.get()).block(); /** * Verifies update for a removing hooks from a previously created anomaly alert configuration's. */ @ParameterizedTest(name = <API key>) @MethodSource("com.azure.ai.metricsadvisor.TestUtils#getTestParameters") public void <API key>(HttpClient httpClient, <API key> serviceVersion) { // Arrange client = <API key>(httpClient, serviceVersion).buildClient(); final AtomicReference<String> <API key> = new AtomicReference<>(); <API key>(inputAnomalyAlert -> { // Arrange final <API key> createdAnomalyAlert = client.<API key>(inputAnomalyAlert); <API key>.set(createdAnomalyAlert.getId()); // Act & Assert final <API key> <API key> = client.<API key>( createdAnomalyAlert.removeHookToAlert(ALERT_HOOK_ID)); assertEquals(0, <API key>.getIdOfHooksToAlert().size()); }); client.<API key>(<API key>.get()); } }
#pragma once namespace altertum { const unsigned ENTITY_INDEX_BITS = 22; const unsigned ENTITY_INDEX_MASK = (1 << ENTITY_INDEX_BITS) - 1; const unsigned <API key> = 8; const unsigned <API key> = (1 << <API key>) - 1; struct Entity { /** * Packed data: * 2: Lua litedata ID * @ENTITY_INDEX_BITS: entity id * @<API key>: instance number */ unsigned id; inline unsigned index() const { return id & ENTITY_INDEX_MASK; } inline unsigned generation() const { return (id >> ENTITY_INDEX_BITS) & <API key>; } }; } // namespace altertum
#pragma once #include "PR_Config.h" #include <filesystem> namespace PR { class PR_LIB_BASE SharedLibrary { public: SharedLibrary(); SharedLibrary(const std::filesystem::path& file); ~SharedLibrary(); void* symbol(const std::string& name) const; void unload(); inline operator bool() const { return mInternal != nullptr; } private: std::shared_ptr<struct <API key>> mInternal; }; } // namespace PR
// <API key>.h // NJLIGameEngine_iOS #ifndef <API key> #define <API key> #pragma mark Header #include "<API key>.h" #include "Util.h" #include "AbstractBuilder.h" #include "btSerializer.h" #include "lua.hpp" #include "Log.h" namespace njli { /** * Builder for <#CLASS#> */ ATTRIBUTE_ALIGNED16(class) <API key> : public AbstractBuilder { friend class WorldFactory; protected: <API key>(); <API key>(const <API key> &); <API key>(); virtual ~<API key>(); <API key> &operator=(const <API key> &); public: /** * Calculate the buffer size of this object. * * @return The buffer size. */ virtual s32 <API key>() const; /** * Serialize this object. * * @param btSerializer the serializer which does the serialize. */ virtual void serialize(void*, btSerializer*) const; /** * Get the type of ::jliObjectEnumType enum value, which this builder builds. * * @return The ::jliObjectEnumType enum value. */ virtual u32 getObjectType()const; /** * The name of this class. * * @return The name of this class. */ virtual const char *getClassName()const; /** * Get the type of ::jliObjectEnumType enum value. * * @return The ::jliObjectEnumType enum value. */ virtual s32 getType()const; /** * The string value for this object, which can be used for debugging. * * @return "The string value for this object. */ operator std::string() const; /** * Create an Array of instances of this class. * * @param size The amount of elements in the array. * * @return Pointer to the newly created array. */ static <API key> **createArray(const u32 size); /** * Destroy an Array of this class type. * * @param array The Pointer to the array to delete. */ static void destroyArray(<API key> **array, const u32 size = 0); /** * Create an instance of this class. * * @return Pointer to the newly created instance. */ static <API key> *create(); /** * Create a clone of an instance of this class. * * @param object The object to clone. * * @return Pointer to the newly created instance. */ static <API key> *clone(const <API key> &object); /** * Destroy an instance of this class. * * @param object The object to destroy. */ static void destroy(<API key> *object); /** * Load a lua table representation of this class. This is used for JLIM.create(object). * * @param object The object to load. * @param L The current lua state. * @param stack_index The stack index of the lua stack. */ static void load(<API key> &object, lua_State *L, int stack_index); /** * Get the type of ::jliObjectEnumType enum value. * * @return The ::jliObjectEnumType enum value. */ static u32 type(); }; } #endif /* <API key> */
import React, { Component, PropTypes } from 'react'; import AddressSuggest from 'components/AddressSuggest/AddressSuggest'; import Dropdown from 'components/Dropdown/Dropdown'; import styles from './Select.scss'; import find from 'lodash/find'; import forEach from 'lodash/forEach'; export default class LocationsSelect extends Component { static propTypes = { location: PropTypes.object, locations: PropTypes.array.isRequired, onSelect: PropTypes.func.isRequired, className: PropTypes.string }; constructor(props) { super(props); this.state = {value: 'none', list: this.convertDropdownList(props.locations)}; } componentWillMount() { const location = this.props.location; if (location) { this.onChoose(location.place_id); } } <API key>(nextProps) { this.setState({list: this.convertDropdownList(nextProps.locations)}); } onChoose = (value) => { const selected = find(this.state.list, {value: value}); this.setState({search: value === 'new', selected: value}); this.props.onSelect((selected && selected.location) ? selected.location : null); }; convertDropdownList = (locations) => { const list = [{value: 'none', label: 'Выберите адрес'}]; forEach(locations, (location) => { list.push({value: location.place_id, label: location.full_address, location}); }); list.push({value: 'new', label: 'Другой адрес'}); return list; }; render() { return ( <div> <Dropdown auto source={this.state.list} size="15" className={this.props.className} value={this.state.selected} onChange={this.onChoose} /> {this.state.search && <div className={styles.search}> <AddressSuggest onSuggestSelect={::this.props.onSelect} location={this.props.location} /> </div>} </div> ); } }
#!/usr/bin/env ruby require "openssl" require "date" require_relative "./lib/credhub" require_relative "./lib/formatting" alert = false CREDHUB_SERVER = ENV.fetch("CREDHUB_SERVER") api_url = "#{CREDHUB_SERVER}/v1" class <API key> def initialize @cert_names = [] @signs = {} @signed_by = {} end def add_edge(ca, cert) return if ca == cert @cert_names = @cert_names.push(ca).push(cert).uniq @signs[ca] ||= [] @signs[ca] = @signs[ca].push(cert).uniq @signed_by[cert] = ca end def depth @cert_names.map { |c| depth_for_cert(c) }.max end def print root_certs.each { |root| print_cert(root, 0) } end private def root_certs @cert_names.select { |c| @signed_by[c].nil? } end def depth_for_cert(cert) signer = @signed_by[cert] return 1 if signer.nil? depth_for_cert(signer) + 1 end def print_cert(cert, indent) signed_certs = @signs[cert] || [] if signed_certs.empty? puts((" " * indent) + cert.green) else puts((" " * indent) + cert.blue) end signed_certs.each { |c| print_cert(c, indent + 2) } end end separator client = CredHubClient.new(api_url) certs = client.certificates hierarchy = <API key>.new certs.each do |cert| hierarchy.add_edge(cert["signed_by"], cert["name"]) end hierarchy.print separator depth = hierarchy.depth if depth != 2 alert = true puts <<~MSG The depth of the certificate hierarchy is #{depth.to_s.red} Our certificate rotation process does not work for multiple levels of CAs It is likely that during our next certificate rotation something will go wrong MSG else puts "The depth of the certificate hierarchy is #{depth.to_s.green} this is good." end exit 1 if alert
<!DOCTYPE html> <html ng-app="fma"> <head> <meta charset="utf-8"> <title>FMA</title> <!-- Sets initial viewport load and disables zooming --> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"> <!-- Makes your prototype chrome-less once bookmarked to your phone's home screen --> <meta name="<API key>" content="yes"> <meta name="<API key>" content="black"> <!-- Include the compiled Ratchet CSS --> <link href="/css/ratchet.css" rel="stylesheet"> <!-- Optionally, include either the iOS or Android theme --> <link href="/css/ratchet-theme-ios.min.css" rel="stylesheet"> <!-- Include the compiled Ratchet JS --> <script src="/js/ratchet.js"></script> </head> <body ng-controller="mainCtrl"> <header class="bar bar-nav"> <a class="icon icon-search pull-right" href="#search" ></a> <h1 class="title">Z Tunes</h1> <a class="icon icon-info" href="#about" ></a> </header> <!-- Wrap all non-bar HTML in the .content div (this is actually what scrolls) --> <div class="content"> <!-- <div class="content-padded"> <h3>Ratchet Example App</h3> <p>Use this Ratchet mobile app template to build web apps that feel native.</p> </div> <div class="segmented-control"> <a class="control-item active" href="#genres"> Genres </a> <a class="control-item" href="#artists"> Artists </a> <a class="control-item" href="#albums"> Albums </a> <a id="songstab" ng-show="activeSongParamObj" class="control-item" href="#songs"> Songs </a> <a id="playtab" ng-show="activeTrack" class="control-item" href="#play"> playing.. </a> </div> <div ng-view> </div> </div> <!-- Settings Modal --> <div id="about" class="modal"> <header class="bar bar-nav"> <a class="icon icon-close pull-right" href="#about"></a> <h1 class="title">About</h1> </header> <div class="content content-padded"> <h4>Z tunes</h4> <p>Z tunes uses the data from Free Music archives and list the content effectively</p> <p>please send your comments to opensrcproject@gmail.com</p> </div> </div> <div id="search" class="modal"> <header class="bar bar-nav"> <a class="icon icon-close pull-right" href="#search"></a> <h1 class="title">Search For Tracks</h1> </header> <div class="content"> <!--- class="input-group" --> <form > <input type="text" ng-model="query" placeholder="search"> <button ng-click="search(query)" class="btn btn-positive btn-block">Search</button> </form> <!-- <h5 class="content-padded">App settings</h5> <ul class="table-view"> <li class="table-view-cell media"> <span class="media-object pull-left icon icon-sound"></span> <div class="media-body"> Enable sounds </div> <div class="toggle"> <div class="toggle-handle"></div> </div> </li> <li class="table-view-cell media"> <span class="media-object pull-left icon icon-person"></span> <div class="media-body"> Parental controls </div> <div class="toggle"> <div class="toggle-handle"></div> </div> </li> </ul> <div class="content-padded"> <button class="btn btn-positive btn-block">Save settings</button> </div> </div> </div> <script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script> <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.js"></script> <script src="http://code.angularjs.org/1.2.15/angular-route.js"></script> <script> $(function(){ $('nav.bar > a').click(function(e){ $(this).parent().find('a').removeClass('active'); $(this).addClass('active'); }); }); </script> <script> var api_key = " api key "; var base_url = "http://freemusicarchive.org/api/get"; fma = angular.module("fma",['ngRoute']); fma.config(['$routeProvider',function($routeProvider){ $routeProvider. when('/',{ templateUrl:'partials/genres.html', }). when('/genres',{ templateUrl:'partials/genres.html', }). when('/artists',{ templateUrl:'partials/artists.html', }). when('/albums',{ templateUrl:'partials/albums.html', }). when('/songs',{ templateUrl:'partials/songs.html', }). when('/play',{ templateUrl:'partials/player.html', }). otherwise({ redirectTo: '/' }); }]); fma.controller("mainCtrl",function($scope,$location,$window,$http,fmaService,$sce){ $scope.yo = function(){ alert("yoo"); }; $scope.genres_data = {dataset:[],page:1}; $scope.albums_data = {dataset:[],page:1}; $scope.artists_data = {dataset:[],page:1}; $scope.tracks_data = {dataset:[],page:1}; $scope.genres = function(page){ page = page || $scope.genres_data.page; fmaService.genres({page:page}).success(function(res){ console.log(res); $scope.genres_data.total_pages = res.total_pages; $scope.genres_data.dataset = _.union($scope.genres_data.dataset,res.dataset); $scope.genres_data.page = parseInt(res.page); }); }; $scope.albums = function(page){ page = page || $scope.albums_data.page; fmaService.albums({page:page}).success(function(res){ $scope.albums_data.total_pages = res.total_pages; $scope.albums_data.dataset = _.union($scope.albums_data.dataset,res.dataset); $scope.albums_data.page = res.page; }); }; $scope.artists = function(page){ page = page || $scope.artists_data.page; fmaService.artists({page:page}).success(function(res){ $scope.artists_data.total_pages = res.total_pages; $scope.artists_data.dataset = _.union($scope.artists_data.dataset,res.dataset); $scope.artists_data.page = res.page; }); }; $scope.songs = function(obj,page){ $scope.songspage = true; $('.segmented-control > a').removeClass('active'); $('.segmented-control > a#songstab').addClass('active'); $scope.tracksPage = true; var reqparam = {}; if(obj.genre_id){ reqparam = {'genre_id':obj.genre_id}; }else if(obj.artist_id){ reqparam = {'artist_id':obj.artist_id}; }else if(obj.album_id){ reqparam = {'album_id':obj.album_id}; } else if(obj.q){ reqparam = {'q':obj.q}; } reqparam['page'] = page || $scope.tracks_data.page; var changed = $scope.activeSongParamObj == obj ? false: true; $scope.activeSongParamObj = obj; fmaService.tracks(reqparam).success(function(res){ $scope.tracks_data.total_pages = res.total_pages; if(changed){ $scope.tracks_data.dataset = res.dataset; }else{ $scope.tracks_data.dataset = _.union($scope.tracks_data.dataset,res.dataset); } $scope.tracks_data.page = res.page; }); }; $scope.play = function(track){ $('.segmented-control > a').removeClass('active'); $('.segmented-control > a#playtab').addClass('active'); $scope.playpage = true; $scope.activeTrack = track; $scope.activeTrack.track_url = $sce.trustAsResourceUrl(track.track_url+"/download"); }; $scope.search = function(query){ $scope.songs({q:query},1); $('#search').removeClass('active'); $location.path("/songs"); }; }); fma.factory("fmaService",function($http){ var api_obj = {'api_key':api_key}; return { genres:function(data){ var para = $.extend(data,api_obj); var req = $http({ method:"get", url:base_url+"/genres.json", params:para }); return req; }, artists: function(data){ var para = $.extend(data,api_obj); var req = $http({ method:"get", url: base_url+"/artists.json", params:para }); return req; }, albums: function(data){ var para = $.extend(data,api_obj); var req = $http({ method:"get", url:base_url+"/albums.json", params:para }); return req; }, tracks:function(data){ var para = $.extend(data,api_obj); var req = $http({ method:"get", url:base_url+"/tracks.json", params:para }); return req; }, }; }); </script> </body> </html>
#include <iostream> #include <string> using namespace std; int main(){ int brojac,j,d,s,zbroj; cout << "Troznamenkasti brojevi ciji je zbroj znamenaka 5, a zadnja im je znamenka 0 su:" << endl; for(brojac = 100; brojac <= 999; brojac++) { j = brojac % 10; d = (brojac / 10) % 10; s = brojac / 100; zbroj = j + d + s; if(zbroj == 5 && j==0) cout<< brojac << "\n"; } cout << endl; return 0; }
# SLF4EC ## Simple Logging Facade for Embedded C This library was developed with the same ideas as [SLF4J], [slf4net], [SLF4C] and other popular logging facade of similar name. The idea is to provide a lightweight, flexible solution for logging that can be re-used between projects and modules. ## Goals and features A lightweight logging solution Very few lines of code are actually compiled in the binary. Most of the magic is done at compile time using macros. Support for logging categories Logs are categorized according to a subsystem. For example, you could have categories called "Network", "GUI", "Power", etc. Based on these categories you can read your logs easily by only looking at one subsystem or even filter what will be sent to the loggers by specifying a log level at which the category is active. Optimized for embedded development - Using a few defines, you can control what log levels will actually be compiled in the final binary as well as if location informations will be included or not (file, function name and line number where the event occurred). - No dynamic memory allocation. Everything happens on the stack. A simple API Inside your application, simply call the logger in similar fashion to the examples below: C logInfo(Network, "Network initialized successfully"); logFatal(CPU, "An error occurred %d times: %s", nbErrors, errorMessage); These entries are replaced at compile time by a dummy call to save memory if the specific level is below the threshold of what is specified during compilation. Flexible runtime configuration - Configuration of which configured loggers are active and what levels they will log can be changed at runtime. - Configuration of which configured categories are active and what levels they will log can be changed at runtime. Add any logger you want As an example, a logger to stdout is provided. But you can implement any logger you wish by providing 2 function pointers as defined in `slf4ecTypes.h`. The provided example shows how to do this. You could thus add new loggers that would write the entries to a file, send them over a UDP packet or do whatever else you desire. Multiple hosts support SLF4EC currently compiles on Linux and Windows (through MSYS) using GNU Makefiles. Multiple compilers support SLF4EC currently supports GCC (MinGW on Windows) and IAR (Windows only). Cross compilation support Currently, the following targets are supported out of the box: * x86 (using GCC) * ARM Cortex-M4 (using GCC or IAR) Other targets should work just as well since there are no external dependencies. Unit tests Currently the library itself is 100% covered by unit tests, using [cmockery2]. Quality through [sonarqube] This library is being scanned by the [sonar-cxx], [Cppheck], [Vera++] and [RATS] plugins. API documentation APIs are documented using doxygen. Licensing Licensed using the MIT License to encourage sharing among other projects, open source or not. [SLF4J]:http: [slf4net]:https://github.com/englishtown/slf4net [SLF4C]:https://github.com/SLF4C/SLF4C [cmockery2]:https://github.com/Trilliant/cmockery2 [sonarqube]:http: [sonar-cxx]:https://github.com/wenns/sonar-cxx [Cppheck]:http://cppcheck.sourceforge.net/ [Vera++]:https://bitbucket.org/verateam/vera/wiki/Home [RATS]:https://code.google.com/p/<API key>/
# encoding: utf-8 require 'spec_helper' describe Agents::WeiboPublishAgent do before do @opts = { :uid => "1234567", :<API key> => "2", :app_key => " :app_secret => " :access_token => " :message_path => "text" } @checker = Agents::WeiboPublishAgent.new(:name => "Weibo Publisher", :options => @opts) @checker.user = users(:bob) @checker.save! @event = Event.new @event.agent = agents(:bob_weather_agent) @event.payload = { :text => 'Gonna rain..' } @event.save! @sent_messages = [] stub.any_instance_of(Agents::WeiboPublishAgent).publish_tweet { |message| @sent_messages << message} end describe '#receive' do it 'should publish any payload it receives' do event1 = Event.new event1.agent = agents(:<API key>) event1.payload = { :text => 'Gonna rain..' } event1.save! event2 = Event.new event2.agent = agents(:bob_weather_agent) event2.payload = { :text => 'More payload' } event2.save! Agents::WeiboPublishAgent.async_receive(@checker.id, [event1.id, event2.id]) @sent_messages.count.should eq(2) @checker.events.count.should eq(2) end end describe '#receive a tweet' do it 'should publish a tweet after expanding any t.co urls' do event = Event.new event.agent = agents(:bob_<TwitterConsumerkey>) event.payload = JSON.parse(File.read(Rails.root.join("spec/data_fixtures/one_tweet.json"))) event.save! Agents::WeiboPublishAgent.async_receive(@checker.id, [event.id]) @sent_messages.count.should eq(1) @checker.events.count.should eq(1) @sent_messages.first.include?("t.co").should_not be_true end end describe '#working?' do it 'checks if events have been received within the expected receive period' do @checker.should_not be_working # No events received Agents::WeiboPublishAgent.async_receive(@checker.id, [@event.id]) @checker.reload.should be_working # Just received events two_days_from_now = 2.days.from_now stub(Time).now { two_days_from_now } @checker.reload.should_not be_working # More time has passed than the expected receive period without any new events end end end
<?php namespace Spatie\ResponseCache\Test; use Illuminate\Http\Request; use ResponseCache; use Spatie\ResponseCache\CacheProfiles\<API key>; class <API key> extends TestCase { public function setUp(): void { parent::setUp(); config()->set( 'responsecache.cache_profile', <API key>::class ); } /** @test */ public function <API key>() { $firstResponse = $this->call('POST', '/random'); $secondResponse = $this->call('POST', '/random'); $this-><API key>($firstResponse); $this-><API key>($secondResponse); $this->assertSameResponse($firstResponse, $secondResponse); } /** @test */ public function <API key>() { config()->set('app.url', 'http://spatie.be'); $firstResponse = $this->get('/random?foo=bar'); $this-><API key>($firstResponse); ResponseCache::selectCachedItems()->withParameters(['foo' => 'bar']) ->forUrls('/random')->forget(); $secondResponse = $this->get('/random?foo=bar'); $this-><API key>($secondResponse); $this-><API key>($firstResponse, $secondResponse); } /** @test */ public function <API key>() { config()->set('app.url', 'http://spatie.be'); $firstResponse = $this->post('/random'); $this-><API key>($firstResponse); ResponseCache::selectCachedItems()->withPostMethod()->forUrls('/random')->forget(); $secondResponse = $this->post('/random'); $this-><API key>($secondResponse); $this-><API key>($firstResponse, $secondResponse); } /** @test */ public function <API key>() { $<API key> = $this->get('/random/1?foo=bar'); $this-><API key>($<API key>); $<API key> = $this->get('/random/2?foo=bar'); $this-><API key>($<API key>); ResponseCache::selectCachedItems()->withParameters(['foo' => 'bar']) ->forUrls(['/random/1', '/random/2'])->forget(); $<API key> = $this->get('/random/1?foo=bar'); $this-><API key>($<API key>); $<API key> = $this->get('/random/2?foo=bar'); $this-><API key>($<API key>); $this-><API key>($<API key>, $<API key>); $this-><API key>($<API key>, $<API key>); } /** @test */ public function <API key>() { $<API key> = $this->post('/random/1'); $this-><API key>($<API key>); $<API key> = $this->post('/random/2'); $this-><API key>($<API key>); ResponseCache::selectCachedItems()->withPostMethod()->forUrls(['/random/1', '/random/2'])->forget(); $<API key> = $this->post('/random/1'); $this-><API key>($<API key>); $<API key> = $this->post('/random/2'); $this-><API key>($<API key>); $this-><API key>($<API key>, $<API key>); $this-><API key>($<API key>, $<API key>); } /** @test */ public function <API key>() { config()->set('app.url', 'http://spatie.be'); $userId = 1; $this->actingAs(User::findOrFail($userId)); $firstResponse = $this->get('/random?foo=bar'); $this-><API key>($firstResponse); auth()->logout(); ResponseCache::selectCachedItems() ->withParameters(['foo' => 'bar']) // BaseCacheProfile an user is logged in // use user id as suffix ->usingSuffix((string)$userId) ->forUrls('/random')->forget(); $this->actingAs(User::findOrFail(1)); $secondResponse = $this->get('/random?foo=bar'); auth()->logout(); $this-><API key>($secondResponse); $this-><API key>($firstResponse, $secondResponse); } } class <API key> extends <API key> { public function shouldCacheRequest(Request $request): bool { if ($request->ajax()) { return false; } if ($this->isRunningInConsole()) { return false; } return $request->isMethod('get') || $request->isMethod('post'); } }
#include "FrequencyInModule.h" #include "../ModularSynth.h" #ifndef TUNING #define TUNING 440.0 #endif FrequencyInModule::FrequencyInModule(ModularSynth& synth) :SynthModule(synth, moduleId, 0, 1, 0) { } void FrequencyInModule::cycle() { setOutput(0, mSynth.getFrequency() * static_cast<float>(TUNING / 2) / 1000); } const char * FrequencyInModule::getInputName(int input) const { return "FrequencyIn"; } const char * FrequencyInModule::getOutputName(int output) const { static const char *names[] = {"Output"}; return names[output]; } const char * FrequencyInModule::getName() const { return "FrequencyIn"; } SynthModule * FrequencyInModule::createModule(ModularSynth& synth) { return new FrequencyInModule(synth); }
// <auto-generated> // Code generated by Microsoft (R) AutoRest Code Generator. // </auto-generated> namespace Microsoft.Azure.Management.CosmosDB.Fluent { using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; using System.Collections; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; <summary> <API key> operations. </summary> public partial interface <API key> { <summary> Retrieves the metrics determined by the given filter for the given database account. This url is only for PBS and Replication Latency data </summary> <param name='resourceGroupName'> Name of an Azure resource group. </param> <param name='accountName'> Cosmos DB database account name. </param> <param name='filter'> An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq. </param> <param name='customHeaders'> The headers that will be added to request. </param> <param name='cancellationToken'> The cancellation token. </param> <exception cref="Microsoft.Rest.Azure.CloudException"> Thrown when the operation returned an invalid status code </exception> <exception cref="Microsoft.Rest.<API key>"> Thrown when unable to deserialize the response </exception> <exception cref="Microsoft.Rest.ValidationException"> Thrown when a required parameter is null </exception> Task<<API key><IEnumerable<PercentileMetric>>> <API key>(string resourceGroupName, string accountName, string filter, Dictionary<string, List<string>> customHeaders = null, Cancellation<API key> = default(CancellationToken)); } }
require_relative "model/board" require_relative "model/pawn" describe Board do it "should initialize a board object" do board = Board.new expect(board).to be_a Board end it "should initialize a board with just a pawn" do chess_board = Board.new expect(chess_board.board[1][0]).to be_a Pawn end it "should move a pawn: original cell should empty" do chess_board = Board.new chess_board.move("a7", "a6") expect(chess_board.board[1][0]).to eq(" ") end it "should move a pawn: new spot should contain a pawn" do chess_board = Board.new chess_board.move("a7", "a6") expect(chess_board.board[2][0]).to be_a Pawn end end describe Pawn do it "should initialize a pawn object" do pawn = Pawn.new expect(pawn).to be_a Pawn end it "should return list of possible moves" do pawn = Pawn.new expect(pawn.possible_moves).to eq() end end
#pragma once #include <stdio.h> #include <string> #include <sstream> #include <vector> #include <iostream> inline std::string RemoveWhitespace(std::string input) { std::string result = ""; for (uint32_t i = 0; i < input.size(); i++) { if (!isspace(input[i])) { result += input[i]; } } return result; } inline std::string <API key>(std::string input) { uint32_t begin = 0, end = 0; for (uint32_t i = 0; i < input.size(); i++) { if (!isspace(input[i])) { begin = i; break; } } for (uint32_t i = input.size() - 1; i >= begin && i > 0; i if (!isspace(input[i])) { end = i + 1; break; } } return input.substr(begin, end - begin); } inline bool contains(std::string input, char c) { for (uint32_t i = 0; i < input.size(); i++) { if (input[i] == c) { return true; } } return false; } inline std::vector<std::string> split(const std::string &s, char delimiter, bool skipEmpty = false) { std::vector<std::string> elements; std::stringstream stream(s); std::string item; while (getline(stream, item, delimiter)) { if (item.size() == 0 && skipEmpty) { continue; } elements.push_back(item); } return elements; } inline std::string combine(std::vector<std::string>& elements, char delimiter = ' ') { std::string result; for (uint32_t i = 0; i < elements.size(); i++) { result += elements[i]; result += delimiter; } return result; } inline std::string combine(std::vector<std::string>& elements, int from, int to, char delimiter = ' ') { std::string result; for (int i = from; i <= to; i++) { result += elements[i]; result += delimiter; } return result; } inline int to_int(std::string input, int defaultValue = 0.f) { return std::stoi(input); } inline bool try_to_int(std::string input, int& result) { try { result = std::stoi(input); } catch (const std::invalid_argument&) { return false; } catch (const std::out_of_range&) { return false; } return true; } inline float to_float(std::string input, float defaultValue = 0.f) { return std::stof(input); } inline bool try_to_float(std::string input, float& result) { try { result = std::stof(input); } catch (const std::invalid_argument&) { return false; } catch (const std::out_of_range&) { return false; } return true; } // TODO: Implement TryTo... inline bool to_bool(std::string input) { input = <API key>(input); if (input == "true") { return true; } else if (input == "false") { return false; } else if (input == "1") { return true; } else if (input == "0") { return false; } else { // error return false; } }
import { describe, it } from '@ephox/bedrock-client'; import { PlatformDetection } from '@ephox/sand'; import { TinyAssertions, TinyHooks, TinySelections } from '@ephox/wrap-mcagar'; import { assert } from 'chai'; import Editor from 'tinymce/core/api/Editor'; describe('browser.tinymce.core.commands.LineHeightTest', () => { const platform = PlatformDetection.detect(); const hook = TinyHooks.bddSetupLight<Editor>({ base_url: '/project/tinymce/js/tinymce' }, []); const assertHeight = (editor: Editor, value: string) => { const current = editor.queryCommandValue('LineHeight'); assert.equal(current, value, 'LineHeight query command returned wrong value'); }; it('TINY-4843: Specified line-height can be read from element', () => { const editor = hook.editor(); editor.setContent('<p style="line-height: 1.5;">Test</p>'); TinySelections.setCursor(editor, [ 0, 0 ], 0); assertHeight(editor, '1.5'); }); it('TINY-4843: Unspecified line-height can be read from element', function () { // TODO: TINY-7895 if (platform.browser.isSafari()) { this.skip(); } const editor = hook.editor(); editor.setContent('<p>Hello</p>'); TinySelections.setCursor(editor, [ 0, 0 ], 0); assertHeight(editor, '1.4'); // default content-css line height }); it('TINY-4843: Specified line-height can be read from element in px', () => { const editor = hook.editor(); editor.setContent('<p style="line-height: 20px;">Test</p>'); TinySelections.setCursor(editor, [ 0, 0 ], 0); assertHeight(editor, '20px'); }); it('TINY-4843: Specified line-height can be read from ancestor element', () => { const editor = hook.editor(); editor.setContent('<p style="line-height: 1.8;">Hello, <strong>world</strong></p>'); TinySelections.setCursor(editor, [ 0, 1, 0 ], 0); assertHeight(editor, '1.8'); }); it('TINY-4843: Editor command can set line-height', () => { const editor = hook.editor(); editor.setContent('<p>Hello</p>'); TinySelections.setCursor(editor, [ 0, 0 ], 0); editor.execCommand('LineHeight', false, '2'); TinyAssertions.assertContent(editor, '<p style="line-height: 2;">Hello</p>'); }); it('TINY-4843: Editor command can alter line-height', () => { const editor = hook.editor(); editor.setContent('<p style="line-height: 1.8;">Hello</p>'); TinySelections.setCursor(editor, [ 0, 0 ], 0); editor.execCommand('LineHeight', false, '2'); TinyAssertions.assertContent(editor, '<p style="line-height: 2;">Hello</p>'); }); it('TINY-4843: Editor command can toggle line-height', () => { const editor = hook.editor(); editor.setContent('<p style="line-height: 1.4;">Hello</p>'); TinySelections.setCursor(editor, [ 0, 0 ], 0); editor.execCommand('LineHeight', false, '1.4'); TinyAssertions.assertContent(editor, '<p>Hello</p>'); }); it('TINY-7048: LineHeight event order is correct', () => { const events = []; const editor = hook.editor(); editor.setContent('<p>Hello</p>'); const logEvents = (e) => { if (e.command?.toLowerCase() !== 'mcefocus') { events.push(e.type.toLowerCase()); } }; // Note: It's important that we prepend these events, otherwise the UndoManager `ExecCommand` event handler // will execute first and make it looks like `change` is fired second. editor.on('BeforeExecCommand change ExecCommand', logEvents, true); editor.execCommand('LineHeight', false, '2'); TinyAssertions.assertContent(editor, '<p style="line-height: 2;">Hello</p>'); assert.deepEqual(events, [ 'beforeexeccommand', 'execcommand', 'change' ]); editor.off('BeforeExecCommand change ExecCommand', logEvents); }); });
using System; using System.IO; using System.Threading; class Test { static int sum = 0; static void async_callback (IAsyncResult ar) { byte [] buf = (byte [])ar.AsyncState; sum += buf [0]; } static int Main () { byte [] buf = new byte [1]; AsyncCallback ac = new AsyncCallback (async_callback); IAsyncResult ar; int sum0 = 0; FileStream s = new FileStream ("async_read.exe", FileMode.Open, FileAccess.Read); s.Position = 0; sum0 = 0; while (s.Read (buf, 0, 1) == 1) sum0 += buf [0]; s.Position = 0; do { ar = s.BeginRead (buf, 0, 1, ac, buf); } while (s.EndRead (ar) == 1); sum -= buf [0]; Thread.Sleep (100); s.Close (); Console.WriteLine ("CSUM: " + sum + " " + sum0); if (sum != sum0) return 1; return 0; } }
window.onload = function () { var ws = new WebSocket('ws://' + document.location.host + '/temperature'); ws.onopen = function () { // Only enable the input fields after we have established a WebSocket connection. document.getElementById("celsius").disabled = false; document.getElementById("fahrenheit").disabled = false; }; ws.onmessage = function (e) { var temp = e.data.split(':'); document.getElementById(temp[0]).value = temp[1]; }; function setupEvent(unit) { var c = document.getElementById(unit); c.onkeyup = function (e) { setTimeout(function () { ws.send(unit + ':' + e.target.value); }, 0); }; } setupEvent('celsius'); setupEvent('fahrenheit'); };
import numpy import chainer from chainer.backends import cuda from chainer import function_node import chainer.functions from chainer.functions.math import floor as _floor from chainer.functions.math import matmul as _matmul from chainer import utils from chainer.utils import type_check from chainer import variable def <API key>(value): if isinstance(value, variable.Variable): value = value.data if numpy.isscalar(value): if value < 0: return '({})'.format(value) else: return str(value) elif isinstance(value, (numpy.ndarray, cuda.ndarray)): return 'constant array' else: raise ValueError( 'Value must be a scalar, `numpy.ndarray`, `cupy.ndarray` ' 'or a `Variable`.\nActual: {}'.format(type(value))) def <API key>(value): if numpy.isscalar(value): return elif isinstance(value, (numpy.ndarray, cuda.ndarray)): return else: raise ValueError( 'Value must be a scalar, `numpy.ndarray`, `cupy.ndarray` ' 'or a `Variable`.\nActual: {}'.format(type(value))) def _preprocess_const(x, value): xp = cuda.get_array_module(x) if not numpy.isscalar(value) and cuda.get_array_module(value) != xp: # TODO(unno): We can transfer arrays automatically raise TypeError('Cannot mix cupy.ndarray and numpy.ndarray') b = xp.broadcast(x, value) if b.shape != x.shape: raise ValueError('Failed to broadcast arrays') return utils.force_type(x.dtype, value) class Neg(function_node.FunctionNode): @property def label(self): return '__neg__' def check_type_forward(self, in_types): type_check.expect(in_types.size() == 1) def forward(self, x): self.retain_inputs(()) return utils.force_array(-x[0]), def backward(self, indexes, gy): return -gy[0], def neg(self): """Element-wise negation. Returns: ~chainer.Variable: Output variable. """ return Neg().apply((self,))[0] class Absolute(function_node.FunctionNode): @property def label(self): return '|_|' def check_type_forward(self, in_types): type_check.expect(in_types.size() == 1) type_check.expect(in_types[0].dtype.kind == 'f') def forward(self, x): self.retain_inputs((0,)) return utils.force_array(abs(x[0])), def backward(self, indexes, grad_outputs): x = self.get_retained_inputs()[0] return AbsoluteGrad(x.data).apply(grad_outputs) class AbsoluteGrad(function_node.FunctionNode): def __init__(self, x): super(AbsoluteGrad, self).__init__() self.x = x def check_type_forward(self, in_types): type_check.expect(in_types.size() == 1) type_check.expect(in_types[0].dtype.kind == 'f') def forward_cpu(self, inputs): return utils.force_array(numpy.sign(self.x) * inputs[0]), def forward_gpu(self, inputs): gx0 = cuda.elementwise( 'T x0, T gy', 'T gx0', 'gx0 = ((x0 > 0) - (x0 < 0)) * gy', 'abs_bwd')(self.x, inputs[0]) return gx0, def backward(self, indexes, grad_outputs): return AbsoluteGrad(self.x).apply(grad_outputs) def absolute(self): """Element-wise absolute. Returns: ~chainer.Variable: Output variable. """ return Absolute().apply((self,))[0] class Add(function_node.FunctionNode): @property def label(self): return '_ + _' def check_type_forward(self, in_types): type_check.expect(in_types.size() == 2) type_check.expect( in_types[0].dtype == in_types[1].dtype, in_types[0].shape == in_types[1].shape ) def forward(self, x): y = utils.force_array(x[0] + x[1]) return y, def backward(self, indexes, gy): return gy[0], gy[0] class AddConstant(function_node.FunctionNode): def __init__(self, value): self.value = value @property def label(self): return '_ + %s' % <API key>(self.value) def check_type_forward(self, in_types): type_check.expect(in_types.size() == 1) def forward(self, x): value = _preprocess_const(x[0], self.value) return utils.force_array(x[0] + value), def backward(self, indexes, gy): return gy[0], class MultiAdd(function_node.FunctionNode): def check_type_forward(self, in_types): for in_type in in_types: type_check.expect( in_types[0].dtype == in_type.dtype, in_types[0].shape == in_type.shape ) def forward(self, xs): self.len = len(xs) if len(xs) == 1: return xs # The output should a new array. Add the first 2 arrays # and get the result y. Then add the rest arrays to y. y = xs[0] + xs[1] for x in xs[2:]: y += x return utils.force_array(y), def backward(self, indexes, gy): gys = (gy[0],) * self.len return gys def add(*xs): # lhs + rhs or add more than 2 variables """Element-wise addition. Returns: ~chainer.Variable: Output variable. """ if len(xs) == 2: lhs, rhs = xs if isinstance(rhs, variable.Variable): return Add().apply((lhs, rhs))[0] <API key>(rhs) return AddConstant(rhs).apply((lhs,))[0] else: return MultiAdd().apply(xs)[0] class Sub(function_node.FunctionNode): @property def label(self): return '_ - _' def check_type_forward(self, in_types): type_check.expect(in_types.size() == 2) type_check.expect( in_types[0].dtype == in_types[1].dtype, in_types[0].shape == in_types[1].shape ) def forward(self, x): return utils.force_array(x[0] - x[1]), def backward(self, indexes, gy): return gy[0], -gy[0] def sub(self, rhs): # lhs - rhs """Element-wise subtraction. Returns: ~chainer.Variable: Output variable. """ if isinstance(rhs, variable.Variable): return Sub().apply((self, rhs))[0] <API key>(rhs) return AddConstant(-rhs).apply((self,))[0] class SubFromConstant(function_node.FunctionNode): def __init__(self, value): self.value = value @property def label(self): return '%s - _' % <API key>(self.value) def check_type_forward(self, in_types): type_check.expect(in_types.size() == 1) def forward(self, x): self.retain_inputs(()) value = _preprocess_const(x[0], self.value) return utils.force_array(value - x[0]), def backward(self, indexes, gy): return -gy[0], def rsub(self, rhs): # rhs - lhs """Element-wise subtraction. Returns: ~chainer.Variable: Output variable. """ if isinstance(rhs, variable.Variable): return Sub().apply((rhs, self))[0] <API key>(rhs) return SubFromConstant(rhs).apply((self,))[0] class Mul(function_node.FunctionNode): @property def label(self): return '_ * _' def check_type_forward(self, in_types): type_check.expect(in_types.size() == 2) type_check.expect( in_types[0].dtype.kind == 'f', in_types[0].dtype == in_types[1].dtype, in_types[0].shape == in_types[1].shape ) def forward(self, x): self.retain_inputs((0, 1)) return utils.force_array(x[0] * x[1]), def backward(self, indexes, gy): xs = self.get_retained_inputs() return tuple(gy[0] * xs[1 - i] for i in indexes) class MulConstant(function_node.FunctionNode): def __init__(self, value): self.value = value @property def label(self): return '_ * %s' % <API key>(self.value) def check_type_forward(self, in_types): type_check.expect(in_types.size() == 1) def forward(self, x): value = _preprocess_const(x[0], self.value) return utils.force_array(value * x[0]), def backward(self, indexes, gy): return self.value * gy[0], def mul(self, rhs): # lhs * rhs """Element-wise multiplication. Returns: ~chainer.Variable: Output variable. """ if isinstance(rhs, variable.Variable): return Mul().apply((self, rhs))[0] <API key>(rhs) return MulConstant(rhs).apply((self,))[0] class Div(function_node.FunctionNode): @property def label(self): return '_ / _' def check_type_forward(self, in_types): type_check.expect(in_types.size() == 2) type_check.expect( in_types[0].dtype.kind == 'f', in_types[0].dtype == in_types[1].dtype, in_types[0].shape == in_types[1].shape ) def forward(self, x): self.retain_inputs((0, 1)) return utils.force_array(x[0] / x[1]), def backward(self, indexes, grad_outputs): x = self.get_retained_inputs() return DivGrad().apply((x[0], x[1], grad_outputs[0])) class DivGrad(function_node.FunctionNode): def forward_cpu(self, inputs): self.retain_inputs((0, 1, 2)) x0, x1, gy = inputs gx0 = utils.force_array(gy / x1) return gx0, utils.force_array(-gx0 * x0 / x1) def forward_gpu(self, inputs): self.retain_inputs((0, 1, 2)) x0, x1, gy = inputs return cuda.elementwise( 'T x0, T x1, T gy', 'T gx0, T gx1', ''' gx0 = gy / x1; gx1 = -gx0 * x0 / x1; ''', 'div_bwd')(x0, x1, gy) def backward(self, indexes, grad_outputs): x0, x1, gy = self.get_retained_inputs() ggx0, ggx1 = grad_outputs ret = [] x1_square = x1 * x1 if 0 in indexes: gx0 = -ggx1 * gy / x1_square ret.append(gx0) if 1 in indexes: gx1 = -ggx0 * gy / x1_square + \ ggx1 * 2 * gy * x0 / (x1_square * x1) ret.append(gx1) if 2 in indexes: ggy = ggx0 / x1 - ggx1 * x0 / x1_square ret.append(ggy) return ret def div(self, rhs): # lhs / rhs """Element-wise division Returns: ~chainer.Variable: Output variable. """ if isinstance(rhs, variable.Variable): return Div().apply((self, rhs))[0] <API key>(rhs) return MulConstant(1. / rhs).apply((self,))[0] class DivFromConstant(function_node.FunctionNode): def __init__(self, value): self.value = value @property def label(self): return '%s / _' % <API key>(self.value) def check_type_forward(self, in_types): type_check.expect(in_types.size() == 1) type_check.expect(in_types[0].dtype.kind == 'f') def forward(self, x): self.retain_inputs((0,)) value = _preprocess_const(x[0], self.value) return utils.force_array(value / x[0]), def backward(self, indexes, grad_outputs): x = self.get_retained_inputs() return DivFromConstantGrad(self.value).apply((x[0], grad_outputs[0])) class DivFromConstantGrad(function_node.FunctionNode): def __init__(self, value): super(DivFromConstantGrad, self).__init__() self.value = value def forward_cpu(self, inputs): self.retain_inputs((0, 1)) x, gy = inputs value = _preprocess_const(x, self.value) return utils.force_array(-value * gy / (x ** 2)), def forward_gpu(self, inputs): self.retain_inputs((0, 1)) x, gy = inputs # TODO(beam2d): Make it not use the input value = _preprocess_const(x, self.value) gx = cuda.elementwise('T x, T gy, T value', 'T gx', 'gx = -value * gy / (x * x)', 'div_from_const_bwd')(x, gy, value) return gx, def backward(self, indexes, grad_outputs): x, gy = self.get_retained_inputs() value = _preprocess_const(x.data, self.value) ret = [] if 0 in indexes: ret.append(grad_outputs[0] * 2 * value * gy / (x ** 3)) if 1 in indexes: ret.append(grad_outputs[0] * -value / (x ** 2)) return ret def rdiv(self, rhs): # rhs / lhs """Element-wise division. Returns: ~chainer.Variable: Output variable. """ if isinstance(rhs, variable.Variable): return Div().apply((rhs, self))[0] <API key>(rhs) return DivFromConstant(rhs).apply((self,))[0] def floordiv(self, rhs): # lhs // rhs """Element-wise floor division. Returns: ~chainer.Variable: Output variable. """ return _floor.floor(div(self, rhs)) def rfloordiv(self, rhs): # rhs // lhs """Element-wise floor division. Returns: ~chainer.Variable: Output variable. """ return _floor.floor(rdiv(self, rhs)) class PowVarVar(function_node.FunctionNode): @property def label(self): return '_ ** _' def check_type_forward(self, in_types): type_check.expect(in_types.size() == 2) type_check.expect( in_types[0].dtype.kind == 'f', in_types[0].dtype == in_types[1].dtype, in_types[0].shape == in_types[1].shape ) def forward(self, x): self.retain_inputs((0, 1)) self.y = x[0] ** x[1] return utils.force_array(self.y), def backward(self, indexes, gy): inputs = self.get_retained_inputs() return PowVarVarGrad(self.y).apply((inputs[0], inputs[1], gy[0])) class PowVarVarGrad(function_node.FunctionNode): def __init__(self, y): self.y = y def check_type_forward(self, in_types): type_check.expect(in_types.size() == 3) type_check.expect( in_types[0].dtype.kind == 'f', in_types[0].dtype == in_types[1].dtype, in_types[0].shape == in_types[1].shape, in_types[0].dtype == in_types[2].dtype, in_types[0].shape == in_types[2].shape, ) def forward_cpu(self, inputs): self.retain_inputs((0, 1, 2)) x0, x1, gy = inputs one = x1.dtype.type(1) gx0 = utils.force_array(x1 * (x0 ** (x1 - one)) * gy) gx1 = utils.force_array(numpy.log(x0) * self.y * gy) return gx0, gx1 def forward_gpu(self, inputs): self.retain_inputs((0, 1, 2)) x0, x1, gy = inputs gx0, gx1 = cuda.elementwise( 'T x0, T x1, T gy, T y', 'T gx0, T gx1', ''' gx0 = x1 * pow(x0, x1 - 1) * gy; gx1 = log(x0) * y * gy; ''', 'pow_var_var_bwd')(x0, x1, gy, self.y) return gx0, gx1 def backward(self, indexes, ggx): x0, x1, gy = self.get_retained_inputs() ggx0, ggx1 = ggx log_x0 = chainer.functions.log(x0) pow_x0_x1 = x0 ** x1 pow_x0_x1_1 = x0 ** (x1 - 1) pow_x0_x1_2 = x0 ** (x1 - 2) ret = [] if 0 in indexes: gx0 = (ggx0 * x1 * (x1 - 1) * pow_x0_x1_2 + ggx1 * pow_x0_x1_1 * (log_x0 * x1 + 1)) * gy ret.append(gx0) if 1 in indexes: gx1 = (ggx0 * pow_x0_x1_1 * (log_x0 * x1 + 1) + ggx1 * log_x0 * log_x0 * pow_x0_x1) * gy ret.append(gx1) if 2 in indexes: ggy = ggx0 * x1 * pow_x0_x1_1 + ggx1 * log_x0 * pow_x0_x1 ret.append(ggy) return ret class PowVarConst(function_node.FunctionNode): def __init__(self, value): self.value = value @property def label(self): return '_ ** %s' % <API key>(self.value) def check_type_forward(self, in_types): type_check.expect(in_types.size() == 1) type_check.expect(in_types[0].dtype.kind == 'f') def forward(self, x): self.retain_inputs((0,)) y = x[0] ** _preprocess_const(x[0], self.value) return utils.force_array(y, x[0].dtype), def backward(self, indexes, gy): inputs = self.get_retained_inputs() return PowVarConstGrad(self.value).apply((inputs[0], gy[0])) class PowVarConstGrad(function_node.FunctionNode): def __init__(self, value): self.value = value self.val = self.val_1 = None def check_type_forward(self, in_types): type_check.expect(in_types.size() == 2) type_check.expect( in_types[0].dtype.kind == 'f', in_types[0].dtype == in_types[1].dtype, in_types[0].shape == in_types[1].shape ) def forward_cpu(self, inputs): self.retain_inputs((0, 1)) x, gy = inputs self.val_1 = _preprocess_const(x, self.value - 1) gx = utils.force_type(x.dtype, self.value) * (x ** self.val_1) * gy gx = utils.force_array(gx) return gx, def forward_gpu(self, inputs): self.retain_inputs((0, 1)) x, gy = inputs self.val = _preprocess_const(x, self.value) gx = cuda.elementwise( 'T x, T gy, T value', 'T gx', 'gx = value * pow(x, value - 1) * gy', 'pow_var_const_bwd')(x, gy, self.val) return gx, def backward(self, indexes, ggx): x, gy = self.get_retained_inputs() if self.val is None: self.val = _preprocess_const(x.data, self.value) if self.val_1 is None: self.val_1 = _preprocess_const(x.data, self.value - 1) val_2 = _preprocess_const(x.data, self.value - 2) ret = [] if 0 in indexes: ret.append(ggx[0] * self.val * gy * self.val_1 * x ** val_2) if 1 in indexes: ret.append(ggx[0] * self.val * x ** self.val_1) return ret def pow(self, rhs): # lhs ** rhs """Element-wise power function. Returns: ~chainer.Variable: Output variable. """ if isinstance(rhs, variable.Variable): return PowVarVar().apply((self, rhs))[0] <API key>(rhs) return PowVarConst(rhs).apply((self,))[0] class PowConstVar(function_node.FunctionNode): def __init__(self, value): self.value = value @property def label(self): return '%s ** _' % <API key>(self.value) def check_type_forward(self, in_types): type_check.expect(in_types.size() == 1) type_check.expect(in_types[0].dtype.kind == 'f') def forward(self, x): self.retain_outputs((0,)) value = _preprocess_const(x[0], self.value) y = value ** x[0] return utils.force_array(y), def backward(self, indexes, gy): outputs = self.<API key>() return PowConstVarGrad(self.value).apply((outputs[0], gy[0])) class PowConstVarGrad(function_node.FunctionNode): def __init__(self, value): self.value = value def check_type_forward(self, in_types): type_check.expect(in_types.size() == 2) type_check.expect( in_types[0].dtype.kind == 'f', in_types[0].dtype == in_types[1].dtype, in_types[0].shape == in_types[1].shape ) def forward_cpu(self, inputs): self.retain_inputs((0, 1)) y, gy = inputs self.value = _preprocess_const(y, self.value) gx = utils.force_array( numpy.log(self.value, dtype=y.dtype) * y * gy) return gx, def forward_gpu(self, inputs): self.retain_inputs((0, 1)) y, gy = inputs self.value = _preprocess_const(y, self.value) gx = cuda.elementwise( 'T y, T gy, T value', 'T gx', 'gx = log(value) * y * gy', 'pow_const_var_bwd')(y, gy, self.value) return gx, def backward(self, indexes, ggx): y, gy = self.get_retained_inputs() xp = cuda.get_array_module(y) gygy = xp.log(self.value) * ggx[0] ret = [] if 0 in indexes: ret.append(gygy * gy) if 1 in indexes: ret.append(gygy * y) return ret def rpow(self, rhs): # rhs ** lhs """Element-wise power function. Returns: ~chainer.Variable: Output variable. """ if isinstance(rhs, variable.Variable): return PowVarVar().apply((rhs, self))[0] <API key>(rhs) return PowConstVar(rhs).apply((self,))[0] class MatMulVarVar(_matmul.MatMul): @property def label(self): return '_ @ _' class MatMulVarConst(function_node.FunctionNode): def __init__(self, value): self.value = value @property def label(self): return '_ @ %s' % <API key>(self.value) def check_type_forward(self, in_types): type_check.expect(in_types.size() == 1) a_type = in_types[0] b_type = self.value type_check.expect( a_type.dtype.kind == 'f', b_type.dtype.kind == 'f', a_type.ndim >= 1, a_type.ndim == b_type.ndim, ) ndim = type_check.eval(a_type.ndim) if ndim == 1: type_check.expect(a_type.shape == b_type.shape) else: a_idx = _matmul._get_check_index(False, False, row_idx=-2, col_idx=-1) b_idx = _matmul._get_check_index(False, True, row_idx=-2, col_idx=-1) type_check.expect( a_type.shape[:-2] == b_type.shape[:-2], a_type.shape[a_idx] == b_type.shape[b_idx], ) def forward(self, x): self.retain_inputs((0,)) return utils.force_array(_matmul._matmul(x[0], self.value)), def backward(self, indexes, gy): x = self.get_retained_inputs() if gy[0].ndim == 0: gx0 = chainer.functions.broadcast_to( gy[0], self.value.shape) * self.value else: gx0 = chainer.functions.reshape( chainer.functions.matmul(gy[0], self.value, False, True), x[0].shape) return gx0, class MatMulConstVar(function_node.FunctionNode): def __init__(self, value): self.value = value @property def label(self): return '%s @ _' % <API key>(self.value) def check_type_forward(self, in_types): type_check.expect(in_types.size() == 1) a_type = self.value b_type = in_types[0] type_check.expect( a_type.dtype.kind == 'f', b_type.dtype.kind == 'f', a_type.ndim >= 1, a_type.ndim == b_type.ndim, ) ndim = type_check.eval(a_type.ndim) if ndim == 1: type_check.expect(a_type.shape == b_type.shape) else: a_idx = _matmul._get_check_index(False, False, row_idx=-2, col_idx=-1) b_idx = _matmul._get_check_index(False, True, row_idx=-2, col_idx=-1) type_check.expect( a_type.shape[:-2] == b_type.shape[:-2], a_type.shape[a_idx] == b_type.shape[b_idx], ) def forward(self, x): self.retain_inputs((0,)) return utils.force_array(_matmul._matmul(self.value, x[0])), def backward(self, x, gy): x = self.get_retained_inputs() if gy[0].ndim == 0: gx1 = chainer.functions.broadcast_to( gy[0], self.value.shape) * self.value else: gx1 = chainer.functions.reshape( chainer.functions.matmul(self.value, gy[0], True, False), x[0].shape) return gx1, def matmul(self, rhs): # lhs @ rhs """Matrix multiplication. Returns: ~chainer.Variable: Output variable. """ if isinstance(rhs, variable.Variable): return MatMulVarVar().apply((self, rhs))[0] <API key>(rhs) return MatMulVarConst(rhs).apply((self,))[0] def rmatmul(self, rhs): # rhs @ lhs """Matrix multiplication. Returns: ~chainer.Variable: Output variable. """ if isinstance(rhs, variable.Variable): return MatMulVarVar().apply((rhs, self))[0] <API key>(rhs) return MatMulConstVar(rhs).apply((self,))[0] def <API key>(): variable.Variable.__neg__ = neg variable.Variable.__abs__ = absolute variable.Variable.__add__ = add variable.Variable.__radd__ = add variable.Variable.__sub__ = sub variable.Variable.__rsub__ = rsub variable.Variable.__mul__ = mul variable.Variable.__rmul__ = mul variable.Variable.__div__ = div variable.Variable.__truediv__ = div variable.Variable.__rdiv__ = rdiv variable.Variable.__rtruediv__ = rdiv variable.Variable.__floordiv__ = floordiv variable.Variable.__rfloordiv__ = rfloordiv variable.Variable.__pow__ = pow variable.Variable.__rpow__ = rpow variable.Variable.__matmul__ = matmul variable.Variable.__rmatmul__ = rmatmul
package clipboard import ( "time" ) type Duration struct { time.Duration } func (d *Duration) UnmarshalText(text []byte) error { var err error d.Duration, err = time.ParseDuration(string(text)) return err } func (d Duration) MarshalText() ([]byte, error) { return []byte(d.String()), nil }
describe <API key> do pending 'write some specs' end
if (isset($factores_de_riesgo) && sizeof($factores_de_riesgo) > 0 ): ?> <div class='table table-responsive'> <table class='table table-striped table-bordered table-hover'> <thead> <tr> <th>Nombre</th> <th>Descripción</th> <th>Ejemplo</th> <th>Tipo</th> <th>Imagen asociada</th> </tr> </thead> <tbody> <?php foreach ($factores_de_riesgo as $fr): ?> <tr> <td><?php echo $fr->nombre_factorriesgo ?></td> <td><?php echo $fr-><API key> ?></td> <td><?php echo $fr-><API key> ?></td> <td><?php echo ($fr->incluir) ? "Inclusión" : "Exclusión" ?></td> <td><img src="<?php echo asset_url('img/'.$fr->imagen_factorriesgo); ?>" alt="<?php echo $fr->nombre_factorriesgo ?>" width="70px"></td> </tr> <?php endforeach ?> </tbody> </table> </div> <?php else: ?> <p>No se encontraron resultados.</p> <?php endif; ?>
<?php declare(strict_types=1); namespace SciPHPy\TimeSeries\Contracts; interface CostAccumulator extends CostFunction { public function <API key>( float $target, float $prediction, float $lastKnownState = null, int $predictionHorizon = 1 ): void; }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (10.0.1) on Sat Jun 23 21:00:07 PDT 2018 --> <title>API Help</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="date" content="2018-06-23"> <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style"> <script type="text/javascript" src="script.js"></script> <script type="text/javascript" src="jquery/jszip/dist/jszip.min.js"></script> <script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils.min.js"></script> <!--[if IE]> <script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> <![endif] <script type="text/javascript" src="jquery/jquery-1.10.2.js"></script> <script type="text/javascript" src="jquery/jquery-ui.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="API Help"; } } catch(err) { } var pathtoroot = "./";loadScripts(document, 'script');</script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="fixedNav"> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="main/package-summary.html">Package</a></li> <li>Class</li> <li>Use</li> <li><a href="main/package-tree.html">Tree</a></li> <li><a href="deprecated-list.html">Deprecated</a></li> <li><a href="index-files/index-1.html">Index</a></li> <li class="navBarCell1Rev">Help</li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="index.html?help-doc.html" target="_top">Frames</a></li> <li><a href="help-doc.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <ul class="navListSearch"> <li><label for="search">SEARCH:</label> <input type="text" id="search" value="search" disabled="disabled"> <input type="reset" id="reset" value="reset" disabled="disabled"> </li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> </div> <a name="skip.navbar.top"> </a></div> </div> <div class="navPadding">&nbsp;</div> <script type="text/javascript"><! $('.navPadding').css('padding-top', $('.fixedNav').css("height")); </script> <div class="header"> <h1 class="title">How This API Document Is Organized</h1> <div class="subTitle">This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.</div> </div> <div class="contentContainer"> <ul class="blockList"> <li class="blockList"> <h2>Package</h2> <p>Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:</p> <ul> <li>Interfaces (italic)</li> <li>Classes</li> <li>Enums</li> <li>Exceptions</li> <li>Errors</li> <li>Annotation Types</li> </ul> </li> <li class="blockList"> <h2>Class/Interface</h2> <p>Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:</p> <ul> <li>Class inheritance diagram</li> <li>Direct Subclasses</li> <li>All Known Subinterfaces</li> <li>All Known Implementing Classes</li> <li>Class/interface declaration</li> <li>Class/interface description</li> </ul> <ul> <li>Nested Class Summary</li> <li>Field Summary</li> <li>Constructor Summary</li> <li>Method Summary</li> </ul> <ul> <li>Field Detail</li> <li>Constructor Detail</li> <li>Method Detail</li> </ul> <p>Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</p> </li> <li class="blockList"> <h2>Annotation Type</h2> <p>Each annotation type has its own separate page with the following sections:</p> <ul> <li>Annotation Type declaration</li> <li>Annotation Type description</li> <li>Required Element Summary</li> <li>Optional Element Summary</li> <li>Element Detail</li> </ul> </li> <li class="blockList"> <h2>Enum</h2> <p>Each enum has its own separate page with the following sections:</p> <ul> <li>Enum declaration</li> <li>Enum description</li> <li>Enum Constant Summary</li> <li>Enum Constant Detail</li> </ul> </li> <li class="blockList"> <h2>Use</h2> <p>Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.</p> </li> <li class="blockList"> <h2>Tree (Class Hierarchy)</h2> <p>There is a <a href="overview-tree.html">Class Hierarchy</a> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.</p> <ul> <li>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.</li> <li>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</li> </ul> </li> <li class="blockList"> <h2>Deprecated API</h2> <p>The <a href="deprecated-list.html">Deprecated API</a> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</p> </li> <li class="blockList"> <h2>Index</h2> <p>The <a href="index-files/index-1.html">Index</a> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</p> </li> <li class="blockList"> <h2>Prev/Next</h2> <p>These links take you to the next or previous class, interface, package, or related page.</p> </li> <li class="blockList"> <h2>Frames/No Frames</h2> <p>These links show and hide the HTML frames. All pages are available with or without frames.</p> </li> <li class="blockList"> <h2>All&nbsp;Classes</h2> <p>The <a href="allclasses-noframe.html">All Classes</a> link shows all classes and interfaces except non-static nested types.</p> </li> <li class="blockList"> <h2>Serialized Form</h2> <p>Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.</p> </li> <li class="blockList"> <h2>Constant Field Values</h2> <p>The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.</p> </li> </ul> <span class="emphasizedPhrase">This help file applies to API documentation generated using the standard doclet.</span></div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="main/package-summary.html">Package</a></li> <li>Class</li> <li>Use</li> <li><a href="main/package-tree.html">Tree</a></li> <li><a href="deprecated-list.html">Deprecated</a></li> <li><a href="index-files/index-1.html">Index</a></li> <li class="navBarCell1Rev">Help</li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="index.html?help-doc.html" target="_top">Frames</a></li> <li><a href="help-doc.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> </div> <a name="skip.navbar.bottom"> </a></div> </body> </html>
import 'whatwg-fetch' import { message } from 'antd' import global from './global' function checkStatus(response) { console.info(response) if (response.status >= 200 && response.status < 300) { return response } else if (response.status == 401) { message.error('') location.href = '/' } else { var error = new Error(response.statusText) error.response = response throw error } } /**json */ function parseJSON(response) { if(response) { return response.json() } return response } /** * json */ export function postJSON(url, data, headers, type) { console.info('request params', data) return fetch(global.api + url, { // credentials: 'same-origin', // mode: 'cors', method: type || 'POST', headers: { "content-type": "application/json", "token": window.LS.get('token'), headers }, body: JSON.stringify(data || {}) }) .then(checkStatus) .then(parseJSON) .then(json => { console.info('response', json) if (json.code !== global.successCode) { message.error(json.message) } return json }) .catch(error=> { console.info('=====', error.response) if(error.response) { const { status, statusText, url } = error.response message.error(`${status}: ${statusText} ${url}`) } return error.response }) } export function hasPermission(code) { const userInfo = JSON.parse(window.LS.get('userInfo') || '{}') const roleList = JSON.parse(window.LS.get('roleList') || '{}') const authorizedRoute = JSON.parse(window.LS.get('authorizedRoute') || '{}') const currentPath = location.pathname let hasPermission = false const role = _.find(roleList, {id: code, roleid: parseInt(userInfo.role), type: '2'}) if(role) { const { parentId, id } = role for(let route of authorizedRoute) { if(route.data && route.data.id == parentId) { const {permissions} = route.data if(permissions && _.find(permissions, {id})) { hasPermission = true break } } else if(route.routes) { for(let subRoute of route.routes) { if(subRoute.data && subRoute.data.id == parentId) { const {permissions} = subRoute.data if(permissions && _.find(permissions, {id})) { hasPermission = true break } } } } } } return hasPermission } /** * * * @param {Array} start [r,g,b] * @param {Array} end [r,g,b] * @param {Number} divideBY */ export function <API key>(start, end, divideBY) { const [sr, sg, sb] = start, [er, eg, eb] = end; const rStep = (er - sr) / divideBY, gStep = (eg - sg) / divideBY, bStep = (eb - sb) / divideBY; const dividedColor = new Array(divideBY + 1).join('_').split('').map((_, i) => [sr + rStep * i, sg + gStep * i, sb + bStep * i].map(ele => Math.round(ele))) return dividedColor.concat([end]) } /** * @function splitWith * func * @param {Array} arr * @param {Function} func */ export function splitWith(arr, func) { if (!Array.isArray(arr) || typeof func !== 'function') { throw new TypeError('arrfunc') } const result = [] let index = 0 arr.forEach((e, i) => { if (func(e, i)) { index++ } else { if (!result[index]) { result[index] = [] } result[index].push(e) } }) return result.filter(r => r && r.length > 0) } /** * searchString * @param {String} name */ export function getURLParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", 'i'); var result = window.location.search.substr(1).match(reg); // querystring if (result != null) { return decodeURIComponent(result[2]); } else { return null; } }
using System; using System.Collections.Generic; namespace Neemo.CarParts.EntityFramework.Models { public partial class PartPrice { public int PartPriceID { get; set; } public Nullable<int> PartID { get; set; } public Nullable<decimal> Price { get; set; } public int Quantity { get; set; } public Nullable<bool> Active { get; set; } public Nullable<System.DateTime> CreatedDateTime { get; set; } public string CreatedByUser { get; set; } public Nullable<System.DateTime> <API key> { get; set; } public string LastModifiedByUser { get; set; } public Nullable<System.DateTime> DeletedDateTime { get; set; } public string DeletedByUser { get; set; } public Nullable<System.DateTime> EffectiveDateFrom { get; set; } public Nullable<System.DateTime> EffectiveDateTo { get; set; } } }
require "spec_helper" RSpec.describe AffiliateWindow::ETL::Transformer do let(:normaliser) { AffiliateWindow::ETL::Normaliser.new } subject { described_class.new(normaliser: normaliser) } it "transforms a record to an array of attributes" do result = subject.transform( record_type: :record_type, s_foo: "foo", i_bar: 123, ) expect(result).to eq [{ record_type: :record_type, foo: "foo", bar: 123, }] end it "does not affect keys that do not start with *_" do result = subject.transform( record_type: :record_type, foo: "bar", ) expect(result).to eq [{ record_type: :record_type, foo: "bar", }] end it "flattens out nested hashes" do result = subject.transform( record_type: :record_type, o_foo: { s_bar: "bar", i_baz: 123, o_qux: { s_abc: "abc", bcd: 456, }, }, ) expect(result).to eq [{ record_type: :record_type, foo_bar: "bar", foo_baz: 123, foo_qux_abc: "abc", foo_qux_bcd: 456, }] end it "raises a helpful error if the value is an array" do expect do subject.transform(record_type: :record_type, foo: []) end.to raise_error(described_class::TypeError, /normalise elements of the array/) end describe "normalisations" do it "normalises transaction_parts" do record = { record_type: :transaction, i_id: 123, foo: "bar", a_transaction_parts: { transaction_part: [ { bar: "baz" }, { bar: "qux" }, ], }, } result = subject.transform(record) expect(result).to match_array [ { record_type: :transaction_part, transaction_id: 123, bar: "baz", }, { record_type: :transaction_part, transaction_id: 123, bar: "qux", }, { record_type: :transaction, id: 123, foo: "bar", }, ] end end end
App.GroupsNewController = Ember.ObjectController.extend({ needs: ['groups', 'contactsNew'], newContact: null, newGroup: true, startEditing: function() { var controller = this; var childSession = this.session.newSession(); this.newContact = this.session.create('contact'); return controller.get('contacts').pushObject(this.newContact); }, save: function() { var controller = this; this.newContact.session.flush().then(function(models) { var newGroup = controller.get('model'); controller.get('controllers.groups').content.pushObject(newGroup); controller.transitionToRoute('group', newGroup); }, function(models) { var errors = models[0].errors; if (errors.status !== 422) { // 422 (Unprocessable Entity) errors are handled by the form, see groups/new.hbs alert("Error " + errors.status + ": " + errors.xhr.statusText); } }); }, addPhoneNumber: function() { this.newContact.session.add(App.PhoneNumber.create({contact: this.newContact})) }, removePhoneNumber: function(phoneNumber) { this.newContact.session.deleteModel(phoneNumber); } });
package nl.tudelft.watchdog.eclipse.ui.util; import nl.tudelft.watchdog.core.util.WatchDogLogger; import nl.tudelft.watchdog.eclipse.Activator; import nl.tudelft.watchdog.eclipse.ui.WatchDogView; import nl.tudelft.watchdog.eclipse.ui.util.CommandExecuterBase.CommandExecuter; import nl.tudelft.watchdog.eclipse.ui.util.CommandExecuterBase.CommandRefresher; import nl.tudelft.watchdog.eclipse.util.WatchDogUtils; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.swt.SWT; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseListener; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Link; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.PlatformUI; /** Utility methods for the UI. */ public class UIUtils { /** The command to show the WatchDog info. */ public static final String COMMAND_SHOW_INFO = "nl.tudelft.watchdog.commands.showWatchDogInfo"; public static Label createWrappingLabel(String text, Composite parent) { Label label = createLabel(text, SWT.WRAP, parent); GridData labelData = new GridData(); labelData.widthHint = parent.getParent().getClientArea().width - 30; label.setLayoutData(labelData); return label; } /** Creates and returns a bold text label. */ public static Label createBoldLabel(String text, Composite parent) { Label label = createLabel(text, parent); label.setFont(JFaceResources.getFontRegistry().getBold("")); return label; } /** Creates and returns a bold text label with associated SWT-Style. */ public static Label createBoldLabel(String text, int swtStyle, Composite parent) { Label label = createLabel(text, swtStyle, parent); label.setFont(JFaceResources.getFontRegistry().getBold("")); return label; } /** Creates and returns an italic text label. */ public static Label createItalicLabel(String text, Composite parent) { Label label = createLabel(text, parent); label.setFont(JFaceResources.getFontRegistry().getItalic("")); return label; } /** Creates and returns a label with the given text. */ public static Label createLabel(String text, Composite parent) { return createLabel(text, SWT.NONE, parent); } /** Creates and returns a label with a given style and text. */ public static Label createLabel(String text, int style, Composite parent) { Label label = new Label(parent, style); label.setText(text); return label; } /** Creates and returns a user text input field. */ public static Text createTextInput(Composite parent) { Text text = new Text(parent, SWT.SINGLE | SWT.BORDER); text.setLayoutData(<API key>()); return text; } /** Creates uneditable text field. */ public static Text createTextField(Composite parent, String content) { Text text = new Text(parent, SWT.SINGLE | SWT.BORDER); text.setLayoutData(new GridData(SWT.BOTTOM, SWT.BEGINNING, true, false)); text.setText(content); text.setEditable(false); return text; } /** Creates and returns a radio button with the given text. */ public static Button createRadioButton(Composite parent, String text) { Button button = new Button(parent, SWT.RADIO); button.setText(text); return button; } /** * Creates and returns a grided composite, that fills out its parent to the * fullest extent. */ public static Composite <API key>(Composite parent, int columns) { Composite composite = UIUtils.<API key>(parent, columns); composite.setLayoutData(UIUtils.<API key>()); return composite; } /** * @return A {@link GridLayout}ed composite with the given number of * columns. */ public static Composite <API key>(Composite parent, int columns) { Composite composite = <API key>(parent, columns); GridLayout layout = (GridLayout) composite.getLayout(); layout.marginBottom = 0; layout.marginHeight = 0; layout.marginLeft = 0; layout.marginRight = 0; layout.marginTop = 0; layout.marginWidth = 0; composite.setLayout(layout); return composite; } /** * @return A {@link GridLayout}ed composite with the given number of * columns. */ public static Composite <API key>(Composite parent, int columns) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout(columns, false)); return composite; } /** @return A fully horizontally greedy Grid. */ public static GridData <API key>() { // Has to create new instances because the existing instance are altered // once passed into an object. return new GridData(SWT.FILL, SWT.NONE, true, false); } /** * Creates a pair of a linked Label and text input field. * * @param labelText * The text of the label associated with the input. * @param toolTip * The tooltip displayed on both the label and the input. * @param composite * The composite on which both should be put. * @return input The linked input. */ public static Text <API key>(String labelText, String toolTip, Composite composite) { Label label = UIUtils.createLabel(labelText, composite); label.setToolTipText(toolTip); Text input = UIUtils.createTextInput(composite); input.setLayoutData(UIUtils.<API key>()); input.setToolTipText(toolTip); UIUtils.<API key>(label, input); return input; } /** * Attaches a listener to the specified label that directs the focus to the * supplied text (resulting in an HTML form-like connection of the label and * its input field). */ private static void <API key>(Label label, final Text text) { label.addMouseListener(new MouseListener() { @Override public void mouseUp(MouseEvent e) { // intentionally left empty } @Override public void mouseDown(MouseEvent e) { <API key>(); } @Override public void mouseDoubleClick(MouseEvent e) { <API key>(); } private void <API key>() { text.forceFocus(); } }); } /** The TU Logo. */ public static final ImageDescriptor TU_DELFT_LOGO = Activator .<API key>(Activator.PLUGIN_ID, "resources/images/tudelft_with_frame.png"); /** The WatchDog Icon. */ public static final ImageDescriptor WATCHDOG_ICON = Activator .<API key>(Activator.PLUGIN_ID, "resources/images/watchdog_icon.png"); /** The WatchDog Icon Disabled. */ public static final ImageDescriptor <API key> = Activator .<API key>(Activator.PLUGIN_ID, "resources/images/<API key>.png"); /** The WatchDog Icon Warning. */ public static final ImageDescriptor <API key> = Activator .<API key>(Activator.PLUGIN_ID, "resources/images/<API key>.png"); /** Creates and returns a label with the given text and color. */ public static Label createLabel(String text, Composite parent, Color color) { Label label = createLabel(text, parent); label.setForeground(color); return label; } /** Creates a centered label containing the WatchDogLogo. */ public static Label createWatchDogLogo(Composite logoContainer) { return createLogo(logoContainer, "resources/images/watchdog_small.png"); } /** Creates a logo from the given image url. */ public static Label createLogo(Composite logoContainer, String imageLocation) { Label watchdogLogo = new Label(logoContainer, SWT.NONE); ImageDescriptor <API key> = Activator .<API key>(Activator.PLUGIN_ID, imageLocation); Image watchdogLogoImage = <API key>.createImage(); watchdogLogo.setImage(watchdogLogoImage); watchdogLogo.setLayoutData(new GridData(SWT.CENTER, SWT.BEGINNING, true, false)); return watchdogLogo; } /** Invokes the supplied command. */ public static void invokeCommand(final String command) { new CommandExecuter(command).execute(); } /** Refreshes the supplied command's ui elements. */ public static void refreshCommand(final String command) { new CommandRefresher(command).execute(); } /** Updates WatchDog. */ public static void updateWatchDog() { invokeCommand("org.eclipse.equinox.p2.ui.sdk.update"); } /** * Returns the WatchDog view, or <code>null</code> if it cannot launch or * find it. */ public static WatchDogView getWatchDogView() { try { return (WatchDogView) PlatformUI.getWorkbench() .<API key>().getActivePage() .findViewReference(WatchDogView.ID).getView(false); } catch (<API key> npe) { WatchDogLogger.getInstance().logSevere(npe); return null; } } /** Creates a clickable link with the given description text. */ public static Link createLinkedLabel(Composite parent, SelectionListener listener, String description, String url) { Link link = new Link(parent, SWT.WRAP); link.setText("<a href=\"" + url + "\">" + description + "</a>"); link.<API key>(listener); return link; } /** Creates a Combo List of String items. */ public static Combo createComboList(Composite parent, SelectionListener listener, String[] items, int defaultSelection) { Combo comboList = new Combo(parent, SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY); comboList.setItems(items); comboList.select(defaultSelection); comboList.<API key>(listener); return comboList; } /** Creates a linked label that opens the project report in a browser. */ public static void <API key>(Composite container) { String projectReport = "http: + WatchDogUtils.getProjectSetting().projectId + ".html"; UIUtils.createLinkedLabel(container, new <API key>(), "Open Report.", projectReport); } }
# tumblr-2-pe-epub Fetches a Tumblr and converts it to [peepub](https://github.com/peoples-e/pe-epub) JSON format so you can easily make an e-book from a Tumblr ## Install npm install tumblr-2-pe-epub ## Usage var Tumblr2Peepub = require('tumblr-2-pe-epub'); var t2p = new Tumblr2Peepub({ consumer_key: 'xxx', consumer_secret: 'xxx' }); t2p.fetch('tumblr_prefix', function(err, json){ console.log(json); // now you can use pe-epub to create an ebook }); ## Development index.coffee is the working file. Develop with.... npm run-script watch Testing You'll need your own Tumblr creds in config.js. Then... npm test
#Written by Nick Loman (@pathogenomenick) import os import sys from Bio import SeqIO from clint.textui import colored, puts, indent def <API key>(ref): recs = list(SeqIO.parse(open(ref), "fasta")) if len (recs) != 1: print >>sys.stderr, "FASTA has more than one sequence" raise SystemExit return "%s:%d-%d" % (recs[0].id, 1, len(recs[0])+1) def run(parser, args): log = "%s.minion.log.txt" % (args.sample) logfh = open(log, 'w') ref = "%s/%s/V1/%s.reference.fasta" % (args.scheme_directory, args.scheme, args.scheme) bed = "%s/%s/V1/%s.scheme.bed" % (args.scheme_directory, args.scheme, args.scheme) if args.read_file: read_file = args.read_file else: read_file = "%s.fasta" % (args.sample) if not os.path.exists(ref): print colored.red('Scheme reference file not found: ') + ref raise SystemExit if not os.path.exists(bed): print colored.red('Scheme BED file not found: ') + bed raise SystemExit cmds = [] nanopolish_header = <API key>(ref) # 3) index the ref & align with bwa" cmds.append("bwa index %s" % (ref,)) cmds.append("bwa mem -t %s -x ont2d %s %s | samtools view -bS - | samtools sort -o %s.sorted.bam -" % (args.threads, ref, read_file, args.sample)) cmds.append("samtools index %s.sorted.bam" % (args.sample,)) # 4) trim the alignments to the primer start sites and normalise the coverage to save time if args.normalise: normalise_string = '--normalise %d' % (args.normalise) else: normalise_string = '' cmds.append("align_trim.py --start %s %s --report %s.alignreport.txt < %s.sorted.bam 2> %s.alignreport.er | samtools view -bS - | samtools sort -T %s - -o %s.trimmed.sorted.bam" % (normalise_string, bed, args.sample, args.sample, args.sample, args.sample, args.sample)) cmds.append("align_trim.py %s %s --report %s.alignreport.txt < %s.sorted.bam 2> %s.alignreport.er | samtools view -bS - | samtools sort -T %s - -o %s.primertrimmed.sorted.bam" % (normalise_string, bed, args.sample, args.sample, args.sample, args.sample, args.sample)) cmds.append("samtools index %s.trimmed.sorted.bam" % (args.sample)) cmds.append("samtools index %s.primertrimmed.sorted.bam" % (args.sample)) #covplot.R $sample.alignreport.txt # 6) do variant calling using the raw signal alignment if not args.skip_nanopolish: if args.<API key>: <API key> = args.<API key> else: <API key> = read_file cmds.append("nanopolish variants -x %s --progress -t %s --reads %s -o %s.vcf -b %s.trimmed.sorted.bam -g %s -w \"%s\" --snps --ploidy 1" % (args.max_haplotypes, args.threads, <API key>, args.sample, args.sample, ref, nanopolish_header)) cmds.append("nanopolish variants -x %s --progress -t %s --reads %s -o %s.primertrimmed.vcf -b %s.primertrimmed.sorted.bam -g %s -w \"%s\" --snps --ploidy 1" % (args.max_haplotypes, args.threads, <API key>, args.sample, args.sample, ref, nanopolish_header)) #python nanopore-scripts/expand-cigar.py --bam "$sample".primertrimmed.sorted.bam --fasta $ref | python nanopore-scripts/count-errors.py /dev/stdin > "$sample".errors.txt # 7) do phasing #nanopolish phase-reads --reads $sample.fasta --bam $sample.trimmed.sorted.bam --genome $ref $sample.vcf # 8) variant frequency plot cmds.append("vcfextract.py %s > %s.variants.tab" % (args.sample, args.sample)) # 8) filter the variants and produce a consensus # here we use the vcf file without primer binding site trimming (to keep nanopolish happy with flanks) # but we use the primertrimmed sorted bam file in order that primer binding sites do not count # for the depth calculation to determine any low coverage sites that need masking cmds.append("margin_cons.py %s %s.vcf %s.primertrimmed.sorted.bam a > %s.consensus.fasta" % (ref, args.sample, args.sample, args.sample)) for cmd in cmds: print >>sys.stderr, colored.green("Running: ") + cmd print >>logfh, cmd retval = os.system(cmd) if retval != 0: print >>sys.stderr, colored.red('Command failed:' ) + cmd logfh.close()
% file: parts/overview.tex %%%%%%%%%%%%%%% \begin{frame}{} \begin{columns} \column{0.30\textwidth} \uncover<2->{\fignocaption{width = 0.80\textwidth}{figs/thought}} \column{0.60\textwidth} \begin{description} \setlength{\itemsep}{10pt} \item[(1) Diameter of Convex Polygon:] $\Theta(n)$ \item[(2) Lower Bound for Sorting:] $\Omega(n \lg n)$ \item[(3) Traversal over Trees:] DFS/BFS ($\Theta(n)$) \end{description} \end{columns} \pause \vspace{0.60cm} \uncover<2->{\centerline{\Large I have thought that $\cdots$}} \end{frame} %%%%%%%%%%%%%%%